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
dd1c20c26dc959ec68180eadd324e1b2edfa4aef
mpinterfaces/tests/main_recipes/test_main_interface.py
mpinterfaces/tests/main_recipes/test_main_interface.py
from subprocess import call # This test is simply calling a shell script, which calls a python main recipe # (Originally a function used for ad-hoc manual testing) and verifies it behaved # correctly. The reason for using a python file to call a shell script is so # automatic python testing tools, like nose2, will aut...
Use Python to call our shell script test.
Use Python to call our shell script test. This allows automated tools like nose2 to run it.
Python
mit
joshgabriel/MPInterfaces,henniggroup/MPInterfaces,joshgabriel/MPInterfaces,henniggroup/MPInterfaces
Use Python to call our shell script test. This allows automated tools like nose2 to run it.
from subprocess import call # This test is simply calling a shell script, which calls a python main recipe # (Originally a function used for ad-hoc manual testing) and verifies it behaved # correctly. The reason for using a python file to call a shell script is so # automatic python testing tools, like nose2, will aut...
<commit_before><commit_msg>Use Python to call our shell script test. This allows automated tools like nose2 to run it.<commit_after>
from subprocess import call # This test is simply calling a shell script, which calls a python main recipe # (Originally a function used for ad-hoc manual testing) and verifies it behaved # correctly. The reason for using a python file to call a shell script is so # automatic python testing tools, like nose2, will aut...
Use Python to call our shell script test. This allows automated tools like nose2 to run it.from subprocess import call # This test is simply calling a shell script, which calls a python main recipe # (Originally a function used for ad-hoc manual testing) and verifies it behaved # correctly. The reason for using a pyt...
<commit_before><commit_msg>Use Python to call our shell script test. This allows automated tools like nose2 to run it.<commit_after>from subprocess import call # This test is simply calling a shell script, which calls a python main recipe # (Originally a function used for ad-hoc manual testing) and verifies it behave...
bfcc3a90bbd90c6a9a3beed4c94be99f68d51be8
modules/bilingual_generator/bilingual-generator.py
modules/bilingual_generator/bilingual-generator.py
import os import codecs import json from gensim.models import Word2Vec import random from modules.preprocessor import yandex_api as yandex def create_bilingual_dictionary(clusters_file_path, sample_size, model): bilingual_dictionary = [] with codecs.open(cluster_groups, 'r', encoding='utf-8') as file: clusters = j...
Add script to generate a bilingual dictionary from vector list.
BilingualGenerator: Add script to generate a bilingual dictionary from vector list. Select a specified number of words from each cluster, translate the words, and check if they exist in language model. Input hard coded for clusters file path, model path and sample size. Output file path hard coded. Pair programmed ...
Python
mit
KshitijKarthick/tvecs,KshitijKarthick/tvecs,KshitijKarthick/tvecs
BilingualGenerator: Add script to generate a bilingual dictionary from vector list. Select a specified number of words from each cluster, translate the words, and check if they exist in language model. Input hard coded for clusters file path, model path and sample size. Output file path hard coded. Pair programmed ...
import os import codecs import json from gensim.models import Word2Vec import random from modules.preprocessor import yandex_api as yandex def create_bilingual_dictionary(clusters_file_path, sample_size, model): bilingual_dictionary = [] with codecs.open(cluster_groups, 'r', encoding='utf-8') as file: clusters = j...
<commit_before><commit_msg>BilingualGenerator: Add script to generate a bilingual dictionary from vector list. Select a specified number of words from each cluster, translate the words, and check if they exist in language model. Input hard coded for clusters file path, model path and sample size. Output file path ha...
import os import codecs import json from gensim.models import Word2Vec import random from modules.preprocessor import yandex_api as yandex def create_bilingual_dictionary(clusters_file_path, sample_size, model): bilingual_dictionary = [] with codecs.open(cluster_groups, 'r', encoding='utf-8') as file: clusters = j...
BilingualGenerator: Add script to generate a bilingual dictionary from vector list. Select a specified number of words from each cluster, translate the words, and check if they exist in language model. Input hard coded for clusters file path, model path and sample size. Output file path hard coded. Pair programmed ...
<commit_before><commit_msg>BilingualGenerator: Add script to generate a bilingual dictionary from vector list. Select a specified number of words from each cluster, translate the words, and check if they exist in language model. Input hard coded for clusters file path, model path and sample size. Output file path ha...
087e72f1d44d1b4f1aca72414c45aede5a2b6d25
bluebottle/payouts/migrations/0014_auto_20181211_0938.py
bluebottle/payouts/migrations/0014_auto_20181211_0938.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-12-11 08:38 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permissions(apps, schema_editor): group_perms = { 'Staff': { 'perms': ( ...
Add migration that correctly sets payout account permissions for staff.
Add migration that correctly sets payout account permissions for staff. BB-13581 #resolve
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
Add migration that correctly sets payout account permissions for staff. BB-13581 #resolve
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-12-11 08:38 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permissions(apps, schema_editor): group_perms = { 'Staff': { 'perms': ( ...
<commit_before><commit_msg>Add migration that correctly sets payout account permissions for staff. BB-13581 #resolve<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-12-11 08:38 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permissions(apps, schema_editor): group_perms = { 'Staff': { 'perms': ( ...
Add migration that correctly sets payout account permissions for staff. BB-13581 #resolve# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-12-11 08:38 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permis...
<commit_before><commit_msg>Add migration that correctly sets payout account permissions for staff. BB-13581 #resolve<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-12-11 08:38 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update...
29bc92fbd129a071992a021752fbe9801f3847e4
python/pygtk/python_gtk3_pygobject/tree_view.py
python/pygtk/python_gtk3_pygobject/tree_view.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ This is the simplest Python GTK+3 snippet. See: http://python-gtk-3-tutorial.readthedocs.org/en/latest/treeview.html """ from gi.repository import Gtk as gtk # Countries, population (as in 2015) and contine...
Add a snippet (Python GTK+3).
Add a snippet (Python GTK+3).
Python
mit
jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets
Add a snippet (Python GTK+3).
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ This is the simplest Python GTK+3 snippet. See: http://python-gtk-3-tutorial.readthedocs.org/en/latest/treeview.html """ from gi.repository import Gtk as gtk # Countries, population (as in 2015) and contine...
<commit_before><commit_msg>Add a snippet (Python GTK+3).<commit_after>
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ This is the simplest Python GTK+3 snippet. See: http://python-gtk-3-tutorial.readthedocs.org/en/latest/treeview.html """ from gi.repository import Gtk as gtk # Countries, population (as in 2015) and contine...
Add a snippet (Python GTK+3).#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ This is the simplest Python GTK+3 snippet. See: http://python-gtk-3-tutorial.readthedocs.org/en/latest/treeview.html """ from gi.repository import Gtk as gtk # Countries, popula...
<commit_before><commit_msg>Add a snippet (Python GTK+3).<commit_after>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ This is the simplest Python GTK+3 snippet. See: http://python-gtk-3-tutorial.readthedocs.org/en/latest/treeview.html """ from gi.reposito...
c8eff207b551c66d5a976740ade93487d4a2e040
plugins/openstack/nova/nova-hypervisor-metrics.py
plugins/openstack/nova/nova-hypervisor-metrics.py
#!/usr/bin/env python from argparse import ArgumentParser import socket import time from novaclient.v3 import Client DEFAULT_SCHEME = '{}.nova.hypervisors'.format(socket.gethostname()) METRIC_KEYS = ( 'current_workload', 'disk_available_least', 'local_gb', 'local_gb_used', 'memory_mb', 'memor...
Add plugin for Nova hypervisor metrics
Add plugin for Nova hypervisor metrics
Python
mit
circleback/sensu-community-plugins,JonathanHuot/sensu-community-plugins,JonathanHuot/sensu-community-plugins,JonathanHuot/sensu-community-plugins,pkaeding/sensu-community-plugins,intoximeters/sensu-community-plugins,tuenti/sensu-community-plugins,Seraf/sensu-community-plugins,zerOnepal/sensu-community-plugins,ideais/se...
Add plugin for Nova hypervisor metrics
#!/usr/bin/env python from argparse import ArgumentParser import socket import time from novaclient.v3 import Client DEFAULT_SCHEME = '{}.nova.hypervisors'.format(socket.gethostname()) METRIC_KEYS = ( 'current_workload', 'disk_available_least', 'local_gb', 'local_gb_used', 'memory_mb', 'memor...
<commit_before><commit_msg>Add plugin for Nova hypervisor metrics<commit_after>
#!/usr/bin/env python from argparse import ArgumentParser import socket import time from novaclient.v3 import Client DEFAULT_SCHEME = '{}.nova.hypervisors'.format(socket.gethostname()) METRIC_KEYS = ( 'current_workload', 'disk_available_least', 'local_gb', 'local_gb_used', 'memory_mb', 'memor...
Add plugin for Nova hypervisor metrics#!/usr/bin/env python from argparse import ArgumentParser import socket import time from novaclient.v3 import Client DEFAULT_SCHEME = '{}.nova.hypervisors'.format(socket.gethostname()) METRIC_KEYS = ( 'current_workload', 'disk_available_least', 'local_gb', 'local...
<commit_before><commit_msg>Add plugin for Nova hypervisor metrics<commit_after>#!/usr/bin/env python from argparse import ArgumentParser import socket import time from novaclient.v3 import Client DEFAULT_SCHEME = '{}.nova.hypervisors'.format(socket.gethostname()) METRIC_KEYS = ( 'current_workload', 'disk_ava...
ef94b41a77b37a42f63dea3d014c5cb278f800aa
InvenTree/InvenTree/test_views.py
InvenTree/InvenTree/test_views.py
""" Unit tests for the main web views """ from django.test import TestCase from django.urls import reverse from django.contrib.auth import get_user_model import os class ViewTests(TestCase): """ Tests for various top-level views """ def setUp(self): # Create a user User = get_user_model() ...
Add test for api-doc view
Add test for api-doc view
Python
mit
SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree
Add test for api-doc view
""" Unit tests for the main web views """ from django.test import TestCase from django.urls import reverse from django.contrib.auth import get_user_model import os class ViewTests(TestCase): """ Tests for various top-level views """ def setUp(self): # Create a user User = get_user_model() ...
<commit_before><commit_msg>Add test for api-doc view<commit_after>
""" Unit tests for the main web views """ from django.test import TestCase from django.urls import reverse from django.contrib.auth import get_user_model import os class ViewTests(TestCase): """ Tests for various top-level views """ def setUp(self): # Create a user User = get_user_model() ...
Add test for api-doc view""" Unit tests for the main web views """ from django.test import TestCase from django.urls import reverse from django.contrib.auth import get_user_model import os class ViewTests(TestCase): """ Tests for various top-level views """ def setUp(self): # Create a user ...
<commit_before><commit_msg>Add test for api-doc view<commit_after>""" Unit tests for the main web views """ from django.test import TestCase from django.urls import reverse from django.contrib.auth import get_user_model import os class ViewTests(TestCase): """ Tests for various top-level views """ def setU...
a222b37f17ababdac028a202dccbf0a990dad055
src/robot_motion_control/scripts/node_gpio_output.py
src/robot_motion_control/scripts/node_gpio_output.py
#!/usr/bin/env python import rospy from std_msgs.msg import String def motion_topic_callback(data): rospy.loginfo(rospy.get_caller_id() + "Moving %s", data.data) def motion_topic_listener(): rospy.init_node('GpioOutput', anonymous=True) rospy.Subscriber("MOTION_TOPIC", String, motion_topic_callback) ...
Add a node for simple gpio control
Add a node for simple gpio control
Python
mit
Aditya90/zeroborgRobot,Aditya90/zeroborgRobot
Add a node for simple gpio control
#!/usr/bin/env python import rospy from std_msgs.msg import String def motion_topic_callback(data): rospy.loginfo(rospy.get_caller_id() + "Moving %s", data.data) def motion_topic_listener(): rospy.init_node('GpioOutput', anonymous=True) rospy.Subscriber("MOTION_TOPIC", String, motion_topic_callback) ...
<commit_before><commit_msg>Add a node for simple gpio control<commit_after>
#!/usr/bin/env python import rospy from std_msgs.msg import String def motion_topic_callback(data): rospy.loginfo(rospy.get_caller_id() + "Moving %s", data.data) def motion_topic_listener(): rospy.init_node('GpioOutput', anonymous=True) rospy.Subscriber("MOTION_TOPIC", String, motion_topic_callback) ...
Add a node for simple gpio control#!/usr/bin/env python import rospy from std_msgs.msg import String def motion_topic_callback(data): rospy.loginfo(rospy.get_caller_id() + "Moving %s", data.data) def motion_topic_listener(): rospy.init_node('GpioOutput', anonymous=True) rospy.Subscriber("MOTION_TOPIC", S...
<commit_before><commit_msg>Add a node for simple gpio control<commit_after>#!/usr/bin/env python import rospy from std_msgs.msg import String def motion_topic_callback(data): rospy.loginfo(rospy.get_caller_id() + "Moving %s", data.data) def motion_topic_listener(): rospy.init_node('GpioOutput', anonymous=True...
071e345543a9e11c8e8af65b782c3044d1f5a6fa
snippets/base/migrations/0059_auto_20181120_1137.py
snippets/base/migrations/0059_auto_20181120_1137.py
# Generated by Django 2.1.3 on 2018-11-20 11:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0058_snippet_creator'), ] operations = [ migrations.AlterField( model_name='asrsnippet', name='publish_end',...
Add missing publish_start and publish_end migration.
Add missing publish_start and publish_end migration.
Python
mpl-2.0
mozilla/snippets-service,mozilla/snippets-service,mozilla/snippets-service,glogiotatidis/snippets-service,glogiotatidis/snippets-service,glogiotatidis/snippets-service,glogiotatidis/snippets-service,mozmar/snippets-service,mozmar/snippets-service,mozilla/snippets-service,mozmar/snippets-service,mozmar/snippets-service
Add missing publish_start and publish_end migration.
# Generated by Django 2.1.3 on 2018-11-20 11:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0058_snippet_creator'), ] operations = [ migrations.AlterField( model_name='asrsnippet', name='publish_end',...
<commit_before><commit_msg>Add missing publish_start and publish_end migration.<commit_after>
# Generated by Django 2.1.3 on 2018-11-20 11:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0058_snippet_creator'), ] operations = [ migrations.AlterField( model_name='asrsnippet', name='publish_end',...
Add missing publish_start and publish_end migration.# Generated by Django 2.1.3 on 2018-11-20 11:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0058_snippet_creator'), ] operations = [ migrations.AlterField( mode...
<commit_before><commit_msg>Add missing publish_start and publish_end migration.<commit_after># Generated by Django 2.1.3 on 2018-11-20 11:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0058_snippet_creator'), ] operations = [ ...
0866706165f9312f91577d716a7bb55551b1097f
scripts/SearchAndReplace.py
scripts/SearchAndReplace.py
# Copyright (c) 2017 Ruben Dulek # The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. import re #To perform the search and replace. from ..Script import Script ## Performs a search-and-replace on all g-code. # # Due to technical limitations, the search can't cross the border between # ...
Add search and replace script
Add search and replace script
Python
agpl-3.0
nallath/PostProcessingPlugin
Add search and replace script
# Copyright (c) 2017 Ruben Dulek # The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. import re #To perform the search and replace. from ..Script import Script ## Performs a search-and-replace on all g-code. # # Due to technical limitations, the search can't cross the border between # ...
<commit_before><commit_msg>Add search and replace script<commit_after>
# Copyright (c) 2017 Ruben Dulek # The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. import re #To perform the search and replace. from ..Script import Script ## Performs a search-and-replace on all g-code. # # Due to technical limitations, the search can't cross the border between # ...
Add search and replace script# Copyright (c) 2017 Ruben Dulek # The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. import re #To perform the search and replace. from ..Script import Script ## Performs a search-and-replace on all g-code. # # Due to technical limitations, the search can't...
<commit_before><commit_msg>Add search and replace script<commit_after># Copyright (c) 2017 Ruben Dulek # The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. import re #To perform the search and replace. from ..Script import Script ## Performs a search-and-replace on all g-code. # # Due t...
8e96e9c8f2cb19ad6d2febaa081d8198368431a7
candidates/migrations/0016_migrate_data_to_extra_fields.py
candidates/migrations/0016_migrate_data_to_extra_fields.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings def from_person_extra_to_generic_fields(apps, schema_editor): ExtraField = apps.get_model('candidates', 'ExtraField') PersonExtraFieldValue = apps.get_model('candidates', '...
Add a data migration for extra fields for BF and CR
Add a data migration for extra fields for BF and CR
Python
agpl-3.0
mysociety/yournextmp-popit,DemocracyClub/yournextrepresentative,mysociety/yournextmp-popit,DemocracyClub/yournextrepresentative,neavouli/yournextrepresentative,mysociety/yournextrepresentative,neavouli/yournextrepresentative,neavouli/yournextrepresentative,DemocracyClub/yournextrepresentative,mysociety/yournextrepresen...
Add a data migration for extra fields for BF and CR
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings def from_person_extra_to_generic_fields(apps, schema_editor): ExtraField = apps.get_model('candidates', 'ExtraField') PersonExtraFieldValue = apps.get_model('candidates', '...
<commit_before><commit_msg>Add a data migration for extra fields for BF and CR<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings def from_person_extra_to_generic_fields(apps, schema_editor): ExtraField = apps.get_model('candidates', 'ExtraField') PersonExtraFieldValue = apps.get_model('candidates', '...
Add a data migration for extra fields for BF and CR# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings def from_person_extra_to_generic_fields(apps, schema_editor): ExtraField = apps.get_model('candidates', 'ExtraField') Per...
<commit_before><commit_msg>Add a data migration for extra fields for BF and CR<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings def from_person_extra_to_generic_fields(apps, schema_editor): ExtraField = apps.get_...
5b4d2832fca8e8eb6ffa299f477e00315ac233c9
zerver/management/commands/convert_bot_to_outgoing_webhook.py
zerver/management/commands/convert_bot_to_outgoing_webhook.py
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from zerver.lib.actions import do_rename_stream from zerver.lib.str_utils import force_text from zerver.models import Realm, Serv...
Add management command for making outgoing webhook bot.
bots: Add management command for making outgoing webhook bot.
Python
apache-2.0
jackrzhang/zulip,shubhamdhama/zulip,shubhamdhama/zulip,vabs22/zulip,rishig/zulip,j831/zulip,rishig/zulip,Galexrt/zulip,tommyip/zulip,vaidap/zulip,rishig/zulip,j831/zulip,Galexrt/zulip,hackerkid/zulip,hackerkid/zulip,andersk/zulip,zulip/zulip,punchagan/zulip,Galexrt/zulip,rht/zulip,shubhamdhama/zulip,verma-varsha/zulip,...
bots: Add management command for making outgoing webhook bot.
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from zerver.lib.actions import do_rename_stream from zerver.lib.str_utils import force_text from zerver.models import Realm, Serv...
<commit_before><commit_msg>bots: Add management command for making outgoing webhook bot.<commit_after>
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from zerver.lib.actions import do_rename_stream from zerver.lib.str_utils import force_text from zerver.models import Realm, Serv...
bots: Add management command for making outgoing webhook bot.from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from zerver.lib.actions import do_rename_stream from zerver.lib.str_...
<commit_before><commit_msg>bots: Add management command for making outgoing webhook bot.<commit_after>from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from zerver.lib.actions imp...
f9815ac660263f04463a1d15e8c0a87edca518ca
senlin/tests/tempest/api/profiles/test_profile_update.py
senlin/tests/tempest/api/profiles/test_profile_update.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Add API test for profile update
Add API test for profile update Add API test for profile update Change-Id: I82a15c72409013c67a1f99fadeea45c52977588d
Python
apache-2.0
openstack/senlin,openstack/senlin,openstack/senlin,stackforge/senlin,stackforge/senlin
Add API test for profile update Add API test for profile update Change-Id: I82a15c72409013c67a1f99fadeea45c52977588d
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before><commit_msg>Add API test for profile update Add API test for profile update Change-Id: I82a15c72409013c67a1f99fadeea45c52977588d<commit_after>
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Add API test for profile update Add API test for profile update Change-Id: I82a15c72409013c67a1f99fadeea45c52977588d# 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....
<commit_before><commit_msg>Add API test for profile update Add API test for profile update Change-Id: I82a15c72409013c67a1f99fadeea45c52977588d<commit_after># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of t...
4e34bcb117366592722fc69c947ae97f188e0d28
tests/test_faker_schema.py
tests/test_faker_schema.py
import unittest from faker_schema.faker_schema import FakerSchema class MockFaker(object): def name(self): return 'John Doe' def address(self): return '4570 Jaime Plains Suite 188\nNew Johnny, DE 89711-3908' def email(self): return '[email protected]' def street_address(sel...
Add unit tests for faker_schema module
Add unit tests for faker_schema module
Python
mit
ueg1990/faker-schema
Add unit tests for faker_schema module
import unittest from faker_schema.faker_schema import FakerSchema class MockFaker(object): def name(self): return 'John Doe' def address(self): return '4570 Jaime Plains Suite 188\nNew Johnny, DE 89711-3908' def email(self): return '[email protected]' def street_address(sel...
<commit_before><commit_msg>Add unit tests for faker_schema module<commit_after>
import unittest from faker_schema.faker_schema import FakerSchema class MockFaker(object): def name(self): return 'John Doe' def address(self): return '4570 Jaime Plains Suite 188\nNew Johnny, DE 89711-3908' def email(self): return '[email protected]' def street_address(sel...
Add unit tests for faker_schema moduleimport unittest from faker_schema.faker_schema import FakerSchema class MockFaker(object): def name(self): return 'John Doe' def address(self): return '4570 Jaime Plains Suite 188\nNew Johnny, DE 89711-3908' def email(self): return 'towen@n...
<commit_before><commit_msg>Add unit tests for faker_schema module<commit_after>import unittest from faker_schema.faker_schema import FakerSchema class MockFaker(object): def name(self): return 'John Doe' def address(self): return '4570 Jaime Plains Suite 188\nNew Johnny, DE 89711-3908' ...
d5c5364becb872e4e6508e8e8ad17a9d5fdce627
tests/test_slr_conflict.py
tests/test_slr_conflict.py
import pytest from parglare import Grammar, Parser from parglare.exceptions import ShiftReduceConflict def test_slr_conflict(): """ Unambiguous grammar which is not SLR(1). From the Dragon Book. This grammar has a S/R conflict if SLR tables are used. """ grammar = """ S = L '=' R | R; ...
Test for Shift/Reduce conflict in non-SLR grammar when SLR tables are used.
Test for Shift/Reduce conflict in non-SLR grammar when SLR tables are used.
Python
mit
igordejanovic/parglare,igordejanovic/parglare
Test for Shift/Reduce conflict in non-SLR grammar when SLR tables are used.
import pytest from parglare import Grammar, Parser from parglare.exceptions import ShiftReduceConflict def test_slr_conflict(): """ Unambiguous grammar which is not SLR(1). From the Dragon Book. This grammar has a S/R conflict if SLR tables are used. """ grammar = """ S = L '=' R | R; ...
<commit_before><commit_msg>Test for Shift/Reduce conflict in non-SLR grammar when SLR tables are used.<commit_after>
import pytest from parglare import Grammar, Parser from parglare.exceptions import ShiftReduceConflict def test_slr_conflict(): """ Unambiguous grammar which is not SLR(1). From the Dragon Book. This grammar has a S/R conflict if SLR tables are used. """ grammar = """ S = L '=' R | R; ...
Test for Shift/Reduce conflict in non-SLR grammar when SLR tables are used.import pytest from parglare import Grammar, Parser from parglare.exceptions import ShiftReduceConflict def test_slr_conflict(): """ Unambiguous grammar which is not SLR(1). From the Dragon Book. This grammar has a S/R conflict ...
<commit_before><commit_msg>Test for Shift/Reduce conflict in non-SLR grammar when SLR tables are used.<commit_after>import pytest from parglare import Grammar, Parser from parglare.exceptions import ShiftReduceConflict def test_slr_conflict(): """ Unambiguous grammar which is not SLR(1). From the Dragon B...
3a1442e680edf41e7952b966afef5ff8a7d5e8f5
fa_to_gfa.py
fa_to_gfa.py
import sys if __name__ == "__main__": id_ctr = 0 print "\t".join(["H", "VZ:i:2.0"]) with open(sys.argv[1],"r") as ifi: for line in ifi: if not line.startswith(">"): id_ctr += 1 print "\t".join(["S", str(id_ctr), str(len(line.strip())), line.strip(), ""])...
Add fa->gfa script for testing assembly stats
Add fa->gfa script for testing assembly stats
Python
mit
edawson/gfakluge,edawson/gfakluge,edawson/gfakluge,edawson/gfakluge
Add fa->gfa script for testing assembly stats
import sys if __name__ == "__main__": id_ctr = 0 print "\t".join(["H", "VZ:i:2.0"]) with open(sys.argv[1],"r") as ifi: for line in ifi: if not line.startswith(">"): id_ctr += 1 print "\t".join(["S", str(id_ctr), str(len(line.strip())), line.strip(), ""])...
<commit_before><commit_msg>Add fa->gfa script for testing assembly stats<commit_after>
import sys if __name__ == "__main__": id_ctr = 0 print "\t".join(["H", "VZ:i:2.0"]) with open(sys.argv[1],"r") as ifi: for line in ifi: if not line.startswith(">"): id_ctr += 1 print "\t".join(["S", str(id_ctr), str(len(line.strip())), line.strip(), ""])...
Add fa->gfa script for testing assembly statsimport sys if __name__ == "__main__": id_ctr = 0 print "\t".join(["H", "VZ:i:2.0"]) with open(sys.argv[1],"r") as ifi: for line in ifi: if not line.startswith(">"): id_ctr += 1 print "\t".join(["S", str(id_ctr...
<commit_before><commit_msg>Add fa->gfa script for testing assembly stats<commit_after>import sys if __name__ == "__main__": id_ctr = 0 print "\t".join(["H", "VZ:i:2.0"]) with open(sys.argv[1],"r") as ifi: for line in ifi: if not line.startswith(">"): id_ctr += 1 ...
bb46ab063cc86525946563c809a896532d87147a
wqflask/tests/unit/wqflask/test_markdown_routes.py
wqflask/tests/unit/wqflask/test_markdown_routes.py
"""Test functions in markdown utils""" import unittest from unittest import mock from wqflask.markdown_routes import render_markdown class MockRequests404: @property def status_code(): return 404 class MockRequests200: @property def status_code(): return 200 @property def c...
Add basic tests for rendering_markdown
Add basic tests for rendering_markdown * wqflask/tests/unit/wqflask/test_markdown_routes.py: New tests.
Python
agpl-3.0
zsloan/genenetwork2,pjotrp/genenetwork2,pjotrp/genenetwork2,pjotrp/genenetwork2,genenetwork/genenetwork2,zsloan/genenetwork2,zsloan/genenetwork2,zsloan/genenetwork2,pjotrp/genenetwork2,genenetwork/genenetwork2,genenetwork/genenetwork2,pjotrp/genenetwork2,genenetwork/genenetwork2
Add basic tests for rendering_markdown * wqflask/tests/unit/wqflask/test_markdown_routes.py: New tests.
"""Test functions in markdown utils""" import unittest from unittest import mock from wqflask.markdown_routes import render_markdown class MockRequests404: @property def status_code(): return 404 class MockRequests200: @property def status_code(): return 200 @property def c...
<commit_before><commit_msg>Add basic tests for rendering_markdown * wqflask/tests/unit/wqflask/test_markdown_routes.py: New tests.<commit_after>
"""Test functions in markdown utils""" import unittest from unittest import mock from wqflask.markdown_routes import render_markdown class MockRequests404: @property def status_code(): return 404 class MockRequests200: @property def status_code(): return 200 @property def c...
Add basic tests for rendering_markdown * wqflask/tests/unit/wqflask/test_markdown_routes.py: New tests."""Test functions in markdown utils""" import unittest from unittest import mock from wqflask.markdown_routes import render_markdown class MockRequests404: @property def status_code(): return 404 ...
<commit_before><commit_msg>Add basic tests for rendering_markdown * wqflask/tests/unit/wqflask/test_markdown_routes.py: New tests.<commit_after>"""Test functions in markdown utils""" import unittest from unittest import mock from wqflask.markdown_routes import render_markdown class MockRequests404: @property ...
e02475a78482d7f298a6c702e0935a8174a295db
tests/test_tutorial/test_first_steps/test_tutorial006.py
tests/test_tutorial/test_first_steps/test_tutorial006.py
import subprocess import typer from typer.testing import CliRunner from first_steps import tutorial006 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_help(): result = runner.invoke(app, ["--help"]) assert result.exit_code == 0 assert "Say hi to NAME, optionally with a...
Add tests for tutorial006 in First Steps, to test help from docstring
:white_check_mark: Add tests for tutorial006 in First Steps, to test help from docstring
Python
mit
tiangolo/typer,tiangolo/typer
:white_check_mark: Add tests for tutorial006 in First Steps, to test help from docstring
import subprocess import typer from typer.testing import CliRunner from first_steps import tutorial006 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_help(): result = runner.invoke(app, ["--help"]) assert result.exit_code == 0 assert "Say hi to NAME, optionally with a...
<commit_before><commit_msg>:white_check_mark: Add tests for tutorial006 in First Steps, to test help from docstring<commit_after>
import subprocess import typer from typer.testing import CliRunner from first_steps import tutorial006 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_help(): result = runner.invoke(app, ["--help"]) assert result.exit_code == 0 assert "Say hi to NAME, optionally with a...
:white_check_mark: Add tests for tutorial006 in First Steps, to test help from docstringimport subprocess import typer from typer.testing import CliRunner from first_steps import tutorial006 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_help(): result = runner.invoke(app, ["...
<commit_before><commit_msg>:white_check_mark: Add tests for tutorial006 in First Steps, to test help from docstring<commit_after>import subprocess import typer from typer.testing import CliRunner from first_steps import tutorial006 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_h...
02e14627539eb04f49c2679663426eefabbf6e8d
src/tf/test_quantization.py
src/tf/test_quantization.py
import numpy as np def to_8(M_real, scale, offset): result = (M_real / scale - offset).round() result[result < 0] = 0 result[result > 255] = 255 return result.astype(np.uint8) def gemm8_32(l, r): assert l.dtype == np.uint8 assert r.dtype == np.uint8 return np.dot(l.astype(np.uint32), r.astype(np.uint32)...
Add code to demonstrate quantization flow
Add code to demonstrate quantization flow
Python
mit
kkiningh/cs231n-project,kkiningh/cs231n-project
Add code to demonstrate quantization flow
import numpy as np def to_8(M_real, scale, offset): result = (M_real / scale - offset).round() result[result < 0] = 0 result[result > 255] = 255 return result.astype(np.uint8) def gemm8_32(l, r): assert l.dtype == np.uint8 assert r.dtype == np.uint8 return np.dot(l.astype(np.uint32), r.astype(np.uint32)...
<commit_before><commit_msg>Add code to demonstrate quantization flow<commit_after>
import numpy as np def to_8(M_real, scale, offset): result = (M_real / scale - offset).round() result[result < 0] = 0 result[result > 255] = 255 return result.astype(np.uint8) def gemm8_32(l, r): assert l.dtype == np.uint8 assert r.dtype == np.uint8 return np.dot(l.astype(np.uint32), r.astype(np.uint32)...
Add code to demonstrate quantization flowimport numpy as np def to_8(M_real, scale, offset): result = (M_real / scale - offset).round() result[result < 0] = 0 result[result > 255] = 255 return result.astype(np.uint8) def gemm8_32(l, r): assert l.dtype == np.uint8 assert r.dtype == np.uint8 return np.dot...
<commit_before><commit_msg>Add code to demonstrate quantization flow<commit_after>import numpy as np def to_8(M_real, scale, offset): result = (M_real / scale - offset).round() result[result < 0] = 0 result[result > 255] = 255 return result.astype(np.uint8) def gemm8_32(l, r): assert l.dtype == np.uint8 a...
8c85c095dbdbbe76639fd2dd5cfda64eb7057da4
AdaptivePELE/analysis/writePrecisePathToSnapshot.py
AdaptivePELE/analysis/writePrecisePathToSnapshot.py
import os import sys import argparse import glob import itertools from AdaptivePELE.utilities import utilities def parseArguments(): desc = "Write the information related to the conformation network to file\n" parser = argparse.ArgumentParser(description=desc) parser.add_argument("clusteringObject", type=...
Add script to create more precise pathways from simulations
Add script to create more precise pathways from simulations
Python
mit
AdaptivePELE/AdaptivePELE,AdaptivePELE/AdaptivePELE,AdaptivePELE/AdaptivePELE,AdaptivePELE/AdaptivePELE
Add script to create more precise pathways from simulations
import os import sys import argparse import glob import itertools from AdaptivePELE.utilities import utilities def parseArguments(): desc = "Write the information related to the conformation network to file\n" parser = argparse.ArgumentParser(description=desc) parser.add_argument("clusteringObject", type=...
<commit_before><commit_msg>Add script to create more precise pathways from simulations<commit_after>
import os import sys import argparse import glob import itertools from AdaptivePELE.utilities import utilities def parseArguments(): desc = "Write the information related to the conformation network to file\n" parser = argparse.ArgumentParser(description=desc) parser.add_argument("clusteringObject", type=...
Add script to create more precise pathways from simulationsimport os import sys import argparse import glob import itertools from AdaptivePELE.utilities import utilities def parseArguments(): desc = "Write the information related to the conformation network to file\n" parser = argparse.ArgumentParser(descript...
<commit_before><commit_msg>Add script to create more precise pathways from simulations<commit_after>import os import sys import argparse import glob import itertools from AdaptivePELE.utilities import utilities def parseArguments(): desc = "Write the information related to the conformation network to file\n" ...
07452d9411972f575beadd4bef1799ccdf95968a
src/nodeconductor_aws/migrations/0002_remove_awsservice_name.py
src/nodeconductor_aws/migrations/0002_remove_awsservice_name.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nodeconductor_aws', '0002_auto_20170210_1345'), ] operations = [ migrations.RemoveField( model_name='awsservice'...
Remove name attribute from service
Remove name attribute from service [WAL-496] Use settings name instead of service name.
Python
mit
opennode/nodeconductor-aws
Remove name attribute from service [WAL-496] Use settings name instead of service name.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nodeconductor_aws', '0002_auto_20170210_1345'), ] operations = [ migrations.RemoveField( model_name='awsservice'...
<commit_before><commit_msg>Remove name attribute from service [WAL-496] Use settings name instead of service name.<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nodeconductor_aws', '0002_auto_20170210_1345'), ] operations = [ migrations.RemoveField( model_name='awsservice'...
Remove name attribute from service [WAL-496] Use settings name instead of service name.# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nodeconductor_aws', '0002_auto_20170210_1345'), ]...
<commit_before><commit_msg>Remove name attribute from service [WAL-496] Use settings name instead of service name.<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nodeconducto...
7e0346f25bc121b4f01d8e42150ade0ff11cc326
tests/test_cli_update.py
tests/test_cli_update.py
# -*- coding: utf-8 -*- import pathlib def test_should_write_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert templates.exists()
Add a basic integration test for the update command
Add a basic integration test for the update command
Python
bsd-3-clause
hackebrot/cibopath
Add a basic integration test for the update command
# -*- coding: utf-8 -*- import pathlib def test_should_write_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert templates.exists()
<commit_before><commit_msg>Add a basic integration test for the update command<commit_after>
# -*- coding: utf-8 -*- import pathlib def test_should_write_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert templates.exists()
Add a basic integration test for the update command# -*- coding: utf-8 -*- import pathlib def test_should_write_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pathlib.Path(tmp_templates_file) assert ...
<commit_before><commit_msg>Add a basic integration test for the update command<commit_after># -*- coding: utf-8 -*- import pathlib def test_should_write_json(cli_runner, tmp_rc, tmp_templates_file): result = cli_runner([ '-c', tmp_rc, 'update' ]) assert result.exit_code == 0 templates = pat...
7bbbc0823a6b4c966f5311f3568241326995eb73
test/statements/import1.py
test/statements/import1.py
from ...foo import bar as spam, baz import time as ham, datetime from : keyword.control.flow.python, source.python .. : source.python . : source.python foo : source.python : source.python import : keyword.control.flow.python, source.python bar ...
Add tests for import statements
Add tests for import statements
Python
mit
MagicStack/MagicPython,MagicStack/MagicPython,MagicStack/MagicPython
Add tests for import statements
from ...foo import bar as spam, baz import time as ham, datetime from : keyword.control.flow.python, source.python .. : source.python . : source.python foo : source.python : source.python import : keyword.control.flow.python, source.python bar ...
<commit_before><commit_msg>Add tests for import statements<commit_after>
from ...foo import bar as spam, baz import time as ham, datetime from : keyword.control.flow.python, source.python .. : source.python . : source.python foo : source.python : source.python import : keyword.control.flow.python, source.python bar ...
Add tests for import statementsfrom ...foo import bar as spam, baz import time as ham, datetime from : keyword.control.flow.python, source.python .. : source.python . : source.python foo : source.python : source.python import : keyword.control.flow.pytho...
<commit_before><commit_msg>Add tests for import statements<commit_after>from ...foo import bar as spam, baz import time as ham, datetime from : keyword.control.flow.python, source.python .. : source.python . : source.python foo : source.python : source.python i...
7a6b3cd831fc3e04b714d54793dae54df59115e1
nototools/decompose_ttc.py
nototools/decompose_ttc.py
#!/usr/bin/python # # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
Add a tool to decompose TTC files.
Add a tool to decompose TTC files.
Python
apache-2.0
pathumego/nototools,anthrotype/nototools,dougfelt/nototools,googlefonts/nototools,moyogo/nototools,pahans/nototools,googlei18n/nototools,googlei18n/nototools,davelab6/nototools,davelab6/nototools,pahans/nototools,namemealrady/nototools,googlefonts/nototools,namemealrady/nototools,anthrotype/nototools,googlefonts/nototo...
Add a tool to decompose TTC files.
#!/usr/bin/python # # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
<commit_before><commit_msg>Add a tool to decompose TTC files.<commit_after>
#!/usr/bin/python # # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
Add a tool to decompose TTC files.#!/usr/bin/python # # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/...
<commit_before><commit_msg>Add a tool to decompose TTC files.<commit_after>#!/usr/bin/python # # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License a...
5ffb60b79505cc3a96fba7403cede78cca36046b
numba2/tests/test_debug.py
numba2/tests/test_debug.py
# -*- coding: utf-8 -*- """ Test that the debug flag is disabled, especially for releases. """ from __future__ import print_function, division, absolute_import import unittest from numba2.config import config class TestDebugFlag(unittest.TestCase): def test_debug_flag(self): self.assertFalse(config.debu...
Test that debug flag is off
Test that debug flag is off
Python
bsd-2-clause
flypy/flypy,flypy/flypy
Test that debug flag is off
# -*- coding: utf-8 -*- """ Test that the debug flag is disabled, especially for releases. """ from __future__ import print_function, division, absolute_import import unittest from numba2.config import config class TestDebugFlag(unittest.TestCase): def test_debug_flag(self): self.assertFalse(config.debu...
<commit_before><commit_msg>Test that debug flag is off<commit_after>
# -*- coding: utf-8 -*- """ Test that the debug flag is disabled, especially for releases. """ from __future__ import print_function, division, absolute_import import unittest from numba2.config import config class TestDebugFlag(unittest.TestCase): def test_debug_flag(self): self.assertFalse(config.debu...
Test that debug flag is off# -*- coding: utf-8 -*- """ Test that the debug flag is disabled, especially for releases. """ from __future__ import print_function, division, absolute_import import unittest from numba2.config import config class TestDebugFlag(unittest.TestCase): def test_debug_flag(self): s...
<commit_before><commit_msg>Test that debug flag is off<commit_after># -*- coding: utf-8 -*- """ Test that the debug flag is disabled, especially for releases. """ from __future__ import print_function, division, absolute_import import unittest from numba2.config import config class TestDebugFlag(unittest.TestCase): ...
1af722eb494d1173bfcc9aec1cdb8aab93cf6fc8
tests/test_set_config.py
tests/test_set_config.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
Add a test case for load_config
Add a test case for load_config This is just a basic test to make sure loading from file works. Change-Id: I074f36023ac4198c436fcee1668d32f9d1f0e61b
Python
apache-2.0
coolsvap/kolla,nihilifer/kolla,tonyli71/kolla,stackforge/kolla,limamauricio/mykolla,rahulunair/kolla,dardelean/kolla-ansible,negronjl/kolla,stackforge/kolla,intel-onp/kolla,dardelean/kolla-ansible,dardelean/kolla-ansible,intel-onp/kolla,mandre/kolla,limamauricio/mykolla,tonyli71/kolla,negronjl/kolla,negronjl/kolla,Gale...
Add a test case for load_config This is just a basic test to make sure loading from file works. Change-Id: I074f36023ac4198c436fcee1668d32f9d1f0e61b
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
<commit_before><commit_msg>Add a test case for load_config This is just a basic test to make sure loading from file works. Change-Id: I074f36023ac4198c436fcee1668d32f9d1f0e61b<commit_after>
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
Add a test case for load_config This is just a basic test to make sure loading from file works. Change-Id: I074f36023ac4198c436fcee1668d32f9d1f0e61b# 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 Licens...
<commit_before><commit_msg>Add a test case for load_config This is just a basic test to make sure loading from file works. Change-Id: I074f36023ac4198c436fcee1668d32f9d1f0e61b<commit_after># Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licen...
2915572be70e98fdd76870b402e85751c952f749
meetings/api/migrations/0001_create_account_for_osf.py
meetings/api/migrations/0001_create_account_for_osf.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-12 16:31 from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.management import create_permissions class Migration(migrations.Migration): def create_user_for_osf(apps, schema_editor): User = apps...
Add migration for creating special osf user
Add migration for creating special osf user
Python
apache-2.0
jnayak1/osf-meetings,jnayak1/osf-meetings,leodomingo/osf-meetings,jnayak1/osf-meetings,leodomingo/osf-meetings,jnayak1/osf-meetings,leodomingo/osf-meetings,leodomingo/osf-meetings
Add migration for creating special osf user
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-12 16:31 from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.management import create_permissions class Migration(migrations.Migration): def create_user_for_osf(apps, schema_editor): User = apps...
<commit_before><commit_msg>Add migration for creating special osf user<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-12 16:31 from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.management import create_permissions class Migration(migrations.Migration): def create_user_for_osf(apps, schema_editor): User = apps...
Add migration for creating special osf user# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-12 16:31 from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.management import create_permissions class Migration(migrations.Migration): def create_user_for_os...
<commit_before><commit_msg>Add migration for creating special osf user<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-12 16:31 from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.management import create_permissions class Migration(migration...
09d96508cfcf0e0394c581d7169cdf9abceb4ddf
wrench/benchmark_server.py
wrench/benchmark_server.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json import os import subprocess import time import urllib2 FILE = 'perf.json' URL = 'https://wrperf.org/submit'...
Add script to run benchmarks and submit to web service.
Add script to run benchmarks and submit to web service.
Python
mpl-2.0
servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender
Add script to run benchmarks and submit to web service.
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json import os import subprocess import time import urllib2 FILE = 'perf.json' URL = 'https://wrperf.org/submit'...
<commit_before><commit_msg>Add script to run benchmarks and submit to web service.<commit_after>
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json import os import subprocess import time import urllib2 FILE = 'perf.json' URL = 'https://wrperf.org/submit'...
Add script to run benchmarks and submit to web service.# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json import os import subprocess import time import urllib...
<commit_before><commit_msg>Add script to run benchmarks and submit to web service.<commit_after># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json import os im...
b025383bb5d77dd8ca9af8fd77bc2a362e64ba51
scripts/fix_names.py
scripts/fix_names.py
#!/usr/bin/env python3 """ Fix names in auth_users. Usage: ./fix_names data/site/epcon.db Uses nameparser package to do the hard work of splitting names into first and last name. Written by Marc-Andre Lemburg, 2019. """ import sqlite3 import sys import nameparser ### def connect(file): db ...
Add helper script to fix names in auth_user.
Add helper script to fix names in auth_user.
Python
bsd-2-clause
EuroPython/epcon,EuroPython/epcon,EuroPython/epcon,EuroPython/epcon
Add helper script to fix names in auth_user.
#!/usr/bin/env python3 """ Fix names in auth_users. Usage: ./fix_names data/site/epcon.db Uses nameparser package to do the hard work of splitting names into first and last name. Written by Marc-Andre Lemburg, 2019. """ import sqlite3 import sys import nameparser ### def connect(file): db ...
<commit_before><commit_msg>Add helper script to fix names in auth_user.<commit_after>
#!/usr/bin/env python3 """ Fix names in auth_users. Usage: ./fix_names data/site/epcon.db Uses nameparser package to do the hard work of splitting names into first and last name. Written by Marc-Andre Lemburg, 2019. """ import sqlite3 import sys import nameparser ### def connect(file): db ...
Add helper script to fix names in auth_user.#!/usr/bin/env python3 """ Fix names in auth_users. Usage: ./fix_names data/site/epcon.db Uses nameparser package to do the hard work of splitting names into first and last name. Written by Marc-Andre Lemburg, 2019. """ import sqlite3 import sys import ...
<commit_before><commit_msg>Add helper script to fix names in auth_user.<commit_after>#!/usr/bin/env python3 """ Fix names in auth_users. Usage: ./fix_names data/site/epcon.db Uses nameparser package to do the hard work of splitting names into first and last name. Written by Marc-Andre Lemburg, 2019...
9db4d45498a08efdd772e238a5033f381bd48fea
add_user.py
add_user.py
import argparse import pdb from flask import Flask from flask_sqlalchemy import SQLAlchemy from models import User db = SQLAlchemy() def main(): parser = argparse.ArgumentParser(description='Adds user to the database.') parser.add_argument( '-n', '--name', required=True, help="Na...
Add script to add user to the database
Add script to add user to the database
Python
mit
danoneata/video_annotation,danoneata/video_annotation,danoneata/video_annotation
Add script to add user to the database
import argparse import pdb from flask import Flask from flask_sqlalchemy import SQLAlchemy from models import User db = SQLAlchemy() def main(): parser = argparse.ArgumentParser(description='Adds user to the database.') parser.add_argument( '-n', '--name', required=True, help="Na...
<commit_before><commit_msg>Add script to add user to the database<commit_after>
import argparse import pdb from flask import Flask from flask_sqlalchemy import SQLAlchemy from models import User db = SQLAlchemy() def main(): parser = argparse.ArgumentParser(description='Adds user to the database.') parser.add_argument( '-n', '--name', required=True, help="Na...
Add script to add user to the databaseimport argparse import pdb from flask import Flask from flask_sqlalchemy import SQLAlchemy from models import User db = SQLAlchemy() def main(): parser = argparse.ArgumentParser(description='Adds user to the database.') parser.add_argument( '-n', '--name', ...
<commit_before><commit_msg>Add script to add user to the database<commit_after>import argparse import pdb from flask import Flask from flask_sqlalchemy import SQLAlchemy from models import User db = SQLAlchemy() def main(): parser = argparse.ArgumentParser(description='Adds user to the database.') parse...
db451c584541e10101e840b633500e4ec0feb343
alembic/versions/40975dd21696_add_theme_column_to_chat_users.py
alembic/versions/40975dd21696_add_theme_column_to_chat_users.py
"""Add theme column to chat users. Revision ID: 40975dd21696 Revises: 43912ab8304e Create Date: 2015-09-22 21:53:34.160708 """ # revision identifiers, used by Alembic. revision = '40975dd21696' down_revision = '43912ab8304e' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def...
Add theme column to chat users (alembic revision).
Add theme column to chat users (alembic revision).
Python
agpl-3.0
MSPARP/newparp,MSPARP/newparp,MSPARP/newparp
Add theme column to chat users (alembic revision).
"""Add theme column to chat users. Revision ID: 40975dd21696 Revises: 43912ab8304e Create Date: 2015-09-22 21:53:34.160708 """ # revision identifiers, used by Alembic. revision = '40975dd21696' down_revision = '43912ab8304e' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def...
<commit_before><commit_msg>Add theme column to chat users (alembic revision).<commit_after>
"""Add theme column to chat users. Revision ID: 40975dd21696 Revises: 43912ab8304e Create Date: 2015-09-22 21:53:34.160708 """ # revision identifiers, used by Alembic. revision = '40975dd21696' down_revision = '43912ab8304e' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def...
Add theme column to chat users (alembic revision)."""Add theme column to chat users. Revision ID: 40975dd21696 Revises: 43912ab8304e Create Date: 2015-09-22 21:53:34.160708 """ # revision identifiers, used by Alembic. revision = '40975dd21696' down_revision = '43912ab8304e' branch_labels = None depends_on = None fr...
<commit_before><commit_msg>Add theme column to chat users (alembic revision).<commit_after>"""Add theme column to chat users. Revision ID: 40975dd21696 Revises: 43912ab8304e Create Date: 2015-09-22 21:53:34.160708 """ # revision identifiers, used by Alembic. revision = '40975dd21696' down_revision = '43912ab8304e' b...
d425fa64ece6826d299ca2daadb9a08afa6e87b5
test/test_searchentities.py
test/test_searchentities.py
import unittest from . import models from sir.schema.searchentities import SearchEntity as E, SearchField as F class QueryResultToDictTest(unittest.TestCase): def setUp(self): self.entity = E(models.B, [ F("id", "id"), F("c_bar", "c.bar"), F("c_bar_trans", "c.bar", tra...
Add a test for query_result_to_dict
Add a test for query_result_to_dict
Python
mit
jeffweeksio/sir
Add a test for query_result_to_dict
import unittest from . import models from sir.schema.searchentities import SearchEntity as E, SearchField as F class QueryResultToDictTest(unittest.TestCase): def setUp(self): self.entity = E(models.B, [ F("id", "id"), F("c_bar", "c.bar"), F("c_bar_trans", "c.bar", tra...
<commit_before><commit_msg>Add a test for query_result_to_dict<commit_after>
import unittest from . import models from sir.schema.searchentities import SearchEntity as E, SearchField as F class QueryResultToDictTest(unittest.TestCase): def setUp(self): self.entity = E(models.B, [ F("id", "id"), F("c_bar", "c.bar"), F("c_bar_trans", "c.bar", tra...
Add a test for query_result_to_dictimport unittest from . import models from sir.schema.searchentities import SearchEntity as E, SearchField as F class QueryResultToDictTest(unittest.TestCase): def setUp(self): self.entity = E(models.B, [ F("id", "id"), F("c_bar", "c.bar"), ...
<commit_before><commit_msg>Add a test for query_result_to_dict<commit_after>import unittest from . import models from sir.schema.searchentities import SearchEntity as E, SearchField as F class QueryResultToDictTest(unittest.TestCase): def setUp(self): self.entity = E(models.B, [ F("id", "id")...
aa110dca3b424141d57ad5804efc5e90db52aa3c
cfgrib/__main__.py
cfgrib/__main__.py
import argparse import sys from . import eccodes def main(): parser = argparse.ArgumentParser() parser.add_argument('--selfcheck', default=False, action='store_true') args = parser.parse_args() if args.selfcheck: eccodes.codes_get_api_version() print("Your system is ready.") else...
Add a basic selfcheck easily callable from the command line.
Add a basic selfcheck easily callable from the command line.
Python
apache-2.0
ecmwf/cfgrib
Add a basic selfcheck easily callable from the command line.
import argparse import sys from . import eccodes def main(): parser = argparse.ArgumentParser() parser.add_argument('--selfcheck', default=False, action='store_true') args = parser.parse_args() if args.selfcheck: eccodes.codes_get_api_version() print("Your system is ready.") else...
<commit_before><commit_msg>Add a basic selfcheck easily callable from the command line.<commit_after>
import argparse import sys from . import eccodes def main(): parser = argparse.ArgumentParser() parser.add_argument('--selfcheck', default=False, action='store_true') args = parser.parse_args() if args.selfcheck: eccodes.codes_get_api_version() print("Your system is ready.") else...
Add a basic selfcheck easily callable from the command line. import argparse import sys from . import eccodes def main(): parser = argparse.ArgumentParser() parser.add_argument('--selfcheck', default=False, action='store_true') args = parser.parse_args() if args.selfcheck: eccodes.codes_get_a...
<commit_before><commit_msg>Add a basic selfcheck easily callable from the command line.<commit_after> import argparse import sys from . import eccodes def main(): parser = argparse.ArgumentParser() parser.add_argument('--selfcheck', default=False, action='store_true') args = parser.parse_args() if ar...
803895453d3a243ec3e7d9cddc6d0479692282ee
final/problem4.py
final/problem4.py
# Problem 4 # 20.0 points possible (graded) # You are given the following definitions: # A run of monotonically increasing numbers means that a number at position k+1 in the sequence is greater than or equal to the number at position k in the sequence. # A run of monotonically decreasing numbers means that a number at...
Implement a function that returns the sum of the longest run
Implement a function that returns the sum of the longest run
Python
mit
Kunal57/MIT_6.00.1x
Implement a function that returns the sum of the longest run
# Problem 4 # 20.0 points possible (graded) # You are given the following definitions: # A run of monotonically increasing numbers means that a number at position k+1 in the sequence is greater than or equal to the number at position k in the sequence. # A run of monotonically decreasing numbers means that a number at...
<commit_before><commit_msg>Implement a function that returns the sum of the longest run<commit_after>
# Problem 4 # 20.0 points possible (graded) # You are given the following definitions: # A run of monotonically increasing numbers means that a number at position k+1 in the sequence is greater than or equal to the number at position k in the sequence. # A run of monotonically decreasing numbers means that a number at...
Implement a function that returns the sum of the longest run# Problem 4 # 20.0 points possible (graded) # You are given the following definitions: # A run of monotonically increasing numbers means that a number at position k+1 in the sequence is greater than or equal to the number at position k in the sequence. # A ru...
<commit_before><commit_msg>Implement a function that returns the sum of the longest run<commit_after># Problem 4 # 20.0 points possible (graded) # You are given the following definitions: # A run of monotonically increasing numbers means that a number at position k+1 in the sequence is greater than or equal to the num...
7da5da19c033d775cd04e927cd7c9df0f66bcea5
examples/test_hack_search.py
examples/test_hack_search.py
""" Testing the "self.set_attribute()" and "self.set_attributes()" methods to modify a Google search into becoming a Bing search. set_attribute() -> Modifies the attribute of the first matching element. set_attributes() -> Modifies the attribute of all matching elements. """ from seleniumbase import BaseCa...
Add test demonstrating set_attribute() and set_attributes()
Add test demonstrating set_attribute() and set_attributes()
Python
mit
mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase
Add test demonstrating set_attribute() and set_attributes()
""" Testing the "self.set_attribute()" and "self.set_attributes()" methods to modify a Google search into becoming a Bing search. set_attribute() -> Modifies the attribute of the first matching element. set_attributes() -> Modifies the attribute of all matching elements. """ from seleniumbase import BaseCa...
<commit_before><commit_msg>Add test demonstrating set_attribute() and set_attributes()<commit_after>
""" Testing the "self.set_attribute()" and "self.set_attributes()" methods to modify a Google search into becoming a Bing search. set_attribute() -> Modifies the attribute of the first matching element. set_attributes() -> Modifies the attribute of all matching elements. """ from seleniumbase import BaseCa...
Add test demonstrating set_attribute() and set_attributes()""" Testing the "self.set_attribute()" and "self.set_attributes()" methods to modify a Google search into becoming a Bing search. set_attribute() -> Modifies the attribute of the first matching element. set_attributes() -> Modifies the attribute of ...
<commit_before><commit_msg>Add test demonstrating set_attribute() and set_attributes()<commit_after>""" Testing the "self.set_attribute()" and "self.set_attributes()" methods to modify a Google search into becoming a Bing search. set_attribute() -> Modifies the attribute of the first matching element. set_a...
21d0c9ed87fba2ca706aa2c098d67094c1e43250
examples/formatted_output.py
examples/formatted_output.py
from diffr import diff a = [0] * 5 + ['-' * 5 + 'a' + '-' * 5] + [0] * 5 b = [0] * 5 + ['-' * 5 + 'b' + '-' * 5] + [0] * 5 d = diff(a, b) print('Print out the diff in full by default') print(d) print() print('Reduce the context by formatting with context_limit = 3') print('{:3c}'.format(d)) print() print('Reduce the ...
Add examples for diff formatting
Add examples for diff formatting
Python
mit
grahamegee/diffr
Add examples for diff formatting
from diffr import diff a = [0] * 5 + ['-' * 5 + 'a' + '-' * 5] + [0] * 5 b = [0] * 5 + ['-' * 5 + 'b' + '-' * 5] + [0] * 5 d = diff(a, b) print('Print out the diff in full by default') print(d) print() print('Reduce the context by formatting with context_limit = 3') print('{:3c}'.format(d)) print() print('Reduce the ...
<commit_before><commit_msg>Add examples for diff formatting<commit_after>
from diffr import diff a = [0] * 5 + ['-' * 5 + 'a' + '-' * 5] + [0] * 5 b = [0] * 5 + ['-' * 5 + 'b' + '-' * 5] + [0] * 5 d = diff(a, b) print('Print out the diff in full by default') print(d) print() print('Reduce the context by formatting with context_limit = 3') print('{:3c}'.format(d)) print() print('Reduce the ...
Add examples for diff formattingfrom diffr import diff a = [0] * 5 + ['-' * 5 + 'a' + '-' * 5] + [0] * 5 b = [0] * 5 + ['-' * 5 + 'b' + '-' * 5] + [0] * 5 d = diff(a, b) print('Print out the diff in full by default') print(d) print() print('Reduce the context by formatting with context_limit = 3') print('{:3c}'.forma...
<commit_before><commit_msg>Add examples for diff formatting<commit_after>from diffr import diff a = [0] * 5 + ['-' * 5 + 'a' + '-' * 5] + [0] * 5 b = [0] * 5 + ['-' * 5 + 'b' + '-' * 5] + [0] * 5 d = diff(a, b) print('Print out the diff in full by default') print(d) print() print('Reduce the context by formatting wit...
ff1b86135fc42fdd73b34902be248523020cbb2d
examples/rpc_dict_handler.py
examples/rpc_dict_handler.py
import asyncio import aiozmq import aiozmq.rpc @aiozmq.rpc.method def a(): return 'a' @aiozmq.rpc.method def b(): return 'b' handlers_dict = {'a': a, 'subnamespace': {'b': b} } @asyncio.coroutine def go(): server = yield from aiozmq.rpc.start_server( handlers...
Add example for dicts as Handler structure.
Add example for dicts as Handler structure.
Python
bsd-2-clause
aio-libs/aiozmq,MetaMemoryT/aiozmq,claws/aiozmq,asteven/aiozmq
Add example for dicts as Handler structure.
import asyncio import aiozmq import aiozmq.rpc @aiozmq.rpc.method def a(): return 'a' @aiozmq.rpc.method def b(): return 'b' handlers_dict = {'a': a, 'subnamespace': {'b': b} } @asyncio.coroutine def go(): server = yield from aiozmq.rpc.start_server( handlers...
<commit_before><commit_msg>Add example for dicts as Handler structure.<commit_after>
import asyncio import aiozmq import aiozmq.rpc @aiozmq.rpc.method def a(): return 'a' @aiozmq.rpc.method def b(): return 'b' handlers_dict = {'a': a, 'subnamespace': {'b': b} } @asyncio.coroutine def go(): server = yield from aiozmq.rpc.start_server( handlers...
Add example for dicts as Handler structure.import asyncio import aiozmq import aiozmq.rpc @aiozmq.rpc.method def a(): return 'a' @aiozmq.rpc.method def b(): return 'b' handlers_dict = {'a': a, 'subnamespace': {'b': b} } @asyncio.coroutine def go(): server = yield fro...
<commit_before><commit_msg>Add example for dicts as Handler structure.<commit_after>import asyncio import aiozmq import aiozmq.rpc @aiozmq.rpc.method def a(): return 'a' @aiozmq.rpc.method def b(): return 'b' handlers_dict = {'a': a, 'subnamespace': {'b': b} } @asyncio.c...
cd21f65fd42aa87105c42e3309a99ada3d25d144
corehq/apps/users/management/commands/set_locations_properly.py
corehq/apps/users/management/commands/set_locations_properly.py
from django.core.management.base import BaseCommand from corehq.apps.users.models import CommCareUser from corehq.apps.es import UserES from corehq.apps.locations.models import Location from dimagi.utils.couch.database import iter_docs def get_affected_ids(): users = (UserES() .mobile_users() ...
Fix where user_data and location_id don't match
Fix where user_data and location_id don't match
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq
Fix where user_data and location_id don't match
from django.core.management.base import BaseCommand from corehq.apps.users.models import CommCareUser from corehq.apps.es import UserES from corehq.apps.locations.models import Location from dimagi.utils.couch.database import iter_docs def get_affected_ids(): users = (UserES() .mobile_users() ...
<commit_before><commit_msg>Fix where user_data and location_id don't match<commit_after>
from django.core.management.base import BaseCommand from corehq.apps.users.models import CommCareUser from corehq.apps.es import UserES from corehq.apps.locations.models import Location from dimagi.utils.couch.database import iter_docs def get_affected_ids(): users = (UserES() .mobile_users() ...
Fix where user_data and location_id don't matchfrom django.core.management.base import BaseCommand from corehq.apps.users.models import CommCareUser from corehq.apps.es import UserES from corehq.apps.locations.models import Location from dimagi.utils.couch.database import iter_docs def get_affected_ids(): users =...
<commit_before><commit_msg>Fix where user_data and location_id don't match<commit_after>from django.core.management.base import BaseCommand from corehq.apps.users.models import CommCareUser from corehq.apps.es import UserES from corehq.apps.locations.models import Location from dimagi.utils.couch.database import iter_d...
ba8f89960a9932ad3da58e7959a74bec1b7ea745
backend/breach/migrations/0019_auto_20160729_1449.py
backend/breach/migrations/0019_auto_20160729_1449.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-07-29 14:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('breach', '0018_target_samplesize'), ] operations = [ migrations.AddField( ...
Add migration for calibration_wait, confidence_threshold, records, iteration, Victim recordscardinality
Add migration for calibration_wait, confidence_threshold, records, iteration, Victim recordscardinality
Python
mit
esarafianou/rupture,dimkarakostas/rupture,dimriou/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dionyziz/rupture,esarafianou/rupture,dimriou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,esarafianou/rupture,dim...
Add migration for calibration_wait, confidence_threshold, records, iteration, Victim recordscardinality
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-07-29 14:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('breach', '0018_target_samplesize'), ] operations = [ migrations.AddField( ...
<commit_before><commit_msg>Add migration for calibration_wait, confidence_threshold, records, iteration, Victim recordscardinality<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-07-29 14:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('breach', '0018_target_samplesize'), ] operations = [ migrations.AddField( ...
Add migration for calibration_wait, confidence_threshold, records, iteration, Victim recordscardinality# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-07-29 14:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ...
<commit_before><commit_msg>Add migration for calibration_wait, confidence_threshold, records, iteration, Victim recordscardinality<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-07-29 14:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migr...
aaec2e3a742f0c5962508feef09f6fee61167fac
benchmarks/expand2.py
benchmarks/expand2.py
import sys sys.path.append("..") from timeit import default_timer as clock from csympy import var var("x y z w") e = (x+y+z+w)**15 f = e*(e+w) print f t1 = clock() g = f.expand() t2 = clock() print "Total time:", t2-t1, "s"
Add Python version of the benchmark
Add Python version of the benchmark
Python
mit
bjodah/symengine.py,bjodah/symengine.py,bjodah/symengine.py,symengine/symengine.py,symengine/symengine.py,symengine/symengine.py
Add Python version of the benchmark
import sys sys.path.append("..") from timeit import default_timer as clock from csympy import var var("x y z w") e = (x+y+z+w)**15 f = e*(e+w) print f t1 = clock() g = f.expand() t2 = clock() print "Total time:", t2-t1, "s"
<commit_before><commit_msg>Add Python version of the benchmark<commit_after>
import sys sys.path.append("..") from timeit import default_timer as clock from csympy import var var("x y z w") e = (x+y+z+w)**15 f = e*(e+w) print f t1 = clock() g = f.expand() t2 = clock() print "Total time:", t2-t1, "s"
Add Python version of the benchmarkimport sys sys.path.append("..") from timeit import default_timer as clock from csympy import var var("x y z w") e = (x+y+z+w)**15 f = e*(e+w) print f t1 = clock() g = f.expand() t2 = clock() print "Total time:", t2-t1, "s"
<commit_before><commit_msg>Add Python version of the benchmark<commit_after>import sys sys.path.append("..") from timeit import default_timer as clock from csympy import var var("x y z w") e = (x+y+z+w)**15 f = e*(e+w) print f t1 = clock() g = f.expand() t2 = clock() print "Total time:", t2-t1, "s"
835261d9aaf66ff3d768d68d4a18645c608ba5ce
heufybot/modules/__init__.py
heufybot/modules/__init__.py
from twisted.plugin import pluginPackagePaths import os # From txircd: # https://github.com/ElementalAlchemist/txircd/blob/8832098149b7c5f9b0708efe5c836c8160b0c7e6/txircd/modules/__init__.py __path__.extend(pluginPackagePaths(__name__)) for directory, subdirs, files in os.walk(os.path.dirname(os.path.realpath(__file_...
Set up a package for modules
Set up a package for modules
Python
mit
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
Set up a package for modules
from twisted.plugin import pluginPackagePaths import os # From txircd: # https://github.com/ElementalAlchemist/txircd/blob/8832098149b7c5f9b0708efe5c836c8160b0c7e6/txircd/modules/__init__.py __path__.extend(pluginPackagePaths(__name__)) for directory, subdirs, files in os.walk(os.path.dirname(os.path.realpath(__file_...
<commit_before><commit_msg>Set up a package for modules<commit_after>
from twisted.plugin import pluginPackagePaths import os # From txircd: # https://github.com/ElementalAlchemist/txircd/blob/8832098149b7c5f9b0708efe5c836c8160b0c7e6/txircd/modules/__init__.py __path__.extend(pluginPackagePaths(__name__)) for directory, subdirs, files in os.walk(os.path.dirname(os.path.realpath(__file_...
Set up a package for modulesfrom twisted.plugin import pluginPackagePaths import os # From txircd: # https://github.com/ElementalAlchemist/txircd/blob/8832098149b7c5f9b0708efe5c836c8160b0c7e6/txircd/modules/__init__.py __path__.extend(pluginPackagePaths(__name__)) for directory, subdirs, files in os.walk(os.path.dirn...
<commit_before><commit_msg>Set up a package for modules<commit_after>from twisted.plugin import pluginPackagePaths import os # From txircd: # https://github.com/ElementalAlchemist/txircd/blob/8832098149b7c5f9b0708efe5c836c8160b0c7e6/txircd/modules/__init__.py __path__.extend(pluginPackagePaths(__name__)) for director...
c8882e19c8c4b09c91e19cd4cbe3c59e8754a084
thinc/neural/tests/unit/Model/test_defaults_no_args.py
thinc/neural/tests/unit/Model/test_defaults_no_args.py
import pytest from flexmock import flexmock from .... import base @pytest.fixture def model_with_no_args(): flexmock(base.Model) base.Model.should_receive('_args2kwargs').and_return({}) base.Model.should_receive('_update_defaults').and_return({}) base.Model.should_receive('setup').and_return(None) ...
Add tests for no-args default on base class.
Add tests for no-args default on base class.
Python
mit
spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc
Add tests for no-args default on base class.
import pytest from flexmock import flexmock from .... import base @pytest.fixture def model_with_no_args(): flexmock(base.Model) base.Model.should_receive('_args2kwargs').and_return({}) base.Model.should_receive('_update_defaults').and_return({}) base.Model.should_receive('setup').and_return(None) ...
<commit_before><commit_msg>Add tests for no-args default on base class.<commit_after>
import pytest from flexmock import flexmock from .... import base @pytest.fixture def model_with_no_args(): flexmock(base.Model) base.Model.should_receive('_args2kwargs').and_return({}) base.Model.should_receive('_update_defaults').and_return({}) base.Model.should_receive('setup').and_return(None) ...
Add tests for no-args default on base class.import pytest from flexmock import flexmock from .... import base @pytest.fixture def model_with_no_args(): flexmock(base.Model) base.Model.should_receive('_args2kwargs').and_return({}) base.Model.should_receive('_update_defaults').and_return({}) base.Model...
<commit_before><commit_msg>Add tests for no-args default on base class.<commit_after>import pytest from flexmock import flexmock from .... import base @pytest.fixture def model_with_no_args(): flexmock(base.Model) base.Model.should_receive('_args2kwargs').and_return({}) base.Model.should_receive('_update...
5e1272c7c442c759116d6f85fc587514ce97b667
scripts/list-components.py
scripts/list-components.py
"""Prints the names of components installed on a WMT executor.""" import os import yaml wmt_executor = os.environ['wmt_executor'] cfg_file = 'wmt-config-' + wmt_executor + '.yaml' try: with open(cfg_file, 'r') as fp: cfg = yaml.safe_load(fp) except IOError: raise components = cfg['components'].keys(...
Add script to print components installed on executor
Add script to print components installed on executor It reads them from the YAML file output from `cmt-config`.
Python
mit
csdms/wmt-metadata
Add script to print components installed on executor It reads them from the YAML file output from `cmt-config`.
"""Prints the names of components installed on a WMT executor.""" import os import yaml wmt_executor = os.environ['wmt_executor'] cfg_file = 'wmt-config-' + wmt_executor + '.yaml' try: with open(cfg_file, 'r') as fp: cfg = yaml.safe_load(fp) except IOError: raise components = cfg['components'].keys(...
<commit_before><commit_msg>Add script to print components installed on executor It reads them from the YAML file output from `cmt-config`.<commit_after>
"""Prints the names of components installed on a WMT executor.""" import os import yaml wmt_executor = os.environ['wmt_executor'] cfg_file = 'wmt-config-' + wmt_executor + '.yaml' try: with open(cfg_file, 'r') as fp: cfg = yaml.safe_load(fp) except IOError: raise components = cfg['components'].keys(...
Add script to print components installed on executor It reads them from the YAML file output from `cmt-config`."""Prints the names of components installed on a WMT executor.""" import os import yaml wmt_executor = os.environ['wmt_executor'] cfg_file = 'wmt-config-' + wmt_executor + '.yaml' try: with open(cfg_fi...
<commit_before><commit_msg>Add script to print components installed on executor It reads them from the YAML file output from `cmt-config`.<commit_after>"""Prints the names of components installed on a WMT executor.""" import os import yaml wmt_executor = os.environ['wmt_executor'] cfg_file = 'wmt-config-' + wmt_execu...
595e111542770c8004317a1d739823342a87cedc
main.py
main.py
import praw from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=user_agent) oauth_helper = PrawOAuth2Mini(reddit...
Add the basic flask app
Add the basic flask app
Python
mit
avinassh/kekday,avinassh/kekday
Add the basic flask app
import praw from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=user_agent) oauth_helper = PrawOAuth2Mini(reddit...
<commit_before><commit_msg>Add the basic flask app<commit_after>
import praw from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=user_agent) oauth_helper = PrawOAuth2Mini(reddit...
Add the basic flask appimport praw from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=user_agent) oauth_helper ...
<commit_before><commit_msg>Add the basic flask app<commit_after>import praw from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Re...
525be155604d5938ba752f31bbfb7fbf4e61dbd5
bin/trim_fasta_alignment.py
bin/trim_fasta_alignment.py
""" Trim a fasta alignment file based on the columns with - and then remove sequences that don't have enough coverage. We assume all the sequences are the same length """ import os import sys import argparse def read_fasta(fname): """ Read a fasta file and return a hash. :param fname: The file name to re...
Trim a fasta alingment based on coverage and final sequence length.
Trim a fasta alingment based on coverage and final sequence length.
Python
mit
linsalrob/crAssphage,linsalrob/crAssphage,linsalrob/crAssphage
Trim a fasta alingment based on coverage and final sequence length.
""" Trim a fasta alignment file based on the columns with - and then remove sequences that don't have enough coverage. We assume all the sequences are the same length """ import os import sys import argparse def read_fasta(fname): """ Read a fasta file and return a hash. :param fname: The file name to re...
<commit_before><commit_msg>Trim a fasta alingment based on coverage and final sequence length.<commit_after>
""" Trim a fasta alignment file based on the columns with - and then remove sequences that don't have enough coverage. We assume all the sequences are the same length """ import os import sys import argparse def read_fasta(fname): """ Read a fasta file and return a hash. :param fname: The file name to re...
Trim a fasta alingment based on coverage and final sequence length.""" Trim a fasta alignment file based on the columns with - and then remove sequences that don't have enough coverage. We assume all the sequences are the same length """ import os import sys import argparse def read_fasta(fname): """ Read a ...
<commit_before><commit_msg>Trim a fasta alingment based on coverage and final sequence length.<commit_after>""" Trim a fasta alignment file based on the columns with - and then remove sequences that don't have enough coverage. We assume all the sequences are the same length """ import os import sys import argparse d...
12ee53b4ec4d4fafd7f7af692dda0b0553b82226
metpy/io/tests/test_nexrad.py
metpy/io/tests/test_nexrad.py
import os.path from numpy.testing import TestCase from metpy.io.nexrad import Level2File, Level3File curdir, f = os.path.split(__file__) datadir = os.path.join(curdir, '../../../examples/testdata') class TestLevel3(TestCase): def test_basic(self): Level3File(os.path.join(datadir, 'nids/Level3_FFC_N0Q_201...
import glob import os.path from numpy.testing import TestCase from metpy.io.nexrad import Level2File, Level3File curdir, f = os.path.split(__file__) datadir = os.path.join(curdir, '../../../examples/testdata') def test_generator(): for fname in glob.glob(os.path.join(datadir, 'nids', 'KOUN*')): yield rea...
Add parameterized test for nids.
Add parameterized test for nids.
Python
bsd-3-clause
ahaberlie/MetPy,Unidata/MetPy,dopplershift/MetPy,deeplycloudy/MetPy,jrleeman/MetPy,dopplershift/MetPy,jrleeman/MetPy,ahill818/MetPy,Unidata/MetPy,ShawnMurd/MetPy,ahaberlie/MetPy
import os.path from numpy.testing import TestCase from metpy.io.nexrad import Level2File, Level3File curdir, f = os.path.split(__file__) datadir = os.path.join(curdir, '../../../examples/testdata') class TestLevel3(TestCase): def test_basic(self): Level3File(os.path.join(datadir, 'nids/Level3_FFC_N0Q_201...
import glob import os.path from numpy.testing import TestCase from metpy.io.nexrad import Level2File, Level3File curdir, f = os.path.split(__file__) datadir = os.path.join(curdir, '../../../examples/testdata') def test_generator(): for fname in glob.glob(os.path.join(datadir, 'nids', 'KOUN*')): yield rea...
<commit_before>import os.path from numpy.testing import TestCase from metpy.io.nexrad import Level2File, Level3File curdir, f = os.path.split(__file__) datadir = os.path.join(curdir, '../../../examples/testdata') class TestLevel3(TestCase): def test_basic(self): Level3File(os.path.join(datadir, 'nids/Lev...
import glob import os.path from numpy.testing import TestCase from metpy.io.nexrad import Level2File, Level3File curdir, f = os.path.split(__file__) datadir = os.path.join(curdir, '../../../examples/testdata') def test_generator(): for fname in glob.glob(os.path.join(datadir, 'nids', 'KOUN*')): yield rea...
import os.path from numpy.testing import TestCase from metpy.io.nexrad import Level2File, Level3File curdir, f = os.path.split(__file__) datadir = os.path.join(curdir, '../../../examples/testdata') class TestLevel3(TestCase): def test_basic(self): Level3File(os.path.join(datadir, 'nids/Level3_FFC_N0Q_201...
<commit_before>import os.path from numpy.testing import TestCase from metpy.io.nexrad import Level2File, Level3File curdir, f = os.path.split(__file__) datadir = os.path.join(curdir, '../../../examples/testdata') class TestLevel3(TestCase): def test_basic(self): Level3File(os.path.join(datadir, 'nids/Lev...
4a57664fee968713aa33fa06b482b775058cef4f
steve/tests/test_restapi.py
steve/tests/test_restapi.py
from unittest import TestCase from nose.tools import eq_ from steve.restapi import urljoin class UrlJoinTestCase(TestCase): def test_urljoin(self): for base, args, expected in [ ('http://localhost', ['path1'], 'http://localhost/path1'), ('http://localhost/path1', ['...
Add test case for urljoin
Add test case for urljoin
Python
bsd-2-clause
CarlFK/steve,willkg/steve,willkg/steve,pyvideo/steve,CarlFK/steve,CarlFK/steve,pyvideo/steve,willkg/steve,pyvideo/steve
Add test case for urljoin
from unittest import TestCase from nose.tools import eq_ from steve.restapi import urljoin class UrlJoinTestCase(TestCase): def test_urljoin(self): for base, args, expected in [ ('http://localhost', ['path1'], 'http://localhost/path1'), ('http://localhost/path1', ['...
<commit_before><commit_msg>Add test case for urljoin<commit_after>
from unittest import TestCase from nose.tools import eq_ from steve.restapi import urljoin class UrlJoinTestCase(TestCase): def test_urljoin(self): for base, args, expected in [ ('http://localhost', ['path1'], 'http://localhost/path1'), ('http://localhost/path1', ['...
Add test case for urljoinfrom unittest import TestCase from nose.tools import eq_ from steve.restapi import urljoin class UrlJoinTestCase(TestCase): def test_urljoin(self): for base, args, expected in [ ('http://localhost', ['path1'], 'http://localhost/path1'), ('ht...
<commit_before><commit_msg>Add test case for urljoin<commit_after>from unittest import TestCase from nose.tools import eq_ from steve.restapi import urljoin class UrlJoinTestCase(TestCase): def test_urljoin(self): for base, args, expected in [ ('http://localhost', ['path1'], 'ht...
3511498f98d582afe6e08f8c2f5168ae66489444
fluent_contents/plugins/gist/migrations/0001_initial.py
fluent_contents/plugins/gist/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ] operations = [ migrations.CreateModel( name='GistItem', fields=...
Add Django 1.7 migration for gist plugin
Add Django 1.7 migration for gist plugin
Python
apache-2.0
ixc/django-fluent-contents,edoburu/django-fluent-contents,django-fluent/django-fluent-contents,jpotterm/django-fluent-contents,edoburu/django-fluent-contents,jpotterm/django-fluent-contents,jpotterm/django-fluent-contents,edoburu/django-fluent-contents,ixc/django-fluent-contents,django-fluent/django-fluent-contents,ixc...
Add Django 1.7 migration for gist plugin
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ] operations = [ migrations.CreateModel( name='GistItem', fields=...
<commit_before><commit_msg>Add Django 1.7 migration for gist plugin<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ] operations = [ migrations.CreateModel( name='GistItem', fields=...
Add Django 1.7 migration for gist plugin# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ] operations = [ migrations.CreateModel( ...
<commit_before><commit_msg>Add Django 1.7 migration for gist plugin<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ] operations = [...
b208beafa5e060b4c2effb946f6dfda94aee8423
load_data.py
load_data.py
""" Creates a nice tidy pickle file of the data in the data/ directory. """ import os import csv from collections import defaultdict class Position: """ A position for fantasy football. """ def __init__(self, title, players=[]): if title in [QB, RB, WR, TE, DEF, ST, K]: self.title ...
Add data loader script with a couple classes. Not finished yet...
Add data loader script with a couple classes. Not finished yet...
Python
mit
bjlange/revenge,bjlange/revenge
Add data loader script with a couple classes. Not finished yet...
""" Creates a nice tidy pickle file of the data in the data/ directory. """ import os import csv from collections import defaultdict class Position: """ A position for fantasy football. """ def __init__(self, title, players=[]): if title in [QB, RB, WR, TE, DEF, ST, K]: self.title ...
<commit_before><commit_msg>Add data loader script with a couple classes. Not finished yet...<commit_after>
""" Creates a nice tidy pickle file of the data in the data/ directory. """ import os import csv from collections import defaultdict class Position: """ A position for fantasy football. """ def __init__(self, title, players=[]): if title in [QB, RB, WR, TE, DEF, ST, K]: self.title ...
Add data loader script with a couple classes. Not finished yet...""" Creates a nice tidy pickle file of the data in the data/ directory. """ import os import csv from collections import defaultdict class Position: """ A position for fantasy football. """ def __init__(self, title, players=[]): ...
<commit_before><commit_msg>Add data loader script with a couple classes. Not finished yet...<commit_after>""" Creates a nice tidy pickle file of the data in the data/ directory. """ import os import csv from collections import defaultdict class Position: """ A position for fantasy football. """ def __...
66eb71614deccf1825f087e56e493cc6215bba92
scripts/calculate_lqr_gain.py
scripts/calculate_lqr_gain.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import scipy import control from dtk.bicycle import benchmark_state_space_vs_speed, benchmark_matrices def compute_whipple_lqr_gain(velocity): _, A, B = benchmark_state_space_vs_speed(*benchmark_matrices(), velocity) Q = np.diag([1e5, 1e3, 1e3, ...
Add script to compute LQR gains
Add script to compute LQR gains
Python
bsd-2-clause
oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos
Add script to compute LQR gains
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import scipy import control from dtk.bicycle import benchmark_state_space_vs_speed, benchmark_matrices def compute_whipple_lqr_gain(velocity): _, A, B = benchmark_state_space_vs_speed(*benchmark_matrices(), velocity) Q = np.diag([1e5, 1e3, 1e3, ...
<commit_before><commit_msg>Add script to compute LQR gains<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import scipy import control from dtk.bicycle import benchmark_state_space_vs_speed, benchmark_matrices def compute_whipple_lqr_gain(velocity): _, A, B = benchmark_state_space_vs_speed(*benchmark_matrices(), velocity) Q = np.diag([1e5, 1e3, 1e3, ...
Add script to compute LQR gains#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import scipy import control from dtk.bicycle import benchmark_state_space_vs_speed, benchmark_matrices def compute_whipple_lqr_gain(velocity): _, A, B = benchmark_state_space_vs_speed(*benchmark_matrices(), velocity) ...
<commit_before><commit_msg>Add script to compute LQR gains<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import scipy import control from dtk.bicycle import benchmark_state_space_vs_speed, benchmark_matrices def compute_whipple_lqr_gain(velocity): _, A, B = benchmark_state_space_vs...
dbf39babaacc8c6407620b7d6d6e5cb568a99940
conf_site/proposals/migrations/0003_add_disclaimer.py
conf_site/proposals/migrations/0003_add_disclaimer.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-01-19 05:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('proposals', '0002_add_under_represented_population_questions'), ] operations = [ ...
Add missing migration from proposals application.
Add missing migration from proposals application. See e4b9588275dda17a70ba13fc3997b7dc20f66f57.
Python
mit
pydata/conf_site,pydata/conf_site,pydata/conf_site
Add missing migration from proposals application. See e4b9588275dda17a70ba13fc3997b7dc20f66f57.
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-01-19 05:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('proposals', '0002_add_under_represented_population_questions'), ] operations = [ ...
<commit_before><commit_msg>Add missing migration from proposals application. See e4b9588275dda17a70ba13fc3997b7dc20f66f57.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-01-19 05:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('proposals', '0002_add_under_represented_population_questions'), ] operations = [ ...
Add missing migration from proposals application. See e4b9588275dda17a70ba13fc3997b7dc20f66f57.# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-01-19 05:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ...
<commit_before><commit_msg>Add missing migration from proposals application. See e4b9588275dda17a70ba13fc3997b7dc20f66f57.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-01-19 05:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations...
3f8b118eed23434b9784013d88e4f35a4be160ec
mom1_grid.py
mom1_grid.py
#!/usr/bin/env python from __future__ import print_function import numpy as np import netCDF4 as nc from base_grid import BaseGrid class Mom1Grid(BaseGrid): def __init__(self, h_grid_def, v_grid_def=None, mask_file=None, description='MOM tripolar'): """ MOM 1 degree grid. ...
Add 1 deg MOM grid.
Add 1 deg MOM grid.
Python
apache-2.0
DoublePrecision/esmgrids
Add 1 deg MOM grid.
#!/usr/bin/env python from __future__ import print_function import numpy as np import netCDF4 as nc from base_grid import BaseGrid class Mom1Grid(BaseGrid): def __init__(self, h_grid_def, v_grid_def=None, mask_file=None, description='MOM tripolar'): """ MOM 1 degree grid. ...
<commit_before><commit_msg>Add 1 deg MOM grid.<commit_after>
#!/usr/bin/env python from __future__ import print_function import numpy as np import netCDF4 as nc from base_grid import BaseGrid class Mom1Grid(BaseGrid): def __init__(self, h_grid_def, v_grid_def=None, mask_file=None, description='MOM tripolar'): """ MOM 1 degree grid. ...
Add 1 deg MOM grid.#!/usr/bin/env python from __future__ import print_function import numpy as np import netCDF4 as nc from base_grid import BaseGrid class Mom1Grid(BaseGrid): def __init__(self, h_grid_def, v_grid_def=None, mask_file=None, description='MOM tripolar'): """ MO...
<commit_before><commit_msg>Add 1 deg MOM grid.<commit_after>#!/usr/bin/env python from __future__ import print_function import numpy as np import netCDF4 as nc from base_grid import BaseGrid class Mom1Grid(BaseGrid): def __init__(self, h_grid_def, v_grid_def=None, mask_file=None, descriptio...
2d59e08a2308340fa48d3634f9d6404231a92446
14B-088/HI/analysis/HI_pvslices_thin.py
14B-088/HI/analysis/HI_pvslices_thin.py
''' Create a set of thin PV slices ''' from spectral_cube import SpectralCube, Projection from astropy.io import fits from astropy import units as u import numpy as np from cube_analysis.disk_pvslices import disk_pvslices from paths import fourteenB_HI_data_wGBT_path, fourteenB_wGBT_HI_file_dict from galaxy_params ...
Create set of thing pv-slices across the disk
Create set of thing pv-slices across the disk
Python
mit
e-koch/VLA_Lband,e-koch/VLA_Lband
Create set of thing pv-slices across the disk
''' Create a set of thin PV slices ''' from spectral_cube import SpectralCube, Projection from astropy.io import fits from astropy import units as u import numpy as np from cube_analysis.disk_pvslices import disk_pvslices from paths import fourteenB_HI_data_wGBT_path, fourteenB_wGBT_HI_file_dict from galaxy_params ...
<commit_before><commit_msg>Create set of thing pv-slices across the disk<commit_after>
''' Create a set of thin PV slices ''' from spectral_cube import SpectralCube, Projection from astropy.io import fits from astropy import units as u import numpy as np from cube_analysis.disk_pvslices import disk_pvslices from paths import fourteenB_HI_data_wGBT_path, fourteenB_wGBT_HI_file_dict from galaxy_params ...
Create set of thing pv-slices across the disk ''' Create a set of thin PV slices ''' from spectral_cube import SpectralCube, Projection from astropy.io import fits from astropy import units as u import numpy as np from cube_analysis.disk_pvslices import disk_pvslices from paths import fourteenB_HI_data_wGBT_path, fo...
<commit_before><commit_msg>Create set of thing pv-slices across the disk<commit_after> ''' Create a set of thin PV slices ''' from spectral_cube import SpectralCube, Projection from astropy.io import fits from astropy import units as u import numpy as np from cube_analysis.disk_pvslices import disk_pvslices from pat...
68e57778ceca4b8085959c45dc0d746dddc82489
midi/examples/printmidiin.py
midi/examples/printmidiin.py
import pyb from mid.midiin import MidiIn def midi_printer(msg): print(tuple(msg)) def loop(midiin): while True: midiin.poll() pyb.udelay(500) uart = py.UART(2, 31250) midiin = MidiIn(uart, callback=midi_printer) loop(midiin)
Add simple midi input example script
Add simple midi input example script
Python
mit
SpotlightKid/micropython-stm-lib
Add simple midi input example script
import pyb from mid.midiin import MidiIn def midi_printer(msg): print(tuple(msg)) def loop(midiin): while True: midiin.poll() pyb.udelay(500) uart = py.UART(2, 31250) midiin = MidiIn(uart, callback=midi_printer) loop(midiin)
<commit_before><commit_msg>Add simple midi input example script<commit_after>
import pyb from mid.midiin import MidiIn def midi_printer(msg): print(tuple(msg)) def loop(midiin): while True: midiin.poll() pyb.udelay(500) uart = py.UART(2, 31250) midiin = MidiIn(uart, callback=midi_printer) loop(midiin)
Add simple midi input example scriptimport pyb from mid.midiin import MidiIn def midi_printer(msg): print(tuple(msg)) def loop(midiin): while True: midiin.poll() pyb.udelay(500) uart = py.UART(2, 31250) midiin = MidiIn(uart, callback=midi_printer) loop(midiin)
<commit_before><commit_msg>Add simple midi input example script<commit_after>import pyb from mid.midiin import MidiIn def midi_printer(msg): print(tuple(msg)) def loop(midiin): while True: midiin.poll() pyb.udelay(500) uart = py.UART(2, 31250) midiin = MidiIn(uart, callback=midi_printer) lo...
236d707697ba0aa68d2549f2c8bc6e4d038dd626
cw_model.py
cw_model.py
class CWModel(object): def __init__(self, json_dict=None): if json_dict is not None: self.__dict__.update(json_dict) def __repr__(self): string = '' for k, v in self.__dict__.items(): string = ''.join([string, '{}: {}\n'.format(k, v)]) return s...
Add super model class via upload
Add super model class via upload
Python
mit
joshuamsmith/ConnectPyse
Add super model class via upload
class CWModel(object): def __init__(self, json_dict=None): if json_dict is not None: self.__dict__.update(json_dict) def __repr__(self): string = '' for k, v in self.__dict__.items(): string = ''.join([string, '{}: {}\n'.format(k, v)]) return s...
<commit_before><commit_msg>Add super model class via upload<commit_after>
class CWModel(object): def __init__(self, json_dict=None): if json_dict is not None: self.__dict__.update(json_dict) def __repr__(self): string = '' for k, v in self.__dict__.items(): string = ''.join([string, '{}: {}\n'.format(k, v)]) return s...
Add super model class via upload class CWModel(object): def __init__(self, json_dict=None): if json_dict is not None: self.__dict__.update(json_dict) def __repr__(self): string = '' for k, v in self.__dict__.items(): string = ''.join([string, '{}: {}\n'....
<commit_before><commit_msg>Add super model class via upload<commit_after> class CWModel(object): def __init__(self, json_dict=None): if json_dict is not None: self.__dict__.update(json_dict) def __repr__(self): string = '' for k, v in self.__dict__.items(): ...
efdd5de9ee67814b7c99aaaaf22fedb4578777b9
froide/comments/migrations/0002_auto_20210505_1720.py
froide/comments/migrations/0002_auto_20210505_1720.py
# Generated by Django 3.1.8 on 2021-05-05 15:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('comments', '0001_initial'), ] operations = [ migrations.AlterField( model_name='froidecomment', name='is_removed', ...
Add migration from django conrib comments update
Add migration from django conrib comments update
Python
mit
fin/froide,fin/froide,fin/froide,fin/froide
Add migration from django conrib comments update
# Generated by Django 3.1.8 on 2021-05-05 15:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('comments', '0001_initial'), ] operations = [ migrations.AlterField( model_name='froidecomment', name='is_removed', ...
<commit_before><commit_msg>Add migration from django conrib comments update<commit_after>
# Generated by Django 3.1.8 on 2021-05-05 15:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('comments', '0001_initial'), ] operations = [ migrations.AlterField( model_name='froidecomment', name='is_removed', ...
Add migration from django conrib comments update# Generated by Django 3.1.8 on 2021-05-05 15:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('comments', '0001_initial'), ] operations = [ migrations.AlterField( model_name='...
<commit_before><commit_msg>Add migration from django conrib comments update<commit_after># Generated by Django 3.1.8 on 2021-05-05 15:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('comments', '0001_initial'), ] operations = [ migrat...
c59fdbe03341843cbc9eb23d71c84376e71d55a1
conda_env/main_env.py
conda_env/main_env.py
from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --json """ def ...
from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --json """ def ...
Update to work with the latest iteration
Update to work with the latest iteration
Python
bsd-3-clause
ESSS/conda-env,conda/conda-env,conda/conda-env,dan-blanchard/conda-env,asmeurer/conda-env,nicoddemus/conda-env,isaac-kit/conda-env,phobson/conda-env,dan-blanchard/conda-env,asmeurer/conda-env,phobson/conda-env,nicoddemus/conda-env,ESSS/conda-env,mikecroucher/conda-env,mikecroucher/conda-env,isaac-kit/conda-env
from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --json """ def ...
from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --json """ def ...
<commit_before>from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --...
from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --json """ def ...
from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --json """ def ...
<commit_before>from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --...
e2c3e511236715390789acc35fd69f0b51f61ae8
multiproc-test.py
multiproc-test.py
import cv2 import CameraReaderAsync # Initialize debugMode = True camera = cv2.VideoCapture(0) camera.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, 640) camera.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, 480) cameraReader = CameraReaderAsync.CameraReaderAsync(camera) # Main Loop framesToProcess = 60 * 5 while debugMode or framesToPro...
Test file for multiproc experiments.
Test file for multiproc experiments.
Python
mit
AluminatiFRC/Vision2016,AluminatiFRC/Vision2016
Test file for multiproc experiments.
import cv2 import CameraReaderAsync # Initialize debugMode = True camera = cv2.VideoCapture(0) camera.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, 640) camera.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, 480) cameraReader = CameraReaderAsync.CameraReaderAsync(camera) # Main Loop framesToProcess = 60 * 5 while debugMode or framesToPro...
<commit_before><commit_msg>Test file for multiproc experiments.<commit_after>
import cv2 import CameraReaderAsync # Initialize debugMode = True camera = cv2.VideoCapture(0) camera.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, 640) camera.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, 480) cameraReader = CameraReaderAsync.CameraReaderAsync(camera) # Main Loop framesToProcess = 60 * 5 while debugMode or framesToPro...
Test file for multiproc experiments.import cv2 import CameraReaderAsync # Initialize debugMode = True camera = cv2.VideoCapture(0) camera.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, 640) camera.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, 480) cameraReader = CameraReaderAsync.CameraReaderAsync(camera) # Main Loop framesToProcess = 6...
<commit_before><commit_msg>Test file for multiproc experiments.<commit_after>import cv2 import CameraReaderAsync # Initialize debugMode = True camera = cv2.VideoCapture(0) camera.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, 640) camera.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, 480) cameraReader = CameraReaderAsync.CameraReaderAsync...
6698dcb505fe93bf49f85cebfb5afeffe296118d
src/pyvision/data/ml/ml.py
src/pyvision/data/ml/ml.py
''' Created on Jan 14, 2010 @author: bolme ''' import pyvision as pv import numpy as np import csv import os.path from pyvision.vector.SVM import SVM from pyvision.vector.LDA import trainLDA IRIS_PATH = os.path.join(pv.__path__[0],'data','ml','iris.csv') reader = csv.reader(open(IRIS_PATH, "rb")) data = [] labels...
Load and test the iris data
Load and test the iris data git-svn-id: f502b99eb1c95a567c3db4e21cd7828f3e46dcfd@123 2a83181e-c148-0410-bf7c-9f1693d9d8f0
Python
bsd-3-clause
svohara/pyvision,svohara/pyvision,tigerking/pyvision,svohara/pyvision,hitdong/pyvision,mikeseven/pyvision,hitdong/pyvision,hitdong/pyvision,mikeseven/pyvision,tigerking/pyvision,tigerking/pyvision,mikeseven/pyvision
Load and test the iris data git-svn-id: f502b99eb1c95a567c3db4e21cd7828f3e46dcfd@123 2a83181e-c148-0410-bf7c-9f1693d9d8f0
''' Created on Jan 14, 2010 @author: bolme ''' import pyvision as pv import numpy as np import csv import os.path from pyvision.vector.SVM import SVM from pyvision.vector.LDA import trainLDA IRIS_PATH = os.path.join(pv.__path__[0],'data','ml','iris.csv') reader = csv.reader(open(IRIS_PATH, "rb")) data = [] labels...
<commit_before><commit_msg>Load and test the iris data git-svn-id: f502b99eb1c95a567c3db4e21cd7828f3e46dcfd@123 2a83181e-c148-0410-bf7c-9f1693d9d8f0<commit_after>
''' Created on Jan 14, 2010 @author: bolme ''' import pyvision as pv import numpy as np import csv import os.path from pyvision.vector.SVM import SVM from pyvision.vector.LDA import trainLDA IRIS_PATH = os.path.join(pv.__path__[0],'data','ml','iris.csv') reader = csv.reader(open(IRIS_PATH, "rb")) data = [] labels...
Load and test the iris data git-svn-id: f502b99eb1c95a567c3db4e21cd7828f3e46dcfd@123 2a83181e-c148-0410-bf7c-9f1693d9d8f0''' Created on Jan 14, 2010 @author: bolme ''' import pyvision as pv import numpy as np import csv import os.path from pyvision.vector.SVM import SVM from pyvision.vector.LDA import trainLDA IRI...
<commit_before><commit_msg>Load and test the iris data git-svn-id: f502b99eb1c95a567c3db4e21cd7828f3e46dcfd@123 2a83181e-c148-0410-bf7c-9f1693d9d8f0<commit_after>''' Created on Jan 14, 2010 @author: bolme ''' import pyvision as pv import numpy as np import csv import os.path from pyvision.vector.SVM import SVM from ...
947890834673ffb29943f8f35843f82de2cc34c5
scripts/memory_check.py
scripts/memory_check.py
""" This is a convenience script to test the speed and memory usage of Jedi with large libraries. Each library is preloaded by jedi, recording the time and memory consumed by each operation. You can provide additional libraries via command line arguments. Note: This requires the psutil library, available on PyPI. ""...
Add a module to test the memory usage with large libaries
Add a module to test the memory usage with large libaries
Python
mit
WoLpH/jedi,mfussenegger/jedi,mfussenegger/jedi,flurischt/jedi,jonashaag/jedi,flurischt/jedi,WoLpH/jedi,jonashaag/jedi,tjwei/jedi,tjwei/jedi,dwillmer/jedi,dwillmer/jedi
Add a module to test the memory usage with large libaries
""" This is a convenience script to test the speed and memory usage of Jedi with large libraries. Each library is preloaded by jedi, recording the time and memory consumed by each operation. You can provide additional libraries via command line arguments. Note: This requires the psutil library, available on PyPI. ""...
<commit_before><commit_msg>Add a module to test the memory usage with large libaries<commit_after>
""" This is a convenience script to test the speed and memory usage of Jedi with large libraries. Each library is preloaded by jedi, recording the time and memory consumed by each operation. You can provide additional libraries via command line arguments. Note: This requires the psutil library, available on PyPI. ""...
Add a module to test the memory usage with large libaries""" This is a convenience script to test the speed and memory usage of Jedi with large libraries. Each library is preloaded by jedi, recording the time and memory consumed by each operation. You can provide additional libraries via command line arguments. Note...
<commit_before><commit_msg>Add a module to test the memory usage with large libaries<commit_after>""" This is a convenience script to test the speed and memory usage of Jedi with large libraries. Each library is preloaded by jedi, recording the time and memory consumed by each operation. You can provide additional li...
40fdc4724b9b4bd8471fbd5b44e28ed5d4d3aa43
zerver/migrations/0182_set_initial_value_is_private_flag.py
zerver/migrations/0182_set_initial_value_is_private_flag.py
# -*- coding: utf-8 -*- import sys from django.db import migrations from django.db import migrations, transaction from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from django.db.models import F def set_initial_value_of_is_private_flag( ...
Set initial value for is_private flags.
migrations: Set initial value for is_private flags. This initializes the is_private flag to have the correct value for historical messages.
Python
apache-2.0
dhcrzf/zulip,timabbott/zulip,punchagan/zulip,zulip/zulip,kou/zulip,shubhamdhama/zulip,zulip/zulip,punchagan/zulip,tommyip/zulip,rishig/zulip,tommyip/zulip,jackrzhang/zulip,synicalsyntax/zulip,rishig/zulip,synicalsyntax/zulip,brainwane/zulip,brainwane/zulip,eeshangarg/zulip,kou/zulip,andersk/zulip,synicalsyntax/zulip,ri...
migrations: Set initial value for is_private flags. This initializes the is_private flag to have the correct value for historical messages.
# -*- coding: utf-8 -*- import sys from django.db import migrations from django.db import migrations, transaction from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from django.db.models import F def set_initial_value_of_is_private_flag( ...
<commit_before><commit_msg>migrations: Set initial value for is_private flags. This initializes the is_private flag to have the correct value for historical messages.<commit_after>
# -*- coding: utf-8 -*- import sys from django.db import migrations from django.db import migrations, transaction from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from django.db.models import F def set_initial_value_of_is_private_flag( ...
migrations: Set initial value for is_private flags. This initializes the is_private flag to have the correct value for historical messages.# -*- coding: utf-8 -*- import sys from django.db import migrations from django.db import migrations, transaction from django.db.backends.postgresql_psycopg2.schema import Databas...
<commit_before><commit_msg>migrations: Set initial value for is_private flags. This initializes the is_private flag to have the correct value for historical messages.<commit_after># -*- coding: utf-8 -*- import sys from django.db import migrations from django.db import migrations, transaction from django.db.backends....
dbf4d6f0e8b12f5eca5d7ff3e4d0a609d675fccf
sierpinski/DXFTurtle.py
sierpinski/DXFTurtle.py
from turtle import Vec2D class Turtle(object): def __init__(self): self.position = Vec2D(0, 0) self.direction = Vec2D(1, 0) self.isDrawing = True def penup(self): self.isDrawing = False def pendown(self): self.isDrawing = True def right(self, angle): s...
Add python turtle to DXF converter.
Add python turtle to DXF converter.
Python
mit
loic-fejoz/loic-fejoz-fabmoments,loic-fejoz/loic-fejoz-fabmoments,loic-fejoz/loic-fejoz-fabmoments
Add python turtle to DXF converter.
from turtle import Vec2D class Turtle(object): def __init__(self): self.position = Vec2D(0, 0) self.direction = Vec2D(1, 0) self.isDrawing = True def penup(self): self.isDrawing = False def pendown(self): self.isDrawing = True def right(self, angle): s...
<commit_before><commit_msg>Add python turtle to DXF converter.<commit_after>
from turtle import Vec2D class Turtle(object): def __init__(self): self.position = Vec2D(0, 0) self.direction = Vec2D(1, 0) self.isDrawing = True def penup(self): self.isDrawing = False def pendown(self): self.isDrawing = True def right(self, angle): s...
Add python turtle to DXF converter.from turtle import Vec2D class Turtle(object): def __init__(self): self.position = Vec2D(0, 0) self.direction = Vec2D(1, 0) self.isDrawing = True def penup(self): self.isDrawing = False def pendown(self): self.isDrawing = True ...
<commit_before><commit_msg>Add python turtle to DXF converter.<commit_after>from turtle import Vec2D class Turtle(object): def __init__(self): self.position = Vec2D(0, 0) self.direction = Vec2D(1, 0) self.isDrawing = True def penup(self): self.isDrawing = False def pendown...
dd3bc4102f647ae0b7c5edab8afb69bd88d6445f
4.py
4.py
# http://www.pythonchallenge.com/pc/def/linkedlist.php import requests, re nothing = 12345 # Initial nothing value url = "http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=%d" req = requests.get(url % nothing) print req.text
Set up requests to get the body of text
Set up requests to get the body of text
Python
mit
yarabarla/python-challenge
Set up requests to get the body of text
# http://www.pythonchallenge.com/pc/def/linkedlist.php import requests, re nothing = 12345 # Initial nothing value url = "http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=%d" req = requests.get(url % nothing) print req.text
<commit_before><commit_msg>Set up requests to get the body of text<commit_after>
# http://www.pythonchallenge.com/pc/def/linkedlist.php import requests, re nothing = 12345 # Initial nothing value url = "http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=%d" req = requests.get(url % nothing) print req.text
Set up requests to get the body of text# http://www.pythonchallenge.com/pc/def/linkedlist.php import requests, re nothing = 12345 # Initial nothing value url = "http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=%d" req = requests.get(url % nothing) print req.text
<commit_before><commit_msg>Set up requests to get the body of text<commit_after># http://www.pythonchallenge.com/pc/def/linkedlist.php import requests, re nothing = 12345 # Initial nothing value url = "http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=%d" req = requests.get(url % nothing) print req.text
eb9af73993adb3295116f959e89591a3fa722cfd
tests/functional/cli/test_cli.py
tests/functional/cli/test_cli.py
import json import os from click.testing import CliRunner from chalice import cli def assert_chalice_app_structure_created(dirname): app_contents = os.listdir(os.path.join(os.getcwd(), dirname)) assert 'app.py' in app_contents assert 'requirements.txt' in app_contents assert '.chalice' in app_conten...
Add start of tests for CLI package
Add start of tests for CLI package
Python
apache-2.0
freaker2k7/chalice,awslabs/chalice
Add start of tests for CLI package
import json import os from click.testing import CliRunner from chalice import cli def assert_chalice_app_structure_created(dirname): app_contents = os.listdir(os.path.join(os.getcwd(), dirname)) assert 'app.py' in app_contents assert 'requirements.txt' in app_contents assert '.chalice' in app_conten...
<commit_before><commit_msg>Add start of tests for CLI package<commit_after>
import json import os from click.testing import CliRunner from chalice import cli def assert_chalice_app_structure_created(dirname): app_contents = os.listdir(os.path.join(os.getcwd(), dirname)) assert 'app.py' in app_contents assert 'requirements.txt' in app_contents assert '.chalice' in app_conten...
Add start of tests for CLI packageimport json import os from click.testing import CliRunner from chalice import cli def assert_chalice_app_structure_created(dirname): app_contents = os.listdir(os.path.join(os.getcwd(), dirname)) assert 'app.py' in app_contents assert 'requirements.txt' in app_contents ...
<commit_before><commit_msg>Add start of tests for CLI package<commit_after>import json import os from click.testing import CliRunner from chalice import cli def assert_chalice_app_structure_created(dirname): app_contents = os.listdir(os.path.join(os.getcwd(), dirname)) assert 'app.py' in app_contents as...
190775d5ea82364ad1baf2471cd453032e9c60de
nova/db/sqlalchemy/migrate_repo/versions/094_update_postgresql_sequence_names.py
nova/db/sqlalchemy/migrate_repo/versions/094_update_postgresql_sequence_names.py
# Copyright (c) 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
Update PostgreSQL sequence names for zones/quotas.
Update PostgreSQL sequence names for zones/quotas. Fixes LP Bug #993667. Fixes LP Bug #993669. Change-Id: Ifcc33929ced617916bd6613fc941257494f4a99b
Python
apache-2.0
savi-dev/nova,affo/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,bigswitch/nova,cloudbase/nova-virtualbox,alexandrucoman/vbox-nova-driver,JianyuWang/nova,barnsnake351/nova,usc-isi/nova,sebrandon1/nova,tangfeixiong/nova,vladikr/nova_drafts,cyx1231st/nova,dawnpower/nova,mandeepdhami/nova,akash1808/nova,thomasem/nova,joseph...
Update PostgreSQL sequence names for zones/quotas. Fixes LP Bug #993667. Fixes LP Bug #993669. Change-Id: Ifcc33929ced617916bd6613fc941257494f4a99b
# Copyright (c) 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
<commit_before><commit_msg>Update PostgreSQL sequence names for zones/quotas. Fixes LP Bug #993667. Fixes LP Bug #993669. Change-Id: Ifcc33929ced617916bd6613fc941257494f4a99b<commit_after>
# Copyright (c) 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
Update PostgreSQL sequence names for zones/quotas. Fixes LP Bug #993667. Fixes LP Bug #993669. Change-Id: Ifcc33929ced617916bd6613fc941257494f4a99b# Copyright (c) 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in c...
<commit_before><commit_msg>Update PostgreSQL sequence names for zones/quotas. Fixes LP Bug #993667. Fixes LP Bug #993669. Change-Id: Ifcc33929ced617916bd6613fc941257494f4a99b<commit_after># Copyright (c) 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); y...
ad409c2d3ca715865f0f94dbd6b8384b2fca8323
dbaas/workflow/steps/util/region_migration/remove_old_acl.py
dbaas/workflow/steps/util/region_migration/remove_old_acl.py
# -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0020 from dbaas_aclapi.tasks import destroy_acl_for LOG = logging.getLogger(__name__) class RemoveOldAcl(BaseStep): def __unicode__(self): ret...
Add step to delete old acl
Add step to delete old acl
Python
bsd-3-clause
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
Add step to delete old acl
# -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0020 from dbaas_aclapi.tasks import destroy_acl_for LOG = logging.getLogger(__name__) class RemoveOldAcl(BaseStep): def __unicode__(self): ret...
<commit_before><commit_msg>Add step to delete old acl<commit_after>
# -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0020 from dbaas_aclapi.tasks import destroy_acl_for LOG = logging.getLogger(__name__) class RemoveOldAcl(BaseStep): def __unicode__(self): ret...
Add step to delete old acl# -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0020 from dbaas_aclapi.tasks import destroy_acl_for LOG = logging.getLogger(__name__) class RemoveOldAcl(BaseStep): def __un...
<commit_before><commit_msg>Add step to delete old acl<commit_after># -*- coding: utf-8 -*- import logging from util import full_stack from workflow.steps.util.base import BaseStep from workflow.exceptions.error_codes import DBAAS_0020 from dbaas_aclapi.tasks import destroy_acl_for LOG = logging.getLogger(__name__) c...
f7da89f1a2a24414778b9b53df77cdac3285a4a7
API/chat/migrations/0001_squashed_0002_auto_20150707_1647.py
API/chat/migrations/0001_squashed_0002_auto_20150707_1647.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): replaces = [(b'chat', '0001_squashed_0008_auto_20150702_1437'), (b'chat', '0002_auto_20150707_1647')] dependencies = [ ] operations = [ migrations...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Channel', fields=[ ('id', models.AutoField(verb...
Revert "Revert "[HOTFIX] Remove replaces line on 0001_squashed""
Revert "Revert "[HOTFIX] Remove replaces line on 0001_squashed""
Python
mit
VitSalis/ting,dionyziz/ting,mbalamat/ting,odyvarv/ting-1,VitSalis/ting,sirodoht/ting,odyvarv/ting-1,sirodoht/ting,VitSalis/ting,sirodoht/ting,gtklocker/ting,dionyziz/ting,odyvarv/ting-1,odyvarv/ting-1,mbalamat/ting,mbalamat/ting,gtklocker/ting,gtklocker/ting,gtklocker/ting,sirodoht/ting,dionyziz/ting,dionyziz/ting,mbal...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): replaces = [(b'chat', '0001_squashed_0008_auto_20150702_1437'), (b'chat', '0002_auto_20150707_1647')] dependencies = [ ] operations = [ migrations...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Channel', fields=[ ('id', models.AutoField(verb...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): replaces = [(b'chat', '0001_squashed_0008_auto_20150702_1437'), (b'chat', '0002_auto_20150707_1647')] dependencies = [ ] operations = [ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Channel', fields=[ ('id', models.AutoField(verb...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): replaces = [(b'chat', '0001_squashed_0008_auto_20150702_1437'), (b'chat', '0002_auto_20150707_1647')] dependencies = [ ] operations = [ migrations...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): replaces = [(b'chat', '0001_squashed_0008_auto_20150702_1437'), (b'chat', '0002_auto_20150707_1647')] dependencies = [ ] operations = [ ...
9122b16fdf023639725634d6c2b9b758f5adebd2
src/python/tests/storage/test_payload_builder.py
src/python/tests/storage/test_payload_builder.py
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END import pytest import json from foglamp.storage.payload_builder import PayloadBuilder __author__ = "Vaibhav Singhal" __copyright__ = "Copyright (c) 2017 OSIsoft, LLC" __license__ = "Apache 2.0" __version__ = "${VERSION}" clas...
Test added for Payload builder
Test added for Payload builder
Python
apache-2.0
foglamp/FogLAMP,foglamp/FogLAMP,foglamp/FogLAMP,foglamp/FogLAMP
Test added for Payload builder
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END import pytest import json from foglamp.storage.payload_builder import PayloadBuilder __author__ = "Vaibhav Singhal" __copyright__ = "Copyright (c) 2017 OSIsoft, LLC" __license__ = "Apache 2.0" __version__ = "${VERSION}" clas...
<commit_before><commit_msg>Test added for Payload builder<commit_after>
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END import pytest import json from foglamp.storage.payload_builder import PayloadBuilder __author__ = "Vaibhav Singhal" __copyright__ = "Copyright (c) 2017 OSIsoft, LLC" __license__ = "Apache 2.0" __version__ = "${VERSION}" clas...
Test added for Payload builder# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END import pytest import json from foglamp.storage.payload_builder import PayloadBuilder __author__ = "Vaibhav Singhal" __copyright__ = "Copyright (c) 2017 OSIsoft, LLC" __license__ = "Apache 2.0" __v...
<commit_before><commit_msg>Test added for Payload builder<commit_after># -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END import pytest import json from foglamp.storage.payload_builder import PayloadBuilder __author__ = "Vaibhav Singhal" __copyright__ = "Copyright (c) 2017 OSI...
c44c2db96e9901a32077a8922e52f1d1219be2cb
ceph_deploy/tests/parser/test_config.py
ceph_deploy/tests/parser/test_config.py
import pytest from ceph_deploy.cli import get_parser SUBCMDS_WITH_ARGS = ['push', 'pull'] class TestParserConfig(object): def setup(self): self.parser = get_parser() def test_config_help(self, capsys): with pytest.raises(SystemExit): self.parser.parse_args('config --help'.split...
Add argparse tests for ceph-deploy config
[RM-11742] Add argparse tests for ceph-deploy config Signed-off-by: Travis Rhoden <[email protected]>
Python
mit
zhouyuan/ceph-deploy,codenrhoden/ceph-deploy,isyippee/ceph-deploy,ghxandsky/ceph-deploy,branto1/ceph-deploy,imzhulei/ceph-deploy,codenrhoden/ceph-deploy,ceph/ceph-deploy,trhoden/ceph-deploy,Vicente-Cheng/ceph-deploy,osynge/ceph-deploy,SUSE/ceph-deploy,SUSE/ceph-deploy,shenhequnying/ceph-deploy,shenhequnying/ceph-deploy...
[RM-11742] Add argparse tests for ceph-deploy config Signed-off-by: Travis Rhoden <[email protected]>
import pytest from ceph_deploy.cli import get_parser SUBCMDS_WITH_ARGS = ['push', 'pull'] class TestParserConfig(object): def setup(self): self.parser = get_parser() def test_config_help(self, capsys): with pytest.raises(SystemExit): self.parser.parse_args('config --help'.split...
<commit_before><commit_msg>[RM-11742] Add argparse tests for ceph-deploy config Signed-off-by: Travis Rhoden <[email protected]><commit_after>
import pytest from ceph_deploy.cli import get_parser SUBCMDS_WITH_ARGS = ['push', 'pull'] class TestParserConfig(object): def setup(self): self.parser = get_parser() def test_config_help(self, capsys): with pytest.raises(SystemExit): self.parser.parse_args('config --help'.split...
[RM-11742] Add argparse tests for ceph-deploy config Signed-off-by: Travis Rhoden <[email protected]>import pytest from ceph_deploy.cli import get_parser SUBCMDS_WITH_ARGS = ['push', 'pull'] class TestParserConfig(object): def setup(self): self.parser = get_parser() ...
<commit_before><commit_msg>[RM-11742] Add argparse tests for ceph-deploy config Signed-off-by: Travis Rhoden <[email protected]><commit_after>import pytest from ceph_deploy.cli import get_parser SUBCMDS_WITH_ARGS = ['push', 'pull'] class TestParserConfig(object): def setup(se...
bbbe1010b7aaee6dcec9f2abb3f39a5f7ddee903
lintcode/Easy/085_Insert_Node_in_a_Binary_Search_Tree.py
lintcode/Easy/085_Insert_Node_in_a_Binary_Search_Tree.py
""" Definition of TreeNode: class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None """ class Solution: """ @param root: The root of the binary search tree. @param node: insert this node into the binary search tree. @return: The root of the new bina...
Add solution to lintcode question 85
Add solution to lintcode question 85
Python
mit
Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode
Add solution to lintcode question 85
""" Definition of TreeNode: class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None """ class Solution: """ @param root: The root of the binary search tree. @param node: insert this node into the binary search tree. @return: The root of the new bina...
<commit_before><commit_msg>Add solution to lintcode question 85<commit_after>
""" Definition of TreeNode: class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None """ class Solution: """ @param root: The root of the binary search tree. @param node: insert this node into the binary search tree. @return: The root of the new bina...
Add solution to lintcode question 85""" Definition of TreeNode: class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None """ class Solution: """ @param root: The root of the binary search tree. @param node: insert this node into the binary search tree. ...
<commit_before><commit_msg>Add solution to lintcode question 85<commit_after>""" Definition of TreeNode: class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None """ class Solution: """ @param root: The root of the binary search tree. @param node: insert...
3964db81c5b646102514d0be380cfd7cde3f2fa8
toast/tod/pointing_math.py
toast/tod/pointing_math.py
# Copyright (c) 2015 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. import unittest import numpy as np import healpy as hp import quaternionarray as qa
Add empty file stub for pointing math operations.
Add empty file stub for pointing math operations.
Python
bsd-2-clause
tskisner/pytoast,tskisner/pytoast
Add empty file stub for pointing math operations.
# Copyright (c) 2015 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. import unittest import numpy as np import healpy as hp import quaternionarray as qa
<commit_before><commit_msg>Add empty file stub for pointing math operations.<commit_after>
# Copyright (c) 2015 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. import unittest import numpy as np import healpy as hp import quaternionarray as qa
Add empty file stub for pointing math operations.# Copyright (c) 2015 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. import unittest import numpy as np import healpy as hp import quaternionarray...
<commit_before><commit_msg>Add empty file stub for pointing math operations.<commit_after># Copyright (c) 2015 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. import unittest import numpy as np im...
d9c4ebf7bea31b6479d73d5c24909337582705f3
tests/unit/test_pep517_config.py
tests/unit/test_pep517_config.py
import pytest from pip._internal.commands import create_command @pytest.mark.parametrize( ("command", "expected"), [ ("install", True), ("wheel", True), ("freeze", False), ], ) def test_supports_config(command: str, expected: bool) -> None: c = create_command(command) opti...
Add tests for basic --config-settings parsing
Add tests for basic --config-settings parsing
Python
mit
pradyunsg/pip,pypa/pip,pradyunsg/pip,pypa/pip,pfmoore/pip,sbidoul/pip,pfmoore/pip,sbidoul/pip
Add tests for basic --config-settings parsing
import pytest from pip._internal.commands import create_command @pytest.mark.parametrize( ("command", "expected"), [ ("install", True), ("wheel", True), ("freeze", False), ], ) def test_supports_config(command: str, expected: bool) -> None: c = create_command(command) opti...
<commit_before><commit_msg>Add tests for basic --config-settings parsing<commit_after>
import pytest from pip._internal.commands import create_command @pytest.mark.parametrize( ("command", "expected"), [ ("install", True), ("wheel", True), ("freeze", False), ], ) def test_supports_config(command: str, expected: bool) -> None: c = create_command(command) opti...
Add tests for basic --config-settings parsingimport pytest from pip._internal.commands import create_command @pytest.mark.parametrize( ("command", "expected"), [ ("install", True), ("wheel", True), ("freeze", False), ], ) def test_supports_config(command: str, expected: bool) -> N...
<commit_before><commit_msg>Add tests for basic --config-settings parsing<commit_after>import pytest from pip._internal.commands import create_command @pytest.mark.parametrize( ("command", "expected"), [ ("install", True), ("wheel", True), ("freeze", False), ], ) def test_supports_...
4e8d972a49d47eaede707796a3d1b439bb7dbccc
tests/ChromskyForm/Inverse/OneRuleWithMultipleNonterminalsTest.py
tests/ChromskyForm/Inverse/OneRuleWithMultipleNonterminalsTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 28.08.2017 14:37 :Licence GNUv3 Part of grammpy-transforms """ from unittest import TestCase, main from grammpy import * from grammpy_transforms import ContextFree, InverseContextFree from pyparsers import cyk class S(Nonterminal): pass class A(Nonterminal):...
Add test of inverse transformation of chomsky form
Add test of inverse transformation of chomsky form
Python
mit
PatrikValkovic/grammpy
Add test of inverse transformation of chomsky form
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 28.08.2017 14:37 :Licence GNUv3 Part of grammpy-transforms """ from unittest import TestCase, main from grammpy import * from grammpy_transforms import ContextFree, InverseContextFree from pyparsers import cyk class S(Nonterminal): pass class A(Nonterminal):...
<commit_before><commit_msg>Add test of inverse transformation of chomsky form<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 28.08.2017 14:37 :Licence GNUv3 Part of grammpy-transforms """ from unittest import TestCase, main from grammpy import * from grammpy_transforms import ContextFree, InverseContextFree from pyparsers import cyk class S(Nonterminal): pass class A(Nonterminal):...
Add test of inverse transformation of chomsky form#!/usr/bin/env python """ :Author Patrik Valkovic :Created 28.08.2017 14:37 :Licence GNUv3 Part of grammpy-transforms """ from unittest import TestCase, main from grammpy import * from grammpy_transforms import ContextFree, InverseContextFree from pyparsers import cyk...
<commit_before><commit_msg>Add test of inverse transformation of chomsky form<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 28.08.2017 14:37 :Licence GNUv3 Part of grammpy-transforms """ from unittest import TestCase, main from grammpy import * from grammpy_transforms import ContextFree, Inv...
778dc4d9096e5dbfcf84f2b5b12417158986dda6
tests/rules_tests/grammarManipulation_tests/IterationTest.py
tests/rules_tests/grammarManipulation_tests/IterationTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Grammar, Nonterminal, Rule from ..grammar import * class IterationTest(TestCase): pass if __name__ == '__main__': main()
Add file for rule iteration tests
Add file for rule iteration tests
Python
mit
PatrikValkovic/grammpy
Add file for rule iteration tests
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Grammar, Nonterminal, Rule from ..grammar import * class IterationTest(TestCase): pass if __name__ == '__main__': main()
<commit_before><commit_msg>Add file for rule iteration tests<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Grammar, Nonterminal, Rule from ..grammar import * class IterationTest(TestCase): pass if __name__ == '__main__': main()
Add file for rule iteration tests#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Grammar, Nonterminal, Rule from ..grammar import * class IterationTest(TestCase): pass if __name__ == '__main...
<commit_before><commit_msg>Add file for rule iteration tests<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Grammar, Nonterminal, Rule from ..grammar import * class IterationTest(Test...
a9ca199bd53591b5c7f0ecd40ceb97b41479208e
tests/test_iframe.py
tests/test_iframe.py
# -*- coding: utf-8 -*- """" Folium Element Module class IFrame ---------------------- """ import branca.element as elem from selenium import webdriver import base64 def test_create_empty_iframe(): iframe = elem.IFrame() iframe.render() def test_create_iframe(): iframe = elem.IFrame(html="<p>test content<p>",width=...
Add test of IFrame element, creation and rendering
Add test of IFrame element, creation and rendering
Python
mit
python-visualization/branca,nanodan/branca,nanodan/branca,python-visualization/branca
Add test of IFrame element, creation and rendering
# -*- coding: utf-8 -*- """" Folium Element Module class IFrame ---------------------- """ import branca.element as elem from selenium import webdriver import base64 def test_create_empty_iframe(): iframe = elem.IFrame() iframe.render() def test_create_iframe(): iframe = elem.IFrame(html="<p>test content<p>",width=...
<commit_before><commit_msg>Add test of IFrame element, creation and rendering<commit_after>
# -*- coding: utf-8 -*- """" Folium Element Module class IFrame ---------------------- """ import branca.element as elem from selenium import webdriver import base64 def test_create_empty_iframe(): iframe = elem.IFrame() iframe.render() def test_create_iframe(): iframe = elem.IFrame(html="<p>test content<p>",width=...
Add test of IFrame element, creation and rendering# -*- coding: utf-8 -*- """" Folium Element Module class IFrame ---------------------- """ import branca.element as elem from selenium import webdriver import base64 def test_create_empty_iframe(): iframe = elem.IFrame() iframe.render() def test_create_iframe(): ifr...
<commit_before><commit_msg>Add test of IFrame element, creation and rendering<commit_after># -*- coding: utf-8 -*- """" Folium Element Module class IFrame ---------------------- """ import branca.element as elem from selenium import webdriver import base64 def test_create_empty_iframe(): iframe = elem.IFrame() iframe...
70c28aeee77b49129a7121c2d7eaf1f1fbb3b3ac
manipulate.py
manipulate.py
#!/usr/bin/python -i import fore.action as action from echonest.remix.audio import LocalAudioFile print("You can load MP3 files with LocalAudioFile()") print("and manipulate them using the functions in action") print("To save a modified file: save(f, fn)") def save(f, fn): action.audition_render([f.data], fn)
Add script to ease manual testing and manipulation
Add script to ease manual testing and manipulation
Python
artistic-2.0
Rosuav/appension,Rosuav/appension,MikeiLL/appension,Rosuav/appension,MikeiLL/appension,Rosuav/appension,MikeiLL/appension,MikeiLL/appension
Add script to ease manual testing and manipulation
#!/usr/bin/python -i import fore.action as action from echonest.remix.audio import LocalAudioFile print("You can load MP3 files with LocalAudioFile()") print("and manipulate them using the functions in action") print("To save a modified file: save(f, fn)") def save(f, fn): action.audition_render([f.data], fn)
<commit_before><commit_msg>Add script to ease manual testing and manipulation<commit_after>
#!/usr/bin/python -i import fore.action as action from echonest.remix.audio import LocalAudioFile print("You can load MP3 files with LocalAudioFile()") print("and manipulate them using the functions in action") print("To save a modified file: save(f, fn)") def save(f, fn): action.audition_render([f.data], fn)
Add script to ease manual testing and manipulation#!/usr/bin/python -i import fore.action as action from echonest.remix.audio import LocalAudioFile print("You can load MP3 files with LocalAudioFile()") print("and manipulate them using the functions in action") print("To save a modified file: save(f, fn)") def save(f, f...
<commit_before><commit_msg>Add script to ease manual testing and manipulation<commit_after>#!/usr/bin/python -i import fore.action as action from echonest.remix.audio import LocalAudioFile print("You can load MP3 files with LocalAudioFile()") print("and manipulate them using the functions in action") print("To save a m...
4e9b275cba14dff091d0a10be34b07cdd67bff9e
examples/edge_test.py
examples/edge_test.py
""" This test is only for Microsoft Edge (Chromium)! """ from seleniumbase import BaseCase class EdgeTestClass(BaseCase): def test_edge(self): if self.browser != "edge": print("\n This test is only for Microsoft Edge (Chromium)!") print(" (Run with: '--browser=edge')") ...
Add test for EdgeDriver and Edge (Chromium) Browser
Add test for EdgeDriver and Edge (Chromium) Browser
Python
mit
mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase
Add test for EdgeDriver and Edge (Chromium) Browser
""" This test is only for Microsoft Edge (Chromium)! """ from seleniumbase import BaseCase class EdgeTestClass(BaseCase): def test_edge(self): if self.browser != "edge": print("\n This test is only for Microsoft Edge (Chromium)!") print(" (Run with: '--browser=edge')") ...
<commit_before><commit_msg>Add test for EdgeDriver and Edge (Chromium) Browser<commit_after>
""" This test is only for Microsoft Edge (Chromium)! """ from seleniumbase import BaseCase class EdgeTestClass(BaseCase): def test_edge(self): if self.browser != "edge": print("\n This test is only for Microsoft Edge (Chromium)!") print(" (Run with: '--browser=edge')") ...
Add test for EdgeDriver and Edge (Chromium) Browser""" This test is only for Microsoft Edge (Chromium)! """ from seleniumbase import BaseCase class EdgeTestClass(BaseCase): def test_edge(self): if self.browser != "edge": print("\n This test is only for Microsoft Edge (Chromium)!") ...
<commit_before><commit_msg>Add test for EdgeDriver and Edge (Chromium) Browser<commit_after>""" This test is only for Microsoft Edge (Chromium)! """ from seleniumbase import BaseCase class EdgeTestClass(BaseCase): def test_edge(self): if self.browser != "edge": print("\n This test is only fo...
732206b8dc5fc8184ed5765ddb689e21da89ee26
include/pdg.py
include/pdg.py
#!/usr/bin/env python3 import urllib.request import sqlite3 ### PDG file containing particle info pdgurl = 'http://pdg.lbl.gov/2012/mcdata/mass_width_2012.mcd' # format # 1 contains either "M" or "W" indicating mass or width # 2 - 9 \ Monte Carlo particle numbers as described in the "Review of # 10 - 17 |...
Add script to fetch PDG particle info and store in sqlite.
Add script to fetch PDG particle info and store in sqlite.
Python
mit
jbernhard/ebe-analysis
Add script to fetch PDG particle info and store in sqlite.
#!/usr/bin/env python3 import urllib.request import sqlite3 ### PDG file containing particle info pdgurl = 'http://pdg.lbl.gov/2012/mcdata/mass_width_2012.mcd' # format # 1 contains either "M" or "W" indicating mass or width # 2 - 9 \ Monte Carlo particle numbers as described in the "Review of # 10 - 17 |...
<commit_before><commit_msg>Add script to fetch PDG particle info and store in sqlite.<commit_after>
#!/usr/bin/env python3 import urllib.request import sqlite3 ### PDG file containing particle info pdgurl = 'http://pdg.lbl.gov/2012/mcdata/mass_width_2012.mcd' # format # 1 contains either "M" or "W" indicating mass or width # 2 - 9 \ Monte Carlo particle numbers as described in the "Review of # 10 - 17 |...
Add script to fetch PDG particle info and store in sqlite.#!/usr/bin/env python3 import urllib.request import sqlite3 ### PDG file containing particle info pdgurl = 'http://pdg.lbl.gov/2012/mcdata/mass_width_2012.mcd' # format # 1 contains either "M" or "W" indicating mass or width # 2 - 9 \ Monte Carlo p...
<commit_before><commit_msg>Add script to fetch PDG particle info and store in sqlite.<commit_after>#!/usr/bin/env python3 import urllib.request import sqlite3 ### PDG file containing particle info pdgurl = 'http://pdg.lbl.gov/2012/mcdata/mass_width_2012.mcd' # format # 1 contains either "M" or "W" indicatin...
2cbc977e71acded15cc66bea9e36f02ce3934eb8
real_estate_agency/resale/migrations/0004_ordering_by_id.py
real_estate_agency/resale/migrations/0004_ordering_by_id.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-09-11 21:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('resale', '0003_change_coords'), ] operations = [ migrations.AlterModelOptions( ...
Add skipped migration in resale app connected with ordering.
Add skipped migration in resale app connected with ordering.
Python
mit
Dybov/real_estate_agency,Dybov/real_estate_agency,Dybov/real_estate_agency
Add skipped migration in resale app connected with ordering.
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-09-11 21:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('resale', '0003_change_coords'), ] operations = [ migrations.AlterModelOptions( ...
<commit_before><commit_msg>Add skipped migration in resale app connected with ordering.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-09-11 21:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('resale', '0003_change_coords'), ] operations = [ migrations.AlterModelOptions( ...
Add skipped migration in resale app connected with ordering.# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-09-11 21:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('resale', '0003_change_coords'), ] ...
<commit_before><commit_msg>Add skipped migration in resale app connected with ordering.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-09-11 21:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('r...
082787e5b2bd7f1c6dd98d05a1893ddecc5967d7
monasca_common/tests/test_rest.py
monasca_common/tests/test_rest.py
# Copyright 2016 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
Add unit tests for common rest.utils module
Add unit tests for common rest.utils module Add unit tests for common json conversions and exception handling. Change-Id: I71ab992bb09114f4fd9c9752820ab57b4c51577a
Python
apache-2.0
openstack/monasca-common,openstack/monasca-common,stackforge/monasca-common,stackforge/monasca-common,stackforge/monasca-common,openstack/monasca-common
Add unit tests for common rest.utils module Add unit tests for common json conversions and exception handling. Change-Id: I71ab992bb09114f4fd9c9752820ab57b4c51577a
# Copyright 2016 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
<commit_before><commit_msg>Add unit tests for common rest.utils module Add unit tests for common json conversions and exception handling. Change-Id: I71ab992bb09114f4fd9c9752820ab57b4c51577a<commit_after>
# Copyright 2016 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
Add unit tests for common rest.utils module Add unit tests for common json conversions and exception handling. Change-Id: I71ab992bb09114f4fd9c9752820ab57b4c51577a# Copyright 2016 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance ...
<commit_before><commit_msg>Add unit tests for common rest.utils module Add unit tests for common json conversions and exception handling. Change-Id: I71ab992bb09114f4fd9c9752820ab57b4c51577a<commit_after># Copyright 2016 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may ...
3aef269fc27a54bfb1171c1a8876f8684db8920c
test_dns.py
test_dns.py
import os import unittest ENV_KEY = 'DREAMHOST_API_KEY' PUBLIC_DREAMHOST_KEY = '6SHU5P2HLDAYECUM' # Set the public DreamHost API key before importing the client, since it will # try to get the value of os.environ[ENV_KEY] immediately. previous_api_key = os.environ.get(ENV_KEY, None) os.environ[ENV_KEY] = PUBLIC_DREAM...
Add initial unit tests for read-only functions
Add initial unit tests for read-only functions
Python
mit
eallrich/dreamdns
Add initial unit tests for read-only functions
import os import unittest ENV_KEY = 'DREAMHOST_API_KEY' PUBLIC_DREAMHOST_KEY = '6SHU5P2HLDAYECUM' # Set the public DreamHost API key before importing the client, since it will # try to get the value of os.environ[ENV_KEY] immediately. previous_api_key = os.environ.get(ENV_KEY, None) os.environ[ENV_KEY] = PUBLIC_DREAM...
<commit_before><commit_msg>Add initial unit tests for read-only functions<commit_after>
import os import unittest ENV_KEY = 'DREAMHOST_API_KEY' PUBLIC_DREAMHOST_KEY = '6SHU5P2HLDAYECUM' # Set the public DreamHost API key before importing the client, since it will # try to get the value of os.environ[ENV_KEY] immediately. previous_api_key = os.environ.get(ENV_KEY, None) os.environ[ENV_KEY] = PUBLIC_DREAM...
Add initial unit tests for read-only functionsimport os import unittest ENV_KEY = 'DREAMHOST_API_KEY' PUBLIC_DREAMHOST_KEY = '6SHU5P2HLDAYECUM' # Set the public DreamHost API key before importing the client, since it will # try to get the value of os.environ[ENV_KEY] immediately. previous_api_key = os.environ.get(ENV...
<commit_before><commit_msg>Add initial unit tests for read-only functions<commit_after>import os import unittest ENV_KEY = 'DREAMHOST_API_KEY' PUBLIC_DREAMHOST_KEY = '6SHU5P2HLDAYECUM' # Set the public DreamHost API key before importing the client, since it will # try to get the value of os.environ[ENV_KEY] immediate...
762d995071403d277061fcfb4917636e47e8a194
froide/document/migrations/0022_auto_20200117_2101.py
froide/document/migrations/0022_auto_20200117_2101.py
# Generated by Django 2.2.4 on 2020-01-17 20:01 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('filingcabinet', '0016_auto_20200108_1228'), ('document', '0021_document_allow_annotation'), ] operations = ...
Add missing migration to document app
Add missing migration to document app
Python
mit
stefanw/froide,fin/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,stefanw/froide,stefanw/froide,fin/froide
Add missing migration to document app
# Generated by Django 2.2.4 on 2020-01-17 20:01 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('filingcabinet', '0016_auto_20200108_1228'), ('document', '0021_document_allow_annotation'), ] operations = ...
<commit_before><commit_msg>Add missing migration to document app<commit_after>
# Generated by Django 2.2.4 on 2020-01-17 20:01 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('filingcabinet', '0016_auto_20200108_1228'), ('document', '0021_document_allow_annotation'), ] operations = ...
Add missing migration to document app# Generated by Django 2.2.4 on 2020-01-17 20:01 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('filingcabinet', '0016_auto_20200108_1228'), ('document', '0021_document_allow_a...
<commit_before><commit_msg>Add missing migration to document app<commit_after># Generated by Django 2.2.4 on 2020-01-17 20:01 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('filingcabinet', '0016_auto_20200108_1228'), ...
0afef99538ddcf09127a242b03a13986eb3a590e
django/website/contacts/migrations/0005_auto_20160621_1456.py
django/website/contacts/migrations/0005_auto_20160621_1456.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('contacts', '0004_auto_20160421_1645'), ] operations = [ migrations.AlterField( ...
Add migration to update related field name
Add migration to update related field name
Python
agpl-3.0
aptivate/kashana,aptivate/kashana,daniell/kashana,aptivate/alfie,aptivate/kashana,aptivate/alfie,daniell/kashana,daniell/kashana,daniell/kashana,aptivate/kashana,aptivate/alfie,aptivate/alfie
Add migration to update related field name
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('contacts', '0004_auto_20160421_1645'), ] operations = [ migrations.AlterField( ...
<commit_before><commit_msg>Add migration to update related field name<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('contacts', '0004_auto_20160421_1645'), ] operations = [ migrations.AlterField( ...
Add migration to update related field name# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('contacts', '0004_auto_20160421_1645'), ] operations = [ ...
<commit_before><commit_msg>Add migration to update related field name<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('contacts', '0004_auto_201...
e32e52e576b142d62df4733386a5840c2f2c13ad
python/src/linkedListCycle/testLinkedListCycle.py
python/src/linkedListCycle/testLinkedListCycle.py
import unittest from linkedListCycle import Solution, ListNode class TestLinkedListCycle(unittest.TestCase): def setUp(self): self.solution = Solution() def testNoNodeReturnsFalse(self): self.assertEqual(self.solution.hasCycle(None), False) class TestLinkedListCycleWithList(unittest.TestCase)...
Add 8 test cases for linkedListCycle problem.
Add 8 test cases for linkedListCycle problem.
Python
mit
TheGhostHuCodes/leetCode
Add 8 test cases for linkedListCycle problem.
import unittest from linkedListCycle import Solution, ListNode class TestLinkedListCycle(unittest.TestCase): def setUp(self): self.solution = Solution() def testNoNodeReturnsFalse(self): self.assertEqual(self.solution.hasCycle(None), False) class TestLinkedListCycleWithList(unittest.TestCase)...
<commit_before><commit_msg>Add 8 test cases for linkedListCycle problem.<commit_after>
import unittest from linkedListCycle import Solution, ListNode class TestLinkedListCycle(unittest.TestCase): def setUp(self): self.solution = Solution() def testNoNodeReturnsFalse(self): self.assertEqual(self.solution.hasCycle(None), False) class TestLinkedListCycleWithList(unittest.TestCase)...
Add 8 test cases for linkedListCycle problem.import unittest from linkedListCycle import Solution, ListNode class TestLinkedListCycle(unittest.TestCase): def setUp(self): self.solution = Solution() def testNoNodeReturnsFalse(self): self.assertEqual(self.solution.hasCycle(None), False) class T...
<commit_before><commit_msg>Add 8 test cases for linkedListCycle problem.<commit_after>import unittest from linkedListCycle import Solution, ListNode class TestLinkedListCycle(unittest.TestCase): def setUp(self): self.solution = Solution() def testNoNodeReturnsFalse(self): self.assertEqual(self...
c3d6e3f38096bec6ef692e33165a6d25ccf06bd2
paper_to_git/commands/update_command.py
paper_to_git/commands/update_command.py
""" """ from paper_to_git.commands.base import BaseCommand __all__ = [ 'UpdateCommand', ] class UpdateCommand(BaseCommand): """Pull the list of Paper docs and update the database.""" name = 'update' def add(self, parser, command_parser): self.parser = parser def process(self, arg...
Add a sample update command
Add a sample update command
Python
apache-2.0
maxking/paper-to-git,maxking/paper-to-git
Add a sample update command
""" """ from paper_to_git.commands.base import BaseCommand __all__ = [ 'UpdateCommand', ] class UpdateCommand(BaseCommand): """Pull the list of Paper docs and update the database.""" name = 'update' def add(self, parser, command_parser): self.parser = parser def process(self, arg...
<commit_before><commit_msg>Add a sample update command<commit_after>
""" """ from paper_to_git.commands.base import BaseCommand __all__ = [ 'UpdateCommand', ] class UpdateCommand(BaseCommand): """Pull the list of Paper docs and update the database.""" name = 'update' def add(self, parser, command_parser): self.parser = parser def process(self, arg...
Add a sample update command""" """ from paper_to_git.commands.base import BaseCommand __all__ = [ 'UpdateCommand', ] class UpdateCommand(BaseCommand): """Pull the list of Paper docs and update the database.""" name = 'update' def add(self, parser, command_parser): self.parser = parser...
<commit_before><commit_msg>Add a sample update command<commit_after>""" """ from paper_to_git.commands.base import BaseCommand __all__ = [ 'UpdateCommand', ] class UpdateCommand(BaseCommand): """Pull the list of Paper docs and update the database.""" name = 'update' def add(self, parser, comm...
9ef9ce2857bf97b2aa7309608ae69b5710f1bf7e
src/integrate_tool.py
src/integrate_tool.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from bioblend import galaxy from bioblend import toolshed if __name__ == '__main__': gi_url = "http://172.21.23.6:8080/" ts_url = "http://172.21.23.6:9009/" name = "qiime" owner = "iuc" tool_panel_section_id = "qiime_rRNA_taxonomic_assignation" g...
Add a script to easily integrate a tool using toolshed
Add a script to easily integrate a tool using toolshed
Python
apache-2.0
ASaiM/framework,ASaiM/framework
Add a script to easily integrate a tool using toolshed
#!/usr/bin/env python # -*- coding: utf-8 -*- from bioblend import galaxy from bioblend import toolshed if __name__ == '__main__': gi_url = "http://172.21.23.6:8080/" ts_url = "http://172.21.23.6:9009/" name = "qiime" owner = "iuc" tool_panel_section_id = "qiime_rRNA_taxonomic_assignation" g...
<commit_before><commit_msg>Add a script to easily integrate a tool using toolshed<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- from bioblend import galaxy from bioblend import toolshed if __name__ == '__main__': gi_url = "http://172.21.23.6:8080/" ts_url = "http://172.21.23.6:9009/" name = "qiime" owner = "iuc" tool_panel_section_id = "qiime_rRNA_taxonomic_assignation" g...
Add a script to easily integrate a tool using toolshed#!/usr/bin/env python # -*- coding: utf-8 -*- from bioblend import galaxy from bioblend import toolshed if __name__ == '__main__': gi_url = "http://172.21.23.6:8080/" ts_url = "http://172.21.23.6:9009/" name = "qiime" owner = "iuc" tool_panel_...
<commit_before><commit_msg>Add a script to easily integrate a tool using toolshed<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- from bioblend import galaxy from bioblend import toolshed if __name__ == '__main__': gi_url = "http://172.21.23.6:8080/" ts_url = "http://172.21.23.6:9009/" name = ...
957e029bc7e4eec43fbad7cc2c464ab9f6e1389f
examples/test_calculator.py
examples/test_calculator.py
from seleniumbase import BaseCase class CalculatorTests(BaseCase): def test_6_times_7_plus_12_equals_54(self): self.open("seleniumbase.io/apps/calculator") self.click('button[id="6"]') self.click("button#multiply") self.click('button[id="7"]') self.click("button#ad...
Add a calculator example test
Add a calculator example test
Python
mit
seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase
Add a calculator example test
from seleniumbase import BaseCase class CalculatorTests(BaseCase): def test_6_times_7_plus_12_equals_54(self): self.open("seleniumbase.io/apps/calculator") self.click('button[id="6"]') self.click("button#multiply") self.click('button[id="7"]') self.click("button#ad...
<commit_before><commit_msg>Add a calculator example test<commit_after>
from seleniumbase import BaseCase class CalculatorTests(BaseCase): def test_6_times_7_plus_12_equals_54(self): self.open("seleniumbase.io/apps/calculator") self.click('button[id="6"]') self.click("button#multiply") self.click('button[id="7"]') self.click("button#ad...
Add a calculator example testfrom seleniumbase import BaseCase class CalculatorTests(BaseCase): def test_6_times_7_plus_12_equals_54(self): self.open("seleniumbase.io/apps/calculator") self.click('button[id="6"]') self.click("button#multiply") self.click('button[id="7"]') ...
<commit_before><commit_msg>Add a calculator example test<commit_after>from seleniumbase import BaseCase class CalculatorTests(BaseCase): def test_6_times_7_plus_12_equals_54(self): self.open("seleniumbase.io/apps/calculator") self.click('button[id="6"]') self.click("button#multiply"...
5dd0c4f83ed6b33b3bf6de0ef1e3beb38189e7ce
app/soc/logic/helper/convert_db.py
app/soc/logic/helper/convert_db.py
#!/usr/bin/python2.5 # # Copyright 2008 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 applicable...
Add a script to normalize user accounts
Add a script to normalize user accounts Patch by: Sverre Rabbelier --HG-- extra : convert_revision : svn%3A32761e7d-7263-4528-b7be-7235b26367ec/trunk%402240
Python
apache-2.0
SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange
Add a script to normalize user accounts Patch by: Sverre Rabbelier --HG-- extra : convert_revision : svn%3A32761e7d-7263-4528-b7be-7235b26367ec/trunk%402240
#!/usr/bin/python2.5 # # Copyright 2008 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 applicable...
<commit_before><commit_msg>Add a script to normalize user accounts Patch by: Sverre Rabbelier --HG-- extra : convert_revision : svn%3A32761e7d-7263-4528-b7be-7235b26367ec/trunk%402240<commit_after>
#!/usr/bin/python2.5 # # Copyright 2008 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 applicable...
Add a script to normalize user accounts Patch by: Sverre Rabbelier --HG-- extra : convert_revision : svn%3A32761e7d-7263-4528-b7be-7235b26367ec/trunk%402240#!/usr/bin/python2.5 # # Copyright 2008 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file excep...
<commit_before><commit_msg>Add a script to normalize user accounts Patch by: Sverre Rabbelier --HG-- extra : convert_revision : svn%3A32761e7d-7263-4528-b7be-7235b26367ec/trunk%402240<commit_after>#!/usr/bin/python2.5 # # Copyright 2008 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "Lic...
60c9ba08b64af27fa79abd0e995cc0967ce2ff34
site_embedding.py
site_embedding.py
import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.manifold import TSNE all_data = pd.read_csv('data/main_data_fake_news.csv') all_data.content.fillna(' ', inplace=True) corpus = all_data.groupby('host').aggregate(lambda x: ' '.join(x.content)) stopwords = [] vectorizer = Tf...
Add host embedding (embeds host by dictionary used in lower dimensions)
Add host embedding (embeds host by dictionary used in lower dimensions)
Python
mit
HristoBuyukliev/fakenews
Add host embedding (embeds host by dictionary used in lower dimensions)
import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.manifold import TSNE all_data = pd.read_csv('data/main_data_fake_news.csv') all_data.content.fillna(' ', inplace=True) corpus = all_data.groupby('host').aggregate(lambda x: ' '.join(x.content)) stopwords = [] vectorizer = Tf...
<commit_before><commit_msg>Add host embedding (embeds host by dictionary used in lower dimensions)<commit_after>
import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.manifold import TSNE all_data = pd.read_csv('data/main_data_fake_news.csv') all_data.content.fillna(' ', inplace=True) corpus = all_data.groupby('host').aggregate(lambda x: ' '.join(x.content)) stopwords = [] vectorizer = Tf...
Add host embedding (embeds host by dictionary used in lower dimensions)import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.manifold import TSNE all_data = pd.read_csv('data/main_data_fake_news.csv') all_data.content.fillna(' ', inplace=True) corpus = all_data.groupby('host')....
<commit_before><commit_msg>Add host embedding (embeds host by dictionary used in lower dimensions)<commit_after>import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.manifold import TSNE all_data = pd.read_csv('data/main_data_fake_news.csv') all_data.content.fillna(' ', inplace...
cc4eef5566c7017da3b8a16265776ec04d6a571c
python/repl.py
python/repl.py
my_globals = globals().copy() my_locals = locals().copy() while True: try: x = input('--> ') except: break try: print(eval(x, my_globals, my_locals)) except: exec(x, my_globals, my_locals)
Implement simple REPL behaviour in Python.
Implement simple REPL behaviour in Python.
Python
apache-2.0
pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff
Implement simple REPL behaviour in Python.
my_globals = globals().copy() my_locals = locals().copy() while True: try: x = input('--> ') except: break try: print(eval(x, my_globals, my_locals)) except: exec(x, my_globals, my_locals)
<commit_before><commit_msg>Implement simple REPL behaviour in Python.<commit_after>
my_globals = globals().copy() my_locals = locals().copy() while True: try: x = input('--> ') except: break try: print(eval(x, my_globals, my_locals)) except: exec(x, my_globals, my_locals)
Implement simple REPL behaviour in Python.my_globals = globals().copy() my_locals = locals().copy() while True: try: x = input('--> ') except: break try: print(eval(x, my_globals, my_locals)) except: exec(x, my_globals, my_locals)
<commit_before><commit_msg>Implement simple REPL behaviour in Python.<commit_after>my_globals = globals().copy() my_locals = locals().copy() while True: try: x = input('--> ') except: break try: print(eval(x, my_globals, my_locals)) except: exec(x, my_globals, my_locals)
2818f378ead064df7ceb4323851a39b7a1cbc0af
tests/chainer_tests/functions_tests/array_tests/test_where.py
tests/chainer_tests/functions_tests/array_tests/test_where.py
import unittest import numpy import chainer from chainer import cuda import chainer.functions as F from chainer.testing import attr class TestWhere(unittest.TestCase): shape = (3, 2, 4) def setUp(self): self.c_data = numpy.random.uniform(-1, 1, self.shape) > 0 self.x_data = \ n...
Make a test for where
Make a test for where
Python
mit
niboshi/chainer,wkentaro/chainer,okuta/chainer,ktnyt/chainer,jnishi/chainer,kikusu/chainer,sinhrks/chainer,wkentaro/chainer,cemoody/chainer,ktnyt/chainer,hvy/chainer,t-abe/chainer,niboshi/chainer,hvy/chainer,AlpacaDB/chainer,kashif/chainer,truongdq/chainer,chainer/chainer,benob/chainer,rezoo/chainer,tkerola/chainer,jni...
Make a test for where
import unittest import numpy import chainer from chainer import cuda import chainer.functions as F from chainer.testing import attr class TestWhere(unittest.TestCase): shape = (3, 2, 4) def setUp(self): self.c_data = numpy.random.uniform(-1, 1, self.shape) > 0 self.x_data = \ n...
<commit_before><commit_msg>Make a test for where<commit_after>
import unittest import numpy import chainer from chainer import cuda import chainer.functions as F from chainer.testing import attr class TestWhere(unittest.TestCase): shape = (3, 2, 4) def setUp(self): self.c_data = numpy.random.uniform(-1, 1, self.shape) > 0 self.x_data = \ n...
Make a test for whereimport unittest import numpy import chainer from chainer import cuda import chainer.functions as F from chainer.testing import attr class TestWhere(unittest.TestCase): shape = (3, 2, 4) def setUp(self): self.c_data = numpy.random.uniform(-1, 1, self.shape) > 0 self.x_d...
<commit_before><commit_msg>Make a test for where<commit_after>import unittest import numpy import chainer from chainer import cuda import chainer.functions as F from chainer.testing import attr class TestWhere(unittest.TestCase): shape = (3, 2, 4) def setUp(self): self.c_data = numpy.random.unifor...
c2e2b94027ba2daa19d02ad8fdfb29eaca363026
examples/list_vms_on_host.py
examples/list_vms_on_host.py
#!/usr/bin/python # Copyright 2010 Jonathan Kinred # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
Add an example showing how to list VMs on a host
Add an example showing how to list VMs on a host
Python
apache-2.0
graphite-server/psphere,jkinred/psphere
Add an example showing how to list VMs on a host
#!/usr/bin/python # Copyright 2010 Jonathan Kinred # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
<commit_before><commit_msg>Add an example showing how to list VMs on a host<commit_after>
#!/usr/bin/python # Copyright 2010 Jonathan Kinred # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
Add an example showing how to list VMs on a host#!/usr/bin/python # Copyright 2010 Jonathan Kinred # # 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-...
<commit_before><commit_msg>Add an example showing how to list VMs on a host<commit_after>#!/usr/bin/python # Copyright 2010 Jonathan Kinred # # 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: # ...
e41d249ccd01516cdfd79a31d0ae22f8dd2bb4a9
tests/distributions/test_combinators.py
tests/distributions/test_combinators.py
import numpy as np from tensorprob import Model, Parameter, Normal, Exponential, Mix2 def test_mix2_fit(): with Model() as model: mu = Parameter() sigma = Parameter(lower=1) a = Parameter(lower=0) f = Parameter(lower=0, upper=1) X1 = Normal(mu, sigma, bounds=[(-np.inf, 21...
Add basic test for Mix2
Add basic test for Mix2
Python
mit
ibab/tensorprob,tensorprob/tensorprob,ibab/tensorfit
Add basic test for Mix2
import numpy as np from tensorprob import Model, Parameter, Normal, Exponential, Mix2 def test_mix2_fit(): with Model() as model: mu = Parameter() sigma = Parameter(lower=1) a = Parameter(lower=0) f = Parameter(lower=0, upper=1) X1 = Normal(mu, sigma, bounds=[(-np.inf, 21...
<commit_before><commit_msg>Add basic test for Mix2<commit_after>
import numpy as np from tensorprob import Model, Parameter, Normal, Exponential, Mix2 def test_mix2_fit(): with Model() as model: mu = Parameter() sigma = Parameter(lower=1) a = Parameter(lower=0) f = Parameter(lower=0, upper=1) X1 = Normal(mu, sigma, bounds=[(-np.inf, 21...
Add basic test for Mix2import numpy as np from tensorprob import Model, Parameter, Normal, Exponential, Mix2 def test_mix2_fit(): with Model() as model: mu = Parameter() sigma = Parameter(lower=1) a = Parameter(lower=0) f = Parameter(lower=0, upper=1) X1 = Normal(mu, sigm...
<commit_before><commit_msg>Add basic test for Mix2<commit_after>import numpy as np from tensorprob import Model, Parameter, Normal, Exponential, Mix2 def test_mix2_fit(): with Model() as model: mu = Parameter() sigma = Parameter(lower=1) a = Parameter(lower=0) f = Parameter(lower=...
52d736e154f74342dde91acb069c0ea7cb9068ec
py/insert-delete-getrandom-o1-duplicates-allowed.py
py/insert-delete-getrandom-o1-duplicates-allowed.py
from collections import Counter import random class RandomizedCollection(object): def __init__(self): """ Initialize your data structure here. """ self.counter = Counter() self.redundant = Counter() self.array = [] def insert(self, val): """ Ins...
Add py solution for 381. Insert Delete GetRandom O(1) - Duplicates allowed
Add py solution for 381. Insert Delete GetRandom O(1) - Duplicates allowed 381. Insert Delete GetRandom O(1) - Duplicates allowed: https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed/ getRandom may not be O(1). I'm not sure..
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 381. Insert Delete GetRandom O(1) - Duplicates allowed 381. Insert Delete GetRandom O(1) - Duplicates allowed: https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed/ getRandom may not be O(1). I'm not sure..
from collections import Counter import random class RandomizedCollection(object): def __init__(self): """ Initialize your data structure here. """ self.counter = Counter() self.redundant = Counter() self.array = [] def insert(self, val): """ Ins...
<commit_before><commit_msg>Add py solution for 381. Insert Delete GetRandom O(1) - Duplicates allowed 381. Insert Delete GetRandom O(1) - Duplicates allowed: https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed/ getRandom may not be O(1). I'm not sure..<commit_after>
from collections import Counter import random class RandomizedCollection(object): def __init__(self): """ Initialize your data structure here. """ self.counter = Counter() self.redundant = Counter() self.array = [] def insert(self, val): """ Ins...
Add py solution for 381. Insert Delete GetRandom O(1) - Duplicates allowed 381. Insert Delete GetRandom O(1) - Duplicates allowed: https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed/ getRandom may not be O(1). I'm not sure..from collections import Counter import random class RandomizedCollect...
<commit_before><commit_msg>Add py solution for 381. Insert Delete GetRandom O(1) - Duplicates allowed 381. Insert Delete GetRandom O(1) - Duplicates allowed: https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed/ getRandom may not be O(1). I'm not sure..<commit_after>from collections import Coun...
7a7e94b1f688b43bcbbd986cb27886f897abe021
pytac/mini_project.py
pytac/mini_project.py
import pytac.load_csv import pytac.epics def main(): lattice = pytac.load_csv.load('VMX', pytac.epics.EpicsControlSystem()) bpms = lattice.get_elements('BPM') bpms_n = 0 try: for bpm in bpms: bpm.get_pv_name('y') bpms_n += 1 print 'There exist {0} BPMy elements i...
Print the number of bpm y elements in the machine
Print the number of bpm y elements in the machine
Python
apache-2.0
razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects
Print the number of bpm y elements in the machine
import pytac.load_csv import pytac.epics def main(): lattice = pytac.load_csv.load('VMX', pytac.epics.EpicsControlSystem()) bpms = lattice.get_elements('BPM') bpms_n = 0 try: for bpm in bpms: bpm.get_pv_name('y') bpms_n += 1 print 'There exist {0} BPMy elements i...
<commit_before><commit_msg>Print the number of bpm y elements in the machine<commit_after>
import pytac.load_csv import pytac.epics def main(): lattice = pytac.load_csv.load('VMX', pytac.epics.EpicsControlSystem()) bpms = lattice.get_elements('BPM') bpms_n = 0 try: for bpm in bpms: bpm.get_pv_name('y') bpms_n += 1 print 'There exist {0} BPMy elements i...
Print the number of bpm y elements in the machineimport pytac.load_csv import pytac.epics def main(): lattice = pytac.load_csv.load('VMX', pytac.epics.EpicsControlSystem()) bpms = lattice.get_elements('BPM') bpms_n = 0 try: for bpm in bpms: bpm.get_pv_name('y') bpms_n +=...
<commit_before><commit_msg>Print the number of bpm y elements in the machine<commit_after>import pytac.load_csv import pytac.epics def main(): lattice = pytac.load_csv.load('VMX', pytac.epics.EpicsControlSystem()) bpms = lattice.get_elements('BPM') bpms_n = 0 try: for bpm in bpms: b...
f828d9e3472d54e1df32856dc9679ebb4a40de2a
recon_to_xyzv_parq.py
recon_to_xyzv_parq.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Imports from skimage import io import pandas as pd import fastparquet as fp import numpy as np import os import tempfile def readTiff(filename): """Read data from the tiff file and return a Pandas dataframe""" filenamePrefix = os.path.splitext(os.path.base...
Add converter to xyz value data frame
Add converter to xyz value data frame
Python
apache-2.0
OpenDataAnalytics/etl,OpenDataAnalytics/etl
Add converter to xyz value data frame
#!/usr/bin/env python # -*- coding: utf-8 -*- # Imports from skimage import io import pandas as pd import fastparquet as fp import numpy as np import os import tempfile def readTiff(filename): """Read data from the tiff file and return a Pandas dataframe""" filenamePrefix = os.path.splitext(os.path.base...
<commit_before><commit_msg>Add converter to xyz value data frame<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- # Imports from skimage import io import pandas as pd import fastparquet as fp import numpy as np import os import tempfile def readTiff(filename): """Read data from the tiff file and return a Pandas dataframe""" filenamePrefix = os.path.splitext(os.path.base...
Add converter to xyz value data frame#!/usr/bin/env python # -*- coding: utf-8 -*- # Imports from skimage import io import pandas as pd import fastparquet as fp import numpy as np import os import tempfile def readTiff(filename): """Read data from the tiff file and return a Pandas dataframe""" filenameP...
<commit_before><commit_msg>Add converter to xyz value data frame<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- # Imports from skimage import io import pandas as pd import fastparquet as fp import numpy as np import os import tempfile def readTiff(filename): """Read data from the tiff file and r...
8c3b78d8c9f4beda07959f61c09de3f67023461e
corehq/apps/reminders/management/commands/check_for_old_reminders.py
corehq/apps/reminders/management/commands/check_for_old_reminders.py
from django.core.management.base import BaseCommand from corehq.apps.reminders.models import (CaseReminderHandler, UI_COMPLEX, ON_DATETIME, REMINDER_TYPE_DEFAULT, RECIPIENT_SURVEY_SAMPLE) from dimagi.utils.couch.database import iter_docs class Command(BaseCommand): """ The new reminders UI removes su...
Add script to check for unsupported edge cases
Add script to check for unsupported edge cases
Python
bsd-3-clause
qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
Add script to check for unsupported edge cases
from django.core.management.base import BaseCommand from corehq.apps.reminders.models import (CaseReminderHandler, UI_COMPLEX, ON_DATETIME, REMINDER_TYPE_DEFAULT, RECIPIENT_SURVEY_SAMPLE) from dimagi.utils.couch.database import iter_docs class Command(BaseCommand): """ The new reminders UI removes su...
<commit_before><commit_msg>Add script to check for unsupported edge cases<commit_after>
from django.core.management.base import BaseCommand from corehq.apps.reminders.models import (CaseReminderHandler, UI_COMPLEX, ON_DATETIME, REMINDER_TYPE_DEFAULT, RECIPIENT_SURVEY_SAMPLE) from dimagi.utils.couch.database import iter_docs class Command(BaseCommand): """ The new reminders UI removes su...
Add script to check for unsupported edge casesfrom django.core.management.base import BaseCommand from corehq.apps.reminders.models import (CaseReminderHandler, UI_COMPLEX, ON_DATETIME, REMINDER_TYPE_DEFAULT, RECIPIENT_SURVEY_SAMPLE) from dimagi.utils.couch.database import iter_docs class Command(BaseCommand):...
<commit_before><commit_msg>Add script to check for unsupported edge cases<commit_after>from django.core.management.base import BaseCommand from corehq.apps.reminders.models import (CaseReminderHandler, UI_COMPLEX, ON_DATETIME, REMINDER_TYPE_DEFAULT, RECIPIENT_SURVEY_SAMPLE) from dimagi.utils.couch.database impo...
670a326755387c240f267b715f8b1c53dda1942c
studygroups/migrations/0149_update_feedback_reflection.py
studygroups/migrations/0149_update_feedback_reflection.py
# Generated by Django 2.2.13 on 2021-05-19 15:21 from django.db import migrations import json def update_feedback_reflection(apps, schema_editor): Feedback = apps.get_model("studygroups", "Feedback") for feedback in Feedback.objects.exclude(reflection=''): new_reflection = { 'answer': feedb...
Add data migration for storing feedback.reflection in updated format
Add data migration for storing feedback.reflection in updated format
Python
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
Add data migration for storing feedback.reflection in updated format
# Generated by Django 2.2.13 on 2021-05-19 15:21 from django.db import migrations import json def update_feedback_reflection(apps, schema_editor): Feedback = apps.get_model("studygroups", "Feedback") for feedback in Feedback.objects.exclude(reflection=''): new_reflection = { 'answer': feedb...
<commit_before><commit_msg>Add data migration for storing feedback.reflection in updated format<commit_after>
# Generated by Django 2.2.13 on 2021-05-19 15:21 from django.db import migrations import json def update_feedback_reflection(apps, schema_editor): Feedback = apps.get_model("studygroups", "Feedback") for feedback in Feedback.objects.exclude(reflection=''): new_reflection = { 'answer': feedb...
Add data migration for storing feedback.reflection in updated format# Generated by Django 2.2.13 on 2021-05-19 15:21 from django.db import migrations import json def update_feedback_reflection(apps, schema_editor): Feedback = apps.get_model("studygroups", "Feedback") for feedback in Feedback.objects.exclude(...
<commit_before><commit_msg>Add data migration for storing feedback.reflection in updated format<commit_after># Generated by Django 2.2.13 on 2021-05-19 15:21 from django.db import migrations import json def update_feedback_reflection(apps, schema_editor): Feedback = apps.get_model("studygroups", "Feedback") ...
4efcaa43c8c69c7fdbaec74d7af2b71dbc6faea6
tests/util/test_treecache.py
tests/util/test_treecache.py
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # 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 applica...
Add tests for treecache directly and test del_multi at the LruCache level too.
Add tests for treecache directly and test del_multi at the LruCache level too.
Python
apache-2.0
matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,TribeMedia/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse
Add tests for treecache directly and test del_multi at the LruCache level too.
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # 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 applica...
<commit_before><commit_msg>Add tests for treecache directly and test del_multi at the LruCache level too.<commit_after>
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # 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 applica...
Add tests for treecache directly and test del_multi at the LruCache level too.# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # 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 # #...
<commit_before><commit_msg>Add tests for treecache directly and test del_multi at the LruCache level too.<commit_after># -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Yo...
60bf275ab9b913663078d5098ce3754c7d76c23a
test_build.py
test_build.py
# This script should run without errors whenever we update the # kaggle/python container. It checks that all our most popular packages can # be loaded and used without errors. import numpy as np print("Numpy imported ok") print("Your lucky number is: " + str(np.random.randint(100))) import pandas as pd print("Pandas ...
Add test script to build repo
Add test script to build repo
Python
apache-2.0
Kaggle/docker-python,Kaggle/docker-python
Add test script to build repo
# This script should run without errors whenever we update the # kaggle/python container. It checks that all our most popular packages can # be loaded and used without errors. import numpy as np print("Numpy imported ok") print("Your lucky number is: " + str(np.random.randint(100))) import pandas as pd print("Pandas ...
<commit_before><commit_msg>Add test script to build repo<commit_after>
# This script should run without errors whenever we update the # kaggle/python container. It checks that all our most popular packages can # be loaded and used without errors. import numpy as np print("Numpy imported ok") print("Your lucky number is: " + str(np.random.randint(100))) import pandas as pd print("Pandas ...
Add test script to build repo# This script should run without errors whenever we update the # kaggle/python container. It checks that all our most popular packages can # be loaded and used without errors. import numpy as np print("Numpy imported ok") print("Your lucky number is: " + str(np.random.randint(100))) impor...
<commit_before><commit_msg>Add test script to build repo<commit_after># This script should run without errors whenever we update the # kaggle/python container. It checks that all our most popular packages can # be loaded and used without errors. import numpy as np print("Numpy imported ok") print("Your lucky number is...
dc184a5a46e4695ddd5e1886912fc18de68558b7
extensions.py
extensions.py
valid_input_extensions = ['mkv', 'avi', 'ts', 'mov', 'vob', 'mpg', 'mts'] valid_output_extensions = ['mp4', 'm4v'] valid_audio_codecs = ['aac', 'ac3', 'dts', 'eac3'] valid_poster_extensions = ['jpg', 'png'] valid_subtitle_extensions = ['srt', 'vtt', 'ass'] valid_formats = ['mp4', 'mov'] bad_subtitle_codecs = ['pgssub',...
valid_input_extensions = ['mkv', 'avi', 'ts', 'mov', 'vob', 'mpg', 'mts'] valid_output_extensions = ['mp4', 'm4v'] valid_audio_codecs = ['aac', 'ac3', 'dts', 'eac3'] valid_poster_extensions = ['jpg', 'png'] valid_subtitle_extensions = ['srt', 'vtt', 'ass'] valid_formats = ['mp4', 'mov'] bad_subtitle_codecs = ['pgssub',...
Add dvb_subtitle to the bad codec list.
Add dvb_subtitle to the bad codec list.
Python
mit
Filechaser/sickbeard_mp4_automator,Collisionc/sickbeard_mp4_automator,phtagn/sickbeard_mp4_automator,phtagn/sickbeard_mp4_automator,Collisionc/sickbeard_mp4_automator,Filechaser/sickbeard_mp4_automator
valid_input_extensions = ['mkv', 'avi', 'ts', 'mov', 'vob', 'mpg', 'mts'] valid_output_extensions = ['mp4', 'm4v'] valid_audio_codecs = ['aac', 'ac3', 'dts', 'eac3'] valid_poster_extensions = ['jpg', 'png'] valid_subtitle_extensions = ['srt', 'vtt', 'ass'] valid_formats = ['mp4', 'mov'] bad_subtitle_codecs = ['pgssub',...
valid_input_extensions = ['mkv', 'avi', 'ts', 'mov', 'vob', 'mpg', 'mts'] valid_output_extensions = ['mp4', 'm4v'] valid_audio_codecs = ['aac', 'ac3', 'dts', 'eac3'] valid_poster_extensions = ['jpg', 'png'] valid_subtitle_extensions = ['srt', 'vtt', 'ass'] valid_formats = ['mp4', 'mov'] bad_subtitle_codecs = ['pgssub',...
<commit_before>valid_input_extensions = ['mkv', 'avi', 'ts', 'mov', 'vob', 'mpg', 'mts'] valid_output_extensions = ['mp4', 'm4v'] valid_audio_codecs = ['aac', 'ac3', 'dts', 'eac3'] valid_poster_extensions = ['jpg', 'png'] valid_subtitle_extensions = ['srt', 'vtt', 'ass'] valid_formats = ['mp4', 'mov'] bad_subtitle_code...
valid_input_extensions = ['mkv', 'avi', 'ts', 'mov', 'vob', 'mpg', 'mts'] valid_output_extensions = ['mp4', 'm4v'] valid_audio_codecs = ['aac', 'ac3', 'dts', 'eac3'] valid_poster_extensions = ['jpg', 'png'] valid_subtitle_extensions = ['srt', 'vtt', 'ass'] valid_formats = ['mp4', 'mov'] bad_subtitle_codecs = ['pgssub',...
valid_input_extensions = ['mkv', 'avi', 'ts', 'mov', 'vob', 'mpg', 'mts'] valid_output_extensions = ['mp4', 'm4v'] valid_audio_codecs = ['aac', 'ac3', 'dts', 'eac3'] valid_poster_extensions = ['jpg', 'png'] valid_subtitle_extensions = ['srt', 'vtt', 'ass'] valid_formats = ['mp4', 'mov'] bad_subtitle_codecs = ['pgssub',...
<commit_before>valid_input_extensions = ['mkv', 'avi', 'ts', 'mov', 'vob', 'mpg', 'mts'] valid_output_extensions = ['mp4', 'm4v'] valid_audio_codecs = ['aac', 'ac3', 'dts', 'eac3'] valid_poster_extensions = ['jpg', 'png'] valid_subtitle_extensions = ['srt', 'vtt', 'ass'] valid_formats = ['mp4', 'mov'] bad_subtitle_code...