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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7f06cb8ceff3f2515f01662622e3c5149bcb8646 | xm/main.py | xm/main.py | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
import argparse
DEFAULT_CONFIG_FILE = '~/.config/xmrc'
def _new_argument_parser():
parser = argparse.ArgumentParser(
description='Build the appropriate make command'
)
... | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
import argparse
DEFAULT_CONFIG_FILE = '~/.config/xmrc'
def _new_argument_parser():
parser = argparse.ArgumentParser(
description='Build the appropriate make command'
)
... | Add a --target argument and make trailling arguments context dependant | Add a --target argument and make trailling arguments context dependant
| Python | bsd-2-clause | pcadottemichaud/xm,pc-m/xm,pcadottemichaud/xm,pc-m/xm | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
import argparse
DEFAULT_CONFIG_FILE = '~/.config/xmrc'
def _new_argument_parser():
parser = argparse.ArgumentParser(
description='Build the appropriate make command'
)
... | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
import argparse
DEFAULT_CONFIG_FILE = '~/.config/xmrc'
def _new_argument_parser():
parser = argparse.ArgumentParser(
description='Build the appropriate make command'
)
... | <commit_before>#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
import argparse
DEFAULT_CONFIG_FILE = '~/.config/xmrc'
def _new_argument_parser():
parser = argparse.ArgumentParser(
description='Build the appropriate make comma... | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
import argparse
DEFAULT_CONFIG_FILE = '~/.config/xmrc'
def _new_argument_parser():
parser = argparse.ArgumentParser(
description='Build the appropriate make command'
)
... | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
import argparse
DEFAULT_CONFIG_FILE = '~/.config/xmrc'
def _new_argument_parser():
parser = argparse.ArgumentParser(
description='Build the appropriate make command'
)
... | <commit_before>#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
import argparse
DEFAULT_CONFIG_FILE = '~/.config/xmrc'
def _new_argument_parser():
parser = argparse.ArgumentParser(
description='Build the appropriate make comma... |
ab802204d84511765a701cad48e9e22dc4e84be1 | tests/rules/conftest.py | tests/rules/conftest.py | import pytest
from fmn.rules.cache import cache
@pytest.fixture(autouse=True, scope="session")
def configured_cache():
cache.configure()
| import pytest
from fmn.rules.cache import cache
@pytest.fixture(autouse=True)
def configured_cache():
if not cache.region.is_configured:
cache.configure()
yield
cache.region.invalidate()
| Fix intermittent failures of test_guard_http_exception | Fix intermittent failures of test_guard_http_exception
Signed-off-by: Ryan Lerch <e809e25f3c554b2b195ccd768cd9a485288f896f@redhat.com>
| Python | lgpl-2.1 | fedora-infra/fmn,fedora-infra/fmn,fedora-infra/fmn,fedora-infra/fmn,fedora-infra/fmn | import pytest
from fmn.rules.cache import cache
@pytest.fixture(autouse=True, scope="session")
def configured_cache():
cache.configure()
Fix intermittent failures of test_guard_http_exception
Signed-off-by: Ryan Lerch <e809e25f3c554b2b195ccd768cd9a485288f896f@redhat.com> | import pytest
from fmn.rules.cache import cache
@pytest.fixture(autouse=True)
def configured_cache():
if not cache.region.is_configured:
cache.configure()
yield
cache.region.invalidate()
| <commit_before>import pytest
from fmn.rules.cache import cache
@pytest.fixture(autouse=True, scope="session")
def configured_cache():
cache.configure()
<commit_msg>Fix intermittent failures of test_guard_http_exception
Signed-off-by: Ryan Lerch <e809e25f3c554b2b195ccd768cd9a485288f896f@redhat.com><commit_after> | import pytest
from fmn.rules.cache import cache
@pytest.fixture(autouse=True)
def configured_cache():
if not cache.region.is_configured:
cache.configure()
yield
cache.region.invalidate()
| import pytest
from fmn.rules.cache import cache
@pytest.fixture(autouse=True, scope="session")
def configured_cache():
cache.configure()
Fix intermittent failures of test_guard_http_exception
Signed-off-by: Ryan Lerch <e809e25f3c554b2b195ccd768cd9a485288f896f@redhat.com>import pytest
from fmn.rules.cache impor... | <commit_before>import pytest
from fmn.rules.cache import cache
@pytest.fixture(autouse=True, scope="session")
def configured_cache():
cache.configure()
<commit_msg>Fix intermittent failures of test_guard_http_exception
Signed-off-by: Ryan Lerch <e809e25f3c554b2b195ccd768cd9a485288f896f@redhat.com><commit_after>... |
f5463ae38c4cd46af043f30d0e7d28cf5d1727db | flow/commands/update_software_command.py | flow/commands/update_software_command.py | import subprocess
from command import Command
from . import ListVersionsCommand
from ..git_tools import git_base_command
class UpdateSoftwareCommand(Command):
def __init__(self, flow, cmd_name, params):
Command.__init__(self, flow, cmd_name, params)
def exec_impl(self):
... | import subprocess
from command import Command
from list_versions_command import ListVersionsCommand
from ..git_tools import git_base_command
class UpdateSoftwareCommand(Command):
def __init__(self, flow, cmd_name, params):
Command.__init__(self, flow, cmd_name, params)
de... | Fix version list validation check. | Fix version list validation check.
[#152092418]
| Python | mit | manylabs/flow,manylabs/flow | import subprocess
from command import Command
from . import ListVersionsCommand
from ..git_tools import git_base_command
class UpdateSoftwareCommand(Command):
def __init__(self, flow, cmd_name, params):
Command.__init__(self, flow, cmd_name, params)
def exec_impl(self):
... | import subprocess
from command import Command
from list_versions_command import ListVersionsCommand
from ..git_tools import git_base_command
class UpdateSoftwareCommand(Command):
def __init__(self, flow, cmd_name, params):
Command.__init__(self, flow, cmd_name, params)
de... | <commit_before>import subprocess
from command import Command
from . import ListVersionsCommand
from ..git_tools import git_base_command
class UpdateSoftwareCommand(Command):
def __init__(self, flow, cmd_name, params):
Command.__init__(self, flow, cmd_name, params)
def exec_im... | import subprocess
from command import Command
from list_versions_command import ListVersionsCommand
from ..git_tools import git_base_command
class UpdateSoftwareCommand(Command):
def __init__(self, flow, cmd_name, params):
Command.__init__(self, flow, cmd_name, params)
de... | import subprocess
from command import Command
from . import ListVersionsCommand
from ..git_tools import git_base_command
class UpdateSoftwareCommand(Command):
def __init__(self, flow, cmd_name, params):
Command.__init__(self, flow, cmd_name, params)
def exec_impl(self):
... | <commit_before>import subprocess
from command import Command
from . import ListVersionsCommand
from ..git_tools import git_base_command
class UpdateSoftwareCommand(Command):
def __init__(self, flow, cmd_name, params):
Command.__init__(self, flow, cmd_name, params)
def exec_im... |
2fc23ca753ca68d3c0531cf9c58d5864adfc373f | tests/test_short_url.py | tests/test_short_url.py | # -*- coding: utf-8 -*-
import unittest
from random import randrange
import short_url
class TestShortUrl(unittest.TestCase):
def test_one(self):
url = short_url.encode_url(12)
self.assertEqual(url, 'jy7yj')
key = short_url.decode_url(url)
self.assertEqual(key, 12)
def test_1... | # -*- coding: utf-8 -*-
from random import randrange
from pytest import raises
import short_url
def test_custom_alphabet():
encoder = short_url.UrlEncoder(alphabet='ab')
url = encoder.encode_url(12)
assert url == 'bbaaaaaaaaaaaaaaaaaaaa'
key = encoder.decode_url('bbaaaaaaaaaaaaaaaaaaaa')
ass... | Use simple test functions and remove too special tests | Use simple test functions and remove too special tests
| Python | mit | Alir3z4/python-short_url | # -*- coding: utf-8 -*-
import unittest
from random import randrange
import short_url
class TestShortUrl(unittest.TestCase):
def test_one(self):
url = short_url.encode_url(12)
self.assertEqual(url, 'jy7yj')
key = short_url.decode_url(url)
self.assertEqual(key, 12)
def test_1... | # -*- coding: utf-8 -*-
from random import randrange
from pytest import raises
import short_url
def test_custom_alphabet():
encoder = short_url.UrlEncoder(alphabet='ab')
url = encoder.encode_url(12)
assert url == 'bbaaaaaaaaaaaaaaaaaaaa'
key = encoder.decode_url('bbaaaaaaaaaaaaaaaaaaaa')
ass... | <commit_before># -*- coding: utf-8 -*-
import unittest
from random import randrange
import short_url
class TestShortUrl(unittest.TestCase):
def test_one(self):
url = short_url.encode_url(12)
self.assertEqual(url, 'jy7yj')
key = short_url.decode_url(url)
self.assertEqual(key, 12)
... | # -*- coding: utf-8 -*-
from random import randrange
from pytest import raises
import short_url
def test_custom_alphabet():
encoder = short_url.UrlEncoder(alphabet='ab')
url = encoder.encode_url(12)
assert url == 'bbaaaaaaaaaaaaaaaaaaaa'
key = encoder.decode_url('bbaaaaaaaaaaaaaaaaaaaa')
ass... | # -*- coding: utf-8 -*-
import unittest
from random import randrange
import short_url
class TestShortUrl(unittest.TestCase):
def test_one(self):
url = short_url.encode_url(12)
self.assertEqual(url, 'jy7yj')
key = short_url.decode_url(url)
self.assertEqual(key, 12)
def test_1... | <commit_before># -*- coding: utf-8 -*-
import unittest
from random import randrange
import short_url
class TestShortUrl(unittest.TestCase):
def test_one(self):
url = short_url.encode_url(12)
self.assertEqual(url, 'jy7yj')
key = short_url.decode_url(url)
self.assertEqual(key, 12)
... |
8653159dcf6a078bc2193293b93457388e7799d3 | tests/tests.py | tests/tests.py | import functools
import os
from nose.tools import istest, assert_equal
import spur
def test(func):
@functools.wraps(func)
def run_test():
for shell in _create_shells():
yield func, shell
def _create_shells():
return [
spur.LocalShell(),
_cr... | import functools
import os
from nose.tools import istest, assert_equal
import spur
def test(func):
@functools.wraps(func)
def run_test():
for shell in _create_shells():
yield func, shell
def _create_shells():
return [
spur.LocalShell(),
_cr... | Add test for output that doesn't end in a newline | Add test for output that doesn't end in a newline
| Python | bsd-2-clause | mwilliamson/spur.py | import functools
import os
from nose.tools import istest, assert_equal
import spur
def test(func):
@functools.wraps(func)
def run_test():
for shell in _create_shells():
yield func, shell
def _create_shells():
return [
spur.LocalShell(),
_cr... | import functools
import os
from nose.tools import istest, assert_equal
import spur
def test(func):
@functools.wraps(func)
def run_test():
for shell in _create_shells():
yield func, shell
def _create_shells():
return [
spur.LocalShell(),
_cr... | <commit_before>import functools
import os
from nose.tools import istest, assert_equal
import spur
def test(func):
@functools.wraps(func)
def run_test():
for shell in _create_shells():
yield func, shell
def _create_shells():
return [
spur.LocalShell(),
... | import functools
import os
from nose.tools import istest, assert_equal
import spur
def test(func):
@functools.wraps(func)
def run_test():
for shell in _create_shells():
yield func, shell
def _create_shells():
return [
spur.LocalShell(),
_cr... | import functools
import os
from nose.tools import istest, assert_equal
import spur
def test(func):
@functools.wraps(func)
def run_test():
for shell in _create_shells():
yield func, shell
def _create_shells():
return [
spur.LocalShell(),
_cr... | <commit_before>import functools
import os
from nose.tools import istest, assert_equal
import spur
def test(func):
@functools.wraps(func)
def run_test():
for shell in _create_shells():
yield func, shell
def _create_shells():
return [
spur.LocalShell(),
... |
f4e07b93ab81fd0a0dc59ec77fca596a2fcca738 | froide/helper/form_utils.py | froide/helper/form_utils.py | import json
from django.db import models
class DjangoJSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, models.Model) and hasattr(obj, 'as_data'):
return obj.as_data()
return json.JSONEncoder.default(self, obj)
class JSONMixin(object):
def as_json(self):
... | import json
from django.db import models
class DjangoJSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, models.Model) and hasattr(obj, 'as_data'):
return obj.as_data()
return json.JSONEncoder.default(self, obj)
def get_data(error):
if isinstance(error, (di... | Fix serialization of form errors | Fix serialization of form errors | Python | mit | fin/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,stefanw/froide,stefanw/froide,stefanw/froide,fin/froide | import json
from django.db import models
class DjangoJSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, models.Model) and hasattr(obj, 'as_data'):
return obj.as_data()
return json.JSONEncoder.default(self, obj)
class JSONMixin(object):
def as_json(self):
... | import json
from django.db import models
class DjangoJSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, models.Model) and hasattr(obj, 'as_data'):
return obj.as_data()
return json.JSONEncoder.default(self, obj)
def get_data(error):
if isinstance(error, (di... | <commit_before>import json
from django.db import models
class DjangoJSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, models.Model) and hasattr(obj, 'as_data'):
return obj.as_data()
return json.JSONEncoder.default(self, obj)
class JSONMixin(object):
def a... | import json
from django.db import models
class DjangoJSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, models.Model) and hasattr(obj, 'as_data'):
return obj.as_data()
return json.JSONEncoder.default(self, obj)
def get_data(error):
if isinstance(error, (di... | import json
from django.db import models
class DjangoJSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, models.Model) and hasattr(obj, 'as_data'):
return obj.as_data()
return json.JSONEncoder.default(self, obj)
class JSONMixin(object):
def as_json(self):
... | <commit_before>import json
from django.db import models
class DjangoJSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, models.Model) and hasattr(obj, 'as_data'):
return obj.as_data()
return json.JSONEncoder.default(self, obj)
class JSONMixin(object):
def a... |
e8092ec82ff8ee9c0104b507751e45555c08685b | tests/tests.py | tests/tests.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.test import TestCase
from tags.models import Tag
from .models import Food
class TestFoodModel(TestCase):
def test_create_food(self):
food = Food.objects.create(
name="nacho",
tags="tort... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.test import TestCase
from tags.models import Tag
from .models import Food
class TestFoodModel(TestCase):
def test_create_food(self):
food = Food.objects.create(
name="nacho",
tags="tort... | Fix test on python 3.3 | Fix test on python 3.3
| Python | mit | avelino/django-tags | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.test import TestCase
from tags.models import Tag
from .models import Food
class TestFoodModel(TestCase):
def test_create_food(self):
food = Food.objects.create(
name="nacho",
tags="tort... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.test import TestCase
from tags.models import Tag
from .models import Food
class TestFoodModel(TestCase):
def test_create_food(self):
food = Food.objects.create(
name="nacho",
tags="tort... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.test import TestCase
from tags.models import Tag
from .models import Food
class TestFoodModel(TestCase):
def test_create_food(self):
food = Food.objects.create(
name="nacho",
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.test import TestCase
from tags.models import Tag
from .models import Food
class TestFoodModel(TestCase):
def test_create_food(self):
food = Food.objects.create(
name="nacho",
tags="tort... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.test import TestCase
from tags.models import Tag
from .models import Food
class TestFoodModel(TestCase):
def test_create_food(self):
food = Food.objects.create(
name="nacho",
tags="tort... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.test import TestCase
from tags.models import Tag
from .models import Food
class TestFoodModel(TestCase):
def test_create_food(self):
food = Food.objects.create(
name="nacho",
... |
6e9095efe0251d951eea553ccb578e3ed5909b7f | tests/utils.py | tests/utils.py | import contextlib
import os
from pipeline.conf import settings
def _(path):
# Make sure the path contains only the correct separator
return path.replace('/', os.sep).replace('\\', os.sep)
@contextlib.contextmanager
def pipeline_settings(**kwargs):
try:
saved = {}
for name, value in kwar... | import contextlib
import os
from pipeline.conf import settings
def _(path):
# Make sure the path contains only the correct separator
return path.replace('/', os.sep).replace('\\', os.sep)
@contextlib.contextmanager
def pipeline_settings(**kwargs):
try:
saved = {}
for name, value in kwar... | Update pipeline_settings to support Python 3 | Update pipeline_settings to support Python 3
| Python | mit | cyberdelia/django-pipeline,ei-grad/django-pipeline,caioariede/django-pipeline,beedesk/django-pipeline,camilonova/django-pipeline,ei-grad/django-pipeline,chipx86/django-pipeline,simudream/django-pipeline,Tekco/django-pipeline,Tekco/django-pipeline,d9pouces/django-pipeline,wienczny/django-pipeline,Kobold/django-pipeline,... | import contextlib
import os
from pipeline.conf import settings
def _(path):
# Make sure the path contains only the correct separator
return path.replace('/', os.sep).replace('\\', os.sep)
@contextlib.contextmanager
def pipeline_settings(**kwargs):
try:
saved = {}
for name, value in kwar... | import contextlib
import os
from pipeline.conf import settings
def _(path):
# Make sure the path contains only the correct separator
return path.replace('/', os.sep).replace('\\', os.sep)
@contextlib.contextmanager
def pipeline_settings(**kwargs):
try:
saved = {}
for name, value in kwar... | <commit_before>import contextlib
import os
from pipeline.conf import settings
def _(path):
# Make sure the path contains only the correct separator
return path.replace('/', os.sep).replace('\\', os.sep)
@contextlib.contextmanager
def pipeline_settings(**kwargs):
try:
saved = {}
for name... | import contextlib
import os
from pipeline.conf import settings
def _(path):
# Make sure the path contains only the correct separator
return path.replace('/', os.sep).replace('\\', os.sep)
@contextlib.contextmanager
def pipeline_settings(**kwargs):
try:
saved = {}
for name, value in kwar... | import contextlib
import os
from pipeline.conf import settings
def _(path):
# Make sure the path contains only the correct separator
return path.replace('/', os.sep).replace('\\', os.sep)
@contextlib.contextmanager
def pipeline_settings(**kwargs):
try:
saved = {}
for name, value in kwar... | <commit_before>import contextlib
import os
from pipeline.conf import settings
def _(path):
# Make sure the path contains only the correct separator
return path.replace('/', os.sep).replace('\\', os.sep)
@contextlib.contextmanager
def pipeline_settings(**kwargs):
try:
saved = {}
for name... |
eae8053398c26ede98c4e253caf7f29f930b2f97 | compile.py | compile.py | from compileall import compile_dir
from distutils.sysconfig import get_python_lib
import os
import os.path
import sys
EXCLUDES = [
'gunicorn/workers/_gaiohttp.py',
'pymysql/_socketio.py',
]
def compile_files(path):
return compile_dir(path, maxlevels=50, quiet=True)
def remove_python3_files(path):
f... | from compileall import compile_dir
from distutils.sysconfig import get_python_lib
import os
import os.path
import sys
EXCLUDES_27 = [
'pymysql/_socketio.py',
]
EXCLUDES_34 = [
'gunicorn/workers/_gaiohttp.py',
]
def compile_files(path):
return compile_dir(path, maxlevels=50, quiet=True)
def remove_pytho... | Split the Python specific version exludes between 2.7/3.4 specific syntax. | Split the Python specific version exludes between 2.7/3.4 specific syntax.
| Python | apache-2.0 | therewillbecode/ichnaea,mozilla/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea,mozilla/ichnaea,mozilla/ichnaea,therewillbecode/ichnaea | from compileall import compile_dir
from distutils.sysconfig import get_python_lib
import os
import os.path
import sys
EXCLUDES = [
'gunicorn/workers/_gaiohttp.py',
'pymysql/_socketio.py',
]
def compile_files(path):
return compile_dir(path, maxlevels=50, quiet=True)
def remove_python3_files(path):
f... | from compileall import compile_dir
from distutils.sysconfig import get_python_lib
import os
import os.path
import sys
EXCLUDES_27 = [
'pymysql/_socketio.py',
]
EXCLUDES_34 = [
'gunicorn/workers/_gaiohttp.py',
]
def compile_files(path):
return compile_dir(path, maxlevels=50, quiet=True)
def remove_pytho... | <commit_before>from compileall import compile_dir
from distutils.sysconfig import get_python_lib
import os
import os.path
import sys
EXCLUDES = [
'gunicorn/workers/_gaiohttp.py',
'pymysql/_socketio.py',
]
def compile_files(path):
return compile_dir(path, maxlevels=50, quiet=True)
def remove_python3_fil... | from compileall import compile_dir
from distutils.sysconfig import get_python_lib
import os
import os.path
import sys
EXCLUDES_27 = [
'pymysql/_socketio.py',
]
EXCLUDES_34 = [
'gunicorn/workers/_gaiohttp.py',
]
def compile_files(path):
return compile_dir(path, maxlevels=50, quiet=True)
def remove_pytho... | from compileall import compile_dir
from distutils.sysconfig import get_python_lib
import os
import os.path
import sys
EXCLUDES = [
'gunicorn/workers/_gaiohttp.py',
'pymysql/_socketio.py',
]
def compile_files(path):
return compile_dir(path, maxlevels=50, quiet=True)
def remove_python3_files(path):
f... | <commit_before>from compileall import compile_dir
from distutils.sysconfig import get_python_lib
import os
import os.path
import sys
EXCLUDES = [
'gunicorn/workers/_gaiohttp.py',
'pymysql/_socketio.py',
]
def compile_files(path):
return compile_dir(path, maxlevels=50, quiet=True)
def remove_python3_fil... |
bf0407914cfa85312d3fde79e83f86d00c2d2235 | upgrade_dbs.py | upgrade_dbs.py | #!/usr/bin/python
import games_mgr as gm_m
import openings_book as ol_m
import player as p_m
from defines import *
import pdb
if __name__ == "__main__":
gm = gm_m.GamesMgr()
#pdb.set_trace()
to_remove = []
unknown = p_m.Player("Unknown")
for g_id in gm.id_lookup.iterkeys():
if g_id ... | #!/usr/bin/python
import games_mgr as gm_m
import openings_book as ol_m
import player as p_m
import players_mgr as pm_m
from defines import *
import sys
import os
def dot():
sys.stdout.write('.')
sys.stdout.flush()
if __name__ == "__main__":
print "Upgrading Players"
pm = pm_m.PlayersMgr()
for p... | Upgrade players DB; show progress | Upgrade players DB; show progress
| Python | mit | cropleyb/pentai,cropleyb/pentai,cropleyb/pentai | #!/usr/bin/python
import games_mgr as gm_m
import openings_book as ol_m
import player as p_m
from defines import *
import pdb
if __name__ == "__main__":
gm = gm_m.GamesMgr()
#pdb.set_trace()
to_remove = []
unknown = p_m.Player("Unknown")
for g_id in gm.id_lookup.iterkeys():
if g_id ... | #!/usr/bin/python
import games_mgr as gm_m
import openings_book as ol_m
import player as p_m
import players_mgr as pm_m
from defines import *
import sys
import os
def dot():
sys.stdout.write('.')
sys.stdout.flush()
if __name__ == "__main__":
print "Upgrading Players"
pm = pm_m.PlayersMgr()
for p... | <commit_before>#!/usr/bin/python
import games_mgr as gm_m
import openings_book as ol_m
import player as p_m
from defines import *
import pdb
if __name__ == "__main__":
gm = gm_m.GamesMgr()
#pdb.set_trace()
to_remove = []
unknown = p_m.Player("Unknown")
for g_id in gm.id_lookup.iterkeys():
... | #!/usr/bin/python
import games_mgr as gm_m
import openings_book as ol_m
import player as p_m
import players_mgr as pm_m
from defines import *
import sys
import os
def dot():
sys.stdout.write('.')
sys.stdout.flush()
if __name__ == "__main__":
print "Upgrading Players"
pm = pm_m.PlayersMgr()
for p... | #!/usr/bin/python
import games_mgr as gm_m
import openings_book as ol_m
import player as p_m
from defines import *
import pdb
if __name__ == "__main__":
gm = gm_m.GamesMgr()
#pdb.set_trace()
to_remove = []
unknown = p_m.Player("Unknown")
for g_id in gm.id_lookup.iterkeys():
if g_id ... | <commit_before>#!/usr/bin/python
import games_mgr as gm_m
import openings_book as ol_m
import player as p_m
from defines import *
import pdb
if __name__ == "__main__":
gm = gm_m.GamesMgr()
#pdb.set_trace()
to_remove = []
unknown = p_m.Player("Unknown")
for g_id in gm.id_lookup.iterkeys():
... |
ca74738e9241230fd0cc843aa9b76f67494d02eb | python/intermediate/create_inter_python_data.py | python/intermediate/create_inter_python_data.py | """Create the data for the Software Carpentry Intermediate Python lectures"""
import numpy as np
import pandas as pd
np.random.seed(26)
years = np.arange(1960, 2011)
temps = np.random.uniform(70, 90, len(years))
rainfalls = np.random.uniform(100, 300, len(years))
noise = 2 * np.random.randn(len(years))
mosquitos = 0.... | """Create the data for the Software Carpentry Intermediate Python lectures"""
import numpy as np
import pandas as pd
np.random.seed(26)
datasets = {'A1': [0, 0.5, 0.7, 10],
'A2': [0, 0.5, 0.7, 50],
'A3': [0, 0.5, 0.3, 50],
'B1': [3, 0.7, 0.2, 50],
'B2': [3, 0.7, 0.7, 50... | Allow creation of multiple example data files for Inter Python | Allow creation of multiple example data files for Inter Python
Generalizes the script for creating data files to allow for the
easy generation of larger numbers of data files.
| Python | bsd-2-clause | selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest | """Create the data for the Software Carpentry Intermediate Python lectures"""
import numpy as np
import pandas as pd
np.random.seed(26)
years = np.arange(1960, 2011)
temps = np.random.uniform(70, 90, len(years))
rainfalls = np.random.uniform(100, 300, len(years))
noise = 2 * np.random.randn(len(years))
mosquitos = 0.... | """Create the data for the Software Carpentry Intermediate Python lectures"""
import numpy as np
import pandas as pd
np.random.seed(26)
datasets = {'A1': [0, 0.5, 0.7, 10],
'A2': [0, 0.5, 0.7, 50],
'A3': [0, 0.5, 0.3, 50],
'B1': [3, 0.7, 0.2, 50],
'B2': [3, 0.7, 0.7, 50... | <commit_before>"""Create the data for the Software Carpentry Intermediate Python lectures"""
import numpy as np
import pandas as pd
np.random.seed(26)
years = np.arange(1960, 2011)
temps = np.random.uniform(70, 90, len(years))
rainfalls = np.random.uniform(100, 300, len(years))
noise = 2 * np.random.randn(len(years))... | """Create the data for the Software Carpentry Intermediate Python lectures"""
import numpy as np
import pandas as pd
np.random.seed(26)
datasets = {'A1': [0, 0.5, 0.7, 10],
'A2': [0, 0.5, 0.7, 50],
'A3': [0, 0.5, 0.3, 50],
'B1': [3, 0.7, 0.2, 50],
'B2': [3, 0.7, 0.7, 50... | """Create the data for the Software Carpentry Intermediate Python lectures"""
import numpy as np
import pandas as pd
np.random.seed(26)
years = np.arange(1960, 2011)
temps = np.random.uniform(70, 90, len(years))
rainfalls = np.random.uniform(100, 300, len(years))
noise = 2 * np.random.randn(len(years))
mosquitos = 0.... | <commit_before>"""Create the data for the Software Carpentry Intermediate Python lectures"""
import numpy as np
import pandas as pd
np.random.seed(26)
years = np.arange(1960, 2011)
temps = np.random.uniform(70, 90, len(years))
rainfalls = np.random.uniform(100, 300, len(years))
noise = 2 * np.random.randn(len(years))... |
9fb12df863e23d8b879f5d92d0f692ac2dcdd91c | test_stack.py | test_stack.py | import pytest
from stack import Element
from stack import Stack
def test_element_init():
n = Element()
assert n.val is None
assert n.next is None
n = Element(3)
assert n.val == 3
assert n.next is None
def test_stack_init():
l = Stack()
assert l.top is None
def test_stack_push():
... | Add tests for init and push | Add tests for init and push
| Python | mit | constanthatz/data-structures | Add tests for init and push | import pytest
from stack import Element
from stack import Stack
def test_element_init():
n = Element()
assert n.val is None
assert n.next is None
n = Element(3)
assert n.val == 3
assert n.next is None
def test_stack_init():
l = Stack()
assert l.top is None
def test_stack_push():
... | <commit_before><commit_msg>Add tests for init and push<commit_after> | import pytest
from stack import Element
from stack import Stack
def test_element_init():
n = Element()
assert n.val is None
assert n.next is None
n = Element(3)
assert n.val == 3
assert n.next is None
def test_stack_init():
l = Stack()
assert l.top is None
def test_stack_push():
... | Add tests for init and pushimport pytest
from stack import Element
from stack import Stack
def test_element_init():
n = Element()
assert n.val is None
assert n.next is None
n = Element(3)
assert n.val == 3
assert n.next is None
def test_stack_init():
l = Stack()
assert l.top is None
... | <commit_before><commit_msg>Add tests for init and push<commit_after>import pytest
from stack import Element
from stack import Stack
def test_element_init():
n = Element()
assert n.val is None
assert n.next is None
n = Element(3)
assert n.val == 3
assert n.next is None
def test_stack_init():
... | |
9b6a22a9cb908d1fbfa5f9b5081f6c96644115b0 | tests/test_tags.py | tests/test_tags.py |
from unittest import TestCase
from django.test.utils import setup_test_template_loader, override_settings
from django.template import Context
from django.template.loader import get_template
TEMPLATES = {
'basetag': '''{% load damn %}{% assets %}''',
'test2': '''
<!doctype html>{% load damn %}
<html>
<head>
{%... |
#from unittest import TestCase
from django.test import TestCase
from django.test.utils import setup_test_template_loader, override_settings
from django.template import Context
from django.template.loader import get_template
TEMPLATES = {
'basetag': '''{% load damn %}{% assets %}''',
'test2': '''
<!doctype ht... | Use TestCase from Django Set STATIC_URL | Use TestCase from Django
Set STATIC_URL
| Python | bsd-2-clause | funkybob/django-amn |
from unittest import TestCase
from django.test.utils import setup_test_template_loader, override_settings
from django.template import Context
from django.template.loader import get_template
TEMPLATES = {
'basetag': '''{% load damn %}{% assets %}''',
'test2': '''
<!doctype html>{% load damn %}
<html>
<head>
{%... |
#from unittest import TestCase
from django.test import TestCase
from django.test.utils import setup_test_template_loader, override_settings
from django.template import Context
from django.template.loader import get_template
TEMPLATES = {
'basetag': '''{% load damn %}{% assets %}''',
'test2': '''
<!doctype ht... | <commit_before>
from unittest import TestCase
from django.test.utils import setup_test_template_loader, override_settings
from django.template import Context
from django.template.loader import get_template
TEMPLATES = {
'basetag': '''{% load damn %}{% assets %}''',
'test2': '''
<!doctype html>{% load damn %}
<... |
#from unittest import TestCase
from django.test import TestCase
from django.test.utils import setup_test_template_loader, override_settings
from django.template import Context
from django.template.loader import get_template
TEMPLATES = {
'basetag': '''{% load damn %}{% assets %}''',
'test2': '''
<!doctype ht... |
from unittest import TestCase
from django.test.utils import setup_test_template_loader, override_settings
from django.template import Context
from django.template.loader import get_template
TEMPLATES = {
'basetag': '''{% load damn %}{% assets %}''',
'test2': '''
<!doctype html>{% load damn %}
<html>
<head>
{%... | <commit_before>
from unittest import TestCase
from django.test.utils import setup_test_template_loader, override_settings
from django.template import Context
from django.template.loader import get_template
TEMPLATES = {
'basetag': '''{% load damn %}{% assets %}''',
'test2': '''
<!doctype html>{% load damn %}
<... |
b245bdcf9a494297ef816c56a98d0477dfbd3d89 | partner_industry_secondary/models/res_partner.py | partner_industry_secondary/models/res_partner.py | # Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta
# Copyright 2016 Tecnativa S.L. - Vicent Cubells
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, exceptions, fields, models, _
class ResPartner(models... | # Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta
# Copyright 2016 Tecnativa S.L. - Vicent Cubells
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, exceptions, fields, models, _
class ResPartner(models... | Make api constrains multi to avoid error when create a company with 2 contacts | partner_industry_Secondary: Make api constrains multi to avoid error when create a company with 2 contacts
| Python | agpl-3.0 | BT-rmartin/partner-contact,OCA/partner-contact,OCA/partner-contact,BT-rmartin/partner-contact | # Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta
# Copyright 2016 Tecnativa S.L. - Vicent Cubells
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, exceptions, fields, models, _
class ResPartner(models... | # Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta
# Copyright 2016 Tecnativa S.L. - Vicent Cubells
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, exceptions, fields, models, _
class ResPartner(models... | <commit_before># Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta
# Copyright 2016 Tecnativa S.L. - Vicent Cubells
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, exceptions, fields, models, _
class Re... | # Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta
# Copyright 2016 Tecnativa S.L. - Vicent Cubells
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, exceptions, fields, models, _
class ResPartner(models... | # Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta
# Copyright 2016 Tecnativa S.L. - Vicent Cubells
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, exceptions, fields, models, _
class ResPartner(models... | <commit_before># Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta
# Copyright 2016 Tecnativa S.L. - Vicent Cubells
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, exceptions, fields, models, _
class Re... |
6336e8e13c01b6a81b8586499e7a3e8fc8b532a8 | launch_control/commands/interface.py | launch_control/commands/interface.py | """
Interface for all launch-control-tool commands
"""
from launch_control.utils.registry import RegistryBase
class Command(RegistryBase):
"""
Base class for all command line tool sub-commands.
"""
def __init__(self, parser, args):
"""
Prepare instance for executing commands.
... | """
Interface for all launch-control-tool commands
"""
import inspect
from launch_control.utils.registry import RegistryBase
class Command(RegistryBase):
"""
Base class for all command line tool sub-commands.
"""
def __init__(self, parser, args):
"""
Prepare instance for executing co... | Use inspect.getdoc() instead of plain __doc__ | Use inspect.getdoc() instead of plain __doc__
| Python | agpl-3.0 | Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server | """
Interface for all launch-control-tool commands
"""
from launch_control.utils.registry import RegistryBase
class Command(RegistryBase):
"""
Base class for all command line tool sub-commands.
"""
def __init__(self, parser, args):
"""
Prepare instance for executing commands.
... | """
Interface for all launch-control-tool commands
"""
import inspect
from launch_control.utils.registry import RegistryBase
class Command(RegistryBase):
"""
Base class for all command line tool sub-commands.
"""
def __init__(self, parser, args):
"""
Prepare instance for executing co... | <commit_before>"""
Interface for all launch-control-tool commands
"""
from launch_control.utils.registry import RegistryBase
class Command(RegistryBase):
"""
Base class for all command line tool sub-commands.
"""
def __init__(self, parser, args):
"""
Prepare instance for executing comm... | """
Interface for all launch-control-tool commands
"""
import inspect
from launch_control.utils.registry import RegistryBase
class Command(RegistryBase):
"""
Base class for all command line tool sub-commands.
"""
def __init__(self, parser, args):
"""
Prepare instance for executing co... | """
Interface for all launch-control-tool commands
"""
from launch_control.utils.registry import RegistryBase
class Command(RegistryBase):
"""
Base class for all command line tool sub-commands.
"""
def __init__(self, parser, args):
"""
Prepare instance for executing commands.
... | <commit_before>"""
Interface for all launch-control-tool commands
"""
from launch_control.utils.registry import RegistryBase
class Command(RegistryBase):
"""
Base class for all command line tool sub-commands.
"""
def __init__(self, parser, args):
"""
Prepare instance for executing comm... |
6fa0131dc85a94833310c4f1a24fac348ff90c7d | tools/makefiles.py | tools/makefiles.py | #!/usr/bin/env python
from os import listdir
import re
#reads in old makefile from folder
#parses for compiler arguments
#creates cmake lists file with parsed arguments as parent-scope variables
def readAndMake(folder):
inStream = open(folder+"/Makefile", "r")
oldMake = inStream.readlines()
inStream.close... | #!/usr/bin/env python
from os import listdir
import re
#reads in old makefile from folder
#parses for compiler arguments
#creates cmake lists file with parsed arguments as parent-scope variables
def readAndMake(folder):
inStream = open(folder+"/Makefile", "r")
oldMake = inStream.readlines()
inStream.close... | Add -Wno-writable-strings to clean up output | Add -Wno-writable-strings to clean up output
| Python | mit | f0rki/cb-multios,f0rki/cb-multios,f0rki/cb-multios,f0rki/cb-multios,f0rki/cb-multios | #!/usr/bin/env python
from os import listdir
import re
#reads in old makefile from folder
#parses for compiler arguments
#creates cmake lists file with parsed arguments as parent-scope variables
def readAndMake(folder):
inStream = open(folder+"/Makefile", "r")
oldMake = inStream.readlines()
inStream.close... | #!/usr/bin/env python
from os import listdir
import re
#reads in old makefile from folder
#parses for compiler arguments
#creates cmake lists file with parsed arguments as parent-scope variables
def readAndMake(folder):
inStream = open(folder+"/Makefile", "r")
oldMake = inStream.readlines()
inStream.close... | <commit_before>#!/usr/bin/env python
from os import listdir
import re
#reads in old makefile from folder
#parses for compiler arguments
#creates cmake lists file with parsed arguments as parent-scope variables
def readAndMake(folder):
inStream = open(folder+"/Makefile", "r")
oldMake = inStream.readlines()
... | #!/usr/bin/env python
from os import listdir
import re
#reads in old makefile from folder
#parses for compiler arguments
#creates cmake lists file with parsed arguments as parent-scope variables
def readAndMake(folder):
inStream = open(folder+"/Makefile", "r")
oldMake = inStream.readlines()
inStream.close... | #!/usr/bin/env python
from os import listdir
import re
#reads in old makefile from folder
#parses for compiler arguments
#creates cmake lists file with parsed arguments as parent-scope variables
def readAndMake(folder):
inStream = open(folder+"/Makefile", "r")
oldMake = inStream.readlines()
inStream.close... | <commit_before>#!/usr/bin/env python
from os import listdir
import re
#reads in old makefile from folder
#parses for compiler arguments
#creates cmake lists file with parsed arguments as parent-scope variables
def readAndMake(folder):
inStream = open(folder+"/Makefile", "r")
oldMake = inStream.readlines()
... |
612e253d0234e1852db61c589418edbb4add4b00 | gunicorn.conf.py | gunicorn.conf.py | preload_app = True
worker_class = "gunicorn.workers.gthread.ThreadWorker"
| forwarded_allow_ips = '*'
preload_app = True
worker_class = "gunicorn.workers.gthread.ThreadWorker"
| Disable checking of Front-end IPs | Disable checking of Front-end IPs
| Python | agpl-3.0 | City-of-Helsinki/kuulemma,fastmonkeys/kuulemma,City-of-Helsinki/kuulemma,fastmonkeys/kuulemma,City-of-Helsinki/kuulemma,fastmonkeys/kuulemma | preload_app = True
worker_class = "gunicorn.workers.gthread.ThreadWorker"
Disable checking of Front-end IPs | forwarded_allow_ips = '*'
preload_app = True
worker_class = "gunicorn.workers.gthread.ThreadWorker"
| <commit_before>preload_app = True
worker_class = "gunicorn.workers.gthread.ThreadWorker"
<commit_msg>Disable checking of Front-end IPs<commit_after> | forwarded_allow_ips = '*'
preload_app = True
worker_class = "gunicorn.workers.gthread.ThreadWorker"
| preload_app = True
worker_class = "gunicorn.workers.gthread.ThreadWorker"
Disable checking of Front-end IPsforwarded_allow_ips = '*'
preload_app = True
worker_class = "gunicorn.workers.gthread.ThreadWorker"
| <commit_before>preload_app = True
worker_class = "gunicorn.workers.gthread.ThreadWorker"
<commit_msg>Disable checking of Front-end IPs<commit_after>forwarded_allow_ips = '*'
preload_app = True
worker_class = "gunicorn.workers.gthread.ThreadWorker"
|
37c1d6ae1345fbab7aea4404933d78d4b939bbc2 | hoomd/filters.py | hoomd/filters.py | import hoomd._hoomd as _hoomd
class ParticleFilterID:
def __init__(self, *args, **kwargs):
args_str = ''.join([str(arg) for arg in args])
kwargs_str = ''.join([str(value)for value in kwargs.values()])
self.args_str = args_str
self.kwargs_str = kwargs_str
_id = hash(self.__... | import hoomd._hoomd as _hoomd
import numpy as np
class ParticleFilter:
def __init__(self, *args, **kwargs):
args_str = ''.join([repr(arg) if not isinstance(arg, np.ndarray)
else repr(list(arg)) for arg in args])
kwargs_str = ''.join([repr(value) if not isinstance(value... | Change hashing for ParticleFilter python class | Change hashing for ParticleFilter python class
| Python | bsd-3-clause | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | import hoomd._hoomd as _hoomd
class ParticleFilterID:
def __init__(self, *args, **kwargs):
args_str = ''.join([str(arg) for arg in args])
kwargs_str = ''.join([str(value)for value in kwargs.values()])
self.args_str = args_str
self.kwargs_str = kwargs_str
_id = hash(self.__... | import hoomd._hoomd as _hoomd
import numpy as np
class ParticleFilter:
def __init__(self, *args, **kwargs):
args_str = ''.join([repr(arg) if not isinstance(arg, np.ndarray)
else repr(list(arg)) for arg in args])
kwargs_str = ''.join([repr(value) if not isinstance(value... | <commit_before>import hoomd._hoomd as _hoomd
class ParticleFilterID:
def __init__(self, *args, **kwargs):
args_str = ''.join([str(arg) for arg in args])
kwargs_str = ''.join([str(value)for value in kwargs.values()])
self.args_str = args_str
self.kwargs_str = kwargs_str
_id... | import hoomd._hoomd as _hoomd
import numpy as np
class ParticleFilter:
def __init__(self, *args, **kwargs):
args_str = ''.join([repr(arg) if not isinstance(arg, np.ndarray)
else repr(list(arg)) for arg in args])
kwargs_str = ''.join([repr(value) if not isinstance(value... | import hoomd._hoomd as _hoomd
class ParticleFilterID:
def __init__(self, *args, **kwargs):
args_str = ''.join([str(arg) for arg in args])
kwargs_str = ''.join([str(value)for value in kwargs.values()])
self.args_str = args_str
self.kwargs_str = kwargs_str
_id = hash(self.__... | <commit_before>import hoomd._hoomd as _hoomd
class ParticleFilterID:
def __init__(self, *args, **kwargs):
args_str = ''.join([str(arg) for arg in args])
kwargs_str = ''.join([str(value)for value in kwargs.values()])
self.args_str = args_str
self.kwargs_str = kwargs_str
_id... |
f5e36391c253a52fe2bd434caf59c0f5c389cc64 | tests/base.py | tests/base.py | import unittest
import os
os.environ['OGN_CONFIG_MODULE'] = 'config/test.py'
from ogn_python import db # noqa: E402
class TestBaseDB(unittest.TestCase):
@classmethod
def setUpClass(cls):
db.session.execute('CREATE EXTENSION IF NOT EXISTS postgis;')
db.session.commit()
db.create_all... | import unittest
import os
os.environ['OGN_CONFIG_MODULE'] = 'config/test.py'
from ogn_python import db # noqa: E402
class TestBaseDB(unittest.TestCase):
@classmethod
def setUpClass(cls):
db.drop_all()
db.session.execute('CREATE EXTENSION IF NOT EXISTS postgis;')
db.session.commit()... | Drop db before each test | Drop db before each test
| Python | agpl-3.0 | Meisterschueler/ogn-python,glidernet/ogn-python,glidernet/ogn-python,Meisterschueler/ogn-python,glidernet/ogn-python,glidernet/ogn-python,Meisterschueler/ogn-python,Meisterschueler/ogn-python | import unittest
import os
os.environ['OGN_CONFIG_MODULE'] = 'config/test.py'
from ogn_python import db # noqa: E402
class TestBaseDB(unittest.TestCase):
@classmethod
def setUpClass(cls):
db.session.execute('CREATE EXTENSION IF NOT EXISTS postgis;')
db.session.commit()
db.create_all... | import unittest
import os
os.environ['OGN_CONFIG_MODULE'] = 'config/test.py'
from ogn_python import db # noqa: E402
class TestBaseDB(unittest.TestCase):
@classmethod
def setUpClass(cls):
db.drop_all()
db.session.execute('CREATE EXTENSION IF NOT EXISTS postgis;')
db.session.commit()... | <commit_before>import unittest
import os
os.environ['OGN_CONFIG_MODULE'] = 'config/test.py'
from ogn_python import db # noqa: E402
class TestBaseDB(unittest.TestCase):
@classmethod
def setUpClass(cls):
db.session.execute('CREATE EXTENSION IF NOT EXISTS postgis;')
db.session.commit()
... | import unittest
import os
os.environ['OGN_CONFIG_MODULE'] = 'config/test.py'
from ogn_python import db # noqa: E402
class TestBaseDB(unittest.TestCase):
@classmethod
def setUpClass(cls):
db.drop_all()
db.session.execute('CREATE EXTENSION IF NOT EXISTS postgis;')
db.session.commit()... | import unittest
import os
os.environ['OGN_CONFIG_MODULE'] = 'config/test.py'
from ogn_python import db # noqa: E402
class TestBaseDB(unittest.TestCase):
@classmethod
def setUpClass(cls):
db.session.execute('CREATE EXTENSION IF NOT EXISTS postgis;')
db.session.commit()
db.create_all... | <commit_before>import unittest
import os
os.environ['OGN_CONFIG_MODULE'] = 'config/test.py'
from ogn_python import db # noqa: E402
class TestBaseDB(unittest.TestCase):
@classmethod
def setUpClass(cls):
db.session.execute('CREATE EXTENSION IF NOT EXISTS postgis;')
db.session.commit()
... |
f1008dc6573661c41361cfe5f3c61a3ee719d6be | marketpulse/auth/models.py | marketpulse/auth/models.py | from django.contrib.auth.models import AbstractUser
from django.db.models import fields
class User(AbstractUser):
mozillians_url = fields.URLField()
mozillians_username = fields.CharField(max_length=30, blank=True)
| from django.contrib.auth.models import AbstractUser
from django.db.models import fields
class User(AbstractUser):
mozillians_url = fields.URLField()
mozillians_username = fields.CharField(max_length=30, blank=True)
def __unicode__(self):
username = self.mozillians_username or self.username
... | Use mozillians_username for unicode representation. | Use mozillians_username for unicode representation.
| Python | mpl-2.0 | akatsoulas/marketpulse,mozilla/marketpulse,mozilla/marketpulse,akatsoulas/marketpulse,mozilla/marketpulse,mozilla/marketpulse,akatsoulas/marketpulse,akatsoulas/marketpulse | from django.contrib.auth.models import AbstractUser
from django.db.models import fields
class User(AbstractUser):
mozillians_url = fields.URLField()
mozillians_username = fields.CharField(max_length=30, blank=True)
Use mozillians_username for unicode representation. | from django.contrib.auth.models import AbstractUser
from django.db.models import fields
class User(AbstractUser):
mozillians_url = fields.URLField()
mozillians_username = fields.CharField(max_length=30, blank=True)
def __unicode__(self):
username = self.mozillians_username or self.username
... | <commit_before>from django.contrib.auth.models import AbstractUser
from django.db.models import fields
class User(AbstractUser):
mozillians_url = fields.URLField()
mozillians_username = fields.CharField(max_length=30, blank=True)
<commit_msg>Use mozillians_username for unicode representation.<commit_after> | from django.contrib.auth.models import AbstractUser
from django.db.models import fields
class User(AbstractUser):
mozillians_url = fields.URLField()
mozillians_username = fields.CharField(max_length=30, blank=True)
def __unicode__(self):
username = self.mozillians_username or self.username
... | from django.contrib.auth.models import AbstractUser
from django.db.models import fields
class User(AbstractUser):
mozillians_url = fields.URLField()
mozillians_username = fields.CharField(max_length=30, blank=True)
Use mozillians_username for unicode representation.from django.contrib.auth.models import Abstr... | <commit_before>from django.contrib.auth.models import AbstractUser
from django.db.models import fields
class User(AbstractUser):
mozillians_url = fields.URLField()
mozillians_username = fields.CharField(max_length=30, blank=True)
<commit_msg>Use mozillians_username for unicode representation.<commit_after>fro... |
50305f63fda1127530650e030f23e92e8a725b8a | cgi-bin/user_register.py | cgi-bin/user_register.py | #!/usr/bin/python
from MySQLdb import Error
from util import connect_db, dump_response_and_exit
import cgi
import hashlib
import json
import re
import sys
print "Content-type:applicaion/json\r\n\r\n"
form = cgi.FieldStorage()
username = form.getvalue('username')
password = form.getvalue('password')
if username is N... | #!/usr/bin/python
from MySQLdb import Error
from util import connect_db, dump_response_and_exit
import cgi
import hashlib
import json
import re
import sys
print "Content-type:applicaion/json\r\n\r\n"
form = cgi.FieldStorage()
username = form.getvalue('username')
password = form.getvalue('password')
if username is N... | Fix bug when inserting user. | Fix bug when inserting user.
Scheme of table: User has changed.
| Python | mit | zhchbin/Yagra,zhchbin/Yagra,zhchbin/Yagra | #!/usr/bin/python
from MySQLdb import Error
from util import connect_db, dump_response_and_exit
import cgi
import hashlib
import json
import re
import sys
print "Content-type:applicaion/json\r\n\r\n"
form = cgi.FieldStorage()
username = form.getvalue('username')
password = form.getvalue('password')
if username is N... | #!/usr/bin/python
from MySQLdb import Error
from util import connect_db, dump_response_and_exit
import cgi
import hashlib
import json
import re
import sys
print "Content-type:applicaion/json\r\n\r\n"
form = cgi.FieldStorage()
username = form.getvalue('username')
password = form.getvalue('password')
if username is N... | <commit_before>#!/usr/bin/python
from MySQLdb import Error
from util import connect_db, dump_response_and_exit
import cgi
import hashlib
import json
import re
import sys
print "Content-type:applicaion/json\r\n\r\n"
form = cgi.FieldStorage()
username = form.getvalue('username')
password = form.getvalue('password')
i... | #!/usr/bin/python
from MySQLdb import Error
from util import connect_db, dump_response_and_exit
import cgi
import hashlib
import json
import re
import sys
print "Content-type:applicaion/json\r\n\r\n"
form = cgi.FieldStorage()
username = form.getvalue('username')
password = form.getvalue('password')
if username is N... | #!/usr/bin/python
from MySQLdb import Error
from util import connect_db, dump_response_and_exit
import cgi
import hashlib
import json
import re
import sys
print "Content-type:applicaion/json\r\n\r\n"
form = cgi.FieldStorage()
username = form.getvalue('username')
password = form.getvalue('password')
if username is N... | <commit_before>#!/usr/bin/python
from MySQLdb import Error
from util import connect_db, dump_response_and_exit
import cgi
import hashlib
import json
import re
import sys
print "Content-type:applicaion/json\r\n\r\n"
form = cgi.FieldStorage()
username = form.getvalue('username')
password = form.getvalue('password')
i... |
46245254cdf9c3f2f6a9c27fe7e089867b4f394f | cloudbio/custom/versioncheck.py | cloudbio/custom/versioncheck.py | """Tool specific version checking to identify out of date dependencies.
This provides infrastructure to check version strings against installed
tools, enabling re-installation if a version doesn't match. This is a
lightweight way to avoid out of date dependencies.
"""
from distutils.version import LooseVersion
from f... | """Tool specific version checking to identify out of date dependencies.
This provides infrastructure to check version strings against installed
tools, enabling re-installation if a version doesn't match. This is a
lightweight way to avoid out of date dependencies.
"""
from distutils.version import LooseVersion
from f... | Include env.system_install PATH as part of version checking to work with installed software not on the global PATH. Thanks to James Cuff | Include env.system_install PATH as part of version checking to work with installed software not on the global PATH. Thanks to James Cuff
| Python | mit | chapmanb/cloudbiolinux,elkingtonmcb/cloudbiolinux,kdaily/cloudbiolinux,elkingtonmcb/cloudbiolinux,kdaily/cloudbiolinux,averagehat/cloudbiolinux,kdaily/cloudbiolinux,chapmanb/cloudbiolinux,joemphilips/cloudbiolinux,AICIDNN/cloudbiolinux,joemphilips/cloudbiolinux,pjotrp/cloudbiolinux,pjotrp/cloudbiolinux,elkingtonmcb/clo... | """Tool specific version checking to identify out of date dependencies.
This provides infrastructure to check version strings against installed
tools, enabling re-installation if a version doesn't match. This is a
lightweight way to avoid out of date dependencies.
"""
from distutils.version import LooseVersion
from f... | """Tool specific version checking to identify out of date dependencies.
This provides infrastructure to check version strings against installed
tools, enabling re-installation if a version doesn't match. This is a
lightweight way to avoid out of date dependencies.
"""
from distutils.version import LooseVersion
from f... | <commit_before>"""Tool specific version checking to identify out of date dependencies.
This provides infrastructure to check version strings against installed
tools, enabling re-installation if a version doesn't match. This is a
lightweight way to avoid out of date dependencies.
"""
from distutils.version import Loose... | """Tool specific version checking to identify out of date dependencies.
This provides infrastructure to check version strings against installed
tools, enabling re-installation if a version doesn't match. This is a
lightweight way to avoid out of date dependencies.
"""
from distutils.version import LooseVersion
from f... | """Tool specific version checking to identify out of date dependencies.
This provides infrastructure to check version strings against installed
tools, enabling re-installation if a version doesn't match. This is a
lightweight way to avoid out of date dependencies.
"""
from distutils.version import LooseVersion
from f... | <commit_before>"""Tool specific version checking to identify out of date dependencies.
This provides infrastructure to check version strings against installed
tools, enabling re-installation if a version doesn't match. This is a
lightweight way to avoid out of date dependencies.
"""
from distutils.version import Loose... |
e728d6ebdd101b393f3d87fdfbade2c4c52c5ef1 | cdent/emitter/perl.py | cdent/emitter/perl.py | """\
Perl code emitter for C'Dent
"""
from __future__ import absolute_import
from cdent.emitter import Emitter as Base
class Emitter(Base):
LANGUAGE_ID = 'pm'
def emit_includecdent(self, includecdent):
self.writeln('use CDent::Run;')
def emit_class(self, class_):
name = class_.name
... | """\
Perl code emitter for C'Dent
"""
from __future__ import absolute_import
from cdent.emitter import Emitter as Base
class Emitter(Base):
LANGUAGE_ID = 'pm'
def emit_includecdent(self, includecdent):
self.writeln('use CDent::Run;')
def emit_class(self, class_):
name = class_.name
... | Use Moose for Perl 5 | Use Moose for Perl 5
| Python | bsd-2-clause | ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py | """\
Perl code emitter for C'Dent
"""
from __future__ import absolute_import
from cdent.emitter import Emitter as Base
class Emitter(Base):
LANGUAGE_ID = 'pm'
def emit_includecdent(self, includecdent):
self.writeln('use CDent::Run;')
def emit_class(self, class_):
name = class_.name
... | """\
Perl code emitter for C'Dent
"""
from __future__ import absolute_import
from cdent.emitter import Emitter as Base
class Emitter(Base):
LANGUAGE_ID = 'pm'
def emit_includecdent(self, includecdent):
self.writeln('use CDent::Run;')
def emit_class(self, class_):
name = class_.name
... | <commit_before>"""\
Perl code emitter for C'Dent
"""
from __future__ import absolute_import
from cdent.emitter import Emitter as Base
class Emitter(Base):
LANGUAGE_ID = 'pm'
def emit_includecdent(self, includecdent):
self.writeln('use CDent::Run;')
def emit_class(self, class_):
name =... | """\
Perl code emitter for C'Dent
"""
from __future__ import absolute_import
from cdent.emitter import Emitter as Base
class Emitter(Base):
LANGUAGE_ID = 'pm'
def emit_includecdent(self, includecdent):
self.writeln('use CDent::Run;')
def emit_class(self, class_):
name = class_.name
... | """\
Perl code emitter for C'Dent
"""
from __future__ import absolute_import
from cdent.emitter import Emitter as Base
class Emitter(Base):
LANGUAGE_ID = 'pm'
def emit_includecdent(self, includecdent):
self.writeln('use CDent::Run;')
def emit_class(self, class_):
name = class_.name
... | <commit_before>"""\
Perl code emitter for C'Dent
"""
from __future__ import absolute_import
from cdent.emitter import Emitter as Base
class Emitter(Base):
LANGUAGE_ID = 'pm'
def emit_includecdent(self, includecdent):
self.writeln('use CDent::Run;')
def emit_class(self, class_):
name =... |
2250367b35ccd4074ab758b233df95a5a811475c | chainerx/math/misc.py | chainerx/math/misc.py | import chainerx
# TODO(sonots): Implement in C++
def clip(a, a_min, a_max):
"""Clips the values of an array to a given interval.
Given an interval, values outside the interval are clipped to the
interval edges. For example, if an interval of ``[0, 1]`` is specified,
values smaller than 0 become 0, an... | import chainerx
# TODO(sonots): Implement in C++
def clip(a, a_min, a_max):
"""Clips the values of an array to a given interval.
Given an interval, values outside the interval are clipped to the
interval edges. For example, if an interval of ``[0, 1]`` is specified,
values smaller than 0 become 0, an... | Support None arguments in chainerx.clip and chainerx.ndarray.clip | Support None arguments in chainerx.clip and chainerx.ndarray.clip
| Python | mit | okuta/chainer,wkentaro/chainer,okuta/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,wkentaro/chainer,pfnet/chainer,chainer/chainer,wkentaro/chainer,keisuke-umezawa/chainer,hvy/chainer,keisuke-umezawa/chainer,chainer/chainer,chainer/chainer,okuta/chainer,niboshi/chainer,niboshi/chainer,niboshi/chainer,wkentaro/... | import chainerx
# TODO(sonots): Implement in C++
def clip(a, a_min, a_max):
"""Clips the values of an array to a given interval.
Given an interval, values outside the interval are clipped to the
interval edges. For example, if an interval of ``[0, 1]`` is specified,
values smaller than 0 become 0, an... | import chainerx
# TODO(sonots): Implement in C++
def clip(a, a_min, a_max):
"""Clips the values of an array to a given interval.
Given an interval, values outside the interval are clipped to the
interval edges. For example, if an interval of ``[0, 1]`` is specified,
values smaller than 0 become 0, an... | <commit_before>import chainerx
# TODO(sonots): Implement in C++
def clip(a, a_min, a_max):
"""Clips the values of an array to a given interval.
Given an interval, values outside the interval are clipped to the
interval edges. For example, if an interval of ``[0, 1]`` is specified,
values smaller than... | import chainerx
# TODO(sonots): Implement in C++
def clip(a, a_min, a_max):
"""Clips the values of an array to a given interval.
Given an interval, values outside the interval are clipped to the
interval edges. For example, if an interval of ``[0, 1]`` is specified,
values smaller than 0 become 0, an... | import chainerx
# TODO(sonots): Implement in C++
def clip(a, a_min, a_max):
"""Clips the values of an array to a given interval.
Given an interval, values outside the interval are clipped to the
interval edges. For example, if an interval of ``[0, 1]`` is specified,
values smaller than 0 become 0, an... | <commit_before>import chainerx
# TODO(sonots): Implement in C++
def clip(a, a_min, a_max):
"""Clips the values of an array to a given interval.
Given an interval, values outside the interval are clipped to the
interval edges. For example, if an interval of ``[0, 1]`` is specified,
values smaller than... |
8e4fca866590b4f7aa308d2cc1948b999bb1de8c | filebrowser_safe/urls.py | filebrowser_safe/urls.py | from __future__ import unicode_literals
from django.conf.urls import *
urlpatterns = patterns('',
# filebrowser urls
url(r'^browse/$', 'filebrowser_safe.views.browse', name="fb_browse"),
url(r'^mkdir/', 'filebrowser_safe.views.mkdir', name="fb_mkdir"),
url(r'^upload/', 'filebrowser_safe.views.upload'... | from __future__ import unicode_literals
from django.conf.urls import url
from filebrowser_safe import views
urlpatterns = [
url(r'^browse/$', views.browse, name="fb_browse"),
url(r'^mkdir/', views.mkdir, name="fb_mkdir"),
url(r'^upload/', views.upload, name="fb_upload"),
url(r'^rename/$', views.rena... | Update from deprecated features of urlpatterns. | Update from deprecated features of urlpatterns.
| Python | bsd-3-clause | ryneeverett/filebrowser-safe,ryneeverett/filebrowser-safe,ryneeverett/filebrowser-safe,ryneeverett/filebrowser-safe | from __future__ import unicode_literals
from django.conf.urls import *
urlpatterns = patterns('',
# filebrowser urls
url(r'^browse/$', 'filebrowser_safe.views.browse', name="fb_browse"),
url(r'^mkdir/', 'filebrowser_safe.views.mkdir', name="fb_mkdir"),
url(r'^upload/', 'filebrowser_safe.views.upload'... | from __future__ import unicode_literals
from django.conf.urls import url
from filebrowser_safe import views
urlpatterns = [
url(r'^browse/$', views.browse, name="fb_browse"),
url(r'^mkdir/', views.mkdir, name="fb_mkdir"),
url(r'^upload/', views.upload, name="fb_upload"),
url(r'^rename/$', views.rena... | <commit_before>from __future__ import unicode_literals
from django.conf.urls import *
urlpatterns = patterns('',
# filebrowser urls
url(r'^browse/$', 'filebrowser_safe.views.browse', name="fb_browse"),
url(r'^mkdir/', 'filebrowser_safe.views.mkdir', name="fb_mkdir"),
url(r'^upload/', 'filebrowser_saf... | from __future__ import unicode_literals
from django.conf.urls import url
from filebrowser_safe import views
urlpatterns = [
url(r'^browse/$', views.browse, name="fb_browse"),
url(r'^mkdir/', views.mkdir, name="fb_mkdir"),
url(r'^upload/', views.upload, name="fb_upload"),
url(r'^rename/$', views.rena... | from __future__ import unicode_literals
from django.conf.urls import *
urlpatterns = patterns('',
# filebrowser urls
url(r'^browse/$', 'filebrowser_safe.views.browse', name="fb_browse"),
url(r'^mkdir/', 'filebrowser_safe.views.mkdir', name="fb_mkdir"),
url(r'^upload/', 'filebrowser_safe.views.upload'... | <commit_before>from __future__ import unicode_literals
from django.conf.urls import *
urlpatterns = patterns('',
# filebrowser urls
url(r'^browse/$', 'filebrowser_safe.views.browse', name="fb_browse"),
url(r'^mkdir/', 'filebrowser_safe.views.mkdir', name="fb_mkdir"),
url(r'^upload/', 'filebrowser_saf... |
852458c7ace8af548ca5da52f56cfddc1a0be2d8 | service/pixelated/config/logger.py | service/pixelated/config/logger.py | #
# Copyright (c) 2014 ThoughtWorks, Inc.
#
# Pixelated is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pixelated is distrib... | #
# Copyright (c) 2014 ThoughtWorks, Inc.
#
# Pixelated is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pixelated is distrib... | Use logging variable instead of hard coded string to set logging level. | Use logging variable instead of hard coded string to set logging level.
| Python | agpl-3.0 | sw00/pixelated-user-agent,rdoh/pixelated-user-agent,rdoh/pixelated-user-agent,pixelated-project/pixelated-user-agent,pixelated-project/pixelated-user-agent,PuZZleDucK/pixelated-user-agent,pixelated-project/pixelated-user-agent,sw00/pixelated-user-agent,pixelated-project/pixelated-user-agent,rdoh/pixelated-user-agent,pi... | #
# Copyright (c) 2014 ThoughtWorks, Inc.
#
# Pixelated is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pixelated is distrib... | #
# Copyright (c) 2014 ThoughtWorks, Inc.
#
# Pixelated is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pixelated is distrib... | <commit_before>#
# Copyright (c) 2014 ThoughtWorks, Inc.
#
# Pixelated is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pixel... | #
# Copyright (c) 2014 ThoughtWorks, Inc.
#
# Pixelated is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pixelated is distrib... | #
# Copyright (c) 2014 ThoughtWorks, Inc.
#
# Pixelated is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pixelated is distrib... | <commit_before>#
# Copyright (c) 2014 ThoughtWorks, Inc.
#
# Pixelated is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pixel... |
5a09b88399b34ea8a5185fe1bcdff5f3f7ac7619 | invoke_pytest.py | invoke_pytest.py | #!/usr/bin/env python3
"""
Unit tests at Windows environments required to invoke from py module,
because of multiprocessing:
https://py.rtfd.io/en/latest/faq.html?highlight=cmdline#issues-with-py-test-multiprocess-and-setuptools
"""
import sys
import py
if __name__ == "__main__":
sys.exit(py.test.cmdline.main(... | #!/usr/bin/env python3
"""
Unit tests at Windows environments required to invoke from py module,
because of multiprocessing:
https://py.rtfd.io/en/latest/faq.html?highlight=cmdline#issues-with-py-test-multiprocess-and-setuptools
"""
import os
import sys
import py
if __name__ == "__main__":
os.environ["PYTEST_M... | Add PYTEST_MD_REPORT_COLOR environment variable setting | Add PYTEST_MD_REPORT_COLOR environment variable setting
| Python | mit | thombashi/pingparsing,thombashi/pingparsing | #!/usr/bin/env python3
"""
Unit tests at Windows environments required to invoke from py module,
because of multiprocessing:
https://py.rtfd.io/en/latest/faq.html?highlight=cmdline#issues-with-py-test-multiprocess-and-setuptools
"""
import sys
import py
if __name__ == "__main__":
sys.exit(py.test.cmdline.main(... | #!/usr/bin/env python3
"""
Unit tests at Windows environments required to invoke from py module,
because of multiprocessing:
https://py.rtfd.io/en/latest/faq.html?highlight=cmdline#issues-with-py-test-multiprocess-and-setuptools
"""
import os
import sys
import py
if __name__ == "__main__":
os.environ["PYTEST_M... | <commit_before>#!/usr/bin/env python3
"""
Unit tests at Windows environments required to invoke from py module,
because of multiprocessing:
https://py.rtfd.io/en/latest/faq.html?highlight=cmdline#issues-with-py-test-multiprocess-and-setuptools
"""
import sys
import py
if __name__ == "__main__":
sys.exit(py.tes... | #!/usr/bin/env python3
"""
Unit tests at Windows environments required to invoke from py module,
because of multiprocessing:
https://py.rtfd.io/en/latest/faq.html?highlight=cmdline#issues-with-py-test-multiprocess-and-setuptools
"""
import os
import sys
import py
if __name__ == "__main__":
os.environ["PYTEST_M... | #!/usr/bin/env python3
"""
Unit tests at Windows environments required to invoke from py module,
because of multiprocessing:
https://py.rtfd.io/en/latest/faq.html?highlight=cmdline#issues-with-py-test-multiprocess-and-setuptools
"""
import sys
import py
if __name__ == "__main__":
sys.exit(py.test.cmdline.main(... | <commit_before>#!/usr/bin/env python3
"""
Unit tests at Windows environments required to invoke from py module,
because of multiprocessing:
https://py.rtfd.io/en/latest/faq.html?highlight=cmdline#issues-with-py-test-multiprocess-and-setuptools
"""
import sys
import py
if __name__ == "__main__":
sys.exit(py.tes... |
4a2d59375a94c3863431cbf62638c83c2cc70cfb | spec/openpassword/keychain_spec.py | spec/openpassword/keychain_spec.py | from nose.tools import *
from openpassword import EncryptionKey
from openpassword import Keychain
from openpassword.exceptions import InvalidPasswordException
import fudge
import time
class KeychainSpec:
def it_unlocks_the_keychain_with_the_right_password(self):
EncryptionKey = fudge.Fake('encryption_ke... | from nose.tools import *
from openpassword import EncryptionKey
from openpassword import Keychain
from openpassword.exceptions import InvalidPasswordException
import fudge
class KeychainSpec:
def it_unlocks_the_keychain_with_the_right_password(self):
EncryptionKey = fudge.Fake('encryption_key')
... | Remove leftover from deleted examples | Remove leftover from deleted examples
| Python | mit | openpassword/blimey,openpassword/blimey | from nose.tools import *
from openpassword import EncryptionKey
from openpassword import Keychain
from openpassword.exceptions import InvalidPasswordException
import fudge
import time
class KeychainSpec:
def it_unlocks_the_keychain_with_the_right_password(self):
EncryptionKey = fudge.Fake('encryption_ke... | from nose.tools import *
from openpassword import EncryptionKey
from openpassword import Keychain
from openpassword.exceptions import InvalidPasswordException
import fudge
class KeychainSpec:
def it_unlocks_the_keychain_with_the_right_password(self):
EncryptionKey = fudge.Fake('encryption_key')
... | <commit_before>from nose.tools import *
from openpassword import EncryptionKey
from openpassword import Keychain
from openpassword.exceptions import InvalidPasswordException
import fudge
import time
class KeychainSpec:
def it_unlocks_the_keychain_with_the_right_password(self):
EncryptionKey = fudge.Fake... | from nose.tools import *
from openpassword import EncryptionKey
from openpassword import Keychain
from openpassword.exceptions import InvalidPasswordException
import fudge
class KeychainSpec:
def it_unlocks_the_keychain_with_the_right_password(self):
EncryptionKey = fudge.Fake('encryption_key')
... | from nose.tools import *
from openpassword import EncryptionKey
from openpassword import Keychain
from openpassword.exceptions import InvalidPasswordException
import fudge
import time
class KeychainSpec:
def it_unlocks_the_keychain_with_the_right_password(self):
EncryptionKey = fudge.Fake('encryption_ke... | <commit_before>from nose.tools import *
from openpassword import EncryptionKey
from openpassword import Keychain
from openpassword.exceptions import InvalidPasswordException
import fudge
import time
class KeychainSpec:
def it_unlocks_the_keychain_with_the_right_password(self):
EncryptionKey = fudge.Fake... |
419e06b36c63e8c7fbfdd64dfb7ee5d5654ca3af | studentvoice/urls.py | studentvoice/urls.py | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from studentvoice import views
urlpatterns = patterns('',
url(r'^$', views.home, name='home'),
url(r'^create/$', views.create, name='create'),
url(r'^search/', views.search, name='search'),
url(r'^(?P<voice_id>\d+... | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from studentvoice import views
urlpatterns = patterns('',
url(r'^$', views.home, name='home'),
url(r'^about/$', views.about, name='about'),
url(r'^create/$', views.create, name='create'),
url(r'^search/', views.sea... | Add the about page to url.py | Add the about page to url.py
| Python | agpl-3.0 | osamak/student-portal,enjaz/enjaz,osamak/student-portal,osamak/student-portal,osamak/student-portal,enjaz/enjaz,osamak/student-portal,enjaz/enjaz,enjaz/enjaz,enjaz/enjaz | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from studentvoice import views
urlpatterns = patterns('',
url(r'^$', views.home, name='home'),
url(r'^create/$', views.create, name='create'),
url(r'^search/', views.search, name='search'),
url(r'^(?P<voice_id>\d+... | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from studentvoice import views
urlpatterns = patterns('',
url(r'^$', views.home, name='home'),
url(r'^about/$', views.about, name='about'),
url(r'^create/$', views.create, name='create'),
url(r'^search/', views.sea... | <commit_before>from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from studentvoice import views
urlpatterns = patterns('',
url(r'^$', views.home, name='home'),
url(r'^create/$', views.create, name='create'),
url(r'^search/', views.search, name='search'),
url(r'^(... | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from studentvoice import views
urlpatterns = patterns('',
url(r'^$', views.home, name='home'),
url(r'^about/$', views.about, name='about'),
url(r'^create/$', views.create, name='create'),
url(r'^search/', views.sea... | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from studentvoice import views
urlpatterns = patterns('',
url(r'^$', views.home, name='home'),
url(r'^create/$', views.create, name='create'),
url(r'^search/', views.search, name='search'),
url(r'^(?P<voice_id>\d+... | <commit_before>from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from studentvoice import views
urlpatterns = patterns('',
url(r'^$', views.home, name='home'),
url(r'^create/$', views.create, name='create'),
url(r'^search/', views.search, name='search'),
url(r'^(... |
1b160078c06f65252aa4831ad3b1762684d01acd | templatetags/urls.py | templatetags/urls.py | from django.urls import path
from . import views
app_name = "utilities"
urlpatterns = [
path('md_preview/', views.MarkdownPreview.as_view(), name='preview'),
path('md_preview_safe/', views.MarkdownPreviewSafe.as_view(), name='preview_safe'),
path('md_preview_newsletter/', views.MarkdownPreviewNewsletter.... | from django.urls import path
from . import views
app_name = "utilities"
urlpatterns = [
path('md_preview/', views.MarkdownPreview.as_view(), name='preview'),
path('md_preview_safe/', views.MarkdownPreviewSafe.as_view(), name='preview_safe'),
path('md_preview_newsletter/', views.MarkdownPreviewNewsletter.... | Fix preview still being slightly different. | Fix preview still being slightly different.
| Python | isc | ashbc/tgrsite,ashbc/tgrsite,ashbc/tgrsite | from django.urls import path
from . import views
app_name = "utilities"
urlpatterns = [
path('md_preview/', views.MarkdownPreview.as_view(), name='preview'),
path('md_preview_safe/', views.MarkdownPreviewSafe.as_view(), name='preview_safe'),
path('md_preview_newsletter/', views.MarkdownPreviewNewsletter.... | from django.urls import path
from . import views
app_name = "utilities"
urlpatterns = [
path('md_preview/', views.MarkdownPreview.as_view(), name='preview'),
path('md_preview_safe/', views.MarkdownPreviewSafe.as_view(), name='preview_safe'),
path('md_preview_newsletter/', views.MarkdownPreviewNewsletter.... | <commit_before>from django.urls import path
from . import views
app_name = "utilities"
urlpatterns = [
path('md_preview/', views.MarkdownPreview.as_view(), name='preview'),
path('md_preview_safe/', views.MarkdownPreviewSafe.as_view(), name='preview_safe'),
path('md_preview_newsletter/', views.MarkdownPre... | from django.urls import path
from . import views
app_name = "utilities"
urlpatterns = [
path('md_preview/', views.MarkdownPreview.as_view(), name='preview'),
path('md_preview_safe/', views.MarkdownPreviewSafe.as_view(), name='preview_safe'),
path('md_preview_newsletter/', views.MarkdownPreviewNewsletter.... | from django.urls import path
from . import views
app_name = "utilities"
urlpatterns = [
path('md_preview/', views.MarkdownPreview.as_view(), name='preview'),
path('md_preview_safe/', views.MarkdownPreviewSafe.as_view(), name='preview_safe'),
path('md_preview_newsletter/', views.MarkdownPreviewNewsletter.... | <commit_before>from django.urls import path
from . import views
app_name = "utilities"
urlpatterns = [
path('md_preview/', views.MarkdownPreview.as_view(), name='preview'),
path('md_preview_safe/', views.MarkdownPreviewSafe.as_view(), name='preview_safe'),
path('md_preview_newsletter/', views.MarkdownPre... |
e8311fef6dd6905e3cf49f82a5d80ed7ee621ddd | conda_build/config.py | conda_build/config.py | from __future__ import print_function, division, absolute_import
import os
import sys
from os.path import abspath, expanduser, join
import conda.config as cc
CONDA_PY = int(os.getenv('CONDA_PY', cc.default_python.replace('.', '')))
CONDA_NPY = int(os.getenv('CONDA_NPY', 17))
PY3K = int(bool(CONDA_PY >= 30))
if cc.... | from __future__ import print_function, division, absolute_import
import os
import sys
from os.path import abspath, expanduser, join
import conda.config as cc
CONDA_PY = int(os.getenv('CONDA_PY', cc.default_python.replace('.', '')))
CONDA_NPY = int(os.getenv('CONDA_NPY', 18))
PY3K = int(bool(CONDA_PY >= 30))
if cc.... | Update default CONDA_NPY to 18 | Update default CONDA_NPY to 18
| Python | bsd-3-clause | mwcraig/conda-build,dan-blanchard/conda-build,shastings517/conda-build,mwcraig/conda-build,frol/conda-build,takluyver/conda-build,sandhujasmine/conda-build,frol/conda-build,takluyver/conda-build,frol/conda-build,takluyver/conda-build,ilastik/conda-build,shastings517/conda-build,sandhujasmine/conda-build,rmcgibbo/conda-... | from __future__ import print_function, division, absolute_import
import os
import sys
from os.path import abspath, expanduser, join
import conda.config as cc
CONDA_PY = int(os.getenv('CONDA_PY', cc.default_python.replace('.', '')))
CONDA_NPY = int(os.getenv('CONDA_NPY', 17))
PY3K = int(bool(CONDA_PY >= 30))
if cc.... | from __future__ import print_function, division, absolute_import
import os
import sys
from os.path import abspath, expanduser, join
import conda.config as cc
CONDA_PY = int(os.getenv('CONDA_PY', cc.default_python.replace('.', '')))
CONDA_NPY = int(os.getenv('CONDA_NPY', 18))
PY3K = int(bool(CONDA_PY >= 30))
if cc.... | <commit_before>from __future__ import print_function, division, absolute_import
import os
import sys
from os.path import abspath, expanduser, join
import conda.config as cc
CONDA_PY = int(os.getenv('CONDA_PY', cc.default_python.replace('.', '')))
CONDA_NPY = int(os.getenv('CONDA_NPY', 17))
PY3K = int(bool(CONDA_PY ... | from __future__ import print_function, division, absolute_import
import os
import sys
from os.path import abspath, expanduser, join
import conda.config as cc
CONDA_PY = int(os.getenv('CONDA_PY', cc.default_python.replace('.', '')))
CONDA_NPY = int(os.getenv('CONDA_NPY', 18))
PY3K = int(bool(CONDA_PY >= 30))
if cc.... | from __future__ import print_function, division, absolute_import
import os
import sys
from os.path import abspath, expanduser, join
import conda.config as cc
CONDA_PY = int(os.getenv('CONDA_PY', cc.default_python.replace('.', '')))
CONDA_NPY = int(os.getenv('CONDA_NPY', 17))
PY3K = int(bool(CONDA_PY >= 30))
if cc.... | <commit_before>from __future__ import print_function, division, absolute_import
import os
import sys
from os.path import abspath, expanduser, join
import conda.config as cc
CONDA_PY = int(os.getenv('CONDA_PY', cc.default_python.replace('.', '')))
CONDA_NPY = int(os.getenv('CONDA_NPY', 17))
PY3K = int(bool(CONDA_PY ... |
fe41aabf073ce3a02b5af117120d62ffc0324655 | linked-list/linked-list.py | linked-list/linked-list.py | # LINKED LIST
# define constructor
class Node(object):
def __init__(self, data):
self.data = data
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def add(self, new_node):
current_node = self.head
if self.head:
while current_node.next:
current_node = curr... | # LINKED LIST
# define constructor
class Node(object):
def __init__(self, data):
self.data = data
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def add(self, new_node):
current_node = self.head
if self.head:
while current_node.next:
current_node = curr... | Add search method for python linked list implementation | Add search method for python linked list implementation
| Python | mit | derekmpham/interview-prep,derekmpham/interview-prep | # LINKED LIST
# define constructor
class Node(object):
def __init__(self, data):
self.data = data
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def add(self, new_node):
current_node = self.head
if self.head:
while current_node.next:
current_node = curr... | # LINKED LIST
# define constructor
class Node(object):
def __init__(self, data):
self.data = data
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def add(self, new_node):
current_node = self.head
if self.head:
while current_node.next:
current_node = curr... | <commit_before># LINKED LIST
# define constructor
class Node(object):
def __init__(self, data):
self.data = data
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def add(self, new_node):
current_node = self.head
if self.head:
while current_node.next:
curr... | # LINKED LIST
# define constructor
class Node(object):
def __init__(self, data):
self.data = data
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def add(self, new_node):
current_node = self.head
if self.head:
while current_node.next:
current_node = curr... | # LINKED LIST
# define constructor
class Node(object):
def __init__(self, data):
self.data = data
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def add(self, new_node):
current_node = self.head
if self.head:
while current_node.next:
current_node = curr... | <commit_before># LINKED LIST
# define constructor
class Node(object):
def __init__(self, data):
self.data = data
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def add(self, new_node):
current_node = self.head
if self.head:
while current_node.next:
curr... |
2f4ace9d1d1489cac1a8ace8b431eec376a02060 | corehq/apps/couch_sql_migration/management/commands/show_started_migrations.py | corehq/apps/couch_sql_migration/management/commands/show_started_migrations.py | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from operator import attrgetter
from django.core.management.base import BaseCommand
import six
from corehq.apps.domain_migration_flags.api import get_uncompleted_migrations
from ...progress import C... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from operator import attrgetter
from django.core.management.base import BaseCommand
import six
from corehq.apps.domain_migration_flags.api import get_uncompleted_migrations
from ...progress import C... | Handle error in get diff stats | Handle error in get diff stats
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from operator import attrgetter
from django.core.management.base import BaseCommand
import six
from corehq.apps.domain_migration_flags.api import get_uncompleted_migrations
from ...progress import C... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from operator import attrgetter
from django.core.management.base import BaseCommand
import six
from corehq.apps.domain_migration_flags.api import get_uncompleted_migrations
from ...progress import C... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from operator import attrgetter
from django.core.management.base import BaseCommand
import six
from corehq.apps.domain_migration_flags.api import get_uncompleted_migrations
from ...pr... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from operator import attrgetter
from django.core.management.base import BaseCommand
import six
from corehq.apps.domain_migration_flags.api import get_uncompleted_migrations
from ...progress import C... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from operator import attrgetter
from django.core.management.base import BaseCommand
import six
from corehq.apps.domain_migration_flags.api import get_uncompleted_migrations
from ...progress import C... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from operator import attrgetter
from django.core.management.base import BaseCommand
import six
from corehq.apps.domain_migration_flags.api import get_uncompleted_migrations
from ...pr... |
a88d8f6de5e7135b9fdc2ad75a386579bebde07f | lcad_to_ldraw.py | lcad_to_ldraw.py | #!/usr/bin/env python
"""
.. module:: lcad_to_ldraw
:synopsis: Generates a ldraw format file from a lcad model.
.. moduleauthor:: Hazen Babcock
"""
import os
import sys
import lcad_language.interpreter as interpreter
if (len(sys.argv)<2):
print "usage: <lcad file> <ldraw file (optional)>"
exit()
# Gener... | #!/usr/bin/env python
"""
.. module:: lcad_to_ldraw
:synopsis: Generates a ldraw format file from a lcad model.
.. moduleauthor:: Hazen Babcock
"""
import os
import sys
import lcad_language.interpreter as interpreter
if (len(sys.argv)<2):
print "usage: <lcad file> <ldraw file (optional)>"
exit()
# Gener... | Fix to work correctly if we are already in the directory of the lcad file. | Fix to work correctly if we are already in the directory of the lcad file.
| Python | mit | HazenBabcock/opensdraw | #!/usr/bin/env python
"""
.. module:: lcad_to_ldraw
:synopsis: Generates a ldraw format file from a lcad model.
.. moduleauthor:: Hazen Babcock
"""
import os
import sys
import lcad_language.interpreter as interpreter
if (len(sys.argv)<2):
print "usage: <lcad file> <ldraw file (optional)>"
exit()
# Gener... | #!/usr/bin/env python
"""
.. module:: lcad_to_ldraw
:synopsis: Generates a ldraw format file from a lcad model.
.. moduleauthor:: Hazen Babcock
"""
import os
import sys
import lcad_language.interpreter as interpreter
if (len(sys.argv)<2):
print "usage: <lcad file> <ldraw file (optional)>"
exit()
# Gener... | <commit_before>#!/usr/bin/env python
"""
.. module:: lcad_to_ldraw
:synopsis: Generates a ldraw format file from a lcad model.
.. moduleauthor:: Hazen Babcock
"""
import os
import sys
import lcad_language.interpreter as interpreter
if (len(sys.argv)<2):
print "usage: <lcad file> <ldraw file (optional)>"
... | #!/usr/bin/env python
"""
.. module:: lcad_to_ldraw
:synopsis: Generates a ldraw format file from a lcad model.
.. moduleauthor:: Hazen Babcock
"""
import os
import sys
import lcad_language.interpreter as interpreter
if (len(sys.argv)<2):
print "usage: <lcad file> <ldraw file (optional)>"
exit()
# Gener... | #!/usr/bin/env python
"""
.. module:: lcad_to_ldraw
:synopsis: Generates a ldraw format file from a lcad model.
.. moduleauthor:: Hazen Babcock
"""
import os
import sys
import lcad_language.interpreter as interpreter
if (len(sys.argv)<2):
print "usage: <lcad file> <ldraw file (optional)>"
exit()
# Gener... | <commit_before>#!/usr/bin/env python
"""
.. module:: lcad_to_ldraw
:synopsis: Generates a ldraw format file from a lcad model.
.. moduleauthor:: Hazen Babcock
"""
import os
import sys
import lcad_language.interpreter as interpreter
if (len(sys.argv)<2):
print "usage: <lcad file> <ldraw file (optional)>"
... |
3a8d7ff5f047c7b3476b8dcffa0e6850e952a645 | docs/examples/http_proxy/set_http_proxy_method.py | docs/examples/http_proxy/set_http_proxy_method.py | from pprint import pprint
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
PROXY_URL = 'http://<proxy hostname>:<proxy port>'
cls = get_driver(Provider.RACKSPACE)
driver = cls('username', 'api key', region='ord')
driver.set_http_proxy(proxy_url=PROXY_URL)
pprint(driver.l... | from pprint import pprint
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
PROXY_URL = 'http://<proxy hostname>:<proxy port>'
cls = get_driver(Provider.RACKSPACE)
driver = cls('username', 'api key', region='ord')
driver.connection.set_http_proxy(proxy_url=PROXY_URL)
ppri... | Fix a typo in the example. | Fix a typo in the example.
| Python | apache-2.0 | kater169/libcloud,DimensionDataCBUSydney/libcloud,t-tran/libcloud,Scalr/libcloud,MrBasset/libcloud,watermelo/libcloud,curoverse/libcloud,Kami/libcloud,SecurityCompass/libcloud,Kami/libcloud,pantheon-systems/libcloud,andrewsomething/libcloud,schaubl/libcloud,pantheon-systems/libcloud,jimbobhickville/libcloud,munkiat/lib... | from pprint import pprint
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
PROXY_URL = 'http://<proxy hostname>:<proxy port>'
cls = get_driver(Provider.RACKSPACE)
driver = cls('username', 'api key', region='ord')
driver.set_http_proxy(proxy_url=PROXY_URL)
pprint(driver.l... | from pprint import pprint
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
PROXY_URL = 'http://<proxy hostname>:<proxy port>'
cls = get_driver(Provider.RACKSPACE)
driver = cls('username', 'api key', region='ord')
driver.connection.set_http_proxy(proxy_url=PROXY_URL)
ppri... | <commit_before>from pprint import pprint
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
PROXY_URL = 'http://<proxy hostname>:<proxy port>'
cls = get_driver(Provider.RACKSPACE)
driver = cls('username', 'api key', region='ord')
driver.set_http_proxy(proxy_url=PROXY_URL)
... | from pprint import pprint
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
PROXY_URL = 'http://<proxy hostname>:<proxy port>'
cls = get_driver(Provider.RACKSPACE)
driver = cls('username', 'api key', region='ord')
driver.connection.set_http_proxy(proxy_url=PROXY_URL)
ppri... | from pprint import pprint
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
PROXY_URL = 'http://<proxy hostname>:<proxy port>'
cls = get_driver(Provider.RACKSPACE)
driver = cls('username', 'api key', region='ord')
driver.set_http_proxy(proxy_url=PROXY_URL)
pprint(driver.l... | <commit_before>from pprint import pprint
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
PROXY_URL = 'http://<proxy hostname>:<proxy port>'
cls = get_driver(Provider.RACKSPACE)
driver = cls('username', 'api key', region='ord')
driver.set_http_proxy(proxy_url=PROXY_URL)
... |
ff21cb8c844e235d5d9b0c9e37578196e0f02768 | takePicture.py | takePicture.py | import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 50:
os.unlink('gregTest.jpg')
img = cam.capture('tempGregTest.jpg')
oc.rename('gregTempTest.jpg', 'gregTest.jpg')
time.sleep(.25)
x +=1
exit()
| import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 15:
os.unlink('gregTest.jpg')
img = cam.capture('tempGregTest.jpg')
oc.rename('gregTempTest.jpg', 'gregTest.jpg')
time.sleep(.25)
x +=1
exit()
| Reduce picture loop to 15 pictures | Reduce picture loop to 15 pictures
| Python | mit | jwarshaw/RaspberryDrive | import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 50:
os.unlink('gregTest.jpg')
img = cam.capture('tempGregTest.jpg')
oc.rename('gregTempTest.jpg', 'gregTest.jpg')
time.sleep(.25)
x +=1
exit()
... | import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 15:
os.unlink('gregTest.jpg')
img = cam.capture('tempGregTest.jpg')
oc.rename('gregTempTest.jpg', 'gregTest.jpg')
time.sleep(.25)
x +=1
exit()
| <commit_before>import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 50:
os.unlink('gregTest.jpg')
img = cam.capture('tempGregTest.jpg')
oc.rename('gregTempTest.jpg', 'gregTest.jpg')
time.sleep(.25)... | import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 15:
os.unlink('gregTest.jpg')
img = cam.capture('tempGregTest.jpg')
oc.rename('gregTempTest.jpg', 'gregTest.jpg')
time.sleep(.25)
x +=1
exit()
| import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 50:
os.unlink('gregTest.jpg')
img = cam.capture('tempGregTest.jpg')
oc.rename('gregTempTest.jpg', 'gregTest.jpg')
time.sleep(.25)
x +=1
exit()
... | <commit_before>import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 50:
os.unlink('gregTest.jpg')
img = cam.capture('tempGregTest.jpg')
oc.rename('gregTempTest.jpg', 'gregTest.jpg')
time.sleep(.25)... |
f7b471858e89fe07b78dd3853d4351dfa83cac49 | placidity/plugin_loader.py | placidity/plugin_loader.py | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
if not plugin_file:
continue
plugin_class = plugin_file.classes[plugin.name]
... | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
if not plugin_file:
continue
plugin_class = plugin_file.classes.get(plugin.name)
if n... | Make plugin loader more robust | Make plugin loader more robust
| Python | mit | bebraw/Placidity | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
if not plugin_file:
continue
plugin_class = plugin_file.classes[plugin.name]
... | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
if not plugin_file:
continue
plugin_class = plugin_file.classes.get(plugin.name)
if n... | <commit_before>class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
if not plugin_file:
continue
plugin_class = plugin_file.classes[plugin.... | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
if not plugin_file:
continue
plugin_class = plugin_file.classes.get(plugin.name)
if n... | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
if not plugin_file:
continue
plugin_class = plugin_file.classes[plugin.name]
... | <commit_before>class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
if not plugin_file:
continue
plugin_class = plugin_file.classes[plugin.... |
fd0c556baa12de2fc22f3f4829d683556ca363a7 | manager/trackmon_manager.py | manager/trackmon_manager.py | import sys
def main():
if "-install" in sys.argv:
print("Installing everything")
elif "-installapi" in sys.argv:
print("Installing API backend only")
elif "-installdb" in sys.argv:
print("Installing database only")
elif "-installfrontend" in sys.argv:
print("Installing f... | import sys
import os
from subprocess import call
import urllib.request
import json
#from pprint import pprint
# User needs to install postgres first
trackmon_server_api_info = "https://api.github.com/repos/paulkramme/roverpi/releases/latest"
def download(url, path):
with urllib.request.urlopen(url) as response, o... | Add many todos and basic version download | Add many todos and basic version download
| Python | bsd-2-clause | trackmon/trackmon-server,trackmon/trackmon-server | import sys
def main():
if "-install" in sys.argv:
print("Installing everything")
elif "-installapi" in sys.argv:
print("Installing API backend only")
elif "-installdb" in sys.argv:
print("Installing database only")
elif "-installfrontend" in sys.argv:
print("Installing f... | import sys
import os
from subprocess import call
import urllib.request
import json
#from pprint import pprint
# User needs to install postgres first
trackmon_server_api_info = "https://api.github.com/repos/paulkramme/roverpi/releases/latest"
def download(url, path):
with urllib.request.urlopen(url) as response, o... | <commit_before>import sys
def main():
if "-install" in sys.argv:
print("Installing everything")
elif "-installapi" in sys.argv:
print("Installing API backend only")
elif "-installdb" in sys.argv:
print("Installing database only")
elif "-installfrontend" in sys.argv:
prin... | import sys
import os
from subprocess import call
import urllib.request
import json
#from pprint import pprint
# User needs to install postgres first
trackmon_server_api_info = "https://api.github.com/repos/paulkramme/roverpi/releases/latest"
def download(url, path):
with urllib.request.urlopen(url) as response, o... | import sys
def main():
if "-install" in sys.argv:
print("Installing everything")
elif "-installapi" in sys.argv:
print("Installing API backend only")
elif "-installdb" in sys.argv:
print("Installing database only")
elif "-installfrontend" in sys.argv:
print("Installing f... | <commit_before>import sys
def main():
if "-install" in sys.argv:
print("Installing everything")
elif "-installapi" in sys.argv:
print("Installing API backend only")
elif "-installdb" in sys.argv:
print("Installing database only")
elif "-installfrontend" in sys.argv:
prin... |
ba4eace22eb2379a5a0d8a79615892edd58b1f49 | mezzanine/core/sitemaps.py | mezzanine/core/sitemaps.py |
from django.contrib.sitemaps import Sitemap
from django.db.models import get_models
from mezzanine.core.models import Displayable
class DisplayableSitemap(Sitemap):
"""
Sitemap class for Django's sitemaps framework that returns
all published items for models that subclass ``Displayable``.
"""
d... |
from django.contrib.sitemaps import Sitemap
from django.db.models import get_models
from mezzanine.core.models import Displayable
class DisplayableSitemap(Sitemap):
"""
Sitemap class for Django's sitemaps framework that returns
all published items for models that subclass ``Displayable``.
"""
d... | Clean up sitemap URL handling. | Clean up sitemap URL handling.
| Python | bsd-2-clause | Cajoline/mezzanine,guibernardino/mezzanine,agepoly/mezzanine,sjuxax/mezzanine,vladir/mezzanine,Cicero-Zhao/mezzanine,stbarnabas/mezzanine,sjdines/mezzanine,viaregio/mezzanine,wbtuomela/mezzanine,biomassives/mezzanine,frankchin/mezzanine,orlenko/plei,dekomote/mezzanine-modeltranslation-backport,batpad/mezzanine,mush42/m... |
from django.contrib.sitemaps import Sitemap
from django.db.models import get_models
from mezzanine.core.models import Displayable
class DisplayableSitemap(Sitemap):
"""
Sitemap class for Django's sitemaps framework that returns
all published items for models that subclass ``Displayable``.
"""
d... |
from django.contrib.sitemaps import Sitemap
from django.db.models import get_models
from mezzanine.core.models import Displayable
class DisplayableSitemap(Sitemap):
"""
Sitemap class for Django's sitemaps framework that returns
all published items for models that subclass ``Displayable``.
"""
d... | <commit_before>
from django.contrib.sitemaps import Sitemap
from django.db.models import get_models
from mezzanine.core.models import Displayable
class DisplayableSitemap(Sitemap):
"""
Sitemap class for Django's sitemaps framework that returns
all published items for models that subclass ``Displayable``.... |
from django.contrib.sitemaps import Sitemap
from django.db.models import get_models
from mezzanine.core.models import Displayable
class DisplayableSitemap(Sitemap):
"""
Sitemap class for Django's sitemaps framework that returns
all published items for models that subclass ``Displayable``.
"""
d... |
from django.contrib.sitemaps import Sitemap
from django.db.models import get_models
from mezzanine.core.models import Displayable
class DisplayableSitemap(Sitemap):
"""
Sitemap class for Django's sitemaps framework that returns
all published items for models that subclass ``Displayable``.
"""
d... | <commit_before>
from django.contrib.sitemaps import Sitemap
from django.db.models import get_models
from mezzanine.core.models import Displayable
class DisplayableSitemap(Sitemap):
"""
Sitemap class for Django's sitemaps framework that returns
all published items for models that subclass ``Displayable``.... |
d1da755f10d4287d1cfbec3a6d29d9961125bbce | plugins/tff_backend/plugin_consts.py | plugins/tff_backend/plugin_consts.py | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | Add BTC to possible currencies | Add BTC to possible currencies
| Python | bsd-3-clause | threefoldfoundation/app_backend,threefoldfoundation/app_backend,threefoldfoundation/app_backend,threefoldfoundation/app_backend | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
9c8dbde9b39f6fcd713a7d118dcd613cc48cf54e | astropy/tests/tests/test_run_tests.py | astropy/tests/tests/test_run_tests.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# test helper.run_tests function
import sys
from .. import helper
from ... import _get_test_runner
from .. helper import pytest
# run_tests sho... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# test helper.run_tests function
import warnings
from .. import helper
from ... import _get_test_runner
from .. helper import pytest
# run_test... | Test that deprecation exceptions are working differently, after suggestion by @embray | Test that deprecation exceptions are working differently, after
suggestion by @embray
| Python | bsd-3-clause | larrybradley/astropy,aleksandr-bakanov/astropy,DougBurke/astropy,stargaser/astropy,DougBurke/astropy,joergdietrich/astropy,kelle/astropy,mhvk/astropy,funbaker/astropy,saimn/astropy,lpsinger/astropy,pllim/astropy,dhomeier/astropy,StuartLittlefair/astropy,lpsinger/astropy,larrybradley/astropy,aleksandr-bakanov/astropy,dh... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# test helper.run_tests function
import sys
from .. import helper
from ... import _get_test_runner
from .. helper import pytest
# run_tests sho... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# test helper.run_tests function
import warnings
from .. import helper
from ... import _get_test_runner
from .. helper import pytest
# run_test... | <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# test helper.run_tests function
import sys
from .. import helper
from ... import _get_test_runner
from .. helper import pytest
... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# test helper.run_tests function
import warnings
from .. import helper
from ... import _get_test_runner
from .. helper import pytest
# run_test... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# test helper.run_tests function
import sys
from .. import helper
from ... import _get_test_runner
from .. helper import pytest
# run_tests sho... | <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# test helper.run_tests function
import sys
from .. import helper
from ... import _get_test_runner
from .. helper import pytest
... |
24093369bb1dbd2e9034db9425920ffdc14ee070 | abusehelper/bots/abusech/feodoccbot.py | abusehelper/bots/abusech/feodoccbot.py | """
abuse.ch Feodo RSS feed bot.
Maintainer: AbuseSA team <contact@abusesa.com>
"""
from abusehelper.core import bot
from . import host_or_ip, split_description, AbuseCHFeedBot
class FeodoCcBot(AbuseCHFeedBot):
feed_type = "c&c"
feed_name = "feodo c&c"
feeds = bot.ListParam(default=["https://feodotrac... | """
abuse.ch Feodo RSS feed bot.
Maintainer: AbuseSA team <contact@abusesa.com>
"""
from abusehelper.core import bot
from . import host_or_ip, split_description, AbuseCHFeedBot
class FeodoCcBot(AbuseCHFeedBot):
feed_type = "c&c"
feed_name = "feodo c&c"
feeds = bot.ListParam(default=["https://feodotrac... | Include status information in abuse.ch's Feodo C&C feed | Include status information in abuse.ch's Feodo C&C feed
| Python | mit | abusesa/abusehelper | """
abuse.ch Feodo RSS feed bot.
Maintainer: AbuseSA team <contact@abusesa.com>
"""
from abusehelper.core import bot
from . import host_or_ip, split_description, AbuseCHFeedBot
class FeodoCcBot(AbuseCHFeedBot):
feed_type = "c&c"
feed_name = "feodo c&c"
feeds = bot.ListParam(default=["https://feodotrac... | """
abuse.ch Feodo RSS feed bot.
Maintainer: AbuseSA team <contact@abusesa.com>
"""
from abusehelper.core import bot
from . import host_or_ip, split_description, AbuseCHFeedBot
class FeodoCcBot(AbuseCHFeedBot):
feed_type = "c&c"
feed_name = "feodo c&c"
feeds = bot.ListParam(default=["https://feodotrac... | <commit_before>"""
abuse.ch Feodo RSS feed bot.
Maintainer: AbuseSA team <contact@abusesa.com>
"""
from abusehelper.core import bot
from . import host_or_ip, split_description, AbuseCHFeedBot
class FeodoCcBot(AbuseCHFeedBot):
feed_type = "c&c"
feed_name = "feodo c&c"
feeds = bot.ListParam(default=["ht... | """
abuse.ch Feodo RSS feed bot.
Maintainer: AbuseSA team <contact@abusesa.com>
"""
from abusehelper.core import bot
from . import host_or_ip, split_description, AbuseCHFeedBot
class FeodoCcBot(AbuseCHFeedBot):
feed_type = "c&c"
feed_name = "feodo c&c"
feeds = bot.ListParam(default=["https://feodotrac... | """
abuse.ch Feodo RSS feed bot.
Maintainer: AbuseSA team <contact@abusesa.com>
"""
from abusehelper.core import bot
from . import host_or_ip, split_description, AbuseCHFeedBot
class FeodoCcBot(AbuseCHFeedBot):
feed_type = "c&c"
feed_name = "feodo c&c"
feeds = bot.ListParam(default=["https://feodotrac... | <commit_before>"""
abuse.ch Feodo RSS feed bot.
Maintainer: AbuseSA team <contact@abusesa.com>
"""
from abusehelper.core import bot
from . import host_or_ip, split_description, AbuseCHFeedBot
class FeodoCcBot(AbuseCHFeedBot):
feed_type = "c&c"
feed_name = "feodo c&c"
feeds = bot.ListParam(default=["ht... |
efd1841fb904e30ac0b87b7c7d019f2745452cb2 | test_output.py | test_output.py | #!/usr/bin/env python
# -*- encoding: utf-8
"""
These are tests of the external behaviour -- feature tests, if you like.
They run the compiled binaries, and make assertions about the return code,
stdout and stderr.
"""
import unittest
from conftest import BaseTest
class TestSafariRS(BaseTest):
def test_urls_al... | #!/usr/bin/env python
# -*- encoding: utf-8
"""
These are tests of the external behaviour -- feature tests, if you like.
They run the compiled binaries, and make assertions about the return code,
stdout and stderr.
"""
import unittest
from conftest import BaseTest
class TestSafariRS(BaseTest):
def test_urls_al... | Add some tests for the URL resolver | Add some tests for the URL resolver
| Python | mit | alexwlchan/safari.rs,alexwlchan/safari.rs | #!/usr/bin/env python
# -*- encoding: utf-8
"""
These are tests of the external behaviour -- feature tests, if you like.
They run the compiled binaries, and make assertions about the return code,
stdout and stderr.
"""
import unittest
from conftest import BaseTest
class TestSafariRS(BaseTest):
def test_urls_al... | #!/usr/bin/env python
# -*- encoding: utf-8
"""
These are tests of the external behaviour -- feature tests, if you like.
They run the compiled binaries, and make assertions about the return code,
stdout and stderr.
"""
import unittest
from conftest import BaseTest
class TestSafariRS(BaseTest):
def test_urls_al... | <commit_before>#!/usr/bin/env python
# -*- encoding: utf-8
"""
These are tests of the external behaviour -- feature tests, if you like.
They run the compiled binaries, and make assertions about the return code,
stdout and stderr.
"""
import unittest
from conftest import BaseTest
class TestSafariRS(BaseTest):
d... | #!/usr/bin/env python
# -*- encoding: utf-8
"""
These are tests of the external behaviour -- feature tests, if you like.
They run the compiled binaries, and make assertions about the return code,
stdout and stderr.
"""
import unittest
from conftest import BaseTest
class TestSafariRS(BaseTest):
def test_urls_al... | #!/usr/bin/env python
# -*- encoding: utf-8
"""
These are tests of the external behaviour -- feature tests, if you like.
They run the compiled binaries, and make assertions about the return code,
stdout and stderr.
"""
import unittest
from conftest import BaseTest
class TestSafariRS(BaseTest):
def test_urls_al... | <commit_before>#!/usr/bin/env python
# -*- encoding: utf-8
"""
These are tests of the external behaviour -- feature tests, if you like.
They run the compiled binaries, and make assertions about the return code,
stdout and stderr.
"""
import unittest
from conftest import BaseTest
class TestSafariRS(BaseTest):
d... |
e654590b7345b406fdeb6db6ac249da1f60b253c | project_euler/solutions/problem_5.py | project_euler/solutions/problem_5.py | from math import gcd
def solve(number: int=20) -> str:
if number <= 0:
raise TypeError
lcd = 1
for i in range(1, number + 1):
lcd = (lcd * i) // gcd(lcd, i)
return str(lcd)
| from math import gcd
def solve(number: int=20) -> str:
if number <= 0:
raise ValueError
lcd = 1
for i in range(1, number + 1):
lcd = (lcd * i) // gcd(lcd, i)
return str(lcd)
| Use ValueError for wrong input in 5 | Use ValueError for wrong input in 5
| Python | mit | cryvate/project-euler,cryvate/project-euler | from math import gcd
def solve(number: int=20) -> str:
if number <= 0:
raise TypeError
lcd = 1
for i in range(1, number + 1):
lcd = (lcd * i) // gcd(lcd, i)
return str(lcd)
Use ValueError for wrong input in 5 | from math import gcd
def solve(number: int=20) -> str:
if number <= 0:
raise ValueError
lcd = 1
for i in range(1, number + 1):
lcd = (lcd * i) // gcd(lcd, i)
return str(lcd)
| <commit_before>from math import gcd
def solve(number: int=20) -> str:
if number <= 0:
raise TypeError
lcd = 1
for i in range(1, number + 1):
lcd = (lcd * i) // gcd(lcd, i)
return str(lcd)
<commit_msg>Use ValueError for wrong input in 5<commit_after> | from math import gcd
def solve(number: int=20) -> str:
if number <= 0:
raise ValueError
lcd = 1
for i in range(1, number + 1):
lcd = (lcd * i) // gcd(lcd, i)
return str(lcd)
| from math import gcd
def solve(number: int=20) -> str:
if number <= 0:
raise TypeError
lcd = 1
for i in range(1, number + 1):
lcd = (lcd * i) // gcd(lcd, i)
return str(lcd)
Use ValueError for wrong input in 5from math import gcd
def solve(number: int=20) -> str:
if number <= 0... | <commit_before>from math import gcd
def solve(number: int=20) -> str:
if number <= 0:
raise TypeError
lcd = 1
for i in range(1, number + 1):
lcd = (lcd * i) // gcd(lcd, i)
return str(lcd)
<commit_msg>Use ValueError for wrong input in 5<commit_after>from math import gcd
def solve(n... |
153c832f083e8ec801ecb8dbddd2f8e79b735eed | utilities.py | utilities.py | # Function to return a list of pvs from a given file
import pkg_resources
pkg_resources.require('aphla')
import aphla as ap
def get_pv_names(mode):
''' Given a certain ring mode as a string, return all available pvs '''
ap.machines.load(mode)
result = set()
elements = ap.getElements('*')
for ele... | # Function to return a list of pvs from a given file
import pkg_resources
pkg_resources.require('aphla')
import aphla as ap
def get_pv_names(mode):
''' Given a certain ring mode as a string, return all available pvs '''
ap.machines.load(mode)
result = set()
elements = ap.getElements('*')
for el... | Add utility function to write pvs to file | Add utility function to write pvs to file
| Python | apache-2.0 | razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects | # Function to return a list of pvs from a given file
import pkg_resources
pkg_resources.require('aphla')
import aphla as ap
def get_pv_names(mode):
''' Given a certain ring mode as a string, return all available pvs '''
ap.machines.load(mode)
result = set()
elements = ap.getElements('*')
for ele... | # Function to return a list of pvs from a given file
import pkg_resources
pkg_resources.require('aphla')
import aphla as ap
def get_pv_names(mode):
''' Given a certain ring mode as a string, return all available pvs '''
ap.machines.load(mode)
result = set()
elements = ap.getElements('*')
for el... | <commit_before># Function to return a list of pvs from a given file
import pkg_resources
pkg_resources.require('aphla')
import aphla as ap
def get_pv_names(mode):
''' Given a certain ring mode as a string, return all available pvs '''
ap.machines.load(mode)
result = set()
elements = ap.getElements('... | # Function to return a list of pvs from a given file
import pkg_resources
pkg_resources.require('aphla')
import aphla as ap
def get_pv_names(mode):
''' Given a certain ring mode as a string, return all available pvs '''
ap.machines.load(mode)
result = set()
elements = ap.getElements('*')
for el... | # Function to return a list of pvs from a given file
import pkg_resources
pkg_resources.require('aphla')
import aphla as ap
def get_pv_names(mode):
''' Given a certain ring mode as a string, return all available pvs '''
ap.machines.load(mode)
result = set()
elements = ap.getElements('*')
for ele... | <commit_before># Function to return a list of pvs from a given file
import pkg_resources
pkg_resources.require('aphla')
import aphla as ap
def get_pv_names(mode):
''' Given a certain ring mode as a string, return all available pvs '''
ap.machines.load(mode)
result = set()
elements = ap.getElements('... |
69a94173a48d04bc9e409278574844ebbc43af8b | dadd/worker/__init__.py | dadd/worker/__init__.py | import os
from functools import partial
import click
from flask import Flask
from dadd import server
app = Flask(__name__)
app.config.from_object('dadd.worker.settings')
import dadd.worker.handlers # noqa
@click.command()
@click.pass_context
def run(ctx):
if os.environ.get('DEBUG') or (ctx.obj and ctx.obj... | from functools import partial
import click
from flask import Flask
from dadd import server
from dadd.master.utils import update_config
app = Flask(__name__)
app.config.from_object('dadd.worker.settings')
import dadd.worker.handlers # noqa
@click.command()
@click.pass_context
def run(ctx):
if ctx.obj:
... | Allow worker to use APP_SETTINGS_YAML correctly. | Allow worker to use APP_SETTINGS_YAML correctly.
| Python | bsd-3-clause | ionrock/dadd,ionrock/dadd,ionrock/dadd,ionrock/dadd | import os
from functools import partial
import click
from flask import Flask
from dadd import server
app = Flask(__name__)
app.config.from_object('dadd.worker.settings')
import dadd.worker.handlers # noqa
@click.command()
@click.pass_context
def run(ctx):
if os.environ.get('DEBUG') or (ctx.obj and ctx.obj... | from functools import partial
import click
from flask import Flask
from dadd import server
from dadd.master.utils import update_config
app = Flask(__name__)
app.config.from_object('dadd.worker.settings')
import dadd.worker.handlers # noqa
@click.command()
@click.pass_context
def run(ctx):
if ctx.obj:
... | <commit_before>import os
from functools import partial
import click
from flask import Flask
from dadd import server
app = Flask(__name__)
app.config.from_object('dadd.worker.settings')
import dadd.worker.handlers # noqa
@click.command()
@click.pass_context
def run(ctx):
if os.environ.get('DEBUG') or (ctx.... | from functools import partial
import click
from flask import Flask
from dadd import server
from dadd.master.utils import update_config
app = Flask(__name__)
app.config.from_object('dadd.worker.settings')
import dadd.worker.handlers # noqa
@click.command()
@click.pass_context
def run(ctx):
if ctx.obj:
... | import os
from functools import partial
import click
from flask import Flask
from dadd import server
app = Flask(__name__)
app.config.from_object('dadd.worker.settings')
import dadd.worker.handlers # noqa
@click.command()
@click.pass_context
def run(ctx):
if os.environ.get('DEBUG') or (ctx.obj and ctx.obj... | <commit_before>import os
from functools import partial
import click
from flask import Flask
from dadd import server
app = Flask(__name__)
app.config.from_object('dadd.worker.settings')
import dadd.worker.handlers # noqa
@click.command()
@click.pass_context
def run(ctx):
if os.environ.get('DEBUG') or (ctx.... |
a499f5fbe63f03a3c404a28e0c1286af74382e09 | tests/utils.py | tests/utils.py | import os
from django.core.files.base import ContentFile
from imagekit.lib import Image, StringIO
from .models import Photo
import pickle
def get_image_file():
"""
See also:
http://en.wikipedia.org/wiki/Lenna
http://sipi.usc.edu/database/database.php?volume=misc&image=12
"""
path = os.path... | import os
from django.core.files.base import ContentFile
from imagekit.lib import Image, StringIO
from tempfile import NamedTemporaryFile
from .models import Photo
import pickle
def _get_image_file(file_factory):
"""
See also:
http://en.wikipedia.org/wiki/Lenna
http://sipi.usc.edu/database/database... | Add util for generating named image file | Add util for generating named image file
| Python | bsd-3-clause | FundedByMe/django-imagekit,tawanda/django-imagekit,tawanda/django-imagekit,FundedByMe/django-imagekit | import os
from django.core.files.base import ContentFile
from imagekit.lib import Image, StringIO
from .models import Photo
import pickle
def get_image_file():
"""
See also:
http://en.wikipedia.org/wiki/Lenna
http://sipi.usc.edu/database/database.php?volume=misc&image=12
"""
path = os.path... | import os
from django.core.files.base import ContentFile
from imagekit.lib import Image, StringIO
from tempfile import NamedTemporaryFile
from .models import Photo
import pickle
def _get_image_file(file_factory):
"""
See also:
http://en.wikipedia.org/wiki/Lenna
http://sipi.usc.edu/database/database... | <commit_before>import os
from django.core.files.base import ContentFile
from imagekit.lib import Image, StringIO
from .models import Photo
import pickle
def get_image_file():
"""
See also:
http://en.wikipedia.org/wiki/Lenna
http://sipi.usc.edu/database/database.php?volume=misc&image=12
"""
... | import os
from django.core.files.base import ContentFile
from imagekit.lib import Image, StringIO
from tempfile import NamedTemporaryFile
from .models import Photo
import pickle
def _get_image_file(file_factory):
"""
See also:
http://en.wikipedia.org/wiki/Lenna
http://sipi.usc.edu/database/database... | import os
from django.core.files.base import ContentFile
from imagekit.lib import Image, StringIO
from .models import Photo
import pickle
def get_image_file():
"""
See also:
http://en.wikipedia.org/wiki/Lenna
http://sipi.usc.edu/database/database.php?volume=misc&image=12
"""
path = os.path... | <commit_before>import os
from django.core.files.base import ContentFile
from imagekit.lib import Image, StringIO
from .models import Photo
import pickle
def get_image_file():
"""
See also:
http://en.wikipedia.org/wiki/Lenna
http://sipi.usc.edu/database/database.php?volume=misc&image=12
"""
... |
87007360cc7ddc0c5d40882bd2f8107db64d1bdf | tools/po2js.py | tools/po2js.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os.path
import codecs
import dfstrings
import time
def make_js_from_po(path):
strings = []
for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]:
strings.append(u"""ui_strings.%s="%s";""... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os.path
import codecs
import dfstrings
import time
def make_js_from_po(path):
strings = []
for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]:
strings.append(u"""ui_strings.%s="%s";""... | Add the language code to the translated file | Add the language code to the translated file
| Python | apache-2.0 | operasoftware/dragonfly-build-tools,operasoftware/dragonfly-build-tools | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os.path
import codecs
import dfstrings
import time
def make_js_from_po(path):
strings = []
for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]:
strings.append(u"""ui_strings.%s="%s";""... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os.path
import codecs
import dfstrings
import time
def make_js_from_po(path):
strings = []
for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]:
strings.append(u"""ui_strings.%s="%s";""... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os.path
import codecs
import dfstrings
import time
def make_js_from_po(path):
strings = []
for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]:
strings.append(u"""ui_str... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os.path
import codecs
import dfstrings
import time
def make_js_from_po(path):
strings = []
for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]:
strings.append(u"""ui_strings.%s="%s";""... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os.path
import codecs
import dfstrings
import time
def make_js_from_po(path):
strings = []
for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]:
strings.append(u"""ui_strings.%s="%s";""... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os.path
import codecs
import dfstrings
import time
def make_js_from_po(path):
strings = []
for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]:
strings.append(u"""ui_str... |
8004590503914d9674a0b17f412c8d1836f5e1a1 | testScript.py | testScript.py | from elsapy import *
conFile = open("config.json")
config = json.load(conFile)
myCl = elsClient(config['apikey'])
myAuth = elsAuthor('http://api.elsevier.com/content/author/AUTHOR_ID:7004367821')
myAuth.read(myCl)
print ("myAuth.fullName: ", myAuth.fullName)
myAff = elsAffil('http://api.elsevier.com/content/affili... | from elsapy import *
conFile = open("config.json")
config = json.load(conFile)
myCl = elsClient(config['apikey'])
myAuth = elsAuthor('http://api.elsevier.com/content/author/AUTHOR_ID:7004367821') ## author with more than 25 docs
##myAuth = elsAuthor('http://api.elsevier.com/content/author/AUTHOR_ID:5593402650... | Add second author for testing purposes | Add second author for testing purposes
| Python | bsd-3-clause | ElsevierDev/elsapy | from elsapy import *
conFile = open("config.json")
config = json.load(conFile)
myCl = elsClient(config['apikey'])
myAuth = elsAuthor('http://api.elsevier.com/content/author/AUTHOR_ID:7004367821')
myAuth.read(myCl)
print ("myAuth.fullName: ", myAuth.fullName)
myAff = elsAffil('http://api.elsevier.com/content/affili... | from elsapy import *
conFile = open("config.json")
config = json.load(conFile)
myCl = elsClient(config['apikey'])
myAuth = elsAuthor('http://api.elsevier.com/content/author/AUTHOR_ID:7004367821') ## author with more than 25 docs
##myAuth = elsAuthor('http://api.elsevier.com/content/author/AUTHOR_ID:5593402650... | <commit_before>from elsapy import *
conFile = open("config.json")
config = json.load(conFile)
myCl = elsClient(config['apikey'])
myAuth = elsAuthor('http://api.elsevier.com/content/author/AUTHOR_ID:7004367821')
myAuth.read(myCl)
print ("myAuth.fullName: ", myAuth.fullName)
myAff = elsAffil('http://api.elsevier.com... | from elsapy import *
conFile = open("config.json")
config = json.load(conFile)
myCl = elsClient(config['apikey'])
myAuth = elsAuthor('http://api.elsevier.com/content/author/AUTHOR_ID:7004367821') ## author with more than 25 docs
##myAuth = elsAuthor('http://api.elsevier.com/content/author/AUTHOR_ID:5593402650... | from elsapy import *
conFile = open("config.json")
config = json.load(conFile)
myCl = elsClient(config['apikey'])
myAuth = elsAuthor('http://api.elsevier.com/content/author/AUTHOR_ID:7004367821')
myAuth.read(myCl)
print ("myAuth.fullName: ", myAuth.fullName)
myAff = elsAffil('http://api.elsevier.com/content/affili... | <commit_before>from elsapy import *
conFile = open("config.json")
config = json.load(conFile)
myCl = elsClient(config['apikey'])
myAuth = elsAuthor('http://api.elsevier.com/content/author/AUTHOR_ID:7004367821')
myAuth.read(myCl)
print ("myAuth.fullName: ", myAuth.fullName)
myAff = elsAffil('http://api.elsevier.com... |
5b64a272d0830c3a85fe540a82d6ff8b62bd0ea8 | livinglots_organize/templatetags/organize_tags.py | livinglots_organize/templatetags/organize_tags.py | """
Template tags for the organize app, loosely based on django.contrib.comments.
"""
from django import template
from livinglots import get_organizer_model
from livinglots_generictags.tags import (GetGenericRelationList,
RenderGenericRelationList,
... | """
Template tags for the organize app, loosely based on django.contrib.comments.
"""
from django import template
from django.contrib.contenttypes.models import ContentType
from classytags.arguments import Argument, KeywordArgument
from classytags.core import Options
from livinglots import get_organizer_model
from l... | Add `public` keyword to render_organizer_list | Add `public` keyword to render_organizer_list
| Python | agpl-3.0 | 596acres/django-livinglots-organize,596acres/django-livinglots-organize | """
Template tags for the organize app, loosely based on django.contrib.comments.
"""
from django import template
from livinglots import get_organizer_model
from livinglots_generictags.tags import (GetGenericRelationList,
RenderGenericRelationList,
... | """
Template tags for the organize app, loosely based on django.contrib.comments.
"""
from django import template
from django.contrib.contenttypes.models import ContentType
from classytags.arguments import Argument, KeywordArgument
from classytags.core import Options
from livinglots import get_organizer_model
from l... | <commit_before>"""
Template tags for the organize app, loosely based on django.contrib.comments.
"""
from django import template
from livinglots import get_organizer_model
from livinglots_generictags.tags import (GetGenericRelationList,
RenderGenericRelationList,
... | """
Template tags for the organize app, loosely based on django.contrib.comments.
"""
from django import template
from django.contrib.contenttypes.models import ContentType
from classytags.arguments import Argument, KeywordArgument
from classytags.core import Options
from livinglots import get_organizer_model
from l... | """
Template tags for the organize app, loosely based on django.contrib.comments.
"""
from django import template
from livinglots import get_organizer_model
from livinglots_generictags.tags import (GetGenericRelationList,
RenderGenericRelationList,
... | <commit_before>"""
Template tags for the organize app, loosely based on django.contrib.comments.
"""
from django import template
from livinglots import get_organizer_model
from livinglots_generictags.tags import (GetGenericRelationList,
RenderGenericRelationList,
... |
1105dfb75bf373b38e2f12579843af54f7a78c6f | DataModelAdapter.py | DataModelAdapter.py |
class DataModelAdapter(object) :
def __init__(self, data) :
self._data = data
self._children = set()
self._parent = None
pass
def numChildren(self) :
return len(self._children)
def hasData(self) :
return self._data is not None
def getData(self, key) :... |
class DataModelAdapter(object) :
def __init__(self, data) :
self._data = data
self._children = set()
self._parent = None
pass
def numChildren(self) :
return len(self._children)
def hasData(self) :
return self._data is not None
def getData(self, key) :... | Add child(); TODO: test this | Add child(); TODO: test this
| Python | apache-2.0 | mattdeckard/wherewithal |
class DataModelAdapter(object) :
def __init__(self, data) :
self._data = data
self._children = set()
self._parent = None
pass
def numChildren(self) :
return len(self._children)
def hasData(self) :
return self._data is not None
def getData(self, key) :... |
class DataModelAdapter(object) :
def __init__(self, data) :
self._data = data
self._children = set()
self._parent = None
pass
def numChildren(self) :
return len(self._children)
def hasData(self) :
return self._data is not None
def getData(self, key) :... | <commit_before>
class DataModelAdapter(object) :
def __init__(self, data) :
self._data = data
self._children = set()
self._parent = None
pass
def numChildren(self) :
return len(self._children)
def hasData(self) :
return self._data is not None
def getDa... |
class DataModelAdapter(object) :
def __init__(self, data) :
self._data = data
self._children = set()
self._parent = None
pass
def numChildren(self) :
return len(self._children)
def hasData(self) :
return self._data is not None
def getData(self, key) :... |
class DataModelAdapter(object) :
def __init__(self, data) :
self._data = data
self._children = set()
self._parent = None
pass
def numChildren(self) :
return len(self._children)
def hasData(self) :
return self._data is not None
def getData(self, key) :... | <commit_before>
class DataModelAdapter(object) :
def __init__(self, data) :
self._data = data
self._children = set()
self._parent = None
pass
def numChildren(self) :
return len(self._children)
def hasData(self) :
return self._data is not None
def getDa... |
b53a6fb45934856fcf1aca419b4022241fc7fcbc | tests/t_all.py | tests/t_all.py | #!/usr/bin/env python
#
# Copyright 2011, Toru Maesaka
#
# Redistribution and use of this source code is licensed under
# the BSD license. See COPYING file for license description.
#
# USAGE:
# $ python t_all.py
# $ python t_all.py ExpireTestCase
import os
import re
import unittest
_TEST_MODULE_PATTERN = re.compi... | #!/usr/bin/env python
#
# Copyright 2011, Toru Maesaka
#
# Redistribution and use of this source code is licensed under
# the BSD license. See COPYING file for license description.
#
# USAGE:
# $ python t_all.py
# $ python t_all.py ExpireTestCase
# $ python t_all.py MultiTestCase
# $ python t_all.py ScriptTestC... | Exclude the play script test case from the default test suite. | Exclude the play script test case from the default test suite.
| Python | bsd-3-clause | sapo/python-kyototycoon,sapo/python-kyototycoon-ng | #!/usr/bin/env python
#
# Copyright 2011, Toru Maesaka
#
# Redistribution and use of this source code is licensed under
# the BSD license. See COPYING file for license description.
#
# USAGE:
# $ python t_all.py
# $ python t_all.py ExpireTestCase
import os
import re
import unittest
_TEST_MODULE_PATTERN = re.compi... | #!/usr/bin/env python
#
# Copyright 2011, Toru Maesaka
#
# Redistribution and use of this source code is licensed under
# the BSD license. See COPYING file for license description.
#
# USAGE:
# $ python t_all.py
# $ python t_all.py ExpireTestCase
# $ python t_all.py MultiTestCase
# $ python t_all.py ScriptTestC... | <commit_before>#!/usr/bin/env python
#
# Copyright 2011, Toru Maesaka
#
# Redistribution and use of this source code is licensed under
# the BSD license. See COPYING file for license description.
#
# USAGE:
# $ python t_all.py
# $ python t_all.py ExpireTestCase
import os
import re
import unittest
_TEST_MODULE_PAT... | #!/usr/bin/env python
#
# Copyright 2011, Toru Maesaka
#
# Redistribution and use of this source code is licensed under
# the BSD license. See COPYING file for license description.
#
# USAGE:
# $ python t_all.py
# $ python t_all.py ExpireTestCase
# $ python t_all.py MultiTestCase
# $ python t_all.py ScriptTestC... | #!/usr/bin/env python
#
# Copyright 2011, Toru Maesaka
#
# Redistribution and use of this source code is licensed under
# the BSD license. See COPYING file for license description.
#
# USAGE:
# $ python t_all.py
# $ python t_all.py ExpireTestCase
import os
import re
import unittest
_TEST_MODULE_PATTERN = re.compi... | <commit_before>#!/usr/bin/env python
#
# Copyright 2011, Toru Maesaka
#
# Redistribution and use of this source code is licensed under
# the BSD license. See COPYING file for license description.
#
# USAGE:
# $ python t_all.py
# $ python t_all.py ExpireTestCase
import os
import re
import unittest
_TEST_MODULE_PAT... |
be73d527c87ce94e4e4d4c80c6ef797aad803f50 | opps/__init__.py | opps/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
trans_app_label = _('Opps')
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Av... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Avelino"
__credits__ = []
__em... | Remove trans app label on opps init | Remove trans app label on opps init
| Python | mit | jeanmask/opps,jeanmask/opps,opps/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,YACOWS/opps,opps/opps,YACOWS/opps,williamroot/opps,opps/opps,jeanmask/opps,williamroot/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
trans_app_label = _('Opps')
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Av... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Avelino"
__credits__ = []
__em... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
trans_app_label = _('Opps')
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author_... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Avelino"
__credits__ = []
__em... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
trans_app_label = _('Opps')
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author__ = u"Thiago Av... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
trans_app_label = _('Opps')
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Opps CMS websites magazines and high-traffic"
__author_... |
4e8c84bf36250d7e61b585fc5db545206cab9730 | perfkitbenchmarker/scripts/spark_table.py | perfkitbenchmarker/scripts/spark_table.py | # Lint as: python2, python3
"""A PySpark driver that creates Spark tables for Spark SQL benchmark.
It takes an HCFS directory and a list of the names of the subdirectories of that
root directory. The subdirectories each hold Parquet data and are to be
converted into a table of the same name. The subdirectories are exp... | # Lint as: python2, python3
"""A PySpark driver that creates Spark tables for Spark SQL benchmark.
It takes an HCFS directory and a list of the names of the subdirectories of that
root directory. The subdirectories each hold Parquet data and are to be
converted into a table of the same name. The subdirectories are exp... | Support creating Hive tables with partitioned data. | Support creating Hive tables with partitioned data.
PiperOrigin-RevId: 335539022
| Python | apache-2.0 | GoogleCloudPlatform/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker | # Lint as: python2, python3
"""A PySpark driver that creates Spark tables for Spark SQL benchmark.
It takes an HCFS directory and a list of the names of the subdirectories of that
root directory. The subdirectories each hold Parquet data and are to be
converted into a table of the same name. The subdirectories are exp... | # Lint as: python2, python3
"""A PySpark driver that creates Spark tables for Spark SQL benchmark.
It takes an HCFS directory and a list of the names of the subdirectories of that
root directory. The subdirectories each hold Parquet data and are to be
converted into a table of the same name. The subdirectories are exp... | <commit_before># Lint as: python2, python3
"""A PySpark driver that creates Spark tables for Spark SQL benchmark.
It takes an HCFS directory and a list of the names of the subdirectories of that
root directory. The subdirectories each hold Parquet data and are to be
converted into a table of the same name. The subdire... | # Lint as: python2, python3
"""A PySpark driver that creates Spark tables for Spark SQL benchmark.
It takes an HCFS directory and a list of the names of the subdirectories of that
root directory. The subdirectories each hold Parquet data and are to be
converted into a table of the same name. The subdirectories are exp... | # Lint as: python2, python3
"""A PySpark driver that creates Spark tables for Spark SQL benchmark.
It takes an HCFS directory and a list of the names of the subdirectories of that
root directory. The subdirectories each hold Parquet data and are to be
converted into a table of the same name. The subdirectories are exp... | <commit_before># Lint as: python2, python3
"""A PySpark driver that creates Spark tables for Spark SQL benchmark.
It takes an HCFS directory and a list of the names of the subdirectories of that
root directory. The subdirectories each hold Parquet data and are to be
converted into a table of the same name. The subdire... |
74e75cba3c923bc4aea9a7f1c4f387d29227f003 | pyramid_jsonapi/version.py | pyramid_jsonapi/version.py | #!/usr/bin/env python
# Source: https://github.com/Changaco/version.py
from os.path import dirname, isdir, join
import re
from subprocess import CalledProcessError, check_output
PREFIX = ''
tag_re = re.compile(r'\btag: %s([0-9][^,]*)\b' % PREFIX)
version_re = re.compile('^Version: (.+)$', re.M)
def get_version():... | #!/usr/bin/env python
# Source: https://github.com/Changaco/version.py
from os.path import dirname, isdir, join
import re
from subprocess import CalledProcessError, check_output
PREFIX = ''
tag_re = re.compile(r'\btag: %s([0-9][^,]*)\b' % PREFIX)
version_re = re.compile('^Version: (.+)$', re.M)
def get_version():... | Make inbetween tag releases 'dev', not 'post'. | Make inbetween tag releases 'dev', not 'post'.
| Python | agpl-3.0 | colinhiggs/pyramid-jsonapi,colinhiggs/pyramid-jsonapi | #!/usr/bin/env python
# Source: https://github.com/Changaco/version.py
from os.path import dirname, isdir, join
import re
from subprocess import CalledProcessError, check_output
PREFIX = ''
tag_re = re.compile(r'\btag: %s([0-9][^,]*)\b' % PREFIX)
version_re = re.compile('^Version: (.+)$', re.M)
def get_version():... | #!/usr/bin/env python
# Source: https://github.com/Changaco/version.py
from os.path import dirname, isdir, join
import re
from subprocess import CalledProcessError, check_output
PREFIX = ''
tag_re = re.compile(r'\btag: %s([0-9][^,]*)\b' % PREFIX)
version_re = re.compile('^Version: (.+)$', re.M)
def get_version():... | <commit_before>#!/usr/bin/env python
# Source: https://github.com/Changaco/version.py
from os.path import dirname, isdir, join
import re
from subprocess import CalledProcessError, check_output
PREFIX = ''
tag_re = re.compile(r'\btag: %s([0-9][^,]*)\b' % PREFIX)
version_re = re.compile('^Version: (.+)$', re.M)
def... | #!/usr/bin/env python
# Source: https://github.com/Changaco/version.py
from os.path import dirname, isdir, join
import re
from subprocess import CalledProcessError, check_output
PREFIX = ''
tag_re = re.compile(r'\btag: %s([0-9][^,]*)\b' % PREFIX)
version_re = re.compile('^Version: (.+)$', re.M)
def get_version():... | #!/usr/bin/env python
# Source: https://github.com/Changaco/version.py
from os.path import dirname, isdir, join
import re
from subprocess import CalledProcessError, check_output
PREFIX = ''
tag_re = re.compile(r'\btag: %s([0-9][^,]*)\b' % PREFIX)
version_re = re.compile('^Version: (.+)$', re.M)
def get_version():... | <commit_before>#!/usr/bin/env python
# Source: https://github.com/Changaco/version.py
from os.path import dirname, isdir, join
import re
from subprocess import CalledProcessError, check_output
PREFIX = ''
tag_re = re.compile(r'\btag: %s([0-9][^,]*)\b' % PREFIX)
version_re = re.compile('^Version: (.+)$', re.M)
def... |
35f45d3fcee5a1fe9d6d5ce71b708d0bc68db3fc | python/matasano/set1/c7.py | python/matasano/set1/c7.py | from matasano.util.converters import base64_to_bytes
from Crypto.Cipher import AES
import base64
if __name__ == "__main__":
chal_file = open("matasano/data/c7.txt", 'r');
key = "YELLOW SUBMARINE"
# Instantiate the cipher
cipher = AES.new(key, AES.MODE_ECB)
# Covert from base64 to bytes and enco... | from matasano.util.converters import base64_to_bytes
from Crypto.Cipher import AES
import base64
if __name__ == "__main__":
chal_file = open("matasano/data/c7.txt", 'r');
key = "YELLOW SUBMARINE"
# Instantiate the cipher
cipher = AES.new(key, AES.MODE_ECB)
# Covert from base64 to bytes and enco... | Switch to using base64 builtin decoder for simplicity. | Switch to using base64 builtin decoder for simplicity.
| Python | mit | TheLunchtimeAttack/matasano-challenges,TheLunchtimeAttack/matasano-challenges | from matasano.util.converters import base64_to_bytes
from Crypto.Cipher import AES
import base64
if __name__ == "__main__":
chal_file = open("matasano/data/c7.txt", 'r');
key = "YELLOW SUBMARINE"
# Instantiate the cipher
cipher = AES.new(key, AES.MODE_ECB)
# Covert from base64 to bytes and enco... | from matasano.util.converters import base64_to_bytes
from Crypto.Cipher import AES
import base64
if __name__ == "__main__":
chal_file = open("matasano/data/c7.txt", 'r');
key = "YELLOW SUBMARINE"
# Instantiate the cipher
cipher = AES.new(key, AES.MODE_ECB)
# Covert from base64 to bytes and enco... | <commit_before>from matasano.util.converters import base64_to_bytes
from Crypto.Cipher import AES
import base64
if __name__ == "__main__":
chal_file = open("matasano/data/c7.txt", 'r');
key = "YELLOW SUBMARINE"
# Instantiate the cipher
cipher = AES.new(key, AES.MODE_ECB)
# Covert from base64 to... | from matasano.util.converters import base64_to_bytes
from Crypto.Cipher import AES
import base64
if __name__ == "__main__":
chal_file = open("matasano/data/c7.txt", 'r');
key = "YELLOW SUBMARINE"
# Instantiate the cipher
cipher = AES.new(key, AES.MODE_ECB)
# Covert from base64 to bytes and enco... | from matasano.util.converters import base64_to_bytes
from Crypto.Cipher import AES
import base64
if __name__ == "__main__":
chal_file = open("matasano/data/c7.txt", 'r');
key = "YELLOW SUBMARINE"
# Instantiate the cipher
cipher = AES.new(key, AES.MODE_ECB)
# Covert from base64 to bytes and enco... | <commit_before>from matasano.util.converters import base64_to_bytes
from Crypto.Cipher import AES
import base64
if __name__ == "__main__":
chal_file = open("matasano/data/c7.txt", 'r');
key = "YELLOW SUBMARINE"
# Instantiate the cipher
cipher = AES.new(key, AES.MODE_ECB)
# Covert from base64 to... |
31ee90e07287ea9b7da940293564f323eedf55bb | quark/mdk_runtime_files.py | quark/mdk_runtime_files.py | import os
import tempfile
"""
TODO: This is all semi-broken since in Python quark.String is not Unicode
all the time.
"""
__all__ = ["_mdk_mktempdir", "_mdk_writefile", "_mdk_deletefile",
"_mdk_file_contents", "_mdk_readfile"]
def _mdk_mktempdir():
"""Create temporary directory."""
return tempfile... | import os
import tempfile
"""
TODO: This is all semi-broken since in Python quark.String is not Unicode
all the time.
"""
__all__ = ["_mdk_mktempdir", "_mdk_writefile", "_mdk_deletefile",
"_mdk_file_contents", "_mdk_readfile"]
def _mdk_mktempdir():
"""Create temporary directory."""
return tempfile... | Fix mdk runtime to encode/decode file contents | Fix mdk runtime to encode/decode file contents
| Python | apache-2.0 | datawire/mdk,datawire/mdk,datawire/mdk,datawire/mdk | import os
import tempfile
"""
TODO: This is all semi-broken since in Python quark.String is not Unicode
all the time.
"""
__all__ = ["_mdk_mktempdir", "_mdk_writefile", "_mdk_deletefile",
"_mdk_file_contents", "_mdk_readfile"]
def _mdk_mktempdir():
"""Create temporary directory."""
return tempfile... | import os
import tempfile
"""
TODO: This is all semi-broken since in Python quark.String is not Unicode
all the time.
"""
__all__ = ["_mdk_mktempdir", "_mdk_writefile", "_mdk_deletefile",
"_mdk_file_contents", "_mdk_readfile"]
def _mdk_mktempdir():
"""Create temporary directory."""
return tempfile... | <commit_before>import os
import tempfile
"""
TODO: This is all semi-broken since in Python quark.String is not Unicode
all the time.
"""
__all__ = ["_mdk_mktempdir", "_mdk_writefile", "_mdk_deletefile",
"_mdk_file_contents", "_mdk_readfile"]
def _mdk_mktempdir():
"""Create temporary directory."""
... | import os
import tempfile
"""
TODO: This is all semi-broken since in Python quark.String is not Unicode
all the time.
"""
__all__ = ["_mdk_mktempdir", "_mdk_writefile", "_mdk_deletefile",
"_mdk_file_contents", "_mdk_readfile"]
def _mdk_mktempdir():
"""Create temporary directory."""
return tempfile... | import os
import tempfile
"""
TODO: This is all semi-broken since in Python quark.String is not Unicode
all the time.
"""
__all__ = ["_mdk_mktempdir", "_mdk_writefile", "_mdk_deletefile",
"_mdk_file_contents", "_mdk_readfile"]
def _mdk_mktempdir():
"""Create temporary directory."""
return tempfile... | <commit_before>import os
import tempfile
"""
TODO: This is all semi-broken since in Python quark.String is not Unicode
all the time.
"""
__all__ = ["_mdk_mktempdir", "_mdk_writefile", "_mdk_deletefile",
"_mdk_file_contents", "_mdk_readfile"]
def _mdk_mktempdir():
"""Create temporary directory."""
... |
c83aa290e4c38238d39260f002722d8c9663093a | main/model/pay.py | main/model/pay.py | # coding: utf-8
from __future__ import absolute_import
from google.appengine.ext import ndb
from api import fields
import config
import model
import util
class Pay(model.Base):
name = ndb.StringProperty(default='')
date_for = ndb.DateTimeProperty(auto_now_add=True)
date_paid = ndb.DateTimeProperty(auto_now_ad... | # coding: utf-8
from __future__ import absolute_import
from google.appengine.ext import ndb
from api import fields
import config
import model
import util
class Pay(model.Base):
name = ndb.StringProperty(default='')
date_for = ndb.DateProperty(auto_now_add=True)
date_paid = ndb.DateProperty(auto_now_add=True)
... | Change datetime property to date | Change datetime property to date
| Python | mit | georgekis/salary,georgekis/salary,georgekis/salary | # coding: utf-8
from __future__ import absolute_import
from google.appengine.ext import ndb
from api import fields
import config
import model
import util
class Pay(model.Base):
name = ndb.StringProperty(default='')
date_for = ndb.DateTimeProperty(auto_now_add=True)
date_paid = ndb.DateTimeProperty(auto_now_ad... | # coding: utf-8
from __future__ import absolute_import
from google.appengine.ext import ndb
from api import fields
import config
import model
import util
class Pay(model.Base):
name = ndb.StringProperty(default='')
date_for = ndb.DateProperty(auto_now_add=True)
date_paid = ndb.DateProperty(auto_now_add=True)
... | <commit_before># coding: utf-8
from __future__ import absolute_import
from google.appengine.ext import ndb
from api import fields
import config
import model
import util
class Pay(model.Base):
name = ndb.StringProperty(default='')
date_for = ndb.DateTimeProperty(auto_now_add=True)
date_paid = ndb.DateTimePrope... | # coding: utf-8
from __future__ import absolute_import
from google.appengine.ext import ndb
from api import fields
import config
import model
import util
class Pay(model.Base):
name = ndb.StringProperty(default='')
date_for = ndb.DateProperty(auto_now_add=True)
date_paid = ndb.DateProperty(auto_now_add=True)
... | # coding: utf-8
from __future__ import absolute_import
from google.appengine.ext import ndb
from api import fields
import config
import model
import util
class Pay(model.Base):
name = ndb.StringProperty(default='')
date_for = ndb.DateTimeProperty(auto_now_add=True)
date_paid = ndb.DateTimeProperty(auto_now_ad... | <commit_before># coding: utf-8
from __future__ import absolute_import
from google.appengine.ext import ndb
from api import fields
import config
import model
import util
class Pay(model.Base):
name = ndb.StringProperty(default='')
date_for = ndb.DateTimeProperty(auto_now_add=True)
date_paid = ndb.DateTimePrope... |
0da81b53b521c22368899211dc851d6147e1a30d | common_components/static_renderers.py | common_components/static_renderers.py | from os.path import join, splitext, basename
from bricks.staticfiles import StaticCss, StaticJs, StaticFile
class _BuiltStatic(StaticFile):
has_build_stage = True
def __init__(self, *args):
StaticFile.__init__(self, *args)
self.url = self.url.rsplit('.', 1)[0] + '.' + self.target_type
class S... | from os.path import join, splitext, basename
from bricks.staticfiles import StaticCss, StaticJs, StaticFile
class _BuiltStatic(StaticFile):
has_build_stage = True
def __init__(self, *args):
StaticFile.__init__(self, *args)
self.url = self.url.rsplit('.', 1)[0] + '.' + self.target_type
class S... | Revert "fixed rendering of Sass and Coffee" | Revert "fixed rendering of Sass and Coffee"
This reverts commit b21834c9d439603f666d17aea338934bae063ef4.
| Python | mpl-2.0 | Zer0-/common_components | from os.path import join, splitext, basename
from bricks.staticfiles import StaticCss, StaticJs, StaticFile
class _BuiltStatic(StaticFile):
has_build_stage = True
def __init__(self, *args):
StaticFile.__init__(self, *args)
self.url = self.url.rsplit('.', 1)[0] + '.' + self.target_type
class S... | from os.path import join, splitext, basename
from bricks.staticfiles import StaticCss, StaticJs, StaticFile
class _BuiltStatic(StaticFile):
has_build_stage = True
def __init__(self, *args):
StaticFile.__init__(self, *args)
self.url = self.url.rsplit('.', 1)[0] + '.' + self.target_type
class S... | <commit_before>from os.path import join, splitext, basename
from bricks.staticfiles import StaticCss, StaticJs, StaticFile
class _BuiltStatic(StaticFile):
has_build_stage = True
def __init__(self, *args):
StaticFile.__init__(self, *args)
self.url = self.url.rsplit('.', 1)[0] + '.' + self.targe... | from os.path import join, splitext, basename
from bricks.staticfiles import StaticCss, StaticJs, StaticFile
class _BuiltStatic(StaticFile):
has_build_stage = True
def __init__(self, *args):
StaticFile.__init__(self, *args)
self.url = self.url.rsplit('.', 1)[0] + '.' + self.target_type
class S... | from os.path import join, splitext, basename
from bricks.staticfiles import StaticCss, StaticJs, StaticFile
class _BuiltStatic(StaticFile):
has_build_stage = True
def __init__(self, *args):
StaticFile.__init__(self, *args)
self.url = self.url.rsplit('.', 1)[0] + '.' + self.target_type
class S... | <commit_before>from os.path import join, splitext, basename
from bricks.staticfiles import StaticCss, StaticJs, StaticFile
class _BuiltStatic(StaticFile):
has_build_stage = True
def __init__(self, *args):
StaticFile.__init__(self, *args)
self.url = self.url.rsplit('.', 1)[0] + '.' + self.targe... |
61de7c1827867cea3385c5db3862e5e68caa98fd | Puli/src/octopus/dispatcher/rules/graphview.py | Puli/src/octopus/dispatcher/rules/graphview.py | from octopus.dispatcher.model import TaskNode, FolderNode, TaskGroup
from octopus.dispatcher import rules
import logging
logger = logging.getLogger("dispatcher")
class RuleError(rules.RuleError):
'''Base class for GraphViewBuilder related exceptions.'''
pass
class TaskNodeHasNoChildrenError(RuleError):
... | from octopus.dispatcher.model import TaskNode, FolderNode, TaskGroup
from octopus.dispatcher import rules
import logging
logger = logging.getLogger("dispatcher")
class RuleError(rules.RuleError):
'''Base class for GraphViewBuilder related exceptions.'''
pass
class TaskNodeHasNoChildrenError(RuleError):
... | Add a representation of GraphView object | Add a representation of GraphView object
| Python | bsd-3-clause | mikrosimage/OpenRenderManagement,mikrosimage/OpenRenderManagement,smaragden/OpenRenderManagement,smaragden/OpenRenderManagement,smaragden/OpenRenderManagement,mikrosimage/OpenRenderManagement | from octopus.dispatcher.model import TaskNode, FolderNode, TaskGroup
from octopus.dispatcher import rules
import logging
logger = logging.getLogger("dispatcher")
class RuleError(rules.RuleError):
'''Base class for GraphViewBuilder related exceptions.'''
pass
class TaskNodeHasNoChildrenError(RuleError):
... | from octopus.dispatcher.model import TaskNode, FolderNode, TaskGroup
from octopus.dispatcher import rules
import logging
logger = logging.getLogger("dispatcher")
class RuleError(rules.RuleError):
'''Base class for GraphViewBuilder related exceptions.'''
pass
class TaskNodeHasNoChildrenError(RuleError):
... | <commit_before>from octopus.dispatcher.model import TaskNode, FolderNode, TaskGroup
from octopus.dispatcher import rules
import logging
logger = logging.getLogger("dispatcher")
class RuleError(rules.RuleError):
'''Base class for GraphViewBuilder related exceptions.'''
pass
class TaskNodeHasNoChildrenError... | from octopus.dispatcher.model import TaskNode, FolderNode, TaskGroup
from octopus.dispatcher import rules
import logging
logger = logging.getLogger("dispatcher")
class RuleError(rules.RuleError):
'''Base class for GraphViewBuilder related exceptions.'''
pass
class TaskNodeHasNoChildrenError(RuleError):
... | from octopus.dispatcher.model import TaskNode, FolderNode, TaskGroup
from octopus.dispatcher import rules
import logging
logger = logging.getLogger("dispatcher")
class RuleError(rules.RuleError):
'''Base class for GraphViewBuilder related exceptions.'''
pass
class TaskNodeHasNoChildrenError(RuleError):
... | <commit_before>from octopus.dispatcher.model import TaskNode, FolderNode, TaskGroup
from octopus.dispatcher import rules
import logging
logger = logging.getLogger("dispatcher")
class RuleError(rules.RuleError):
'''Base class for GraphViewBuilder related exceptions.'''
pass
class TaskNodeHasNoChildrenError... |
f32ab8ebd509df7e815fb96189974e7db44af3e3 | plugins/owner.py | plugins/owner.py | import inspect
import traceback
from curious import commands
from curious.commands.context import Context
from curious.commands.plugin import Plugin
class Owner(Plugin):
"""
Owner-only commands.
"""
@commands.command(name="eval")
async def _eval(self, ctx: Context, *, eval_str: str):
msg ... | import inspect
import traceback
from curious import commands
from curious.commands.context import Context
from curious.commands.plugin import Plugin
def is_owner(self, ctx: Context):
return ctx.author.id == 141545699442425856 or ctx.message.author.id == ctx.bot.application_info.owner.id
class Owner(Plugin):
... | Add load and unload commands. | Add load and unload commands.
| Python | mit | SunDwarf/curiosity | import inspect
import traceback
from curious import commands
from curious.commands.context import Context
from curious.commands.plugin import Plugin
class Owner(Plugin):
"""
Owner-only commands.
"""
@commands.command(name="eval")
async def _eval(self, ctx: Context, *, eval_str: str):
msg ... | import inspect
import traceback
from curious import commands
from curious.commands.context import Context
from curious.commands.plugin import Plugin
def is_owner(self, ctx: Context):
return ctx.author.id == 141545699442425856 or ctx.message.author.id == ctx.bot.application_info.owner.id
class Owner(Plugin):
... | <commit_before>import inspect
import traceback
from curious import commands
from curious.commands.context import Context
from curious.commands.plugin import Plugin
class Owner(Plugin):
"""
Owner-only commands.
"""
@commands.command(name="eval")
async def _eval(self, ctx: Context, *, eval_str: str... | import inspect
import traceback
from curious import commands
from curious.commands.context import Context
from curious.commands.plugin import Plugin
def is_owner(self, ctx: Context):
return ctx.author.id == 141545699442425856 or ctx.message.author.id == ctx.bot.application_info.owner.id
class Owner(Plugin):
... | import inspect
import traceback
from curious import commands
from curious.commands.context import Context
from curious.commands.plugin import Plugin
class Owner(Plugin):
"""
Owner-only commands.
"""
@commands.command(name="eval")
async def _eval(self, ctx: Context, *, eval_str: str):
msg ... | <commit_before>import inspect
import traceback
from curious import commands
from curious.commands.context import Context
from curious.commands.plugin import Plugin
class Owner(Plugin):
"""
Owner-only commands.
"""
@commands.command(name="eval")
async def _eval(self, ctx: Context, *, eval_str: str... |
f5b1975aebf50af78d41b8f192dabc128ad78b2a | sc2reader/engine/plugins/__init__.py | sc2reader/engine/plugins/__init__.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals, division
from sc2reader.engine.plugins.apm import APMTracker
from sc2reader.engine.plugins.selection import SelectionTracker
from sc2reader.engine.plugins.context import ContextLoader
from sc2reader.engine.plugins.supply ... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals, division
from sc2reader.engine.plugins.apm import APMTracker
from sc2reader.engine.plugins.selection import SelectionTracker
from sc2reader.engine.plugins.context import ContextLoader
from sc2reader.engine.plugins.supply ... | Fix a small rebase error, my bad. | Fix a small rebase error, my bad.
| Python | mit | StoicLoofah/sc2reader,ggtracker/sc2reader,StoicLoofah/sc2reader,ggtracker/sc2reader | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals, division
from sc2reader.engine.plugins.apm import APMTracker
from sc2reader.engine.plugins.selection import SelectionTracker
from sc2reader.engine.plugins.context import ContextLoader
from sc2reader.engine.plugins.supply ... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals, division
from sc2reader.engine.plugins.apm import APMTracker
from sc2reader.engine.plugins.selection import SelectionTracker
from sc2reader.engine.plugins.context import ContextLoader
from sc2reader.engine.plugins.supply ... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals, division
from sc2reader.engine.plugins.apm import APMTracker
from sc2reader.engine.plugins.selection import SelectionTracker
from sc2reader.engine.plugins.context import ContextLoader
from sc2reader.engine.... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals, division
from sc2reader.engine.plugins.apm import APMTracker
from sc2reader.engine.plugins.selection import SelectionTracker
from sc2reader.engine.plugins.context import ContextLoader
from sc2reader.engine.plugins.supply ... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals, division
from sc2reader.engine.plugins.apm import APMTracker
from sc2reader.engine.plugins.selection import SelectionTracker
from sc2reader.engine.plugins.context import ContextLoader
from sc2reader.engine.plugins.supply ... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals, division
from sc2reader.engine.plugins.apm import APMTracker
from sc2reader.engine.plugins.selection import SelectionTracker
from sc2reader.engine.plugins.context import ContextLoader
from sc2reader.engine.... |
dfc46790bf8cf20f1901f99c7a97530e15fbf97c | api/search/urls.py | api/search/urls.py | from django.conf.urls import url
from api.search import views
urlpatterns = [
url(r'^$', views.Search.as_view(), name=views.Search.view_name),
url(r'^components/$', views.SearchComponents.as_view(), name=views.SearchComponents.view_name),
url(r'^files/$', views.SearchFiles.as_view(), name=views.SearchFile... | from django.conf.urls import url
from api.search import views
urlpatterns = [
url(r'^$', views.Search.as_view(), name=views.Search.view_name),
url(r'^components/$', views.SearchComponents.as_view(), name=views.SearchComponents.view_name),
url(r'^files/$', views.SearchFiles.as_view(), name=views.SearchFile... | Update name of institution search URL route | Update name of institution search URL route
| Python | apache-2.0 | crcresearch/osf.io,erinspace/osf.io,felliott/osf.io,binoculars/osf.io,Johnetordoff/osf.io,sloria/osf.io,Johnetordoff/osf.io,aaxelb/osf.io,saradbowman/osf.io,caneruguz/osf.io,mattclark/osf.io,erinspace/osf.io,hmoco/osf.io,Nesiehr/osf.io,chrisseto/osf.io,cslzchen/osf.io,brianjgeiger/osf.io,mattclark/osf.io,saradbowman/os... | from django.conf.urls import url
from api.search import views
urlpatterns = [
url(r'^$', views.Search.as_view(), name=views.Search.view_name),
url(r'^components/$', views.SearchComponents.as_view(), name=views.SearchComponents.view_name),
url(r'^files/$', views.SearchFiles.as_view(), name=views.SearchFile... | from django.conf.urls import url
from api.search import views
urlpatterns = [
url(r'^$', views.Search.as_view(), name=views.Search.view_name),
url(r'^components/$', views.SearchComponents.as_view(), name=views.SearchComponents.view_name),
url(r'^files/$', views.SearchFiles.as_view(), name=views.SearchFile... | <commit_before>from django.conf.urls import url
from api.search import views
urlpatterns = [
url(r'^$', views.Search.as_view(), name=views.Search.view_name),
url(r'^components/$', views.SearchComponents.as_view(), name=views.SearchComponents.view_name),
url(r'^files/$', views.SearchFiles.as_view(), name=v... | from django.conf.urls import url
from api.search import views
urlpatterns = [
url(r'^$', views.Search.as_view(), name=views.Search.view_name),
url(r'^components/$', views.SearchComponents.as_view(), name=views.SearchComponents.view_name),
url(r'^files/$', views.SearchFiles.as_view(), name=views.SearchFile... | from django.conf.urls import url
from api.search import views
urlpatterns = [
url(r'^$', views.Search.as_view(), name=views.Search.view_name),
url(r'^components/$', views.SearchComponents.as_view(), name=views.SearchComponents.view_name),
url(r'^files/$', views.SearchFiles.as_view(), name=views.SearchFile... | <commit_before>from django.conf.urls import url
from api.search import views
urlpatterns = [
url(r'^$', views.Search.as_view(), name=views.Search.view_name),
url(r'^components/$', views.SearchComponents.as_view(), name=views.SearchComponents.view_name),
url(r'^files/$', views.SearchFiles.as_view(), name=v... |
fb39b3ffc6fcd3df0f89cd3978796a4377335075 | tests/primitives/utils.py | tests/primitives/utils.py | import binascii
import os
import pytest
from cryptography.bindings import _ALL_APIS
from cryptography.primitives.block import BlockCipher
def generate_encrypt_test(param_loader, path, file_names, cipher_factory,
mode_factory, only_if=lambda api: True,
skip_message... | import binascii
import os
import pytest
from cryptography.bindings import _ALL_APIS
from cryptography.primitives.block import BlockCipher
def generate_encrypt_test(param_loader, path, file_names, cipher_factory,
mode_factory, only_if=lambda api: True,
skip_message... | Rewrite to avoid capitalization issues | Rewrite to avoid capitalization issues
| Python | bsd-3-clause | kimvais/cryptography,Ayrx/cryptography,dstufft/cryptography,sholsapp/cryptography,dstufft/cryptography,bwhmather/cryptography,sholsapp/cryptography,kimvais/cryptography,kimvais/cryptography,Lukasa/cryptography,skeuomorf/cryptography,sholsapp/cryptography,Hasimir/cryptography,skeuomorf/cryptography,Lukasa/cryptography,d... | import binascii
import os
import pytest
from cryptography.bindings import _ALL_APIS
from cryptography.primitives.block import BlockCipher
def generate_encrypt_test(param_loader, path, file_names, cipher_factory,
mode_factory, only_if=lambda api: True,
skip_message... | import binascii
import os
import pytest
from cryptography.bindings import _ALL_APIS
from cryptography.primitives.block import BlockCipher
def generate_encrypt_test(param_loader, path, file_names, cipher_factory,
mode_factory, only_if=lambda api: True,
skip_message... | <commit_before>import binascii
import os
import pytest
from cryptography.bindings import _ALL_APIS
from cryptography.primitives.block import BlockCipher
def generate_encrypt_test(param_loader, path, file_names, cipher_factory,
mode_factory, only_if=lambda api: True,
... | import binascii
import os
import pytest
from cryptography.bindings import _ALL_APIS
from cryptography.primitives.block import BlockCipher
def generate_encrypt_test(param_loader, path, file_names, cipher_factory,
mode_factory, only_if=lambda api: True,
skip_message... | import binascii
import os
import pytest
from cryptography.bindings import _ALL_APIS
from cryptography.primitives.block import BlockCipher
def generate_encrypt_test(param_loader, path, file_names, cipher_factory,
mode_factory, only_if=lambda api: True,
skip_message... | <commit_before>import binascii
import os
import pytest
from cryptography.bindings import _ALL_APIS
from cryptography.primitives.block import BlockCipher
def generate_encrypt_test(param_loader, path, file_names, cipher_factory,
mode_factory, only_if=lambda api: True,
... |
010040a8f7cb6a7a60b88ae80c43198fc46594d9 | tests/test_integration.py | tests/test_integration.py | import os
from unittest import TestCase
from yoconfigurator.base import read_config
from yoconfig import configure_services
from pycloudflare.services import CloudFlareService
app_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
conf = read_config(app_dir)
class ZonesTest(TestCase):
def set... | import os
import types
from unittest import TestCase
from yoconfigurator.base import read_config
from yoconfig import configure_services
from pycloudflare.services import CloudFlareService
app_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
conf = read_config(app_dir)
class ZonesTest(TestCase)... | Test iter_zones instead of get_zones | Test iter_zones instead of get_zones
| Python | mit | yola/pycloudflare,gnowxilef/pycloudflare | import os
from unittest import TestCase
from yoconfigurator.base import read_config
from yoconfig import configure_services
from pycloudflare.services import CloudFlareService
app_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
conf = read_config(app_dir)
class ZonesTest(TestCase):
def set... | import os
import types
from unittest import TestCase
from yoconfigurator.base import read_config
from yoconfig import configure_services
from pycloudflare.services import CloudFlareService
app_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
conf = read_config(app_dir)
class ZonesTest(TestCase)... | <commit_before>import os
from unittest import TestCase
from yoconfigurator.base import read_config
from yoconfig import configure_services
from pycloudflare.services import CloudFlareService
app_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
conf = read_config(app_dir)
class ZonesTest(TestCas... | import os
import types
from unittest import TestCase
from yoconfigurator.base import read_config
from yoconfig import configure_services
from pycloudflare.services import CloudFlareService
app_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
conf = read_config(app_dir)
class ZonesTest(TestCase)... | import os
from unittest import TestCase
from yoconfigurator.base import read_config
from yoconfig import configure_services
from pycloudflare.services import CloudFlareService
app_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
conf = read_config(app_dir)
class ZonesTest(TestCase):
def set... | <commit_before>import os
from unittest import TestCase
from yoconfigurator.base import read_config
from yoconfig import configure_services
from pycloudflare.services import CloudFlareService
app_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
conf = read_config(app_dir)
class ZonesTest(TestCas... |
582da24725e03a159aa47cdf730915cddab52c5d | workflows/cp-leaveout/scripts/print-node-info.py | workflows/cp-leaveout/scripts/print-node-info.py |
# EXTRACT NODE INFO PY
import argparse, os, pickle, sys
from Node import Node
from utils import abort
parser = argparse.ArgumentParser(description='Parse all log files')
parser.add_argument('directory',
help='The experiment directory (EXPID)')
args = parser.parse_args()
node_pkl = args.directo... |
# EXTRACT NODE INFO PY
import argparse, os, pickle, sys
from Node import Node
from utils import fail
parser = argparse.ArgumentParser(description='Parse all log files')
parser.add_argument('directory',
help='The experiment directory (EXPID)')
args = parser.parse_args()
node_pkl = args.director... | Replace abort() with fail() again | Replace abort() with fail() again
| Python | mit | ECP-CANDLE/Supervisor,ECP-CANDLE/Supervisor,ECP-CANDLE/Supervisor,ECP-CANDLE/Supervisor,ECP-CANDLE/Supervisor,ECP-CANDLE/Supervisor |
# EXTRACT NODE INFO PY
import argparse, os, pickle, sys
from Node import Node
from utils import abort
parser = argparse.ArgumentParser(description='Parse all log files')
parser.add_argument('directory',
help='The experiment directory (EXPID)')
args = parser.parse_args()
node_pkl = args.directo... |
# EXTRACT NODE INFO PY
import argparse, os, pickle, sys
from Node import Node
from utils import fail
parser = argparse.ArgumentParser(description='Parse all log files')
parser.add_argument('directory',
help='The experiment directory (EXPID)')
args = parser.parse_args()
node_pkl = args.director... | <commit_before>
# EXTRACT NODE INFO PY
import argparse, os, pickle, sys
from Node import Node
from utils import abort
parser = argparse.ArgumentParser(description='Parse all log files')
parser.add_argument('directory',
help='The experiment directory (EXPID)')
args = parser.parse_args()
node_pkl... |
# EXTRACT NODE INFO PY
import argparse, os, pickle, sys
from Node import Node
from utils import fail
parser = argparse.ArgumentParser(description='Parse all log files')
parser.add_argument('directory',
help='The experiment directory (EXPID)')
args = parser.parse_args()
node_pkl = args.director... |
# EXTRACT NODE INFO PY
import argparse, os, pickle, sys
from Node import Node
from utils import abort
parser = argparse.ArgumentParser(description='Parse all log files')
parser.add_argument('directory',
help='The experiment directory (EXPID)')
args = parser.parse_args()
node_pkl = args.directo... | <commit_before>
# EXTRACT NODE INFO PY
import argparse, os, pickle, sys
from Node import Node
from utils import abort
parser = argparse.ArgumentParser(description='Parse all log files')
parser.add_argument('directory',
help='The experiment directory (EXPID)')
args = parser.parse_args()
node_pkl... |
1e219dc666c91a54f072ec0f2107942c4150bbd6 | fabfile.py | fabfile.py | # -*- coding: utf-8 -*-
# http://docs.fabfile.org/en/1.5/tutorial.html
from fabric.api import *
from fabric.network import ssh
project = "gastosabertos"
env.user = 'gastosabertos'
env.hosts = ['gastosabertos.org']
#env.key_filename = '~/.ssh/ga_id_rsa'
def reset():
"""
Reset local debug env.
"""
l... | # -*- coding: utf-8 -*-
# http://docs.fabfile.org/en/1.5/tutorial.html
from fabric.api import *
from fabric.network import ssh
project = "gastosabertos"
env.user = 'gastosabertos'
env.hosts = ['gastosabertos.org']
#env.key_filename = '~/.ssh/ga_id_rsa'
def reset():
"""
Reset local debug env.
"""
l... | Install in correct virtual environment in test server | Install in correct virtual environment in test server
| Python | agpl-3.0 | andresmrm/gastos_abertos,nucleo-digital/gastos_abertos,andresmrm/gastos_abertos,LuizArmesto/gastos_abertos,okfn-brasil/gastos_abertos,okfn-brasil/gastos_abertos,LuizArmesto/gastos_abertos | # -*- coding: utf-8 -*-
# http://docs.fabfile.org/en/1.5/tutorial.html
from fabric.api import *
from fabric.network import ssh
project = "gastosabertos"
env.user = 'gastosabertos'
env.hosts = ['gastosabertos.org']
#env.key_filename = '~/.ssh/ga_id_rsa'
def reset():
"""
Reset local debug env.
"""
l... | # -*- coding: utf-8 -*-
# http://docs.fabfile.org/en/1.5/tutorial.html
from fabric.api import *
from fabric.network import ssh
project = "gastosabertos"
env.user = 'gastosabertos'
env.hosts = ['gastosabertos.org']
#env.key_filename = '~/.ssh/ga_id_rsa'
def reset():
"""
Reset local debug env.
"""
l... | <commit_before># -*- coding: utf-8 -*-
# http://docs.fabfile.org/en/1.5/tutorial.html
from fabric.api import *
from fabric.network import ssh
project = "gastosabertos"
env.user = 'gastosabertos'
env.hosts = ['gastosabertos.org']
#env.key_filename = '~/.ssh/ga_id_rsa'
def reset():
"""
Reset local debug env.... | # -*- coding: utf-8 -*-
# http://docs.fabfile.org/en/1.5/tutorial.html
from fabric.api import *
from fabric.network import ssh
project = "gastosabertos"
env.user = 'gastosabertos'
env.hosts = ['gastosabertos.org']
#env.key_filename = '~/.ssh/ga_id_rsa'
def reset():
"""
Reset local debug env.
"""
l... | # -*- coding: utf-8 -*-
# http://docs.fabfile.org/en/1.5/tutorial.html
from fabric.api import *
from fabric.network import ssh
project = "gastosabertos"
env.user = 'gastosabertos'
env.hosts = ['gastosabertos.org']
#env.key_filename = '~/.ssh/ga_id_rsa'
def reset():
"""
Reset local debug env.
"""
l... | <commit_before># -*- coding: utf-8 -*-
# http://docs.fabfile.org/en/1.5/tutorial.html
from fabric.api import *
from fabric.network import ssh
project = "gastosabertos"
env.user = 'gastosabertos'
env.hosts = ['gastosabertos.org']
#env.key_filename = '~/.ssh/ga_id_rsa'
def reset():
"""
Reset local debug env.... |
c40d63852807645a39bb1e3316a10e5f2a3ad650 | syntacticframes_project/loadmapping/management/commands/save_correspondances.py | syntacticframes_project/loadmapping/management/commands/save_correspondances.py | import csv
from os import path
from distutils.version import LooseVersion
from django.core.management.base import BaseCommand
from django.conf import settings
from syntacticframes.models import VerbNetClass
class Command(BaseCommand):
def handle(self, *args, **options):
with open(path.join(settings.SITE... | import csv
from os import path
from distutils.version import LooseVersion
from django.core.management.base import BaseCommand
from django.conf import settings
from syntacticframes.models import VerbNetClass
class Command(BaseCommand):
def handle(self, *args, **options):
with open(path.join(settings.SITE... | Save LVF before LADL in CSV to be similar to website | Save LVF before LADL in CSV to be similar to website
| Python | mit | aymara/verbenet-editor,aymara/verbenet-editor,aymara/verbenet-editor | import csv
from os import path
from distutils.version import LooseVersion
from django.core.management.base import BaseCommand
from django.conf import settings
from syntacticframes.models import VerbNetClass
class Command(BaseCommand):
def handle(self, *args, **options):
with open(path.join(settings.SITE... | import csv
from os import path
from distutils.version import LooseVersion
from django.core.management.base import BaseCommand
from django.conf import settings
from syntacticframes.models import VerbNetClass
class Command(BaseCommand):
def handle(self, *args, **options):
with open(path.join(settings.SITE... | <commit_before>import csv
from os import path
from distutils.version import LooseVersion
from django.core.management.base import BaseCommand
from django.conf import settings
from syntacticframes.models import VerbNetClass
class Command(BaseCommand):
def handle(self, *args, **options):
with open(path.joi... | import csv
from os import path
from distutils.version import LooseVersion
from django.core.management.base import BaseCommand
from django.conf import settings
from syntacticframes.models import VerbNetClass
class Command(BaseCommand):
def handle(self, *args, **options):
with open(path.join(settings.SITE... | import csv
from os import path
from distutils.version import LooseVersion
from django.core.management.base import BaseCommand
from django.conf import settings
from syntacticframes.models import VerbNetClass
class Command(BaseCommand):
def handle(self, *args, **options):
with open(path.join(settings.SITE... | <commit_before>import csv
from os import path
from distutils.version import LooseVersion
from django.core.management.base import BaseCommand
from django.conf import settings
from syntacticframes.models import VerbNetClass
class Command(BaseCommand):
def handle(self, *args, **options):
with open(path.joi... |
9a57f2493a8e7561a053077c793cdd998c9a28c9 | bucketeer/test/test_commit.py | bucketeer/test/test_commit.py | import unittest
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
def setUp(self):
# 1 bucket with 1 file
return
def tearDown(self):
# Remove all test-created buckets and files
return
def testMain(self):
self.assertTrue(commit)
if __name__ == '__main__':
unittest.... | import unittest
import boto
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
def setUp(self):
# Create a bucket with one file
connection = boto.connect_s3()
bucket = connection.create_bucket('bucket.exists')
return
def tearDown(self):
# Remove all test-created buckets and... | Add setUp and tearDown of a test bucket | Add setUp and tearDown of a test bucket
| Python | mit | mgarbacz/bucketeer | import unittest
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
def setUp(self):
# 1 bucket with 1 file
return
def tearDown(self):
# Remove all test-created buckets and files
return
def testMain(self):
self.assertTrue(commit)
if __name__ == '__main__':
unittest.... | import unittest
import boto
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
def setUp(self):
# Create a bucket with one file
connection = boto.connect_s3()
bucket = connection.create_bucket('bucket.exists')
return
def tearDown(self):
# Remove all test-created buckets and... | <commit_before>import unittest
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
def setUp(self):
# 1 bucket with 1 file
return
def tearDown(self):
# Remove all test-created buckets and files
return
def testMain(self):
self.assertTrue(commit)
if __name__ == '__main_... | import unittest
import boto
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
def setUp(self):
# Create a bucket with one file
connection = boto.connect_s3()
bucket = connection.create_bucket('bucket.exists')
return
def tearDown(self):
# Remove all test-created buckets and... | import unittest
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
def setUp(self):
# 1 bucket with 1 file
return
def tearDown(self):
# Remove all test-created buckets and files
return
def testMain(self):
self.assertTrue(commit)
if __name__ == '__main__':
unittest.... | <commit_before>import unittest
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
def setUp(self):
# 1 bucket with 1 file
return
def tearDown(self):
# Remove all test-created buckets and files
return
def testMain(self):
self.assertTrue(commit)
if __name__ == '__main_... |
860e23b6c854ea5a5babb774328e5359d346c80a | contact_form/forms.py | contact_form/forms.py |
from django import forms
from django.conf import settings
from django.template import loader
from django.core.mail import send_mail
class BaseEmailFormMixin(object):
from_email = settings.DEFAULT_FROM_EMAIL
recipient_list = [email for email, _ in settings.MANAGERS]
subject_template_name = 'contact_form/e... |
from django import forms
from django.conf import settings
from django.template import loader
from django.core.mail import send_mail
class BaseEmailFormMixin(object):
from_email = settings.DEFAULT_FROM_EMAIL
recipient_list = [email for _, email in settings.MANAGERS]
subject_template_name = 'contact_form/e... | Make email and name order fit to the default django settings file | Make email and name order fit to the default django settings file
| Python | bsd-3-clause | alainivars/django-contact-form,alainivars/django-contact-form,madisona/django-contact-form,madisona/django-contact-form |
from django import forms
from django.conf import settings
from django.template import loader
from django.core.mail import send_mail
class BaseEmailFormMixin(object):
from_email = settings.DEFAULT_FROM_EMAIL
recipient_list = [email for email, _ in settings.MANAGERS]
subject_template_name = 'contact_form/e... |
from django import forms
from django.conf import settings
from django.template import loader
from django.core.mail import send_mail
class BaseEmailFormMixin(object):
from_email = settings.DEFAULT_FROM_EMAIL
recipient_list = [email for _, email in settings.MANAGERS]
subject_template_name = 'contact_form/e... | <commit_before>
from django import forms
from django.conf import settings
from django.template import loader
from django.core.mail import send_mail
class BaseEmailFormMixin(object):
from_email = settings.DEFAULT_FROM_EMAIL
recipient_list = [email for email, _ in settings.MANAGERS]
subject_template_name = ... |
from django import forms
from django.conf import settings
from django.template import loader
from django.core.mail import send_mail
class BaseEmailFormMixin(object):
from_email = settings.DEFAULT_FROM_EMAIL
recipient_list = [email for _, email in settings.MANAGERS]
subject_template_name = 'contact_form/e... |
from django import forms
from django.conf import settings
from django.template import loader
from django.core.mail import send_mail
class BaseEmailFormMixin(object):
from_email = settings.DEFAULT_FROM_EMAIL
recipient_list = [email for email, _ in settings.MANAGERS]
subject_template_name = 'contact_form/e... | <commit_before>
from django import forms
from django.conf import settings
from django.template import loader
from django.core.mail import send_mail
class BaseEmailFormMixin(object):
from_email = settings.DEFAULT_FROM_EMAIL
recipient_list = [email for email, _ in settings.MANAGERS]
subject_template_name = ... |
84af44868ea742bb5f6d08991526a98c8c78a931 | tellurium/teconverters/__init__.py | tellurium/teconverters/__init__.py |
from __future__ import absolute_import
# converts Antimony to/from SBML
from .convert_antimony import antimonyConverter
from .convert_omex import inlineOmexImporter, OmexFormatDetector
try:
from .convert_phrasedml import phrasedmlImporter
except:
pass
from .antimony_sbo import SBOError
from .inline_omex i... |
from __future__ import absolute_import
# converts Antimony to/from SBML
from .convert_antimony import antimonyConverter
from .convert_omex import inlineOmexImporter, OmexFormatDetector
try:
from .convert_phrasedml import phrasedmlImporter
from .inline_omex import inlineOmex, saveInlineOMEX
except:
pass
... | Drop inline omex if it fails. | Drop inline omex if it fails.
| Python | apache-2.0 | sys-bio/tellurium,sys-bio/tellurium |
from __future__ import absolute_import
# converts Antimony to/from SBML
from .convert_antimony import antimonyConverter
from .convert_omex import inlineOmexImporter, OmexFormatDetector
try:
from .convert_phrasedml import phrasedmlImporter
except:
pass
from .antimony_sbo import SBOError
from .inline_omex i... |
from __future__ import absolute_import
# converts Antimony to/from SBML
from .convert_antimony import antimonyConverter
from .convert_omex import inlineOmexImporter, OmexFormatDetector
try:
from .convert_phrasedml import phrasedmlImporter
from .inline_omex import inlineOmex, saveInlineOMEX
except:
pass
... | <commit_before>
from __future__ import absolute_import
# converts Antimony to/from SBML
from .convert_antimony import antimonyConverter
from .convert_omex import inlineOmexImporter, OmexFormatDetector
try:
from .convert_phrasedml import phrasedmlImporter
except:
pass
from .antimony_sbo import SBOError
from... |
from __future__ import absolute_import
# converts Antimony to/from SBML
from .convert_antimony import antimonyConverter
from .convert_omex import inlineOmexImporter, OmexFormatDetector
try:
from .convert_phrasedml import phrasedmlImporter
from .inline_omex import inlineOmex, saveInlineOMEX
except:
pass
... |
from __future__ import absolute_import
# converts Antimony to/from SBML
from .convert_antimony import antimonyConverter
from .convert_omex import inlineOmexImporter, OmexFormatDetector
try:
from .convert_phrasedml import phrasedmlImporter
except:
pass
from .antimony_sbo import SBOError
from .inline_omex i... | <commit_before>
from __future__ import absolute_import
# converts Antimony to/from SBML
from .convert_antimony import antimonyConverter
from .convert_omex import inlineOmexImporter, OmexFormatDetector
try:
from .convert_phrasedml import phrasedmlImporter
except:
pass
from .antimony_sbo import SBOError
from... |
69b262f502bbc48204db70815476aa256bd7db6e | rmgpy/tools/canteraTest.py | rmgpy/tools/canteraTest.py | import unittest
import os
import numpy
from rmgpy.tools.canteraModel import *
class CanteraTest(unittest.TestCase):
def testIgnitionDelay(self):
"""
Test that findIgnitionDelay() works.
"""
t = numpy.arange(0,5,0.5)
P = numpy.array([0,0.33,0.5,0.9,2,4,15,16,16.1,16.2])
... | import unittest
import os
import numpy
from rmgpy.tools.canteraModel import findIgnitionDelay, CanteraCondition, Cantera
from rmgpy.quantity import Quantity
class CanteraTest(unittest.TestCase):
def testIgnitionDelay(self):
"""
Test that findIgnitionDelay() works.
"""
t = numpy.ara... | Add unit test for CanteraCondition that tests that the repr() function works | Add unit test for CanteraCondition that tests that the repr() function works
| Python | mit | nyee/RMG-Py,nickvandewiele/RMG-Py,chatelak/RMG-Py,nickvandewiele/RMG-Py,chatelak/RMG-Py,nyee/RMG-Py,pierrelb/RMG-Py,pierrelb/RMG-Py | import unittest
import os
import numpy
from rmgpy.tools.canteraModel import *
class CanteraTest(unittest.TestCase):
def testIgnitionDelay(self):
"""
Test that findIgnitionDelay() works.
"""
t = numpy.arange(0,5,0.5)
P = numpy.array([0,0.33,0.5,0.9,2,4,15,16,16.1,16.2])
... | import unittest
import os
import numpy
from rmgpy.tools.canteraModel import findIgnitionDelay, CanteraCondition, Cantera
from rmgpy.quantity import Quantity
class CanteraTest(unittest.TestCase):
def testIgnitionDelay(self):
"""
Test that findIgnitionDelay() works.
"""
t = numpy.ara... | <commit_before>import unittest
import os
import numpy
from rmgpy.tools.canteraModel import *
class CanteraTest(unittest.TestCase):
def testIgnitionDelay(self):
"""
Test that findIgnitionDelay() works.
"""
t = numpy.arange(0,5,0.5)
P = numpy.array([0,0.33,0.5,0.9,2,4,15,16,... | import unittest
import os
import numpy
from rmgpy.tools.canteraModel import findIgnitionDelay, CanteraCondition, Cantera
from rmgpy.quantity import Quantity
class CanteraTest(unittest.TestCase):
def testIgnitionDelay(self):
"""
Test that findIgnitionDelay() works.
"""
t = numpy.ara... | import unittest
import os
import numpy
from rmgpy.tools.canteraModel import *
class CanteraTest(unittest.TestCase):
def testIgnitionDelay(self):
"""
Test that findIgnitionDelay() works.
"""
t = numpy.arange(0,5,0.5)
P = numpy.array([0,0.33,0.5,0.9,2,4,15,16,16.1,16.2])
... | <commit_before>import unittest
import os
import numpy
from rmgpy.tools.canteraModel import *
class CanteraTest(unittest.TestCase):
def testIgnitionDelay(self):
"""
Test that findIgnitionDelay() works.
"""
t = numpy.arange(0,5,0.5)
P = numpy.array([0,0.33,0.5,0.9,2,4,15,16,... |
6daaaa8dd16d088cde21fd4d55e91d97602f4cfd | drivers/python/setup.py | drivers/python/setup.py | # Copyright 2010-2012 RethinkDB, all rights reserved.
from setuptools import setup
setup(name="rethinkdb"
,version="1.4.0-0"
,description="This package provides the Python driver library for the RethinkDB database server."
,url="http://rethinkdb.com"
,maintainer="RethinkDB Inc."
,maintainer_em... | # Copyright 2010-2012 RethinkDB, all rights reserved.
from setuptools import setup
setup(name="rethinkdb"
,version="1.4.0-1"
,description="This package provides the Python driver library for the RethinkDB database server."
,url="http://rethinkdb.com"
,maintainer="RethinkDB Inc."
,maintainer_em... | Update python driver version to 1.4.0-1 | Update python driver version to 1.4.0-1
| Python | agpl-3.0 | dparnell/rethinkdb,RubenKelevra/rethinkdb,victorbriz/rethinkdb,bchavez/rethinkdb,elkingtonmcb/rethinkdb,ajose01/rethinkdb,Qinusty/rethinkdb,spblightadv/rethinkdb,lenstr/rethinkdb,alash3al/rethinkdb,gavioto/rethinkdb,marshall007/rethinkdb,Qinusty/rethinkdb,gdi2290/rethinkdb,niieani/rethinkdb,bchavez/rethinkdb,bpradipt/r... | # Copyright 2010-2012 RethinkDB, all rights reserved.
from setuptools import setup
setup(name="rethinkdb"
,version="1.4.0-0"
,description="This package provides the Python driver library for the RethinkDB database server."
,url="http://rethinkdb.com"
,maintainer="RethinkDB Inc."
,maintainer_em... | # Copyright 2010-2012 RethinkDB, all rights reserved.
from setuptools import setup
setup(name="rethinkdb"
,version="1.4.0-1"
,description="This package provides the Python driver library for the RethinkDB database server."
,url="http://rethinkdb.com"
,maintainer="RethinkDB Inc."
,maintainer_em... | <commit_before># Copyright 2010-2012 RethinkDB, all rights reserved.
from setuptools import setup
setup(name="rethinkdb"
,version="1.4.0-0"
,description="This package provides the Python driver library for the RethinkDB database server."
,url="http://rethinkdb.com"
,maintainer="RethinkDB Inc."
... | # Copyright 2010-2012 RethinkDB, all rights reserved.
from setuptools import setup
setup(name="rethinkdb"
,version="1.4.0-1"
,description="This package provides the Python driver library for the RethinkDB database server."
,url="http://rethinkdb.com"
,maintainer="RethinkDB Inc."
,maintainer_em... | # Copyright 2010-2012 RethinkDB, all rights reserved.
from setuptools import setup
setup(name="rethinkdb"
,version="1.4.0-0"
,description="This package provides the Python driver library for the RethinkDB database server."
,url="http://rethinkdb.com"
,maintainer="RethinkDB Inc."
,maintainer_em... | <commit_before># Copyright 2010-2012 RethinkDB, all rights reserved.
from setuptools import setup
setup(name="rethinkdb"
,version="1.4.0-0"
,description="This package provides the Python driver library for the RethinkDB database server."
,url="http://rethinkdb.com"
,maintainer="RethinkDB Inc."
... |
ca919f7af3fe529209ea007612fd83fcd15832ef | pip_package/rlds_version.py | pip_package/rlds_version.py | # Copyright 2022 Google LLC.
#
# 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, ... | # Copyright 2022 Google LLC.
#
# 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, ... | Update RLDS to 0.1.5 (already uploaded to Pypi) | Update RLDS to 0.1.5 (already uploaded to Pypi)
PiperOrigin-RevId: 467605984
Change-Id: I421e884c38da5be935e085d5419642b8decf5373
| Python | apache-2.0 | google-research/rlds,google-research/rlds | # Copyright 2022 Google LLC.
#
# 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, ... | # Copyright 2022 Google LLC.
#
# 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, ... | <commit_before># Copyright 2022 Google LLC.
#
# 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 ... | # Copyright 2022 Google LLC.
#
# 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, ... | # Copyright 2022 Google LLC.
#
# 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, ... | <commit_before># Copyright 2022 Google LLC.
#
# 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 ... |
7e7f9da097563d8fbd407268093b56c2f10464a5 | radar/radar/tests/validation/test_reset_password_validation.py | radar/radar/tests/validation/test_reset_password_validation.py | import pytest
from radar.validation.reset_password import ResetPasswordValidation
from radar.validation.core import ValidationError
from radar.tests.validation.helpers import validation_runner
def test_valid():
obj = valid({
'token': '12345',
'username': 'hello',
'password': 'password',
... | import pytest
from radar.validation.reset_password import ResetPasswordValidation
from radar.validation.core import ValidationError
from radar.tests.validation.helpers import validation_runner
def test_valid():
obj = valid({
'token': '12345',
'username': 'hello',
'password': '2irPtfNUURf8... | Use stronger password in reset password test | Use stronger password in reset password test
| Python | agpl-3.0 | renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar | import pytest
from radar.validation.reset_password import ResetPasswordValidation
from radar.validation.core import ValidationError
from radar.tests.validation.helpers import validation_runner
def test_valid():
obj = valid({
'token': '12345',
'username': 'hello',
'password': 'password',
... | import pytest
from radar.validation.reset_password import ResetPasswordValidation
from radar.validation.core import ValidationError
from radar.tests.validation.helpers import validation_runner
def test_valid():
obj = valid({
'token': '12345',
'username': 'hello',
'password': '2irPtfNUURf8... | <commit_before>import pytest
from radar.validation.reset_password import ResetPasswordValidation
from radar.validation.core import ValidationError
from radar.tests.validation.helpers import validation_runner
def test_valid():
obj = valid({
'token': '12345',
'username': 'hello',
'password'... | import pytest
from radar.validation.reset_password import ResetPasswordValidation
from radar.validation.core import ValidationError
from radar.tests.validation.helpers import validation_runner
def test_valid():
obj = valid({
'token': '12345',
'username': 'hello',
'password': '2irPtfNUURf8... | import pytest
from radar.validation.reset_password import ResetPasswordValidation
from radar.validation.core import ValidationError
from radar.tests.validation.helpers import validation_runner
def test_valid():
obj = valid({
'token': '12345',
'username': 'hello',
'password': 'password',
... | <commit_before>import pytest
from radar.validation.reset_password import ResetPasswordValidation
from radar.validation.core import ValidationError
from radar.tests.validation.helpers import validation_runner
def test_valid():
obj = valid({
'token': '12345',
'username': 'hello',
'password'... |
002d1ac1d2fcf88a7df46681ef7b3969f08e9a8f | qual/calendar.py | qual/calendar.py | from datetime import date
class DateWithCalendar(object):
def __init__(self, calendar_class, date):
self.calendar = calendar_class
self.date = date
class ProlepticGregorianCalendar(object):
def date(self, year, month, day):
d = date(year, month, day)
return DateWithCalendar(Pro... | from datetime import date, timedelta
class DateWithCalendar(object):
def __init__(self, calendar_class, date):
self.calendar = calendar_class
self.date = date
def convert_to(self, calendar):
return calendar.from_date(self.date)
def __eq__(self, other):
return self.calendar... | Allow conversion from Julian to ProlepticGregorian, also comparison of dates. | Allow conversion from Julian to ProlepticGregorian, also comparison of dates.
| Python | apache-2.0 | jwg4/qual,jwg4/calexicon | from datetime import date
class DateWithCalendar(object):
def __init__(self, calendar_class, date):
self.calendar = calendar_class
self.date = date
class ProlepticGregorianCalendar(object):
def date(self, year, month, day):
d = date(year, month, day)
return DateWithCalendar(Pro... | from datetime import date, timedelta
class DateWithCalendar(object):
def __init__(self, calendar_class, date):
self.calendar = calendar_class
self.date = date
def convert_to(self, calendar):
return calendar.from_date(self.date)
def __eq__(self, other):
return self.calendar... | <commit_before>from datetime import date
class DateWithCalendar(object):
def __init__(self, calendar_class, date):
self.calendar = calendar_class
self.date = date
class ProlepticGregorianCalendar(object):
def date(self, year, month, day):
d = date(year, month, day)
return DateW... | from datetime import date, timedelta
class DateWithCalendar(object):
def __init__(self, calendar_class, date):
self.calendar = calendar_class
self.date = date
def convert_to(self, calendar):
return calendar.from_date(self.date)
def __eq__(self, other):
return self.calendar... | from datetime import date
class DateWithCalendar(object):
def __init__(self, calendar_class, date):
self.calendar = calendar_class
self.date = date
class ProlepticGregorianCalendar(object):
def date(self, year, month, day):
d = date(year, month, day)
return DateWithCalendar(Pro... | <commit_before>from datetime import date
class DateWithCalendar(object):
def __init__(self, calendar_class, date):
self.calendar = calendar_class
self.date = date
class ProlepticGregorianCalendar(object):
def date(self, year, month, day):
d = date(year, month, day)
return DateW... |
99c8473b0d1f778830c642c0f0e2b6c5bc1f3c80 | plugins/plugin_count_ip.py | plugins/plugin_count_ip.py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
sys.path.insert(0, "..")
from libs.manager import Plugin
class CountIPNew(Plugin):
def __init__(self, **kwargs):
self.keywords = ['counter', 'ip']
self.total_ip = 0
self.ip_dict = {}
def __process_doc(self, **kwargs):
i... | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
sys.path.insert(0, "..")
from libs.manager import Plugin
from bson.code import Code
class CountIPNew(Plugin):
def __init__(self, **kwargs):
self.keywords = ['counter', 'ip']
self.result = {}
def process(self, **kwargs):
collect... | Add plugin count ip using mongo aggregation framework | Add plugin count ip using mongo aggregation framework
| Python | apache-2.0 | keepzero/fluent-mongo-parser | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
sys.path.insert(0, "..")
from libs.manager import Plugin
class CountIPNew(Plugin):
def __init__(self, **kwargs):
self.keywords = ['counter', 'ip']
self.total_ip = 0
self.ip_dict = {}
def __process_doc(self, **kwargs):
i... | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
sys.path.insert(0, "..")
from libs.manager import Plugin
from bson.code import Code
class CountIPNew(Plugin):
def __init__(self, **kwargs):
self.keywords = ['counter', 'ip']
self.result = {}
def process(self, **kwargs):
collect... | <commit_before>#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
sys.path.insert(0, "..")
from libs.manager import Plugin
class CountIPNew(Plugin):
def __init__(self, **kwargs):
self.keywords = ['counter', 'ip']
self.total_ip = 0
self.ip_dict = {}
def __process_doc(self, **kwa... | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
sys.path.insert(0, "..")
from libs.manager import Plugin
from bson.code import Code
class CountIPNew(Plugin):
def __init__(self, **kwargs):
self.keywords = ['counter', 'ip']
self.result = {}
def process(self, **kwargs):
collect... | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
sys.path.insert(0, "..")
from libs.manager import Plugin
class CountIPNew(Plugin):
def __init__(self, **kwargs):
self.keywords = ['counter', 'ip']
self.total_ip = 0
self.ip_dict = {}
def __process_doc(self, **kwargs):
i... | <commit_before>#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
sys.path.insert(0, "..")
from libs.manager import Plugin
class CountIPNew(Plugin):
def __init__(self, **kwargs):
self.keywords = ['counter', 'ip']
self.total_ip = 0
self.ip_dict = {}
def __process_doc(self, **kwa... |
fa1f148b33c61e91044c19a88737abd2ec86c6bf | yunity/api/public/auth.py | yunity/api/public/auth.py | from django.contrib.auth import logout
from django.middleware.csrf import get_token as generate_csrf_token_for_frontend
from rest_framework import status, viewsets
from rest_framework.decorators import list_route
from rest_framework.response import Response
from yunity.api.serializers import UserSerializer, AuthLoginSe... | from django.contrib.auth import logout
from django.middleware.csrf import get_token as generate_csrf_token_for_frontend
from rest_framework import status, viewsets
from rest_framework.decorators import list_route
from rest_framework.response import Response
from yunity.api.serializers import UserSerializer, AuthLoginSe... | Enable easy login through browsable API (discovery through serializer_class) | Enable easy login through browsable API (discovery through serializer_class)
| Python | agpl-3.0 | yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/yunity-core | from django.contrib.auth import logout
from django.middleware.csrf import get_token as generate_csrf_token_for_frontend
from rest_framework import status, viewsets
from rest_framework.decorators import list_route
from rest_framework.response import Response
from yunity.api.serializers import UserSerializer, AuthLoginSe... | from django.contrib.auth import logout
from django.middleware.csrf import get_token as generate_csrf_token_for_frontend
from rest_framework import status, viewsets
from rest_framework.decorators import list_route
from rest_framework.response import Response
from yunity.api.serializers import UserSerializer, AuthLoginSe... | <commit_before>from django.contrib.auth import logout
from django.middleware.csrf import get_token as generate_csrf_token_for_frontend
from rest_framework import status, viewsets
from rest_framework.decorators import list_route
from rest_framework.response import Response
from yunity.api.serializers import UserSerializ... | from django.contrib.auth import logout
from django.middleware.csrf import get_token as generate_csrf_token_for_frontend
from rest_framework import status, viewsets
from rest_framework.decorators import list_route
from rest_framework.response import Response
from yunity.api.serializers import UserSerializer, AuthLoginSe... | from django.contrib.auth import logout
from django.middleware.csrf import get_token as generate_csrf_token_for_frontend
from rest_framework import status, viewsets
from rest_framework.decorators import list_route
from rest_framework.response import Response
from yunity.api.serializers import UserSerializer, AuthLoginSe... | <commit_before>from django.contrib.auth import logout
from django.middleware.csrf import get_token as generate_csrf_token_for_frontend
from rest_framework import status, viewsets
from rest_framework.decorators import list_route
from rest_framework.response import Response
from yunity.api.serializers import UserSerializ... |
4ce8cb1d943c034cf2d0435772864b34588af96d | .bin/broadcast_any_song.py | .bin/broadcast_any_song.py | #!/usr/bin/env python2
################################################################################
# broadcast_any_song.py
#
# Uses the Exfm REST API to broadcast a song, (basically scours Tumblr for an
# audio file matching a query then sends it to PiFM.)
#
# Maintained By: Ryan Jacobs <ryan.mjacobs@gmail.com>
#
... | #!/usr/bin/env python2
################################################################################
# broadcast_any_song.py
#
# Uses the Exfm REST API to broadcast a song, (basically scours Tumblr for an
# audio file matching a query then sends it to PiFM.)
#
# Maintained By: Ryan Jacobs <ryan.mjacobs@gmail.com>
#
... | Use curl instead of wget. | Use curl instead of wget.
| Python | mit | ryanmjacobs/ryans_dotfiles,ryanmjacobs/ryans_dotfiles | #!/usr/bin/env python2
################################################################################
# broadcast_any_song.py
#
# Uses the Exfm REST API to broadcast a song, (basically scours Tumblr for an
# audio file matching a query then sends it to PiFM.)
#
# Maintained By: Ryan Jacobs <ryan.mjacobs@gmail.com>
#
... | #!/usr/bin/env python2
################################################################################
# broadcast_any_song.py
#
# Uses the Exfm REST API to broadcast a song, (basically scours Tumblr for an
# audio file matching a query then sends it to PiFM.)
#
# Maintained By: Ryan Jacobs <ryan.mjacobs@gmail.com>
#
... | <commit_before>#!/usr/bin/env python2
################################################################################
# broadcast_any_song.py
#
# Uses the Exfm REST API to broadcast a song, (basically scours Tumblr for an
# audio file matching a query then sends it to PiFM.)
#
# Maintained By: Ryan Jacobs <ryan.mjacob... | #!/usr/bin/env python2
################################################################################
# broadcast_any_song.py
#
# Uses the Exfm REST API to broadcast a song, (basically scours Tumblr for an
# audio file matching a query then sends it to PiFM.)
#
# Maintained By: Ryan Jacobs <ryan.mjacobs@gmail.com>
#
... | #!/usr/bin/env python2
################################################################################
# broadcast_any_song.py
#
# Uses the Exfm REST API to broadcast a song, (basically scours Tumblr for an
# audio file matching a query then sends it to PiFM.)
#
# Maintained By: Ryan Jacobs <ryan.mjacobs@gmail.com>
#
... | <commit_before>#!/usr/bin/env python2
################################################################################
# broadcast_any_song.py
#
# Uses the Exfm REST API to broadcast a song, (basically scours Tumblr for an
# audio file matching a query then sends it to PiFM.)
#
# Maintained By: Ryan Jacobs <ryan.mjacob... |
bcb58ba1909f82f3ff11cfdfa05bbfaace7f82ec | AFQ/__init__.py | AFQ/__init__.py | from .api import * # noqa
from .data import * # noqa
from .utils import * # noqa
from ._meta import __version__ # noqa
| from .api import * # noqa
from .data import * # noqa
from .utils import * # noqa
from .version import __version__ # noqa
| Change back this file name to version | Change back this file name to version
| Python | bsd-2-clause | arokem/pyAFQ,yeatmanlab/pyAFQ,arokem/pyAFQ,yeatmanlab/pyAFQ | from .api import * # noqa
from .data import * # noqa
from .utils import * # noqa
from ._meta import __version__ # noqa
Change back this file name to version | from .api import * # noqa
from .data import * # noqa
from .utils import * # noqa
from .version import __version__ # noqa
| <commit_before>from .api import * # noqa
from .data import * # noqa
from .utils import * # noqa
from ._meta import __version__ # noqa
<commit_msg>Change back this file name to version<commit_after> | from .api import * # noqa
from .data import * # noqa
from .utils import * # noqa
from .version import __version__ # noqa
| from .api import * # noqa
from .data import * # noqa
from .utils import * # noqa
from ._meta import __version__ # noqa
Change back this file name to versionfrom .api import * # noqa
from .data import * # noqa
from .utils import * # noqa
from .version import __version__ # noqa
| <commit_before>from .api import * # noqa
from .data import * # noqa
from .utils import * # noqa
from ._meta import __version__ # noqa
<commit_msg>Change back this file name to version<commit_after>from .api import * # noqa
from .data import * # noqa
from .utils import * # noqa
from .version import __version__ #... |
511e92e796224d8185a820d88d12d52c5479b739 | pomodoro_calculator/main.py | pomodoro_calculator/main.py | """Calculate the number of Pomodori available within a time period.
Usage:
get-pomodori [--from=<time>] [--break=<minutes>] [--long-break=<minutes>] <end-time>
get-pomodori (-h | --help | --version)
Options:
--version show program's version number and exit.
-h, --help show t... | """Calculate the number of Pomodori available within a time period.
Usage:
get-pomodori [--from=<time>] [--break=<minutes>] [--long-break=<minutes>] <end-time>
get-pomodori (-h | --help | --version)
Options:
--version show program's version number and exit.
-h, --help show t... | Fix command line usage options | Fix command line usage options
| Python | mit | Matt-Deacalion/Pomodoro-Calculator | """Calculate the number of Pomodori available within a time period.
Usage:
get-pomodori [--from=<time>] [--break=<minutes>] [--long-break=<minutes>] <end-time>
get-pomodori (-h | --help | --version)
Options:
--version show program's version number and exit.
-h, --help show t... | """Calculate the number of Pomodori available within a time period.
Usage:
get-pomodori [--from=<time>] [--break=<minutes>] [--long-break=<minutes>] <end-time>
get-pomodori (-h | --help | --version)
Options:
--version show program's version number and exit.
-h, --help show t... | <commit_before>"""Calculate the number of Pomodori available within a time period.
Usage:
get-pomodori [--from=<time>] [--break=<minutes>] [--long-break=<minutes>] <end-time>
get-pomodori (-h | --help | --version)
Options:
--version show program's version number and exit.
-h, --help ... | """Calculate the number of Pomodori available within a time period.
Usage:
get-pomodori [--from=<time>] [--break=<minutes>] [--long-break=<minutes>] <end-time>
get-pomodori (-h | --help | --version)
Options:
--version show program's version number and exit.
-h, --help show t... | """Calculate the number of Pomodori available within a time period.
Usage:
get-pomodori [--from=<time>] [--break=<minutes>] [--long-break=<minutes>] <end-time>
get-pomodori (-h | --help | --version)
Options:
--version show program's version number and exit.
-h, --help show t... | <commit_before>"""Calculate the number of Pomodori available within a time period.
Usage:
get-pomodori [--from=<time>] [--break=<minutes>] [--long-break=<minutes>] <end-time>
get-pomodori (-h | --help | --version)
Options:
--version show program's version number and exit.
-h, --help ... |
e49e7484987e3b508802adbd9e05b2b156eb6bdd | manage.py | manage.py | import os
import coverage
from flask_script import Manager, Shell
from flask_migrate import Migrate, MigrateCommand
from config import basedir
from app import create_app, db
from app.models import User, Dictionary
app = create_app(os.getenv("MYDICTIONARY_CONFIG") or "default")
migrate = Migrate(app, db)
manager = Ma... | import os
import coverage
from flask_script import Manager, Shell
from flask_migrate import Migrate, MigrateCommand
from config import basedir
from app import create_app, db
from app.models import User, Dictionary, Word
app = create_app(os.getenv("MYDICTIONARY_CONFIG") or "default")
migrate = Migrate(app, db)
manage... | Add Word model to shell context | Add Word model to shell context
| Python | mit | Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary | import os
import coverage
from flask_script import Manager, Shell
from flask_migrate import Migrate, MigrateCommand
from config import basedir
from app import create_app, db
from app.models import User, Dictionary
app = create_app(os.getenv("MYDICTIONARY_CONFIG") or "default")
migrate = Migrate(app, db)
manager = Ma... | import os
import coverage
from flask_script import Manager, Shell
from flask_migrate import Migrate, MigrateCommand
from config import basedir
from app import create_app, db
from app.models import User, Dictionary, Word
app = create_app(os.getenv("MYDICTIONARY_CONFIG") or "default")
migrate = Migrate(app, db)
manage... | <commit_before>import os
import coverage
from flask_script import Manager, Shell
from flask_migrate import Migrate, MigrateCommand
from config import basedir
from app import create_app, db
from app.models import User, Dictionary
app = create_app(os.getenv("MYDICTIONARY_CONFIG") or "default")
migrate = Migrate(app, d... | import os
import coverage
from flask_script import Manager, Shell
from flask_migrate import Migrate, MigrateCommand
from config import basedir
from app import create_app, db
from app.models import User, Dictionary, Word
app = create_app(os.getenv("MYDICTIONARY_CONFIG") or "default")
migrate = Migrate(app, db)
manage... | import os
import coverage
from flask_script import Manager, Shell
from flask_migrate import Migrate, MigrateCommand
from config import basedir
from app import create_app, db
from app.models import User, Dictionary
app = create_app(os.getenv("MYDICTIONARY_CONFIG") or "default")
migrate = Migrate(app, db)
manager = Ma... | <commit_before>import os
import coverage
from flask_script import Manager, Shell
from flask_migrate import Migrate, MigrateCommand
from config import basedir
from app import create_app, db
from app.models import User, Dictionary
app = create_app(os.getenv("MYDICTIONARY_CONFIG") or "default")
migrate = Migrate(app, d... |
d883a0fd09a42ff84ebb2ccf331692167370444b | ESLog/esloghandler.py | ESLog/esloghandler.py | # -*- coding: utf-8 -*-
from datetime import datetime
import logging
import os
import json
import urllib.request
import urllib.parse
class ESLogHandler(logging.Handler):
def __init__(self, url, index=None, doc_type="log", level=logging.NOTSET):
logging.Handler.__init__(self, level=level)
... | # -*- coding: utf-8 -*-
from datetime import datetime
import logging
import os
import json
import urllib.request
import urllib.parse
class ESLogHandler(logging.Handler):
def __init__(self, url, index=None, doc_type="log", level=logging.NOTSET):
logging.Handler.__init__(self, level=level)
# Parse... | Revert "trying to simplefy __init__" | Revert "trying to simplefy __init__"
This reverts commit f2e3887bcd53b1c35af2d9dfe2363ea9e2a407f5.
| Python | mit | Rio/ESLog | # -*- coding: utf-8 -*-
from datetime import datetime
import logging
import os
import json
import urllib.request
import urllib.parse
class ESLogHandler(logging.Handler):
def __init__(self, url, index=None, doc_type="log", level=logging.NOTSET):
logging.Handler.__init__(self, level=level)
... | # -*- coding: utf-8 -*-
from datetime import datetime
import logging
import os
import json
import urllib.request
import urllib.parse
class ESLogHandler(logging.Handler):
def __init__(self, url, index=None, doc_type="log", level=logging.NOTSET):
logging.Handler.__init__(self, level=level)
# Parse... | <commit_before># -*- coding: utf-8 -*-
from datetime import datetime
import logging
import os
import json
import urllib.request
import urllib.parse
class ESLogHandler(logging.Handler):
def __init__(self, url, index=None, doc_type="log", level=logging.NOTSET):
logging.Handler.__init__(self, level=level)
... | # -*- coding: utf-8 -*-
from datetime import datetime
import logging
import os
import json
import urllib.request
import urllib.parse
class ESLogHandler(logging.Handler):
def __init__(self, url, index=None, doc_type="log", level=logging.NOTSET):
logging.Handler.__init__(self, level=level)
# Parse... | # -*- coding: utf-8 -*-
from datetime import datetime
import logging
import os
import json
import urllib.request
import urllib.parse
class ESLogHandler(logging.Handler):
def __init__(self, url, index=None, doc_type="log", level=logging.NOTSET):
logging.Handler.__init__(self, level=level)
... | <commit_before># -*- coding: utf-8 -*-
from datetime import datetime
import logging
import os
import json
import urllib.request
import urllib.parse
class ESLogHandler(logging.Handler):
def __init__(self, url, index=None, doc_type="log", level=logging.NOTSET):
logging.Handler.__init__(self, level=level)
... |
ad8cdf0ed4f2b6f3e2586dc5c6dd0f922a556972 | ExpandRegion.py | ExpandRegion.py | import sublime_plugin
from basic_expansions import foo
class ExpandRegionCommand(sublime_plugin.TextCommand):
def run(self, edit):
foo(); | import sublime, sublime_plugin, re
class ExpandRegionCommand(sublime_plugin.TextCommand):
def run(self, edit):
region = self.view.sel()[0]
string = self.view.substr(sublime.Region(0, self.view.size()))
start = region.begin()
end = region.end()
if self.expand_to_word(string, start, end) is None:
... | Add expand selection to word | Add expand selection to word
| Python | mit | aronwoost/sublime-expand-region,johyphenel/sublime-expand-region,johyphenel/sublime-expand-region | import sublime_plugin
from basic_expansions import foo
class ExpandRegionCommand(sublime_plugin.TextCommand):
def run(self, edit):
foo();Add expand selection to word | import sublime, sublime_plugin, re
class ExpandRegionCommand(sublime_plugin.TextCommand):
def run(self, edit):
region = self.view.sel()[0]
string = self.view.substr(sublime.Region(0, self.view.size()))
start = region.begin()
end = region.end()
if self.expand_to_word(string, start, end) is None:
... | <commit_before>import sublime_plugin
from basic_expansions import foo
class ExpandRegionCommand(sublime_plugin.TextCommand):
def run(self, edit):
foo();<commit_msg>Add expand selection to word<commit_after> | import sublime, sublime_plugin, re
class ExpandRegionCommand(sublime_plugin.TextCommand):
def run(self, edit):
region = self.view.sel()[0]
string = self.view.substr(sublime.Region(0, self.view.size()))
start = region.begin()
end = region.end()
if self.expand_to_word(string, start, end) is None:
... | import sublime_plugin
from basic_expansions import foo
class ExpandRegionCommand(sublime_plugin.TextCommand):
def run(self, edit):
foo();Add expand selection to wordimport sublime, sublime_plugin, re
class ExpandRegionCommand(sublime_plugin.TextCommand):
def run(self, edit):
region = self.view.sel()[0]
... | <commit_before>import sublime_plugin
from basic_expansions import foo
class ExpandRegionCommand(sublime_plugin.TextCommand):
def run(self, edit):
foo();<commit_msg>Add expand selection to word<commit_after>import sublime, sublime_plugin, re
class ExpandRegionCommand(sublime_plugin.TextCommand):
def run(self, ... |
3e45f7d71fbd154a1039836228098efb62457f1b | tests/app/dvla_organisation/test_rest.py | tests/app/dvla_organisation/test_rest.py | from flask import json
from tests import create_authorization_header
def test_get_dvla_organisations(client):
auth_header = create_authorization_header()
response = client.get('/dvla_organisations', headers=[auth_header])
assert response.status_code == 200
dvla_organisations = json.loads(response.g... | from flask import json
from tests import create_authorization_header
def test_get_dvla_organisations(client):
auth_header = create_authorization_header()
response = client.get('/dvla_organisations', headers=[auth_header])
assert response.status_code == 200
dvla_organisations = json.loads(response.g... | Refactor test so that it does not have to change every time we add a new organisation. | Refactor test so that it does not have to change every time we add a new organisation.
| Python | mit | alphagov/notifications-api,alphagov/notifications-api | from flask import json
from tests import create_authorization_header
def test_get_dvla_organisations(client):
auth_header = create_authorization_header()
response = client.get('/dvla_organisations', headers=[auth_header])
assert response.status_code == 200
dvla_organisations = json.loads(response.g... | from flask import json
from tests import create_authorization_header
def test_get_dvla_organisations(client):
auth_header = create_authorization_header()
response = client.get('/dvla_organisations', headers=[auth_header])
assert response.status_code == 200
dvla_organisations = json.loads(response.g... | <commit_before>from flask import json
from tests import create_authorization_header
def test_get_dvla_organisations(client):
auth_header = create_authorization_header()
response = client.get('/dvla_organisations', headers=[auth_header])
assert response.status_code == 200
dvla_organisations = json.l... | from flask import json
from tests import create_authorization_header
def test_get_dvla_organisations(client):
auth_header = create_authorization_header()
response = client.get('/dvla_organisations', headers=[auth_header])
assert response.status_code == 200
dvla_organisations = json.loads(response.g... | from flask import json
from tests import create_authorization_header
def test_get_dvla_organisations(client):
auth_header = create_authorization_header()
response = client.get('/dvla_organisations', headers=[auth_header])
assert response.status_code == 200
dvla_organisations = json.loads(response.g... | <commit_before>from flask import json
from tests import create_authorization_header
def test_get_dvla_organisations(client):
auth_header = create_authorization_header()
response = client.get('/dvla_organisations', headers=[auth_header])
assert response.status_code == 200
dvla_organisations = json.l... |
e3c840567fae974b2a1f169b05b86de97b60c8d0 | gitcms/publications/urls.py | gitcms/publications/urls.py | from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publications/files/(?P<fi... | from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publications/files/(?P<fi... | Remove stay mention to BASE_URL | Remove stay mention to BASE_URL
| Python | agpl-3.0 | luispedro/django-gitcms,luispedro/django-gitcms | from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publications/files/(?P<fi... | from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publications/files/(?P<fi... | <commit_before>from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publicatio... | from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publications/files/(?P<fi... | from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publications/files/(?P<fi... | <commit_before>from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publicatio... |
99906c1d0db30454f1d3c12d2076abe05939ab0d | redash/cli/organization.py | redash/cli/organization.py | from flask_script import Manager
from redash import models
manager = Manager(help="Organization management commands.")
@manager.option('domains', help="comma separated list of domains to allow")
def set_google_apps_domains(domains):
organization = models.Organization.select().first()
organization.settings[m... | from flask_script import Manager
from redash import models
manager = Manager(help="Organization management commands.")
@manager.option('domains', help="comma separated list of domains to allow")
def set_google_apps_domains(domains):
organization = models.Organization.select().first()
organization.settings[m... | Add 'manage.py org list' command | Add 'manage.py org list' command
'org list' simply prints out the organizations.
| Python | bsd-2-clause | getredash/redash,easytaxibr/redash,EverlyWell/redash,ninneko/redash,alexanderlz/redash,chriszs/redash,imsally/redash,stefanseifert/redash,easytaxibr/redash,vishesh92/redash,crowdworks/redash,guaguadev/redash,vishesh92/redash,stefanseifert/redash,denisov-vlad/redash,denisov-vlad/redash,rockwotj/redash,hudl/redash,hudl/r... | from flask_script import Manager
from redash import models
manager = Manager(help="Organization management commands.")
@manager.option('domains', help="comma separated list of domains to allow")
def set_google_apps_domains(domains):
organization = models.Organization.select().first()
organization.settings[m... | from flask_script import Manager
from redash import models
manager = Manager(help="Organization management commands.")
@manager.option('domains', help="comma separated list of domains to allow")
def set_google_apps_domains(domains):
organization = models.Organization.select().first()
organization.settings[m... | <commit_before>from flask_script import Manager
from redash import models
manager = Manager(help="Organization management commands.")
@manager.option('domains', help="comma separated list of domains to allow")
def set_google_apps_domains(domains):
organization = models.Organization.select().first()
organiza... | from flask_script import Manager
from redash import models
manager = Manager(help="Organization management commands.")
@manager.option('domains', help="comma separated list of domains to allow")
def set_google_apps_domains(domains):
organization = models.Organization.select().first()
organization.settings[m... | from flask_script import Manager
from redash import models
manager = Manager(help="Organization management commands.")
@manager.option('domains', help="comma separated list of domains to allow")
def set_google_apps_domains(domains):
organization = models.Organization.select().first()
organization.settings[m... | <commit_before>from flask_script import Manager
from redash import models
manager = Manager(help="Organization management commands.")
@manager.option('domains', help="comma separated list of domains to allow")
def set_google_apps_domains(domains):
organization = models.Organization.select().first()
organiza... |
0037017e5d496127df10385ef5cd28fd0149aa76 | account_payment_include_draft_move/__openerp__.py | account_payment_include_draft_move/__openerp__.py | # -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gener... | # -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gener... | Move maintainer key out of the manifest | [IMP] Move maintainer key out of the manifest
| Python | agpl-3.0 | ndtran/bank-payment,syci/bank-payment,sergio-incaser/bank-payment,Antiun/bank-payment,syci/bank-payment,hbrunn/bank-payment,diagramsoftware/bank-payment,CompassionCH/bank-payment,damdam-s/bank-payment,sergio-teruel/bank-payment,CompassionCH/bank-payment,Antiun/bank-payment,David-Amaro/bank-payment,sergiocorato/bank-pay... | # -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gener... | # -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gener... | <commit_before># -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... | # -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gener... | # -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gener... | <commit_before># -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... |
a7fb5345c8f01524dd39dc8286d3cbe2f337f120 | py/g1/networks/servers/g1/networks/servers/__init__.py | py/g1/networks/servers/g1/networks/servers/__init__.py | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler):
self._socket = socket
self._handl... | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler):
self._socket = socket
self._handl... | Add a TODO explaining why tasks.CompletionQueue needs a capacity limit | Add a TODO explaining why tasks.CompletionQueue needs a capacity limit
| Python | mit | clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler):
self._socket = socket
self._handl... | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler):
self._socket = socket
self._handl... | <commit_before>__all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler):
self._socket = socket
... | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler):
self._socket = socket
self._handl... | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler):
self._socket = socket
self._handl... | <commit_before>__all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler):
self._socket = socket
... |
cc85fdf3b44b7a69b8d0406c170d409783687d2d | __TEMPLATE__.py | __TEMPLATE__.py | """Module docstring. This talks about the module."""
# -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
IS_MAIN = True if __name__ == '__main__' else False
if IS_MAIN:
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
... | """Module docstring. This talks about the module."""
# -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
IS_MAIN = True if __name__ == '__main__' else False
if IS_MAIN:
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
... | Use Docstring as default title value. | Use Docstring as default title value.
| Python | apache-2.0 | christabor/MoAL,christabor/MoAL,christabor/MoAL,christabor/MoAL,christabor/MoAL | """Module docstring. This talks about the module."""
# -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
IS_MAIN = True if __name__ == '__main__' else False
if IS_MAIN:
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
... | """Module docstring. This talks about the module."""
# -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
IS_MAIN = True if __name__ == '__main__' else False
if IS_MAIN:
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
... | <commit_before>"""Module docstring. This talks about the module."""
# -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
IS_MAIN = True if __name__ == '__main__' else False
if IS_MAIN:
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display i... | """Module docstring. This talks about the module."""
# -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
IS_MAIN = True if __name__ == '__main__' else False
if IS_MAIN:
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
... | """Module docstring. This talks about the module."""
# -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
IS_MAIN = True if __name__ == '__main__' else False
if IS_MAIN:
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
... | <commit_before>"""Module docstring. This talks about the module."""
# -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
IS_MAIN = True if __name__ == '__main__' else False
if IS_MAIN:
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display i... |
58d11644b08a91ab1e71f697741197f1b697d817 | tests/request/test_request_header.py | tests/request/test_request_header.py | def test_multiple_same_headers():
pass
def test_header_case_insensitivity():
pass
def test_header_with_continuation_lines():
pass
def test_request_without_headers():
pass
def test_invalid_header_syntax():
pass
| from httoop import Headers, InvalidHeader
def test_multiple_same_headers():
pass
def test_header_case_insensitivity():
pass
def test_header_with_continuation_lines():
h = Headers()
h.parse('Foo: bar\r\n baz')
h.parse('Foo2: bar\r\n\tbaz')
h.parse('Foo3: bar\r\n baz')
h.parse('Foo4: bar\r\n\t baz')
assert h[... | Add test case for invalid headers and continuation lines | Add test case for invalid headers and continuation lines
| Python | mit | spaceone/httoop,spaceone/httoop,spaceone/httoop | def test_multiple_same_headers():
pass
def test_header_case_insensitivity():
pass
def test_header_with_continuation_lines():
pass
def test_request_without_headers():
pass
def test_invalid_header_syntax():
pass
Add test case for invalid headers and continuation lines | from httoop import Headers, InvalidHeader
def test_multiple_same_headers():
pass
def test_header_case_insensitivity():
pass
def test_header_with_continuation_lines():
h = Headers()
h.parse('Foo: bar\r\n baz')
h.parse('Foo2: bar\r\n\tbaz')
h.parse('Foo3: bar\r\n baz')
h.parse('Foo4: bar\r\n\t baz')
assert h[... | <commit_before>def test_multiple_same_headers():
pass
def test_header_case_insensitivity():
pass
def test_header_with_continuation_lines():
pass
def test_request_without_headers():
pass
def test_invalid_header_syntax():
pass
<commit_msg>Add test case for invalid headers and continuation lines<commit_after> | from httoop import Headers, InvalidHeader
def test_multiple_same_headers():
pass
def test_header_case_insensitivity():
pass
def test_header_with_continuation_lines():
h = Headers()
h.parse('Foo: bar\r\n baz')
h.parse('Foo2: bar\r\n\tbaz')
h.parse('Foo3: bar\r\n baz')
h.parse('Foo4: bar\r\n\t baz')
assert h[... | def test_multiple_same_headers():
pass
def test_header_case_insensitivity():
pass
def test_header_with_continuation_lines():
pass
def test_request_without_headers():
pass
def test_invalid_header_syntax():
pass
Add test case for invalid headers and continuation linesfrom httoop import Headers, InvalidHeader
de... | <commit_before>def test_multiple_same_headers():
pass
def test_header_case_insensitivity():
pass
def test_header_with_continuation_lines():
pass
def test_request_without_headers():
pass
def test_invalid_header_syntax():
pass
<commit_msg>Add test case for invalid headers and continuation lines<commit_after>from... |
c45d872be07fd58981580372a2c32f0b1993c1e2 | example/user_timeline.py | example/user_timeline.py | #!/usr/bin/env python
"""
Copyright (c) 2008 Dustin Sallings <dustin@spy.net>
"""
import os
import sys
sys.path.append(os.path.join(sys.path[0], '..', 'lib'))
sys.path.append('lib')
from twisted.internet import reactor, protocol, defer, task
import twitter
fetchCount = 0
@defer.deferredGenerator
def getSome(tw,... | #!/usr/bin/env python
"""
Copyright (c) 2008 Dustin Sallings <dustin@spy.net>
"""
import os
import sys
sys.path.append(os.path.join(sys.path[0], '..', 'lib'))
sys.path.append('lib')
from twisted.internet import reactor, protocol, defer, task
import twitter
fetchCount = 0
@defer.deferredGenerator
def getSome(tw,... | Normalize case in my assertion. | Normalize case in my assertion.
| Python | mit | praekelt/twitty-twister,dustin/twitty-twister | #!/usr/bin/env python
"""
Copyright (c) 2008 Dustin Sallings <dustin@spy.net>
"""
import os
import sys
sys.path.append(os.path.join(sys.path[0], '..', 'lib'))
sys.path.append('lib')
from twisted.internet import reactor, protocol, defer, task
import twitter
fetchCount = 0
@defer.deferredGenerator
def getSome(tw,... | #!/usr/bin/env python
"""
Copyright (c) 2008 Dustin Sallings <dustin@spy.net>
"""
import os
import sys
sys.path.append(os.path.join(sys.path[0], '..', 'lib'))
sys.path.append('lib')
from twisted.internet import reactor, protocol, defer, task
import twitter
fetchCount = 0
@defer.deferredGenerator
def getSome(tw,... | <commit_before>#!/usr/bin/env python
"""
Copyright (c) 2008 Dustin Sallings <dustin@spy.net>
"""
import os
import sys
sys.path.append(os.path.join(sys.path[0], '..', 'lib'))
sys.path.append('lib')
from twisted.internet import reactor, protocol, defer, task
import twitter
fetchCount = 0
@defer.deferredGenerator
... | #!/usr/bin/env python
"""
Copyright (c) 2008 Dustin Sallings <dustin@spy.net>
"""
import os
import sys
sys.path.append(os.path.join(sys.path[0], '..', 'lib'))
sys.path.append('lib')
from twisted.internet import reactor, protocol, defer, task
import twitter
fetchCount = 0
@defer.deferredGenerator
def getSome(tw,... | #!/usr/bin/env python
"""
Copyright (c) 2008 Dustin Sallings <dustin@spy.net>
"""
import os
import sys
sys.path.append(os.path.join(sys.path[0], '..', 'lib'))
sys.path.append('lib')
from twisted.internet import reactor, protocol, defer, task
import twitter
fetchCount = 0
@defer.deferredGenerator
def getSome(tw,... | <commit_before>#!/usr/bin/env python
"""
Copyright (c) 2008 Dustin Sallings <dustin@spy.net>
"""
import os
import sys
sys.path.append(os.path.join(sys.path[0], '..', 'lib'))
sys.path.append('lib')
from twisted.internet import reactor, protocol, defer, task
import twitter
fetchCount = 0
@defer.deferredGenerator
... |
86e52da3cfe7e230ac935b7aa35dcab4b7b23402 | web/control/views.py | web/control/views.py | import json
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from vehicles.models import Vehicle
import control.tasks
#@api_view(['POST'])
@csrf_exempt
def handle_control(request, vehicle_vin='-1'):
print 'vehicle: ', vehicle_vin
try:
vehicle = Vehicle.obje... | import json
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from vehicles.models import Vehicle
import control.tasks
#@api_view(['POST'])
@csrf_exempt
def handle_control(request, vehicle_vin='-1'):
print 'vehicle: ', vehicle_vin
try:
vehicle = Vehicle.obje... | Improve the error handling and error response message. | Improve the error handling and error response message.
| Python | mpl-2.0 | klooer/rvi_backend,klooer/rvi_backend,klooer/rvi_backend,klooer/rvi_backend | import json
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from vehicles.models import Vehicle
import control.tasks
#@api_view(['POST'])
@csrf_exempt
def handle_control(request, vehicle_vin='-1'):
print 'vehicle: ', vehicle_vin
try:
vehicle = Vehicle.obje... | import json
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from vehicles.models import Vehicle
import control.tasks
#@api_view(['POST'])
@csrf_exempt
def handle_control(request, vehicle_vin='-1'):
print 'vehicle: ', vehicle_vin
try:
vehicle = Vehicle.obje... | <commit_before>import json
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from vehicles.models import Vehicle
import control.tasks
#@api_view(['POST'])
@csrf_exempt
def handle_control(request, vehicle_vin='-1'):
print 'vehicle: ', vehicle_vin
try:
vehicle... | import json
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from vehicles.models import Vehicle
import control.tasks
#@api_view(['POST'])
@csrf_exempt
def handle_control(request, vehicle_vin='-1'):
print 'vehicle: ', vehicle_vin
try:
vehicle = Vehicle.obje... | import json
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from vehicles.models import Vehicle
import control.tasks
#@api_view(['POST'])
@csrf_exempt
def handle_control(request, vehicle_vin='-1'):
print 'vehicle: ', vehicle_vin
try:
vehicle = Vehicle.obje... | <commit_before>import json
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from vehicles.models import Vehicle
import control.tasks
#@api_view(['POST'])
@csrf_exempt
def handle_control(request, vehicle_vin='-1'):
print 'vehicle: ', vehicle_vin
try:
vehicle... |
f6429a3c4b413231ad480f2768d47b78ec0c690b | great_expectations/cli/cli_logging.py | great_expectations/cli/cli_logging.py | import logging
import warnings
warnings.filterwarnings("ignore")
###
# REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND.
# PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES NOT AFFECT DESIRED BEHAVIOR
###
logger = logging.getLogger("great_expectations.cli")
de... | import logging
import warnings
warnings.filterwarnings("ignore")
###
# REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND.
# PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES NOT AFFECT DESIRED BEHAVIOR
###
logger = logging.getLogger("great_expectations.cli")
de... | Set level on module logger instead | Set level on module logger instead
| Python | apache-2.0 | great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations | import logging
import warnings
warnings.filterwarnings("ignore")
###
# REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND.
# PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES NOT AFFECT DESIRED BEHAVIOR
###
logger = logging.getLogger("great_expectations.cli")
de... | import logging
import warnings
warnings.filterwarnings("ignore")
###
# REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND.
# PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES NOT AFFECT DESIRED BEHAVIOR
###
logger = logging.getLogger("great_expectations.cli")
de... | <commit_before>import logging
import warnings
warnings.filterwarnings("ignore")
###
# REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND.
# PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES NOT AFFECT DESIRED BEHAVIOR
###
logger = logging.getLogger("great_expecta... | import logging
import warnings
warnings.filterwarnings("ignore")
###
# REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND.
# PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES NOT AFFECT DESIRED BEHAVIOR
###
logger = logging.getLogger("great_expectations.cli")
de... | import logging
import warnings
warnings.filterwarnings("ignore")
###
# REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND.
# PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES NOT AFFECT DESIRED BEHAVIOR
###
logger = logging.getLogger("great_expectations.cli")
de... | <commit_before>import logging
import warnings
warnings.filterwarnings("ignore")
###
# REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND.
# PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES NOT AFFECT DESIRED BEHAVIOR
###
logger = logging.getLogger("great_expecta... |
323a92afd125bd97c960ab71c64f78601ec4b000 | aioinotify/watch.py | aioinotify/watch.py | import asyncio
class Watch:
"""Represents an inotify watch as added by InotifyProtocol.watch()"""
def __init__(self, watch_descriptor, callback, protocol):
"""
:param int watch_descriptor: The watch descriptor as returned by inotify_add_watch
:param callback: A function with one posit... | import asyncio
class Watch:
"""Represents an inotify watch as added by InotifyProtocol.watch()"""
def __init__(self, watch_descriptor, callback, protocol):
"""
:param int watch_descriptor: The watch descriptor as returned by inotify_add_watch
:param callback: A function with one posit... | Make Watch also a context manager | Make Watch also a context manager
| Python | apache-2.0 | mwfrojdman/aioinotify | import asyncio
class Watch:
"""Represents an inotify watch as added by InotifyProtocol.watch()"""
def __init__(self, watch_descriptor, callback, protocol):
"""
:param int watch_descriptor: The watch descriptor as returned by inotify_add_watch
:param callback: A function with one posit... | import asyncio
class Watch:
"""Represents an inotify watch as added by InotifyProtocol.watch()"""
def __init__(self, watch_descriptor, callback, protocol):
"""
:param int watch_descriptor: The watch descriptor as returned by inotify_add_watch
:param callback: A function with one posit... | <commit_before>import asyncio
class Watch:
"""Represents an inotify watch as added by InotifyProtocol.watch()"""
def __init__(self, watch_descriptor, callback, protocol):
"""
:param int watch_descriptor: The watch descriptor as returned by inotify_add_watch
:param callback: A function... | import asyncio
class Watch:
"""Represents an inotify watch as added by InotifyProtocol.watch()"""
def __init__(self, watch_descriptor, callback, protocol):
"""
:param int watch_descriptor: The watch descriptor as returned by inotify_add_watch
:param callback: A function with one posit... | import asyncio
class Watch:
"""Represents an inotify watch as added by InotifyProtocol.watch()"""
def __init__(self, watch_descriptor, callback, protocol):
"""
:param int watch_descriptor: The watch descriptor as returned by inotify_add_watch
:param callback: A function with one posit... | <commit_before>import asyncio
class Watch:
"""Represents an inotify watch as added by InotifyProtocol.watch()"""
def __init__(self, watch_descriptor, callback, protocol):
"""
:param int watch_descriptor: The watch descriptor as returned by inotify_add_watch
:param callback: A function... |
2a3d62e4edfd33857feec6fbf20122d2c1a113f8 | add_labels/label_data.py | add_labels/label_data.py | import pandas as pd
import subprocess
import sys
import os
source = sys.argv[1]
dest = sys.argv[2]
labels = sys.argv[3]
df = pd.read_csv(labels)
df = df.fillna('EMPTY')
subprocess.call(['mkdir', '-p', dest])
for subjects in list(set(df.Subject)):
subject_list = subjects.split(', ')
for subject in subject_list:
... | import pandas as pd
import subprocess
import sys
import os
source = sys.argv[1]
dest = sys.argv[2]
labels = sys.argv[3]
df = pd.read_csv(labels)
df = df.fillna('EMPTY')
subprocess.call(['mkdir', '-p', dest])
for subjects in list(set(df.Subject)):
subject_list = subjects.split(', ')
for subject in subject_list:
... | Update label data to point at correct spots | Update label data to point at correct spots
| Python | mit | matthew-sochor/trail-cam-detector,matthew-sochor/trail-cam-detector | import pandas as pd
import subprocess
import sys
import os
source = sys.argv[1]
dest = sys.argv[2]
labels = sys.argv[3]
df = pd.read_csv(labels)
df = df.fillna('EMPTY')
subprocess.call(['mkdir', '-p', dest])
for subjects in list(set(df.Subject)):
subject_list = subjects.split(', ')
for subject in subject_list:
... | import pandas as pd
import subprocess
import sys
import os
source = sys.argv[1]
dest = sys.argv[2]
labels = sys.argv[3]
df = pd.read_csv(labels)
df = df.fillna('EMPTY')
subprocess.call(['mkdir', '-p', dest])
for subjects in list(set(df.Subject)):
subject_list = subjects.split(', ')
for subject in subject_list:
... | <commit_before>import pandas as pd
import subprocess
import sys
import os
source = sys.argv[1]
dest = sys.argv[2]
labels = sys.argv[3]
df = pd.read_csv(labels)
df = df.fillna('EMPTY')
subprocess.call(['mkdir', '-p', dest])
for subjects in list(set(df.Subject)):
subject_list = subjects.split(', ')
for subject in ... | import pandas as pd
import subprocess
import sys
import os
source = sys.argv[1]
dest = sys.argv[2]
labels = sys.argv[3]
df = pd.read_csv(labels)
df = df.fillna('EMPTY')
subprocess.call(['mkdir', '-p', dest])
for subjects in list(set(df.Subject)):
subject_list = subjects.split(', ')
for subject in subject_list:
... | import pandas as pd
import subprocess
import sys
import os
source = sys.argv[1]
dest = sys.argv[2]
labels = sys.argv[3]
df = pd.read_csv(labels)
df = df.fillna('EMPTY')
subprocess.call(['mkdir', '-p', dest])
for subjects in list(set(df.Subject)):
subject_list = subjects.split(', ')
for subject in subject_list:
... | <commit_before>import pandas as pd
import subprocess
import sys
import os
source = sys.argv[1]
dest = sys.argv[2]
labels = sys.argv[3]
df = pd.read_csv(labels)
df = df.fillna('EMPTY')
subprocess.call(['mkdir', '-p', dest])
for subjects in list(set(df.Subject)):
subject_list = subjects.split(', ')
for subject in ... |
aa77e74c02ec7276c233454806d55fdb32899a13 | __init__.py | __init__.py |
# import subpackages
from . import advection
from . import cascade
from . import io
from . import noise
from . import nowcasts
from . import optflow
from . import postprocessing
from . import timeseries
from . import utils
from . import verification
from . import visualization
|
# import subpackages
from . import advection
from . import cascade
from . import io
from . import noise
from . import nowcasts
from . import optflow
from . import postprocessing
from . import timeseries
from . import utils
from . import verification as vf
from . import visualization as plt
| Use namespaces plt and vf for visualization and verification modules | Use namespaces plt and vf for visualization and verification modules
| Python | bsd-3-clause | pySTEPS/pysteps |
# import subpackages
from . import advection
from . import cascade
from . import io
from . import noise
from . import nowcasts
from . import optflow
from . import postprocessing
from . import timeseries
from . import utils
from . import verification
from . import visualization
Use namespaces plt and vf for visualiz... |
# import subpackages
from . import advection
from . import cascade
from . import io
from . import noise
from . import nowcasts
from . import optflow
from . import postprocessing
from . import timeseries
from . import utils
from . import verification as vf
from . import visualization as plt
| <commit_before>
# import subpackages
from . import advection
from . import cascade
from . import io
from . import noise
from . import nowcasts
from . import optflow
from . import postprocessing
from . import timeseries
from . import utils
from . import verification
from . import visualization
<commit_msg>Use namespa... |
# import subpackages
from . import advection
from . import cascade
from . import io
from . import noise
from . import nowcasts
from . import optflow
from . import postprocessing
from . import timeseries
from . import utils
from . import verification as vf
from . import visualization as plt
|
# import subpackages
from . import advection
from . import cascade
from . import io
from . import noise
from . import nowcasts
from . import optflow
from . import postprocessing
from . import timeseries
from . import utils
from . import verification
from . import visualization
Use namespaces plt and vf for visualiz... | <commit_before>
# import subpackages
from . import advection
from . import cascade
from . import io
from . import noise
from . import nowcasts
from . import optflow
from . import postprocessing
from . import timeseries
from . import utils
from . import verification
from . import visualization
<commit_msg>Use namespa... |
b1153bc6e8b8b132c146076aeeb6b86ec4f54365 | __init__.py | __init__.py | if 'loaded' in locals():
import imp
imp.reload(blendergltf)
from .blendergltf import *
else:
loaded = True
from .blendergltf import * | bl_info = {
"name": "glTF format",
"author": "Daniel Stokes",
"version": (0, 1, 0),
"blender": (2, 76, 0),
"location": "File > Import-Export",
"description": "Export glTF",
"warning": "",
"wiki_url": ""
"",
"support": 'TESTING',
"category": "Import-Export"}
# Tr... | Add experimental support to run module as Blender addon | Add experimental support to run module as Blender addon
| Python | apache-2.0 | Kupoman/blendergltf,lukesanantonio/blendergltf | if 'loaded' in locals():
import imp
imp.reload(blendergltf)
from .blendergltf import *
else:
loaded = True
from .blendergltf import *Add experimental support to run module as Blender addon | bl_info = {
"name": "glTF format",
"author": "Daniel Stokes",
"version": (0, 1, 0),
"blender": (2, 76, 0),
"location": "File > Import-Export",
"description": "Export glTF",
"warning": "",
"wiki_url": ""
"",
"support": 'TESTING',
"category": "Import-Export"}
# Tr... | <commit_before>if 'loaded' in locals():
import imp
imp.reload(blendergltf)
from .blendergltf import *
else:
loaded = True
from .blendergltf import *<commit_msg>Add experimental support to run module as Blender addon<commit_after> | bl_info = {
"name": "glTF format",
"author": "Daniel Stokes",
"version": (0, 1, 0),
"blender": (2, 76, 0),
"location": "File > Import-Export",
"description": "Export glTF",
"warning": "",
"wiki_url": ""
"",
"support": 'TESTING',
"category": "Import-Export"}
# Tr... | if 'loaded' in locals():
import imp
imp.reload(blendergltf)
from .blendergltf import *
else:
loaded = True
from .blendergltf import *Add experimental support to run module as Blender addonbl_info = {
"name": "glTF format",
"author": "Daniel Stokes",
"version": (0, 1, 0),
"blender": (... | <commit_before>if 'loaded' in locals():
import imp
imp.reload(blendergltf)
from .blendergltf import *
else:
loaded = True
from .blendergltf import *<commit_msg>Add experimental support to run module as Blender addon<commit_after>bl_info = {
"name": "glTF format",
"author": "Daniel Stokes",
... |
8c81f606499ebadddaf2a362bc8845eb69a21e8d | lds-gen.py | lds-gen.py | #!/usr/bin/env python
#
#
# Generate linker script to only expose symbols of the public API
#
import sys
import re
if __name__ == '__main__':
funcs = list()
last_line = ''
for line in sys.stdin:
m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_\S+)\s*\(', line)
if m:
sym = m.group(2)... | #!/usr/bin/env python
#
#
# Generate linker script to only expose symbols of the public API
#
import sys
import re
if __name__ == '__main__':
funcs = list()
last_line = ''
for line in sys.stdin:
m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_\S+)\s*\(', line)
if m:
sym = m.group(2)... | Stop exporting internal symbols from the shared libraries. | Stop exporting internal symbols from the shared libraries.
| Python | bsd-2-clause | orthrus/librdkafka,klonikar/librdkafka,klonikar/librdkafka,senior7515/librdkafka,janmejay/librdkafka,senior7515/librdkafka,orthrus/librdkafka,klonikar/librdkafka,janmejay/librdkafka,orthrus/librdkafka,janmejay/librdkafka,senior7515/librdkafka,senior7515/librdkafka,klonikar/librdkafka,orthrus/librdkafka,janmejay/librdka... | #!/usr/bin/env python
#
#
# Generate linker script to only expose symbols of the public API
#
import sys
import re
if __name__ == '__main__':
funcs = list()
last_line = ''
for line in sys.stdin:
m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_\S+)\s*\(', line)
if m:
sym = m.group(2)... | #!/usr/bin/env python
#
#
# Generate linker script to only expose symbols of the public API
#
import sys
import re
if __name__ == '__main__':
funcs = list()
last_line = ''
for line in sys.stdin:
m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_\S+)\s*\(', line)
if m:
sym = m.group(2)... | <commit_before>#!/usr/bin/env python
#
#
# Generate linker script to only expose symbols of the public API
#
import sys
import re
if __name__ == '__main__':
funcs = list()
last_line = ''
for line in sys.stdin:
m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_\S+)\s*\(', line)
if m:
s... | #!/usr/bin/env python
#
#
# Generate linker script to only expose symbols of the public API
#
import sys
import re
if __name__ == '__main__':
funcs = list()
last_line = ''
for line in sys.stdin:
m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_\S+)\s*\(', line)
if m:
sym = m.group(2)... | #!/usr/bin/env python
#
#
# Generate linker script to only expose symbols of the public API
#
import sys
import re
if __name__ == '__main__':
funcs = list()
last_line = ''
for line in sys.stdin:
m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_\S+)\s*\(', line)
if m:
sym = m.group(2)... | <commit_before>#!/usr/bin/env python
#
#
# Generate linker script to only expose symbols of the public API
#
import sys
import re
if __name__ == '__main__':
funcs = list()
last_line = ''
for line in sys.stdin:
m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_\S+)\s*\(', line)
if m:
s... |
b07d74f99338165f8bb83ac0599452b021b96a8f | django_boolean_sum.py | django_boolean_sum.py | from django.conf import settings
from django.db.models.aggregates import Sum
from django.db.models.sql.aggregates import Sum as BaseSQLSum
class SQLSum(BaseSQLSum):
@property
def sql_template(self):
if settings.DATABASES['default']['ENGINE'] == \
'django.db.backends.postgresql_psycopg2... | from django.conf import settings
from django.db.models.aggregates import Sum
class SQLSum(Sum):
@property
def sql_template(self):
if settings.DATABASES['default']['ENGINE'] == \
'django.db.backends.postgresql_psycopg2':
return '%(function)s(%(field)s::int)'
return '... | Add support for Django 1.10+ | Add support for Django 1.10+
| Python | bsd-2-clause | Mibou/django-boolean-sum | from django.conf import settings
from django.db.models.aggregates import Sum
from django.db.models.sql.aggregates import Sum as BaseSQLSum
class SQLSum(BaseSQLSum):
@property
def sql_template(self):
if settings.DATABASES['default']['ENGINE'] == \
'django.db.backends.postgresql_psycopg2... | from django.conf import settings
from django.db.models.aggregates import Sum
class SQLSum(Sum):
@property
def sql_template(self):
if settings.DATABASES['default']['ENGINE'] == \
'django.db.backends.postgresql_psycopg2':
return '%(function)s(%(field)s::int)'
return '... | <commit_before>from django.conf import settings
from django.db.models.aggregates import Sum
from django.db.models.sql.aggregates import Sum as BaseSQLSum
class SQLSum(BaseSQLSum):
@property
def sql_template(self):
if settings.DATABASES['default']['ENGINE'] == \
'django.db.backends.post... | from django.conf import settings
from django.db.models.aggregates import Sum
class SQLSum(Sum):
@property
def sql_template(self):
if settings.DATABASES['default']['ENGINE'] == \
'django.db.backends.postgresql_psycopg2':
return '%(function)s(%(field)s::int)'
return '... | from django.conf import settings
from django.db.models.aggregates import Sum
from django.db.models.sql.aggregates import Sum as BaseSQLSum
class SQLSum(BaseSQLSum):
@property
def sql_template(self):
if settings.DATABASES['default']['ENGINE'] == \
'django.db.backends.postgresql_psycopg2... | <commit_before>from django.conf import settings
from django.db.models.aggregates import Sum
from django.db.models.sql.aggregates import Sum as BaseSQLSum
class SQLSum(BaseSQLSum):
@property
def sql_template(self):
if settings.DATABASES['default']['ENGINE'] == \
'django.db.backends.post... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.