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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
943c8bb558f0a951b190b598f12069d06b6e3041 | tests/sim/test_entities.py | tests/sim/test_entities.py | import unittest
from hunting.sim.entities import *
class TestFighter(unittest.TestCase):
def test_base_speed_must_be_positive(self):
with self.assertRaises(ValueError):
Fighter(1, 1, 1, 1, base_speed=-5)
with self.assertRaises(ValueError):
Fighter(1, 1, 1, 1, base_speed=0)... | Add test to constrain speed to positive | Add test to constrain speed to positive
| Python | mit | MoyTW/RL_Arena_Experiment | Add test to constrain speed to positive | import unittest
from hunting.sim.entities import *
class TestFighter(unittest.TestCase):
def test_base_speed_must_be_positive(self):
with self.assertRaises(ValueError):
Fighter(1, 1, 1, 1, base_speed=-5)
with self.assertRaises(ValueError):
Fighter(1, 1, 1, 1, base_speed=0)... | <commit_before><commit_msg>Add test to constrain speed to positive<commit_after> | import unittest
from hunting.sim.entities import *
class TestFighter(unittest.TestCase):
def test_base_speed_must_be_positive(self):
with self.assertRaises(ValueError):
Fighter(1, 1, 1, 1, base_speed=-5)
with self.assertRaises(ValueError):
Fighter(1, 1, 1, 1, base_speed=0)... | Add test to constrain speed to positiveimport unittest
from hunting.sim.entities import *
class TestFighter(unittest.TestCase):
def test_base_speed_must_be_positive(self):
with self.assertRaises(ValueError):
Fighter(1, 1, 1, 1, base_speed=-5)
with self.assertRaises(ValueError):
... | <commit_before><commit_msg>Add test to constrain speed to positive<commit_after>import unittest
from hunting.sim.entities import *
class TestFighter(unittest.TestCase):
def test_base_speed_must_be_positive(self):
with self.assertRaises(ValueError):
Fighter(1, 1, 1, 1, base_speed=-5)
w... | |
a3ac011c35fa8918a4828a2c6eb119d5ca18a857 | src/example/bench_wsh.py | src/example/bench_wsh.py | # Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | Add a handler for performing client load testing. | Add a handler for performing client load testing.
Review URL: http://codereview.appspot.com/3844044 | Python | bsd-3-clause | google/pywebsocket,googlearchive/pywebsocket,GoogleChromeLabs/pywebsocket3,google/pywebsocket,googlearchive/pywebsocket,GoogleChromeLabs/pywebsocket3,google/pywebsocket,GoogleChromeLabs/pywebsocket3,googlearchive/pywebsocket | Add a handler for performing client load testing.
Review URL: http://codereview.appspot.com/3844044 | # Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | <commit_before><commit_msg>Add a handler for performing client load testing.
Review URL: http://codereview.appspot.com/3844044<commit_after> | # Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | Add a handler for performing client load testing.
Review URL: http://codereview.appspot.com/3844044# Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redist... | <commit_before><commit_msg>Add a handler for performing client load testing.
Review URL: http://codereview.appspot.com/3844044<commit_after># Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the followi... | |
eafd68dd70d24f6e5551e2f59d7c13e4be6dce6e | testparser.py | testparser.py | #!/usr/bin/env python
import sys
import os
import subprocess
# ARGUMENTS:
# 1 - path to the parser executable
# 2 - path to the parser-lalr executable
# 3 - path to the source directory to look for *.rs files
parser = sys.argv[1]
parser_lalr = sys.argv[2]
# flex dies on multibyte characters
BLACKLIST = ['libstd/st... | Add a new test script to evaluate status of different parsers. | Add a new test script to evaluate status of different parsers.
| Python | mit | patperry/rust-grammar,bleibig/rust-grammar,patperry/rust-grammar,patperry/rust-grammar,bleibig/rust-grammar,bleibig/rust-grammar,patperry/rust-grammar,bleibig/rust-grammar | Add a new test script to evaluate status of different parsers. | #!/usr/bin/env python
import sys
import os
import subprocess
# ARGUMENTS:
# 1 - path to the parser executable
# 2 - path to the parser-lalr executable
# 3 - path to the source directory to look for *.rs files
parser = sys.argv[1]
parser_lalr = sys.argv[2]
# flex dies on multibyte characters
BLACKLIST = ['libstd/st... | <commit_before><commit_msg>Add a new test script to evaluate status of different parsers.<commit_after> | #!/usr/bin/env python
import sys
import os
import subprocess
# ARGUMENTS:
# 1 - path to the parser executable
# 2 - path to the parser-lalr executable
# 3 - path to the source directory to look for *.rs files
parser = sys.argv[1]
parser_lalr = sys.argv[2]
# flex dies on multibyte characters
BLACKLIST = ['libstd/st... | Add a new test script to evaluate status of different parsers.#!/usr/bin/env python
import sys
import os
import subprocess
# ARGUMENTS:
# 1 - path to the parser executable
# 2 - path to the parser-lalr executable
# 3 - path to the source directory to look for *.rs files
parser = sys.argv[1]
parser_lalr = sys.argv[2... | <commit_before><commit_msg>Add a new test script to evaluate status of different parsers.<commit_after>#!/usr/bin/env python
import sys
import os
import subprocess
# ARGUMENTS:
# 1 - path to the parser executable
# 2 - path to the parser-lalr executable
# 3 - path to the source directory to look for *.rs files
pars... | |
3cb168f79a5239068f5ed0c3fa51f530f4a37f05 | members/crm/migrations/0014_auto_20190117_0402.py | members/crm/migrations/0014_auto_20190117_0402.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2019-01-17 04:02
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('crm', '0013_profile_squashed'),
]
operations = [
migrations.RemoveField(
... | Remove profile until QBO integration gets merged in | Remove profile until QBO integration gets merged in
| Python | mit | ocwc/ocwc-members,ocwc/ocwc-members,ocwc/ocwc-members,ocwc/ocwc-members | Remove profile until QBO integration gets merged in | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2019-01-17 04:02
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('crm', '0013_profile_squashed'),
]
operations = [
migrations.RemoveField(
... | <commit_before><commit_msg>Remove profile until QBO integration gets merged in<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2019-01-17 04:02
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('crm', '0013_profile_squashed'),
]
operations = [
migrations.RemoveField(
... | Remove profile until QBO integration gets merged in# -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2019-01-17 04:02
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('crm', '0013_profile_squashed'),
]
opera... | <commit_before><commit_msg>Remove profile until QBO integration gets merged in<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2019-01-17 04:02
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('crm', '... | |
a7ff8375e945a7522ede57ef98c130b40aaf98b0 | helper_scripts/clean_tool_conf_xml.py | helper_scripts/clean_tool_conf_xml.py | #!/usr/bin/env python
## Example usage: python clean_tool_conf.py -i /galaxy/config/shed_tool_conf.xml -o clean_shed_tool_conf.xml
import xml.etree.ElementTree as ET
from os import path
from argparse import ArgumentParser
def check_child(root, children, tooldir, removed_tools = []):
"""
For each child in ch... | Add script that removes non-existent xml entries from shed_tool_conf.xml and migrated_tool_conf.xml | Add script that removes non-existent xml entries from shed_tool_conf.xml and migrated_tool_conf.xml
| Python | mit | ARTbio/tools-artbio,ARTbio/tools-artbio,mvdbeek/tools-artbio,JuPeg/tools-artbio,chamaelj/tools-artbio,JuPeg/tools-artbio,chamaelj/tools-artbio,drosofff/tools-artbio,ARTbio/tools-artbio,drosofff/tools-artbio,drosofff/tools-artbio,ARTbio/tools-artbio,mvdbeek/tools-artbio,drosofff/tools-artbio,chamaelj/tools-artbio | Add script that removes non-existent xml entries from shed_tool_conf.xml and migrated_tool_conf.xml | #!/usr/bin/env python
## Example usage: python clean_tool_conf.py -i /galaxy/config/shed_tool_conf.xml -o clean_shed_tool_conf.xml
import xml.etree.ElementTree as ET
from os import path
from argparse import ArgumentParser
def check_child(root, children, tooldir, removed_tools = []):
"""
For each child in ch... | <commit_before><commit_msg>Add script that removes non-existent xml entries from shed_tool_conf.xml and migrated_tool_conf.xml<commit_after> | #!/usr/bin/env python
## Example usage: python clean_tool_conf.py -i /galaxy/config/shed_tool_conf.xml -o clean_shed_tool_conf.xml
import xml.etree.ElementTree as ET
from os import path
from argparse import ArgumentParser
def check_child(root, children, tooldir, removed_tools = []):
"""
For each child in ch... | Add script that removes non-existent xml entries from shed_tool_conf.xml and migrated_tool_conf.xml#!/usr/bin/env python
## Example usage: python clean_tool_conf.py -i /galaxy/config/shed_tool_conf.xml -o clean_shed_tool_conf.xml
import xml.etree.ElementTree as ET
from os import path
from argparse import ArgumentPars... | <commit_before><commit_msg>Add script that removes non-existent xml entries from shed_tool_conf.xml and migrated_tool_conf.xml<commit_after>#!/usr/bin/env python
## Example usage: python clean_tool_conf.py -i /galaxy/config/shed_tool_conf.xml -o clean_shed_tool_conf.xml
import xml.etree.ElementTree as ET
from os impo... | |
81e3e688aba1ec18b80188077b664e1a85d1e717 | src/events.py | src/events.py | # event system
EVENT_CALLBACKS = {}
def add_listener(event, callback, priority = 5):
if event not in EVENT_CALLBACKS:
EVENT_CALLBACKS[event] = []
if (priority, callback) not in EVENT_CALLBACKS[event]:
EVENT_CALLBACKS[event].append((priority, callback))
EVENT_CALLBACKS[event].sort(key ... | # event system
EVENT_CALLBACKS = {}
def add_listener(event, callback, priority = 5):
if event not in EVENT_CALLBACKS:
EVENT_CALLBACKS[event] = []
if (priority, callback) not in EVENT_CALLBACKS[event]:
EVENT_CALLBACKS[event].append((priority, callback))
EVENT_CALLBACKS[event].sort(key ... | Fix Event.dispatch to return True if execution is to proceed | Fix Event.dispatch to return True if execution is to proceed
| Python | bsd-2-clause | billion57/lykos,Agent-Isai/lykos,Cr0wb4r/lykos,Diitto/lykos | # event system
EVENT_CALLBACKS = {}
def add_listener(event, callback, priority = 5):
if event not in EVENT_CALLBACKS:
EVENT_CALLBACKS[event] = []
if (priority, callback) not in EVENT_CALLBACKS[event]:
EVENT_CALLBACKS[event].append((priority, callback))
EVENT_CALLBACKS[event].sort(key ... | # event system
EVENT_CALLBACKS = {}
def add_listener(event, callback, priority = 5):
if event not in EVENT_CALLBACKS:
EVENT_CALLBACKS[event] = []
if (priority, callback) not in EVENT_CALLBACKS[event]:
EVENT_CALLBACKS[event].append((priority, callback))
EVENT_CALLBACKS[event].sort(key ... | <commit_before># event system
EVENT_CALLBACKS = {}
def add_listener(event, callback, priority = 5):
if event not in EVENT_CALLBACKS:
EVENT_CALLBACKS[event] = []
if (priority, callback) not in EVENT_CALLBACKS[event]:
EVENT_CALLBACKS[event].append((priority, callback))
EVENT_CALLBACKS[e... | # event system
EVENT_CALLBACKS = {}
def add_listener(event, callback, priority = 5):
if event not in EVENT_CALLBACKS:
EVENT_CALLBACKS[event] = []
if (priority, callback) not in EVENT_CALLBACKS[event]:
EVENT_CALLBACKS[event].append((priority, callback))
EVENT_CALLBACKS[event].sort(key ... | # event system
EVENT_CALLBACKS = {}
def add_listener(event, callback, priority = 5):
if event not in EVENT_CALLBACKS:
EVENT_CALLBACKS[event] = []
if (priority, callback) not in EVENT_CALLBACKS[event]:
EVENT_CALLBACKS[event].append((priority, callback))
EVENT_CALLBACKS[event].sort(key ... | <commit_before># event system
EVENT_CALLBACKS = {}
def add_listener(event, callback, priority = 5):
if event not in EVENT_CALLBACKS:
EVENT_CALLBACKS[event] = []
if (priority, callback) not in EVENT_CALLBACKS[event]:
EVENT_CALLBACKS[event].append((priority, callback))
EVENT_CALLBACKS[e... |
8c54e99f0a53b678ea14a850bed8cf9f6dd3c8bb | metaci/build/tests/test_rq_tasks.py | metaci/build/tests/test_rq_tasks.py | # Lots of work to be done here!!!!
from unittest import mock
from django.test import TestCase
from metaci.build.tasks import check_queued_build
from metaci.conftest import (
BuildFactory,
OrgFactory,
PlanFactory,
PlanRepositoryFactory,
RepositoryFactory,
)
@mock.patch("metaci.build.tasks.reset_... | Test the RQ task as well. | Test the RQ task as well.
| Python | bsd-3-clause | SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci | Test the RQ task as well. | # Lots of work to be done here!!!!
from unittest import mock
from django.test import TestCase
from metaci.build.tasks import check_queued_build
from metaci.conftest import (
BuildFactory,
OrgFactory,
PlanFactory,
PlanRepositoryFactory,
RepositoryFactory,
)
@mock.patch("metaci.build.tasks.reset_... | <commit_before><commit_msg>Test the RQ task as well.<commit_after> | # Lots of work to be done here!!!!
from unittest import mock
from django.test import TestCase
from metaci.build.tasks import check_queued_build
from metaci.conftest import (
BuildFactory,
OrgFactory,
PlanFactory,
PlanRepositoryFactory,
RepositoryFactory,
)
@mock.patch("metaci.build.tasks.reset_... | Test the RQ task as well.# Lots of work to be done here!!!!
from unittest import mock
from django.test import TestCase
from metaci.build.tasks import check_queued_build
from metaci.conftest import (
BuildFactory,
OrgFactory,
PlanFactory,
PlanRepositoryFactory,
RepositoryFactory,
)
@mock.patch("... | <commit_before><commit_msg>Test the RQ task as well.<commit_after># Lots of work to be done here!!!!
from unittest import mock
from django.test import TestCase
from metaci.build.tasks import check_queued_build
from metaci.conftest import (
BuildFactory,
OrgFactory,
PlanFactory,
PlanRepositoryFactory,... | |
dacbb2ea0b9090a4783253259dced055da05ef26 | journal_abbreviations.py | journal_abbreviations.py | """Some additional journal abbreviations which are not provided by Crossref."""
JOURNAL_ABBRVS = {
"American Journal of Mathematics": "Am. J. Math.",
"American Journal of Physics": "Am. J. Phys",
"Annals of Physics": "Ann. Phys.",
"Communications in Mathematical Physics": "Commun. Math. Phys.",
"Jo... | Refactor journal abbreviations into seperate file | Refactor journal abbreviations into seperate file
| Python | mit | teunzwart/latex-production-tools | Refactor journal abbreviations into seperate file | """Some additional journal abbreviations which are not provided by Crossref."""
JOURNAL_ABBRVS = {
"American Journal of Mathematics": "Am. J. Math.",
"American Journal of Physics": "Am. J. Phys",
"Annals of Physics": "Ann. Phys.",
"Communications in Mathematical Physics": "Commun. Math. Phys.",
"Jo... | <commit_before><commit_msg>Refactor journal abbreviations into seperate file<commit_after> | """Some additional journal abbreviations which are not provided by Crossref."""
JOURNAL_ABBRVS = {
"American Journal of Mathematics": "Am. J. Math.",
"American Journal of Physics": "Am. J. Phys",
"Annals of Physics": "Ann. Phys.",
"Communications in Mathematical Physics": "Commun. Math. Phys.",
"Jo... | Refactor journal abbreviations into seperate file"""Some additional journal abbreviations which are not provided by Crossref."""
JOURNAL_ABBRVS = {
"American Journal of Mathematics": "Am. J. Math.",
"American Journal of Physics": "Am. J. Phys",
"Annals of Physics": "Ann. Phys.",
"Communications in Math... | <commit_before><commit_msg>Refactor journal abbreviations into seperate file<commit_after>"""Some additional journal abbreviations which are not provided by Crossref."""
JOURNAL_ABBRVS = {
"American Journal of Mathematics": "Am. J. Math.",
"American Journal of Physics": "Am. J. Phys",
"Annals of Physics": ... | |
60d307ac3f4edf4eb47e0ff4d67347345a2965f3 | zerver/migrations/0257_fix_has_link_attribute.py | zerver/migrations/0257_fix_has_link_attribute.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-10-07 05:25
from __future__ import unicode_literals
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
import lxml
def fix_has_link(apps: StateAp... | Add migrations to correct has_* fields. | message: Add migrations to correct has_* fields.
This follows up on changes to correctly set has_link, has_attachment,
and has_image when rendering messages.
Fixes #12912.
| Python | apache-2.0 | timabbott/zulip,hackerkid/zulip,punchagan/zulip,punchagan/zulip,showell/zulip,rht/zulip,andersk/zulip,synicalsyntax/zulip,andersk/zulip,showell/zulip,zulip/zulip,eeshangarg/zulip,synicalsyntax/zulip,showell/zulip,synicalsyntax/zulip,rht/zulip,timabbott/zulip,zulip/zulip,eeshangarg/zulip,brainwane/zulip,rht/zulip,rht/zu... | message: Add migrations to correct has_* fields.
This follows up on changes to correctly set has_link, has_attachment,
and has_image when rendering messages.
Fixes #12912. | # -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-10-07 05:25
from __future__ import unicode_literals
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
import lxml
def fix_has_link(apps: StateAp... | <commit_before><commit_msg>message: Add migrations to correct has_* fields.
This follows up on changes to correctly set has_link, has_attachment,
and has_image when rendering messages.
Fixes #12912.<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-10-07 05:25
from __future__ import unicode_literals
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
import lxml
def fix_has_link(apps: StateAp... | message: Add migrations to correct has_* fields.
This follows up on changes to correctly set has_link, has_attachment,
and has_image when rendering messages.
Fixes #12912.# -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-10-07 05:25
from __future__ import unicode_literals
from django.db import migrations... | <commit_before><commit_msg>message: Add migrations to correct has_* fields.
This follows up on changes to correctly set has_link, has_attachment,
and has_image when rendering messages.
Fixes #12912.<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-10-07 05:25
from __future__ import unicode_l... | |
91133ca23b6fb2ad1fc888742ea78be0f849290e | henrste/test-simple.py | henrste/test-simple.py | #!/usr/bin/env python3
from framework.test_framework import Testbed, TestEnv, require_on_aqm_node
from framework.test_utils import *
def test_simple():
def my_test(testcase):
testcase.run_greedy(node='a', tag='node-a')
testcase.run_greedy(node='b', tag='node-b')
testbed = Testbed()
test... | Add test for demonstrating new test utilities | Add test for demonstrating new test utilities
| Python | mit | henrist/aqmt,henrist/aqmt,henrist/aqmt,henrist/aqmt | Add test for demonstrating new test utilities | #!/usr/bin/env python3
from framework.test_framework import Testbed, TestEnv, require_on_aqm_node
from framework.test_utils import *
def test_simple():
def my_test(testcase):
testcase.run_greedy(node='a', tag='node-a')
testcase.run_greedy(node='b', tag='node-b')
testbed = Testbed()
test... | <commit_before><commit_msg>Add test for demonstrating new test utilities<commit_after> | #!/usr/bin/env python3
from framework.test_framework import Testbed, TestEnv, require_on_aqm_node
from framework.test_utils import *
def test_simple():
def my_test(testcase):
testcase.run_greedy(node='a', tag='node-a')
testcase.run_greedy(node='b', tag='node-b')
testbed = Testbed()
test... | Add test for demonstrating new test utilities#!/usr/bin/env python3
from framework.test_framework import Testbed, TestEnv, require_on_aqm_node
from framework.test_utils import *
def test_simple():
def my_test(testcase):
testcase.run_greedy(node='a', tag='node-a')
testcase.run_greedy(node='b', tag... | <commit_before><commit_msg>Add test for demonstrating new test utilities<commit_after>#!/usr/bin/env python3
from framework.test_framework import Testbed, TestEnv, require_on_aqm_node
from framework.test_utils import *
def test_simple():
def my_test(testcase):
testcase.run_greedy(node='a', tag='node-a')
... | |
de974f7bef19dbddc046f07bb2a58b8afa3dba09 | spacy/tests/serialize/test_serialize_tokenizer.py | spacy/tests/serialize/test_serialize_tokenizer.py | # coding: utf-8
from __future__ import unicode_literals
from ..util import make_tempdir
import pytest
@pytest.mark.parametrize('text', ["I can't do this"])
def test_serialize_tokenizer_roundtrip_bytes(en_tokenizer, text):
tokenizer_b = en_tokenizer.to_bytes()
new_tokenizer = en_tokenizer.from_bytes(tokenize... | Add serializer tests for tokenizer | Add serializer tests for tokenizer
| Python | mit | recognai/spaCy,recognai/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,explosion/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,recognai/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,aikramer2/spaCy,explosion/spaCy,honnibal/spaCy,spacy-io/spa... | Add serializer tests for tokenizer | # coding: utf-8
from __future__ import unicode_literals
from ..util import make_tempdir
import pytest
@pytest.mark.parametrize('text', ["I can't do this"])
def test_serialize_tokenizer_roundtrip_bytes(en_tokenizer, text):
tokenizer_b = en_tokenizer.to_bytes()
new_tokenizer = en_tokenizer.from_bytes(tokenize... | <commit_before><commit_msg>Add serializer tests for tokenizer<commit_after> | # coding: utf-8
from __future__ import unicode_literals
from ..util import make_tempdir
import pytest
@pytest.mark.parametrize('text', ["I can't do this"])
def test_serialize_tokenizer_roundtrip_bytes(en_tokenizer, text):
tokenizer_b = en_tokenizer.to_bytes()
new_tokenizer = en_tokenizer.from_bytes(tokenize... | Add serializer tests for tokenizer# coding: utf-8
from __future__ import unicode_literals
from ..util import make_tempdir
import pytest
@pytest.mark.parametrize('text', ["I can't do this"])
def test_serialize_tokenizer_roundtrip_bytes(en_tokenizer, text):
tokenizer_b = en_tokenizer.to_bytes()
new_tokenizer ... | <commit_before><commit_msg>Add serializer tests for tokenizer<commit_after># coding: utf-8
from __future__ import unicode_literals
from ..util import make_tempdir
import pytest
@pytest.mark.parametrize('text', ["I can't do this"])
def test_serialize_tokenizer_roundtrip_bytes(en_tokenizer, text):
tokenizer_b = e... | |
99aadd5f7cc486f59c4f92f4987f0261c21590ce | download_data.py | download_data.py | from __future__ import print_function
import os
print('Making sure that you have the necessary Python libraries installed...\n')
try:
import wget
except:
try:
import pip
except:
os.system('easy_install pip')
os.system('pip install wget')
print('')
import wget
print('Downloadi... | Remove data files, add download script | Remove data files, add download script
This directory will become incredibly bloated if we add all of the data
here. Furthermore, it is not possible to upload large data sets into
GitHub repos. Thus, we will instead provide a script to download all of
the data sets from an external server.
| Python | mit | rhiever/sklearn-benchmarks | Remove data files, add download script
This directory will become incredibly bloated if we add all of the data
here. Furthermore, it is not possible to upload large data sets into
GitHub repos. Thus, we will instead provide a script to download all of
the data sets from an external server. | from __future__ import print_function
import os
print('Making sure that you have the necessary Python libraries installed...\n')
try:
import wget
except:
try:
import pip
except:
os.system('easy_install pip')
os.system('pip install wget')
print('')
import wget
print('Downloadi... | <commit_before><commit_msg>Remove data files, add download script
This directory will become incredibly bloated if we add all of the data
here. Furthermore, it is not possible to upload large data sets into
GitHub repos. Thus, we will instead provide a script to download all of
the data sets from an external server.<c... | from __future__ import print_function
import os
print('Making sure that you have the necessary Python libraries installed...\n')
try:
import wget
except:
try:
import pip
except:
os.system('easy_install pip')
os.system('pip install wget')
print('')
import wget
print('Downloadi... | Remove data files, add download script
This directory will become incredibly bloated if we add all of the data
here. Furthermore, it is not possible to upload large data sets into
GitHub repos. Thus, we will instead provide a script to download all of
the data sets from an external server.from __future__ import print_... | <commit_before><commit_msg>Remove data files, add download script
This directory will become incredibly bloated if we add all of the data
here. Furthermore, it is not possible to upload large data sets into
GitHub repos. Thus, we will instead provide a script to download all of
the data sets from an external server.<c... | |
50586ffe08473e5c7dc11b51f9b20923900e4f1c | tests/integration/cloudformation/test_connection.py | tests/integration/cloudformation/test_connection.py | #!/usr/bin/env python
import time
import json
from tests.unit import unittest
from boto.cloudformation.connection import CloudFormationConnection
BASIC_EC2_TEMPLATE = {
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS CloudFormation Sample Template EC2InstanceSample",
"Parameters": {
},... | Add failing integration test for sigv4 failure | Add failing integration test for sigv4 failure
This repros #1037.
| Python | mit | jotes/boto,revmischa/boto,trademob/boto,shaunbrady/boto,awatts/boto,darjus-amzn/boto,alex/boto,jindongh/boto,zzzirk/boto,jameslegg/boto,campenberger/boto,nexusz99/boto,acourtney2015/boto,garnaat/boto,s0enke/boto,lra/boto,ocadotechnology/boto,pfhayes/boto,nikhilraog/boto,clouddocx/boto,ryansb/boto,ekalosak/boto,vijaylba... | Add failing integration test for sigv4 failure
This repros #1037. | #!/usr/bin/env python
import time
import json
from tests.unit import unittest
from boto.cloudformation.connection import CloudFormationConnection
BASIC_EC2_TEMPLATE = {
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS CloudFormation Sample Template EC2InstanceSample",
"Parameters": {
},... | <commit_before><commit_msg>Add failing integration test for sigv4 failure
This repros #1037.<commit_after> | #!/usr/bin/env python
import time
import json
from tests.unit import unittest
from boto.cloudformation.connection import CloudFormationConnection
BASIC_EC2_TEMPLATE = {
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS CloudFormation Sample Template EC2InstanceSample",
"Parameters": {
},... | Add failing integration test for sigv4 failure
This repros #1037.#!/usr/bin/env python
import time
import json
from tests.unit import unittest
from boto.cloudformation.connection import CloudFormationConnection
BASIC_EC2_TEMPLATE = {
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS CloudFormat... | <commit_before><commit_msg>Add failing integration test for sigv4 failure
This repros #1037.<commit_after>#!/usr/bin/env python
import time
import json
from tests.unit import unittest
from boto.cloudformation.connection import CloudFormationConnection
BASIC_EC2_TEMPLATE = {
"AWSTemplateFormatVersion": "2010-09... | |
219133a80fe4f772f64846b985e891b9536c35ea | crawler.py | crawler.py | import sys
import click
import requests
from bs4 import BeautifulSoup
from crayons import green, red
from notary import LICENSE_DIR
BASE_URL = "https://choosealicense.com"
LICENSES_URL = "{0}/licenses/".format(BASE_URL)
class License(object):
def __init__(self, url, slug, name, content):
self.url = ur... | Add CLI tool that crawls choosealicense for OSS licenses. | Add CLI tool that crawls choosealicense for OSS licenses.
| Python | mit | sxn/notary | Add CLI tool that crawls choosealicense for OSS licenses. | import sys
import click
import requests
from bs4 import BeautifulSoup
from crayons import green, red
from notary import LICENSE_DIR
BASE_URL = "https://choosealicense.com"
LICENSES_URL = "{0}/licenses/".format(BASE_URL)
class License(object):
def __init__(self, url, slug, name, content):
self.url = ur... | <commit_before><commit_msg>Add CLI tool that crawls choosealicense for OSS licenses.<commit_after> | import sys
import click
import requests
from bs4 import BeautifulSoup
from crayons import green, red
from notary import LICENSE_DIR
BASE_URL = "https://choosealicense.com"
LICENSES_URL = "{0}/licenses/".format(BASE_URL)
class License(object):
def __init__(self, url, slug, name, content):
self.url = ur... | Add CLI tool that crawls choosealicense for OSS licenses.import sys
import click
import requests
from bs4 import BeautifulSoup
from crayons import green, red
from notary import LICENSE_DIR
BASE_URL = "https://choosealicense.com"
LICENSES_URL = "{0}/licenses/".format(BASE_URL)
class License(object):
def __init... | <commit_before><commit_msg>Add CLI tool that crawls choosealicense for OSS licenses.<commit_after>import sys
import click
import requests
from bs4 import BeautifulSoup
from crayons import green, red
from notary import LICENSE_DIR
BASE_URL = "https://choosealicense.com"
LICENSES_URL = "{0}/licenses/".format(BASE_URL)... | |
5e4f960e8caf488533eb38d943e1da8c4a260631 | bluebottle/funding/migrations/0062_auto_20201222_1241.py | bluebottle/funding/migrations/0062_auto_20201222_1241.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-11-11 12:19
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 adds donor permission to staff | Add migration that adds donor permission to staff
| Python | bsd-3-clause | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | Add migration that adds donor permission to staff | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-11-11 12:19
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 adds donor permission to staff<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-11-11 12:19
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 adds donor permission to staff# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-11-11 12:19
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_per... | <commit_before><commit_msg>Add migration that adds donor permission to staff<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-11-11 12:19
from __future__ import unicode_literals
from django.db import migrations
from bluebottle.utils.utils import update_group_permissions
def add_group_permis... | |
79c074133d51fa5ac1193756e01e26b5245a4b97 | source/harmony/schema/collector.py | source/harmony/schema/collector.py | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from abc import ABCMeta, abstractmethod
class Collector(object):
'''Collect and return schemas.'''
__metaclass__ = ABCMeta
@abstractmethod
def collect(self):
'''Yield collected schemas.
... | Add standard interface for collecting schemas. | Add standard interface for collecting schemas.
| Python | apache-2.0 | 4degrees/harmony | Add standard interface for collecting schemas. | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from abc import ABCMeta, abstractmethod
class Collector(object):
'''Collect and return schemas.'''
__metaclass__ = ABCMeta
@abstractmethod
def collect(self):
'''Yield collected schemas.
... | <commit_before><commit_msg>Add standard interface for collecting schemas.<commit_after> | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from abc import ABCMeta, abstractmethod
class Collector(object):
'''Collect and return schemas.'''
__metaclass__ = ABCMeta
@abstractmethod
def collect(self):
'''Yield collected schemas.
... | Add standard interface for collecting schemas.# :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from abc import ABCMeta, abstractmethod
class Collector(object):
'''Collect and return schemas.'''
__metaclass__ = ABCMeta
@abstractmethod
def collec... | <commit_before><commit_msg>Add standard interface for collecting schemas.<commit_after># :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from abc import ABCMeta, abstractmethod
class Collector(object):
'''Collect and return schemas.'''
__metaclass__ = AB... | |
fa2a7d10522233b7287dfda28854be961868a40f | CodeFights/increaseNumberRoundness.py | CodeFights/increaseNumberRoundness.py | #!/usr/local/bin/python
# Code Fights Increase Number Roundness Problem
import re
def increaseNumberRoundness(n):
pattern = re.compile(r'0+[1-9]+')
return bool(re.search(pattern, str(n)))
def main():
tests = [
[902200100, True],
[11000, False],
[99080, True],
[1022220, T... | Solve Code Fights increase number roundness problem | Solve Code Fights increase number roundness problem
| Python | mit | HKuz/Test_Code | Solve Code Fights increase number roundness problem | #!/usr/local/bin/python
# Code Fights Increase Number Roundness Problem
import re
def increaseNumberRoundness(n):
pattern = re.compile(r'0+[1-9]+')
return bool(re.search(pattern, str(n)))
def main():
tests = [
[902200100, True],
[11000, False],
[99080, True],
[1022220, T... | <commit_before><commit_msg>Solve Code Fights increase number roundness problem<commit_after> | #!/usr/local/bin/python
# Code Fights Increase Number Roundness Problem
import re
def increaseNumberRoundness(n):
pattern = re.compile(r'0+[1-9]+')
return bool(re.search(pattern, str(n)))
def main():
tests = [
[902200100, True],
[11000, False],
[99080, True],
[1022220, T... | Solve Code Fights increase number roundness problem#!/usr/local/bin/python
# Code Fights Increase Number Roundness Problem
import re
def increaseNumberRoundness(n):
pattern = re.compile(r'0+[1-9]+')
return bool(re.search(pattern, str(n)))
def main():
tests = [
[902200100, True],
[11000,... | <commit_before><commit_msg>Solve Code Fights increase number roundness problem<commit_after>#!/usr/local/bin/python
# Code Fights Increase Number Roundness Problem
import re
def increaseNumberRoundness(n):
pattern = re.compile(r'0+[1-9]+')
return bool(re.search(pattern, str(n)))
def main():
tests = [
... | |
096fbae1461d66f84b203d8a49ea3ae65a3f4bd4 | alembic/versions/fa8cf884aa8e_migrate_to_jsonb.py | alembic/versions/fa8cf884aa8e_migrate_to_jsonb.py | """migrate to jsonb
Revision ID: fa8cf884aa8e
Revises: a7e8a70b1772
Create Date: 2018-02-05 16:13:38.229076
"""
# revision identifiers, used by Alembic.
revision = 'fa8cf884aa8e'
down_revision = 'a7e8a70b1772'
from alembic import op
import sqlalchemy as sa
tables = ['user', 'task', 'task_run', 'result']
def upgra... | Migrate info tables to JSONB format. | Migrate info tables to JSONB format.
NOTE: this will only delete the materialed view users_rank. If you have
your own leaderboards based on info keys of the user, then you will have
to delete them manually or it will fail. Then, your background jobs will
recreate them.
| Python | agpl-3.0 | Scifabric/pybossa,PyBossa/pybossa,Scifabric/pybossa,PyBossa/pybossa | Migrate info tables to JSONB format.
NOTE: this will only delete the materialed view users_rank. If you have
your own leaderboards based on info keys of the user, then you will have
to delete them manually or it will fail. Then, your background jobs will
recreate them. | """migrate to jsonb
Revision ID: fa8cf884aa8e
Revises: a7e8a70b1772
Create Date: 2018-02-05 16:13:38.229076
"""
# revision identifiers, used by Alembic.
revision = 'fa8cf884aa8e'
down_revision = 'a7e8a70b1772'
from alembic import op
import sqlalchemy as sa
tables = ['user', 'task', 'task_run', 'result']
def upgra... | <commit_before><commit_msg>Migrate info tables to JSONB format.
NOTE: this will only delete the materialed view users_rank. If you have
your own leaderboards based on info keys of the user, then you will have
to delete them manually or it will fail. Then, your background jobs will
recreate them.<commit_after> | """migrate to jsonb
Revision ID: fa8cf884aa8e
Revises: a7e8a70b1772
Create Date: 2018-02-05 16:13:38.229076
"""
# revision identifiers, used by Alembic.
revision = 'fa8cf884aa8e'
down_revision = 'a7e8a70b1772'
from alembic import op
import sqlalchemy as sa
tables = ['user', 'task', 'task_run', 'result']
def upgra... | Migrate info tables to JSONB format.
NOTE: this will only delete the materialed view users_rank. If you have
your own leaderboards based on info keys of the user, then you will have
to delete them manually or it will fail. Then, your background jobs will
recreate them."""migrate to jsonb
Revision ID: fa8cf884aa8e
Rev... | <commit_before><commit_msg>Migrate info tables to JSONB format.
NOTE: this will only delete the materialed view users_rank. If you have
your own leaderboards based on info keys of the user, then you will have
to delete them manually or it will fail. Then, your background jobs will
recreate them.<commit_after>"""migrat... | |
2aa977c55e59d9f92db31c773e6533537fad780b | fabfile.py | fabfile.py | from fabric.api import *
import os
import sys
import shutil
import SimpleHTTPServer
import SocketServer
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'output'
DEPLOY_PATH = env.deploy_path
# Branch to push on GitHub
env.gp_branch = 'master'
env.msg = 'Update blog'
SERVER = '1... | Add fabric configuration for deploy | Add fabric configuration for deploy
| Python | mit | PythonNepal/pythonnepal.github.io | Add fabric configuration for deploy | from fabric.api import *
import os
import sys
import shutil
import SimpleHTTPServer
import SocketServer
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'output'
DEPLOY_PATH = env.deploy_path
# Branch to push on GitHub
env.gp_branch = 'master'
env.msg = 'Update blog'
SERVER = '1... | <commit_before><commit_msg>Add fabric configuration for deploy<commit_after> | from fabric.api import *
import os
import sys
import shutil
import SimpleHTTPServer
import SocketServer
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'output'
DEPLOY_PATH = env.deploy_path
# Branch to push on GitHub
env.gp_branch = 'master'
env.msg = 'Update blog'
SERVER = '1... | Add fabric configuration for deployfrom fabric.api import *
import os
import sys
import shutil
import SimpleHTTPServer
import SocketServer
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'output'
DEPLOY_PATH = env.deploy_path
# Branch to push on GitHub
env.gp_branch = 'master'
en... | <commit_before><commit_msg>Add fabric configuration for deploy<commit_after>from fabric.api import *
import os
import sys
import shutil
import SimpleHTTPServer
import SocketServer
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'output'
DEPLOY_PATH = env.deploy_path
# Branch to p... | |
69dceca7d089b356a6a259592640aebf6cdeaece | tests/modules/test_cpu.py | tests/modules/test_cpu.py | # pylint: disable=C0103,C0111
import json
import unittest
import mock
import tests.mocks as mocks
from bumblebee.config import Config
from bumblebee.input import I3BarInput, LEFT_MOUSE
from bumblebee.modules.cpu import Module
class TestCPUModule(unittest.TestCase):
def setUp(self):
self._stdin, self._se... | Add unit tests for module cpu | [tests/cpu] Add unit tests for module cpu
| Python | mit | tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status | [tests/cpu] Add unit tests for module cpu | # pylint: disable=C0103,C0111
import json
import unittest
import mock
import tests.mocks as mocks
from bumblebee.config import Config
from bumblebee.input import I3BarInput, LEFT_MOUSE
from bumblebee.modules.cpu import Module
class TestCPUModule(unittest.TestCase):
def setUp(self):
self._stdin, self._se... | <commit_before><commit_msg>[tests/cpu] Add unit tests for module cpu<commit_after> | # pylint: disable=C0103,C0111
import json
import unittest
import mock
import tests.mocks as mocks
from bumblebee.config import Config
from bumblebee.input import I3BarInput, LEFT_MOUSE
from bumblebee.modules.cpu import Module
class TestCPUModule(unittest.TestCase):
def setUp(self):
self._stdin, self._se... | [tests/cpu] Add unit tests for module cpu# pylint: disable=C0103,C0111
import json
import unittest
import mock
import tests.mocks as mocks
from bumblebee.config import Config
from bumblebee.input import I3BarInput, LEFT_MOUSE
from bumblebee.modules.cpu import Module
class TestCPUModule(unittest.TestCase):
def s... | <commit_before><commit_msg>[tests/cpu] Add unit tests for module cpu<commit_after># pylint: disable=C0103,C0111
import json
import unittest
import mock
import tests.mocks as mocks
from bumblebee.config import Config
from bumblebee.input import I3BarInput, LEFT_MOUSE
from bumblebee.modules.cpu import Module
class Te... | |
be55f40e56127e10779c0ec6ee2d628dbcf529ce | fabfile.py | fabfile.py | from fabric.api import cd, env, local, lcd, run
PUPPET_MASTER_IP = '192.168.33.10'
def puppet():
env.hosts = [
'vagrant@' + PUPPET_MASTER_IP + ':22',
]
env.passwords = {
'vagrant@' + PUPPET_MASTER_IP + ':22': 'vagrant'
}
def test():
with lcd('puppet/modules'):
with lcd(... | Use fabric to deploy Puppet modules | Use fabric to deploy Puppet modules
| Python | mit | zkan/puppet-untitled-2016,zkan/puppet-untitled-2016 | Use fabric to deploy Puppet modules | from fabric.api import cd, env, local, lcd, run
PUPPET_MASTER_IP = '192.168.33.10'
def puppet():
env.hosts = [
'vagrant@' + PUPPET_MASTER_IP + ':22',
]
env.passwords = {
'vagrant@' + PUPPET_MASTER_IP + ':22': 'vagrant'
}
def test():
with lcd('puppet/modules'):
with lcd(... | <commit_before><commit_msg>Use fabric to deploy Puppet modules<commit_after> | from fabric.api import cd, env, local, lcd, run
PUPPET_MASTER_IP = '192.168.33.10'
def puppet():
env.hosts = [
'vagrant@' + PUPPET_MASTER_IP + ':22',
]
env.passwords = {
'vagrant@' + PUPPET_MASTER_IP + ':22': 'vagrant'
}
def test():
with lcd('puppet/modules'):
with lcd(... | Use fabric to deploy Puppet modulesfrom fabric.api import cd, env, local, lcd, run
PUPPET_MASTER_IP = '192.168.33.10'
def puppet():
env.hosts = [
'vagrant@' + PUPPET_MASTER_IP + ':22',
]
env.passwords = {
'vagrant@' + PUPPET_MASTER_IP + ':22': 'vagrant'
}
def test():
with lcd('... | <commit_before><commit_msg>Use fabric to deploy Puppet modules<commit_after>from fabric.api import cd, env, local, lcd, run
PUPPET_MASTER_IP = '192.168.33.10'
def puppet():
env.hosts = [
'vagrant@' + PUPPET_MASTER_IP + ':22',
]
env.passwords = {
'vagrant@' + PUPPET_MASTER_IP + ':22': 'va... | |
b5cfe24ceba05aa9e94947f4a9a1223651095f98 | proselint/checks/mau_a_vs_an.py | proselint/checks/mau_a_vs_an.py | # -*- coding: utf-8 -*-
"""MAU100: a vs. an
---
layout: post
error_code: MAU101
source: Garner's Modern American Usage
source_url: http://amzn.to/15wF76r
title: a vs. an
date: 2014-06-10 12:31:19
categories: writing
---
The first line is always wrong.
"""
import re
from nltk.corpus import cmudict
... | Add 'a' vs. 'an' rule | Add 'a' vs. 'an' rule
#31
| Python | bsd-3-clause | amperser/proselint,amperser/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,amperser/proselint,jstewmon/proselint,jstewmon/proselint | Add 'a' vs. 'an' rule
#31 | # -*- coding: utf-8 -*-
"""MAU100: a vs. an
---
layout: post
error_code: MAU101
source: Garner's Modern American Usage
source_url: http://amzn.to/15wF76r
title: a vs. an
date: 2014-06-10 12:31:19
categories: writing
---
The first line is always wrong.
"""
import re
from nltk.corpus import cmudict
... | <commit_before><commit_msg>Add 'a' vs. 'an' rule
#31<commit_after> | # -*- coding: utf-8 -*-
"""MAU100: a vs. an
---
layout: post
error_code: MAU101
source: Garner's Modern American Usage
source_url: http://amzn.to/15wF76r
title: a vs. an
date: 2014-06-10 12:31:19
categories: writing
---
The first line is always wrong.
"""
import re
from nltk.corpus import cmudict
... | Add 'a' vs. 'an' rule
#31# -*- coding: utf-8 -*-
"""MAU100: a vs. an
---
layout: post
error_code: MAU101
source: Garner's Modern American Usage
source_url: http://amzn.to/15wF76r
title: a vs. an
date: 2014-06-10 12:31:19
categories: writing
---
The first line is always wrong.
"""
import re
from n... | <commit_before><commit_msg>Add 'a' vs. 'an' rule
#31<commit_after># -*- coding: utf-8 -*-
"""MAU100: a vs. an
---
layout: post
error_code: MAU101
source: Garner's Modern American Usage
source_url: http://amzn.to/15wF76r
title: a vs. an
date: 2014-06-10 12:31:19
categories: writing
---
The first li... | |
7a4dbefbd105653866cdbad85965c07e30716b77 | tests/test_wfgenerator.py | tests/test_wfgenerator.py | import pytest
from nlppln import WorkflowGenerator
class TestWFGenerator(object):
@pytest.fixture
def wf(self):
return WorkflowGenerator()
def test_steps_in_library(self, wf):
assert len(wf.steps_library) > 0
| Test that at least one step is loaded in the steps library | Test that at least one step is loaded in the steps library
| Python | apache-2.0 | WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln | Test that at least one step is loaded in the steps library | import pytest
from nlppln import WorkflowGenerator
class TestWFGenerator(object):
@pytest.fixture
def wf(self):
return WorkflowGenerator()
def test_steps_in_library(self, wf):
assert len(wf.steps_library) > 0
| <commit_before><commit_msg>Test that at least one step is loaded in the steps library<commit_after> | import pytest
from nlppln import WorkflowGenerator
class TestWFGenerator(object):
@pytest.fixture
def wf(self):
return WorkflowGenerator()
def test_steps_in_library(self, wf):
assert len(wf.steps_library) > 0
| Test that at least one step is loaded in the steps libraryimport pytest
from nlppln import WorkflowGenerator
class TestWFGenerator(object):
@pytest.fixture
def wf(self):
return WorkflowGenerator()
def test_steps_in_library(self, wf):
assert len(wf.steps_library) > 0
| <commit_before><commit_msg>Test that at least one step is loaded in the steps library<commit_after>import pytest
from nlppln import WorkflowGenerator
class TestWFGenerator(object):
@pytest.fixture
def wf(self):
return WorkflowGenerator()
def test_steps_in_library(self, wf):
assert len(wf... | |
aedf8153750e0a45dd40fdc92e650ccaa944e22c | scripts/master/url_poller.py | scripts/master/url_poller.py | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This PollingChangeSource polls a URL for the change number.
Each change is submited to change master which triggers build steps.
Example:
To poll a ... | Add a URL poller for Chromebot. | Add a URL poller for Chromebot.
Specificly for Chromebot, it just need a simple way to trigger tests when 'http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/LAST_CHANGE' changes.
Review URL: https://chromiumcodereview.appspot.com/12079048
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@18... | Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | Add a URL poller for Chromebot.
Specificly for Chromebot, it just need a simple way to trigger tests when 'http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/LAST_CHANGE' changes.
Review URL: https://chromiumcodereview.appspot.com/12079048
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@18... | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This PollingChangeSource polls a URL for the change number.
Each change is submited to change master which triggers build steps.
Example:
To poll a ... | <commit_before><commit_msg>Add a URL poller for Chromebot.
Specificly for Chromebot, it just need a simple way to trigger tests when 'http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/LAST_CHANGE' changes.
Review URL: https://chromiumcodereview.appspot.com/12079048
git-svn-id: 239fca9b83025a0b... | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This PollingChangeSource polls a URL for the change number.
Each change is submited to change master which triggers build steps.
Example:
To poll a ... | Add a URL poller for Chromebot.
Specificly for Chromebot, it just need a simple way to trigger tests when 'http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/LAST_CHANGE' changes.
Review URL: https://chromiumcodereview.appspot.com/12079048
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@18... | <commit_before><commit_msg>Add a URL poller for Chromebot.
Specificly for Chromebot, it just need a simple way to trigger tests when 'http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/LAST_CHANGE' changes.
Review URL: https://chromiumcodereview.appspot.com/12079048
git-svn-id: 239fca9b83025a0b... | |
b6eb492b9023c568ec493b2a1923ae41f79bb3c8 | mpdlcd/utils.py | mpdlcd/utils.py | # -*- coding: utf-8 -*-
# Copyright (c) 2011-2012 Raphaël Barrois
import functools
import logging
import time
class AutoRetryCandidate(object):
"""Base class for objects wishing to use the @auto_retry decorator.
Attributes:
_retry_logger (logging.Logger): where to log connection failures
ret... | Add a utility for auto-retrying connections. | Add a utility for auto-retrying connections.
Signed-off-by: Raphaël Barrois <[email protected]>
| Python | mit | rbarrois/mpdlcd,rbarrois/mpdlcd | Add a utility for auto-retrying connections.
Signed-off-by: Raphaël Barrois <[email protected]> | # -*- coding: utf-8 -*-
# Copyright (c) 2011-2012 Raphaël Barrois
import functools
import logging
import time
class AutoRetryCandidate(object):
"""Base class for objects wishing to use the @auto_retry decorator.
Attributes:
_retry_logger (logging.Logger): where to log connection failures
ret... | <commit_before><commit_msg>Add a utility for auto-retrying connections.
Signed-off-by: Raphaël Barrois <[email protected]><commit_after> | # -*- coding: utf-8 -*-
# Copyright (c) 2011-2012 Raphaël Barrois
import functools
import logging
import time
class AutoRetryCandidate(object):
"""Base class for objects wishing to use the @auto_retry decorator.
Attributes:
_retry_logger (logging.Logger): where to log connection failures
ret... | Add a utility for auto-retrying connections.
Signed-off-by: Raphaël Barrois <[email protected]># -*- coding: utf-8 -*-
# Copyright (c) 2011-2012 Raphaël Barrois
import functools
import logging
import time
class AutoRetryCandidate(object):
"""Base class for objects wishin... | <commit_before><commit_msg>Add a utility for auto-retrying connections.
Signed-off-by: Raphaël Barrois <[email protected]><commit_after># -*- coding: utf-8 -*-
# Copyright (c) 2011-2012 Raphaël Barrois
import functools
import logging
import time
class AutoRetryCandidate(obje... | |
30c1ca3d17b677237eb822dba3d5d66bd8338b3c | pyplaybulb/playbulb.py | pyplaybulb/playbulb.py | from gatt import gattpy
class Playbulb:
hexa_name= '0x0003'
hexa_application_version = '0x0023'
hexa_microprocessor_version= '0x0021'
hexa_manufacturer= '0x0025'
hexa_brightness= '0x0010'
hexa_set_colour= ''
hexa_get_colour= ''
def __init__(self, mac_id):
self.mac_address... | Create parent class for bulbs | Create parent class for bulbs
| Python | mit | litobro/PyPlaybulb | Create parent class for bulbs | from gatt import gattpy
class Playbulb:
hexa_name= '0x0003'
hexa_application_version = '0x0023'
hexa_microprocessor_version= '0x0021'
hexa_manufacturer= '0x0025'
hexa_brightness= '0x0010'
hexa_set_colour= ''
hexa_get_colour= ''
def __init__(self, mac_id):
self.mac_address... | <commit_before><commit_msg>Create parent class for bulbs<commit_after> | from gatt import gattpy
class Playbulb:
hexa_name= '0x0003'
hexa_application_version = '0x0023'
hexa_microprocessor_version= '0x0021'
hexa_manufacturer= '0x0025'
hexa_brightness= '0x0010'
hexa_set_colour= ''
hexa_get_colour= ''
def __init__(self, mac_id):
self.mac_address... | Create parent class for bulbsfrom gatt import gattpy
class Playbulb:
hexa_name= '0x0003'
hexa_application_version = '0x0023'
hexa_microprocessor_version= '0x0021'
hexa_manufacturer= '0x0025'
hexa_brightness= '0x0010'
hexa_set_colour= ''
hexa_get_colour= ''
def __init__(self, mac_... | <commit_before><commit_msg>Create parent class for bulbs<commit_after>from gatt import gattpy
class Playbulb:
hexa_name= '0x0003'
hexa_application_version = '0x0023'
hexa_microprocessor_version= '0x0021'
hexa_manufacturer= '0x0025'
hexa_brightness= '0x0010'
hexa_set_colour= ''
hexa_get_colo... | |
240e7272a3e25abea3d7bf1e835f71e512967bd2 | python/face_compare.py | python/face_compare.py | import requests
import json
# Check whether the given faces belong to the same person or not.
# https://pixlab.io/#/cmd?id=facecompare for additional information.
src = 'https://static-secure.guim.co.uk/sys-images/Guardian/Pix/pictures/2012/7/9/1341860104423/obama_face.jpg'
target = 'https://static01.nyt.com/images/20... | Check whether the given faces belong to the same person or not | Check whether the given faces belong to the same person or not | Python | bsd-2-clause | symisc/pixlab,symisc/pixlab,symisc/pixlab | Check whether the given faces belong to the same person or not | import requests
import json
# Check whether the given faces belong to the same person or not.
# https://pixlab.io/#/cmd?id=facecompare for additional information.
src = 'https://static-secure.guim.co.uk/sys-images/Guardian/Pix/pictures/2012/7/9/1341860104423/obama_face.jpg'
target = 'https://static01.nyt.com/images/20... | <commit_before><commit_msg>Check whether the given faces belong to the same person or not<commit_after> | import requests
import json
# Check whether the given faces belong to the same person or not.
# https://pixlab.io/#/cmd?id=facecompare for additional information.
src = 'https://static-secure.guim.co.uk/sys-images/Guardian/Pix/pictures/2012/7/9/1341860104423/obama_face.jpg'
target = 'https://static01.nyt.com/images/20... | Check whether the given faces belong to the same person or notimport requests
import json
# Check whether the given faces belong to the same person or not.
# https://pixlab.io/#/cmd?id=facecompare for additional information.
src = 'https://static-secure.guim.co.uk/sys-images/Guardian/Pix/pictures/2012/7/9/134186010442... | <commit_before><commit_msg>Check whether the given faces belong to the same person or not<commit_after>import requests
import json
# Check whether the given faces belong to the same person or not.
# https://pixlab.io/#/cmd?id=facecompare for additional information.
src = 'https://static-secure.guim.co.uk/sys-images/Gu... | |
96cba2528f4ef18635c04521415ab033878f07da | mfrc522/iso14443com.py | mfrc522/iso14443com.py | from .mfrc522 import *
SEL_CASCADE_1 = 0x93
SEL_CASCADE_2 = 0x95
SEL_CASCADE_3 = 0x97
def __perform_cascade(module, cascade_level):
if cascade_level != SEL_CASCADE_1 and \
cascade_level != SEL_CASCADE_2 and \
cascade_level != SEL_CASCADE_3:
return None
# print('Performing cascade... | Implement detecting iso14443a compliant cards | [WIP] Implement detecting iso14443a compliant cards
| Python | mit | fmfi-svt-deadlock/libmfrc522.py | [WIP] Implement detecting iso14443a compliant cards | from .mfrc522 import *
SEL_CASCADE_1 = 0x93
SEL_CASCADE_2 = 0x95
SEL_CASCADE_3 = 0x97
def __perform_cascade(module, cascade_level):
if cascade_level != SEL_CASCADE_1 and \
cascade_level != SEL_CASCADE_2 and \
cascade_level != SEL_CASCADE_3:
return None
# print('Performing cascade... | <commit_before><commit_msg>[WIP] Implement detecting iso14443a compliant cards<commit_after> | from .mfrc522 import *
SEL_CASCADE_1 = 0x93
SEL_CASCADE_2 = 0x95
SEL_CASCADE_3 = 0x97
def __perform_cascade(module, cascade_level):
if cascade_level != SEL_CASCADE_1 and \
cascade_level != SEL_CASCADE_2 and \
cascade_level != SEL_CASCADE_3:
return None
# print('Performing cascade... | [WIP] Implement detecting iso14443a compliant cardsfrom .mfrc522 import *
SEL_CASCADE_1 = 0x93
SEL_CASCADE_2 = 0x95
SEL_CASCADE_3 = 0x97
def __perform_cascade(module, cascade_level):
if cascade_level != SEL_CASCADE_1 and \
cascade_level != SEL_CASCADE_2 and \
cascade_level != SEL_CASCADE_3:
... | <commit_before><commit_msg>[WIP] Implement detecting iso14443a compliant cards<commit_after>from .mfrc522 import *
SEL_CASCADE_1 = 0x93
SEL_CASCADE_2 = 0x95
SEL_CASCADE_3 = 0x97
def __perform_cascade(module, cascade_level):
if cascade_level != SEL_CASCADE_1 and \
cascade_level != SEL_CASCADE_2 and \... | |
98d22ffabc797935c03bda1b22d21ce0b81efc19 | misc/forceinventory.py | misc/forceinventory.py | import pyghmi.ipmi.command as cmd
import sys
import os
# alternatively, the following ipmi raw sequence:
# 0x3a 0xc4 0x3 0x0 0x21 0x1 0x9d 0x2f 0x76 0x32 0x2f 0x69 0x62 0x6d 0x63 0x2f 0x75 0x65 0x66 0x69 0x2f 0x66 0x6f 0x72 0x63 0x65 0x2d 0x69 0x6e 0x76 0x65 0x6e 0x74 0x6f 0x72 0x79 0x11 0x1
c = cmd.Command(sys.argv[1... | Add a utility to induce an inventory | Add a utility to induce an inventory
| Python | apache-2.0 | xcat2/confluent,xcat2/confluent,jjohnson42/confluent,xcat2/confluent,jjohnson42/confluent,jjohnson42/confluent,jjohnson42/confluent,jjohnson42/confluent,xcat2/confluent,xcat2/confluent | Add a utility to induce an inventory | import pyghmi.ipmi.command as cmd
import sys
import os
# alternatively, the following ipmi raw sequence:
# 0x3a 0xc4 0x3 0x0 0x21 0x1 0x9d 0x2f 0x76 0x32 0x2f 0x69 0x62 0x6d 0x63 0x2f 0x75 0x65 0x66 0x69 0x2f 0x66 0x6f 0x72 0x63 0x65 0x2d 0x69 0x6e 0x76 0x65 0x6e 0x74 0x6f 0x72 0x79 0x11 0x1
c = cmd.Command(sys.argv[1... | <commit_before><commit_msg>Add a utility to induce an inventory<commit_after> | import pyghmi.ipmi.command as cmd
import sys
import os
# alternatively, the following ipmi raw sequence:
# 0x3a 0xc4 0x3 0x0 0x21 0x1 0x9d 0x2f 0x76 0x32 0x2f 0x69 0x62 0x6d 0x63 0x2f 0x75 0x65 0x66 0x69 0x2f 0x66 0x6f 0x72 0x63 0x65 0x2d 0x69 0x6e 0x76 0x65 0x6e 0x74 0x6f 0x72 0x79 0x11 0x1
c = cmd.Command(sys.argv[1... | Add a utility to induce an inventoryimport pyghmi.ipmi.command as cmd
import sys
import os
# alternatively, the following ipmi raw sequence:
# 0x3a 0xc4 0x3 0x0 0x21 0x1 0x9d 0x2f 0x76 0x32 0x2f 0x69 0x62 0x6d 0x63 0x2f 0x75 0x65 0x66 0x69 0x2f 0x66 0x6f 0x72 0x63 0x65 0x2d 0x69 0x6e 0x76 0x65 0x6e 0x74 0x6f 0x72 0x79 ... | <commit_before><commit_msg>Add a utility to induce an inventory<commit_after>import pyghmi.ipmi.command as cmd
import sys
import os
# alternatively, the following ipmi raw sequence:
# 0x3a 0xc4 0x3 0x0 0x21 0x1 0x9d 0x2f 0x76 0x32 0x2f 0x69 0x62 0x6d 0x63 0x2f 0x75 0x65 0x66 0x69 0x2f 0x66 0x6f 0x72 0x63 0x65 0x2d 0x69... | |
b686bf04f64e1e907f6444233c6776458c02e120 | whatismyip.py | whatismyip.py | #! /usr/bin/python
import requests
from bs4 import BeautifulSoup
def main():
r = requests.get('http://www.whatismyip.com')
soup = BeautifulSoup(r.text)
ip_address = ''
for span in soup.find('div', 'the-ip'):
ip_address += span.text
print(ip_address)
if __name__ == '__main__':
ma... | Add script for checking your ip address | Add script for checking your ip address
| Python | apache-2.0 | MichaelAquilina/whatismyip | Add script for checking your ip address | #! /usr/bin/python
import requests
from bs4 import BeautifulSoup
def main():
r = requests.get('http://www.whatismyip.com')
soup = BeautifulSoup(r.text)
ip_address = ''
for span in soup.find('div', 'the-ip'):
ip_address += span.text
print(ip_address)
if __name__ == '__main__':
ma... | <commit_before><commit_msg>Add script for checking your ip address<commit_after> | #! /usr/bin/python
import requests
from bs4 import BeautifulSoup
def main():
r = requests.get('http://www.whatismyip.com')
soup = BeautifulSoup(r.text)
ip_address = ''
for span in soup.find('div', 'the-ip'):
ip_address += span.text
print(ip_address)
if __name__ == '__main__':
ma... | Add script for checking your ip address#! /usr/bin/python
import requests
from bs4 import BeautifulSoup
def main():
r = requests.get('http://www.whatismyip.com')
soup = BeautifulSoup(r.text)
ip_address = ''
for span in soup.find('div', 'the-ip'):
ip_address += span.text
print(ip_addre... | <commit_before><commit_msg>Add script for checking your ip address<commit_after>#! /usr/bin/python
import requests
from bs4 import BeautifulSoup
def main():
r = requests.get('http://www.whatismyip.com')
soup = BeautifulSoup(r.text)
ip_address = ''
for span in soup.find('div', 'the-ip'):
ip... | |
8a2d24856ba86dc807d91905fedc9af7faca99be | airflow/migrations/versions/d2ae31099d61_increase_text_size_for_mysql.py | airflow/migrations/versions/d2ae31099d61_increase_text_size_for_mysql.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 the ... | Increase text size for var field in variables for MySQL | [AIRFLOW-1522] Increase text size for var field in variables for MySQL
Closes #2535 from saguziel/aguziel-increase-text
| Python | apache-2.0 | subodhchhabra/airflow,Fokko/incubator-airflow,criccomini/airflow,gtoonstra/airflow,hgrif/incubator-airflow,apache/airflow,jfantom/incubator-airflow,zack3241/incubator-airflow,r39132/airflow,Twistbioscience/incubator-airflow,sergiohgz/incubator-airflow,Acehaidrey/incubator-airflow,CloverHealth/airflow,yk5/incubator-airf... | [AIRFLOW-1522] Increase text size for var field in variables for MySQL
Closes #2535 from saguziel/aguziel-increase-text | #
# 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 the ... | <commit_before><commit_msg>[AIRFLOW-1522] Increase text size for var field in variables for MySQL
Closes #2535 from saguziel/aguziel-increase-text<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 the ... | [AIRFLOW-1522] Increase text size for var field in variables for MySQL
Closes #2535 from saguziel/aguziel-increase-text#
# 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.o... | <commit_before><commit_msg>[AIRFLOW-1522] Increase text size for var field in variables for MySQL
Closes #2535 from saguziel/aguziel-increase-text<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 ... | |
e348c4620f6de3d70c0b7d71afcb00727339bfd4 | src/cli/_dbus/_properties.py | src/cli/_dbus/_properties.py | """
Properties interface.
"""
class Properties(object):
"""
Properties interface.
"""
_INTERFACE_NAME = 'org.freedesktop.DBus.Properties'
def __init__(self, dbus_object):
"""
Initializer.
:param dbus_object: the dbus object
"""
self._dbus_object = dbus_obj... | Add a class for the DBus.Properties interface. | Add a class for the DBus.Properties interface.
Signed-off-by: mulhern <[email protected]>
| Python | apache-2.0 | stratis-storage/stratis-cli,stratis-storage/stratis-cli | Add a class for the DBus.Properties interface.
Signed-off-by: mulhern <[email protected]> | """
Properties interface.
"""
class Properties(object):
"""
Properties interface.
"""
_INTERFACE_NAME = 'org.freedesktop.DBus.Properties'
def __init__(self, dbus_object):
"""
Initializer.
:param dbus_object: the dbus object
"""
self._dbus_object = dbus_obj... | <commit_before><commit_msg>Add a class for the DBus.Properties interface.
Signed-off-by: mulhern <[email protected]><commit_after> | """
Properties interface.
"""
class Properties(object):
"""
Properties interface.
"""
_INTERFACE_NAME = 'org.freedesktop.DBus.Properties'
def __init__(self, dbus_object):
"""
Initializer.
:param dbus_object: the dbus object
"""
self._dbus_object = dbus_obj... | Add a class for the DBus.Properties interface.
Signed-off-by: mulhern <[email protected]>"""
Properties interface.
"""
class Properties(object):
"""
Properties interface.
"""
_INTERFACE_NAME = 'org.freedesktop.DBus.Properties'
def __init__(self, dbus_object):
... | <commit_before><commit_msg>Add a class for the DBus.Properties interface.
Signed-off-by: mulhern <[email protected]><commit_after>"""
Properties interface.
"""
class Properties(object):
"""
Properties interface.
"""
_INTERFACE_NAME = 'org.freedesktop.DBus.Properties'... | |
0ab3ee0394af8aafe5d3815456ae2bc599c814b6 | tests/test_parsingapi.py | tests/test_parsingapi.py | from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
from tests import FlexGetBase
class TestParsingAPI(FlexGetBase):
def test_all_types_handled(self):
declared_types = set(plugin_p... | Add some tests to validate modular parsing api | Add some tests to validate modular parsing api
| Python | mit | Danfocus/Flexget,ianstalk/Flexget,Flexget/Flexget,poulpito/Flexget,grrr2/Flexget,antivirtel/Flexget,oxc/Flexget,camon/Flexget,poulpito/Flexget,ianstalk/Flexget,OmgOhnoes/Flexget,ratoaq2/Flexget,crawln45/Flexget,vfrc2/Flexget,ZefQ/Flexget,v17al/Flexget,jacobmetrick/Flexget,ratoaq2/Flexget,sean797/Flexget,thalamus/Flexge... | Add some tests to validate modular parsing api | from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
from tests import FlexGetBase
class TestParsingAPI(FlexGetBase):
def test_all_types_handled(self):
declared_types = set(plugin_p... | <commit_before><commit_msg>Add some tests to validate modular parsing api<commit_after> | from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
from tests import FlexGetBase
class TestParsingAPI(FlexGetBase):
def test_all_types_handled(self):
declared_types = set(plugin_p... | Add some tests to validate modular parsing apifrom __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
from tests import FlexGetBase
class TestParsingAPI(FlexGetBase):
def test_all_types_handle... | <commit_before><commit_msg>Add some tests to validate modular parsing api<commit_after>from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
from tests import FlexGetBase
class TestParsingAPI(Fl... | |
a0bb9f02a3aa5e58cca3760ef219d170db853864 | ModelHandler/TestModels.py | ModelHandler/TestModels.py | import DatasetHandler.CreateDataset as CreateDataset
# Test functions to handle models
def DatasetTester(dataset, dataset_uid):
# Load dataset, report input sizes
# Cook features for various models
# Report feature output sizes
# Try top models - regular with fixed size or the "heatmap"
retu... | Structure of the test function for Dataset working - we will test various CNN models on it and attach to them various custom tops | Structure of the test function for Dataset working - we will test various CNN models on it and attach to them various custom tops
| Python | mit | previtus/MGR-Project-Code,previtus/MGR-Project-Code,previtus/MGR-Project-Code | Structure of the test function for Dataset working - we will test various CNN models on it and attach to them various custom tops | import DatasetHandler.CreateDataset as CreateDataset
# Test functions to handle models
def DatasetTester(dataset, dataset_uid):
# Load dataset, report input sizes
# Cook features for various models
# Report feature output sizes
# Try top models - regular with fixed size or the "heatmap"
retu... | <commit_before><commit_msg>Structure of the test function for Dataset working - we will test various CNN models on it and attach to them various custom tops<commit_after> | import DatasetHandler.CreateDataset as CreateDataset
# Test functions to handle models
def DatasetTester(dataset, dataset_uid):
# Load dataset, report input sizes
# Cook features for various models
# Report feature output sizes
# Try top models - regular with fixed size or the "heatmap"
retu... | Structure of the test function for Dataset working - we will test various CNN models on it and attach to them various custom topsimport DatasetHandler.CreateDataset as CreateDataset
# Test functions to handle models
def DatasetTester(dataset, dataset_uid):
# Load dataset, report input sizes
# Cook features ... | <commit_before><commit_msg>Structure of the test function for Dataset working - we will test various CNN models on it and attach to them various custom tops<commit_after>import DatasetHandler.CreateDataset as CreateDataset
# Test functions to handle models
def DatasetTester(dataset, dataset_uid):
# Load dataset, ... | |
8f3052a743a6be0c6191b47a3f9c3ee366c8fa58 | YouKnowShit/Save2BCloud.py | YouKnowShit/Save2BCloud.py | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
browser = webdriver.Firefox(webdriver.FirefoxProfile("C:\\Users\\jiang\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\5xd6vmv0.default-1480350130384"))
browser.get("http://www.baidu.com")
browser.get("http://pan.baidu.com/s/1i5D... | Save file to BD yun. | Save file to BD yun.
| Python | mit | jiangtianyu2009/PiSoftCake | Save file to BD yun. | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
browser = webdriver.Firefox(webdriver.FirefoxProfile("C:\\Users\\jiang\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\5xd6vmv0.default-1480350130384"))
browser.get("http://www.baidu.com")
browser.get("http://pan.baidu.com/s/1i5D... | <commit_before><commit_msg>Save file to BD yun.<commit_after> | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
browser = webdriver.Firefox(webdriver.FirefoxProfile("C:\\Users\\jiang\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\5xd6vmv0.default-1480350130384"))
browser.get("http://www.baidu.com")
browser.get("http://pan.baidu.com/s/1i5D... | Save file to BD yun.from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
browser = webdriver.Firefox(webdriver.FirefoxProfile("C:\\Users\\jiang\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\5xd6vmv0.default-1480350130384"))
browser.get("http://www.baidu.com")
browser.get("http://... | <commit_before><commit_msg>Save file to BD yun.<commit_after>from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
browser = webdriver.Firefox(webdriver.FirefoxProfile("C:\\Users\\jiang\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\5xd6vmv0.default-1480350130384"))
browser.get("ht... | |
ace8c1dfbb05c3ffcc577ac966822e1c2752d9ea | migrations/versions/bd22b917f9f7_update_histogram_menu_order.py | migrations/versions/bd22b917f9f7_update_histogram_menu_order.py | """Update Histogram menu order
Revision ID: bd22b917f9f7
Revises: c4b87364ce33
Create Date: 2021-10-09 00:07:26.892344
"""
from alembic import op
from sqlalchemy.sql import text
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'bd22b917f9f7'
down_revision = 'c4b87364ce33'
branch_labels = ... | Fix the menu order of histogram tabs | Fix the menu order of histogram tabs
| Python | apache-2.0 | eubr-bigsea/tahiti,eubr-bigsea/tahiti,eubr-bigsea/tahiti,eubr-bigsea/tahiti | Fix the menu order of histogram tabs | """Update Histogram menu order
Revision ID: bd22b917f9f7
Revises: c4b87364ce33
Create Date: 2021-10-09 00:07:26.892344
"""
from alembic import op
from sqlalchemy.sql import text
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'bd22b917f9f7'
down_revision = 'c4b87364ce33'
branch_labels = ... | <commit_before><commit_msg>Fix the menu order of histogram tabs<commit_after> | """Update Histogram menu order
Revision ID: bd22b917f9f7
Revises: c4b87364ce33
Create Date: 2021-10-09 00:07:26.892344
"""
from alembic import op
from sqlalchemy.sql import text
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'bd22b917f9f7'
down_revision = 'c4b87364ce33'
branch_labels = ... | Fix the menu order of histogram tabs"""Update Histogram menu order
Revision ID: bd22b917f9f7
Revises: c4b87364ce33
Create Date: 2021-10-09 00:07:26.892344
"""
from alembic import op
from sqlalchemy.sql import text
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'bd22b917f9f7'
down_revisi... | <commit_before><commit_msg>Fix the menu order of histogram tabs<commit_after>"""Update Histogram menu order
Revision ID: bd22b917f9f7
Revises: c4b87364ce33
Create Date: 2021-10-09 00:07:26.892344
"""
from alembic import op
from sqlalchemy.sql import text
import sqlalchemy as sa
# revision identifiers, used by Alemb... | |
7b09f0309460eb306ef74a0bedfcad82ae3d91a0 | regparser/web/jobs/migrations/0012_auto_20161012_2059.py | regparser/web/jobs/migrations/0012_auto_20161012_2059.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-10-12 20:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('jobs', '0011_auto_20161011_2135'),
]
operations = [
migrations.AlterField(
... | Remove default keyword from hexhash key for RegulationFile. | Remove default keyword from hexhash key for RegulationFile.
| Python | cc0-1.0 | eregs/regulations-parser,tadhg-ohiggins/regulations-parser,tadhg-ohiggins/regulations-parser,eregs/regulations-parser | Remove default keyword from hexhash key for RegulationFile. | # -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-10-12 20:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('jobs', '0011_auto_20161011_2135'),
]
operations = [
migrations.AlterField(
... | <commit_before><commit_msg>Remove default keyword from hexhash key for RegulationFile.<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-10-12 20:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('jobs', '0011_auto_20161011_2135'),
]
operations = [
migrations.AlterField(
... | Remove default keyword from hexhash key for RegulationFile.# -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-10-12 20:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('jobs', '0011_auto_20161011_2135')... | <commit_before><commit_msg>Remove default keyword from hexhash key for RegulationFile.<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-10-12 20:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
... | |
f9b92cb7df1b5965fc14cefc423a8bbc664076b9 | avena/tests/test-interp.py | avena/tests/test-interp.py | #!/usr/bin/env python
from numpy import all, allclose, array, float32, max
from .. import interp
def test_interp2():
x = array([
[0, 1, 0],
[1, 1, 1],
[0, 1, 0],
], dtype=float32)
y = interp._interp2(1.0, x)
assert allclose(x, y)
if __name__ == '__main__':
pass
| Add a unit test for the interp module. | Add a unit test for the interp module.
| Python | isc | eliteraspberries/avena | Add a unit test for the interp module. | #!/usr/bin/env python
from numpy import all, allclose, array, float32, max
from .. import interp
def test_interp2():
x = array([
[0, 1, 0],
[1, 1, 1],
[0, 1, 0],
], dtype=float32)
y = interp._interp2(1.0, x)
assert allclose(x, y)
if __name__ == '__main__':
pass
| <commit_before><commit_msg>Add a unit test for the interp module.<commit_after> | #!/usr/bin/env python
from numpy import all, allclose, array, float32, max
from .. import interp
def test_interp2():
x = array([
[0, 1, 0],
[1, 1, 1],
[0, 1, 0],
], dtype=float32)
y = interp._interp2(1.0, x)
assert allclose(x, y)
if __name__ == '__main__':
pass
| Add a unit test for the interp module.#!/usr/bin/env python
from numpy import all, allclose, array, float32, max
from .. import interp
def test_interp2():
x = array([
[0, 1, 0],
[1, 1, 1],
[0, 1, 0],
], dtype=float32)
y = interp._interp2(1.0, x)
assert allclose(x, y)
if __n... | <commit_before><commit_msg>Add a unit test for the interp module.<commit_after>#!/usr/bin/env python
from numpy import all, allclose, array, float32, max
from .. import interp
def test_interp2():
x = array([
[0, 1, 0],
[1, 1, 1],
[0, 1, 0],
], dtype=float32)
y = interp._interp2(1... | |
0d649b26e092f2678f2a39f9245568c9cf14b799 | tempest/tests/services/compute/test_extensions_client.py | tempest/tests/services/compute/test_extensions_client.py | # Copyright 2015 NEC Corporation. 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 ... | Add unit tests for extensions_client | Add unit tests for extensions_client
This patch adds unit test for extensions_client.
Change-Id: I37ff50ff31ca9a2c4608f656247a0073fbfbfb61
| Python | apache-2.0 | flyingfish007/tempest,JioCloud/tempest,rakeshmi/tempest,manasi24/tempest,pczerkas/tempest,xbezdick/tempest,akash1808/tempest,roopali8/tempest,roopali8/tempest,Tesora/tesora-tempest,nunogt/tempest,JioCloud/tempest,cisco-openstack/tempest,xbezdick/tempest,manasi24/jiocloud-tempest-qatempest,dkalashnik/tempest,openstack/t... | Add unit tests for extensions_client
This patch adds unit test for extensions_client.
Change-Id: I37ff50ff31ca9a2c4608f656247a0073fbfbfb61 | # Copyright 2015 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | <commit_before><commit_msg>Add unit tests for extensions_client
This patch adds unit test for extensions_client.
Change-Id: I37ff50ff31ca9a2c4608f656247a0073fbfbfb61<commit_after> | # Copyright 2015 NEC Corporation. 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 ... | Add unit tests for extensions_client
This patch adds unit test for extensions_client.
Change-Id: I37ff50ff31ca9a2c4608f656247a0073fbfbfb61# Copyright 2015 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance w... | <commit_before><commit_msg>Add unit tests for extensions_client
This patch adds unit test for extensions_client.
Change-Id: I37ff50ff31ca9a2c4608f656247a0073fbfbfb61<commit_after># Copyright 2015 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# ... | |
cedf6f46768ee607b274bcb7fe10bb5042d5ef26 | run_tests.py | run_tests.py | import unittest
from src.convert import kilometers_to_miles, miles_to_kilometers, \
years_to_minutes, minutes_to_years
class TestConvert(unittest.TestCase):
def test_km_2_mi(self):
actual = kilometers_to_miles(1)
expected = 0.621 # From Brian, from Google
self.assertAlmostEqual(actual, expected, delta = 0.01)... | Test functions to convert units. | Test functions to convert units.
| Python | mit | RoyGBivDash/Unit_Conversions | Test functions to convert units. | import unittest
from src.convert import kilometers_to_miles, miles_to_kilometers, \
years_to_minutes, minutes_to_years
class TestConvert(unittest.TestCase):
def test_km_2_mi(self):
actual = kilometers_to_miles(1)
expected = 0.621 # From Brian, from Google
self.assertAlmostEqual(actual, expected, delta = 0.01)... | <commit_before><commit_msg>Test functions to convert units.<commit_after> | import unittest
from src.convert import kilometers_to_miles, miles_to_kilometers, \
years_to_minutes, minutes_to_years
class TestConvert(unittest.TestCase):
def test_km_2_mi(self):
actual = kilometers_to_miles(1)
expected = 0.621 # From Brian, from Google
self.assertAlmostEqual(actual, expected, delta = 0.01)... | Test functions to convert units.import unittest
from src.convert import kilometers_to_miles, miles_to_kilometers, \
years_to_minutes, minutes_to_years
class TestConvert(unittest.TestCase):
def test_km_2_mi(self):
actual = kilometers_to_miles(1)
expected = 0.621 # From Brian, from Google
self.assertAlmostEqual... | <commit_before><commit_msg>Test functions to convert units.<commit_after>import unittest
from src.convert import kilometers_to_miles, miles_to_kilometers, \
years_to_minutes, minutes_to_years
class TestConvert(unittest.TestCase):
def test_km_2_mi(self):
actual = kilometers_to_miles(1)
expected = 0.621 # From Br... | |
07f70ec2011f676cdb30eb9e41fedbc2657cbea1 | insertfiles.py | insertfiles.py | #!/usr/bin/env python3
import filelister
import subprocess
subprocess.run(['tar', '-xzf', 'queue.tar.gz'], stdout=subprocess.PIPE)
subprocess.run(['mv', 'home/bread/winhome/pictures/anime/queue', 'bots'])
filelister.insertfiles('bots/a2c.json')
| Add functionality to insert files into the config file | Add functionality to insert files into the config file
| Python | mit | BradleyCai/breadbot | Add functionality to insert files into the config file | #!/usr/bin/env python3
import filelister
import subprocess
subprocess.run(['tar', '-xzf', 'queue.tar.gz'], stdout=subprocess.PIPE)
subprocess.run(['mv', 'home/bread/winhome/pictures/anime/queue', 'bots'])
filelister.insertfiles('bots/a2c.json')
| <commit_before><commit_msg>Add functionality to insert files into the config file<commit_after> | #!/usr/bin/env python3
import filelister
import subprocess
subprocess.run(['tar', '-xzf', 'queue.tar.gz'], stdout=subprocess.PIPE)
subprocess.run(['mv', 'home/bread/winhome/pictures/anime/queue', 'bots'])
filelister.insertfiles('bots/a2c.json')
| Add functionality to insert files into the config file#!/usr/bin/env python3
import filelister
import subprocess
subprocess.run(['tar', '-xzf', 'queue.tar.gz'], stdout=subprocess.PIPE)
subprocess.run(['mv', 'home/bread/winhome/pictures/anime/queue', 'bots'])
filelister.insertfiles('bots/a2c.json')
| <commit_before><commit_msg>Add functionality to insert files into the config file<commit_after>#!/usr/bin/env python3
import filelister
import subprocess
subprocess.run(['tar', '-xzf', 'queue.tar.gz'], stdout=subprocess.PIPE)
subprocess.run(['mv', 'home/bread/winhome/pictures/anime/queue', 'bots'])
filelister.insertfi... | |
c03db0a196d04b26ac671b16cb57a0f9fdfea82e | gemini/annotation_provenance/make-ncbi-grc-patches.py | gemini/annotation_provenance/make-ncbi-grc-patches.py | #!/usr/bin/env python
"""Retrieve information on patches and fixes to GRCh37 from GRC website.
Converts information on these regions into a BED file for Gemini import.
http://www.ncbi.nlm.nih.gov/projects/genome/assembly/grc/human/
"""
import urllib2
from collections import namedtuple
from operator import attrgetter
... | Add download script to get GRC patch regions for annotation | Add download script to get GRC patch regions for annotation
| Python | mit | bgruening/gemini,bw2/gemini,heuermh/gemini,arq5x/gemini,xuzetan/gemini,bw2/gemini,bpow/gemini,arq5x/gemini,heuermh/gemini,bpow/gemini,bpow/gemini,bpow/gemini,arq5x/gemini,heuermh/gemini,bgruening/gemini,xuzetan/gemini,heuermh/gemini,bgruening/gemini,arq5x/gemini,bw2/gemini,bw2/gemini,udp3f/gemini,bgruening/gemini,udp3f... | Add download script to get GRC patch regions for annotation | #!/usr/bin/env python
"""Retrieve information on patches and fixes to GRCh37 from GRC website.
Converts information on these regions into a BED file for Gemini import.
http://www.ncbi.nlm.nih.gov/projects/genome/assembly/grc/human/
"""
import urllib2
from collections import namedtuple
from operator import attrgetter
... | <commit_before><commit_msg>Add download script to get GRC patch regions for annotation<commit_after> | #!/usr/bin/env python
"""Retrieve information on patches and fixes to GRCh37 from GRC website.
Converts information on these regions into a BED file for Gemini import.
http://www.ncbi.nlm.nih.gov/projects/genome/assembly/grc/human/
"""
import urllib2
from collections import namedtuple
from operator import attrgetter
... | Add download script to get GRC patch regions for annotation#!/usr/bin/env python
"""Retrieve information on patches and fixes to GRCh37 from GRC website.
Converts information on these regions into a BED file for Gemini import.
http://www.ncbi.nlm.nih.gov/projects/genome/assembly/grc/human/
"""
import urllib2
from col... | <commit_before><commit_msg>Add download script to get GRC patch regions for annotation<commit_after>#!/usr/bin/env python
"""Retrieve information on patches and fixes to GRCh37 from GRC website.
Converts information on these regions into a BED file for Gemini import.
http://www.ncbi.nlm.nih.gov/projects/genome/assemb... | |
c99929e2aaa119104c20b0d865b8e42c0b15a03e | morse/morse_radio.py | morse/morse_radio.py | # Import modules
from microbit import *
import radio
# define morse code dictionary
morse = {
"a": ".-",
"b": "-...",
"c": "-.-.",
"d": "-..",
"e": ".",
"f": "..-.",
"g": "--.",
"h": "....",
"i": "..",
"j": ".---",
"k": "-.-",
"l": ".-..",
"m": "--",
"n": "-.",
... | Add ability to send morse code via radio | Add ability to send morse code via radio
| Python | mit | OiNutter/microbit-scripts | Add ability to send morse code via radio | # Import modules
from microbit import *
import radio
# define morse code dictionary
morse = {
"a": ".-",
"b": "-...",
"c": "-.-.",
"d": "-..",
"e": ".",
"f": "..-.",
"g": "--.",
"h": "....",
"i": "..",
"j": ".---",
"k": "-.-",
"l": ".-..",
"m": "--",
"n": "-.",
... | <commit_before><commit_msg>Add ability to send morse code via radio<commit_after> | # Import modules
from microbit import *
import radio
# define morse code dictionary
morse = {
"a": ".-",
"b": "-...",
"c": "-.-.",
"d": "-..",
"e": ".",
"f": "..-.",
"g": "--.",
"h": "....",
"i": "..",
"j": ".---",
"k": "-.-",
"l": ".-..",
"m": "--",
"n": "-.",
... | Add ability to send morse code via radio# Import modules
from microbit import *
import radio
# define morse code dictionary
morse = {
"a": ".-",
"b": "-...",
"c": "-.-.",
"d": "-..",
"e": ".",
"f": "..-.",
"g": "--.",
"h": "....",
"i": "..",
"j": ".---",
"k": "-.-",
"l":... | <commit_before><commit_msg>Add ability to send morse code via radio<commit_after># Import modules
from microbit import *
import radio
# define morse code dictionary
morse = {
"a": ".-",
"b": "-...",
"c": "-.-.",
"d": "-..",
"e": ".",
"f": "..-.",
"g": "--.",
"h": "....",
"i": "..",
... | |
7ed12facca2f94eb8bba721e9b11882ea24726fe | crmapp/subscribers/views.py | crmapp/subscribers/views.py | from django.shortcuts import render
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from .forms import SubscriberForm
def subscriber_new(request, template='subscribers/subscriber_new.html'):
if request.method == 'POST':
form = SubscriberForm(request.POST)
i... | from django.shortcuts import render
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from .forms import SubscriberForm
from .models import Subscriber
def subscriber_new(request, template='subscribers/subscriber_new.html'):
if request.method == 'POST':
form = Subscri... | Create the Subscriber Form - Part II > Update the View | Create the Subscriber Form - Part II > Update the View
| Python | mit | deenaariff/Django,tabdon/crmeasyapp,tabdon/crmeasyapp | from django.shortcuts import render
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from .forms import SubscriberForm
def subscriber_new(request, template='subscribers/subscriber_new.html'):
if request.method == 'POST':
form = SubscriberForm(request.POST)
i... | from django.shortcuts import render
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from .forms import SubscriberForm
from .models import Subscriber
def subscriber_new(request, template='subscribers/subscriber_new.html'):
if request.method == 'POST':
form = Subscri... | <commit_before>from django.shortcuts import render
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from .forms import SubscriberForm
def subscriber_new(request, template='subscribers/subscriber_new.html'):
if request.method == 'POST':
form = SubscriberForm(request.... | from django.shortcuts import render
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from .forms import SubscriberForm
from .models import Subscriber
def subscriber_new(request, template='subscribers/subscriber_new.html'):
if request.method == 'POST':
form = Subscri... | from django.shortcuts import render
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from .forms import SubscriberForm
def subscriber_new(request, template='subscribers/subscriber_new.html'):
if request.method == 'POST':
form = SubscriberForm(request.POST)
i... | <commit_before>from django.shortcuts import render
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from .forms import SubscriberForm
def subscriber_new(request, template='subscribers/subscriber_new.html'):
if request.method == 'POST':
form = SubscriberForm(request.... |
872159c61ee20be1befdfa21e42c54f2b420c7b8 | qiita_ware/commands.py | qiita_ware/commands.py | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | Add library code for ebi functions | Add library code for ebi functions
| Python | bsd-3-clause | squirrelo/qiita,ElDeveloper/qiita,wasade/qiita,RNAer/qiita,squirrelo/qiita,antgonza/qiita,adamrp/qiita,adamrp/qiita,antgonza/qiita,antgonza/qiita,adamrp/qiita,biocore/qiita,wasade/qiita,josenavas/QiiTa,ElDeveloper/qiita,antgonza/qiita,RNAer/qiita,squirrelo/qiita,wasade/qiita,RNAer/qiita,josenavas/QiiTa,RNAer/qiita,jose... | Add library code for ebi functions | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | <commit_before><commit_msg>Add library code for ebi functions<commit_after> | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | Add library code for ebi functions# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# --------------... | <commit_before><commit_msg>Add library code for ebi functions<commit_after># -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distrib... | |
7589f2364a73d75711b596ce8ab9581986bd4129 | radio/management/commands/set_default_access_tg.py | radio/management/commands/set_default_access_tg.py | import sys
import datetime
import csv
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.utils import timezone
from radio.models import *
class Command(BaseCommand):
help = 'Helper for new TalkGroup Access'
def add_arguments(self, parser):
p... | Add utility to setup TalkGroupAccess talkgroups | Add utility to setup TalkGroupAccess talkgroups
The utility will add all TalkGroups that are marked as public into the specivied specified TalkGroup Access list
| Python | mit | ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player | Add utility to setup TalkGroupAccess talkgroups
The utility will add all TalkGroups that are marked as public into the specivied specified TalkGroup Access list | import sys
import datetime
import csv
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.utils import timezone
from radio.models import *
class Command(BaseCommand):
help = 'Helper for new TalkGroup Access'
def add_arguments(self, parser):
p... | <commit_before><commit_msg>Add utility to setup TalkGroupAccess talkgroups
The utility will add all TalkGroups that are marked as public into the specivied specified TalkGroup Access list<commit_after> | import sys
import datetime
import csv
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.utils import timezone
from radio.models import *
class Command(BaseCommand):
help = 'Helper for new TalkGroup Access'
def add_arguments(self, parser):
p... | Add utility to setup TalkGroupAccess talkgroups
The utility will add all TalkGroups that are marked as public into the specivied specified TalkGroup Access listimport sys
import datetime
import csv
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.utils imp... | <commit_before><commit_msg>Add utility to setup TalkGroupAccess talkgroups
The utility will add all TalkGroups that are marked as public into the specivied specified TalkGroup Access list<commit_after>import sys
import datetime
import csv
from django.core.management.base import BaseCommand, CommandError
from django.c... | |
b0783691bc0855ad154b649ddfabe7572f79f7fd | ordering/__init__.py | ordering/__init__.py | from fractions import Fraction
class Ordering:
_start = object()
_end = object()
def __init__(self):
self._labels = {
self._start: Fraction(0),
self._end: Fraction(1)
}
self._successors = {
self._start: self._end
}
self._predeces... | Add class representing an ordering on elements | Add class representing an ordering on elements
| Python | mit | madman-bob/python-order-maintenance | Add class representing an ordering on elements | from fractions import Fraction
class Ordering:
_start = object()
_end = object()
def __init__(self):
self._labels = {
self._start: Fraction(0),
self._end: Fraction(1)
}
self._successors = {
self._start: self._end
}
self._predeces... | <commit_before><commit_msg>Add class representing an ordering on elements<commit_after> | from fractions import Fraction
class Ordering:
_start = object()
_end = object()
def __init__(self):
self._labels = {
self._start: Fraction(0),
self._end: Fraction(1)
}
self._successors = {
self._start: self._end
}
self._predeces... | Add class representing an ordering on elementsfrom fractions import Fraction
class Ordering:
_start = object()
_end = object()
def __init__(self):
self._labels = {
self._start: Fraction(0),
self._end: Fraction(1)
}
self._successors = {
self._sta... | <commit_before><commit_msg>Add class representing an ordering on elements<commit_after>from fractions import Fraction
class Ordering:
_start = object()
_end = object()
def __init__(self):
self._labels = {
self._start: Fraction(0),
self._end: Fraction(1)
}
s... | |
ff4f9810e3cccf89858f62bf1e6a3d060f7168ad | mapit/management/commands/mapit_UK_fix_2013-10-south-tynedale.py | mapit/management/commands/mapit_UK_fix_2013-10-south-tynedale.py | # This script is to be run as a one-off to fix up a specific boundary that
# the Ordnance survey gave the wrong code too in the 2013-10 edition of the
# boundary line. It must be run *before* importing the 2014-05 edition.
from optparse import make_option
from django.core.management.base import NoArgsCommand
from djan... | Add a command to fix South Tynedale's GSS code from 2013-10 | Add a command to fix South Tynedale's GSS code from 2013-10
South Tynedale UTE was given the wrong GSS code in the last Ordnance
Survey boundary line update in November 2013. They corrected this in
the May 2014 edition, but we need to fix up our historical version of
the area in order to be able to import that.
| Python | agpl-3.0 | chris48s/mapit,Sinar/mapit,opencorato/mapit,chris48s/mapit,opencorato/mapit,Code4SA/mapit,opencorato/mapit,chris48s/mapit,Code4SA/mapit,Sinar/mapit,Code4SA/mapit | Add a command to fix South Tynedale's GSS code from 2013-10
South Tynedale UTE was given the wrong GSS code in the last Ordnance
Survey boundary line update in November 2013. They corrected this in
the May 2014 edition, but we need to fix up our historical version of
the area in order to be able to import that. | # This script is to be run as a one-off to fix up a specific boundary that
# the Ordnance survey gave the wrong code too in the 2013-10 edition of the
# boundary line. It must be run *before* importing the 2014-05 edition.
from optparse import make_option
from django.core.management.base import NoArgsCommand
from djan... | <commit_before><commit_msg>Add a command to fix South Tynedale's GSS code from 2013-10
South Tynedale UTE was given the wrong GSS code in the last Ordnance
Survey boundary line update in November 2013. They corrected this in
the May 2014 edition, but we need to fix up our historical version of
the area in order to be ... | # This script is to be run as a one-off to fix up a specific boundary that
# the Ordnance survey gave the wrong code too in the 2013-10 edition of the
# boundary line. It must be run *before* importing the 2014-05 edition.
from optparse import make_option
from django.core.management.base import NoArgsCommand
from djan... | Add a command to fix South Tynedale's GSS code from 2013-10
South Tynedale UTE was given the wrong GSS code in the last Ordnance
Survey boundary line update in November 2013. They corrected this in
the May 2014 edition, but we need to fix up our historical version of
the area in order to be able to import that.# This ... | <commit_before><commit_msg>Add a command to fix South Tynedale's GSS code from 2013-10
South Tynedale UTE was given the wrong GSS code in the last Ordnance
Survey boundary line update in November 2013. They corrected this in
the May 2014 edition, but we need to fix up our historical version of
the area in order to be ... | |
40438912639ea20614b7957443450463f6519c0b | clusto_query/test/test_lexer.py | clusto_query/test/test_lexer.py | import unittest
import clusto_query.lexer
class LexerTest(unittest.TestCase):
def test_consume(self):
self.assertEqual(clusto_query.lexer.consume('nom', 'nomnomnom'),
'nomnom')
def test_lex_string_inner_quoted_basic(self):
self.assertEqual(clusto_query.lexer.lex_strin... | Add some tests for lexer.py | Add some tests for lexer.py
| Python | isc | uber/clusto-query,uber/clusto-query | Add some tests for lexer.py | import unittest
import clusto_query.lexer
class LexerTest(unittest.TestCase):
def test_consume(self):
self.assertEqual(clusto_query.lexer.consume('nom', 'nomnomnom'),
'nomnom')
def test_lex_string_inner_quoted_basic(self):
self.assertEqual(clusto_query.lexer.lex_strin... | <commit_before><commit_msg>Add some tests for lexer.py<commit_after> | import unittest
import clusto_query.lexer
class LexerTest(unittest.TestCase):
def test_consume(self):
self.assertEqual(clusto_query.lexer.consume('nom', 'nomnomnom'),
'nomnom')
def test_lex_string_inner_quoted_basic(self):
self.assertEqual(clusto_query.lexer.lex_strin... | Add some tests for lexer.pyimport unittest
import clusto_query.lexer
class LexerTest(unittest.TestCase):
def test_consume(self):
self.assertEqual(clusto_query.lexer.consume('nom', 'nomnomnom'),
'nomnom')
def test_lex_string_inner_quoted_basic(self):
self.assertEqual(c... | <commit_before><commit_msg>Add some tests for lexer.py<commit_after>import unittest
import clusto_query.lexer
class LexerTest(unittest.TestCase):
def test_consume(self):
self.assertEqual(clusto_query.lexer.consume('nom', 'nomnomnom'),
'nomnom')
def test_lex_string_inner_quote... | |
4d5c9066b9fba17cd484ecfafc646989e4828a87 | connectionless_client_2.py | connectionless_client_2.py | """
A simple connectionless client. It is for studying purposes only.
"""
import socket
__author__ = "Facundo Victor"
__license__ = "MIT"
__email__ = "[email protected]"
def do_some_messaging(host, port):
"""
Handle a simple UDP client. Ask for stdinput data and send it to the UDP
server.
:param... | Add a basic UDP client | Add a basic UDP client
| Python | mit | facundovictor/non-blocking-socket-samples | Add a basic UDP client | """
A simple connectionless client. It is for studying purposes only.
"""
import socket
__author__ = "Facundo Victor"
__license__ = "MIT"
__email__ = "[email protected]"
def do_some_messaging(host, port):
"""
Handle a simple UDP client. Ask for stdinput data and send it to the UDP
server.
:param... | <commit_before><commit_msg>Add a basic UDP client<commit_after> | """
A simple connectionless client. It is for studying purposes only.
"""
import socket
__author__ = "Facundo Victor"
__license__ = "MIT"
__email__ = "[email protected]"
def do_some_messaging(host, port):
"""
Handle a simple UDP client. Ask for stdinput data and send it to the UDP
server.
:param... | Add a basic UDP client"""
A simple connectionless client. It is for studying purposes only.
"""
import socket
__author__ = "Facundo Victor"
__license__ = "MIT"
__email__ = "[email protected]"
def do_some_messaging(host, port):
"""
Handle a simple UDP client. Ask for stdinput data and send it to the UDP
... | <commit_before><commit_msg>Add a basic UDP client<commit_after>"""
A simple connectionless client. It is for studying purposes only.
"""
import socket
__author__ = "Facundo Victor"
__license__ = "MIT"
__email__ = "[email protected]"
def do_some_messaging(host, port):
"""
Handle a simple UDP client. Ask f... | |
5da2c5406daf31cb4f0c310abd56c1173609c549 | join_clips.py | join_clips.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from moviepy.editor import VideoFileClip, clips_array
import argparse
def main(args):
print(args)
clips = map(VideoFileClip, args.file)
final_clip = clips_array([clips])
final_clip.write_videofile(args.output, fps=15)
if __name__ == '__main__':
parser... | Add script to create single movie file from others horizontally | Add script to create single movie file from others horizontally
| Python | mit | NGTS/frame-movies,NGTS/frame-movies | Add script to create single movie file from others horizontally | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from moviepy.editor import VideoFileClip, clips_array
import argparse
def main(args):
print(args)
clips = map(VideoFileClip, args.file)
final_clip = clips_array([clips])
final_clip.write_videofile(args.output, fps=15)
if __name__ == '__main__':
parser... | <commit_before><commit_msg>Add script to create single movie file from others horizontally<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from moviepy.editor import VideoFileClip, clips_array
import argparse
def main(args):
print(args)
clips = map(VideoFileClip, args.file)
final_clip = clips_array([clips])
final_clip.write_videofile(args.output, fps=15)
if __name__ == '__main__':
parser... | Add script to create single movie file from others horizontally#!/usr/bin/env python
# -*- coding: utf-8 -*-
from moviepy.editor import VideoFileClip, clips_array
import argparse
def main(args):
print(args)
clips = map(VideoFileClip, args.file)
final_clip = clips_array([clips])
final_clip.write_videof... | <commit_before><commit_msg>Add script to create single movie file from others horizontally<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from moviepy.editor import VideoFileClip, clips_array
import argparse
def main(args):
print(args)
clips = map(VideoFileClip, args.file)
final_clip = clips_a... | |
5cb6057240fd296dbce36829366611b30cdaab29 | gem/migrations/0027_set_site_settings_correctly.py | gem/migrations/0027_set_site_settings_correctly.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from molo.profiles.models import UserProfilesSettings
from wagtail.wagtailcore.models import Site
def set_site_settings(apps, schema_editor):
for site in Site.objects.all():
settings = UserProfilesSettings.... | Add migration to set UserProfilesSettings correctly | Add migration to set UserProfilesSettings correctly
| Python | bsd-2-clause | praekelt/molo-gem,praekelt/molo-gem,praekelt/molo-gem | Add migration to set UserProfilesSettings correctly | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from molo.profiles.models import UserProfilesSettings
from wagtail.wagtailcore.models import Site
def set_site_settings(apps, schema_editor):
for site in Site.objects.all():
settings = UserProfilesSettings.... | <commit_before><commit_msg>Add migration to set UserProfilesSettings correctly<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from molo.profiles.models import UserProfilesSettings
from wagtail.wagtailcore.models import Site
def set_site_settings(apps, schema_editor):
for site in Site.objects.all():
settings = UserProfilesSettings.... | Add migration to set UserProfilesSettings correctly# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from molo.profiles.models import UserProfilesSettings
from wagtail.wagtailcore.models import Site
def set_site_settings(apps, schema_editor):
for site in Site.obje... | <commit_before><commit_msg>Add migration to set UserProfilesSettings correctly<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from molo.profiles.models import UserProfilesSettings
from wagtail.wagtailcore.models import Site
def set_site_settings(apps, ... | |
383882ff8078efa3e368cde1bde96279eb0b3b5d | apps/gallery/migrations/0003_auto_20151015_0005.py | apps/gallery/migrations/0003_auto_20151015_0005.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('gallery', '0002_auto_20150916_1953'),
]
operations = [
migrations.AlterModelOptions(
name='responsiveimage',
... | Add meta class migration for responsiveimage | Add meta class migration for responsiveimage
| Python | mit | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | Add meta class migration for responsiveimage | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('gallery', '0002_auto_20150916_1953'),
]
operations = [
migrations.AlterModelOptions(
name='responsiveimage',
... | <commit_before><commit_msg>Add meta class migration for responsiveimage<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('gallery', '0002_auto_20150916_1953'),
]
operations = [
migrations.AlterModelOptions(
name='responsiveimage',
... | Add meta class migration for responsiveimage# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('gallery', '0002_auto_20150916_1953'),
]
operations = [
migrations.AlterModelOpti... | <commit_before><commit_msg>Add meta class migration for responsiveimage<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('gallery', '0002_auto_20150916_1953'),
]
operati... | |
3edef1b1876014298d53f7ac667af46b841432c5 | sift/concerts/management/commands/add_artists.py | sift/concerts/management/commands/add_artists.py | """
management/commands/add_artists.py
Add artist(s) to database.
"""
from datetime import datetime
import os, sys
from django.core.management import call_command
from django.core.management.base import BaseCommand, CommandError
from concerts.models import Artist
from concerts.utils import FIXTURE_DIRS
class Comman... | Add mgmt command to add artists to DB | Add mgmt command to add artists to DB
| Python | mit | industryjhr/sift_app,industryjhr/sift_app,jravesloot/sift_app,jravesloot/sift_app | Add mgmt command to add artists to DB | """
management/commands/add_artists.py
Add artist(s) to database.
"""
from datetime import datetime
import os, sys
from django.core.management import call_command
from django.core.management.base import BaseCommand, CommandError
from concerts.models import Artist
from concerts.utils import FIXTURE_DIRS
class Comman... | <commit_before><commit_msg>Add mgmt command to add artists to DB<commit_after> | """
management/commands/add_artists.py
Add artist(s) to database.
"""
from datetime import datetime
import os, sys
from django.core.management import call_command
from django.core.management.base import BaseCommand, CommandError
from concerts.models import Artist
from concerts.utils import FIXTURE_DIRS
class Comman... | Add mgmt command to add artists to DB"""
management/commands/add_artists.py
Add artist(s) to database.
"""
from datetime import datetime
import os, sys
from django.core.management import call_command
from django.core.management.base import BaseCommand, CommandError
from concerts.models import Artist
from concerts.ut... | <commit_before><commit_msg>Add mgmt command to add artists to DB<commit_after>"""
management/commands/add_artists.py
Add artist(s) to database.
"""
from datetime import datetime
import os, sys
from django.core.management import call_command
from django.core.management.base import BaseCommand, CommandError
from conce... | |
bd609e591f8eac5bf50221b41df37da27e026afb | pymetabiosis/bindings.py | pymetabiosis/bindings.py | from cffi import FFI
import sys
ffi = FFI()
ffi.cdef("""
typedef ... PyObject;
void Py_Initialize();
void Py_Finalize();
int PyRun_SimpleString(const char *command);
void Py_INCREF(PyObject *o);
void Py_XINCREF(PyObject *o);
void Py_DECREF(PyObject *o)... | Add the binding to the C API | Add the binding to the C API
| Python | mit | prabhuramachandran/pymetabiosis,rguillebert/pymetabiosis | Add the binding to the C API | from cffi import FFI
import sys
ffi = FFI()
ffi.cdef("""
typedef ... PyObject;
void Py_Initialize();
void Py_Finalize();
int PyRun_SimpleString(const char *command);
void Py_INCREF(PyObject *o);
void Py_XINCREF(PyObject *o);
void Py_DECREF(PyObject *o)... | <commit_before><commit_msg>Add the binding to the C API<commit_after> | from cffi import FFI
import sys
ffi = FFI()
ffi.cdef("""
typedef ... PyObject;
void Py_Initialize();
void Py_Finalize();
int PyRun_SimpleString(const char *command);
void Py_INCREF(PyObject *o);
void Py_XINCREF(PyObject *o);
void Py_DECREF(PyObject *o)... | Add the binding to the C APIfrom cffi import FFI
import sys
ffi = FFI()
ffi.cdef("""
typedef ... PyObject;
void Py_Initialize();
void Py_Finalize();
int PyRun_SimpleString(const char *command);
void Py_INCREF(PyObject *o);
void Py_XINCREF(PyObject *o);
... | <commit_before><commit_msg>Add the binding to the C API<commit_after>from cffi import FFI
import sys
ffi = FFI()
ffi.cdef("""
typedef ... PyObject;
void Py_Initialize();
void Py_Finalize();
int PyRun_SimpleString(const char *command);
void Py_INCREF(PyObject *o);
... | |
400369a4905876bc523631dfd75518a04dab069c | senlin/tests/tempest/api/policies/test_policy_validate.py | senlin/tests/tempest/api/policies/test_policy_validate.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 tests for policy validation | Add API tests for policy validation
Add API tests for policy validation
Change-Id: Id3c0bc4280f1c76d4fc085ed8c292c99b4db334b
| Python | apache-2.0 | openstack/senlin,stackforge/senlin,stackforge/senlin,openstack/senlin,openstack/senlin | Add API tests for policy validation
Add API tests for policy validation
Change-Id: Id3c0bc4280f1c76d4fc085ed8c292c99b4db334b | # 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 tests for policy validation
Add API tests for policy validation
Change-Id: Id3c0bc4280f1c76d4fc085ed8c292c99b4db334b<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 tests for policy validation
Add API tests for policy validation
Change-Id: Id3c0bc4280f1c76d4fc085ed8c292c99b4db334b# 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... | <commit_before><commit_msg>Add API tests for policy validation
Add API tests for policy validation
Change-Id: Id3c0bc4280f1c76d4fc085ed8c292c99b4db334b<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 c... | |
e76553404834de2f1123bd545922caab28e16375 | src/examples/tutorial/example_rhythmtransform.py | src/examples/tutorial/example_rhythmtransform.py | import sys
from essentia.standard import *
from essentia import Pool
try:
input_file = sys.argv[1]
except:
print "usage:", sys.argv[0], "<input_file>"
sys.exit()
sampleRate = 22050
frameSize = 8192
hopSize = 1024
rmsFrameSize = 256
rmsHopSize = 32
loader = MonoLoader(filename=input_file, sam... | Add python example for RhythmTransform | Add python example for RhythmTransform
| Python | agpl-3.0 | MTG/essentia,carthach/essentia,arseneyr/essentia,MTG/essentia,carthach/essentia,arseneyr/essentia,MTG/essentia,MTG/essentia,carthach/essentia,arseneyr/essentia,MTG/essentia,carthach/essentia,arseneyr/essentia,carthach/essentia,arseneyr/essentia | Add python example for RhythmTransform | import sys
from essentia.standard import *
from essentia import Pool
try:
input_file = sys.argv[1]
except:
print "usage:", sys.argv[0], "<input_file>"
sys.exit()
sampleRate = 22050
frameSize = 8192
hopSize = 1024
rmsFrameSize = 256
rmsHopSize = 32
loader = MonoLoader(filename=input_file, sam... | <commit_before><commit_msg>Add python example for RhythmTransform<commit_after> | import sys
from essentia.standard import *
from essentia import Pool
try:
input_file = sys.argv[1]
except:
print "usage:", sys.argv[0], "<input_file>"
sys.exit()
sampleRate = 22050
frameSize = 8192
hopSize = 1024
rmsFrameSize = 256
rmsHopSize = 32
loader = MonoLoader(filename=input_file, sam... | Add python example for RhythmTransformimport sys
from essentia.standard import *
from essentia import Pool
try:
input_file = sys.argv[1]
except:
print "usage:", sys.argv[0], "<input_file>"
sys.exit()
sampleRate = 22050
frameSize = 8192
hopSize = 1024
rmsFrameSize = 256
rmsHopSize = 32
loader... | <commit_before><commit_msg>Add python example for RhythmTransform<commit_after>import sys
from essentia.standard import *
from essentia import Pool
try:
input_file = sys.argv[1]
except:
print "usage:", sys.argv[0], "<input_file>"
sys.exit()
sampleRate = 22050
frameSize = 8192
hopSize = 1024
rmsF... | |
aac06331f2879cc8d39d5512c84da91f2832ff20 | apps/authentication/migrations/0007_onlineuser_bio.py | apps/authentication/migrations/0007_onlineuser_bio.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('authentication', '0006_jobmail_set_true'),
]
operations = [
migrations.AddField(
model_name='onlineuser',
... | Add migration for bio user field | Add migration for bio user field
| Python | mit | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | Add migration for bio user field | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('authentication', '0006_jobmail_set_true'),
]
operations = [
migrations.AddField(
model_name='onlineuser',
... | <commit_before><commit_msg>Add migration for bio user field<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('authentication', '0006_jobmail_set_true'),
]
operations = [
migrations.AddField(
model_name='onlineuser',
... | Add migration for bio user field# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('authentication', '0006_jobmail_set_true'),
]
operations = [
migrations.AddField(
... | <commit_before><commit_msg>Add migration for bio user field<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('authentication', '0006_jobmail_set_true'),
]
operations = [... | |
1d95063d1416f82115fa26d72d548ada0616e239 | gensabenchmarks/go_func_utils.py | gensabenchmarks/go_func_utils.py | import sys
import contextlib
import inspect
import gensabenchmarks.go_benchmark_functions as gbf
def goclass():
"""
Generator to get global optimization test classes/functions
defined in SciPy
"""
bench_members = inspect.getmembers(gbf, inspect.isclass)
benchmark_functions = [item for item in b... | Fix import with full path | Fix import with full path
| Python | bsd-2-clause | sgubianpm/gensabench,sgubianpm/gensabench,sgubianpm/pygensa,sgubianpm/HyGSA,sgubianpm/pygensa,sgubianpm/HyGSA | Fix import with full path | import sys
import contextlib
import inspect
import gensabenchmarks.go_benchmark_functions as gbf
def goclass():
"""
Generator to get global optimization test classes/functions
defined in SciPy
"""
bench_members = inspect.getmembers(gbf, inspect.isclass)
benchmark_functions = [item for item in b... | <commit_before><commit_msg>Fix import with full path<commit_after> | import sys
import contextlib
import inspect
import gensabenchmarks.go_benchmark_functions as gbf
def goclass():
"""
Generator to get global optimization test classes/functions
defined in SciPy
"""
bench_members = inspect.getmembers(gbf, inspect.isclass)
benchmark_functions = [item for item in b... | Fix import with full pathimport sys
import contextlib
import inspect
import gensabenchmarks.go_benchmark_functions as gbf
def goclass():
"""
Generator to get global optimization test classes/functions
defined in SciPy
"""
bench_members = inspect.getmembers(gbf, inspect.isclass)
benchmark_functi... | <commit_before><commit_msg>Fix import with full path<commit_after>import sys
import contextlib
import inspect
import gensabenchmarks.go_benchmark_functions as gbf
def goclass():
"""
Generator to get global optimization test classes/functions
defined in SciPy
"""
bench_members = inspect.getmembers(g... | |
ebfa9187f086cf905371f0e364aed534f535aff7 | examples/lvm_non_linear.py | examples/lvm_non_linear.py | import os
from examples.common import print_devices
import blivet
from blivet.size import Size
from blivet.util import set_up_logging, create_sparse_tempfile
set_up_logging()
b = blivet.Blivet() # create an instance of Blivet (don't add system devices)
# create a disk image file on which to create new devices
dis... | Add an example of non-linear LV creation | Add an example of non-linear LV creation
Useful for some manual testing as well as for people wondering how to do
something like that.
| Python | lgpl-2.1 | vojtechtrefny/blivet,rhinstaller/blivet,jkonecny12/blivet,vpodzime/blivet,vpodzime/blivet,jkonecny12/blivet,rhinstaller/blivet,vojtechtrefny/blivet,rvykydal/blivet,AdamWill/blivet,AdamWill/blivet,rvykydal/blivet | Add an example of non-linear LV creation
Useful for some manual testing as well as for people wondering how to do
something like that. | import os
from examples.common import print_devices
import blivet
from blivet.size import Size
from blivet.util import set_up_logging, create_sparse_tempfile
set_up_logging()
b = blivet.Blivet() # create an instance of Blivet (don't add system devices)
# create a disk image file on which to create new devices
dis... | <commit_before><commit_msg>Add an example of non-linear LV creation
Useful for some manual testing as well as for people wondering how to do
something like that.<commit_after> | import os
from examples.common import print_devices
import blivet
from blivet.size import Size
from blivet.util import set_up_logging, create_sparse_tempfile
set_up_logging()
b = blivet.Blivet() # create an instance of Blivet (don't add system devices)
# create a disk image file on which to create new devices
dis... | Add an example of non-linear LV creation
Useful for some manual testing as well as for people wondering how to do
something like that.import os
from examples.common import print_devices
import blivet
from blivet.size import Size
from blivet.util import set_up_logging, create_sparse_tempfile
set_up_logging()
b = bli... | <commit_before><commit_msg>Add an example of non-linear LV creation
Useful for some manual testing as well as for people wondering how to do
something like that.<commit_after>import os
from examples.common import print_devices
import blivet
from blivet.size import Size
from blivet.util import set_up_logging, create_... | |
961817824ea3d030bc2fb50a0b97f76a525ffeb9 | Examples/ParallelProcessing/MPI/Python/ParallelCone.py | Examples/ParallelProcessing/MPI/Python/ParallelCone.py | from vtk import *
import sys
import os
import time
myProcId = 0
numProcs = 1
compManager = vtkCompositeManager()
if compManager.GetController():
myProcId = compManager.GetController().GetLocalProcessId()
numProcs = compManager.GetController().GetNumberOfProcesses()
try:
v = vtkMesaRenderer()
if myPro... | Add example of parallel processing using python | Add example of parallel processing using python
| Python | bsd-3-clause | johnkit/vtk-dev,jmerkow/VTK,SimVascular/VTK,spthaolt/VTK,keithroe/vtkoptix,msmolens/VTK,cjh1/VTK,gram526/VTK,mspark93/VTK,sgh/vtk,arnaudgelas/VTK,collects/VTK,keithroe/vtkoptix,sgh/vtk,gram526/VTK,Wuteyan/VTK,sankhesh/VTK,sankhesh/VTK,keithroe/vtkoptix,aashish24/VTK-old,johnkit/vtk-dev,sankhesh/VTK,sankhesh/VTK,collect... | Add example of parallel processing using python | from vtk import *
import sys
import os
import time
myProcId = 0
numProcs = 1
compManager = vtkCompositeManager()
if compManager.GetController():
myProcId = compManager.GetController().GetLocalProcessId()
numProcs = compManager.GetController().GetNumberOfProcesses()
try:
v = vtkMesaRenderer()
if myPro... | <commit_before><commit_msg>Add example of parallel processing using python<commit_after> | from vtk import *
import sys
import os
import time
myProcId = 0
numProcs = 1
compManager = vtkCompositeManager()
if compManager.GetController():
myProcId = compManager.GetController().GetLocalProcessId()
numProcs = compManager.GetController().GetNumberOfProcesses()
try:
v = vtkMesaRenderer()
if myPro... | Add example of parallel processing using pythonfrom vtk import *
import sys
import os
import time
myProcId = 0
numProcs = 1
compManager = vtkCompositeManager()
if compManager.GetController():
myProcId = compManager.GetController().GetLocalProcessId()
numProcs = compManager.GetController().GetNumberOfProcesses... | <commit_before><commit_msg>Add example of parallel processing using python<commit_after>from vtk import *
import sys
import os
import time
myProcId = 0
numProcs = 1
compManager = vtkCompositeManager()
if compManager.GetController():
myProcId = compManager.GetController().GetLocalProcessId()
numProcs = compMan... | |
9d105a62b29f0cd170343705bbe20c509d523e46 | osf_tests/test_handlers.py | osf_tests/test_handlers.py | import pytest
from nose.tools import assert_raises
from framework.celery_tasks import handlers
from website.project.tasks import on_node_updated
class TestCeleryHandlers:
@pytest.fixture()
def queue(self):
return handlers.queue()
def test_get_task_from_queue_not_there(self):
task = hand... | Add tests for new get_task_from_queue celery helper | Add tests for new get_task_from_queue celery helper
| Python | apache-2.0 | cslzchen/osf.io,caseyrollins/osf.io,mattclark/osf.io,aaxelb/osf.io,Johnetordoff/osf.io,pattisdr/osf.io,erinspace/osf.io,erinspace/osf.io,sloria/osf.io,pattisdr/osf.io,mfraezz/osf.io,caseyrollins/osf.io,cslzchen/osf.io,mattclark/osf.io,cslzchen/osf.io,felliott/osf.io,felliott/osf.io,brianjgeiger/osf.io,Johnetordoff/osf.... | Add tests for new get_task_from_queue celery helper | import pytest
from nose.tools import assert_raises
from framework.celery_tasks import handlers
from website.project.tasks import on_node_updated
class TestCeleryHandlers:
@pytest.fixture()
def queue(self):
return handlers.queue()
def test_get_task_from_queue_not_there(self):
task = hand... | <commit_before><commit_msg>Add tests for new get_task_from_queue celery helper<commit_after> | import pytest
from nose.tools import assert_raises
from framework.celery_tasks import handlers
from website.project.tasks import on_node_updated
class TestCeleryHandlers:
@pytest.fixture()
def queue(self):
return handlers.queue()
def test_get_task_from_queue_not_there(self):
task = hand... | Add tests for new get_task_from_queue celery helperimport pytest
from nose.tools import assert_raises
from framework.celery_tasks import handlers
from website.project.tasks import on_node_updated
class TestCeleryHandlers:
@pytest.fixture()
def queue(self):
return handlers.queue()
def test_get_t... | <commit_before><commit_msg>Add tests for new get_task_from_queue celery helper<commit_after>import pytest
from nose.tools import assert_raises
from framework.celery_tasks import handlers
from website.project.tasks import on_node_updated
class TestCeleryHandlers:
@pytest.fixture()
def queue(self):
re... | |
8d08a7caeb4da705b2ab5a6f55528d1beae5bedb | menpofit/clm/expert/base.py | menpofit/clm/expert/base.py | import numpy as np
from menpofit.math.correlationfilter import mccf, imccf
# TODO: document me!
class IncrementalCorrelationFilterThinWrapper(object):
r"""
"""
def __init__(self, cf_callable=mccf, icf_callable=imccf):
self.cf_callable = cf_callable
self.icf_callable = icf_callable
def... | Add dummy wrapper for correlation filters | Add dummy wrapper for correlation filters
| Python | bsd-3-clause | yuxiang-zhou/menpofit,yuxiang-zhou/menpofit,grigorisg9gr/menpofit,grigorisg9gr/menpofit | Add dummy wrapper for correlation filters | import numpy as np
from menpofit.math.correlationfilter import mccf, imccf
# TODO: document me!
class IncrementalCorrelationFilterThinWrapper(object):
r"""
"""
def __init__(self, cf_callable=mccf, icf_callable=imccf):
self.cf_callable = cf_callable
self.icf_callable = icf_callable
def... | <commit_before><commit_msg>Add dummy wrapper for correlation filters<commit_after> | import numpy as np
from menpofit.math.correlationfilter import mccf, imccf
# TODO: document me!
class IncrementalCorrelationFilterThinWrapper(object):
r"""
"""
def __init__(self, cf_callable=mccf, icf_callable=imccf):
self.cf_callable = cf_callable
self.icf_callable = icf_callable
def... | Add dummy wrapper for correlation filtersimport numpy as np
from menpofit.math.correlationfilter import mccf, imccf
# TODO: document me!
class IncrementalCorrelationFilterThinWrapper(object):
r"""
"""
def __init__(self, cf_callable=mccf, icf_callable=imccf):
self.cf_callable = cf_callable
... | <commit_before><commit_msg>Add dummy wrapper for correlation filters<commit_after>import numpy as np
from menpofit.math.correlationfilter import mccf, imccf
# TODO: document me!
class IncrementalCorrelationFilterThinWrapper(object):
r"""
"""
def __init__(self, cf_callable=mccf, icf_callable=imccf):
... | |
f41e79f52a136eb9685a028e31628766015834b0 | twilio/rest/pricing/__init__.py | twilio/rest/pricing/__init__.py | from twilio.rest.base import TwilioClient
from twilio.rest.resources import UNSET_TIMEOUT
from .phone_numbers import PhoneNumbers
from .voice import Voice
class TwilioPricingClient(TwilioClient):
"""
A client for accessing the Twilio Pricing API.
:param str account: Your Account SID from `your dashboard
... | Move pricing client into pricing init | Move pricing client into pricing init
| Python | mit | tysonholub/twilio-python,twilio/twilio-python | Move pricing client into pricing init | from twilio.rest.base import TwilioClient
from twilio.rest.resources import UNSET_TIMEOUT
from .phone_numbers import PhoneNumbers
from .voice import Voice
class TwilioPricingClient(TwilioClient):
"""
A client for accessing the Twilio Pricing API.
:param str account: Your Account SID from `your dashboard
... | <commit_before><commit_msg>Move pricing client into pricing init<commit_after> | from twilio.rest.base import TwilioClient
from twilio.rest.resources import UNSET_TIMEOUT
from .phone_numbers import PhoneNumbers
from .voice import Voice
class TwilioPricingClient(TwilioClient):
"""
A client for accessing the Twilio Pricing API.
:param str account: Your Account SID from `your dashboard
... | Move pricing client into pricing initfrom twilio.rest.base import TwilioClient
from twilio.rest.resources import UNSET_TIMEOUT
from .phone_numbers import PhoneNumbers
from .voice import Voice
class TwilioPricingClient(TwilioClient):
"""
A client for accessing the Twilio Pricing API.
:param str account: Y... | <commit_before><commit_msg>Move pricing client into pricing init<commit_after>from twilio.rest.base import TwilioClient
from twilio.rest.resources import UNSET_TIMEOUT
from .phone_numbers import PhoneNumbers
from .voice import Voice
class TwilioPricingClient(TwilioClient):
"""
A client for accessing the Twili... | |
48ba0b266d7c87473e2813d56cdc2fd33e8e85df | txircd/modules/test/testserv.py | txircd/modules/test/testserv.py | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData
from txircd.service import Service
from zope.interface import implements
class TestServ(Service):
implements(IPlugin, IModuleData)
name = "TestServ"
help = "A test service."
user_cmd_aliases = {
"TEST": (20, "T... | Create a test service testing basic service functionality | Create a test service testing basic service functionality
Put it under a new test/ directory for all such basic test modules.
| Python | bsd-3-clause | ElementalAlchemist/txircd,Heufneutje/txircd | Create a test service testing basic service functionality
Put it under a new test/ directory for all such basic test modules. | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData
from txircd.service import Service
from zope.interface import implements
class TestServ(Service):
implements(IPlugin, IModuleData)
name = "TestServ"
help = "A test service."
user_cmd_aliases = {
"TEST": (20, "T... | <commit_before><commit_msg>Create a test service testing basic service functionality
Put it under a new test/ directory for all such basic test modules.<commit_after> | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData
from txircd.service import Service
from zope.interface import implements
class TestServ(Service):
implements(IPlugin, IModuleData)
name = "TestServ"
help = "A test service."
user_cmd_aliases = {
"TEST": (20, "T... | Create a test service testing basic service functionality
Put it under a new test/ directory for all such basic test modules.from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData
from txircd.service import Service
from zope.interface import implements
class TestServ(Service):
impleme... | <commit_before><commit_msg>Create a test service testing basic service functionality
Put it under a new test/ directory for all such basic test modules.<commit_after>from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData
from txircd.service import Service
from zope.interface import implemen... | |
fdec47174afa276d3d173567bef62eb9b31cd5d0 | alembic/versions/4e1d46e710a2_use_jsonb_for_strokes.py | alembic/versions/4e1d46e710a2_use_jsonb_for_strokes.py | """use jsonb for strokes
Revision ID: 4e1d46e710a2
Revises: 5a7ec3d139df
Create Date: 2015-05-25 19:47:45.924915
"""
from alembic.op import execute
# revision identifiers, used by Alembic.
revision = '4e1d46e710a2'
down_revision = '5a7ec3d139df'
branch_labels = None
depends_on = None
def upgrade():
execute('A... | Use JSONB for storing strokes | Use JSONB for storing strokes
| Python | agpl-3.0 | favien/favien,favien/favien,favien/favien | Use JSONB for storing strokes | """use jsonb for strokes
Revision ID: 4e1d46e710a2
Revises: 5a7ec3d139df
Create Date: 2015-05-25 19:47:45.924915
"""
from alembic.op import execute
# revision identifiers, used by Alembic.
revision = '4e1d46e710a2'
down_revision = '5a7ec3d139df'
branch_labels = None
depends_on = None
def upgrade():
execute('A... | <commit_before><commit_msg>Use JSONB for storing strokes<commit_after> | """use jsonb for strokes
Revision ID: 4e1d46e710a2
Revises: 5a7ec3d139df
Create Date: 2015-05-25 19:47:45.924915
"""
from alembic.op import execute
# revision identifiers, used by Alembic.
revision = '4e1d46e710a2'
down_revision = '5a7ec3d139df'
branch_labels = None
depends_on = None
def upgrade():
execute('A... | Use JSONB for storing strokes"""use jsonb for strokes
Revision ID: 4e1d46e710a2
Revises: 5a7ec3d139df
Create Date: 2015-05-25 19:47:45.924915
"""
from alembic.op import execute
# revision identifiers, used by Alembic.
revision = '4e1d46e710a2'
down_revision = '5a7ec3d139df'
branch_labels = None
depends_on = None
... | <commit_before><commit_msg>Use JSONB for storing strokes<commit_after>"""use jsonb for strokes
Revision ID: 4e1d46e710a2
Revises: 5a7ec3d139df
Create Date: 2015-05-25 19:47:45.924915
"""
from alembic.op import execute
# revision identifiers, used by Alembic.
revision = '4e1d46e710a2'
down_revision = '5a7ec3d139df'
... | |
5ce0e1a3320ac994737436803b8bd0923142e0af | htdocs/json/vtec_events.py | htdocs/json/vtec_events.py | #!/usr/bin/env python
"""Listing of VTEC events for a WFO and year"""
import cgi
import sys
import json
def report(wfo, year):
"""Generate a report of VTEC ETNs used for a WFO and year
Args:
wfo (str): 3 character WFO identifier
year (int): year to run for
"""
import psycopg2
pgcon... | Add quick hack of a VTEC listing, will make JSON when time permits | Add quick hack of a VTEC listing, will make JSON when time permits | Python | mit | akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem | Add quick hack of a VTEC listing, will make JSON when time permits | #!/usr/bin/env python
"""Listing of VTEC events for a WFO and year"""
import cgi
import sys
import json
def report(wfo, year):
"""Generate a report of VTEC ETNs used for a WFO and year
Args:
wfo (str): 3 character WFO identifier
year (int): year to run for
"""
import psycopg2
pgcon... | <commit_before><commit_msg>Add quick hack of a VTEC listing, will make JSON when time permits<commit_after> | #!/usr/bin/env python
"""Listing of VTEC events for a WFO and year"""
import cgi
import sys
import json
def report(wfo, year):
"""Generate a report of VTEC ETNs used for a WFO and year
Args:
wfo (str): 3 character WFO identifier
year (int): year to run for
"""
import psycopg2
pgcon... | Add quick hack of a VTEC listing, will make JSON when time permits#!/usr/bin/env python
"""Listing of VTEC events for a WFO and year"""
import cgi
import sys
import json
def report(wfo, year):
"""Generate a report of VTEC ETNs used for a WFO and year
Args:
wfo (str): 3 character WFO identifier
... | <commit_before><commit_msg>Add quick hack of a VTEC listing, will make JSON when time permits<commit_after>#!/usr/bin/env python
"""Listing of VTEC events for a WFO and year"""
import cgi
import sys
import json
def report(wfo, year):
"""Generate a report of VTEC ETNs used for a WFO and year
Args:
wf... | |
d31e468de531b4d9ccb1eba871d0d9b458f6dc4f | CheckVulnerableEntries.py | CheckVulnerableEntries.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import json
import os
import sys
def checkVulnerableEntries(dbFile):
if not os.path.isfile(dbFile):
sys.exit("JSON database %s does not exist!" % (dbFile))
with open(dbFile) as db:
issuesJSON = json.load(db)
... | Add a tool to list pending issues | Add a tool to list pending issues
| Python | mpl-2.0 | rgacogne/ArchCVEToJSON | Add a tool to list pending issues | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import json
import os
import sys
def checkVulnerableEntries(dbFile):
if not os.path.isfile(dbFile):
sys.exit("JSON database %s does not exist!" % (dbFile))
with open(dbFile) as db:
issuesJSON = json.load(db)
... | <commit_before><commit_msg>Add a tool to list pending issues<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import json
import os
import sys
def checkVulnerableEntries(dbFile):
if not os.path.isfile(dbFile):
sys.exit("JSON database %s does not exist!" % (dbFile))
with open(dbFile) as db:
issuesJSON = json.load(db)
... | Add a tool to list pending issues#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import json
import os
import sys
def checkVulnerableEntries(dbFile):
if not os.path.isfile(dbFile):
sys.exit("JSON database %s does not exist!" % (dbFile))
with open(dbFile) as db:
... | <commit_before><commit_msg>Add a tool to list pending issues<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import json
import os
import sys
def checkVulnerableEntries(dbFile):
if not os.path.isfile(dbFile):
sys.exit("JSON database %s does not exist!" % (d... | |
853caeba0d11b7ecf10ad74e19cd8b3cd3c82084 | Sketches/RJL/Torrent/Examples/example2.py | Sketches/RJL/Torrent/Examples/example2.py | from Kamaelia.Util.PipelineComponent import pipeline
from Kamaelia.Util.Console import ConsoleReader, ConsoleEchoer
import sys ; sys.path.append("/home/ryan/kamaelia/Sketches/RJL/")
from TriggeredFileReader import TriggeredFileReader
from DataSource import DataSource
from HTTPClient import HTTPClient
from btkam impor... | Test and example for new btkam.py TorrentClient. | Test and example for new btkam.py TorrentClient.
| Python | apache-2.0 | sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia | Test and example for new btkam.py TorrentClient. | from Kamaelia.Util.PipelineComponent import pipeline
from Kamaelia.Util.Console import ConsoleReader, ConsoleEchoer
import sys ; sys.path.append("/home/ryan/kamaelia/Sketches/RJL/")
from TriggeredFileReader import TriggeredFileReader
from DataSource import DataSource
from HTTPClient import HTTPClient
from btkam impor... | <commit_before><commit_msg>Test and example for new btkam.py TorrentClient.<commit_after> | from Kamaelia.Util.PipelineComponent import pipeline
from Kamaelia.Util.Console import ConsoleReader, ConsoleEchoer
import sys ; sys.path.append("/home/ryan/kamaelia/Sketches/RJL/")
from TriggeredFileReader import TriggeredFileReader
from DataSource import DataSource
from HTTPClient import HTTPClient
from btkam impor... | Test and example for new btkam.py TorrentClient.from Kamaelia.Util.PipelineComponent import pipeline
from Kamaelia.Util.Console import ConsoleReader, ConsoleEchoer
import sys ; sys.path.append("/home/ryan/kamaelia/Sketches/RJL/")
from TriggeredFileReader import TriggeredFileReader
from DataSource import DataSource
fr... | <commit_before><commit_msg>Test and example for new btkam.py TorrentClient.<commit_after>from Kamaelia.Util.PipelineComponent import pipeline
from Kamaelia.Util.Console import ConsoleReader, ConsoleEchoer
import sys ; sys.path.append("/home/ryan/kamaelia/Sketches/RJL/")
from TriggeredFileReader import TriggeredFileRe... | |
5f7bc24308bd9e3098612813ba4d5da0cd532cb6 | python/testdata/counter.py | python/testdata/counter.py | from peer import begin_tran, end_tran, shared
begin_tran()
num = shared.setdefault('num', 0) + 1
end_tran()
print('My unique number is', num)
| Add a very simple test program for distributed Python. | Add a very simple test program for distributed Python.
| Python | apache-2.0 | snyderek/floating_temple,snyderek/floating_temple,snyderek/floating_temple | Add a very simple test program for distributed Python. | from peer import begin_tran, end_tran, shared
begin_tran()
num = shared.setdefault('num', 0) + 1
end_tran()
print('My unique number is', num)
| <commit_before><commit_msg>Add a very simple test program for distributed Python.<commit_after> | from peer import begin_tran, end_tran, shared
begin_tran()
num = shared.setdefault('num', 0) + 1
end_tran()
print('My unique number is', num)
| Add a very simple test program for distributed Python.from peer import begin_tran, end_tran, shared
begin_tran()
num = shared.setdefault('num', 0) + 1
end_tran()
print('My unique number is', num)
| <commit_before><commit_msg>Add a very simple test program for distributed Python.<commit_after>from peer import begin_tran, end_tran, shared
begin_tran()
num = shared.setdefault('num', 0) + 1
end_tran()
print('My unique number is', num)
| |
d9c1b22ede009c4d75827232dd32fbf31f96ca67 | chnnlsdmo/chnnlsdmo/migrations/0002_vote_created.py | chnnlsdmo/chnnlsdmo/migrations/0002_vote_created.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-08 02:43
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('chnnlsdmo', '0001_initial'),
]
... | Add migration to provide Vote timestamp column | Add migration to provide Vote timestamp column
| Python | bsd-3-clause | shearichard/django-channels-demo,shearichard/django-channels-demo,shearichard/django-channels-demo | Add migration to provide Vote timestamp column | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-08 02:43
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('chnnlsdmo', '0001_initial'),
]
... | <commit_before><commit_msg>Add migration to provide Vote timestamp column<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-08 02:43
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('chnnlsdmo', '0001_initial'),
]
... | Add migration to provide Vote timestamp column# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-08 02:43
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
... | <commit_before><commit_msg>Add migration to provide Vote timestamp column<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-08 02:43
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrati... | |
14d19d4d515ad5d181cc7e0bebd3929b22b82972 | backend/breach/migrations/0018_target_samplesize.py | backend/breach/migrations/0018_target_samplesize.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-06-06 14:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('breach', '0017_auto_20160530_1450'),
]
operations = [
migrations.AddField(
... | Add migration for Target samplesize | Add migration for Target samplesize
| Python | mit | dimkarakostas/rupture,dimriou/rupture,esarafianou/rupture,dionyziz/rupture,dionyziz/rupture,dimkarakostas/rupture,dionyziz/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,esara... | Add migration for Target samplesize | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-06-06 14:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('breach', '0017_auto_20160530_1450'),
]
operations = [
migrations.AddField(
... | <commit_before><commit_msg>Add migration for Target samplesize<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-06-06 14:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('breach', '0017_auto_20160530_1450'),
]
operations = [
migrations.AddField(
... | Add migration for Target samplesize# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-06-06 14:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('breach', '0017_auto_20160530_1450'),
]
operations... | <commit_before><commit_msg>Add migration for Target samplesize<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-06-06 14:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('breach', '0017_au... | |
a803b54a588e5e96b7c1fd4877117dabd0facdf9 | mediacloud/mediawords/util/sitemap/test_helpers.py | mediacloud/mediawords/util/sitemap/test_helpers.py | import datetime
from mediawords.util.sitemap.helpers import html_unescape_ignore_none, parse_sitemap_publication_date
def test_html_unescape_ignore_none():
assert html_unescape_ignore_none("test & test") == "test & test"
assert html_unescape_ignore_none(None) is None
def test_parse_sitemap_publication_... | Add some tests for sitemap parsing helpers | Add some tests for sitemap parsing helpers
| Python | agpl-3.0 | berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud | Add some tests for sitemap parsing helpers | import datetime
from mediawords.util.sitemap.helpers import html_unescape_ignore_none, parse_sitemap_publication_date
def test_html_unescape_ignore_none():
assert html_unescape_ignore_none("test & test") == "test & test"
assert html_unescape_ignore_none(None) is None
def test_parse_sitemap_publication_... | <commit_before><commit_msg>Add some tests for sitemap parsing helpers<commit_after> | import datetime
from mediawords.util.sitemap.helpers import html_unescape_ignore_none, parse_sitemap_publication_date
def test_html_unescape_ignore_none():
assert html_unescape_ignore_none("test & test") == "test & test"
assert html_unescape_ignore_none(None) is None
def test_parse_sitemap_publication_... | Add some tests for sitemap parsing helpersimport datetime
from mediawords.util.sitemap.helpers import html_unescape_ignore_none, parse_sitemap_publication_date
def test_html_unescape_ignore_none():
assert html_unescape_ignore_none("test & test") == "test & test"
assert html_unescape_ignore_none(None) is ... | <commit_before><commit_msg>Add some tests for sitemap parsing helpers<commit_after>import datetime
from mediawords.util.sitemap.helpers import html_unescape_ignore_none, parse_sitemap_publication_date
def test_html_unescape_ignore_none():
assert html_unescape_ignore_none("test & test") == "test & test"
a... | |
cfb17cb9f7c72908b5bc915d8f0e2e465358c45f | thinc/neural/affine.py | thinc/neural/affine.py | from .base import Model
from .exceptions import ShapeError
class Affine(Model):
name = 'affine'
@property
def describe_params(self):
yield 'W-%s' % self.name, (self.nr_out, self.nr_in), self.ops.xavier_uniform_init
yield 'b-%s' % self.name, (self.nr_out,), None
@property
def ... | Move Affine to its own module | Move Affine to its own module
| Python | mit | spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc | Move Affine to its own module | from .base import Model
from .exceptions import ShapeError
class Affine(Model):
name = 'affine'
@property
def describe_params(self):
yield 'W-%s' % self.name, (self.nr_out, self.nr_in), self.ops.xavier_uniform_init
yield 'b-%s' % self.name, (self.nr_out,), None
@property
def ... | <commit_before><commit_msg>Move Affine to its own module<commit_after> | from .base import Model
from .exceptions import ShapeError
class Affine(Model):
name = 'affine'
@property
def describe_params(self):
yield 'W-%s' % self.name, (self.nr_out, self.nr_in), self.ops.xavier_uniform_init
yield 'b-%s' % self.name, (self.nr_out,), None
@property
def ... | Move Affine to its own modulefrom .base import Model
from .exceptions import ShapeError
class Affine(Model):
name = 'affine'
@property
def describe_params(self):
yield 'W-%s' % self.name, (self.nr_out, self.nr_in), self.ops.xavier_uniform_init
yield 'b-%s' % self.name, (self.nr_out,),... | <commit_before><commit_msg>Move Affine to its own module<commit_after>from .base import Model
from .exceptions import ShapeError
class Affine(Model):
name = 'affine'
@property
def describe_params(self):
yield 'W-%s' % self.name, (self.nr_out, self.nr_in), self.ops.xavier_uniform_init
... | |
2311673478616bf16b4411772511e301e82b9860 | misc/cairo-group-pdf-bug.py | misc/cairo-group-pdf-bug.py | import cairo
import math
def fill_background(cr):
cr.set_source_rgb(0, 0, 1)
cr.paint()
def paint_from_image(cr, src):
cr.set_operator(cairo.OPERATOR_SATURATE)
cr.set_source_surface(src, 0, 0)
cr.paint()
cr.set_source_surface(src, 100, 0)
cr.paint()
cr.set_source_surface(src, 200, 0... | Add python program to illustrate strange cairo bug with group and pdf | Add python program to illustrate strange cairo bug with group and pdf
| Python | lgpl-2.1 | openslide/openslide,openslide/openslide,openslide/openslide,openslide/openslide | Add python program to illustrate strange cairo bug with group and pdf | import cairo
import math
def fill_background(cr):
cr.set_source_rgb(0, 0, 1)
cr.paint()
def paint_from_image(cr, src):
cr.set_operator(cairo.OPERATOR_SATURATE)
cr.set_source_surface(src, 0, 0)
cr.paint()
cr.set_source_surface(src, 100, 0)
cr.paint()
cr.set_source_surface(src, 200, 0... | <commit_before><commit_msg>Add python program to illustrate strange cairo bug with group and pdf<commit_after> | import cairo
import math
def fill_background(cr):
cr.set_source_rgb(0, 0, 1)
cr.paint()
def paint_from_image(cr, src):
cr.set_operator(cairo.OPERATOR_SATURATE)
cr.set_source_surface(src, 0, 0)
cr.paint()
cr.set_source_surface(src, 100, 0)
cr.paint()
cr.set_source_surface(src, 200, 0... | Add python program to illustrate strange cairo bug with group and pdfimport cairo
import math
def fill_background(cr):
cr.set_source_rgb(0, 0, 1)
cr.paint()
def paint_from_image(cr, src):
cr.set_operator(cairo.OPERATOR_SATURATE)
cr.set_source_surface(src, 0, 0)
cr.paint()
cr.set_source_surfa... | <commit_before><commit_msg>Add python program to illustrate strange cairo bug with group and pdf<commit_after>import cairo
import math
def fill_background(cr):
cr.set_source_rgb(0, 0, 1)
cr.paint()
def paint_from_image(cr, src):
cr.set_operator(cairo.OPERATOR_SATURATE)
cr.set_source_surface(src, 0, 0... | |
08362c2f45f749f1942d3317ce8b64f64abca23f | mods/Autopilot0/__init__.py | mods/Autopilot0/__init__.py | import util
util.Moniker.CmdWarpToStuffAutopilot = lambda s, x: (uicore.uilib.RegisterAppEventTime(), s.CmdWarpToStuff("item", x, minRange = 0)) | Add mod: Autopilot to 0 | Add mod: Autopilot to 0
| Python | mit | EVEModX/Mods | Add mod: Autopilot to 0 | import util
util.Moniker.CmdWarpToStuffAutopilot = lambda s, x: (uicore.uilib.RegisterAppEventTime(), s.CmdWarpToStuff("item", x, minRange = 0)) | <commit_before><commit_msg>Add mod: Autopilot to 0<commit_after> | import util
util.Moniker.CmdWarpToStuffAutopilot = lambda s, x: (uicore.uilib.RegisterAppEventTime(), s.CmdWarpToStuff("item", x, minRange = 0)) | Add mod: Autopilot to 0import util
util.Moniker.CmdWarpToStuffAutopilot = lambda s, x: (uicore.uilib.RegisterAppEventTime(), s.CmdWarpToStuff("item", x, minRange = 0)) | <commit_before><commit_msg>Add mod: Autopilot to 0<commit_after>import util
util.Moniker.CmdWarpToStuffAutopilot = lambda s, x: (uicore.uilib.RegisterAppEventTime(), s.CmdWarpToStuff("item", x, minRange = 0)) | |
17462a888a8ea5c2f7fdfa25cdb0ae07054c0753 | taiga/projects/management/commands/change_project_slug.py | taiga/projects/management/commands/change_project_slug.py | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2016 Andrey Antukh <[email protected]>
# Copyright (C) 2014-2016 Jesús Espino <[email protected]>
# Copyright (C) 2014-2016 David Barragán <[email protected]>
# Copyright (C) 2014-2016 Alejandro Alonso <[email protected]>
# This program is free software: you can r... | Create command to change project slug | [Backport] Create command to change project slug
| Python | agpl-3.0 | xdevelsistemas/taiga-back-community,dayatz/taiga-back,xdevelsistemas/taiga-back-community,dayatz/taiga-back,taigaio/taiga-back,taigaio/taiga-back,dayatz/taiga-back,taigaio/taiga-back,xdevelsistemas/taiga-back-community | [Backport] Create command to change project slug | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2016 Andrey Antukh <[email protected]>
# Copyright (C) 2014-2016 Jesús Espino <[email protected]>
# Copyright (C) 2014-2016 David Barragán <[email protected]>
# Copyright (C) 2014-2016 Alejandro Alonso <[email protected]>
# This program is free software: you can r... | <commit_before><commit_msg>[Backport] Create command to change project slug<commit_after> | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2016 Andrey Antukh <[email protected]>
# Copyright (C) 2014-2016 Jesús Espino <[email protected]>
# Copyright (C) 2014-2016 David Barragán <[email protected]>
# Copyright (C) 2014-2016 Alejandro Alonso <[email protected]>
# This program is free software: you can r... | [Backport] Create command to change project slug# -*- coding: utf-8 -*-
# Copyright (C) 2014-2016 Andrey Antukh <[email protected]>
# Copyright (C) 2014-2016 Jesús Espino <[email protected]>
# Copyright (C) 2014-2016 David Barragán <[email protected]>
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos... | <commit_before><commit_msg>[Backport] Create command to change project slug<commit_after># -*- coding: utf-8 -*-
# Copyright (C) 2014-2016 Andrey Antukh <[email protected]>
# Copyright (C) 2014-2016 Jesús Espino <[email protected]>
# Copyright (C) 2014-2016 David Barragán <[email protected]>
# Copyright (C) 2014-2016 Al... | |
73c4c6fb87f33dadd9220e2ebca3ed5d275be47d | Tools/scripts/cvsfiles.py | Tools/scripts/cvsfiles.py | #! /usr/bin/env python
"""Create a list of files that are mentioned in CVS directories."""
import os
import sys
import string
def main():
args = sys.argv[1:]
if args:
for arg in args:
process(arg)
else:
process(".")
def process(dir):
cvsdir = 0
subdirs = []
files = []
names = os.l... | Print a list of files under CVS. | Print a list of files under CVS.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Print a list of files under CVS. | #! /usr/bin/env python
"""Create a list of files that are mentioned in CVS directories."""
import os
import sys
import string
def main():
args = sys.argv[1:]
if args:
for arg in args:
process(arg)
else:
process(".")
def process(dir):
cvsdir = 0
subdirs = []
files = []
names = os.l... | <commit_before><commit_msg>Print a list of files under CVS.<commit_after> | #! /usr/bin/env python
"""Create a list of files that are mentioned in CVS directories."""
import os
import sys
import string
def main():
args = sys.argv[1:]
if args:
for arg in args:
process(arg)
else:
process(".")
def process(dir):
cvsdir = 0
subdirs = []
files = []
names = os.l... | Print a list of files under CVS.#! /usr/bin/env python
"""Create a list of files that are mentioned in CVS directories."""
import os
import sys
import string
def main():
args = sys.argv[1:]
if args:
for arg in args:
process(arg)
else:
process(".")
def process(dir):
cvsdir = 0
subdirs = []... | <commit_before><commit_msg>Print a list of files under CVS.<commit_after>#! /usr/bin/env python
"""Create a list of files that are mentioned in CVS directories."""
import os
import sys
import string
def main():
args = sys.argv[1:]
if args:
for arg in args:
process(arg)
else:
process(".")
def proc... | |
7d65295224fbeb61ae4116e67ab8f2b704112480 | kolibri/auth/migrations/0003_classroom_facility_learnergroup.py | kolibri/auth/migrations/0003_classroom_facility_learnergroup.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-03 23:46
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kolibriauth', '0002_auto_20160203_1516'),
]
operations = [
migrations.CreateModel(
... | Create Collection proxy model migration | Create Collection proxy model migration
| Python | mit | jtamiace/kolibri,indirectlylit/kolibri,benjaoming/kolibri,66eli77/kolibri,mrpau/kolibri,christianmemije/kolibri,benjaoming/kolibri,rtibbles/kolibri,mrpau/kolibri,aronasorman/kolibri,66eli77/kolibri,benjaoming/kolibri,indirectlylit/kolibri,aronasorman/kolibri,jayoshih/kolibri,christianmemije/kolibri,indirectlylit/kolibr... | Create Collection proxy model migration | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-03 23:46
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kolibriauth', '0002_auto_20160203_1516'),
]
operations = [
migrations.CreateModel(
... | <commit_before><commit_msg>Create Collection proxy model migration<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-03 23:46
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kolibriauth', '0002_auto_20160203_1516'),
]
operations = [
migrations.CreateModel(
... | Create Collection proxy model migration# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-03 23:46
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kolibriauth', '0002_auto_20160203_1516'),
]
operation... | <commit_before><commit_msg>Create Collection proxy model migration<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-03 23:46
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kolibriauth', '0002_a... | |
ebc708440cdf2ed46863cbe4ed595e2689f8fe71 | corehq/apps/groups/management/commands/touch_group_docs.py | corehq/apps/groups/management/commands/touch_group_docs.py | from django.core.management.base import LabelCommand
from dimagi.utils.couch.database import iter_docs
from dimagi.utils.chunked import chunked
from corehq.apps.groups.models import Group
class Command(LabelCommand):
def handle(self, *args, **options):
db = Group.get_db()
def get_doc_ids():
... | Add management command to touch all group docs | Add management command to touch all group docs
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,qe... | Add management command to touch all group docs | from django.core.management.base import LabelCommand
from dimagi.utils.couch.database import iter_docs
from dimagi.utils.chunked import chunked
from corehq.apps.groups.models import Group
class Command(LabelCommand):
def handle(self, *args, **options):
db = Group.get_db()
def get_doc_ids():
... | <commit_before><commit_msg>Add management command to touch all group docs<commit_after> | from django.core.management.base import LabelCommand
from dimagi.utils.couch.database import iter_docs
from dimagi.utils.chunked import chunked
from corehq.apps.groups.models import Group
class Command(LabelCommand):
def handle(self, *args, **options):
db = Group.get_db()
def get_doc_ids():
... | Add management command to touch all group docsfrom django.core.management.base import LabelCommand
from dimagi.utils.couch.database import iter_docs
from dimagi.utils.chunked import chunked
from corehq.apps.groups.models import Group
class Command(LabelCommand):
def handle(self, *args, **options):
db =... | <commit_before><commit_msg>Add management command to touch all group docs<commit_after>from django.core.management.base import LabelCommand
from dimagi.utils.couch.database import iter_docs
from dimagi.utils.chunked import chunked
from corehq.apps.groups.models import Group
class Command(LabelCommand):
def han... | |
7428906683d179de61537f68d63e7b44438d687d | network_conflict_creator.py | network_conflict_creator.py | #!/usr/bin/env python
from base import Base
from argparse import ArgumentParser
from sys import exit
from scapy.all import sniff, Ether, ARP, sendp
from logging import getLogger, ERROR
getLogger("scapy.runtime").setLevel(ERROR)
Base.check_user()
parser = ArgumentParser(description='DHCP Starvation attack script')
pa... | Add network conflict creator script. | Add network conflict creator script.
| Python | mit | Vladimir-Ivanov-Git/raw-packet,Vladimir-Ivanov-Git/raw-packet | Add network conflict creator script. | #!/usr/bin/env python
from base import Base
from argparse import ArgumentParser
from sys import exit
from scapy.all import sniff, Ether, ARP, sendp
from logging import getLogger, ERROR
getLogger("scapy.runtime").setLevel(ERROR)
Base.check_user()
parser = ArgumentParser(description='DHCP Starvation attack script')
pa... | <commit_before><commit_msg>Add network conflict creator script.<commit_after> | #!/usr/bin/env python
from base import Base
from argparse import ArgumentParser
from sys import exit
from scapy.all import sniff, Ether, ARP, sendp
from logging import getLogger, ERROR
getLogger("scapy.runtime").setLevel(ERROR)
Base.check_user()
parser = ArgumentParser(description='DHCP Starvation attack script')
pa... | Add network conflict creator script.#!/usr/bin/env python
from base import Base
from argparse import ArgumentParser
from sys import exit
from scapy.all import sniff, Ether, ARP, sendp
from logging import getLogger, ERROR
getLogger("scapy.runtime").setLevel(ERROR)
Base.check_user()
parser = ArgumentParser(description... | <commit_before><commit_msg>Add network conflict creator script.<commit_after>#!/usr/bin/env python
from base import Base
from argparse import ArgumentParser
from sys import exit
from scapy.all import sniff, Ether, ARP, sendp
from logging import getLogger, ERROR
getLogger("scapy.runtime").setLevel(ERROR)
Base.check_us... | |
3a696d6646d2000997632aa2df15a254209977da | py/sliding-window-median.py | py/sliding-window-median.py | import heapq
from collections import Counter
class Solution(object):
def insertElement(self, value):
if self.minHeapSize < self.maxHeapSize:
heapq.heappush(self.maxHeap, -value)
m = self.maxHeapPop()
heapq.heappush(self.minHeap, m)
self.minHeapSize += 1
... | Add py solution for Sliding Window Median | Add py solution for Sliding Window Median
480. Sliding Window Median: https://leetcode.com/problems/sliding-window-median/
| Python | apache-2.0 | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | Add py solution for Sliding Window Median
480. Sliding Window Median: https://leetcode.com/problems/sliding-window-median/ | import heapq
from collections import Counter
class Solution(object):
def insertElement(self, value):
if self.minHeapSize < self.maxHeapSize:
heapq.heappush(self.maxHeap, -value)
m = self.maxHeapPop()
heapq.heappush(self.minHeap, m)
self.minHeapSize += 1
... | <commit_before><commit_msg>Add py solution for Sliding Window Median
480. Sliding Window Median: https://leetcode.com/problems/sliding-window-median/<commit_after> | import heapq
from collections import Counter
class Solution(object):
def insertElement(self, value):
if self.minHeapSize < self.maxHeapSize:
heapq.heappush(self.maxHeap, -value)
m = self.maxHeapPop()
heapq.heappush(self.minHeap, m)
self.minHeapSize += 1
... | Add py solution for Sliding Window Median
480. Sliding Window Median: https://leetcode.com/problems/sliding-window-median/import heapq
from collections import Counter
class Solution(object):
def insertElement(self, value):
if self.minHeapSize < self.maxHeapSize:
heapq.heappush(self.maxHeap, -v... | <commit_before><commit_msg>Add py solution for Sliding Window Median
480. Sliding Window Median: https://leetcode.com/problems/sliding-window-median/<commit_after>import heapq
from collections import Counter
class Solution(object):
def insertElement(self, value):
if self.minHeapSize < self.maxHeapSize:
... | |
5ad4d9e38a7f5c86a499dfad9c6abef2d3697e7e | libpanel-applet/test-dbus-applet.py | libpanel-applet/test-dbus-applet.py | #!/usr/bin/env python
from gi.repository import Gtk
from gi.repository import PanelApplet
def applet_fill(applet):
label = Gtk.Label("My applet in Python")
applet.add(label)
applet.show_all()
def applet_factory(applet, iid, data):
if iid != "TestApplet":
return False
applet_fill(applet)
... | Add test applet in python | libpanel-applet: Add test applet in python
This is an example of how to use libpanel-applet from introspection
data.
| Python | lgpl-2.1 | GNOME/gnome-panel,GNOME/gnome-panel | libpanel-applet: Add test applet in python
This is an example of how to use libpanel-applet from introspection
data. | #!/usr/bin/env python
from gi.repository import Gtk
from gi.repository import PanelApplet
def applet_fill(applet):
label = Gtk.Label("My applet in Python")
applet.add(label)
applet.show_all()
def applet_factory(applet, iid, data):
if iid != "TestApplet":
return False
applet_fill(applet)
... | <commit_before><commit_msg>libpanel-applet: Add test applet in python
This is an example of how to use libpanel-applet from introspection
data.<commit_after> | #!/usr/bin/env python
from gi.repository import Gtk
from gi.repository import PanelApplet
def applet_fill(applet):
label = Gtk.Label("My applet in Python")
applet.add(label)
applet.show_all()
def applet_factory(applet, iid, data):
if iid != "TestApplet":
return False
applet_fill(applet)
... | libpanel-applet: Add test applet in python
This is an example of how to use libpanel-applet from introspection
data.#!/usr/bin/env python
from gi.repository import Gtk
from gi.repository import PanelApplet
def applet_fill(applet):
label = Gtk.Label("My applet in Python")
applet.add(label)
applet.show_all... | <commit_before><commit_msg>libpanel-applet: Add test applet in python
This is an example of how to use libpanel-applet from introspection
data.<commit_after>#!/usr/bin/env python
from gi.repository import Gtk
from gi.repository import PanelApplet
def applet_fill(applet):
label = Gtk.Label("My applet in Python")
... | |
6187f8ac6cf1637b160b47bba55113490f5abf20 | Python/lambda_awejob.py | Python/lambda_awejob.py | # coding: utf-8
import json
import urllib.request
import boto3
def lambda_handler(event, context):
with urllib.request.urlopen("https://api.github.com/repos/awesome-jobs/vietnam/issues") as resp: # NOQA
data = resp.read()
d = json.loads(data.decode())
# ff = open('/tmp/issues')
# d = json.lo... | Add lambda code for gen site from awesome job repo | Add lambda code for gen site from awesome job repo
http://www.familug.org/2017/08/serverless.html
| Python | bsd-2-clause | familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG | Add lambda code for gen site from awesome job repo
http://www.familug.org/2017/08/serverless.html | # coding: utf-8
import json
import urllib.request
import boto3
def lambda_handler(event, context):
with urllib.request.urlopen("https://api.github.com/repos/awesome-jobs/vietnam/issues") as resp: # NOQA
data = resp.read()
d = json.loads(data.decode())
# ff = open('/tmp/issues')
# d = json.lo... | <commit_before><commit_msg>Add lambda code for gen site from awesome job repo
http://www.familug.org/2017/08/serverless.html<commit_after> | # coding: utf-8
import json
import urllib.request
import boto3
def lambda_handler(event, context):
with urllib.request.urlopen("https://api.github.com/repos/awesome-jobs/vietnam/issues") as resp: # NOQA
data = resp.read()
d = json.loads(data.decode())
# ff = open('/tmp/issues')
# d = json.lo... | Add lambda code for gen site from awesome job repo
http://www.familug.org/2017/08/serverless.html# coding: utf-8
import json
import urllib.request
import boto3
def lambda_handler(event, context):
with urllib.request.urlopen("https://api.github.com/repos/awesome-jobs/vietnam/issues") as resp: # NOQA
data... | <commit_before><commit_msg>Add lambda code for gen site from awesome job repo
http://www.familug.org/2017/08/serverless.html<commit_after># coding: utf-8
import json
import urllib.request
import boto3
def lambda_handler(event, context):
with urllib.request.urlopen("https://api.github.com/repos/awesome-jobs/vietn... | |
135021ff2c64d2bd8e1122f657228e5eb8826196 | genome_designer/debug/2015_03_02_get_histo_files.py | genome_designer/debug/2015_03_02_get_histo_files.py | """
Script to get all histo files.
"""
import os
import shutil
import sys
# Setup Django environment.
sys.path.append(
os.path.join(os.path.dirname(os.path.realpath(__file__)), '../'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from main.model_utils import get_dataset_with_type
from main.models impor... | Debug script to aggregate lumpy histogram files. | Debug script to aggregate lumpy histogram files.
| Python | mit | woodymit/millstone,churchlab/millstone,woodymit/millstone_accidental_source,woodymit/millstone,churchlab/millstone,woodymit/millstone,woodymit/millstone,churchlab/millstone,woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,churchlab/millstone,woodymit/millstone_accidental_source | Debug script to aggregate lumpy histogram files. | """
Script to get all histo files.
"""
import os
import shutil
import sys
# Setup Django environment.
sys.path.append(
os.path.join(os.path.dirname(os.path.realpath(__file__)), '../'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from main.model_utils import get_dataset_with_type
from main.models impor... | <commit_before><commit_msg>Debug script to aggregate lumpy histogram files.<commit_after> | """
Script to get all histo files.
"""
import os
import shutil
import sys
# Setup Django environment.
sys.path.append(
os.path.join(os.path.dirname(os.path.realpath(__file__)), '../'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from main.model_utils import get_dataset_with_type
from main.models impor... | Debug script to aggregate lumpy histogram files."""
Script to get all histo files.
"""
import os
import shutil
import sys
# Setup Django environment.
sys.path.append(
os.path.join(os.path.dirname(os.path.realpath(__file__)), '../'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from main.model_utils imp... | <commit_before><commit_msg>Debug script to aggregate lumpy histogram files.<commit_after>"""
Script to get all histo files.
"""
import os
import shutil
import sys
# Setup Django environment.
sys.path.append(
os.path.join(os.path.dirname(os.path.realpath(__file__)), '../'))
os.environ['DJANGO_SETTINGS_MODULE']... | |
b8dd5d1caff7a47f28e1f24a5a20cdd13a795830 | barsystem_base/management/commands/undo_transaction.py | barsystem_base/management/commands/undo_transaction.py | from django.core.management.base import BaseCommand
from barsystem_base.models import Person, Journal
class Command(BaseCommand):
def handle(self, *args, **kwargs):
while True:
try:
person_id = input('Enter user ID (or enter to exit): ')
except EOFError:
... | Add management command to undo transactions. | Add management command to undo transactions.
| Python | mit | TkkrLab/barsystem,TkkrLab/barsystem,TkkrLab/barsystem | Add management command to undo transactions. | from django.core.management.base import BaseCommand
from barsystem_base.models import Person, Journal
class Command(BaseCommand):
def handle(self, *args, **kwargs):
while True:
try:
person_id = input('Enter user ID (or enter to exit): ')
except EOFError:
... | <commit_before><commit_msg>Add management command to undo transactions.<commit_after> | from django.core.management.base import BaseCommand
from barsystem_base.models import Person, Journal
class Command(BaseCommand):
def handle(self, *args, **kwargs):
while True:
try:
person_id = input('Enter user ID (or enter to exit): ')
except EOFError:
... | Add management command to undo transactions.from django.core.management.base import BaseCommand
from barsystem_base.models import Person, Journal
class Command(BaseCommand):
def handle(self, *args, **kwargs):
while True:
try:
person_id = input('Enter user ID (or enter to exit): ... | <commit_before><commit_msg>Add management command to undo transactions.<commit_after>from django.core.management.base import BaseCommand
from barsystem_base.models import Person, Journal
class Command(BaseCommand):
def handle(self, *args, **kwargs):
while True:
try:
person_id = ... | |
d468d6a24eb7573163911eee8094c5cc47d1a08f | polling_stations/apps/data_collection/management/commands/import_south_cambridge.py | polling_stations/apps/data_collection/management/commands/import_south_cambridge.py | """
Import South Cambridge
"""
import sys
from data_collection.management.commands import BaseShpShpImporter
class Command(BaseShpShpImporter):
"""
Imports the Polling Station data from South Cambridge
"""
srid = 4326
council_id = 'E07000012'
districts_name = 'Polling Districts for Twitter... | Add importer for South Cambridgeshire. | Add importer for South Cambridgeshire.
refs #82
| Python | bsd-3-clause | chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations | Add importer for South Cambridgeshire.
refs #82 | """
Import South Cambridge
"""
import sys
from data_collection.management.commands import BaseShpShpImporter
class Command(BaseShpShpImporter):
"""
Imports the Polling Station data from South Cambridge
"""
srid = 4326
council_id = 'E07000012'
districts_name = 'Polling Districts for Twitter... | <commit_before><commit_msg>Add importer for South Cambridgeshire.
refs #82<commit_after> | """
Import South Cambridge
"""
import sys
from data_collection.management.commands import BaseShpShpImporter
class Command(BaseShpShpImporter):
"""
Imports the Polling Station data from South Cambridge
"""
srid = 4326
council_id = 'E07000012'
districts_name = 'Polling Districts for Twitter... | Add importer for South Cambridgeshire.
refs #82"""
Import South Cambridge
"""
import sys
from data_collection.management.commands import BaseShpShpImporter
class Command(BaseShpShpImporter):
"""
Imports the Polling Station data from South Cambridge
"""
srid = 4326
council_id = 'E07000012'
... | <commit_before><commit_msg>Add importer for South Cambridgeshire.
refs #82<commit_after>"""
Import South Cambridge
"""
import sys
from data_collection.management.commands import BaseShpShpImporter
class Command(BaseShpShpImporter):
"""
Imports the Polling Station data from South Cambridge
"""
srid = ... | |
20d50e4b5a3500865d97f12f2c48c72f558d170d | landlab/grid/tests/test_raster_grid/test_BC_updates.py | landlab/grid/tests/test_raster_grid/test_BC_updates.py | import numpy as np
from numpy.testing import assert_array_equal
from nose.tools import with_setup, assert_true, assert_equal, assert_not_equal
from landlab import FIXED_GRADIENT_BOUNDARY, CLOSED_BOUNDARY, INACTIVE_LINK, \
FIXED_LINK
from landlab import RasterModelGrid
def setup_grid():
globals().update({
... | Add tests for BC changes | Add tests for BC changes
Some elementary tests for BC changes on a raster. Tests would be
equivalent on an irregular grid.
| Python | mit | Carralex/landlab,RondaStrauch/landlab,ManuSchmi88/landlab,RondaStrauch/landlab,amandersillinois/landlab,ManuSchmi88/landlab,SiccarPoint/landlab,cmshobe/landlab,laijingtao/landlab,amandersillinois/landlab,RondaStrauch/landlab,Carralex/landlab,cmshobe/landlab,landlab/landlab,csherwood-usgs/landlab,landlab/landlab,Carrale... | Add tests for BC changes
Some elementary tests for BC changes on a raster. Tests would be
equivalent on an irregular grid. | import numpy as np
from numpy.testing import assert_array_equal
from nose.tools import with_setup, assert_true, assert_equal, assert_not_equal
from landlab import FIXED_GRADIENT_BOUNDARY, CLOSED_BOUNDARY, INACTIVE_LINK, \
FIXED_LINK
from landlab import RasterModelGrid
def setup_grid():
globals().update({
... | <commit_before><commit_msg>Add tests for BC changes
Some elementary tests for BC changes on a raster. Tests would be
equivalent on an irregular grid.<commit_after> | import numpy as np
from numpy.testing import assert_array_equal
from nose.tools import with_setup, assert_true, assert_equal, assert_not_equal
from landlab import FIXED_GRADIENT_BOUNDARY, CLOSED_BOUNDARY, INACTIVE_LINK, \
FIXED_LINK
from landlab import RasterModelGrid
def setup_grid():
globals().update({
... | Add tests for BC changes
Some elementary tests for BC changes on a raster. Tests would be
equivalent on an irregular grid.import numpy as np
from numpy.testing import assert_array_equal
from nose.tools import with_setup, assert_true, assert_equal, assert_not_equal
from landlab import FIXED_GRADIENT_BOUNDARY, CLOSED_B... | <commit_before><commit_msg>Add tests for BC changes
Some elementary tests for BC changes on a raster. Tests would be
equivalent on an irregular grid.<commit_after>import numpy as np
from numpy.testing import assert_array_equal
from nose.tools import with_setup, assert_true, assert_equal, assert_not_equal
from landlab... | |
54368e90a67c73450bb10607f9566b88db1d97f4 | migrations/versions/740_migrate_supplier_frameworks_to_.py | migrations/versions/740_migrate_supplier_frameworks_to_.py | """migrate supplier_frameworks to framework_agreements
Revision ID: 740
Revises: 730
Create Date: 2016-09-14 14:23:56.196966
For supplier_framework rows that contain details of returning a framework agreement (indicated
by non null `agreement_details` or `agreement_returned_at`) and do not yet have a
corresponding r... | Migrate framework agreements to `framework_agreements` | Migrate framework agreements to `framework_agreements`
For supplier_framework rows that contain details of returning a framework agreement (indicated
by non null `agreement_details` or `agreement_returned_at`) and do not yet have a
corresponding row in the `framework_agreements` table.
Note, we are moving framework a... | Python | mit | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | Migrate framework agreements to `framework_agreements`
For supplier_framework rows that contain details of returning a framework agreement (indicated
by non null `agreement_details` or `agreement_returned_at`) and do not yet have a
corresponding row in the `framework_agreements` table.
Note, we are moving framework a... | """migrate supplier_frameworks to framework_agreements
Revision ID: 740
Revises: 730
Create Date: 2016-09-14 14:23:56.196966
For supplier_framework rows that contain details of returning a framework agreement (indicated
by non null `agreement_details` or `agreement_returned_at`) and do not yet have a
corresponding r... | <commit_before><commit_msg>Migrate framework agreements to `framework_agreements`
For supplier_framework rows that contain details of returning a framework agreement (indicated
by non null `agreement_details` or `agreement_returned_at`) and do not yet have a
corresponding row in the `framework_agreements` table.
Note... | """migrate supplier_frameworks to framework_agreements
Revision ID: 740
Revises: 730
Create Date: 2016-09-14 14:23:56.196966
For supplier_framework rows that contain details of returning a framework agreement (indicated
by non null `agreement_details` or `agreement_returned_at`) and do not yet have a
corresponding r... | Migrate framework agreements to `framework_agreements`
For supplier_framework rows that contain details of returning a framework agreement (indicated
by non null `agreement_details` or `agreement_returned_at`) and do not yet have a
corresponding row in the `framework_agreements` table.
Note, we are moving framework a... | <commit_before><commit_msg>Migrate framework agreements to `framework_agreements`
For supplier_framework rows that contain details of returning a framework agreement (indicated
by non null `agreement_details` or `agreement_returned_at`) and do not yet have a
corresponding row in the `framework_agreements` table.
Note... | |
068a066e0bc89fb1476db5d24ceeb6b6b57f78a0 | mysite/engage/migrations/0002_auto_20141218_0750.py | mysite/engage/migrations/0002_auto_20141218_0750.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def create_features(apps, schema_editor):
Feature = apps.get_model("engage", "Feature")
Permission = apps.get_model("auth", "Permission")
for slug, name, perms in (
('blog', 'Blog', [
... | Add example features and permissions | Add example features and permissions
| Python | bsd-3-clause | Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto | Add example features and permissions | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def create_features(apps, schema_editor):
Feature = apps.get_model("engage", "Feature")
Permission = apps.get_model("auth", "Permission")
for slug, name, perms in (
('blog', 'Blog', [
... | <commit_before><commit_msg>Add example features and permissions<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def create_features(apps, schema_editor):
Feature = apps.get_model("engage", "Feature")
Permission = apps.get_model("auth", "Permission")
for slug, name, perms in (
('blog', 'Blog', [
... | Add example features and permissions# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def create_features(apps, schema_editor):
Feature = apps.get_model("engage", "Feature")
Permission = apps.get_model("auth", "Permission")
for slug, name, perms in (... | <commit_before><commit_msg>Add example features and permissions<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def create_features(apps, schema_editor):
Feature = apps.get_model("engage", "Feature")
Permission = apps.get_model("auth", "Pe... | |
6b0f2e47ee249e9923539b07ca31629b11ce5d73 | studygroups/migrations/0094_update_venue_website.py | studygroups/migrations/0094_update_venue_website.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-07-24 11:42
from __future__ import unicode_literals
from django.db import migrations
def prepend_http(apps, schema_editor):
StudyGroup = apps.get_model("studygroups", "StudyGroup")
study_groups = StudyGroup.objects.all().exclude(venue_website='')
... | Add migration to fix URLs for studygroup venue websites | Add migration to fix URLs for studygroup venue websites
| Python | mit | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | Add migration to fix URLs for studygroup venue websites | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-07-24 11:42
from __future__ import unicode_literals
from django.db import migrations
def prepend_http(apps, schema_editor):
StudyGroup = apps.get_model("studygroups", "StudyGroup")
study_groups = StudyGroup.objects.all().exclude(venue_website='')
... | <commit_before><commit_msg>Add migration to fix URLs for studygroup venue websites<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-07-24 11:42
from __future__ import unicode_literals
from django.db import migrations
def prepend_http(apps, schema_editor):
StudyGroup = apps.get_model("studygroups", "StudyGroup")
study_groups = StudyGroup.objects.all().exclude(venue_website='')
... | Add migration to fix URLs for studygroup venue websites# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-07-24 11:42
from __future__ import unicode_literals
from django.db import migrations
def prepend_http(apps, schema_editor):
StudyGroup = apps.get_model("studygroups", "StudyGroup")
study_groups ... | <commit_before><commit_msg>Add migration to fix URLs for studygroup venue websites<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-07-24 11:42
from __future__ import unicode_literals
from django.db import migrations
def prepend_http(apps, schema_editor):
StudyGroup = apps.get_model("stud... | |
9ba8756648a1c9ab322f417e9d2ab1aa75d0a2ea | reg/migrations/0006_auto_20151023_1826.py | reg/migrations/0006_auto_20151023_1826.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('reg', '0005_auto_20150420_2353'),
]
operations = [
migrations.AlterField(
model_name='team',
name='l... | Make migrations for leader_email field of Team model | Make migrations for leader_email field of Team model
| Python | bsd-3-clause | stefantsov/blackbox3,stefantsov/blackbox3,stefantsov/blackbox3 | Make migrations for leader_email field of Team model | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('reg', '0005_auto_20150420_2353'),
]
operations = [
migrations.AlterField(
model_name='team',
name='l... | <commit_before><commit_msg>Make migrations for leader_email field of Team model<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('reg', '0005_auto_20150420_2353'),
]
operations = [
migrations.AlterField(
model_name='team',
name='l... | Make migrations for leader_email field of Team model# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('reg', '0005_auto_20150420_2353'),
]
operations = [
migrations.AlterField... | <commit_before><commit_msg>Make migrations for leader_email field of Team model<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('reg', '0005_auto_20150420_2353'),
]
ope... | |
339a25141532b0831a2fcfb621a1a7b1d6e88ac8 | scripts/ingestors/rwis/archive_process_traffic.py | scripts/ingestors/rwis/archive_process_traffic.py | # Need something to process the archived monthly RWIS file provided by Tina
"""
Site number,sensor ID,lane ID,local date/time,2-minute av speed,total
vol,normal vol,long vol,headway (null),occupancy,
"""
import glob
import os
import mx.DateTime
import StringIO
from pyIEM import mesonet
import iemdb
RWIS = iemdb.connec... | Add an archive traffic processor, yippee | Add an archive traffic processor, yippee
| Python | mit | akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem | Add an archive traffic processor, yippee | # Need something to process the archived monthly RWIS file provided by Tina
"""
Site number,sensor ID,lane ID,local date/time,2-minute av speed,total
vol,normal vol,long vol,headway (null),occupancy,
"""
import glob
import os
import mx.DateTime
import StringIO
from pyIEM import mesonet
import iemdb
RWIS = iemdb.connec... | <commit_before><commit_msg>Add an archive traffic processor, yippee<commit_after> | # Need something to process the archived monthly RWIS file provided by Tina
"""
Site number,sensor ID,lane ID,local date/time,2-minute av speed,total
vol,normal vol,long vol,headway (null),occupancy,
"""
import glob
import os
import mx.DateTime
import StringIO
from pyIEM import mesonet
import iemdb
RWIS = iemdb.connec... | Add an archive traffic processor, yippee# Need something to process the archived monthly RWIS file provided by Tina
"""
Site number,sensor ID,lane ID,local date/time,2-minute av speed,total
vol,normal vol,long vol,headway (null),occupancy,
"""
import glob
import os
import mx.DateTime
import StringIO
from pyIEM import ... | <commit_before><commit_msg>Add an archive traffic processor, yippee<commit_after># Need something to process the archived monthly RWIS file provided by Tina
"""
Site number,sensor ID,lane ID,local date/time,2-minute av speed,total
vol,normal vol,long vol,headway (null),occupancy,
"""
import glob
import os
import mx.Da... | |
dc181cd45adba6433c2422b9550e398c6385bca5 | shop/serializers/catalog.py | shop/serializers/catalog.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from cms.utils import get_current_site
from cms.utils.page import get_page_from_path
from django.core.urlresolvers import reverse
from filer.models.imagemodels import Image
from rest_framework import serializers
class CMSPagesField(serializers.Field):
... | Create M2M serializers for export/import of products | Create M2M serializers for export/import of products
| Python | bsd-3-clause | awesto/django-shop,divio/django-shop,divio/django-shop,awesto/django-shop,awesto/django-shop,divio/django-shop | Create M2M serializers for export/import of products | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from cms.utils import get_current_site
from cms.utils.page import get_page_from_path
from django.core.urlresolvers import reverse
from filer.models.imagemodels import Image
from rest_framework import serializers
class CMSPagesField(serializers.Field):
... | <commit_before><commit_msg>Create M2M serializers for export/import of products<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from cms.utils import get_current_site
from cms.utils.page import get_page_from_path
from django.core.urlresolvers import reverse
from filer.models.imagemodels import Image
from rest_framework import serializers
class CMSPagesField(serializers.Field):
... | Create M2M serializers for export/import of products# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from cms.utils import get_current_site
from cms.utils.page import get_page_from_path
from django.core.urlresolvers import reverse
from filer.models.imagemodels import Image
from rest_framework import ser... | <commit_before><commit_msg>Create M2M serializers for export/import of products<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from cms.utils import get_current_site
from cms.utils.page import get_page_from_path
from django.core.urlresolvers import reverse
from filer.models.imagemodels im... | |
0c69ade79a3e83024c69698a0cb3eae775d8082d | dbaas/workflow/steps/util/region_migration/check_instances_status.py | dbaas/workflow/steps/util/region_migration/check_instances_status.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
LOG = logging.getLogger(__name__)
class DecreaseTTL(BaseStep):
def __unicode__(self):
return "Checking instances status..."
def do(... | Remove unused imports and change exception handling | Remove unused imports and change exception handling
| Python | bsd-3-clause | globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service | Remove unused imports and change exception handling | # -*- 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
LOG = logging.getLogger(__name__)
class DecreaseTTL(BaseStep):
def __unicode__(self):
return "Checking instances status..."
def do(... | <commit_before><commit_msg>Remove unused imports and change exception handling<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
LOG = logging.getLogger(__name__)
class DecreaseTTL(BaseStep):
def __unicode__(self):
return "Checking instances status..."
def do(... | Remove unused imports and change exception handling# -*- 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
LOG = logging.getLogger(__name__)
class DecreaseTTL(BaseStep):
def __unicode__(self):
... | <commit_before><commit_msg>Remove unused imports and change exception handling<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
LOG = logging.getLogger(__name__)
class DecreaseTTL(BaseS... | |
0451142ecede6f899b97b28114843413332e3f0b | scripts/nplm-training/averageNullEmbedding_baseline.py | scripts/nplm-training/averageNullEmbedding_baseline.py | #!/usr/bin/env python2
import sys
import numpy
import optparse
#sys.path.append('/data/tools/nplm/python')
parser = optparse.OptionParser("%prog [options]")
parser.add_option("-p", "--nplm-python-path", type="string", dest="nplm_python_path")
parser.add_option("-i", "--input-model", type="string", dest="input_model")
... | Add null token normalization for models to be used with the chart decoder. | Add null token normalization for models to be used with the chart decoder.
| Python | lgpl-2.1 | alvations/mosesdecoder,emjotde/mosesdecoder_nmt,moses-smt/mosesdecoder,alvations/mosesdecoder,moses-smt/mosesdecoder,KonceptGeek/mosesdecoder,moses-smt/mosesdecoder,KonceptGeek/mosesdecoder,KonceptGeek/mosesdecoder,hychyc07/mosesdecoder,KonceptGeek/mosesdecoder,moses-smt/mosesdecoder,alvations/mosesdecoder,tofula/moses... | Add null token normalization for models to be used with the chart decoder. | #!/usr/bin/env python2
import sys
import numpy
import optparse
#sys.path.append('/data/tools/nplm/python')
parser = optparse.OptionParser("%prog [options]")
parser.add_option("-p", "--nplm-python-path", type="string", dest="nplm_python_path")
parser.add_option("-i", "--input-model", type="string", dest="input_model")
... | <commit_before><commit_msg>Add null token normalization for models to be used with the chart decoder.<commit_after> | #!/usr/bin/env python2
import sys
import numpy
import optparse
#sys.path.append('/data/tools/nplm/python')
parser = optparse.OptionParser("%prog [options]")
parser.add_option("-p", "--nplm-python-path", type="string", dest="nplm_python_path")
parser.add_option("-i", "--input-model", type="string", dest="input_model")
... | Add null token normalization for models to be used with the chart decoder.#!/usr/bin/env python2
import sys
import numpy
import optparse
#sys.path.append('/data/tools/nplm/python')
parser = optparse.OptionParser("%prog [options]")
parser.add_option("-p", "--nplm-python-path", type="string", dest="nplm_python_path")
pa... | <commit_before><commit_msg>Add null token normalization for models to be used with the chart decoder.<commit_after>#!/usr/bin/env python2
import sys
import numpy
import optparse
#sys.path.append('/data/tools/nplm/python')
parser = optparse.OptionParser("%prog [options]")
parser.add_option("-p", "--nplm-python-path", t... | |
983085ed78b157b5c1c2e525506a3221c7a3881a | problem_34.py | problem_34.py | from problem_20 import factorial
from time import time
def calculate_digit_factorials(start, end):
known_factorials = {}
digit_factorials = []
for num in range(start, end):
factorial_sum = 0
for digit in str(num):
if digit not in known_factorials:
known_factoria... | Add problem 34, digit factorials | Add problem 34, digit factorials
| Python | mit | dimkarakostas/project-euler | Add problem 34, digit factorials | from problem_20 import factorial
from time import time
def calculate_digit_factorials(start, end):
known_factorials = {}
digit_factorials = []
for num in range(start, end):
factorial_sum = 0
for digit in str(num):
if digit not in known_factorials:
known_factoria... | <commit_before><commit_msg>Add problem 34, digit factorials<commit_after> | from problem_20 import factorial
from time import time
def calculate_digit_factorials(start, end):
known_factorials = {}
digit_factorials = []
for num in range(start, end):
factorial_sum = 0
for digit in str(num):
if digit not in known_factorials:
known_factoria... | Add problem 34, digit factorialsfrom problem_20 import factorial
from time import time
def calculate_digit_factorials(start, end):
known_factorials = {}
digit_factorials = []
for num in range(start, end):
factorial_sum = 0
for digit in str(num):
if digit not in known_factorials... | <commit_before><commit_msg>Add problem 34, digit factorials<commit_after>from problem_20 import factorial
from time import time
def calculate_digit_factorials(start, end):
known_factorials = {}
digit_factorials = []
for num in range(start, end):
factorial_sum = 0
for digit in str(num):
... | |
3dbc4715cba02850b8062c9db4d954cc913b7492 | blog/migrations/0008_remove_commenters_without_posts.py | blog/migrations/0008_remove_commenters_without_posts.py | from django.db import migrations
def remove_commenters_without_post(apps, schema_editor):
Commenter = apps.get_model('blog', 'Commenter')
Commenter.objects.filter(comments__isnull=True).delete()
class Migration(migrations.Migration):
dependencies = [
('blog', '0007_protect_articles_from_user_d... | Add a migration to remove garbage commenter objects | Add a migration to remove garbage commenter objects
| Python | bsd-2-clause | w0rp/w0rpzone,w0rp/w0rpzone,w0rp/w0rpzone,w0rp/w0rpzone | Add a migration to remove garbage commenter objects | from django.db import migrations
def remove_commenters_without_post(apps, schema_editor):
Commenter = apps.get_model('blog', 'Commenter')
Commenter.objects.filter(comments__isnull=True).delete()
class Migration(migrations.Migration):
dependencies = [
('blog', '0007_protect_articles_from_user_d... | <commit_before><commit_msg>Add a migration to remove garbage commenter objects<commit_after> | from django.db import migrations
def remove_commenters_without_post(apps, schema_editor):
Commenter = apps.get_model('blog', 'Commenter')
Commenter.objects.filter(comments__isnull=True).delete()
class Migration(migrations.Migration):
dependencies = [
('blog', '0007_protect_articles_from_user_d... | Add a migration to remove garbage commenter objectsfrom django.db import migrations
def remove_commenters_without_post(apps, schema_editor):
Commenter = apps.get_model('blog', 'Commenter')
Commenter.objects.filter(comments__isnull=True).delete()
class Migration(migrations.Migration):
dependencies = [
... | <commit_before><commit_msg>Add a migration to remove garbage commenter objects<commit_after>from django.db import migrations
def remove_commenters_without_post(apps, schema_editor):
Commenter = apps.get_model('blog', 'Commenter')
Commenter.objects.filter(comments__isnull=True).delete()
class Migration(migr... | |
24dd968202329c5f524645e764b9ad0c84324cdb | webapp/apps/taxbrain/migrations/0014_auto_20151124_2029.py | webapp/apps/taxbrain/migrations/0014_auto_20151124_2029.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import webapp.apps.taxbrain.models
class Migration(migrations.Migration):
dependencies = [
('taxbrain', '0013_auto_20151120_2141'),
]
operations = [
migrations.AddField(
... | Add migration for new field in TaxSaveInputs | Add migration for new field in TaxSaveInputs
| Python | mit | zrisher/webapp-public,zrisher/webapp-public,OpenSourcePolicyCenter/webapp-public,OpenSourcePolicyCenter/webapp-public,zrisher/webapp-public,OpenSourcePolicyCenter/PolicyBrain,OpenSourcePolicyCenter/PolicyBrain,OpenSourcePolicyCenter/webapp-public,OpenSourcePolicyCenter/PolicyBrain,zrisher/webapp-public,OpenSourcePolicy... | Add migration for new field in TaxSaveInputs | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import webapp.apps.taxbrain.models
class Migration(migrations.Migration):
dependencies = [
('taxbrain', '0013_auto_20151120_2141'),
]
operations = [
migrations.AddField(
... | <commit_before><commit_msg>Add migration for new field in TaxSaveInputs<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import webapp.apps.taxbrain.models
class Migration(migrations.Migration):
dependencies = [
('taxbrain', '0013_auto_20151120_2141'),
]
operations = [
migrations.AddField(
... | Add migration for new field in TaxSaveInputs# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import webapp.apps.taxbrain.models
class Migration(migrations.Migration):
dependencies = [
('taxbrain', '0013_auto_20151120_2141'),
]
operations =... | <commit_before><commit_msg>Add migration for new field in TaxSaveInputs<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import webapp.apps.taxbrain.models
class Migration(migrations.Migration):
dependencies = [
('taxbrain', '0013_auto... | |
8c1785e9df05c4c37a66efa12919e59eefb08672 | client/comet/server.py | client/comet/server.py | #!/usr/bin/python
import httplib
con = httplib.HTTPConnection("kevinwells.homeip.net", 8082)
con.connect()
params = {
"Host": "kevinwells.homeip.net:8082",
"User-Agent": "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.04 (lucid) Firefox/3.6.12",
"Accept": "text/html,application/xhtml+... | Add simple client that gets a url from Etherpad. | Add simple client that gets a url from Etherpad.
Signed-off-by: Kevin Wells <[email protected]>
| Python | apache-2.0 | PolicyStat/PolicyPad,PolicyStat/PolicyPad,PolicyStat/PolicyPad | Add simple client that gets a url from Etherpad.
Signed-off-by: Kevin Wells <[email protected]> | #!/usr/bin/python
import httplib
con = httplib.HTTPConnection("kevinwells.homeip.net", 8082)
con.connect()
params = {
"Host": "kevinwells.homeip.net:8082",
"User-Agent": "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.04 (lucid) Firefox/3.6.12",
"Accept": "text/html,application/xhtml+... | <commit_before><commit_msg>Add simple client that gets a url from Etherpad.
Signed-off-by: Kevin Wells <[email protected]><commit_after> | #!/usr/bin/python
import httplib
con = httplib.HTTPConnection("kevinwells.homeip.net", 8082)
con.connect()
params = {
"Host": "kevinwells.homeip.net:8082",
"User-Agent": "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.04 (lucid) Firefox/3.6.12",
"Accept": "text/html,application/xhtml+... | Add simple client that gets a url from Etherpad.
Signed-off-by: Kevin Wells <[email protected]>#!/usr/bin/python
import httplib
con = httplib.HTTPConnection("kevinwells.homeip.net", 8082)
con.connect()
params = {
"Host": "kevinwells.homeip.net:8082",
"User-Agent": "Mozilla/5.0 ... | <commit_before><commit_msg>Add simple client that gets a url from Etherpad.
Signed-off-by: Kevin Wells <[email protected]><commit_after>#!/usr/bin/python
import httplib
con = httplib.HTTPConnection("kevinwells.homeip.net", 8082)
con.connect()
params = {
"Host": "kevinwells.home... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.