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
0bd93c02ab7917d570a74cf151dfb5789c3bf174
scripts/remove_concepts_after.py
scripts/remove_concepts_after.py
# An entirely untested script to delete all the concepts in the # CATMAID database for a particular project. # Mark Longair 2010 import os from jarray import array from java.sql import DriverManager, Connection, SQLException, Types # FIXME: Just hardcode the user_id and project_id for the moment user_id = 3 proje...
Add a brutal script for removing concepts in bulk while testing
Add a brutal script for removing concepts in bulk while testing
Python
agpl-3.0
fzadow/CATMAID,htem/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID,fzadow/CATMAID
Add a brutal script for removing concepts in bulk while testing
# An entirely untested script to delete all the concepts in the # CATMAID database for a particular project. # Mark Longair 2010 import os from jarray import array from java.sql import DriverManager, Connection, SQLException, Types # FIXME: Just hardcode the user_id and project_id for the moment user_id = 3 proje...
<commit_before><commit_msg>Add a brutal script for removing concepts in bulk while testing<commit_after>
# An entirely untested script to delete all the concepts in the # CATMAID database for a particular project. # Mark Longair 2010 import os from jarray import array from java.sql import DriverManager, Connection, SQLException, Types # FIXME: Just hardcode the user_id and project_id for the moment user_id = 3 proje...
Add a brutal script for removing concepts in bulk while testing# An entirely untested script to delete all the concepts in the # CATMAID database for a particular project. # Mark Longair 2010 import os from jarray import array from java.sql import DriverManager, Connection, SQLException, Types # FIXME: Just hardco...
<commit_before><commit_msg>Add a brutal script for removing concepts in bulk while testing<commit_after># An entirely untested script to delete all the concepts in the # CATMAID database for a particular project. # Mark Longair 2010 import os from jarray import array from java.sql import DriverManager, Connection, ...
9e388ad5b78967f87a0b3b55235bd1e19183c152
tests/models/spells/test_paladin_spells.py
tests/models/spells/test_paladin_spells.py
import unittest from tests.delete_test_db import delete_test_db # module that deletes the DB :) import database.main from tests.create_test_db import engine, session, Base database.main.engine = engine database.main.session = session database.main.Base = Base import models.main from models.spells.paladin_spells_tem...
Test for the PaladinSpellSchema values
Test for the PaladinSpellSchema values
Python
mit
Enether/python_wow
Test for the PaladinSpellSchema values
import unittest from tests.delete_test_db import delete_test_db # module that deletes the DB :) import database.main from tests.create_test_db import engine, session, Base database.main.engine = engine database.main.session = session database.main.Base = Base import models.main from models.spells.paladin_spells_tem...
<commit_before><commit_msg>Test for the PaladinSpellSchema values<commit_after>
import unittest from tests.delete_test_db import delete_test_db # module that deletes the DB :) import database.main from tests.create_test_db import engine, session, Base database.main.engine = engine database.main.session = session database.main.Base = Base import models.main from models.spells.paladin_spells_tem...
Test for the PaladinSpellSchema valuesimport unittest from tests.delete_test_db import delete_test_db # module that deletes the DB :) import database.main from tests.create_test_db import engine, session, Base database.main.engine = engine database.main.session = session database.main.Base = Base import models.main...
<commit_before><commit_msg>Test for the PaladinSpellSchema values<commit_after>import unittest from tests.delete_test_db import delete_test_db # module that deletes the DB :) import database.main from tests.create_test_db import engine, session, Base database.main.engine = engine database.main.session = session dat...
803201baa32fb847f363b6807f92f2d0b6a51c51
tests/test_abort_generate_on_hook_error.py
tests/test_abort_generate_on_hook_error.py
# -*- coding: utf-8 -*- import pytest from cookiecutter import generate from cookiecutter import exceptions @pytest.mark.usefixtures('clean_system') def test_pre_gen_hook(tmpdir): context = { 'cookiecutter': { "repo_dir": "foobar", "abort_pre_gen": "yes", "abort_post_...
Test that an error in pre_gen_project aborts generation
Test that an error in pre_gen_project aborts generation
Python
bsd-3-clause
audreyr/cookiecutter,stevepiercy/cookiecutter,stevepiercy/cookiecutter,michaeljoseph/cookiecutter,willingc/cookiecutter,Springerle/cookiecutter,hackebrot/cookiecutter,hackebrot/cookiecutter,pjbull/cookiecutter,michaeljoseph/cookiecutter,audreyr/cookiecutter,Springerle/cookiecutter,terryjbates/cookiecutter,terryjbates/c...
Test that an error in pre_gen_project aborts generation
# -*- coding: utf-8 -*- import pytest from cookiecutter import generate from cookiecutter import exceptions @pytest.mark.usefixtures('clean_system') def test_pre_gen_hook(tmpdir): context = { 'cookiecutter': { "repo_dir": "foobar", "abort_pre_gen": "yes", "abort_post_...
<commit_before><commit_msg>Test that an error in pre_gen_project aborts generation<commit_after>
# -*- coding: utf-8 -*- import pytest from cookiecutter import generate from cookiecutter import exceptions @pytest.mark.usefixtures('clean_system') def test_pre_gen_hook(tmpdir): context = { 'cookiecutter': { "repo_dir": "foobar", "abort_pre_gen": "yes", "abort_post_...
Test that an error in pre_gen_project aborts generation# -*- coding: utf-8 -*- import pytest from cookiecutter import generate from cookiecutter import exceptions @pytest.mark.usefixtures('clean_system') def test_pre_gen_hook(tmpdir): context = { 'cookiecutter': { "repo_dir": "foobar", ...
<commit_before><commit_msg>Test that an error in pre_gen_project aborts generation<commit_after># -*- coding: utf-8 -*- import pytest from cookiecutter import generate from cookiecutter import exceptions @pytest.mark.usefixtures('clean_system') def test_pre_gen_hook(tmpdir): context = { 'cookiecutter': ...
b079edc37cd8abb68194637ee90b9fecc51b9b98
corehq/apps/cachehq/tests.py
corehq/apps/cachehq/tests.py
from copy import deepcopy from mock import patch, MagicMock from django.test import SimpleTestCase from dimagi.ext import couchdbkit as couch from corehq.apps.cachehq.mixins import CachedCouchDocumentMixin class BlogPost(CachedCouchDocumentMixin, couch.Document): title = couch.StringProperty() body = couch.St...
Add basic test for document quickcaching
Add basic test for document quickcaching
Python
bsd-3-clause
qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add basic test for document quickcaching
from copy import deepcopy from mock import patch, MagicMock from django.test import SimpleTestCase from dimagi.ext import couchdbkit as couch from corehq.apps.cachehq.mixins import CachedCouchDocumentMixin class BlogPost(CachedCouchDocumentMixin, couch.Document): title = couch.StringProperty() body = couch.St...
<commit_before><commit_msg>Add basic test for document quickcaching<commit_after>
from copy import deepcopy from mock import patch, MagicMock from django.test import SimpleTestCase from dimagi.ext import couchdbkit as couch from corehq.apps.cachehq.mixins import CachedCouchDocumentMixin class BlogPost(CachedCouchDocumentMixin, couch.Document): title = couch.StringProperty() body = couch.St...
Add basic test for document quickcachingfrom copy import deepcopy from mock import patch, MagicMock from django.test import SimpleTestCase from dimagi.ext import couchdbkit as couch from corehq.apps.cachehq.mixins import CachedCouchDocumentMixin class BlogPost(CachedCouchDocumentMixin, couch.Document): title = co...
<commit_before><commit_msg>Add basic test for document quickcaching<commit_after>from copy import deepcopy from mock import patch, MagicMock from django.test import SimpleTestCase from dimagi.ext import couchdbkit as couch from corehq.apps.cachehq.mixins import CachedCouchDocumentMixin class BlogPost(CachedCouchDocum...
b159433375714c67ac36e58d4323196222759f30
babybuddy/migrations/0003_add_refresh_help_text.py
babybuddy/migrations/0003_add_refresh_help_text.py
# Generated by Django 2.0.5 on 2018-07-15 14:16 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('babybuddy', '0002_add_settings'), ] operations = [ migrations.AlterField( model_name='settings', nam...
Add missing migration from 096092b.
Add missing migration from 096092b.
Python
bsd-2-clause
cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy
Add missing migration from 096092b.
# Generated by Django 2.0.5 on 2018-07-15 14:16 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('babybuddy', '0002_add_settings'), ] operations = [ migrations.AlterField( model_name='settings', nam...
<commit_before><commit_msg>Add missing migration from 096092b.<commit_after>
# Generated by Django 2.0.5 on 2018-07-15 14:16 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('babybuddy', '0002_add_settings'), ] operations = [ migrations.AlterField( model_name='settings', nam...
Add missing migration from 096092b.# Generated by Django 2.0.5 on 2018-07-15 14:16 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('babybuddy', '0002_add_settings'), ] operations = [ migrations.AlterField( mod...
<commit_before><commit_msg>Add missing migration from 096092b.<commit_after># Generated by Django 2.0.5 on 2018-07-15 14:16 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('babybuddy', '0002_add_settings'), ] operations = [ ...
e41b79855e966977c4484efd4ad6a02475833b3e
code/ex4.4-tornado_with_asyncio.py
code/ex4.4-tornado_with_asyncio.py
from tornado.platform.asyncio import AsyncIOMainLoop, to_asyncio_future from tornado.httpclient import AsyncHTTPClient import asyncio import time URL = 'http://127.0.0.1:8000' @asyncio.coroutine def get_greetings(): http_client = AsyncHTTPClient() response = yield from to_asyncio_future(http_client.fetch(UR...
Add ex4.4: tornado multiple requests with asyncio integration
Add ex4.4: tornado multiple requests with asyncio integration
Python
mit
MA3STR0/PythonAsyncWorkshop
Add ex4.4: tornado multiple requests with asyncio integration
from tornado.platform.asyncio import AsyncIOMainLoop, to_asyncio_future from tornado.httpclient import AsyncHTTPClient import asyncio import time URL = 'http://127.0.0.1:8000' @asyncio.coroutine def get_greetings(): http_client = AsyncHTTPClient() response = yield from to_asyncio_future(http_client.fetch(UR...
<commit_before><commit_msg>Add ex4.4: tornado multiple requests with asyncio integration<commit_after>
from tornado.platform.asyncio import AsyncIOMainLoop, to_asyncio_future from tornado.httpclient import AsyncHTTPClient import asyncio import time URL = 'http://127.0.0.1:8000' @asyncio.coroutine def get_greetings(): http_client = AsyncHTTPClient() response = yield from to_asyncio_future(http_client.fetch(UR...
Add ex4.4: tornado multiple requests with asyncio integrationfrom tornado.platform.asyncio import AsyncIOMainLoop, to_asyncio_future from tornado.httpclient import AsyncHTTPClient import asyncio import time URL = 'http://127.0.0.1:8000' @asyncio.coroutine def get_greetings(): http_client = AsyncHTTPClient() ...
<commit_before><commit_msg>Add ex4.4: tornado multiple requests with asyncio integration<commit_after>from tornado.platform.asyncio import AsyncIOMainLoop, to_asyncio_future from tornado.httpclient import AsyncHTTPClient import asyncio import time URL = 'http://127.0.0.1:8000' @asyncio.coroutine def get_greetings()...
ac482caafe8c63de2606bb4894462f7b2e2bcb70
python/printbag.py
python/printbag.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Convert a rosbag file to legacy lidar binary format. """ """LIDAR datatype format is: ( timestamp (long), flag (bool saved as int), accelerometer[3] (double), gps[3] (double), distance[LIDAR_NUM_ANGLES] (long), ) 'int...
Add initial script to print rosbag files
Add initial script to print rosbag files
Python
bsd-2-clause
oliverlee/antlia
Add initial script to print rosbag files
#!/usr/bin/env python # -*- coding: utf-8 -*- """Convert a rosbag file to legacy lidar binary format. """ """LIDAR datatype format is: ( timestamp (long), flag (bool saved as int), accelerometer[3] (double), gps[3] (double), distance[LIDAR_NUM_ANGLES] (long), ) 'int...
<commit_before><commit_msg>Add initial script to print rosbag files<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- """Convert a rosbag file to legacy lidar binary format. """ """LIDAR datatype format is: ( timestamp (long), flag (bool saved as int), accelerometer[3] (double), gps[3] (double), distance[LIDAR_NUM_ANGLES] (long), ) 'int...
Add initial script to print rosbag files#!/usr/bin/env python # -*- coding: utf-8 -*- """Convert a rosbag file to legacy lidar binary format. """ """LIDAR datatype format is: ( timestamp (long), flag (bool saved as int), accelerometer[3] (double), gps[3] (double), distance[L...
<commit_before><commit_msg>Add initial script to print rosbag files<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- """Convert a rosbag file to legacy lidar binary format. """ """LIDAR datatype format is: ( timestamp (long), flag (bool saved as int), accelerometer[3] (double), ...
a2e566cc0b925f80c30602141e890cdf9b13306b
migrations/versions/1003fd6fc47_.py
migrations/versions/1003fd6fc47_.py
"""empty message Revision ID: 1003fd6fc47 Revises: 1a54c4cacbe Create Date: 2015-03-24 13:33:50.898511 """ # revision identifiers, used by Alembic. revision = '1003fd6fc47' down_revision = '1a54c4cacbe' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def upgrade(): ###...
Migrate to latest version of db.
Migrate to latest version of db.
Python
mit
PythonClutch/python-clutch,PythonClutch/python-clutch,PythonClutch/python-clutch
Migrate to latest version of db.
"""empty message Revision ID: 1003fd6fc47 Revises: 1a54c4cacbe Create Date: 2015-03-24 13:33:50.898511 """ # revision identifiers, used by Alembic. revision = '1003fd6fc47' down_revision = '1a54c4cacbe' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def upgrade(): ###...
<commit_before><commit_msg>Migrate to latest version of db.<commit_after>
"""empty message Revision ID: 1003fd6fc47 Revises: 1a54c4cacbe Create Date: 2015-03-24 13:33:50.898511 """ # revision identifiers, used by Alembic. revision = '1003fd6fc47' down_revision = '1a54c4cacbe' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def upgrade(): ###...
Migrate to latest version of db."""empty message Revision ID: 1003fd6fc47 Revises: 1a54c4cacbe Create Date: 2015-03-24 13:33:50.898511 """ # revision identifiers, used by Alembic. revision = '1003fd6fc47' down_revision = '1a54c4cacbe' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import po...
<commit_before><commit_msg>Migrate to latest version of db.<commit_after>"""empty message Revision ID: 1003fd6fc47 Revises: 1a54c4cacbe Create Date: 2015-03-24 13:33:50.898511 """ # revision identifiers, used by Alembic. revision = '1003fd6fc47' down_revision = '1a54c4cacbe' from alembic import op import sqlalchemy...
4aced6fea8ff8ccd087362cb237a9f00d111d0d8
corehq/apps/commtrack/management/commands/toggle_locations.py
corehq/apps/commtrack/management/commands/toggle_locations.py
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from corehq.feature_previews import LOCATIONS from corehq.toggles import NAMESPACE_DOMAIN from toggle.shortcuts import update_toggle_cache, namespaced_item from toggle.models import Toggle class Command(BaseCommand): ...
Add command to turn on locations flag
Add command to turn on locations flag
Python
bsd-3-clause
dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq
Add command to turn on locations flag
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from corehq.feature_previews import LOCATIONS from corehq.toggles import NAMESPACE_DOMAIN from toggle.shortcuts import update_toggle_cache, namespaced_item from toggle.models import Toggle class Command(BaseCommand): ...
<commit_before><commit_msg>Add command to turn on locations flag<commit_after>
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from corehq.feature_previews import LOCATIONS from corehq.toggles import NAMESPACE_DOMAIN from toggle.shortcuts import update_toggle_cache, namespaced_item from toggle.models import Toggle class Command(BaseCommand): ...
Add command to turn on locations flagfrom django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from corehq.feature_previews import LOCATIONS from corehq.toggles import NAMESPACE_DOMAIN from toggle.shortcuts import update_toggle_cache, namespaced_item from toggle.models import Togg...
<commit_before><commit_msg>Add command to turn on locations flag<commit_after>from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain from corehq.feature_previews import LOCATIONS from corehq.toggles import NAMESPACE_DOMAIN from toggle.shortcuts import update_toggle_cache, names...
1eaab9f929dc748e57865fb4c8717158e6c47fa5
ureport/stats/migrations/0018_better_indexes.py
ureport/stats/migrations/0018_better_indexes.py
# Generated by Django 3.2.6 on 2021-10-13 12:37 from django.db import migrations # language=SQL INDEX_SQL_CONTACTACTIVITY_ORG_DATE_SCHEME_NOT_NULL = """ CREATE INDEX IF NOT EXISTS stats_contactactivity_org_id_date_scheme_not_null on stats_contactactivity (org_id, date, scheme) WHERE scheme IS NOT NULL; """ class Mi...
Add more index on contact activities
Add more index on contact activities
Python
agpl-3.0
rapidpro/ureport,Ilhasoft/ureport,Ilhasoft/ureport,rapidpro/ureport,rapidpro/ureport,Ilhasoft/ureport,Ilhasoft/ureport,rapidpro/ureport
Add more index on contact activities
# Generated by Django 3.2.6 on 2021-10-13 12:37 from django.db import migrations # language=SQL INDEX_SQL_CONTACTACTIVITY_ORG_DATE_SCHEME_NOT_NULL = """ CREATE INDEX IF NOT EXISTS stats_contactactivity_org_id_date_scheme_not_null on stats_contactactivity (org_id, date, scheme) WHERE scheme IS NOT NULL; """ class Mi...
<commit_before><commit_msg>Add more index on contact activities<commit_after>
# Generated by Django 3.2.6 on 2021-10-13 12:37 from django.db import migrations # language=SQL INDEX_SQL_CONTACTACTIVITY_ORG_DATE_SCHEME_NOT_NULL = """ CREATE INDEX IF NOT EXISTS stats_contactactivity_org_id_date_scheme_not_null on stats_contactactivity (org_id, date, scheme) WHERE scheme IS NOT NULL; """ class Mi...
Add more index on contact activities# Generated by Django 3.2.6 on 2021-10-13 12:37 from django.db import migrations # language=SQL INDEX_SQL_CONTACTACTIVITY_ORG_DATE_SCHEME_NOT_NULL = """ CREATE INDEX IF NOT EXISTS stats_contactactivity_org_id_date_scheme_not_null on stats_contactactivity (org_id, date, scheme) WHER...
<commit_before><commit_msg>Add more index on contact activities<commit_after># Generated by Django 3.2.6 on 2021-10-13 12:37 from django.db import migrations # language=SQL INDEX_SQL_CONTACTACTIVITY_ORG_DATE_SCHEME_NOT_NULL = """ CREATE INDEX IF NOT EXISTS stats_contactactivity_org_id_date_scheme_not_null on stats_co...
95d87c541ebf82109b882daebcb5b387f0f1cdb8
exp/influence2/ReputationExp2.py
exp/influence2/ReputationExp2.py
import numpy try: ctypes.cdll.LoadLibrary("/usr/local/lib/libigraph.so") except: pass import igraph from apgl.util.PathDefaults import PathDefaults from exp.util.IdIndexer import IdIndexer import xml.etree.ElementTree as ET import array metadataDir = PathDefaults.getDataDir() + "aps/aps-dataset-metada...
Read the american physics society graph
Read the american physics society graph
Python
bsd-3-clause
charanpald/APGL
Read the american physics society graph
import numpy try: ctypes.cdll.LoadLibrary("/usr/local/lib/libigraph.so") except: pass import igraph from apgl.util.PathDefaults import PathDefaults from exp.util.IdIndexer import IdIndexer import xml.etree.ElementTree as ET import array metadataDir = PathDefaults.getDataDir() + "aps/aps-dataset-metada...
<commit_before><commit_msg>Read the american physics society graph <commit_after>
import numpy try: ctypes.cdll.LoadLibrary("/usr/local/lib/libigraph.so") except: pass import igraph from apgl.util.PathDefaults import PathDefaults from exp.util.IdIndexer import IdIndexer import xml.etree.ElementTree as ET import array metadataDir = PathDefaults.getDataDir() + "aps/aps-dataset-metada...
Read the american physics society graph import numpy try: ctypes.cdll.LoadLibrary("/usr/local/lib/libigraph.so") except: pass import igraph from apgl.util.PathDefaults import PathDefaults from exp.util.IdIndexer import IdIndexer import xml.etree.ElementTree as ET import array metadataDir = PathDefault...
<commit_before><commit_msg>Read the american physics society graph <commit_after>import numpy try: ctypes.cdll.LoadLibrary("/usr/local/lib/libigraph.so") except: pass import igraph from apgl.util.PathDefaults import PathDefaults from exp.util.IdIndexer import IdIndexer import xml.etree.ElementTree as ET...
e2020af5ccd41f8571a2d0db4f5345ca9a8b561e
gmn/src/d1_gmn/app/migrations/0010_auto_20170805_0107.py
gmn/src/d1_gmn/app/migrations/0010_auto_20170805_0107.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-08-05 01:07 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0009_auto_20170603_0546'), ] operations = [...
Add migration for db changes
Add migration for db changes
Python
apache-2.0
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
Add migration for db changes
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-08-05 01:07 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0009_auto_20170603_0546'), ] operations = [...
<commit_before><commit_msg>Add migration for db changes<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-08-05 01:07 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0009_auto_20170603_0546'), ] operations = [...
Add migration for db changes# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-08-05 01:07 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0009_auto_20170603_0546'...
<commit_before><commit_msg>Add migration for db changes<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-08-05 01:07 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
a0cd167b9f19e2a4a9d1f2a80bc3586cce15c6ab
gmn/src/d1_gmn/app/migrations/0019_auto_20190418_1512.py
gmn/src/d1_gmn/app/migrations/0019_auto_20190418_1512.py
# Generated by Django 2.2 on 2019-04-18 20:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('app', '0018_auto_20180901_0115'), ] operations = [ migrations.AlterModelOptions( name='eventlog', options={}, ), ...
Add GMN DB migration to current
Add GMN DB migration to current
Python
apache-2.0
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
Add GMN DB migration to current
# Generated by Django 2.2 on 2019-04-18 20:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('app', '0018_auto_20180901_0115'), ] operations = [ migrations.AlterModelOptions( name='eventlog', options={}, ), ...
<commit_before><commit_msg>Add GMN DB migration to current<commit_after>
# Generated by Django 2.2 on 2019-04-18 20:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('app', '0018_auto_20180901_0115'), ] operations = [ migrations.AlterModelOptions( name='eventlog', options={}, ), ...
Add GMN DB migration to current# Generated by Django 2.2 on 2019-04-18 20:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('app', '0018_auto_20180901_0115'), ] operations = [ migrations.AlterModelOptions( name='eventlog', ...
<commit_before><commit_msg>Add GMN DB migration to current<commit_after># Generated by Django 2.2 on 2019-04-18 20:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('app', '0018_auto_20180901_0115'), ] operations = [ migrations.AlterModelOption...
8b467efd1f998d05da0272a284773501f0b330ff
djangae/tests/test_meta_queries.py
djangae/tests/test_meta_queries.py
from django.db import models from djangae.test import TestCase from djangae.contrib import sleuth class MetaQueryTestModel(models.Model): field1 = models.CharField(max_length=32) class PrimaryKeyFilterTests(TestCase): def test_pk_in_with_slicing(self): i1 = MetaQueryTestModel.objects.create(); ...
Add a test file which was missing from a recent branch
Add a test file which was missing from a recent branch
Python
bsd-3-clause
grzes/djangae,grzes/djangae,potatolondon/djangae,grzes/djangae,potatolondon/djangae
Add a test file which was missing from a recent branch
from django.db import models from djangae.test import TestCase from djangae.contrib import sleuth class MetaQueryTestModel(models.Model): field1 = models.CharField(max_length=32) class PrimaryKeyFilterTests(TestCase): def test_pk_in_with_slicing(self): i1 = MetaQueryTestModel.objects.create(); ...
<commit_before><commit_msg>Add a test file which was missing from a recent branch<commit_after>
from django.db import models from djangae.test import TestCase from djangae.contrib import sleuth class MetaQueryTestModel(models.Model): field1 = models.CharField(max_length=32) class PrimaryKeyFilterTests(TestCase): def test_pk_in_with_slicing(self): i1 = MetaQueryTestModel.objects.create(); ...
Add a test file which was missing from a recent branchfrom django.db import models from djangae.test import TestCase from djangae.contrib import sleuth class MetaQueryTestModel(models.Model): field1 = models.CharField(max_length=32) class PrimaryKeyFilterTests(TestCase): def test_pk_in_with_slicing(self):...
<commit_before><commit_msg>Add a test file which was missing from a recent branch<commit_after>from django.db import models from djangae.test import TestCase from djangae.contrib import sleuth class MetaQueryTestModel(models.Model): field1 = models.CharField(max_length=32) class PrimaryKeyFilterTests(TestCase)...
615247c28d58fbbff40f5e4122441d77acb19003
notification/urls.py
notification/urls.py
from django.conf.urls import url from link.views import LinkView, LinkReactionView, LinkCommentView urlpatterns = [ url(r'^$', LinkView.new, name='link_new'), url(r'^(?P<post_id>[0-9]+)/add/$', LinkView.add, name='link_add'), url(r'^(?P<post_id>[0-9]+)/react/$', LinkReactionView.react, name='link_react'),...
Integrate notification app in settings and add basic structure of files
Integrate notification app in settings and add basic structure of files
Python
agpl-3.0
Fleeg/fleeg-platform,Fleeg/fleeg-platform
Integrate notification app in settings and add basic structure of files
from django.conf.urls import url from link.views import LinkView, LinkReactionView, LinkCommentView urlpatterns = [ url(r'^$', LinkView.new, name='link_new'), url(r'^(?P<post_id>[0-9]+)/add/$', LinkView.add, name='link_add'), url(r'^(?P<post_id>[0-9]+)/react/$', LinkReactionView.react, name='link_react'),...
<commit_before><commit_msg>Integrate notification app in settings and add basic structure of files<commit_after>
from django.conf.urls import url from link.views import LinkView, LinkReactionView, LinkCommentView urlpatterns = [ url(r'^$', LinkView.new, name='link_new'), url(r'^(?P<post_id>[0-9]+)/add/$', LinkView.add, name='link_add'), url(r'^(?P<post_id>[0-9]+)/react/$', LinkReactionView.react, name='link_react'),...
Integrate notification app in settings and add basic structure of filesfrom django.conf.urls import url from link.views import LinkView, LinkReactionView, LinkCommentView urlpatterns = [ url(r'^$', LinkView.new, name='link_new'), url(r'^(?P<post_id>[0-9]+)/add/$', LinkView.add, name='link_add'), url(r'^(?...
<commit_before><commit_msg>Integrate notification app in settings and add basic structure of files<commit_after>from django.conf.urls import url from link.views import LinkView, LinkReactionView, LinkCommentView urlpatterns = [ url(r'^$', LinkView.new, name='link_new'), url(r'^(?P<post_id>[0-9]+)/add/$', Link...
6beccf0c0b4e7788403415c05ae9f31e6c0a89eb
tests/test_gpa.py
tests/test_gpa.py
import unittest import numpy as np from sklearn import datasets from sklearn import decomposition from sklearn.utils import estimator_checks import prince class TestGPA(unittest.TestCase): # def setUp(self): def __init__(self): # Create a list of 2-D circles with different locations and rotations ...
Add tests for Generalized Procrustes Analysis (GPA)
Add tests for Generalized Procrustes Analysis (GPA)
Python
mit
MaxHalford/Prince
Add tests for Generalized Procrustes Analysis (GPA)
import unittest import numpy as np from sklearn import datasets from sklearn import decomposition from sklearn.utils import estimator_checks import prince class TestGPA(unittest.TestCase): # def setUp(self): def __init__(self): # Create a list of 2-D circles with different locations and rotations ...
<commit_before><commit_msg>Add tests for Generalized Procrustes Analysis (GPA)<commit_after>
import unittest import numpy as np from sklearn import datasets from sklearn import decomposition from sklearn.utils import estimator_checks import prince class TestGPA(unittest.TestCase): # def setUp(self): def __init__(self): # Create a list of 2-D circles with different locations and rotations ...
Add tests for Generalized Procrustes Analysis (GPA)import unittest import numpy as np from sklearn import datasets from sklearn import decomposition from sklearn.utils import estimator_checks import prince class TestGPA(unittest.TestCase): # def setUp(self): def __init__(self): # Create a list of 2...
<commit_before><commit_msg>Add tests for Generalized Procrustes Analysis (GPA)<commit_after>import unittest import numpy as np from sklearn import datasets from sklearn import decomposition from sklearn.utils import estimator_checks import prince class TestGPA(unittest.TestCase): # def setUp(self): def __i...
0baca9564c9df7b06645f71abdda0fe3090f46a6
utils/lit/tests/xunit-output.py
utils/lit/tests/xunit-output.py
# Check xunit output # RUN: %{lit} --xunit-xml-output %t.xunit.xml %{inputs}/test-data # RUN: FileCheck < %t.xunit.xml %s # CHECK: <?xml version="1.0" encoding="UTF-8" ?> # CHECK: <testsuites> # CHECK: <testsuite name='test-data' tests='1' failures='0'> # CHECK: <testcase classname='test-data.' name='metrics.ini' time...
Add a test-case for lit xunit output
Add a test-case for lit xunit output git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@223307 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift...
Add a test-case for lit xunit output git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@223307 91177308-0d34-0410-b5e6-96231b3b80d8
# Check xunit output # RUN: %{lit} --xunit-xml-output %t.xunit.xml %{inputs}/test-data # RUN: FileCheck < %t.xunit.xml %s # CHECK: <?xml version="1.0" encoding="UTF-8" ?> # CHECK: <testsuites> # CHECK: <testsuite name='test-data' tests='1' failures='0'> # CHECK: <testcase classname='test-data.' name='metrics.ini' time...
<commit_before><commit_msg>Add a test-case for lit xunit output git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@223307 91177308-0d34-0410-b5e6-96231b3b80d8<commit_after>
# Check xunit output # RUN: %{lit} --xunit-xml-output %t.xunit.xml %{inputs}/test-data # RUN: FileCheck < %t.xunit.xml %s # CHECK: <?xml version="1.0" encoding="UTF-8" ?> # CHECK: <testsuites> # CHECK: <testsuite name='test-data' tests='1' failures='0'> # CHECK: <testcase classname='test-data.' name='metrics.ini' time...
Add a test-case for lit xunit output git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@223307 91177308-0d34-0410-b5e6-96231b3b80d8# Check xunit output # RUN: %{lit} --xunit-xml-output %t.xunit.xml %{inputs}/test-data # RUN: FileCheck < %t.xunit.xml %s # CHECK: <?xml version="1.0" encoding="UTF-8" ?> # CHECK: <test...
<commit_before><commit_msg>Add a test-case for lit xunit output git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@223307 91177308-0d34-0410-b5e6-96231b3b80d8<commit_after># Check xunit output # RUN: %{lit} --xunit-xml-output %t.xunit.xml %{inputs}/test-data # RUN: FileCheck < %t.xunit.xml %s # CHECK: <?xml version...
a102fb888b60454d7efbe26e4afb38a59c212769
p3/management/commands/delete_spam_users.py
p3/management/commands/delete_spam_users.py
# -*- coding: utf-8 -*- """ Delete users creating by spambots. """ import logging as log from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from assopy import models as amodels ### class Command(BaseCommand): # Options option...
Add script to delete spam users.
Add script to delete spam users.
Python
bsd-2-clause
EuroPython/epcon,EuroPython/epcon,EuroPython/epcon,EuroPython/epcon
Add script to delete spam users.
# -*- coding: utf-8 -*- """ Delete users creating by spambots. """ import logging as log from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from assopy import models as amodels ### class Command(BaseCommand): # Options option...
<commit_before><commit_msg>Add script to delete spam users.<commit_after>
# -*- coding: utf-8 -*- """ Delete users creating by spambots. """ import logging as log from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from assopy import models as amodels ### class Command(BaseCommand): # Options option...
Add script to delete spam users.# -*- coding: utf-8 -*- """ Delete users creating by spambots. """ import logging as log from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from assopy import models as amodels ### class Command(BaseCom...
<commit_before><commit_msg>Add script to delete spam users.<commit_after># -*- coding: utf-8 -*- """ Delete users creating by spambots. """ import logging as log from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from assopy import mode...
1c615be1d3da720d2d0a1974808e3856cbd9d498
virgil_sdk/api/virgil_api.py
virgil_sdk/api/virgil_api.py
# Copyright (C) 2016 Virgil Security Inc. # # Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # (1) Redistributions of ...
Create Virgil highlevel api implementation
[SDK-165] Create Virgil highlevel api implementation
Python
bsd-3-clause
VirgilSecurity/virgil-sdk-python
[SDK-165] Create Virgil highlevel api implementation
# Copyright (C) 2016 Virgil Security Inc. # # Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # (1) Redistributions of ...
<commit_before><commit_msg>[SDK-165] Create Virgil highlevel api implementation<commit_after>
# Copyright (C) 2016 Virgil Security Inc. # # Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # (1) Redistributions of ...
[SDK-165] Create Virgil highlevel api implementation# Copyright (C) 2016 Virgil Security Inc. # # Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
<commit_before><commit_msg>[SDK-165] Create Virgil highlevel api implementation<commit_after># Copyright (C) 2016 Virgil Security Inc. # # Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, ar...
6090dc1539bd0701381c73128a5ca0606adc09e4
tests/utils/test_ssdp.py
tests/utils/test_ssdp.py
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Bo Maryniuk <bo@suse.de>` ''' from __future__ import absolute_import, print_function, unicode_literals from tests.support.unit import TestCase, skipIf from tests.support.mock import ( NO_MOCK, NO_MOCK_REASON, MagicMock, patch) # Import Salt libs imp...
Add SSDP unit test case (init)
Add SSDP unit test case (init)
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
Add SSDP unit test case (init)
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Bo Maryniuk <bo@suse.de>` ''' from __future__ import absolute_import, print_function, unicode_literals from tests.support.unit import TestCase, skipIf from tests.support.mock import ( NO_MOCK, NO_MOCK_REASON, MagicMock, patch) # Import Salt libs imp...
<commit_before><commit_msg>Add SSDP unit test case (init)<commit_after>
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Bo Maryniuk <bo@suse.de>` ''' from __future__ import absolute_import, print_function, unicode_literals from tests.support.unit import TestCase, skipIf from tests.support.mock import ( NO_MOCK, NO_MOCK_REASON, MagicMock, patch) # Import Salt libs imp...
Add SSDP unit test case (init)# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Bo Maryniuk <bo@suse.de>` ''' from __future__ import absolute_import, print_function, unicode_literals from tests.support.unit import TestCase, skipIf from tests.support.mock import ( NO_MOCK, NO_MOCK_REASON, MagicMock, ...
<commit_before><commit_msg>Add SSDP unit test case (init)<commit_after># -*- coding: utf-8 -*- ''' :codeauthor: :email:`Bo Maryniuk <bo@suse.de>` ''' from __future__ import absolute_import, print_function, unicode_literals from tests.support.unit import TestCase, skipIf from tests.support.mock import ( NO_MOCK...
f31b42ae43e7cd2af53a504c1cc2ab398bf7810d
main.py
main.py
import json import requests from tabulate import tabulate BASE_URL = "http://api.football-data.org/alpha/" soccer_seasons = "soccerseasons/" epl_current_season = "soccerseasons/398/" league_table = "leagueTable/" def print_standings(table): standings = [] for team in table: entry = [team['position'], team['team...
Add api call for Premier League standings
Add api call for Premier League standings Also add function to print standings in tablular form using tabulate.
Python
mit
conormag94/pyscores
Add api call for Premier League standings Also add function to print standings in tablular form using tabulate.
import json import requests from tabulate import tabulate BASE_URL = "http://api.football-data.org/alpha/" soccer_seasons = "soccerseasons/" epl_current_season = "soccerseasons/398/" league_table = "leagueTable/" def print_standings(table): standings = [] for team in table: entry = [team['position'], team['team...
<commit_before><commit_msg>Add api call for Premier League standings Also add function to print standings in tablular form using tabulate.<commit_after>
import json import requests from tabulate import tabulate BASE_URL = "http://api.football-data.org/alpha/" soccer_seasons = "soccerseasons/" epl_current_season = "soccerseasons/398/" league_table = "leagueTable/" def print_standings(table): standings = [] for team in table: entry = [team['position'], team['team...
Add api call for Premier League standings Also add function to print standings in tablular form using tabulate.import json import requests from tabulate import tabulate BASE_URL = "http://api.football-data.org/alpha/" soccer_seasons = "soccerseasons/" epl_current_season = "soccerseasons/398/" league_table = "leagueT...
<commit_before><commit_msg>Add api call for Premier League standings Also add function to print standings in tablular form using tabulate.<commit_after>import json import requests from tabulate import tabulate BASE_URL = "http://api.football-data.org/alpha/" soccer_seasons = "soccerseasons/" epl_current_season = "so...
29e18ed63177dbe8306a22e3c0583342f4591464
python/ample_exit.py
python/ample_exit.py
''' Created on Mar 18, 2015 @author: jmht ''' import logging import sys import traceback # external imports try: import pyrvapi except: pyrvapi=None def exit(msg): logger = logging.getLogger() #header="**** AMPLE ERROR ****\n\n" header="*"*70+"\n" header+="*"*20 + " "*10 + "AMPLE ERROR" + " "*1...
Exit routine for a controlled exit from ample
Exit routine for a controlled exit from ample
Python
bsd-3-clause
linucks/ample,rigdenlab/ample,linucks/ample,rigdenlab/ample
Exit routine for a controlled exit from ample
''' Created on Mar 18, 2015 @author: jmht ''' import logging import sys import traceback # external imports try: import pyrvapi except: pyrvapi=None def exit(msg): logger = logging.getLogger() #header="**** AMPLE ERROR ****\n\n" header="*"*70+"\n" header+="*"*20 + " "*10 + "AMPLE ERROR" + " "*1...
<commit_before><commit_msg>Exit routine for a controlled exit from ample<commit_after>
''' Created on Mar 18, 2015 @author: jmht ''' import logging import sys import traceback # external imports try: import pyrvapi except: pyrvapi=None def exit(msg): logger = logging.getLogger() #header="**** AMPLE ERROR ****\n\n" header="*"*70+"\n" header+="*"*20 + " "*10 + "AMPLE ERROR" + " "*1...
Exit routine for a controlled exit from ample''' Created on Mar 18, 2015 @author: jmht ''' import logging import sys import traceback # external imports try: import pyrvapi except: pyrvapi=None def exit(msg): logger = logging.getLogger() #header="**** AMPLE ERROR ****\n\n" header="*"*70+"\n" he...
<commit_before><commit_msg>Exit routine for a controlled exit from ample<commit_after>''' Created on Mar 18, 2015 @author: jmht ''' import logging import sys import traceback # external imports try: import pyrvapi except: pyrvapi=None def exit(msg): logger = logging.getLogger() #header="**** AMPLE ERRO...
fa3450a44621fab4a9a2f2ed1599d08f66860f70
integrate_density.py
integrate_density.py
import argparse import numpy as np import h5py if __name__ == '__main__': parser = argparse.ArgumentParser(description='Integrate probability ' + 'densities to verify that they are ' + 'normalized') parser.add_argument('data_filenames',...
Integrate densities to check normalization
Integrate densities to check normalization
Python
mit
jarthurgross/bloch_distribution
Integrate densities to check normalization
import argparse import numpy as np import h5py if __name__ == '__main__': parser = argparse.ArgumentParser(description='Integrate probability ' + 'densities to verify that they are ' + 'normalized') parser.add_argument('data_filenames',...
<commit_before><commit_msg>Integrate densities to check normalization<commit_after>
import argparse import numpy as np import h5py if __name__ == '__main__': parser = argparse.ArgumentParser(description='Integrate probability ' + 'densities to verify that they are ' + 'normalized') parser.add_argument('data_filenames',...
Integrate densities to check normalizationimport argparse import numpy as np import h5py if __name__ == '__main__': parser = argparse.ArgumentParser(description='Integrate probability ' + 'densities to verify that they are ' + 'normalized')...
<commit_before><commit_msg>Integrate densities to check normalization<commit_after>import argparse import numpy as np import h5py if __name__ == '__main__': parser = argparse.ArgumentParser(description='Integrate probability ' + 'densities to verify that they are ' + ...
72a573c24d5234003b9eeb9e0cc487d174908a2e
typeahead_search/trie.py
typeahead_search/trie.py
"""A Trie (prefix tree) class for use in typeahead search. Every node in the TypeaheadSearchTrie is another TypeaheadSearchTrie instance. """ from weakref import WeakSet class TypeaheadSearchTrie(object): def __init__(self): # The children of this node. Because ordered traversals are not # impor...
Add a Trie for storage of data string tokens.
[typeahead_search] Add a Trie for storage of data string tokens.
Python
mit
geekofalltrades/quora-coding-challenges
[typeahead_search] Add a Trie for storage of data string tokens.
"""A Trie (prefix tree) class for use in typeahead search. Every node in the TypeaheadSearchTrie is another TypeaheadSearchTrie instance. """ from weakref import WeakSet class TypeaheadSearchTrie(object): def __init__(self): # The children of this node. Because ordered traversals are not # impor...
<commit_before><commit_msg>[typeahead_search] Add a Trie for storage of data string tokens.<commit_after>
"""A Trie (prefix tree) class for use in typeahead search. Every node in the TypeaheadSearchTrie is another TypeaheadSearchTrie instance. """ from weakref import WeakSet class TypeaheadSearchTrie(object): def __init__(self): # The children of this node. Because ordered traversals are not # impor...
[typeahead_search] Add a Trie for storage of data string tokens."""A Trie (prefix tree) class for use in typeahead search. Every node in the TypeaheadSearchTrie is another TypeaheadSearchTrie instance. """ from weakref import WeakSet class TypeaheadSearchTrie(object): def __init__(self): # The children ...
<commit_before><commit_msg>[typeahead_search] Add a Trie for storage of data string tokens.<commit_after>"""A Trie (prefix tree) class for use in typeahead search. Every node in the TypeaheadSearchTrie is another TypeaheadSearchTrie instance. """ from weakref import WeakSet class TypeaheadSearchTrie(object): de...
01c74cfea946eac098a0e144380314cd4676cf2f
analysis/04-lowpass.py
analysis/04-lowpass.py
#!/usr/bin/env python from __future__ import division import climate import lmj.cubes import pandas as pd import scipy.signal logging = climate.get_logger('lowpass') def lowpass(df, freq=10., order=4): '''Filter marker data using a butterworth low-pass filter. This method alters the data in `df` in-place. ...
Split lowpass filtering into another script.
Split lowpass filtering into another script.
Python
mit
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
Split lowpass filtering into another script.
#!/usr/bin/env python from __future__ import division import climate import lmj.cubes import pandas as pd import scipy.signal logging = climate.get_logger('lowpass') def lowpass(df, freq=10., order=4): '''Filter marker data using a butterworth low-pass filter. This method alters the data in `df` in-place. ...
<commit_before><commit_msg>Split lowpass filtering into another script.<commit_after>
#!/usr/bin/env python from __future__ import division import climate import lmj.cubes import pandas as pd import scipy.signal logging = climate.get_logger('lowpass') def lowpass(df, freq=10., order=4): '''Filter marker data using a butterworth low-pass filter. This method alters the data in `df` in-place. ...
Split lowpass filtering into another script.#!/usr/bin/env python from __future__ import division import climate import lmj.cubes import pandas as pd import scipy.signal logging = climate.get_logger('lowpass') def lowpass(df, freq=10., order=4): '''Filter marker data using a butterworth low-pass filter. Th...
<commit_before><commit_msg>Split lowpass filtering into another script.<commit_after>#!/usr/bin/env python from __future__ import division import climate import lmj.cubes import pandas as pd import scipy.signal logging = climate.get_logger('lowpass') def lowpass(df, freq=10., order=4): '''Filter marker data usi...
6a9b6f0227b37d9c4da424c25d20a2b7e9397a9f
alembic/versions/3800f47ba771_publication_date_not_nullable.py
alembic/versions/3800f47ba771_publication_date_not_nullable.py
"""Make the `publication_date` column required. Revision ID: 3800f47ba771 Revises: 17c1af634026 Create Date: 2012-12-13 21:14:19.363112 """ # revision identifiers, used by Alembic. revision = '3800f47ba771' down_revision = '17c1af634026' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_c...
Make `publication_date` column not nullable.
Make `publication_date` column not nullable. BEFORE: It was nullable (an artifact of us having added it after the table was initially created and populated). AFTER: It is not nullable (because we just ran a script to populate the new column).
Python
isc
gthank/pytips,gthank/pytips,gthank/pytips,gthank/pytips
Make `publication_date` column not nullable. BEFORE: It was nullable (an artifact of us having added it after the table was initially created and populated). AFTER: It is not nullable (because we just ran a script to populate the new column).
"""Make the `publication_date` column required. Revision ID: 3800f47ba771 Revises: 17c1af634026 Create Date: 2012-12-13 21:14:19.363112 """ # revision identifiers, used by Alembic. revision = '3800f47ba771' down_revision = '17c1af634026' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_c...
<commit_before><commit_msg>Make `publication_date` column not nullable. BEFORE: It was nullable (an artifact of us having added it after the table was initially created and populated). AFTER: It is not nullable (because we just ran a script to populate the new column).<commit_after>
"""Make the `publication_date` column required. Revision ID: 3800f47ba771 Revises: 17c1af634026 Create Date: 2012-12-13 21:14:19.363112 """ # revision identifiers, used by Alembic. revision = '3800f47ba771' down_revision = '17c1af634026' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_c...
Make `publication_date` column not nullable. BEFORE: It was nullable (an artifact of us having added it after the table was initially created and populated). AFTER: It is not nullable (because we just ran a script to populate the new column)."""Make the `publication_date` column required. Revision ID: 3800f47ba771 R...
<commit_before><commit_msg>Make `publication_date` column not nullable. BEFORE: It was nullable (an artifact of us having added it after the table was initially created and populated). AFTER: It is not nullable (because we just ran a script to populate the new column).<commit_after>"""Make the `publication_date` colu...
6b1be6883ead01cc226226499644adb7e99542f8
Experiments/evaluate_model.py
Experiments/evaluate_model.py
# import os import sys import tensorflow as tf # sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../..')) from Models.low_level_sharing_four_hidden import LowLevelSharingModel from utils.data_utils.labels import Labels from utils.data_utils.data_handler import fetch_data class EvaluateModel(object...
Add functionality to load and test a saved model
Add functionality to load and test a saved model
Python
mit
harpribot/representation-music,harpribot/representation-music
Add functionality to load and test a saved model
# import os import sys import tensorflow as tf # sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../..')) from Models.low_level_sharing_four_hidden import LowLevelSharingModel from utils.data_utils.labels import Labels from utils.data_utils.data_handler import fetch_data class EvaluateModel(object...
<commit_before><commit_msg>Add functionality to load and test a saved model<commit_after>
# import os import sys import tensorflow as tf # sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../..')) from Models.low_level_sharing_four_hidden import LowLevelSharingModel from utils.data_utils.labels import Labels from utils.data_utils.data_handler import fetch_data class EvaluateModel(object...
Add functionality to load and test a saved model# import os import sys import tensorflow as tf # sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../..')) from Models.low_level_sharing_four_hidden import LowLevelSharingModel from utils.data_utils.labels import Labels from utils.data_utils.data_handle...
<commit_before><commit_msg>Add functionality to load and test a saved model<commit_after># import os import sys import tensorflow as tf # sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../..')) from Models.low_level_sharing_four_hidden import LowLevelSharingModel from utils.data_utils.labels import...
3501462ebafa15b19ef436231a5a0d9e3b5d430a
indra/ontology/virtual_ontology.py
indra/ontology/virtual_ontology.py
import requests from .ontology_graph import IndraOntology class VirtualOntology(IndraOntology): def __init__(self, url, ontology='bio'): super().__init__() self.url = url self.ontology = ontology def initialize(self): self._initialized = True def _rel(self, ns, id, rel_ty...
Add first implementation of virtual ontology
Add first implementation of virtual ontology
Python
bsd-2-clause
johnbachman/indra,johnbachman/belpy,sorgerlab/indra,bgyori/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/belpy,sorgerlab/indra,bgyori/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,johnbachman/indra
Add first implementation of virtual ontology
import requests from .ontology_graph import IndraOntology class VirtualOntology(IndraOntology): def __init__(self, url, ontology='bio'): super().__init__() self.url = url self.ontology = ontology def initialize(self): self._initialized = True def _rel(self, ns, id, rel_ty...
<commit_before><commit_msg>Add first implementation of virtual ontology<commit_after>
import requests from .ontology_graph import IndraOntology class VirtualOntology(IndraOntology): def __init__(self, url, ontology='bio'): super().__init__() self.url = url self.ontology = ontology def initialize(self): self._initialized = True def _rel(self, ns, id, rel_ty...
Add first implementation of virtual ontologyimport requests from .ontology_graph import IndraOntology class VirtualOntology(IndraOntology): def __init__(self, url, ontology='bio'): super().__init__() self.url = url self.ontology = ontology def initialize(self): self._initializ...
<commit_before><commit_msg>Add first implementation of virtual ontology<commit_after>import requests from .ontology_graph import IndraOntology class VirtualOntology(IndraOntology): def __init__(self, url, ontology='bio'): super().__init__() self.url = url self.ontology = ontology def ...
3283c9ac640112ab7a26ec3f82e051394ca72ecf
PRESUBMIT.py
PRESUBMIT.py
# Copyright (c) 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. """Top-level presubmit script for catapult. See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the pres...
Add catapult presubmit with list of trybots.
Add catapult presubmit with list of trybots. This should make 'git cl try' work correctly Review URL: https://codereview.chromium.org/1162013002
Python
bsd-3-clause
catapult-project/catapult-csm,dstockwell/catapult,sahiljain/catapult,catapult-project/catapult,zeptonaut/catapult,catapult-project/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,modulexcite/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult,catapult-project/catapult-csm,dstockwell/cata...
Add catapult presubmit with list of trybots. This should make 'git cl try' work correctly Review URL: https://codereview.chromium.org/1162013002
# Copyright (c) 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. """Top-level presubmit script for catapult. See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the pres...
<commit_before><commit_msg>Add catapult presubmit with list of trybots. This should make 'git cl try' work correctly Review URL: https://codereview.chromium.org/1162013002<commit_after>
# Copyright (c) 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. """Top-level presubmit script for catapult. See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the pres...
Add catapult presubmit with list of trybots. This should make 'git cl try' work correctly Review URL: https://codereview.chromium.org/1162013002# Copyright (c) 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. """Top-...
<commit_before><commit_msg>Add catapult presubmit with list of trybots. This should make 'git cl try' work correctly Review URL: https://codereview.chromium.org/1162013002<commit_after># Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can...
05a5599fd0cf08cf33c8a90673e8c71b4c1d6c36
slides/ComputationalGeometry/convex-hull.py
slides/ComputationalGeometry/convex-hull.py
import math class Vector: def __init__(self, x, y): self.x = x self.y = y # add theta, so we can sort by it later self.theta = math.atan2(y, x) def add(self, other): return Vector(self.x + other.x, self.y + other.y) def negate(self): return Vec...
Test implementation of convex hull
Test implementation of convex hull
Python
mit
tylerburnham42/ProgrammingTeam,MercerBinaryBears/Slides,tylerburnham42/ProgrammingTeam,MercerBinaryBears/Slides,MercerBinaryBears/Slides,MercerBinaryBears/Slides,MercerBinaryBears/Slides,tylerburnham42/ProgrammingTeam
Test implementation of convex hull
import math class Vector: def __init__(self, x, y): self.x = x self.y = y # add theta, so we can sort by it later self.theta = math.atan2(y, x) def add(self, other): return Vector(self.x + other.x, self.y + other.y) def negate(self): return Vec...
<commit_before><commit_msg>Test implementation of convex hull<commit_after>
import math class Vector: def __init__(self, x, y): self.x = x self.y = y # add theta, so we can sort by it later self.theta = math.atan2(y, x) def add(self, other): return Vector(self.x + other.x, self.y + other.y) def negate(self): return Vec...
Test implementation of convex hullimport math class Vector: def __init__(self, x, y): self.x = x self.y = y # add theta, so we can sort by it later self.theta = math.atan2(y, x) def add(self, other): return Vector(self.x + other.x, self.y + other.y) de...
<commit_before><commit_msg>Test implementation of convex hull<commit_after>import math class Vector: def __init__(self, x, y): self.x = x self.y = y # add theta, so we can sort by it later self.theta = math.atan2(y, x) def add(self, other): return Vector(self.x...
e0597427d93f2260dfce35cfdd3e2714037fb0fb
src/spatial_discretizations/FourierChebyshevSpatialDiscretization.py
src/spatial_discretizations/FourierChebyshevSpatialDiscretization.py
import numpy as np from numpy.fft import fft, ifft, fftshift, fft2, ifft2 from scipy.linalg import toeplitz class FourierChebyshevSpatialDiscretization: def __init__(self, config): self.length_x = config['length_x'] self.length_y = config['length_y'] self.num_points_x = config['num_points_x...
Implement cheb_dif for getting 1D chebyshev grids and differentiation matrices.
Implement cheb_dif for getting 1D chebyshev grids and differentiation matrices.
Python
mit
dsteinmo/pysws,dsteinmo/pysws
Implement cheb_dif for getting 1D chebyshev grids and differentiation matrices.
import numpy as np from numpy.fft import fft, ifft, fftshift, fft2, ifft2 from scipy.linalg import toeplitz class FourierChebyshevSpatialDiscretization: def __init__(self, config): self.length_x = config['length_x'] self.length_y = config['length_y'] self.num_points_x = config['num_points_x...
<commit_before><commit_msg>Implement cheb_dif for getting 1D chebyshev grids and differentiation matrices.<commit_after>
import numpy as np from numpy.fft import fft, ifft, fftshift, fft2, ifft2 from scipy.linalg import toeplitz class FourierChebyshevSpatialDiscretization: def __init__(self, config): self.length_x = config['length_x'] self.length_y = config['length_y'] self.num_points_x = config['num_points_x...
Implement cheb_dif for getting 1D chebyshev grids and differentiation matrices.import numpy as np from numpy.fft import fft, ifft, fftshift, fft2, ifft2 from scipy.linalg import toeplitz class FourierChebyshevSpatialDiscretization: def __init__(self, config): self.length_x = config['length_x'] self...
<commit_before><commit_msg>Implement cheb_dif for getting 1D chebyshev grids and differentiation matrices.<commit_after>import numpy as np from numpy.fft import fft, ifft, fftshift, fft2, ifft2 from scipy.linalg import toeplitz class FourierChebyshevSpatialDiscretization: def __init__(self, config): self.l...
dcd02e0a7b626111bc0fc344df9f6fff2de832ae
examples/missingmethod.py
examples/missingmethod.py
#!/usr/bin/python3 """Send an invalid request with missing method member.""" from simpleclient import send_data_to_socket EXAMPLE = { "params": { "filter": { 'store': 'catalog', 'schema': 'product', 'id': '704e418e-682d-4ade-99be-710f2208102e' } } } def m...
Add a (bad) example of missing method.
Add a (bad) example of missing method.
Python
lgpl-2.1
zeth/ainod,zeth/ainod,zeth/ainod
Add a (bad) example of missing method.
#!/usr/bin/python3 """Send an invalid request with missing method member.""" from simpleclient import send_data_to_socket EXAMPLE = { "params": { "filter": { 'store': 'catalog', 'schema': 'product', 'id': '704e418e-682d-4ade-99be-710f2208102e' } } } def m...
<commit_before><commit_msg>Add a (bad) example of missing method.<commit_after>
#!/usr/bin/python3 """Send an invalid request with missing method member.""" from simpleclient import send_data_to_socket EXAMPLE = { "params": { "filter": { 'store': 'catalog', 'schema': 'product', 'id': '704e418e-682d-4ade-99be-710f2208102e' } } } def m...
Add a (bad) example of missing method.#!/usr/bin/python3 """Send an invalid request with missing method member.""" from simpleclient import send_data_to_socket EXAMPLE = { "params": { "filter": { 'store': 'catalog', 'schema': 'product', 'id': '704e418e-682d-4ade-99be-7...
<commit_before><commit_msg>Add a (bad) example of missing method.<commit_after>#!/usr/bin/python3 """Send an invalid request with missing method member.""" from simpleclient import send_data_to_socket EXAMPLE = { "params": { "filter": { 'store': 'catalog', 'schema': 'product', ...
d692508e9c6fba847f3bb179bbfd3684e6ebcef0
py/shuffle-an-array.py
py/shuffle-an-array.py
from random import randint class Solution(object): def __init__(self, nums): """ :type nums: List[int] """ self.nums = nums def reset(self): """ Resets the array to its original configuration and return it. :rtype: List[int] """ return se...
Add py solution for 384. Shuffle an Array
Add py solution for 384. Shuffle an Array 384. Shuffle an Array: https://leetcode.com/problems/shuffle-an-array/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 384. Shuffle an Array 384. Shuffle an Array: https://leetcode.com/problems/shuffle-an-array/
from random import randint class Solution(object): def __init__(self, nums): """ :type nums: List[int] """ self.nums = nums def reset(self): """ Resets the array to its original configuration and return it. :rtype: List[int] """ return se...
<commit_before><commit_msg>Add py solution for 384. Shuffle an Array 384. Shuffle an Array: https://leetcode.com/problems/shuffle-an-array/<commit_after>
from random import randint class Solution(object): def __init__(self, nums): """ :type nums: List[int] """ self.nums = nums def reset(self): """ Resets the array to its original configuration and return it. :rtype: List[int] """ return se...
Add py solution for 384. Shuffle an Array 384. Shuffle an Array: https://leetcode.com/problems/shuffle-an-array/from random import randint class Solution(object): def __init__(self, nums): """ :type nums: List[int] """ self.nums = nums def reset(self): """ Rese...
<commit_before><commit_msg>Add py solution for 384. Shuffle an Array 384. Shuffle an Array: https://leetcode.com/problems/shuffle-an-array/<commit_after>from random import randint class Solution(object): def __init__(self, nums): """ :type nums: List[int] """ self.nums = nums ...
f13045b5f933078225b89405a786c14da34d0af5
scripts/clamav.py
scripts/clamav.py
import pyclamd from libmproxy.flow import decoded #http://www.eicar.org/85-0-Download.html clamd = pyclamd.ClamdUnixSocket() try: # test if server is reachable clamd.ping() except AttributeError, pyclamd.ConnectionError: # if failed, test for network socket clamd = pyclamd.ClamdNetworkSocket() cla...
Add ClamAV script to analyze HTTPS traffic for viruses
Add ClamAV script to analyze HTTPS traffic for viruses
Python
mit
mhils/HoneyProxy,mhils/HoneyProxy,mhils/HoneyProxy,mhils/HoneyProxy
Add ClamAV script to analyze HTTPS traffic for viruses
import pyclamd from libmproxy.flow import decoded #http://www.eicar.org/85-0-Download.html clamd = pyclamd.ClamdUnixSocket() try: # test if server is reachable clamd.ping() except AttributeError, pyclamd.ConnectionError: # if failed, test for network socket clamd = pyclamd.ClamdNetworkSocket() cla...
<commit_before><commit_msg>Add ClamAV script to analyze HTTPS traffic for viruses<commit_after>
import pyclamd from libmproxy.flow import decoded #http://www.eicar.org/85-0-Download.html clamd = pyclamd.ClamdUnixSocket() try: # test if server is reachable clamd.ping() except AttributeError, pyclamd.ConnectionError: # if failed, test for network socket clamd = pyclamd.ClamdNetworkSocket() cla...
Add ClamAV script to analyze HTTPS traffic for virusesimport pyclamd from libmproxy.flow import decoded #http://www.eicar.org/85-0-Download.html clamd = pyclamd.ClamdUnixSocket() try: # test if server is reachable clamd.ping() except AttributeError, pyclamd.ConnectionError: # if failed, test for network s...
<commit_before><commit_msg>Add ClamAV script to analyze HTTPS traffic for viruses<commit_after>import pyclamd from libmproxy.flow import decoded #http://www.eicar.org/85-0-Download.html clamd = pyclamd.ClamdUnixSocket() try: # test if server is reachable clamd.ping() except AttributeError, pyclamd.ConnectionE...
95ceeb0af4e549e0d211b4e1ba6157d26ad5e44d
sync_scheduler.py
sync_scheduler.py
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queuein...
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time from tapiriik.settings import MONGO_FULL_WRITE_CONCERN Sync.InitializeWorkerBindings() producer = kombu.Produc...
Fix race between MQ and mongo setting QueuedAt
Fix race between MQ and mongo setting QueuedAt
Python
apache-2.0
cgourlay/tapiriik,cheatos101/tapiriik,cmgrote/tapiriik,abhijit86k/tapiriik,dmschreiber/tapiriik,cpfair/tapiriik,abhijit86k/tapiriik,cpfair/tapiriik,mjnbike/tapiriik,abs0/tapiriik,gavioto/tapiriik,mjnbike/tapiriik,cheatos101/tapiriik,brunoflores/tapiriik,marxin/tapiriik,brunoflores/tapiriik,dlenski/tapiriik,abs0/tapirii...
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queuein...
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time from tapiriik.settings import MONGO_FULL_WRITE_CONCERN Sync.InitializeWorkerBindings() producer = kombu.Produc...
<commit_before>from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while...
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time from tapiriik.settings import MONGO_FULL_WRITE_CONCERN Sync.InitializeWorkerBindings() producer = kombu.Produc...
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queuein...
<commit_before>from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while...
c8271b02c3636aa9620cce8b85c823ff0ec35c4a
examples/test_skype_site.py
examples/test_skype_site.py
""" This is a mobile device test for Chromium-based browsers (such as MS Edge) Usage: pytest test_skype_site.py --mobile --browser=edge Default mobile settings for User Agent and Device Metrics if not specifed: User Agent: --agent="Mozilla/5.0 (Linux; Android 9; Pixel 3 XL)" CSS Width, CSS Height, P...
Add a mobile device test of the Skype website
Add a mobile device test of the Skype website
Python
mit
seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase
Add a mobile device test of the Skype website
""" This is a mobile device test for Chromium-based browsers (such as MS Edge) Usage: pytest test_skype_site.py --mobile --browser=edge Default mobile settings for User Agent and Device Metrics if not specifed: User Agent: --agent="Mozilla/5.0 (Linux; Android 9; Pixel 3 XL)" CSS Width, CSS Height, P...
<commit_before><commit_msg>Add a mobile device test of the Skype website<commit_after>
""" This is a mobile device test for Chromium-based browsers (such as MS Edge) Usage: pytest test_skype_site.py --mobile --browser=edge Default mobile settings for User Agent and Device Metrics if not specifed: User Agent: --agent="Mozilla/5.0 (Linux; Android 9; Pixel 3 XL)" CSS Width, CSS Height, P...
Add a mobile device test of the Skype website""" This is a mobile device test for Chromium-based browsers (such as MS Edge) Usage: pytest test_skype_site.py --mobile --browser=edge Default mobile settings for User Agent and Device Metrics if not specifed: User Agent: --agent="Mozilla/5.0 (Linux; Android 9; ...
<commit_before><commit_msg>Add a mobile device test of the Skype website<commit_after>""" This is a mobile device test for Chromium-based browsers (such as MS Edge) Usage: pytest test_skype_site.py --mobile --browser=edge Default mobile settings for User Agent and Device Metrics if not specifed: User Agent: ...
8daf4237aa84a6b032e7627afb31b29a44f47ddc
ProgressBar.py
ProgressBar.py
import sys, time from CmdFormat import CmdFormat class ProgressBar(CmdFormat): def __init__(self, count = 0, total = 0, width = 80, bWithheader=True, bWithPercent=True,barColor='white'): super(CmdFormat, self).__init__() self.count = count self.total = total self.width = wid...
Add another .py file for progress bar
Add another .py file for progress bar Add another .py file for progress bar
Python
mit
vicyangworld/AutoOfficer
Add another .py file for progress bar Add another .py file for progress bar
import sys, time from CmdFormat import CmdFormat class ProgressBar(CmdFormat): def __init__(self, count = 0, total = 0, width = 80, bWithheader=True, bWithPercent=True,barColor='white'): super(CmdFormat, self).__init__() self.count = count self.total = total self.width = wid...
<commit_before><commit_msg>Add another .py file for progress bar Add another .py file for progress bar<commit_after>
import sys, time from CmdFormat import CmdFormat class ProgressBar(CmdFormat): def __init__(self, count = 0, total = 0, width = 80, bWithheader=True, bWithPercent=True,barColor='white'): super(CmdFormat, self).__init__() self.count = count self.total = total self.width = wid...
Add another .py file for progress bar Add another .py file for progress barimport sys, time from CmdFormat import CmdFormat class ProgressBar(CmdFormat): def __init__(self, count = 0, total = 0, width = 80, bWithheader=True, bWithPercent=True,barColor='white'): super(CmdFormat, self).__init__() ...
<commit_before><commit_msg>Add another .py file for progress bar Add another .py file for progress bar<commit_after>import sys, time from CmdFormat import CmdFormat class ProgressBar(CmdFormat): def __init__(self, count = 0, total = 0, width = 80, bWithheader=True, bWithPercent=True,barColor='white'): ...
76c25395590aa9dee64ca138633f01b62ac0d26b
providers/io/osf/registrations/migrations/0001_initial.py
providers/io/osf/registrations/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-08 16:17 from __future__ import unicode_literals from django.db import migrations import share.robot class Migration(migrations.Migration): dependencies = [ ('share', '0001_initial'), ('djcelery', '0001_initial'), ] operatio...
Add new provider migration for osf registrations
Add new provider migration for osf registrations
Python
apache-2.0
aaxelb/SHARE,laurenbarker/SHARE,CenterForOpenScience/SHARE,aaxelb/SHARE,zamattiac/SHARE,zamattiac/SHARE,zamattiac/SHARE,laurenbarker/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE,laurenbarker/SHARE,CenterForOpenScience/SHARE
Add new provider migration for osf registrations
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-08 16:17 from __future__ import unicode_literals from django.db import migrations import share.robot class Migration(migrations.Migration): dependencies = [ ('share', '0001_initial'), ('djcelery', '0001_initial'), ] operatio...
<commit_before><commit_msg>Add new provider migration for osf registrations<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-08 16:17 from __future__ import unicode_literals from django.db import migrations import share.robot class Migration(migrations.Migration): dependencies = [ ('share', '0001_initial'), ('djcelery', '0001_initial'), ] operatio...
Add new provider migration for osf registrations# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-08 16:17 from __future__ import unicode_literals from django.db import migrations import share.robot class Migration(migrations.Migration): dependencies = [ ('share', '0001_initial'), (...
<commit_before><commit_msg>Add new provider migration for osf registrations<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-08 16:17 from __future__ import unicode_literals from django.db import migrations import share.robot class Migration(migrations.Migration): dependencies = [ ...
7c755e7839f7c602a6c93b1aa2f5011e89d15c85
nodeconductor/iaas/management/commands/addmissingpricelistflavors.py
nodeconductor/iaas/management/commands/addmissingpricelistflavors.py
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from nodeconductor.cost_tracking.models import DefaultPriceListItem from nodeconductor.iaas.models import Flavor, Instance class Command(BaseCommand): def handl...
Create command for generating prices for flavors
Create command for generating prices for flavors - itacloud-5319
Python
mit
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
Create command for generating prices for flavors - itacloud-5319
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from nodeconductor.cost_tracking.models import DefaultPriceListItem from nodeconductor.iaas.models import Flavor, Instance class Command(BaseCommand): def handl...
<commit_before><commit_msg>Create command for generating prices for flavors - itacloud-5319<commit_after>
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from nodeconductor.cost_tracking.models import DefaultPriceListItem from nodeconductor.iaas.models import Flavor, Instance class Command(BaseCommand): def handl...
Create command for generating prices for flavors - itacloud-5319from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from nodeconductor.cost_tracking.models import DefaultPriceListItem from nodeconductor.iaas.models im...
<commit_before><commit_msg>Create command for generating prices for flavors - itacloud-5319<commit_after>from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from nodeconductor.cost_tracking.models import DefaultPriceL...
2616d8f3ef51a8551ac14a9e83b0298b8165093a
Superbuild/Projects/apple/fixup_plugin2.py
Superbuild/Projects/apple/fixup_plugin2.py
#!/usr/bin/env python import subprocess import os plugin = 'libVelodyneHDLPlugin.dylib' paraviewBuildDir = '/source/paraview/build' nameprefix = '@executable_path/../Libraries/' prefix = '@executable_path/../Libraries/' # The official ParaView OSX binaries are built with hdf5, not vtkhdf5. # Also, they are built wi...
Add work-in-progress script to fixup a standalone plugin library.
Add work-in-progress script to fixup a standalone plugin library.
Python
apache-2.0
frizaro/Veloview,frizaro/Veloview,Kitware/VeloView,Kitware/VeloView,Kitware/VeloView,Kitware/VeloView,frizaro/Veloview,frizaro/Veloview,Kitware/VeloView
Add work-in-progress script to fixup a standalone plugin library.
#!/usr/bin/env python import subprocess import os plugin = 'libVelodyneHDLPlugin.dylib' paraviewBuildDir = '/source/paraview/build' nameprefix = '@executable_path/../Libraries/' prefix = '@executable_path/../Libraries/' # The official ParaView OSX binaries are built with hdf5, not vtkhdf5. # Also, they are built wi...
<commit_before><commit_msg>Add work-in-progress script to fixup a standalone plugin library.<commit_after>
#!/usr/bin/env python import subprocess import os plugin = 'libVelodyneHDLPlugin.dylib' paraviewBuildDir = '/source/paraview/build' nameprefix = '@executable_path/../Libraries/' prefix = '@executable_path/../Libraries/' # The official ParaView OSX binaries are built with hdf5, not vtkhdf5. # Also, they are built wi...
Add work-in-progress script to fixup a standalone plugin library.#!/usr/bin/env python import subprocess import os plugin = 'libVelodyneHDLPlugin.dylib' paraviewBuildDir = '/source/paraview/build' nameprefix = '@executable_path/../Libraries/' prefix = '@executable_path/../Libraries/' # The official ParaView OSX bin...
<commit_before><commit_msg>Add work-in-progress script to fixup a standalone plugin library.<commit_after>#!/usr/bin/env python import subprocess import os plugin = 'libVelodyneHDLPlugin.dylib' paraviewBuildDir = '/source/paraview/build' nameprefix = '@executable_path/../Libraries/' prefix = '@executable_path/../Lib...
735135c5570edd38324fe3e94aa2f4c2f3043627
cla_backend/apps/legalaid/migrations/0023_migrate_contact_for_research_via_field.py
cla_backend/apps/legalaid/migrations/0023_migrate_contact_for_research_via_field.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db.models import Q def migrate_contact_for_research_via_field_data(apps, schema_editor): ContactResearchMethod = apps.get_model("legalaid", "ContactResearchMethod") research_methods = {method.method: ...
Migrate data from contact_for_research_via and into contact_for_research_methods many to many field
Migrate data from contact_for_research_via and into contact_for_research_methods many to many field
Python
mit
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
Migrate data from contact_for_research_via and into contact_for_research_methods many to many field
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db.models import Q def migrate_contact_for_research_via_field_data(apps, schema_editor): ContactResearchMethod = apps.get_model("legalaid", "ContactResearchMethod") research_methods = {method.method: ...
<commit_before><commit_msg>Migrate data from contact_for_research_via and into contact_for_research_methods many to many field<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db.models import Q def migrate_contact_for_research_via_field_data(apps, schema_editor): ContactResearchMethod = apps.get_model("legalaid", "ContactResearchMethod") research_methods = {method.method: ...
Migrate data from contact_for_research_via and into contact_for_research_methods many to many field# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db.models import Q def migrate_contact_for_research_via_field_data(apps, schema_editor): ContactResearchM...
<commit_before><commit_msg>Migrate data from contact_for_research_via and into contact_for_research_methods many to many field<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db.models import Q def migrate_contact_for_research_via_field_data(a...
3912416390ebe5df3c883b280cc6acac5169c1f7
tests/test_elements_have_owner.py
tests/test_elements_have_owner.py
""" For all relevant model elements, check if there is at least one "owner" ("owner" is a derived union). This is needed to display all elements in the tree view. """ import itertools import pytest import gaphor.SysML.diagramitems import gaphor.UML.diagramitems from gaphor import UML from gaphor.core.modeling impor...
Add test to check if elements have at least one owner
Add test to check if elements have at least one owner
Python
lgpl-2.1
amolenaar/gaphor,amolenaar/gaphor
Add test to check if elements have at least one owner
""" For all relevant model elements, check if there is at least one "owner" ("owner" is a derived union). This is needed to display all elements in the tree view. """ import itertools import pytest import gaphor.SysML.diagramitems import gaphor.UML.diagramitems from gaphor import UML from gaphor.core.modeling impor...
<commit_before><commit_msg>Add test to check if elements have at least one owner<commit_after>
""" For all relevant model elements, check if there is at least one "owner" ("owner" is a derived union). This is needed to display all elements in the tree view. """ import itertools import pytest import gaphor.SysML.diagramitems import gaphor.UML.diagramitems from gaphor import UML from gaphor.core.modeling impor...
Add test to check if elements have at least one owner""" For all relevant model elements, check if there is at least one "owner" ("owner" is a derived union). This is needed to display all elements in the tree view. """ import itertools import pytest import gaphor.SysML.diagramitems import gaphor.UML.diagramitems f...
<commit_before><commit_msg>Add test to check if elements have at least one owner<commit_after>""" For all relevant model elements, check if there is at least one "owner" ("owner" is a derived union). This is needed to display all elements in the tree view. """ import itertools import pytest import gaphor.SysML.diag...
4a48b8dd804f9a287d35b697d851a660eec80a75
tests/richenum/test_simple_enums.py
tests/richenum/test_simple_enums.py
import unittest from richenum import EnumConstructionException, enum Breakfast = enum( COFFEE=0, OATMEAL=1, FRUIT=2) class SimpleEnumTestSuite(unittest.TestCase): def test_members_are_accessible_through_attributes(self): self.assertEqual(Breakfast.COFFEE, 0) def test_lookup_by_name(sel...
Add tests for simple enums
Add tests for simple enums
Python
mit
adepue/richenum,hearsaycorp/richenum
Add tests for simple enums
import unittest from richenum import EnumConstructionException, enum Breakfast = enum( COFFEE=0, OATMEAL=1, FRUIT=2) class SimpleEnumTestSuite(unittest.TestCase): def test_members_are_accessible_through_attributes(self): self.assertEqual(Breakfast.COFFEE, 0) def test_lookup_by_name(sel...
<commit_before><commit_msg>Add tests for simple enums<commit_after>
import unittest from richenum import EnumConstructionException, enum Breakfast = enum( COFFEE=0, OATMEAL=1, FRUIT=2) class SimpleEnumTestSuite(unittest.TestCase): def test_members_are_accessible_through_attributes(self): self.assertEqual(Breakfast.COFFEE, 0) def test_lookup_by_name(sel...
Add tests for simple enumsimport unittest from richenum import EnumConstructionException, enum Breakfast = enum( COFFEE=0, OATMEAL=1, FRUIT=2) class SimpleEnumTestSuite(unittest.TestCase): def test_members_are_accessible_through_attributes(self): self.assertEqual(Breakfast.COFFEE, 0) d...
<commit_before><commit_msg>Add tests for simple enums<commit_after>import unittest from richenum import EnumConstructionException, enum Breakfast = enum( COFFEE=0, OATMEAL=1, FRUIT=2) class SimpleEnumTestSuite(unittest.TestCase): def test_members_are_accessible_through_attributes(self): sel...
13fdc81cb32842dc5e0f05d2aa84c997cd59daa3
IPython/core/tests/test_logger.py
IPython/core/tests/test_logger.py
"""Test IPython.core.logger""" import nose.tools as nt _ip = get_ipython() def test_logstart_inaccessible_file(): try: _ip.logger.logstart(logfname="/") # Opening that filename will fail. except IOError: pass else: nt.assert_true(False) # The try block should never pas...
Add test that, if we failed to open the log file, we don't try to write to it.
Add test that, if we failed to open the log file, we don't try to write to it.
Python
bsd-3-clause
ipython/ipython,ipython/ipython
Add test that, if we failed to open the log file, we don't try to write to it.
"""Test IPython.core.logger""" import nose.tools as nt _ip = get_ipython() def test_logstart_inaccessible_file(): try: _ip.logger.logstart(logfname="/") # Opening that filename will fail. except IOError: pass else: nt.assert_true(False) # The try block should never pas...
<commit_before><commit_msg>Add test that, if we failed to open the log file, we don't try to write to it.<commit_after>
"""Test IPython.core.logger""" import nose.tools as nt _ip = get_ipython() def test_logstart_inaccessible_file(): try: _ip.logger.logstart(logfname="/") # Opening that filename will fail. except IOError: pass else: nt.assert_true(False) # The try block should never pas...
Add test that, if we failed to open the log file, we don't try to write to it."""Test IPython.core.logger""" import nose.tools as nt _ip = get_ipython() def test_logstart_inaccessible_file(): try: _ip.logger.logstart(logfname="/") # Opening that filename will fail. except IOError: pass ...
<commit_before><commit_msg>Add test that, if we failed to open the log file, we don't try to write to it.<commit_after>"""Test IPython.core.logger""" import nose.tools as nt _ip = get_ipython() def test_logstart_inaccessible_file(): try: _ip.logger.logstart(logfname="/") # Opening that filename will fa...
815ef4b4b0dce640077e1f8ecd2fbe95598bf539
src/ggrc/migrations/versions/20160608132526_170e453da661_add_comments_owners_info.py
src/ggrc/migrations/versions/20160608132526_170e453da661_add_comments_owners_info.py
# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: peter@reciprocitylabs.com # Maintained By: peter@reciprocitylabs.com """ Add comments' owners information. Create Date: 2016-06-08 13:25:26.635435...
Create existing comments' owners records
Create existing comments' owners records
Python
apache-2.0
kr41/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,edofic/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,j0gurt/ggrc-core,josthkko/ggrc-core,plamut/ggrc-core,jo...
Create existing comments' owners records
# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: peter@reciprocitylabs.com # Maintained By: peter@reciprocitylabs.com """ Add comments' owners information. Create Date: 2016-06-08 13:25:26.635435...
<commit_before><commit_msg>Create existing comments' owners records<commit_after>
# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: peter@reciprocitylabs.com # Maintained By: peter@reciprocitylabs.com """ Add comments' owners information. Create Date: 2016-06-08 13:25:26.635435...
Create existing comments' owners records# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: peter@reciprocitylabs.com # Maintained By: peter@reciprocitylabs.com """ Add comments' owners information. ...
<commit_before><commit_msg>Create existing comments' owners records<commit_after># Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: peter@reciprocitylabs.com # Maintained By: peter@reciprocitylabs.co...
c9690cabe3c4d1d02307e3594a2cac505f4a166d
photutils/utils/_moments.py
photutils/utils/_moments.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ..centroids import centroid_com __all__ = ['_moments_central', '_moments'] def _moments_central(data, center=None, or...
Add new image moments functions
Add new image moments functions
Python
bsd-3-clause
astropy/photutils,larrybradley/photutils
Add new image moments functions
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ..centroids import centroid_com __all__ = ['_moments_central', '_moments'] def _moments_central(data, center=None, or...
<commit_before><commit_msg>Add new image moments functions<commit_after>
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ..centroids import centroid_com __all__ = ['_moments_central', '_moments'] def _moments_central(data, center=None, or...
Add new image moments functions# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ..centroids import centroid_com __all__ = ['_moments_central', '_moments'] def _moment...
<commit_before><commit_msg>Add new image moments functions<commit_after># Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ..centroids import centroid_com __all__ = ['_mo...
6a3c960640741036c3f444547cada1e1b7a24100
tests/test_api.py
tests/test_api.py
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) # Use mu...
Add first unit test for api
Add first unit test for api
Python
mpl-2.0
mitre/multiscanner,mitre/multiscanner,MITRECND/multiscanner,jmlong1027/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,awest1339/multiscanner,awest1339/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner,MITRECND/multiscanner,jmlong1027/multiscanner,mitre/multiscanner
Add first unit test for api
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) # Use mu...
<commit_before><commit_msg>Add first unit test for api<commit_after>
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) # Use mu...
Add first unit test for apiimport os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.joi...
<commit_before><commit_msg>Add first unit test for api<commit_after>import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys...
763680e57b28a9746050206cd63450bf11c3e512
src/ggrc_basic_permissions/migrations/versions/20131010001257_10adeac7b693_fix_programeditor_pe.py
src/ggrc_basic_permissions/migrations/versions/20131010001257_10adeac7b693_fix_programeditor_pe.py
"""Fix ProgramEditor permissions Revision ID: 10adeac7b693 Revises: 8f33d9bd2043 Create Date: 2013-10-10 00:12:57.391754 """ # revision identifiers, used by Alembic. revision = '10adeac7b693' down_revision = '8f33d9bd2043' import json import sqlalchemy as sa from alembic import op from datetime import datetime fro...
Fix ProgramEditor permissions to not include Program delete
Fix ProgramEditor permissions to not include Program delete
Python
apache-2.0
VinnieJohns/ggrc-core,prasannav7/ggrc-core,prasannav7/ggrc-core,AleksNeStu/ggrc-core,vladan-m/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,prasannav7/ggrc-core,hyperNURb/ggrc-core,selahssea/ggrc-core,hasanalom/ggrc-core,jmakov/ggrc-core,j0gurt/ggrc-core,andrei-karalionak/ggrc-core,uskudnik/ggrc-core,NejcZupec/...
Fix ProgramEditor permissions to not include Program delete
"""Fix ProgramEditor permissions Revision ID: 10adeac7b693 Revises: 8f33d9bd2043 Create Date: 2013-10-10 00:12:57.391754 """ # revision identifiers, used by Alembic. revision = '10adeac7b693' down_revision = '8f33d9bd2043' import json import sqlalchemy as sa from alembic import op from datetime import datetime fro...
<commit_before><commit_msg>Fix ProgramEditor permissions to not include Program delete<commit_after>
"""Fix ProgramEditor permissions Revision ID: 10adeac7b693 Revises: 8f33d9bd2043 Create Date: 2013-10-10 00:12:57.391754 """ # revision identifiers, used by Alembic. revision = '10adeac7b693' down_revision = '8f33d9bd2043' import json import sqlalchemy as sa from alembic import op from datetime import datetime fro...
Fix ProgramEditor permissions to not include Program delete """Fix ProgramEditor permissions Revision ID: 10adeac7b693 Revises: 8f33d9bd2043 Create Date: 2013-10-10 00:12:57.391754 """ # revision identifiers, used by Alembic. revision = '10adeac7b693' down_revision = '8f33d9bd2043' import json import sqlalchemy as ...
<commit_before><commit_msg>Fix ProgramEditor permissions to not include Program delete<commit_after> """Fix ProgramEditor permissions Revision ID: 10adeac7b693 Revises: 8f33d9bd2043 Create Date: 2013-10-10 00:12:57.391754 """ # revision identifiers, used by Alembic. revision = '10adeac7b693' down_revision = '8f33d9b...
57fe1a44c2285f39cc1454bbd6cfb3ce621348c3
aligot/tests/test_user.py
aligot/tests/test_user.py
# coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient() def test_create_without_params(se...
Add a test to validate the user creation
Add a test to validate the user creation
Python
mit
aligot-project/aligot,aligot-project/aligot,aligot-project/aligot,skitoo/aligot
Add a test to validate the user creation
# coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient() def test_create_without_params(se...
<commit_before><commit_msg>Add a test to validate the user creation<commit_after>
# coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient() def test_create_without_params(se...
Add a test to validate the user creation# coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient(...
<commit_before><commit_msg>Add a test to validate the user creation<commit_after># coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setU...
4afd2553625db404cdfedfcf336079b3d9d723e3
st2auth/tests/unit/test_validation_utils.py
st2auth/tests/unit/test_validation_utils.py
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
Add test for auth service pre-run time validation checks.
Add test for auth service pre-run time validation checks.
Python
apache-2.0
StackStorm/st2,Plexxi/st2,StackStorm/st2,StackStorm/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,nzlosh/st2,StackStorm/st2,Plexxi/st2,tonybaloney/st2,tonybaloney/st2,nzlosh/st2,nzlosh/st2,tonybaloney/st2
Add test for auth service pre-run time validation checks.
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
<commit_before><commit_msg>Add test for auth service pre-run time validation checks.<commit_after>
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
Add test for auth service pre-run time validation checks.# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache L...
<commit_before><commit_msg>Add test for auth service pre-run time validation checks.<commit_after># Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF lic...
df9c8b2c2e616937afdbf09fc4a76ac7b821c8a5
bugimporters/tests/test_spider.py
bugimporters/tests/test_spider.py
import os import bugimporters.main from mock import Mock HERE = os.path.dirname(os.path.abspath(__file__)) # Create a global variable that can be referenced both from inside tests # and from module level functions functions. bug_data_transit = { 'get_fresh_urls': None, 'update': None, 'delete_by_url': ...
Add test (which we fail at the moment)
Add test (which we fail at the moment)
Python
agpl-3.0
openhatch/oh-bugimporters,openhatch/oh-bugimporters,openhatch/oh-bugimporters
Add test (which we fail at the moment)
import os import bugimporters.main from mock import Mock HERE = os.path.dirname(os.path.abspath(__file__)) # Create a global variable that can be referenced both from inside tests # and from module level functions functions. bug_data_transit = { 'get_fresh_urls': None, 'update': None, 'delete_by_url': ...
<commit_before><commit_msg>Add test (which we fail at the moment)<commit_after>
import os import bugimporters.main from mock import Mock HERE = os.path.dirname(os.path.abspath(__file__)) # Create a global variable that can be referenced both from inside tests # and from module level functions functions. bug_data_transit = { 'get_fresh_urls': None, 'update': None, 'delete_by_url': ...
Add test (which we fail at the moment)import os import bugimporters.main from mock import Mock HERE = os.path.dirname(os.path.abspath(__file__)) # Create a global variable that can be referenced both from inside tests # and from module level functions functions. bug_data_transit = { 'get_fresh_urls': None, ...
<commit_before><commit_msg>Add test (which we fail at the moment)<commit_after>import os import bugimporters.main from mock import Mock HERE = os.path.dirname(os.path.abspath(__file__)) # Create a global variable that can be referenced both from inside tests # and from module level functions functions. bug_data_tr...
fde083c87f0e2582fbf57415e957b93d116ad67a
app/soc/modules/gci/views/base.py
app/soc/modules/gci/views/base.py
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange 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 applic...
Create RequestHandler related to GCI.
Create RequestHandler related to GCI. --HG-- extra : rebase_source : 2b29958cb5939f0ea5b52fac58c7d18d7716299b
Python
apache-2.0
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
Create RequestHandler related to GCI. --HG-- extra : rebase_source : 2b29958cb5939f0ea5b52fac58c7d18d7716299b
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange 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 applic...
<commit_before><commit_msg>Create RequestHandler related to GCI. --HG-- extra : rebase_source : 2b29958cb5939f0ea5b52fac58c7d18d7716299b<commit_after>
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange 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 applic...
Create RequestHandler related to GCI. --HG-- extra : rebase_source : 2b29958cb5939f0ea5b52fac58c7d18d7716299b#!/usr/bin/env python2.5 # # Copyright 2011 the Melange 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 ...
<commit_before><commit_msg>Create RequestHandler related to GCI. --HG-- extra : rebase_source : 2b29958cb5939f0ea5b52fac58c7d18d7716299b<commit_after>#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except i...
0106355df43bc35a75aafc6b9070f78131e89bef
tests/search_backend_postgres.py
tests/search_backend_postgres.py
from wolis.test_case import WolisTestCase class SearchBackendPostgresTest(WolisTestCase): def test_set_search_backend(self): self.login('morpheus', 'morpheus') self.acp_login('morpheus', 'morpheus') self.change_acp_knob( link_text='Search settings', check_pa...
Test for switching to postgres search backend
Test for switching to postgres search backend
Python
bsd-2-clause
p/wolis-phpbb,p/wolis-phpbb
Test for switching to postgres search backend
from wolis.test_case import WolisTestCase class SearchBackendPostgresTest(WolisTestCase): def test_set_search_backend(self): self.login('morpheus', 'morpheus') self.acp_login('morpheus', 'morpheus') self.change_acp_knob( link_text='Search settings', check_pa...
<commit_before><commit_msg>Test for switching to postgres search backend<commit_after>
from wolis.test_case import WolisTestCase class SearchBackendPostgresTest(WolisTestCase): def test_set_search_backend(self): self.login('morpheus', 'morpheus') self.acp_login('morpheus', 'morpheus') self.change_acp_knob( link_text='Search settings', check_pa...
Test for switching to postgres search backendfrom wolis.test_case import WolisTestCase class SearchBackendPostgresTest(WolisTestCase): def test_set_search_backend(self): self.login('morpheus', 'morpheus') self.acp_login('morpheus', 'morpheus') self.change_acp_knob( link...
<commit_before><commit_msg>Test for switching to postgres search backend<commit_after>from wolis.test_case import WolisTestCase class SearchBackendPostgresTest(WolisTestCase): def test_set_search_backend(self): self.login('morpheus', 'morpheus') self.acp_login('morpheus', 'morpheus') ...
1f12da3d049527f838ab21c042b8f18e1977af49
migrations/versions/0283_platform_admin_not_live.py
migrations/versions/0283_platform_admin_not_live.py
"""empty message Revision ID: 0283_platform_admin_not_live Revises: 0282_add_count_as_live Create Date: 2016-10-25 17:37:27.660723 """ # revision identifiers, used by Alembic. revision = '0283_platform_admin_not_live' down_revision = '0282_add_count_as_live' from alembic import op import sqlalchemy as sa STATEMEN...
Migrate existing platform admin services to not be counted
Migrate existing platform admin services to not be counted If a service has been created by someone on our team, itโ€™s probably a test service, which shouldnโ€™t be included in the count of live services. This commit adds a migration to do this for existing services.
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Migrate existing platform admin services to not be counted If a service has been created by someone on our team, itโ€™s probably a test service, which shouldnโ€™t be included in the count of live services. This commit adds a migration to do this for existing services.
"""empty message Revision ID: 0283_platform_admin_not_live Revises: 0282_add_count_as_live Create Date: 2016-10-25 17:37:27.660723 """ # revision identifiers, used by Alembic. revision = '0283_platform_admin_not_live' down_revision = '0282_add_count_as_live' from alembic import op import sqlalchemy as sa STATEMEN...
<commit_before><commit_msg>Migrate existing platform admin services to not be counted If a service has been created by someone on our team, itโ€™s probably a test service, which shouldnโ€™t be included in the count of live services. This commit adds a migration to do this for existing services.<commit_after>
"""empty message Revision ID: 0283_platform_admin_not_live Revises: 0282_add_count_as_live Create Date: 2016-10-25 17:37:27.660723 """ # revision identifiers, used by Alembic. revision = '0283_platform_admin_not_live' down_revision = '0282_add_count_as_live' from alembic import op import sqlalchemy as sa STATEMEN...
Migrate existing platform admin services to not be counted If a service has been created by someone on our team, itโ€™s probably a test service, which shouldnโ€™t be included in the count of live services. This commit adds a migration to do this for existing services."""empty message Revision ID: 0283_platform_admin_not...
<commit_before><commit_msg>Migrate existing platform admin services to not be counted If a service has been created by someone on our team, itโ€™s probably a test service, which shouldnโ€™t be included in the count of live services. This commit adds a migration to do this for existing services.<commit_after>"""empty mess...
6857624e9d6633038f0565a520de856ee40def09
test/many_envs_test.py
test/many_envs_test.py
# Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. from .. import ConfigRoot from ..envs import EnvFactory ef = EnvFactory() envs = [] groups = [] for ii in range(0, 16): local_envs = [] for jj in range(0, 128): local_envs...
Test with many envs and large groups
Test with many envs and large groups
Python
bsd-3-clause
lhupfeldt/multiconf
Test with many envs and large groups
# Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. from .. import ConfigRoot from ..envs import EnvFactory ef = EnvFactory() envs = [] groups = [] for ii in range(0, 16): local_envs = [] for jj in range(0, 128): local_envs...
<commit_before><commit_msg>Test with many envs and large groups<commit_after>
# Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. from .. import ConfigRoot from ..envs import EnvFactory ef = EnvFactory() envs = [] groups = [] for ii in range(0, 16): local_envs = [] for jj in range(0, 128): local_envs...
Test with many envs and large groups# Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. from .. import ConfigRoot from ..envs import EnvFactory ef = EnvFactory() envs = [] groups = [] for ii in range(0, 16): local_envs = [] for jj ...
<commit_before><commit_msg>Test with many envs and large groups<commit_after># Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. from .. import ConfigRoot from ..envs import EnvFactory ef = EnvFactory() envs = [] groups = [] for ii in rang...
a4b242ebd107f9321cc5b87aee2cf608940007f4
product/migrations/0005_auto_20161015_1536.py
product/migrations/0005_auto_20161015_1536.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-15 15:36 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('product', '0004_auto_20161015_1534'), ] operations = [ migrations.AlterModelOptions...
Make permission name more consistent.
Make permission name more consistent.
Python
mit
borderitsolutions/amadaa,borderitsolutions/amadaa,borderitsolutions/amadaa
Make permission name more consistent.
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-15 15:36 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('product', '0004_auto_20161015_1534'), ] operations = [ migrations.AlterModelOptions...
<commit_before><commit_msg>Make permission name more consistent.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-15 15:36 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('product', '0004_auto_20161015_1534'), ] operations = [ migrations.AlterModelOptions...
Make permission name more consistent.# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-15 15:36 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('product', '0004_auto_20161015_1534'), ] operations = [...
<commit_before><commit_msg>Make permission name more consistent.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-15 15:36 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('product', '0004_auto_2...
25c2502fce4556b5b72e96116745c83d1689677f
artists/tests/test_serializers.py
artists/tests/test_serializers.py
from unittest import TestCase from ..models import Artist, Hyperlink from ..serializers import ArtistSerializer, HyperlinkSerializer class HyperlinkSerializerTest(TestCase): """Tests for Hyperlink serializer.""" def test_valid_fields(self): id_ = 4 name = 'jamendo' display_name = "J...
Add tests for artist serializers
Add tests for artist serializers
Python
bsd-3-clause
FreeMusicNinja/api.freemusic.ninja
Add tests for artist serializers
from unittest import TestCase from ..models import Artist, Hyperlink from ..serializers import ArtistSerializer, HyperlinkSerializer class HyperlinkSerializerTest(TestCase): """Tests for Hyperlink serializer.""" def test_valid_fields(self): id_ = 4 name = 'jamendo' display_name = "J...
<commit_before><commit_msg>Add tests for artist serializers<commit_after>
from unittest import TestCase from ..models import Artist, Hyperlink from ..serializers import ArtistSerializer, HyperlinkSerializer class HyperlinkSerializerTest(TestCase): """Tests for Hyperlink serializer.""" def test_valid_fields(self): id_ = 4 name = 'jamendo' display_name = "J...
Add tests for artist serializersfrom unittest import TestCase from ..models import Artist, Hyperlink from ..serializers import ArtistSerializer, HyperlinkSerializer class HyperlinkSerializerTest(TestCase): """Tests for Hyperlink serializer.""" def test_valid_fields(self): id_ = 4 name = 'ja...
<commit_before><commit_msg>Add tests for artist serializers<commit_after>from unittest import TestCase from ..models import Artist, Hyperlink from ..serializers import ArtistSerializer, HyperlinkSerializer class HyperlinkSerializerTest(TestCase): """Tests for Hyperlink serializer.""" def test_valid_fields(...
42af700af58588fccaa84f5348a5c854d095d1a9
code/ex2.2-simple_requests.py
code/ex2.2-simple_requests.py
from urllib.request import urlopen import time URLS = [ 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', ] def request_greetings(): responses = [] for url in URLS: resp = urlopen(url) responses.append(resp.read().decode('utf-8')) texts = '\n'.join(resp...
Add ex2.2: multiple simple requests
Add ex2.2: multiple simple requests
Python
mit
MA3STR0/PythonAsyncWorkshop
Add ex2.2: multiple simple requests
from urllib.request import urlopen import time URLS = [ 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', ] def request_greetings(): responses = [] for url in URLS: resp = urlopen(url) responses.append(resp.read().decode('utf-8')) texts = '\n'.join(resp...
<commit_before><commit_msg>Add ex2.2: multiple simple requests<commit_after>
from urllib.request import urlopen import time URLS = [ 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', ] def request_greetings(): responses = [] for url in URLS: resp = urlopen(url) responses.append(resp.read().decode('utf-8')) texts = '\n'.join(resp...
Add ex2.2: multiple simple requestsfrom urllib.request import urlopen import time URLS = [ 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', ] def request_greetings(): responses = [] for url in URLS: resp = urlopen(url) responses.append(resp.read().decode('...
<commit_before><commit_msg>Add ex2.2: multiple simple requests<commit_after>from urllib.request import urlopen import time URLS = [ 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', ] def request_greetings(): responses = [] for url in URLS: resp = urlopen(url) ...
36af8c98005bfb6d51344b80a59cb6e48c8b55fb
salt/output/overstatestage.py
salt/output/overstatestage.py
''' Display clean output of an overstate stage ''' #[{'group2': {'match': ['fedora17-2', 'fedora17-3'], # 'require': ['group1'], # 'sls': ['nginx', 'edit']} # } # ] # Import Salt libs import salt.utils def output(data): ''' Format the data for printing stage ...
Add outputter to display overstate stages
Add outputter to display overstate stages
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
Add outputter to display overstate stages
''' Display clean output of an overstate stage ''' #[{'group2': {'match': ['fedora17-2', 'fedora17-3'], # 'require': ['group1'], # 'sls': ['nginx', 'edit']} # } # ] # Import Salt libs import salt.utils def output(data): ''' Format the data for printing stage ...
<commit_before><commit_msg>Add outputter to display overstate stages<commit_after>
''' Display clean output of an overstate stage ''' #[{'group2': {'match': ['fedora17-2', 'fedora17-3'], # 'require': ['group1'], # 'sls': ['nginx', 'edit']} # } # ] # Import Salt libs import salt.utils def output(data): ''' Format the data for printing stage ...
Add outputter to display overstate stages''' Display clean output of an overstate stage ''' #[{'group2': {'match': ['fedora17-2', 'fedora17-3'], # 'require': ['group1'], # 'sls': ['nginx', 'edit']} # } # ] # Import Salt libs import salt.utils def output(data): ''...
<commit_before><commit_msg>Add outputter to display overstate stages<commit_after>''' Display clean output of an overstate stage ''' #[{'group2': {'match': ['fedora17-2', 'fedora17-3'], # 'require': ['group1'], # 'sls': ['nginx', 'edit']} # } # ] # Import Salt libs imp...
626662f0f3ef2ce7de63c424da89263443243e97
scrapy/contrib/spiderstate.py
scrapy/contrib/spiderstate.py
import os, cPickle as pickle from scrapy import signals class SpiderState(object): """Store and load spider state during a scraping job""" def __init__(self, jobdir=None): self.jobdir = jobdir @classmethod def from_crawler(cls, crawler): obj = cls(crawler.settings.get('JOBDIR')) ...
import os, cPickle as pickle from scrapy import signals class SpiderState(object): """Store and load spider state during a scraping job""" def __init__(self, jobdir=None): self.jobdir = jobdir @classmethod def from_crawler(cls, crawler): obj = cls(crawler.settings.get('JOBDIR')) ...
Fix SpiderState bug in Windows platforms
Fix SpiderState bug in Windows platforms The spider state file was not opened in binary mode.
Python
bsd-3-clause
yarikoptic/scrapy,godfreyy/scrapy,coderabhishek/scrapy,coderabhishek/scrapy,yidongliu/scrapy,yusofm/scrapy,hectoruelo/scrapy,csalazar/scrapy,Timeship/scrapy,wangjun/scrapy,Zephor5/scrapy,profjrr/scrapy,Geeglee/scrapy,olafdietsche/scrapy,Geeglee/scrapy,beni55/scrapy,kimimj/scrapy,mlyundin/scrapy,amboxer21/scrapy,ramiro/...
import os, cPickle as pickle from scrapy import signals class SpiderState(object): """Store and load spider state during a scraping job""" def __init__(self, jobdir=None): self.jobdir = jobdir @classmethod def from_crawler(cls, crawler): obj = cls(crawler.settings.get('JOBDIR')) ...
import os, cPickle as pickle from scrapy import signals class SpiderState(object): """Store and load spider state during a scraping job""" def __init__(self, jobdir=None): self.jobdir = jobdir @classmethod def from_crawler(cls, crawler): obj = cls(crawler.settings.get('JOBDIR')) ...
<commit_before>import os, cPickle as pickle from scrapy import signals class SpiderState(object): """Store and load spider state during a scraping job""" def __init__(self, jobdir=None): self.jobdir = jobdir @classmethod def from_crawler(cls, crawler): obj = cls(crawler.settings.get(...
import os, cPickle as pickle from scrapy import signals class SpiderState(object): """Store and load spider state during a scraping job""" def __init__(self, jobdir=None): self.jobdir = jobdir @classmethod def from_crawler(cls, crawler): obj = cls(crawler.settings.get('JOBDIR')) ...
import os, cPickle as pickle from scrapy import signals class SpiderState(object): """Store and load spider state during a scraping job""" def __init__(self, jobdir=None): self.jobdir = jobdir @classmethod def from_crawler(cls, crawler): obj = cls(crawler.settings.get('JOBDIR')) ...
<commit_before>import os, cPickle as pickle from scrapy import signals class SpiderState(object): """Store and load spider state during a scraping job""" def __init__(self, jobdir=None): self.jobdir = jobdir @classmethod def from_crawler(cls, crawler): obj = cls(crawler.settings.get(...
5fc6d9fc05bc4cae5588489c576744a518155461
trig.py
trig.py
import function import math class Sin(function.Function): def _evaluate(self, x): return math.sin(x) class Cos(function.Function): def _evaluate(self, x): return math.cos(x) class Tan(function.Function): def _evaluate(self, x): sin = Sin() cos = Cos() if cos(...
Add Sin, Cos and Tan function classes
Add Sin, Cos and Tan function classes
Python
mit
jackromo/mathLibPy
Add Sin, Cos and Tan function classes
import function import math class Sin(function.Function): def _evaluate(self, x): return math.sin(x) class Cos(function.Function): def _evaluate(self, x): return math.cos(x) class Tan(function.Function): def _evaluate(self, x): sin = Sin() cos = Cos() if cos(...
<commit_before><commit_msg>Add Sin, Cos and Tan function classes<commit_after>
import function import math class Sin(function.Function): def _evaluate(self, x): return math.sin(x) class Cos(function.Function): def _evaluate(self, x): return math.cos(x) class Tan(function.Function): def _evaluate(self, x): sin = Sin() cos = Cos() if cos(...
Add Sin, Cos and Tan function classesimport function import math class Sin(function.Function): def _evaluate(self, x): return math.sin(x) class Cos(function.Function): def _evaluate(self, x): return math.cos(x) class Tan(function.Function): def _evaluate(self, x): sin = Sin(...
<commit_before><commit_msg>Add Sin, Cos and Tan function classes<commit_after>import function import math class Sin(function.Function): def _evaluate(self, x): return math.sin(x) class Cos(function.Function): def _evaluate(self, x): return math.cos(x) class Tan(function.Function): d...
1d55ad8fb8309918e7d41b4f443e16ebefbb1895
populate_elasticsearch.py
populate_elasticsearch.py
#!/usr/bin/env python import os import sys import json import requests import multiprocessing import mwparserfromhell as mwp ES_URL = 'http://localhost:9200' SECTIONS_TO_REMOVE = set([ 'references', 'see also', 'external links', 'footnotes' ]) def put_document(path): id = os.path.basename(path) doc = js...
Add script for populating elasticsearch.
Add script for populating elasticsearch.
Python
mit
eggpi/similarity,eggpi/similarity,eggpi/similarity
Add script for populating elasticsearch.
#!/usr/bin/env python import os import sys import json import requests import multiprocessing import mwparserfromhell as mwp ES_URL = 'http://localhost:9200' SECTIONS_TO_REMOVE = set([ 'references', 'see also', 'external links', 'footnotes' ]) def put_document(path): id = os.path.basename(path) doc = js...
<commit_before><commit_msg>Add script for populating elasticsearch.<commit_after>
#!/usr/bin/env python import os import sys import json import requests import multiprocessing import mwparserfromhell as mwp ES_URL = 'http://localhost:9200' SECTIONS_TO_REMOVE = set([ 'references', 'see also', 'external links', 'footnotes' ]) def put_document(path): id = os.path.basename(path) doc = js...
Add script for populating elasticsearch.#!/usr/bin/env python import os import sys import json import requests import multiprocessing import mwparserfromhell as mwp ES_URL = 'http://localhost:9200' SECTIONS_TO_REMOVE = set([ 'references', 'see also', 'external links', 'footnotes' ]) def put_document(path): ...
<commit_before><commit_msg>Add script for populating elasticsearch.<commit_after>#!/usr/bin/env python import os import sys import json import requests import multiprocessing import mwparserfromhell as mwp ES_URL = 'http://localhost:9200' SECTIONS_TO_REMOVE = set([ 'references', 'see also', 'external links', 'fo...
ff2b86d90ecbc2da25ddc05b0430555861104cac
examples/hybrid_manager_example.py
examples/hybrid_manager_example.py
# This example shows how to configure Jupyter/IPython to use the more complex # HybridContentsManager. # A HybridContentsManager implements the contents API by delegating requests to # other contents managers. Each sub-manager is associated with a root # directory, and all requests for data within that directory are r...
Add an example for HybridContentsManager.
DOC: Add an example for HybridContentsManager.
Python
apache-2.0
quantopian/pgcontents
DOC: Add an example for HybridContentsManager.
# This example shows how to configure Jupyter/IPython to use the more complex # HybridContentsManager. # A HybridContentsManager implements the contents API by delegating requests to # other contents managers. Each sub-manager is associated with a root # directory, and all requests for data within that directory are r...
<commit_before><commit_msg>DOC: Add an example for HybridContentsManager.<commit_after>
# This example shows how to configure Jupyter/IPython to use the more complex # HybridContentsManager. # A HybridContentsManager implements the contents API by delegating requests to # other contents managers. Each sub-manager is associated with a root # directory, and all requests for data within that directory are r...
DOC: Add an example for HybridContentsManager.# This example shows how to configure Jupyter/IPython to use the more complex # HybridContentsManager. # A HybridContentsManager implements the contents API by delegating requests to # other contents managers. Each sub-manager is associated with a root # directory, and all...
<commit_before><commit_msg>DOC: Add an example for HybridContentsManager.<commit_after># This example shows how to configure Jupyter/IPython to use the more complex # HybridContentsManager. # A HybridContentsManager implements the contents API by delegating requests to # other contents managers. Each sub-manager is as...
63eaadad7a5169ec6219d33f9b39ce27859684c2
notebooks/test_notebooks.py
notebooks/test_notebooks.py
# -*- coding: utf-8 -*- ''' Checks notebook execution result. Equal to this command + error management: jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=60 --output executed_notebook.ipynb demo.ipynb For jupyter configuration information, run: jupyter --path ''' # Dependencies: nbformat, nbc...
Add script to automate notebooks testing
Add script to automate notebooks testing
Python
agpl-3.0
openfisca/openfisca-tunisia,openfisca/openfisca-tunisia
Add script to automate notebooks testing
# -*- coding: utf-8 -*- ''' Checks notebook execution result. Equal to this command + error management: jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=60 --output executed_notebook.ipynb demo.ipynb For jupyter configuration information, run: jupyter --path ''' # Dependencies: nbformat, nbc...
<commit_before><commit_msg>Add script to automate notebooks testing<commit_after>
# -*- coding: utf-8 -*- ''' Checks notebook execution result. Equal to this command + error management: jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=60 --output executed_notebook.ipynb demo.ipynb For jupyter configuration information, run: jupyter --path ''' # Dependencies: nbformat, nbc...
Add script to automate notebooks testing# -*- coding: utf-8 -*- ''' Checks notebook execution result. Equal to this command + error management: jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=60 --output executed_notebook.ipynb demo.ipynb For jupyter configuration information, run: jupyter --...
<commit_before><commit_msg>Add script to automate notebooks testing<commit_after># -*- coding: utf-8 -*- ''' Checks notebook execution result. Equal to this command + error management: jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=60 --output executed_notebook.ipynb demo.ipynb For jupyter c...
f4bb4d17214f4e359455cf7b5fb7ab973508049b
bin/diffMatcher.py
bin/diffMatcher.py
#!/usr/bin/python # coding=utf-8 import subprocess class DiffMatcher(object): def __init__(self, listA, listB): self.listA = listA self.listB = listB def create_diff(self, listA, listB,case_sensitive): new_list = [] #compare the two files try: if (cas...
Add missing module for merge script
Add missing module for merge script
Python
mit
comphist/cora,comphist/cora,comphist/cora,comphist/cora,comphist/cora
Add missing module for merge script
#!/usr/bin/python # coding=utf-8 import subprocess class DiffMatcher(object): def __init__(self, listA, listB): self.listA = listA self.listB = listB def create_diff(self, listA, listB,case_sensitive): new_list = [] #compare the two files try: if (cas...
<commit_before><commit_msg>Add missing module for merge script<commit_after>
#!/usr/bin/python # coding=utf-8 import subprocess class DiffMatcher(object): def __init__(self, listA, listB): self.listA = listA self.listB = listB def create_diff(self, listA, listB,case_sensitive): new_list = [] #compare the two files try: if (cas...
Add missing module for merge script#!/usr/bin/python # coding=utf-8 import subprocess class DiffMatcher(object): def __init__(self, listA, listB): self.listA = listA self.listB = listB def create_diff(self, listA, listB,case_sensitive): new_list = [] #compare the two fil...
<commit_before><commit_msg>Add missing module for merge script<commit_after>#!/usr/bin/python # coding=utf-8 import subprocess class DiffMatcher(object): def __init__(self, listA, listB): self.listA = listA self.listB = listB def create_diff(self, listA, listB,case_sensitive): n...
ba8be59db72c958e2ff20b9ae7fe81c400b40f9c
bluebottle/time_based/migrations/0008_auto_20201023_1443.py
bluebottle/time_based/migrations/0008_auto_20201023_1443.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2020-10-23 12:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('time_based', '0007_auto_20201023_1433'), ] operations = [ migrations.Alter...
Make start of ongoing and deadline activities just a date
Make start of ongoing and deadline activities just a date
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
Make start of ongoing and deadline activities just a date
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2020-10-23 12:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('time_based', '0007_auto_20201023_1433'), ] operations = [ migrations.Alter...
<commit_before><commit_msg>Make start of ongoing and deadline activities just a date<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2020-10-23 12:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('time_based', '0007_auto_20201023_1433'), ] operations = [ migrations.Alter...
Make start of ongoing and deadline activities just a date# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2020-10-23 12:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('time_based', '0007_auto_20201023_1...
<commit_before><commit_msg>Make start of ongoing and deadline activities just a date<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2020-10-23 12:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ...
38090ac06a48a4205cbc2318e3ad9296d5b08ea5
temba/msgs/migrations/0069_populate_broadcast_base_lang.py
temba/msgs/migrations/0069_populate_broadcast_base_lang.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import defaultdict from django.db import migrations from temba.utils import chunk_list def do_populate(Broadcast, FlowStep): BroadcastSteps = FlowStep.broadcasts.through broadcast_ids = list(Broadcast.objects.values_list('id', f...
Add migration to populate Broadcast.base_language
Add migration to populate Broadcast.base_language
Python
agpl-3.0
pulilab/rapidpro,tsotetsi/textily-web,tsotetsi/textily-web,pulilab/rapidpro,tsotetsi/textily-web,tsotetsi/textily-web,pulilab/rapidpro,tsotetsi/textily-web,pulilab/rapidpro,pulilab/rapidpro
Add migration to populate Broadcast.base_language
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import defaultdict from django.db import migrations from temba.utils import chunk_list def do_populate(Broadcast, FlowStep): BroadcastSteps = FlowStep.broadcasts.through broadcast_ids = list(Broadcast.objects.values_list('id', f...
<commit_before><commit_msg>Add migration to populate Broadcast.base_language<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import defaultdict from django.db import migrations from temba.utils import chunk_list def do_populate(Broadcast, FlowStep): BroadcastSteps = FlowStep.broadcasts.through broadcast_ids = list(Broadcast.objects.values_list('id', f...
Add migration to populate Broadcast.base_language# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import defaultdict from django.db import migrations from temba.utils import chunk_list def do_populate(Broadcast, FlowStep): BroadcastSteps = FlowStep.broadcasts.through broadcast...
<commit_before><commit_msg>Add migration to populate Broadcast.base_language<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import defaultdict from django.db import migrations from temba.utils import chunk_list def do_populate(Broadcast, FlowStep): BroadcastSteps = ...
d2a80a76fdf28625ad36b2fd71af56938b9b9506
src/trackknown.py
src/trackknown.py
#!/usr/bin/env python ''' @author jstober Simple class to track knowledge of states and actions. Based on L. Li, M. L. Littman, and C. R. Mansley, โ€œOnline exploration in least-squares policy iterationโ€ AAMAS, 2009. ''' import numpy as np import pdb class TrackKnown: """ Track knowledge of states and action...
Add needed track known class.
Add needed track known class.
Python
bsd-2-clause
stober/lspi
Add needed track known class.
#!/usr/bin/env python ''' @author jstober Simple class to track knowledge of states and actions. Based on L. Li, M. L. Littman, and C. R. Mansley, โ€œOnline exploration in least-squares policy iterationโ€ AAMAS, 2009. ''' import numpy as np import pdb class TrackKnown: """ Track knowledge of states and action...
<commit_before><commit_msg>Add needed track known class.<commit_after>
#!/usr/bin/env python ''' @author jstober Simple class to track knowledge of states and actions. Based on L. Li, M. L. Littman, and C. R. Mansley, โ€œOnline exploration in least-squares policy iterationโ€ AAMAS, 2009. ''' import numpy as np import pdb class TrackKnown: """ Track knowledge of states and action...
Add needed track known class.#!/usr/bin/env python ''' @author jstober Simple class to track knowledge of states and actions. Based on L. Li, M. L. Littman, and C. R. Mansley, โ€œOnline exploration in least-squares policy iterationโ€ AAMAS, 2009. ''' import numpy as np import pdb class TrackKnown: """ Track k...
<commit_before><commit_msg>Add needed track known class.<commit_after>#!/usr/bin/env python ''' @author jstober Simple class to track knowledge of states and actions. Based on L. Li, M. L. Littman, and C. R. Mansley, โ€œOnline exploration in least-squares policy iterationโ€ AAMAS, 2009. ''' import numpy as np import p...
5dfa4397a282ddbafb57d990bc7d630fb6f927de
build.py
build.py
"""Update conda packages on binstars with latest versions""" import os import six import subprocess import time ATTEMPTS = 3 RETRY_INTERVAL = 0.1 def execute(command, **kwargs): """Helper method to shell out and execute a command through subprocess. :param attempts: How many times to retry running th...
Add helper method for execute a commands
Add helper method for execute a commands
Python
mit
alexandrucoman/bcbio-dev-conda,alexandrucoman/bcbio-dev-conda
Add helper method for execute a commands
"""Update conda packages on binstars with latest versions""" import os import six import subprocess import time ATTEMPTS = 3 RETRY_INTERVAL = 0.1 def execute(command, **kwargs): """Helper method to shell out and execute a command through subprocess. :param attempts: How many times to retry running th...
<commit_before><commit_msg>Add helper method for execute a commands<commit_after>
"""Update conda packages on binstars with latest versions""" import os import six import subprocess import time ATTEMPTS = 3 RETRY_INTERVAL = 0.1 def execute(command, **kwargs): """Helper method to shell out and execute a command through subprocess. :param attempts: How many times to retry running th...
Add helper method for execute a commands"""Update conda packages on binstars with latest versions""" import os import six import subprocess import time ATTEMPTS = 3 RETRY_INTERVAL = 0.1 def execute(command, **kwargs): """Helper method to shell out and execute a command through subprocess. :param attempts: ...
<commit_before><commit_msg>Add helper method for execute a commands<commit_after>"""Update conda packages on binstars with latest versions""" import os import six import subprocess import time ATTEMPTS = 3 RETRY_INTERVAL = 0.1 def execute(command, **kwargs): """Helper method to shell out and execute a command th...
bd371ecbd2ac163e44f104a775390b2ca2b88d35
migrations/versions/75704b2e975e_add_index_on_departement_for_numero.py
migrations/versions/75704b2e975e_add_index_on_departement_for_numero.py
"""Add index on Departement for numero Revision ID: 75704b2e975e Revises: 34c2049aaee2 Create Date: 2019-10-22 17:27:10.925104 """ # revision identifiers, used by Alembic. revision = '75704b2e975e' down_revision = '34c2049aaee2' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgres...
Add migration for index on departement
Add migration for index on departement
Python
agpl-3.0
openmaraude/APITaxi,openmaraude/APITaxi
Add migration for index on departement
"""Add index on Departement for numero Revision ID: 75704b2e975e Revises: 34c2049aaee2 Create Date: 2019-10-22 17:27:10.925104 """ # revision identifiers, used by Alembic. revision = '75704b2e975e' down_revision = '34c2049aaee2' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgres...
<commit_before><commit_msg>Add migration for index on departement<commit_after>
"""Add index on Departement for numero Revision ID: 75704b2e975e Revises: 34c2049aaee2 Create Date: 2019-10-22 17:27:10.925104 """ # revision identifiers, used by Alembic. revision = '75704b2e975e' down_revision = '34c2049aaee2' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgres...
Add migration for index on departement"""Add index on Departement for numero Revision ID: 75704b2e975e Revises: 34c2049aaee2 Create Date: 2019-10-22 17:27:10.925104 """ # revision identifiers, used by Alembic. revision = '75704b2e975e' down_revision = '34c2049aaee2' from alembic import op import sqlalchemy as sa fr...
<commit_before><commit_msg>Add migration for index on departement<commit_after>"""Add index on Departement for numero Revision ID: 75704b2e975e Revises: 34c2049aaee2 Create Date: 2019-10-22 17:27:10.925104 """ # revision identifiers, used by Alembic. revision = '75704b2e975e' down_revision = '34c2049aaee2' from ale...
e7e37e9b1fd56d18711299065d6f421c1cb28bac
moksha/tests/test_feed.py
moksha/tests/test_feed.py
from tw.api import Widget from moksha.feed import Feed class TestFeed(object): def test_feed_subclassing(self): class MyFeed(Feed): url = 'http://lewk.org/rss' feed = MyFeed() assert feed.url == 'http://lewk.org/rss' assert feed.num_entries() > 0 for entry in fe...
Add some Feed test cases
Add some Feed test cases
Python
apache-2.0
pombredanne/moksha,lmacken/moksha,pombredanne/moksha,mokshaproject/moksha,lmacken/moksha,mokshaproject/moksha,ralphbean/moksha,pombredanne/moksha,pombredanne/moksha,ralphbean/moksha,mokshaproject/moksha,lmacken/moksha,mokshaproject/moksha,ralphbean/moksha
Add some Feed test cases
from tw.api import Widget from moksha.feed import Feed class TestFeed(object): def test_feed_subclassing(self): class MyFeed(Feed): url = 'http://lewk.org/rss' feed = MyFeed() assert feed.url == 'http://lewk.org/rss' assert feed.num_entries() > 0 for entry in fe...
<commit_before><commit_msg>Add some Feed test cases<commit_after>
from tw.api import Widget from moksha.feed import Feed class TestFeed(object): def test_feed_subclassing(self): class MyFeed(Feed): url = 'http://lewk.org/rss' feed = MyFeed() assert feed.url == 'http://lewk.org/rss' assert feed.num_entries() > 0 for entry in fe...
Add some Feed test casesfrom tw.api import Widget from moksha.feed import Feed class TestFeed(object): def test_feed_subclassing(self): class MyFeed(Feed): url = 'http://lewk.org/rss' feed = MyFeed() assert feed.url == 'http://lewk.org/rss' assert feed.num_entries() > 0...
<commit_before><commit_msg>Add some Feed test cases<commit_after>from tw.api import Widget from moksha.feed import Feed class TestFeed(object): def test_feed_subclassing(self): class MyFeed(Feed): url = 'http://lewk.org/rss' feed = MyFeed() assert feed.url == 'http://lewk.org/r...
226cf36e4b4d069a920785b492804b78eebc34a5
corehq/apps/locations/management/commands/migrate_admin_status.py
corehq/apps/locations/management/commands/migrate_admin_status.py
# One-off migration from 2016-04-04 from optparse import make_option from time import sleep from django.core.management.base import BaseCommand from corehq.apps.locations.models import LocationType, SQLLocation from corehq.apps.es import DomainES from corehq.util.log import with_progress_bar def get_affected_location...
Make non-commtrack location types administrative
Make non-commtrack location types administrative
Python
bsd-3-clause
dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq
Make non-commtrack location types administrative
# One-off migration from 2016-04-04 from optparse import make_option from time import sleep from django.core.management.base import BaseCommand from corehq.apps.locations.models import LocationType, SQLLocation from corehq.apps.es import DomainES from corehq.util.log import with_progress_bar def get_affected_location...
<commit_before><commit_msg>Make non-commtrack location types administrative<commit_after>
# One-off migration from 2016-04-04 from optparse import make_option from time import sleep from django.core.management.base import BaseCommand from corehq.apps.locations.models import LocationType, SQLLocation from corehq.apps.es import DomainES from corehq.util.log import with_progress_bar def get_affected_location...
Make non-commtrack location types administrative# One-off migration from 2016-04-04 from optparse import make_option from time import sleep from django.core.management.base import BaseCommand from corehq.apps.locations.models import LocationType, SQLLocation from corehq.apps.es import DomainES from corehq.util.log impo...
<commit_before><commit_msg>Make non-commtrack location types administrative<commit_after># One-off migration from 2016-04-04 from optparse import make_option from time import sleep from django.core.management.base import BaseCommand from corehq.apps.locations.models import LocationType, SQLLocation from corehq.apps.es ...
2ae6f4183b2096287f8155d7db7e2ed0444618c4
day_one_entry_splitter.py
day_one_entry_splitter.py
#!/usr/bin/env python # encoding: utf-8 """ day_one_entry_splitter.py Created by Rod Docking on 2017-01-01. All rights reserved. """ import sys def main(): """Split entries from Day One export into separate files""" # Entry headers look like: # "Date: February 14, 2005 at 9:00 AM" # Need to: # ...
Add first version of Day One entry splitter
Add first version of Day One entry splitter
Python
mit
rdocking/bits_and_bobs
Add first version of Day One entry splitter
#!/usr/bin/env python # encoding: utf-8 """ day_one_entry_splitter.py Created by Rod Docking on 2017-01-01. All rights reserved. """ import sys def main(): """Split entries from Day One export into separate files""" # Entry headers look like: # "Date: February 14, 2005 at 9:00 AM" # Need to: # ...
<commit_before><commit_msg>Add first version of Day One entry splitter<commit_after>
#!/usr/bin/env python # encoding: utf-8 """ day_one_entry_splitter.py Created by Rod Docking on 2017-01-01. All rights reserved. """ import sys def main(): """Split entries from Day One export into separate files""" # Entry headers look like: # "Date: February 14, 2005 at 9:00 AM" # Need to: # ...
Add first version of Day One entry splitter#!/usr/bin/env python # encoding: utf-8 """ day_one_entry_splitter.py Created by Rod Docking on 2017-01-01. All rights reserved. """ import sys def main(): """Split entries from Day One export into separate files""" # Entry headers look like: # "Date: February...
<commit_before><commit_msg>Add first version of Day One entry splitter<commit_after>#!/usr/bin/env python # encoding: utf-8 """ day_one_entry_splitter.py Created by Rod Docking on 2017-01-01. All rights reserved. """ import sys def main(): """Split entries from Day One export into separate files""" # Entry...
1b3d7078a4ca91ef07f90d1645f26761d1f7abac
examples/scatter.py
examples/scatter.py
""" Example of how `ax.scatter` can be used to plot linear data on a stereonet varying color and/or size by other variables. This also serves as a general example of how to convert orientation data into the coordinate system that the stereonet plot uses so that generic matplotlib plotting methods may be used. """ impo...
Add example of using lower-level plotting methods directly
Add example of using lower-level plotting methods directly
Python
mit
joferkington/mplstereonet
Add example of using lower-level plotting methods directly
""" Example of how `ax.scatter` can be used to plot linear data on a stereonet varying color and/or size by other variables. This also serves as a general example of how to convert orientation data into the coordinate system that the stereonet plot uses so that generic matplotlib plotting methods may be used. """ impo...
<commit_before><commit_msg>Add example of using lower-level plotting methods directly<commit_after>
""" Example of how `ax.scatter` can be used to plot linear data on a stereonet varying color and/or size by other variables. This also serves as a general example of how to convert orientation data into the coordinate system that the stereonet plot uses so that generic matplotlib plotting methods may be used. """ impo...
Add example of using lower-level plotting methods directly""" Example of how `ax.scatter` can be used to plot linear data on a stereonet varying color and/or size by other variables. This also serves as a general example of how to convert orientation data into the coordinate system that the stereonet plot uses so that...
<commit_before><commit_msg>Add example of using lower-level plotting methods directly<commit_after>""" Example of how `ax.scatter` can be used to plot linear data on a stereonet varying color and/or size by other variables. This also serves as a general example of how to convert orientation data into the coordinate sy...
5828823d505aae1425fd2353f898c5b18722e6e5
src/robotide/ui/progress.py
src/robotide/ui/progress.py
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # 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...
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # 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...
Introduce base class and ProgressObserver for renaming occurences.
progess: Introduce base class and ProgressObserver for renaming occurences.
Python
apache-2.0
caio2k/RIDE,fingeronthebutton/RIDE,fingeronthebutton/RIDE,robotframework/RIDE,robotframework/RIDE,robotframework/RIDE,HelioGuilherme66/RIDE,caio2k/RIDE,caio2k/RIDE,fingeronthebutton/RIDE,robotframework/RIDE,HelioGuilherme66/RIDE,HelioGuilherme66/RIDE,HelioGuilherme66/RIDE
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # 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...
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # 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...
<commit_before># Copyright 2008-2009 Nokia Siemens Networks Oyj # # 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...
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # 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...
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # 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...
<commit_before># Copyright 2008-2009 Nokia Siemens Networks Oyj # # 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...
2059aa7776a8e0c947b68e9401d74bdd146a59cd
ch03_04.py
ch03_04.py
(day, month, year) = input().split() day = int(day); month = int(month); year = int(year) if month < 3: month += 12 year -= 1 c = year / 100 k = year % 100 week_day = int( day + (26 * (month + 1) / 10) + k + ( k / 4 ) + ( c / 4 ) + ( 5 * c ) ) % 7 week_day_name = '' # 1. Follow from flowchart if 0 == week_...
Test passed for week day
Test passed for week day
Python
mit
sitdh/com-prog
Test passed for week day
(day, month, year) = input().split() day = int(day); month = int(month); year = int(year) if month < 3: month += 12 year -= 1 c = year / 100 k = year % 100 week_day = int( day + (26 * (month + 1) / 10) + k + ( k / 4 ) + ( c / 4 ) + ( 5 * c ) ) % 7 week_day_name = '' # 1. Follow from flowchart if 0 == week_...
<commit_before><commit_msg>Test passed for week day<commit_after>
(day, month, year) = input().split() day = int(day); month = int(month); year = int(year) if month < 3: month += 12 year -= 1 c = year / 100 k = year % 100 week_day = int( day + (26 * (month + 1) / 10) + k + ( k / 4 ) + ( c / 4 ) + ( 5 * c ) ) % 7 week_day_name = '' # 1. Follow from flowchart if 0 == week_...
Test passed for week day(day, month, year) = input().split() day = int(day); month = int(month); year = int(year) if month < 3: month += 12 year -= 1 c = year / 100 k = year % 100 week_day = int( day + (26 * (month + 1) / 10) + k + ( k / 4 ) + ( c / 4 ) + ( 5 * c ) ) % 7 week_day_name = '' # 1. Follow from...
<commit_before><commit_msg>Test passed for week day<commit_after>(day, month, year) = input().split() day = int(day); month = int(month); year = int(year) if month < 3: month += 12 year -= 1 c = year / 100 k = year % 100 week_day = int( day + (26 * (month + 1) / 10) + k + ( k / 4 ) + ( c / 4 ) + ( 5 * c ) ) ...
9f443a5af6537867712f12419d93a5b8c824858a
flexget/plugins/output/notify_osd.py
flexget/plugins/output/notify_osd.py
from __future__ import unicode_literals, division, absolute_import import logging from flexget.plugin import register_plugin, priority, DependencyError from flexget.utils.template import RenderError, render_from_task log = logging.getLogger('notify_osd') class OutputNotifyOsd(object): def validator(self): ...
Add Notify-osd option for linux based systems
Add Notify-osd option for linux based systems
Python
mit
jacobmetrick/Flexget,ratoaq2/Flexget,thalamus/Flexget,X-dark/Flexget,patsissons/Flexget,asm0dey/Flexget,LynxyssCZ/Flexget,jawilson/Flexget,tobinjt/Flexget,poulpito/Flexget,sean797/Flexget,thalamus/Flexget,OmgOhnoes/Flexget,camon/Flexget,gazpachoking/Flexget,tsnoam/Flexget,v17al/Flexget,vfrc2/Flexget,drwyrm/Flexget,tsno...
Add Notify-osd option for linux based systems
from __future__ import unicode_literals, division, absolute_import import logging from flexget.plugin import register_plugin, priority, DependencyError from flexget.utils.template import RenderError, render_from_task log = logging.getLogger('notify_osd') class OutputNotifyOsd(object): def validator(self): ...
<commit_before><commit_msg>Add Notify-osd option for linux based systems<commit_after>
from __future__ import unicode_literals, division, absolute_import import logging from flexget.plugin import register_plugin, priority, DependencyError from flexget.utils.template import RenderError, render_from_task log = logging.getLogger('notify_osd') class OutputNotifyOsd(object): def validator(self): ...
Add Notify-osd option for linux based systemsfrom __future__ import unicode_literals, division, absolute_import import logging from flexget.plugin import register_plugin, priority, DependencyError from flexget.utils.template import RenderError, render_from_task log = logging.getLogger('notify_osd') class OutputNoti...
<commit_before><commit_msg>Add Notify-osd option for linux based systems<commit_after>from __future__ import unicode_literals, division, absolute_import import logging from flexget.plugin import register_plugin, priority, DependencyError from flexget.utils.template import RenderError, render_from_task log = logging.g...
93b2d737407389a1c4dbc67836a949663eeba948
chrome/PRESUBMIT.py
chrome/PRESUBMIT.py
# Copyright (c) 2009 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. """Makes sure that the chrome/ code is cpplint clean.""" INCLUDE_CPP_FILES_ONLY = ( r'.*\.cc$', r'.*\.h$' ) EXCLUDE = ( # Objective C confuses ever...
Call the new presubmit checks from chrome/ code, with a blacklist.
Call the new presubmit checks from chrome/ code, with a blacklist. Review URL: http://codereview.chromium.org/400014 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@32190 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,Jo...
Call the new presubmit checks from chrome/ code, with a blacklist. Review URL: http://codereview.chromium.org/400014 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@32190 0039d316-1c4b-4281-b951-d872f2087c98
# Copyright (c) 2009 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. """Makes sure that the chrome/ code is cpplint clean.""" INCLUDE_CPP_FILES_ONLY = ( r'.*\.cc$', r'.*\.h$' ) EXCLUDE = ( # Objective C confuses ever...
<commit_before><commit_msg>Call the new presubmit checks from chrome/ code, with a blacklist. Review URL: http://codereview.chromium.org/400014 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@32190 0039d316-1c4b-4281-b951-d872f2087c98<commit_after>
# Copyright (c) 2009 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. """Makes sure that the chrome/ code is cpplint clean.""" INCLUDE_CPP_FILES_ONLY = ( r'.*\.cc$', r'.*\.h$' ) EXCLUDE = ( # Objective C confuses ever...
Call the new presubmit checks from chrome/ code, with a blacklist. Review URL: http://codereview.chromium.org/400014 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@32190 0039d316-1c4b-4281-b951-d872f2087c98# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a...
<commit_before><commit_msg>Call the new presubmit checks from chrome/ code, with a blacklist. Review URL: http://codereview.chromium.org/400014 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@32190 0039d316-1c4b-4281-b951-d872f2087c98<commit_after># Copyright (c) 2009 The Chromium Authors. All rights reserved. #...
9f46cf4836ad555a54dc9c47b8b2843643a878f2
migrations/versions/840_migrate_draft_dos1_briefs_to_draft_dos2.py
migrations/versions/840_migrate_draft_dos1_briefs_to_draft_dos2.py
"""Migrate draft DOS1 briefs to draft DOS2 briefs Revision ID: 840 Revises: 830 Create Date: 2017-02-07 15:31:50.715832 """ # revision identifiers, used by Alembic. revision = '840' down_revision = '830' from alembic import op def upgrade(): # Change framework of draft DOS1 briefs from DOS1 (framework_id == 5)...
Create migration for draft dos1 briefs to dos2
Create migration for draft dos1 briefs to dos2 When DOS1 is closed for brief submissions and DOS2 opened, any supplier who has a draft DOS1 brief will effectively lose it, as they'll be unable to publish it. This migration will move all draft DOS1 briefs to be draft DOS2 briefs, allowing them to be published. Which f...
Python
mit
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
Create migration for draft dos1 briefs to dos2 When DOS1 is closed for brief submissions and DOS2 opened, any supplier who has a draft DOS1 brief will effectively lose it, as they'll be unable to publish it. This migration will move all draft DOS1 briefs to be draft DOS2 briefs, allowing them to be published. Which f...
"""Migrate draft DOS1 briefs to draft DOS2 briefs Revision ID: 840 Revises: 830 Create Date: 2017-02-07 15:31:50.715832 """ # revision identifiers, used by Alembic. revision = '840' down_revision = '830' from alembic import op def upgrade(): # Change framework of draft DOS1 briefs from DOS1 (framework_id == 5)...
<commit_before><commit_msg>Create migration for draft dos1 briefs to dos2 When DOS1 is closed for brief submissions and DOS2 opened, any supplier who has a draft DOS1 brief will effectively lose it, as they'll be unable to publish it. This migration will move all draft DOS1 briefs to be draft DOS2 briefs, allowing th...
"""Migrate draft DOS1 briefs to draft DOS2 briefs Revision ID: 840 Revises: 830 Create Date: 2017-02-07 15:31:50.715832 """ # revision identifiers, used by Alembic. revision = '840' down_revision = '830' from alembic import op def upgrade(): # Change framework of draft DOS1 briefs from DOS1 (framework_id == 5)...
Create migration for draft dos1 briefs to dos2 When DOS1 is closed for brief submissions and DOS2 opened, any supplier who has a draft DOS1 brief will effectively lose it, as they'll be unable to publish it. This migration will move all draft DOS1 briefs to be draft DOS2 briefs, allowing them to be published. Which f...
<commit_before><commit_msg>Create migration for draft dos1 briefs to dos2 When DOS1 is closed for brief submissions and DOS2 opened, any supplier who has a draft DOS1 brief will effectively lose it, as they'll be unable to publish it. This migration will move all draft DOS1 briefs to be draft DOS2 briefs, allowing th...
d24e8c746359169058e9c0577c2f843695ca3b55
heat/tests/functional/test_WordPress_2_Instances_With_EBS.py
heat/tests/functional/test_WordPress_2_Instances_With_EBS.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
Add 2 instance with EBS test.
Add 2 instance with EBS test. Seems to work even. Change-Id: Ie09d97dc86a68525783f1f9c080fed13e651ef78 Signed-off-by: Ian Main <87edab3227c32093d388ed00258c1a5e63cfd715@redhat.com>
Python
apache-2.0
citrix-openstack-build/heat,JioCloud/heat,dragorosson/heat,rh-s/heat,rickerc/heat_audit,noironetworks/heat,pshchelo/heat,jasondunsmore/heat,rh-s/heat,NeCTAR-RC/heat,cwolferh/heat-scratch,cryptickp/heat,miguelgrinberg/heat,varunarya10/heat,pratikmallya/heat,takeshineshiro/heat,ntt-sic/heat,pratikmallya/heat,redhat-opens...
Add 2 instance with EBS test. Seems to work even. Change-Id: Ie09d97dc86a68525783f1f9c080fed13e651ef78 Signed-off-by: Ian Main <87edab3227c32093d388ed00258c1a5e63cfd715@redhat.com>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
<commit_before><commit_msg>Add 2 instance with EBS test. Seems to work even. Change-Id: Ie09d97dc86a68525783f1f9c080fed13e651ef78 Signed-off-by: Ian Main <87edab3227c32093d388ed00258c1a5e63cfd715@redhat.com><commit_after>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
Add 2 instance with EBS test. Seems to work even. Change-Id: Ie09d97dc86a68525783f1f9c080fed13e651ef78 Signed-off-by: Ian Main <87edab3227c32093d388ed00258c1a5e63cfd715@redhat.com># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use th...
<commit_before><commit_msg>Add 2 instance with EBS test. Seems to work even. Change-Id: Ie09d97dc86a68525783f1f9c080fed13e651ef78 Signed-off-by: Ian Main <87edab3227c32093d388ed00258c1a5e63cfd715@redhat.com><commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0...
673dac79cbab6de0be5650d46840a3bc9858b2b4
tests/clear_qiniu_bucket.py
tests/clear_qiniu_bucket.py
import os from qiniu import Auth, BucketManager QINIU_ACCESS_KEY = os.environ.get('QINIU_ACCESS_KEY') QINIU_SECRET_KEY = os.environ.get('QINIU_SECRET_KEY') QINIU_BUCKET_NAME = os.environ.get('QINIU_BUCKET_NAME') QINIU_BUCKET_DOMAIN = os.environ.get('QINIU_BUCKET_DOMAIN') def main(): auth = Auth(QINIU_ACCESS_KEY...
Add a help script to clear the test bucket
Add a help script to clear the test bucket
Python
mit
glasslion/django-qiniu-storage,jeffrey4l/django-qiniu-storage,Mark-Shine/django-qiniu-storage,jackeyGao/django-qiniu-storage
Add a help script to clear the test bucket
import os from qiniu import Auth, BucketManager QINIU_ACCESS_KEY = os.environ.get('QINIU_ACCESS_KEY') QINIU_SECRET_KEY = os.environ.get('QINIU_SECRET_KEY') QINIU_BUCKET_NAME = os.environ.get('QINIU_BUCKET_NAME') QINIU_BUCKET_DOMAIN = os.environ.get('QINIU_BUCKET_DOMAIN') def main(): auth = Auth(QINIU_ACCESS_KEY...
<commit_before><commit_msg>Add a help script to clear the test bucket<commit_after>
import os from qiniu import Auth, BucketManager QINIU_ACCESS_KEY = os.environ.get('QINIU_ACCESS_KEY') QINIU_SECRET_KEY = os.environ.get('QINIU_SECRET_KEY') QINIU_BUCKET_NAME = os.environ.get('QINIU_BUCKET_NAME') QINIU_BUCKET_DOMAIN = os.environ.get('QINIU_BUCKET_DOMAIN') def main(): auth = Auth(QINIU_ACCESS_KEY...
Add a help script to clear the test bucketimport os from qiniu import Auth, BucketManager QINIU_ACCESS_KEY = os.environ.get('QINIU_ACCESS_KEY') QINIU_SECRET_KEY = os.environ.get('QINIU_SECRET_KEY') QINIU_BUCKET_NAME = os.environ.get('QINIU_BUCKET_NAME') QINIU_BUCKET_DOMAIN = os.environ.get('QINIU_BUCKET_DOMAIN') de...
<commit_before><commit_msg>Add a help script to clear the test bucket<commit_after>import os from qiniu import Auth, BucketManager QINIU_ACCESS_KEY = os.environ.get('QINIU_ACCESS_KEY') QINIU_SECRET_KEY = os.environ.get('QINIU_SECRET_KEY') QINIU_BUCKET_NAME = os.environ.get('QINIU_BUCKET_NAME') QINIU_BUCKET_DOMAIN = o...
666d9c467806782827edac4b2c0c13d494e41250
jobmon/test/test_status_server.py
jobmon/test/test_status_server.py
import os import select import socket import time import unittest from jobmon.protocol import * from jobmon import protocol, status_server, transport PORT = 9999 class StatusRecorder: def __init__(self): self.records = [] def process_start(self, job): self.records.append(('started', job)) ...
Add a test for the status server
Add a test for the status server
Python
bsd-2-clause
adamnew123456/jobmon
Add a test for the status server
import os import select import socket import time import unittest from jobmon.protocol import * from jobmon import protocol, status_server, transport PORT = 9999 class StatusRecorder: def __init__(self): self.records = [] def process_start(self, job): self.records.append(('started', job)) ...
<commit_before><commit_msg>Add a test for the status server<commit_after>
import os import select import socket import time import unittest from jobmon.protocol import * from jobmon import protocol, status_server, transport PORT = 9999 class StatusRecorder: def __init__(self): self.records = [] def process_start(self, job): self.records.append(('started', job)) ...
Add a test for the status serverimport os import select import socket import time import unittest from jobmon.protocol import * from jobmon import protocol, status_server, transport PORT = 9999 class StatusRecorder: def __init__(self): self.records = [] def process_start(self, job): self.rec...
<commit_before><commit_msg>Add a test for the status server<commit_after>import os import select import socket import time import unittest from jobmon.protocol import * from jobmon import protocol, status_server, transport PORT = 9999 class StatusRecorder: def __init__(self): self.records = [] def p...
45b0e958aa377afed2c62bf1e6f7c4933ccde39b
test/test_main.py
test/test_main.py
from git_lang_guesser import main from git_lang_guesser import git_requester LANGUAGE = "language" test_username = "TestUser" example_data = [ {LANGUAGE: "HTML"}, {LANGUAGE: "Java"}, {LANGUAGE: "Python"}, {LANGUAGE: "Python"}, {LANGUAGE: "C"}, ] expected_count = { "HTML": 1, "Java": 1, ...
Add a test for main
Add a test for main More to follow
Python
mit
robbie-c/git-lang-guesser
Add a test for main More to follow
from git_lang_guesser import main from git_lang_guesser import git_requester LANGUAGE = "language" test_username = "TestUser" example_data = [ {LANGUAGE: "HTML"}, {LANGUAGE: "Java"}, {LANGUAGE: "Python"}, {LANGUAGE: "Python"}, {LANGUAGE: "C"}, ] expected_count = { "HTML": 1, "Java": 1, ...
<commit_before><commit_msg>Add a test for main More to follow<commit_after>
from git_lang_guesser import main from git_lang_guesser import git_requester LANGUAGE = "language" test_username = "TestUser" example_data = [ {LANGUAGE: "HTML"}, {LANGUAGE: "Java"}, {LANGUAGE: "Python"}, {LANGUAGE: "Python"}, {LANGUAGE: "C"}, ] expected_count = { "HTML": 1, "Java": 1, ...
Add a test for main More to followfrom git_lang_guesser import main from git_lang_guesser import git_requester LANGUAGE = "language" test_username = "TestUser" example_data = [ {LANGUAGE: "HTML"}, {LANGUAGE: "Java"}, {LANGUAGE: "Python"}, {LANGUAGE: "Python"}, {LANGUAGE: "C"}, ] expected_count =...
<commit_before><commit_msg>Add a test for main More to follow<commit_after>from git_lang_guesser import main from git_lang_guesser import git_requester LANGUAGE = "language" test_username = "TestUser" example_data = [ {LANGUAGE: "HTML"}, {LANGUAGE: "Java"}, {LANGUAGE: "Python"}, {LANGUAGE: "Python"}...
092bf8bc2e558420ca51384a3dd1019ab1115ad2
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from djangocms_link import __version__ INSTALL_REQUIRES = [ #'Django-Select2', ] CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience ::...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from djangocms_link import __version__ CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: B...
Fix conditional dependencies when using wheels
Fix conditional dependencies when using wheels see also: https://github.com/nephila/djangocms-blog/pull/80
Python
bsd-3-clause
grigno/djangocms-link,brente/djangocms-link,addgene/djangocms-link,garmoncheg/djangocms-link,yakky/djangocms-link,yakky/djangocms-link,brente/djangocms-link,addgene/djangocms-link,grigno/djangocms-link,garmoncheg/djangocms-link
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from djangocms_link import __version__ INSTALL_REQUIRES = [ #'Django-Select2', ] CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience ::...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from djangocms_link import __version__ CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: B...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from djangocms_link import __version__ INSTALL_REQUIRES = [ #'Django-Select2', ] CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Inten...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from djangocms_link import __version__ CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: B...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from djangocms_link import __version__ INSTALL_REQUIRES = [ #'Django-Select2', ] CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience ::...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from djangocms_link import __version__ INSTALL_REQUIRES = [ #'Django-Select2', ] CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Inten...
b418ff779c79afd0eca85ed1479ba633f25ce73c
nova/tests/test_vmwareapi_vm_util.py
nova/tests/test_vmwareapi_vm_util.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Canonical Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.or...
Fix variable referenced before assginment in vmwareapi code.
Fix variable referenced before assginment in vmwareapi code. Add unitests for VMwareapi vm_util. fix bug #1177689 Change-Id: If16109ee626c197227affba122c2e4986d92d2df
Python
apache-2.0
n0ano/ganttclient
Fix variable referenced before assginment in vmwareapi code. Add unitests for VMwareapi vm_util. fix bug #1177689 Change-Id: If16109ee626c197227affba122c2e4986d92d2df
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Canonical Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.or...
<commit_before><commit_msg>Fix variable referenced before assginment in vmwareapi code. Add unitests for VMwareapi vm_util. fix bug #1177689 Change-Id: If16109ee626c197227affba122c2e4986d92d2df<commit_after>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Canonical Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.or...
Fix variable referenced before assginment in vmwareapi code. Add unitests for VMwareapi vm_util. fix bug #1177689 Change-Id: If16109ee626c197227affba122c2e4986d92d2df# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Canonical Corp. # All Rights Reserved. # # Licensed under the Apache License, Version ...
<commit_before><commit_msg>Fix variable referenced before assginment in vmwareapi code. Add unitests for VMwareapi vm_util. fix bug #1177689 Change-Id: If16109ee626c197227affba122c2e4986d92d2df<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Canonical Corp. # All Rights Reserved. # # Li...
51e516f260858e699ee828ac6fc91af39c67254c
update-schemas.py
update-schemas.py
#!/usr/bin/env python import os import re import sys import subprocess as sp def get_schemas(pattern): cmd = ['git', 'grep', '--name-only'] output = sp.check_output(cmd + [pattern, '--', 'schemas']).decode('utf8') names = output.split() print(names) dedupe = dict() for name in names: ...
Add script for automatically updating schemas
Add script for automatically updating schemas
Python
bsd-3-clause
spacetelescope/asdf-standard
Add script for automatically updating schemas
#!/usr/bin/env python import os import re import sys import subprocess as sp def get_schemas(pattern): cmd = ['git', 'grep', '--name-only'] output = sp.check_output(cmd + [pattern, '--', 'schemas']).decode('utf8') names = output.split() print(names) dedupe = dict() for name in names: ...
<commit_before><commit_msg>Add script for automatically updating schemas<commit_after>
#!/usr/bin/env python import os import re import sys import subprocess as sp def get_schemas(pattern): cmd = ['git', 'grep', '--name-only'] output = sp.check_output(cmd + [pattern, '--', 'schemas']).decode('utf8') names = output.split() print(names) dedupe = dict() for name in names: ...
Add script for automatically updating schemas#!/usr/bin/env python import os import re import sys import subprocess as sp def get_schemas(pattern): cmd = ['git', 'grep', '--name-only'] output = sp.check_output(cmd + [pattern, '--', 'schemas']).decode('utf8') names = output.split() print(names) ...
<commit_before><commit_msg>Add script for automatically updating schemas<commit_after>#!/usr/bin/env python import os import re import sys import subprocess as sp def get_schemas(pattern): cmd = ['git', 'grep', '--name-only'] output = sp.check_output(cmd + [pattern, '--', 'schemas']).decode('utf8') name...
e1993d4d3c3199dce2be2b475a9236e95732a0f0
dodge.py
dodge.py
import platform class OSXDodger(object): allowed_version = "10.12.1" def __init__(self, applications_dir): self.app_dir = applications_dir def load_applications(self): """ Read all applications in the `/Applications/` dir """ pass def select_applications(self...
Verify computer executing the script is of OS X 10.6.1 or higher type
Verify computer executing the script is of OS X 10.6.1 or higher type
Python
mit
yoda-yoda/osx-dock-dodger,denisKaranja/osx-dock-dodger
Verify computer executing the script is of OS X 10.6.1 or higher type
import platform class OSXDodger(object): allowed_version = "10.12.1" def __init__(self, applications_dir): self.app_dir = applications_dir def load_applications(self): """ Read all applications in the `/Applications/` dir """ pass def select_applications(self...
<commit_before><commit_msg>Verify computer executing the script is of OS X 10.6.1 or higher type<commit_after>
import platform class OSXDodger(object): allowed_version = "10.12.1" def __init__(self, applications_dir): self.app_dir = applications_dir def load_applications(self): """ Read all applications in the `/Applications/` dir """ pass def select_applications(self...
Verify computer executing the script is of OS X 10.6.1 or higher typeimport platform class OSXDodger(object): allowed_version = "10.12.1" def __init__(self, applications_dir): self.app_dir = applications_dir def load_applications(self): """ Read all applications in the `/Applicat...
<commit_before><commit_msg>Verify computer executing the script is of OS X 10.6.1 or higher type<commit_after>import platform class OSXDodger(object): allowed_version = "10.12.1" def __init__(self, applications_dir): self.app_dir = applications_dir def load_applications(self): """ ...
ef8b909beb4de8435c20ed0b45bca9478d476ed8
geocode.py
geocode.py
#! /bin/python3 import csv import time from geopy.geocoders.googlev3 import GoogleV3 geocoder = GoogleV3(api_key="AIzaSyAy6XiyZG-6u99q-qacOz-dtT9ILbYzb-4") with open("../ReadingBusesOrig.csv") as cf: with open("../out.csv", "a") as cw: reader = csv.DictReader(cf) writer = csv.DictWriter(cw, ["lati...
Add python script to get coordinates from the csv
Add python script to get coordinates from the csv
Python
mit
awensaunders/BuSHAX0rZ,awensaunders/BuSHAX0rZ,awensaunders/BuSHAX0rZ
Add python script to get coordinates from the csv
#! /bin/python3 import csv import time from geopy.geocoders.googlev3 import GoogleV3 geocoder = GoogleV3(api_key="AIzaSyAy6XiyZG-6u99q-qacOz-dtT9ILbYzb-4") with open("../ReadingBusesOrig.csv") as cf: with open("../out.csv", "a") as cw: reader = csv.DictReader(cf) writer = csv.DictWriter(cw, ["lati...
<commit_before><commit_msg>Add python script to get coordinates from the csv<commit_after>
#! /bin/python3 import csv import time from geopy.geocoders.googlev3 import GoogleV3 geocoder = GoogleV3(api_key="AIzaSyAy6XiyZG-6u99q-qacOz-dtT9ILbYzb-4") with open("../ReadingBusesOrig.csv") as cf: with open("../out.csv", "a") as cw: reader = csv.DictReader(cf) writer = csv.DictWriter(cw, ["lati...
Add python script to get coordinates from the csv#! /bin/python3 import csv import time from geopy.geocoders.googlev3 import GoogleV3 geocoder = GoogleV3(api_key="AIzaSyAy6XiyZG-6u99q-qacOz-dtT9ILbYzb-4") with open("../ReadingBusesOrig.csv") as cf: with open("../out.csv", "a") as cw: reader = csv.DictRead...
<commit_before><commit_msg>Add python script to get coordinates from the csv<commit_after>#! /bin/python3 import csv import time from geopy.geocoders.googlev3 import GoogleV3 geocoder = GoogleV3(api_key="AIzaSyAy6XiyZG-6u99q-qacOz-dtT9ILbYzb-4") with open("../ReadingBusesOrig.csv") as cf: with open("../out.csv", ...
68e5bdc3c3a8a59f820ea15e706e85e14f2a654b
corehq/apps/locations/management/commands/fix_loc_type_reference.py
corehq/apps/locations/management/commands/fix_loc_type_reference.py
from optparse import make_option from django.core.management.base import BaseCommand from corehq.apps.locations.models import SQLLocation, LocationType class Command(BaseCommand): help = "Make " option_list = ( make_option('--dry_run', action='store_true', dest='dry_run', ...
Add mgmt cmd to fix bad loc-type references
Add mgmt cmd to fix bad loc-type references
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add mgmt cmd to fix bad loc-type references
from optparse import make_option from django.core.management.base import BaseCommand from corehq.apps.locations.models import SQLLocation, LocationType class Command(BaseCommand): help = "Make " option_list = ( make_option('--dry_run', action='store_true', dest='dry_run', ...
<commit_before><commit_msg>Add mgmt cmd to fix bad loc-type references<commit_after>
from optparse import make_option from django.core.management.base import BaseCommand from corehq.apps.locations.models import SQLLocation, LocationType class Command(BaseCommand): help = "Make " option_list = ( make_option('--dry_run', action='store_true', dest='dry_run', ...
Add mgmt cmd to fix bad loc-type referencesfrom optparse import make_option from django.core.management.base import BaseCommand from corehq.apps.locations.models import SQLLocation, LocationType class Command(BaseCommand): help = "Make " option_list = ( make_option('--dry_run', action='...
<commit_before><commit_msg>Add mgmt cmd to fix bad loc-type references<commit_after>from optparse import make_option from django.core.management.base import BaseCommand from corehq.apps.locations.models import SQLLocation, LocationType class Command(BaseCommand): help = "Make " option_list = ( make...
bf6cfcaa1ac20c1cb65d2d803f64f35026c099f3
event.py
event.py
class Event: def __init__(self): self.listeners = [] def connect(self, listener): self.listeners.append(listener) def fire(self, *args, **kwargs): for listener in self.listeners: listener(*args, **kwargs)
Add Event class as well as connect and fire methods.
Add Event class as well as connect and fire methods.
Python
mit
bsmukasa/stock_alerter
Add Event class as well as connect and fire methods.
class Event: def __init__(self): self.listeners = [] def connect(self, listener): self.listeners.append(listener) def fire(self, *args, **kwargs): for listener in self.listeners: listener(*args, **kwargs)
<commit_before><commit_msg>Add Event class as well as connect and fire methods.<commit_after>
class Event: def __init__(self): self.listeners = [] def connect(self, listener): self.listeners.append(listener) def fire(self, *args, **kwargs): for listener in self.listeners: listener(*args, **kwargs)
Add Event class as well as connect and fire methods.class Event: def __init__(self): self.listeners = [] def connect(self, listener): self.listeners.append(listener) def fire(self, *args, **kwargs): for listener in self.listeners: listener(*args, **kwargs)
<commit_before><commit_msg>Add Event class as well as connect and fire methods.<commit_after>class Event: def __init__(self): self.listeners = [] def connect(self, listener): self.listeners.append(listener) def fire(self, *args, **kwargs): for listener in self.listeners: ...
8d38a72548f3bfc62bac9f49d537fa2cdee7a6df
face1.py
face1.py
"""Sequential, vanilla face detection.""" import datetime import sys import cv2 import numpy as np import util import cascade DEVICE = int(sys.argv[1]) WIDTH = int(sys.argv[2]) HEIGHT = int(sys.argv[3]) DURATION = float(sys.argv[4]) # In seconds. # Create the OpenCV video capture object. cap = cv2.VideoCapt...
Add vanilla sequential face detection example.
Add vanilla sequential face detection example.
Python
mit
vmlaker/sherlock
Add vanilla sequential face detection example.
"""Sequential, vanilla face detection.""" import datetime import sys import cv2 import numpy as np import util import cascade DEVICE = int(sys.argv[1]) WIDTH = int(sys.argv[2]) HEIGHT = int(sys.argv[3]) DURATION = float(sys.argv[4]) # In seconds. # Create the OpenCV video capture object. cap = cv2.VideoCapt...
<commit_before><commit_msg>Add vanilla sequential face detection example.<commit_after>
"""Sequential, vanilla face detection.""" import datetime import sys import cv2 import numpy as np import util import cascade DEVICE = int(sys.argv[1]) WIDTH = int(sys.argv[2]) HEIGHT = int(sys.argv[3]) DURATION = float(sys.argv[4]) # In seconds. # Create the OpenCV video capture object. cap = cv2.VideoCapt...
Add vanilla sequential face detection example."""Sequential, vanilla face detection.""" import datetime import sys import cv2 import numpy as np import util import cascade DEVICE = int(sys.argv[1]) WIDTH = int(sys.argv[2]) HEIGHT = int(sys.argv[3]) DURATION = float(sys.argv[4]) # In seconds. # Create the Op...
<commit_before><commit_msg>Add vanilla sequential face detection example.<commit_after>"""Sequential, vanilla face detection.""" import datetime import sys import cv2 import numpy as np import util import cascade DEVICE = int(sys.argv[1]) WIDTH = int(sys.argv[2]) HEIGHT = int(sys.argv[3]) DURATION = float(sys...
6988dab0256ce6b6e0d5cbb4b3ac06727956ee37
emission/analysis/point_features.py
emission/analysis/point_features.py
# Standard imports import math import logging import numpy as np import emission.core.common as ec def calSpeed(point1, point2): distanceDelta = ec.calDistance([point1.mLongitude, point1.mLatitude], [point2.mLongitude, point2.mLatitude]) timeDelta = point2.mTime - point1.mTime # print "Distance delta = %s ...
Create a new file to calculate features from sets of points
Create a new file to calculate features from sets of points
Python
bsd-3-clause
shankari/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,yw374cornell/e-mission-server,joshzarrabi/e-mission-server,joshzarrabi/e-mission-server,shankari/e-mission-server,yw374cornell/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,yw374cornell/e-mi...
Create a new file to calculate features from sets of points
# Standard imports import math import logging import numpy as np import emission.core.common as ec def calSpeed(point1, point2): distanceDelta = ec.calDistance([point1.mLongitude, point1.mLatitude], [point2.mLongitude, point2.mLatitude]) timeDelta = point2.mTime - point1.mTime # print "Distance delta = %s ...
<commit_before><commit_msg>Create a new file to calculate features from sets of points<commit_after>
# Standard imports import math import logging import numpy as np import emission.core.common as ec def calSpeed(point1, point2): distanceDelta = ec.calDistance([point1.mLongitude, point1.mLatitude], [point2.mLongitude, point2.mLatitude]) timeDelta = point2.mTime - point1.mTime # print "Distance delta = %s ...
Create a new file to calculate features from sets of points# Standard imports import math import logging import numpy as np import emission.core.common as ec def calSpeed(point1, point2): distanceDelta = ec.calDistance([point1.mLongitude, point1.mLatitude], [point2.mLongitude, point2.mLatitude]) timeDelta = po...
<commit_before><commit_msg>Create a new file to calculate features from sets of points<commit_after># Standard imports import math import logging import numpy as np import emission.core.common as ec def calSpeed(point1, point2): distanceDelta = ec.calDistance([point1.mLongitude, point1.mLatitude], [point2.mLongitu...
a11d33f5e1df23f044cac709ebbbb5d369d0e6ca
tests/test_add_language/test_update_language_list.py
tests/test_add_language/test_update_language_list.py
# test_update_language_list from __future__ import unicode_literals import json import os import os.path import nose.tools as nose import yvs.shared as yvs import utilities.add_language as add_lang from tests.test_add_language import set_up, tear_down from tests.test_add_language.decorators import redirect_stdout ...
Add first test for update_language_list function
Add first test for update_language_list function
Python
mit
caleb531/youversion-suggest,caleb531/youversion-suggest
Add first test for update_language_list function
# test_update_language_list from __future__ import unicode_literals import json import os import os.path import nose.tools as nose import yvs.shared as yvs import utilities.add_language as add_lang from tests.test_add_language import set_up, tear_down from tests.test_add_language.decorators import redirect_stdout ...
<commit_before><commit_msg>Add first test for update_language_list function<commit_after>
# test_update_language_list from __future__ import unicode_literals import json import os import os.path import nose.tools as nose import yvs.shared as yvs import utilities.add_language as add_lang from tests.test_add_language import set_up, tear_down from tests.test_add_language.decorators import redirect_stdout ...
Add first test for update_language_list function# test_update_language_list from __future__ import unicode_literals import json import os import os.path import nose.tools as nose import yvs.shared as yvs import utilities.add_language as add_lang from tests.test_add_language import set_up, tear_down from tests.test_...
<commit_before><commit_msg>Add first test for update_language_list function<commit_after># test_update_language_list from __future__ import unicode_literals import json import os import os.path import nose.tools as nose import yvs.shared as yvs import utilities.add_language as add_lang from tests.test_add_language ...
bd5fc565c5106d609a7dc65a663515920e29caa4
altair/vegalite/v2/examples/multiple_marks.py
altair/vegalite/v2/examples/multiple_marks.py
""" Multiple Marks ============== This example demonstrates creating a single chart with multiple markers representing the same data. """ import altair as alt from vega_datasets import data stocks = data.stocks() chart = alt.LayerChart(stocks).encode( x='date:T', y='price:Q', color='symbol:N' ).add_layers...
Add example of multi-layer chart
Add example of multi-layer chart
Python
bsd-3-clause
jakevdp/altair,altair-viz/altair,ellisonbg/altair
Add example of multi-layer chart
""" Multiple Marks ============== This example demonstrates creating a single chart with multiple markers representing the same data. """ import altair as alt from vega_datasets import data stocks = data.stocks() chart = alt.LayerChart(stocks).encode( x='date:T', y='price:Q', color='symbol:N' ).add_layers...
<commit_before><commit_msg>Add example of multi-layer chart<commit_after>
""" Multiple Marks ============== This example demonstrates creating a single chart with multiple markers representing the same data. """ import altair as alt from vega_datasets import data stocks = data.stocks() chart = alt.LayerChart(stocks).encode( x='date:T', y='price:Q', color='symbol:N' ).add_layers...
Add example of multi-layer chart""" Multiple Marks ============== This example demonstrates creating a single chart with multiple markers representing the same data. """ import altair as alt from vega_datasets import data stocks = data.stocks() chart = alt.LayerChart(stocks).encode( x='date:T', y='price:Q', ...
<commit_before><commit_msg>Add example of multi-layer chart<commit_after>""" Multiple Marks ============== This example demonstrates creating a single chart with multiple markers representing the same data. """ import altair as alt from vega_datasets import data stocks = data.stocks() chart = alt.LayerChart(stocks).e...
e7c6a1d5ca6c6ebd85976698e8c00ca761747b59
apps/simple_compiler.py
apps/simple_compiler.py
from apps.decorators import on_command from apps.slackutils import cat_token from subprocess import check_output, CalledProcessError, STDOUT import os import re @on_command(['!์ปดํŒŒ์ผ']) def run(robot, channel, tokens, user, command): '''C, C++, Python ์†Œ์Šค ์‹คํ–‰์‹œ์ผœ๋“œ๋ฆผ''' msg = '' if len(tokens) < 2: return ...
ADD FEATURE : simple C/C++ compiler
ADD FEATURE : simple C/C++ compiler
Python
mit
dgu-dna/DNA-Bot
ADD FEATURE : simple C/C++ compiler
from apps.decorators import on_command from apps.slackutils import cat_token from subprocess import check_output, CalledProcessError, STDOUT import os import re @on_command(['!์ปดํŒŒ์ผ']) def run(robot, channel, tokens, user, command): '''C, C++, Python ์†Œ์Šค ์‹คํ–‰์‹œ์ผœ๋“œ๋ฆผ''' msg = '' if len(tokens) < 2: return ...
<commit_before><commit_msg>ADD FEATURE : simple C/C++ compiler<commit_after>
from apps.decorators import on_command from apps.slackutils import cat_token from subprocess import check_output, CalledProcessError, STDOUT import os import re @on_command(['!์ปดํŒŒ์ผ']) def run(robot, channel, tokens, user, command): '''C, C++, Python ์†Œ์Šค ์‹คํ–‰์‹œ์ผœ๋“œ๋ฆผ''' msg = '' if len(tokens) < 2: return ...
ADD FEATURE : simple C/C++ compilerfrom apps.decorators import on_command from apps.slackutils import cat_token from subprocess import check_output, CalledProcessError, STDOUT import os import re @on_command(['!์ปดํŒŒ์ผ']) def run(robot, channel, tokens, user, command): '''C, C++, Python ์†Œ์Šค ์‹คํ–‰์‹œ์ผœ๋“œ๋ฆผ''' msg = '' ...
<commit_before><commit_msg>ADD FEATURE : simple C/C++ compiler<commit_after>from apps.decorators import on_command from apps.slackutils import cat_token from subprocess import check_output, CalledProcessError, STDOUT import os import re @on_command(['!์ปดํŒŒ์ผ']) def run(robot, channel, tokens, user, command): '''C, C...
852ecb67e11f4ad9662c832d8be5f5bf1b8327b1
pyface/action/tests/test_group.py
pyface/action/tests/test_group.py
from __future__ import absolute_import from traits.testing.unittest_tools import UnittestTools, unittest from ...image_cache import ImageCache from ...window import Window from ..action import Action from ..action_item import ActionItem from ..group import Group class TestActionItem(unittest.TestCase, UnittestTools...
Add tests for action groups.
Add tests for action groups.
Python
bsd-3-clause
geggo/pyface,brett-patterson/pyface,geggo/pyface
Add tests for action groups.
from __future__ import absolute_import from traits.testing.unittest_tools import UnittestTools, unittest from ...image_cache import ImageCache from ...window import Window from ..action import Action from ..action_item import ActionItem from ..group import Group class TestActionItem(unittest.TestCase, UnittestTools...
<commit_before><commit_msg>Add tests for action groups.<commit_after>
from __future__ import absolute_import from traits.testing.unittest_tools import UnittestTools, unittest from ...image_cache import ImageCache from ...window import Window from ..action import Action from ..action_item import ActionItem from ..group import Group class TestActionItem(unittest.TestCase, UnittestTools...
Add tests for action groups.from __future__ import absolute_import from traits.testing.unittest_tools import UnittestTools, unittest from ...image_cache import ImageCache from ...window import Window from ..action import Action from ..action_item import ActionItem from ..group import Group class TestActionItem(unit...
<commit_before><commit_msg>Add tests for action groups.<commit_after>from __future__ import absolute_import from traits.testing.unittest_tools import UnittestTools, unittest from ...image_cache import ImageCache from ...window import Window from ..action import Action from ..action_item import ActionItem from ..group...
76f636d38d6f3947efe6d58eacbd655027fc1a0e
hooks/post_gen_project.py
hooks/post_gen_project.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os # Use symlink to handle the difference between project name and role name. os.symlink('../../{{ cookiecutter.role_project_name }}', 'roles/{{ cookiecutter.role_name }}')
Add post-hook to handle the difference between project name and role name.
Add post-hook to handle the difference between project name and role name.
Python
mit
FGtatsuro/cookiecutter-ansible-role,FGtatsuro/cookiecutter-ansible-role
Add post-hook to handle the difference between project name and role name.
#!/usr/bin/env python # -*- coding: utf-8 -*- import os # Use symlink to handle the difference between project name and role name. os.symlink('../../{{ cookiecutter.role_project_name }}', 'roles/{{ cookiecutter.role_name }}')
<commit_before><commit_msg>Add post-hook to handle the difference between project name and role name.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- import os # Use symlink to handle the difference between project name and role name. os.symlink('../../{{ cookiecutter.role_project_name }}', 'roles/{{ cookiecutter.role_name }}')
Add post-hook to handle the difference between project name and role name.#!/usr/bin/env python # -*- coding: utf-8 -*- import os # Use symlink to handle the difference between project name and role name. os.symlink('../../{{ cookiecutter.role_project_name }}', 'roles/{{ cookiecutter.role_name }}')
<commit_before><commit_msg>Add post-hook to handle the difference between project name and role name.<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- import os # Use symlink to handle the difference between project name and role name. os.symlink('../../{{ cookiecutter.role_project_name }}', 'roles/{{ cooki...
1ace5845055050c0ac3d9e14a5f76ad78f6778bf
python/calc_fuel_pitch_fraction.py
python/calc_fuel_pitch_fraction.py
import sympy as sp import sys def calc_spacing(R, n): x = sp.symbols('x') Af = 0 Am = 0 for m in range(2*n - 1): if m % 2 == 0: Af += sp.pi * (R/n * (m/2 + x))**2 if m % 2 == 1: Af -= sp.pi * (R/n * (m+1)/2)**2 for m in range(2*n): if m % 2 == 0: ...
Add python script for calculating fuel pitch fraction.
Add python script for calculating fuel pitch fraction.
Python
lgpl-2.1
gridley/moltres,arfc/moltres,arfc/moltres,arfc/moltres,arfc/moltres,lindsayad/moltres,lindsayad/moltres,lindsayad/moltres,lindsayad/moltres,gridley/moltres,gridley/moltres,gridley/moltres
Add python script for calculating fuel pitch fraction.
import sympy as sp import sys def calc_spacing(R, n): x = sp.symbols('x') Af = 0 Am = 0 for m in range(2*n - 1): if m % 2 == 0: Af += sp.pi * (R/n * (m/2 + x))**2 if m % 2 == 1: Af -= sp.pi * (R/n * (m+1)/2)**2 for m in range(2*n): if m % 2 == 0: ...
<commit_before><commit_msg>Add python script for calculating fuel pitch fraction.<commit_after>
import sympy as sp import sys def calc_spacing(R, n): x = sp.symbols('x') Af = 0 Am = 0 for m in range(2*n - 1): if m % 2 == 0: Af += sp.pi * (R/n * (m/2 + x))**2 if m % 2 == 1: Af -= sp.pi * (R/n * (m+1)/2)**2 for m in range(2*n): if m % 2 == 0: ...
Add python script for calculating fuel pitch fraction.import sympy as sp import sys def calc_spacing(R, n): x = sp.symbols('x') Af = 0 Am = 0 for m in range(2*n - 1): if m % 2 == 0: Af += sp.pi * (R/n * (m/2 + x))**2 if m % 2 == 1: Af -= sp.pi * (R/n * (m+1)/2)*...
<commit_before><commit_msg>Add python script for calculating fuel pitch fraction.<commit_after>import sympy as sp import sys def calc_spacing(R, n): x = sp.symbols('x') Af = 0 Am = 0 for m in range(2*n - 1): if m % 2 == 0: Af += sp.pi * (R/n * (m/2 + x))**2 if m % 2 == 1: ...
bfd85c18e788c4e89569f7a35fa85d80d3bcd031
reducer/ipython_version_helper.py
reducer/ipython_version_helper.py
from __future__ import (division, print_function, absolute_import, unicode_literals) from IPython import version_info def ipython_version_as_string(): """ The IPython version is a tuple (major, minor, patch, vendor). We only need major, minor, patch. """ return ''.join([st...
Add the IPython version helper
Add the IPython version helper
Python
bsd-3-clause
astrofrog/reducer,astrofrog/reducer,StuartLittlefair/reducer,StuartLittlefair/reducer,mwcraig/reducer
Add the IPython version helper
from __future__ import (division, print_function, absolute_import, unicode_literals) from IPython import version_info def ipython_version_as_string(): """ The IPython version is a tuple (major, minor, patch, vendor). We only need major, minor, patch. """ return ''.join([st...
<commit_before><commit_msg>Add the IPython version helper<commit_after>
from __future__ import (division, print_function, absolute_import, unicode_literals) from IPython import version_info def ipython_version_as_string(): """ The IPython version is a tuple (major, minor, patch, vendor). We only need major, minor, patch. """ return ''.join([st...
Add the IPython version helperfrom __future__ import (division, print_function, absolute_import, unicode_literals) from IPython import version_info def ipython_version_as_string(): """ The IPython version is a tuple (major, minor, patch, vendor). We only need major, minor, patch. ...
<commit_before><commit_msg>Add the IPython version helper<commit_after>from __future__ import (division, print_function, absolute_import, unicode_literals) from IPython import version_info def ipython_version_as_string(): """ The IPython version is a tuple (major, minor, patch, vendor...
f2044b0771f278c2a0de5cb69783b264a2d2363d
cluster_metrics.py
cluster_metrics.py
"Calculates Silhouette coefficient and Calinski-Harabaz index for a kmeans model." import os, sys import argparse, joblib from sklearn import metrics def cluster_metrics(data_file_path): if not os.path.exists(data_file_path + '/kmodel.txt'): print('No k-means model file found.') sys.exit(0) kmo...
Add clustering metrics calculator file.
Add clustering metrics calculator file.
Python
mit
theovasi/browsewiki,theovasi/browsewiki,theovasi/browsewiki
Add clustering metrics calculator file.
"Calculates Silhouette coefficient and Calinski-Harabaz index for a kmeans model." import os, sys import argparse, joblib from sklearn import metrics def cluster_metrics(data_file_path): if not os.path.exists(data_file_path + '/kmodel.txt'): print('No k-means model file found.') sys.exit(0) kmo...
<commit_before><commit_msg>Add clustering metrics calculator file.<commit_after>
"Calculates Silhouette coefficient and Calinski-Harabaz index for a kmeans model." import os, sys import argparse, joblib from sklearn import metrics def cluster_metrics(data_file_path): if not os.path.exists(data_file_path + '/kmodel.txt'): print('No k-means model file found.') sys.exit(0) kmo...
Add clustering metrics calculator file."Calculates Silhouette coefficient and Calinski-Harabaz index for a kmeans model." import os, sys import argparse, joblib from sklearn import metrics def cluster_metrics(data_file_path): if not os.path.exists(data_file_path + '/kmodel.txt'): print('No k-means model fi...
<commit_before><commit_msg>Add clustering metrics calculator file.<commit_after>"Calculates Silhouette coefficient and Calinski-Harabaz index for a kmeans model." import os, sys import argparse, joblib from sklearn import metrics def cluster_metrics(data_file_path): if not os.path.exists(data_file_path + '/kmodel....