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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a32fe3b3735df9ec56a4ca1769268740ef5d8f4 | tests/test_to_html.py | tests/test_to_html.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
class ToHTMLTest(unittest.TestCase):
SAMPLE = "Проверяем *CommonMark*.\n\nВставляем `код`.\nИ другие штуки."
def setUp(self):
from paka.cmark import to_html
self.func = to_html
def check(self, source, expe... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
class ToHTMLTest(unittest.TestCase):
SAMPLE = (
"Проверяем *CommonMark*.\n\nВставляем `код`.\nИ другие штуки.\n\n"
"<p>Test of <em>HTML</em>.</p>")
def setUp(self):
from paka.cmark import to_html
... | Add HTML fragment to test sample | Add HTML fragment to test sample
| Python | bsd-3-clause | PavloKapyshin/paka.cmark,PavloKapyshin/paka.cmark,PavloKapyshin/paka.cmark | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
class ToHTMLTest(unittest.TestCase):
SAMPLE = "Проверяем *CommonMark*.\n\nВставляем `код`.\nИ другие штуки."
def setUp(self):
from paka.cmark import to_html
self.func = to_html
def check(self, source, expe... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
class ToHTMLTest(unittest.TestCase):
SAMPLE = (
"Проверяем *CommonMark*.\n\nВставляем `код`.\nИ другие штуки.\n\n"
"<p>Test of <em>HTML</em>.</p>")
def setUp(self):
from paka.cmark import to_html
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
class ToHTMLTest(unittest.TestCase):
SAMPLE = "Проверяем *CommonMark*.\n\nВставляем `код`.\nИ другие штуки."
def setUp(self):
from paka.cmark import to_html
self.func = to_html
def check(sel... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
class ToHTMLTest(unittest.TestCase):
SAMPLE = (
"Проверяем *CommonMark*.\n\nВставляем `код`.\nИ другие штуки.\n\n"
"<p>Test of <em>HTML</em>.</p>")
def setUp(self):
from paka.cmark import to_html
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
class ToHTMLTest(unittest.TestCase):
SAMPLE = "Проверяем *CommonMark*.\n\nВставляем `код`.\nИ другие штуки."
def setUp(self):
from paka.cmark import to_html
self.func = to_html
def check(self, source, expe... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
class ToHTMLTest(unittest.TestCase):
SAMPLE = "Проверяем *CommonMark*.\n\nВставляем `код`.\nИ другие штуки."
def setUp(self):
from paka.cmark import to_html
self.func = to_html
def check(sel... |
d0a02a8190d040eea3065a1141dbd41679c5eee3 | tools/casper_tests.py | tools/casper_tests.py | #!/usr/bin/env python
import multiprocessing
import subprocess
import glob
import os
if __name__ == "__main__":
os.environ["MLTSP_TEST_DB"] = "1"
from mltsp.Flask import flask_app
flask_app.db_init(force=True)
from mltsp.Flask.flask_app import app
p = multiprocessing.Process(target=app.run)
... | #!/usr/bin/env python
import multiprocessing
import subprocess
import glob
import os
import sys
if __name__ == "__main__":
os.environ["MLTSP_TEST_DB"] = "1"
from mltsp.Flask import flask_app
flask_app.db_init(force=True)
from mltsp.Flask.flask_app import app
p = multiprocessing.Process(target=ap... | Exit frontend tests with Casper status | Exit frontend tests with Casper status
| Python | bsd-3-clause | mltsp/mltsp,acrellin/mltsp,acrellin/mltsp,mltsp/mltsp,acrellin/mltsp,bnaul/mltsp,mltsp/mltsp,acrellin/mltsp,mltsp/mltsp,mltsp/mltsp,bnaul/mltsp,acrellin/mltsp,acrellin/mltsp,bnaul/mltsp,bnaul/mltsp,bnaul/mltsp,mltsp/mltsp,bnaul/mltsp | #!/usr/bin/env python
import multiprocessing
import subprocess
import glob
import os
if __name__ == "__main__":
os.environ["MLTSP_TEST_DB"] = "1"
from mltsp.Flask import flask_app
flask_app.db_init(force=True)
from mltsp.Flask.flask_app import app
p = multiprocessing.Process(target=app.run)
... | #!/usr/bin/env python
import multiprocessing
import subprocess
import glob
import os
import sys
if __name__ == "__main__":
os.environ["MLTSP_TEST_DB"] = "1"
from mltsp.Flask import flask_app
flask_app.db_init(force=True)
from mltsp.Flask.flask_app import app
p = multiprocessing.Process(target=ap... | <commit_before>#!/usr/bin/env python
import multiprocessing
import subprocess
import glob
import os
if __name__ == "__main__":
os.environ["MLTSP_TEST_DB"] = "1"
from mltsp.Flask import flask_app
flask_app.db_init(force=True)
from mltsp.Flask.flask_app import app
p = multiprocessing.Process(targe... | #!/usr/bin/env python
import multiprocessing
import subprocess
import glob
import os
import sys
if __name__ == "__main__":
os.environ["MLTSP_TEST_DB"] = "1"
from mltsp.Flask import flask_app
flask_app.db_init(force=True)
from mltsp.Flask.flask_app import app
p = multiprocessing.Process(target=ap... | #!/usr/bin/env python
import multiprocessing
import subprocess
import glob
import os
if __name__ == "__main__":
os.environ["MLTSP_TEST_DB"] = "1"
from mltsp.Flask import flask_app
flask_app.db_init(force=True)
from mltsp.Flask.flask_app import app
p = multiprocessing.Process(target=app.run)
... | <commit_before>#!/usr/bin/env python
import multiprocessing
import subprocess
import glob
import os
if __name__ == "__main__":
os.environ["MLTSP_TEST_DB"] = "1"
from mltsp.Flask import flask_app
flask_app.db_init(force=True)
from mltsp.Flask.flask_app import app
p = multiprocessing.Process(targe... |
405c5cc9f88f3ea69f101ae36f3b3bf05b54a9eb | luckystrike/config.py | luckystrike/config.py | import argparse
import json
from os import path
import pinder
from twisted.words import service
rooms = {}
irc_users = {}
if path.exists(path.expanduser('~') + '/.luckystrike/config.json'):
with open(path.expanduser('~') + '/.luckystrike/config.json') as config_file:
configuration = dict(json.loads(conf... | import argparse
import json
from os import path
import pinder
from twisted.words import service
rooms = {}
irc_users = {}
if path.exists(path.expanduser('~') + '/.luckystrike/config.json'):
with open(path.expanduser('~') + '/.luckystrike/config.json') as config_file:
configuration = dict(json.loads(conf... | Add ability to increase debug level through multiple instances of flag | Add ability to increase debug level through multiple instances of flag
| Python | mit | mmichie/luckystrike | import argparse
import json
from os import path
import pinder
from twisted.words import service
rooms = {}
irc_users = {}
if path.exists(path.expanduser('~') + '/.luckystrike/config.json'):
with open(path.expanduser('~') + '/.luckystrike/config.json') as config_file:
configuration = dict(json.loads(conf... | import argparse
import json
from os import path
import pinder
from twisted.words import service
rooms = {}
irc_users = {}
if path.exists(path.expanduser('~') + '/.luckystrike/config.json'):
with open(path.expanduser('~') + '/.luckystrike/config.json') as config_file:
configuration = dict(json.loads(conf... | <commit_before>import argparse
import json
from os import path
import pinder
from twisted.words import service
rooms = {}
irc_users = {}
if path.exists(path.expanduser('~') + '/.luckystrike/config.json'):
with open(path.expanduser('~') + '/.luckystrike/config.json') as config_file:
configuration = dict(... | import argparse
import json
from os import path
import pinder
from twisted.words import service
rooms = {}
irc_users = {}
if path.exists(path.expanduser('~') + '/.luckystrike/config.json'):
with open(path.expanduser('~') + '/.luckystrike/config.json') as config_file:
configuration = dict(json.loads(conf... | import argparse
import json
from os import path
import pinder
from twisted.words import service
rooms = {}
irc_users = {}
if path.exists(path.expanduser('~') + '/.luckystrike/config.json'):
with open(path.expanduser('~') + '/.luckystrike/config.json') as config_file:
configuration = dict(json.loads(conf... | <commit_before>import argparse
import json
from os import path
import pinder
from twisted.words import service
rooms = {}
irc_users = {}
if path.exists(path.expanduser('~') + '/.luckystrike/config.json'):
with open(path.expanduser('~') + '/.luckystrike/config.json') as config_file:
configuration = dict(... |
c53e9266877f84d6a9f0d334a799a2e2d456471d | config/local_settings_staging.py | config/local_settings_staging.py | DEBUG = False
ENVIRONMENT = "staging"
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'lutris_staging',
'USER': 'lutris_staging',
'PASSWORD': 'admin'
}
}
| DEBUG = False
ENVIRONMENT = "staging"
ALLOWED_HOSTS = ('dev.lutris.net',)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'lutris_staging',
'USER': 'lutris_staging',
'PASSWORD': 'admin'
}
}
| Add ALLOWED_HOSTS on staging server settings | Add ALLOWED_HOSTS on staging server settings
| Python | agpl-3.0 | Turupawn/website,Turupawn/website,Turupawn/website,lutris/website,lutris/website,Turupawn/website,lutris/website,lutris/website | DEBUG = False
ENVIRONMENT = "staging"
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'lutris_staging',
'USER': 'lutris_staging',
'PASSWORD': 'admin'
}
}
Add ALLOWED_HOSTS on staging server settings | DEBUG = False
ENVIRONMENT = "staging"
ALLOWED_HOSTS = ('dev.lutris.net',)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'lutris_staging',
'USER': 'lutris_staging',
'PASSWORD': 'admin'
}
}
| <commit_before>DEBUG = False
ENVIRONMENT = "staging"
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'lutris_staging',
'USER': 'lutris_staging',
'PASSWORD': 'admin'
}
}
<commit_msg>Add ALLOWED_HOSTS on staging server settings<commit_after> | DEBUG = False
ENVIRONMENT = "staging"
ALLOWED_HOSTS = ('dev.lutris.net',)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'lutris_staging',
'USER': 'lutris_staging',
'PASSWORD': 'admin'
}
}
| DEBUG = False
ENVIRONMENT = "staging"
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'lutris_staging',
'USER': 'lutris_staging',
'PASSWORD': 'admin'
}
}
Add ALLOWED_HOSTS on staging server settingsDEBUG = False
ENVIRONMENT = "staging"
ALLOWED_HOSTS = ('... | <commit_before>DEBUG = False
ENVIRONMENT = "staging"
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'lutris_staging',
'USER': 'lutris_staging',
'PASSWORD': 'admin'
}
}
<commit_msg>Add ALLOWED_HOSTS on staging server settings<commit_after>DEBUG = False
E... |
005e7175f5fcd7e74637790e66e5cf46825195f6 | tests/cupy_tests/cuda_tests/test_nccl.py | tests/cupy_tests/cuda_tests/test_nccl.py | import unittest
from cupy import cuda
from cupy.testing import attr
@unittest.skipUnless(cuda.nccl_enabled, 'nccl is not installed')
class TestNCCL(unittest.TestCase):
@attr.gpu
def test_single_proc_ring(self):
id = cuda.nccl.get_unique_id()
comm = cuda.nccl.NcclCommunicator(1, id, 0)
... | import unittest
from cupy import cuda
from cupy.testing import attr
@unittest.skipUnless(cuda.nccl_enabled, 'nccl is not installed')
class TestNCCL(unittest.TestCase):
@attr.gpu
def test_single_proc_ring(self):
id = cuda.nccl.get_unique_id()
comm = cuda.nccl.NcclCommunicator(1, id, 0)
... | Add a test for initAll() | Add a test for initAll()
| Python | mit | cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy | import unittest
from cupy import cuda
from cupy.testing import attr
@unittest.skipUnless(cuda.nccl_enabled, 'nccl is not installed')
class TestNCCL(unittest.TestCase):
@attr.gpu
def test_single_proc_ring(self):
id = cuda.nccl.get_unique_id()
comm = cuda.nccl.NcclCommunicator(1, id, 0)
... | import unittest
from cupy import cuda
from cupy.testing import attr
@unittest.skipUnless(cuda.nccl_enabled, 'nccl is not installed')
class TestNCCL(unittest.TestCase):
@attr.gpu
def test_single_proc_ring(self):
id = cuda.nccl.get_unique_id()
comm = cuda.nccl.NcclCommunicator(1, id, 0)
... | <commit_before>import unittest
from cupy import cuda
from cupy.testing import attr
@unittest.skipUnless(cuda.nccl_enabled, 'nccl is not installed')
class TestNCCL(unittest.TestCase):
@attr.gpu
def test_single_proc_ring(self):
id = cuda.nccl.get_unique_id()
comm = cuda.nccl.NcclCommunicator(1... | import unittest
from cupy import cuda
from cupy.testing import attr
@unittest.skipUnless(cuda.nccl_enabled, 'nccl is not installed')
class TestNCCL(unittest.TestCase):
@attr.gpu
def test_single_proc_ring(self):
id = cuda.nccl.get_unique_id()
comm = cuda.nccl.NcclCommunicator(1, id, 0)
... | import unittest
from cupy import cuda
from cupy.testing import attr
@unittest.skipUnless(cuda.nccl_enabled, 'nccl is not installed')
class TestNCCL(unittest.TestCase):
@attr.gpu
def test_single_proc_ring(self):
id = cuda.nccl.get_unique_id()
comm = cuda.nccl.NcclCommunicator(1, id, 0)
... | <commit_before>import unittest
from cupy import cuda
from cupy.testing import attr
@unittest.skipUnless(cuda.nccl_enabled, 'nccl is not installed')
class TestNCCL(unittest.TestCase):
@attr.gpu
def test_single_proc_ring(self):
id = cuda.nccl.get_unique_id()
comm = cuda.nccl.NcclCommunicator(1... |
620d59b82e8a5c98fd4568217c74b485f802ac94 | tests/integration/test_authentication.py | tests/integration/test_authentication.py | from pyutrack import Connection
from pyutrack import Credentials
from pyutrack.errors import LoginError
from tests.integration import IntegrationTest
class AuthenticationTests(IntegrationTest):
def test_successful_authentication(self):
connection = Connection(
credentials=Credentials(username=... | from pyutrack import Connection
from pyutrack import Credentials
from pyutrack.errors import LoginError
from tests.integration import IntegrationTest
class AuthenticationTests(IntegrationTest):
def test_successful_authentication(self):
connection = Connection(
credentials=Credentials(username=... | Fix order of assertion arguments | Fix order of assertion arguments
| Python | mit | alisaifee/pyutrack,alisaifee/pyutrack | from pyutrack import Connection
from pyutrack import Credentials
from pyutrack.errors import LoginError
from tests.integration import IntegrationTest
class AuthenticationTests(IntegrationTest):
def test_successful_authentication(self):
connection = Connection(
credentials=Credentials(username=... | from pyutrack import Connection
from pyutrack import Credentials
from pyutrack.errors import LoginError
from tests.integration import IntegrationTest
class AuthenticationTests(IntegrationTest):
def test_successful_authentication(self):
connection = Connection(
credentials=Credentials(username=... | <commit_before>from pyutrack import Connection
from pyutrack import Credentials
from pyutrack.errors import LoginError
from tests.integration import IntegrationTest
class AuthenticationTests(IntegrationTest):
def test_successful_authentication(self):
connection = Connection(
credentials=Creden... | from pyutrack import Connection
from pyutrack import Credentials
from pyutrack.errors import LoginError
from tests.integration import IntegrationTest
class AuthenticationTests(IntegrationTest):
def test_successful_authentication(self):
connection = Connection(
credentials=Credentials(username=... | from pyutrack import Connection
from pyutrack import Credentials
from pyutrack.errors import LoginError
from tests.integration import IntegrationTest
class AuthenticationTests(IntegrationTest):
def test_successful_authentication(self):
connection = Connection(
credentials=Credentials(username=... | <commit_before>from pyutrack import Connection
from pyutrack import Credentials
from pyutrack.errors import LoginError
from tests.integration import IntegrationTest
class AuthenticationTests(IntegrationTest):
def test_successful_authentication(self):
connection = Connection(
credentials=Creden... |
5adbcbbce53985862f0cfcceadb4a3c0da2abe3d | tests/query_test/test_decimal_queries.py | tests/query_test/test_decimal_queries.py | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted tests for decimal type.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestDecimalQueries(ImpalaTestSuite):
BATCH_SIZES = [0, 1]
... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted tests for decimal type.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestDecimalQueries(ImpalaTestSuite):
BATCH_SIZES = [0, 1]
... | Update decimal tests to only run on text/none. | Update decimal tests to only run on text/none.
Change-Id: I9a35f9e1687171fc3f06c17516bca2ea4b9af9e1
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2217
Tested-by: jenkins
Reviewed-by: Ishaan Joshi <d1d1e60202ec9f2503deb1b724986485a125d802@cloudera.com>
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2431
Reviewed-b... | Python | apache-2.0 | michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted tests for decimal type.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestDecimalQueries(ImpalaTestSuite):
BATCH_SIZES = [0, 1]
... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted tests for decimal type.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestDecimalQueries(ImpalaTestSuite):
BATCH_SIZES = [0, 1]
... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted tests for decimal type.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestDecimalQueries(ImpalaTestSuite):
BATCH_SI... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted tests for decimal type.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestDecimalQueries(ImpalaTestSuite):
BATCH_SIZES = [0, 1]
... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted tests for decimal type.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestDecimalQueries(ImpalaTestSuite):
BATCH_SIZES = [0, 1]
... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted tests for decimal type.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestDecimalQueries(ImpalaTestSuite):
BATCH_SI... |
245a6b190c1ad3c5e380c5957d6b98593fdb4006 | logserver/__main__.py | logserver/__main__.py | from argparse import ArgumentParser
import logging
from . import run_server
from .handlers import SQLiteHandler
parser = ArgumentParser(
description="Run a standalone log server using a SQLite database.")
parser.add_argument("-p", "--port", default=9123, help="Port to listen on")
parser.add_argument("-t", "--tabl... | from argparse import ArgumentParser
import logging
from . import run_server
from .handlers import SQLiteHandler
parser = ArgumentParser(
description="Run a standalone log server using a SQLite database.")
parser.add_argument("-p", "--port", default=9123, help="Port to listen on")
parser.add_argument("-t", "--tabl... | Format messages in stream handler | Format messages in stream handler
| Python | mit | mivade/logserver | from argparse import ArgumentParser
import logging
from . import run_server
from .handlers import SQLiteHandler
parser = ArgumentParser(
description="Run a standalone log server using a SQLite database.")
parser.add_argument("-p", "--port", default=9123, help="Port to listen on")
parser.add_argument("-t", "--tabl... | from argparse import ArgumentParser
import logging
from . import run_server
from .handlers import SQLiteHandler
parser = ArgumentParser(
description="Run a standalone log server using a SQLite database.")
parser.add_argument("-p", "--port", default=9123, help="Port to listen on")
parser.add_argument("-t", "--tabl... | <commit_before>from argparse import ArgumentParser
import logging
from . import run_server
from .handlers import SQLiteHandler
parser = ArgumentParser(
description="Run a standalone log server using a SQLite database.")
parser.add_argument("-p", "--port", default=9123, help="Port to listen on")
parser.add_argumen... | from argparse import ArgumentParser
import logging
from . import run_server
from .handlers import SQLiteHandler
parser = ArgumentParser(
description="Run a standalone log server using a SQLite database.")
parser.add_argument("-p", "--port", default=9123, help="Port to listen on")
parser.add_argument("-t", "--tabl... | from argparse import ArgumentParser
import logging
from . import run_server
from .handlers import SQLiteHandler
parser = ArgumentParser(
description="Run a standalone log server using a SQLite database.")
parser.add_argument("-p", "--port", default=9123, help="Port to listen on")
parser.add_argument("-t", "--tabl... | <commit_before>from argparse import ArgumentParser
import logging
from . import run_server
from .handlers import SQLiteHandler
parser = ArgumentParser(
description="Run a standalone log server using a SQLite database.")
parser.add_argument("-p", "--port", default=9123, help="Port to listen on")
parser.add_argumen... |
0ac5a45c27b574c73d2660e96543220e274e1c64 | magpy/server/_ejdb.py | magpy/server/_ejdb.py | """EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import os
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
config_file=None):
... | """EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import os
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
config_file=None):
... | Deal with the weirdnesses of ejdb. | Deal with the weirdnesses of ejdb.
| Python | bsd-3-clause | zeth/magpy,catsmith/magpy,zeth/magpy,catsmith/magpy | """EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import os
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
config_file=None):
... | """EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import os
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
config_file=None):
... | <commit_before>"""EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import os
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
conf... | """EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import os
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
config_file=None):
... | """EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import os
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
config_file=None):
... | <commit_before>"""EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import os
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
conf... |
2ef97402219107fc632196bb0a7e3d6de38e5888 | latest_tweets/management/commands/latest_tweets_update.py | latest_tweets/management/commands/latest_tweets_update.py | from django.core.management.base import BaseCommand
from django.conf import settings
from django.utils.timezone import utc
from datetime import datetime
from twitter import Twitter, OAuth
from latest_tweets.models import Tweet
from django.utils.six.moves import html_parser
def update_user(user):
t = Twitter(auth=... | from django.core.management.base import BaseCommand
from django.conf import settings
from django.utils.timezone import utc
from datetime import datetime
from twitter import Twitter, OAuth
from latest_tweets.models import Tweet
from django.utils.six.moves import html_parser
def update_user(user):
t = Twitter(auth=... | Switch to update_or_create - Django 1.7+ | Switch to update_or_create - Django 1.7+
Can't use this on older versions of Django
| Python | bsd-3-clause | blancltd/django-latest-tweets | from django.core.management.base import BaseCommand
from django.conf import settings
from django.utils.timezone import utc
from datetime import datetime
from twitter import Twitter, OAuth
from latest_tweets.models import Tweet
from django.utils.six.moves import html_parser
def update_user(user):
t = Twitter(auth=... | from django.core.management.base import BaseCommand
from django.conf import settings
from django.utils.timezone import utc
from datetime import datetime
from twitter import Twitter, OAuth
from latest_tweets.models import Tweet
from django.utils.six.moves import html_parser
def update_user(user):
t = Twitter(auth=... | <commit_before>from django.core.management.base import BaseCommand
from django.conf import settings
from django.utils.timezone import utc
from datetime import datetime
from twitter import Twitter, OAuth
from latest_tweets.models import Tweet
from django.utils.six.moves import html_parser
def update_user(user):
t ... | from django.core.management.base import BaseCommand
from django.conf import settings
from django.utils.timezone import utc
from datetime import datetime
from twitter import Twitter, OAuth
from latest_tweets.models import Tweet
from django.utils.six.moves import html_parser
def update_user(user):
t = Twitter(auth=... | from django.core.management.base import BaseCommand
from django.conf import settings
from django.utils.timezone import utc
from datetime import datetime
from twitter import Twitter, OAuth
from latest_tweets.models import Tweet
from django.utils.six.moves import html_parser
def update_user(user):
t = Twitter(auth=... | <commit_before>from django.core.management.base import BaseCommand
from django.conf import settings
from django.utils.timezone import utc
from datetime import datetime
from twitter import Twitter, OAuth
from latest_tweets.models import Tweet
from django.utils.six.moves import html_parser
def update_user(user):
t ... |
8a0f17eea757f2001ec9d9579a413ab852549d39 | tavenner.py | tavenner.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import errno
import zipfile
import sys
import hashlib
def main():
from urllib2 import Request, urlopen, HTTPError
url_base = 'http://ethicssearch.dls.virginia.gov/ViewFormBinary.aspx?filingid='
errors = 0
i = 1
while True:
req ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import errno
import zipfile
import sys
import hashlib
output_dir = 'output'
def main():
# Make our output directory, if it doesn't exist.
if not os.path.exists(output_dir):
os.makedirs(output_dir)
from urllib2 import Request, urlopen, ... | Store output in a subdirectory | Store output in a subdirectory
| Python | mit | openva/tavenner | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import errno
import zipfile
import sys
import hashlib
def main():
from urllib2 import Request, urlopen, HTTPError
url_base = 'http://ethicssearch.dls.virginia.gov/ViewFormBinary.aspx?filingid='
errors = 0
i = 1
while True:
req ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import errno
import zipfile
import sys
import hashlib
output_dir = 'output'
def main():
# Make our output directory, if it doesn't exist.
if not os.path.exists(output_dir):
os.makedirs(output_dir)
from urllib2 import Request, urlopen, ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import errno
import zipfile
import sys
import hashlib
def main():
from urllib2 import Request, urlopen, HTTPError
url_base = 'http://ethicssearch.dls.virginia.gov/ViewFormBinary.aspx?filingid='
errors = 0
i = 1
while True... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import errno
import zipfile
import sys
import hashlib
output_dir = 'output'
def main():
# Make our output directory, if it doesn't exist.
if not os.path.exists(output_dir):
os.makedirs(output_dir)
from urllib2 import Request, urlopen, ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import errno
import zipfile
import sys
import hashlib
def main():
from urllib2 import Request, urlopen, HTTPError
url_base = 'http://ethicssearch.dls.virginia.gov/ViewFormBinary.aspx?filingid='
errors = 0
i = 1
while True:
req ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import errno
import zipfile
import sys
import hashlib
def main():
from urllib2 import Request, urlopen, HTTPError
url_base = 'http://ethicssearch.dls.virginia.gov/ViewFormBinary.aspx?filingid='
errors = 0
i = 1
while True... |
d2e03bf76f585dc1025b5a94be0327284f8d5fa2 | Left_pare.py | Left_pare.py | # This macro is to remove 1 character form selected line on the left.
# Useful to clean code copied from diff file.
#
# Author: Nguyễn Hồng Quân (ng.hong.quan@gmail.com)
from xpcom import components
viewSvc = components.classes["@activestate.com/koViewService;1"]\
.getService(components.interfaces.koIViewService)
... | # This macro is to remove 1 character form selected line on the left.
# Useful to clean code copied from diff file.
#
# Author: Nguyễn Hồng Quân (ng.hong.quan@gmail.com)
from xpcom import components
viewSvc = components.classes["@activestate.com/koViewService;1"]\
.getService(components.interfaces.koIViewService)
... | Correct selecting text by length when text is Unicode. | Correct selecting text by length when text is Unicode.
| Python | mpl-2.0 | Komodo/macros,Komodo/macros | # This macro is to remove 1 character form selected line on the left.
# Useful to clean code copied from diff file.
#
# Author: Nguyễn Hồng Quân (ng.hong.quan@gmail.com)
from xpcom import components
viewSvc = components.classes["@activestate.com/koViewService;1"]\
.getService(components.interfaces.koIViewService)
... | # This macro is to remove 1 character form selected line on the left.
# Useful to clean code copied from diff file.
#
# Author: Nguyễn Hồng Quân (ng.hong.quan@gmail.com)
from xpcom import components
viewSvc = components.classes["@activestate.com/koViewService;1"]\
.getService(components.interfaces.koIViewService)
... | <commit_before># This macro is to remove 1 character form selected line on the left.
# Useful to clean code copied from diff file.
#
# Author: Nguyễn Hồng Quân (ng.hong.quan@gmail.com)
from xpcom import components
viewSvc = components.classes["@activestate.com/koViewService;1"]\
.getService(components.interfaces.k... | # This macro is to remove 1 character form selected line on the left.
# Useful to clean code copied from diff file.
#
# Author: Nguyễn Hồng Quân (ng.hong.quan@gmail.com)
from xpcom import components
viewSvc = components.classes["@activestate.com/koViewService;1"]\
.getService(components.interfaces.koIViewService)
... | # This macro is to remove 1 character form selected line on the left.
# Useful to clean code copied from diff file.
#
# Author: Nguyễn Hồng Quân (ng.hong.quan@gmail.com)
from xpcom import components
viewSvc = components.classes["@activestate.com/koViewService;1"]\
.getService(components.interfaces.koIViewService)
... | <commit_before># This macro is to remove 1 character form selected line on the left.
# Useful to clean code copied from diff file.
#
# Author: Nguyễn Hồng Quân (ng.hong.quan@gmail.com)
from xpcom import components
viewSvc = components.classes["@activestate.com/koViewService;1"]\
.getService(components.interfaces.k... |
0a884d3c38cb1449a6fa5c650ed06cde647de4a8 | settings/sqlite.py | settings/sqlite.py | from .base import *
import os.path
DATABASES = {
'default':
{
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'dev.db'),
}
}
SESSION_COOKIE_DOMAIN = None
HAYSTACK_SOLR_URL = 'http://localhost:8983/solr'
| from .base import *
import os.path
DATABASES = {
'default':
{
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'dev.db'),
}
}
SESSION_COOKIE_DOMAIN = None
HAYSTACK_SOLR_URL = 'http://localhost:8983/solr'
try:
... | Allow local settings override as well. | Allow local settings override as well.
| Python | mit | singingwolfboy/readthedocs.org,laplaceliu/readthedocs.org,kenwang76/readthedocs.org,hach-que/readthedocs.org,fujita-shintaro/readthedocs.org,rtfd/readthedocs.org,tddv/readthedocs.org,raven47git/readthedocs.org,mhils/readthedocs.org,royalwang/readthedocs.org,johncosta/private-readthedocs.org,asampat3090/readthedocs.org,... | from .base import *
import os.path
DATABASES = {
'default':
{
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'dev.db'),
}
}
SESSION_COOKIE_DOMAIN = None
HAYSTACK_SOLR_URL = 'http://localhost:8983/solr'
Allow lo... | from .base import *
import os.path
DATABASES = {
'default':
{
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'dev.db'),
}
}
SESSION_COOKIE_DOMAIN = None
HAYSTACK_SOLR_URL = 'http://localhost:8983/solr'
try:
... | <commit_before>from .base import *
import os.path
DATABASES = {
'default':
{
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'dev.db'),
}
}
SESSION_COOKIE_DOMAIN = None
HAYSTACK_SOLR_URL = 'http://localhost:8983/... | from .base import *
import os.path
DATABASES = {
'default':
{
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'dev.db'),
}
}
SESSION_COOKIE_DOMAIN = None
HAYSTACK_SOLR_URL = 'http://localhost:8983/solr'
try:
... | from .base import *
import os.path
DATABASES = {
'default':
{
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'dev.db'),
}
}
SESSION_COOKIE_DOMAIN = None
HAYSTACK_SOLR_URL = 'http://localhost:8983/solr'
Allow lo... | <commit_before>from .base import *
import os.path
DATABASES = {
'default':
{
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'dev.db'),
}
}
SESSION_COOKIE_DOMAIN = None
HAYSTACK_SOLR_URL = 'http://localhost:8983/... |
14d170eece4e8bb105f5316fb0c6e672a3253b08 | py3flowtools/flowtools_wrapper.py | py3flowtools/flowtools_wrapper.py | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles (bbayles@gmail.com)
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles (bbayles@gmail.com)
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | Convert FlowToolsLog to a class | Convert FlowToolsLog to a class
| Python | mit | bbayles/py3flowtools | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles (bbayles@gmail.com)
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles (bbayles@gmail.com)
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | <commit_before># flowtools_wrapper.py
# Copyright 2014 Bo Bayles (bbayles@gmail.com)
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major <... | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles (bbayles@gmail.com)
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles (bbayles@gmail.com)
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | <commit_before># flowtools_wrapper.py
# Copyright 2014 Bo Bayles (bbayles@gmail.com)
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major <... |
5b6bd6cacc7032bc6a830707374b1448861e5d08 | plugin.py | plugin.py | import sublime
def plugin_loaded():
# Native package causes some conflicts.
# Thanks https://github.com/SublimeText-Markdown/MarkdownEditing
disable_native_php_package()
def disable_native_php_package():
settings = sublime.load_settings('Preferences.sublime-settings')
ignored_packages = settings.g... | import sublime
def plugin_loaded():
# Native package causes some conflicts.
# Thanks https://github.com/SublimeText-Markdown/MarkdownEditing
disable_native_php_package()
def disable_native_php_package():
settings = sublime.load_settings('Preferences.sublime-settings')
ignored_packages = settings.g... | Sort ignored packages when adding native PHP package | Sort ignored packages when adding native PHP package
| Python | bsd-3-clause | gerardroche/sublime-php-grammar,gerardroche/sublime-php-grammar | import sublime
def plugin_loaded():
# Native package causes some conflicts.
# Thanks https://github.com/SublimeText-Markdown/MarkdownEditing
disable_native_php_package()
def disable_native_php_package():
settings = sublime.load_settings('Preferences.sublime-settings')
ignored_packages = settings.g... | import sublime
def plugin_loaded():
# Native package causes some conflicts.
# Thanks https://github.com/SublimeText-Markdown/MarkdownEditing
disable_native_php_package()
def disable_native_php_package():
settings = sublime.load_settings('Preferences.sublime-settings')
ignored_packages = settings.g... | <commit_before>import sublime
def plugin_loaded():
# Native package causes some conflicts.
# Thanks https://github.com/SublimeText-Markdown/MarkdownEditing
disable_native_php_package()
def disable_native_php_package():
settings = sublime.load_settings('Preferences.sublime-settings')
ignored_packag... | import sublime
def plugin_loaded():
# Native package causes some conflicts.
# Thanks https://github.com/SublimeText-Markdown/MarkdownEditing
disable_native_php_package()
def disable_native_php_package():
settings = sublime.load_settings('Preferences.sublime-settings')
ignored_packages = settings.g... | import sublime
def plugin_loaded():
# Native package causes some conflicts.
# Thanks https://github.com/SublimeText-Markdown/MarkdownEditing
disable_native_php_package()
def disable_native_php_package():
settings = sublime.load_settings('Preferences.sublime-settings')
ignored_packages = settings.g... | <commit_before>import sublime
def plugin_loaded():
# Native package causes some conflicts.
# Thanks https://github.com/SublimeText-Markdown/MarkdownEditing
disable_native_php_package()
def disable_native_php_package():
settings = sublime.load_settings('Preferences.sublime-settings')
ignored_packag... |
76e766998984da126de4cb6121c07690fbdeeba1 | pystil/data/graph/line.py | pystil/data/graph/line.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 by Florian Mounier, Kozea
# This file is part of pystil, licensed under a 3-clause BSD license.
"""Treat line data"""
from pystil.data.utils import make_time_serie, on, between
from pystil.db import db, count, Visit, distinct
def process_data(site,... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 by Florian Mounier, Kozea
# This file is part of pystil, licensed under a 3-clause BSD license.
"""Treat line data"""
from pystil.data.utils import make_time_serie, on, between
from pystil.db import db, count, Visit, distinct
def process_data(site,... | Fix the new/unique visits (at least!) | Fix the new/unique visits (at least!)
| Python | bsd-3-clause | Kozea/pystil,Kozea/pystil,Kozea/pystil,Kozea/pystil,Kozea/pystil | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 by Florian Mounier, Kozea
# This file is part of pystil, licensed under a 3-clause BSD license.
"""Treat line data"""
from pystil.data.utils import make_time_serie, on, between
from pystil.db import db, count, Visit, distinct
def process_data(site,... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 by Florian Mounier, Kozea
# This file is part of pystil, licensed under a 3-clause BSD license.
"""Treat line data"""
from pystil.data.utils import make_time_serie, on, between
from pystil.db import db, count, Visit, distinct
def process_data(site,... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 by Florian Mounier, Kozea
# This file is part of pystil, licensed under a 3-clause BSD license.
"""Treat line data"""
from pystil.data.utils import make_time_serie, on, between
from pystil.db import db, count, Visit, distinct
def pro... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 by Florian Mounier, Kozea
# This file is part of pystil, licensed under a 3-clause BSD license.
"""Treat line data"""
from pystil.data.utils import make_time_serie, on, between
from pystil.db import db, count, Visit, distinct
def process_data(site,... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 by Florian Mounier, Kozea
# This file is part of pystil, licensed under a 3-clause BSD license.
"""Treat line data"""
from pystil.data.utils import make_time_serie, on, between
from pystil.db import db, count, Visit, distinct
def process_data(site,... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 by Florian Mounier, Kozea
# This file is part of pystil, licensed under a 3-clause BSD license.
"""Treat line data"""
from pystil.data.utils import make_time_serie, on, between
from pystil.db import db, count, Visit, distinct
def pro... |
268467c5eb12e92a031d22e3e0515e9d6fc264b7 | ofgem_certificates.py | ofgem_certificates.py | #!/usr/bin/env python
# coding=utf-8
#
# Copyright 2013 david reid <zathrasorama@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | #!/usr/bin/env python
# coding=utf-8
#
# Copyright 2013 david reid <zathrasorama@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | Update the certificate script to accept month & year | Update the certificate script to accept month & year
| Python | unlicense | zathras777/pywind,zathras777/pywind | #!/usr/bin/env python
# coding=utf-8
#
# Copyright 2013 david reid <zathrasorama@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | #!/usr/bin/env python
# coding=utf-8
#
# Copyright 2013 david reid <zathrasorama@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | <commit_before>#!/usr/bin/env python
# coding=utf-8
#
# Copyright 2013 david reid <zathrasorama@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licens... | #!/usr/bin/env python
# coding=utf-8
#
# Copyright 2013 david reid <zathrasorama@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | #!/usr/bin/env python
# coding=utf-8
#
# Copyright 2013 david reid <zathrasorama@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | <commit_before>#!/usr/bin/env python
# coding=utf-8
#
# Copyright 2013 david reid <zathrasorama@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licens... |
695b3f628b56cd1dbe050f07692559ff3685290c | templatefinder/__init__.py | templatefinder/__init__.py | from __future__ import absolute_import
from .utils import *
VERSION = (0, 5,)
| from __future__ import absolute_import
# this is required for setup.py to work
try:
from .utils import *
except ImportError:
pass
VERSION = (0, 5, 1,)
| Fix setup.py for installs without Django | Fix setup.py for installs without Django
| Python | bsd-2-clause | TyMaszWeb/django-template-finder | from __future__ import absolute_import
from .utils import *
VERSION = (0, 5,)
Fix setup.py for installs without Django | from __future__ import absolute_import
# this is required for setup.py to work
try:
from .utils import *
except ImportError:
pass
VERSION = (0, 5, 1,)
| <commit_before>from __future__ import absolute_import
from .utils import *
VERSION = (0, 5,)
<commit_msg>Fix setup.py for installs without Django<commit_after> | from __future__ import absolute_import
# this is required for setup.py to work
try:
from .utils import *
except ImportError:
pass
VERSION = (0, 5, 1,)
| from __future__ import absolute_import
from .utils import *
VERSION = (0, 5,)
Fix setup.py for installs without Djangofrom __future__ import absolute_import
# this is required for setup.py to work
try:
from .utils import *
except ImportError:
pass
VERSION = (0, 5, 1,)
| <commit_before>from __future__ import absolute_import
from .utils import *
VERSION = (0, 5,)
<commit_msg>Fix setup.py for installs without Django<commit_after>from __future__ import absolute_import
# this is required for setup.py to work
try:
from .utils import *
except ImportError:
pass
VERSION = (0, 5, ... |
8d604d20562c8e90a938986976715e165aa98a53 | tests/test_rmd_to_ipynb.py | tests/test_rmd_to_ipynb.py | import nbrmd
import pytest
@pytest.mark.parametrize('nb_file', ['ioslides.Rmd', 'chunk_options.Rmd'])
def test_identity_write_read(nb_file):
"""
Test that writing the notebook with ipynb, and read again, yields identify
:param file:
:return:
"""
with open(nb_file) as fp:
rmd = fp.read(... | import nbrmd
import pytest
@pytest.mark.parametrize('nb_file', ['ioslides.Rmd', 'chunk_options.Rmd'])
def test_identity_write_read(nb_file):
"""
Test that writing the notebook with ipynb, and read again, yields identity
:param file:
:return:
"""
with open(nb_file) as fp:
rmd = fp.read(... | Fix typo identified by @tgy | Fix typo identified by @tgy
| Python | mit | mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext | import nbrmd
import pytest
@pytest.mark.parametrize('nb_file', ['ioslides.Rmd', 'chunk_options.Rmd'])
def test_identity_write_read(nb_file):
"""
Test that writing the notebook with ipynb, and read again, yields identify
:param file:
:return:
"""
with open(nb_file) as fp:
rmd = fp.read(... | import nbrmd
import pytest
@pytest.mark.parametrize('nb_file', ['ioslides.Rmd', 'chunk_options.Rmd'])
def test_identity_write_read(nb_file):
"""
Test that writing the notebook with ipynb, and read again, yields identity
:param file:
:return:
"""
with open(nb_file) as fp:
rmd = fp.read(... | <commit_before>import nbrmd
import pytest
@pytest.mark.parametrize('nb_file', ['ioslides.Rmd', 'chunk_options.Rmd'])
def test_identity_write_read(nb_file):
"""
Test that writing the notebook with ipynb, and read again, yields identify
:param file:
:return:
"""
with open(nb_file) as fp:
... | import nbrmd
import pytest
@pytest.mark.parametrize('nb_file', ['ioslides.Rmd', 'chunk_options.Rmd'])
def test_identity_write_read(nb_file):
"""
Test that writing the notebook with ipynb, and read again, yields identity
:param file:
:return:
"""
with open(nb_file) as fp:
rmd = fp.read(... | import nbrmd
import pytest
@pytest.mark.parametrize('nb_file', ['ioslides.Rmd', 'chunk_options.Rmd'])
def test_identity_write_read(nb_file):
"""
Test that writing the notebook with ipynb, and read again, yields identify
:param file:
:return:
"""
with open(nb_file) as fp:
rmd = fp.read(... | <commit_before>import nbrmd
import pytest
@pytest.mark.parametrize('nb_file', ['ioslides.Rmd', 'chunk_options.Rmd'])
def test_identity_write_read(nb_file):
"""
Test that writing the notebook with ipynb, and read again, yields identify
:param file:
:return:
"""
with open(nb_file) as fp:
... |
a764e58549284b8af1b3978676b8ee121fd918e3 | thecure/levels/__init__.py | thecure/levels/__init__.py | from thecure.levels.base import *
from thecure.levels.cliff import Cliff
from thecure.levels.overworld import Overworld
def get_levels():
return [Cliff]
#return [Overworld, Cliff]
| from thecure.levels.base import *
from thecure.levels.cliff import Cliff
from thecure.levels.overworld import Overworld
def get_levels():
return [Overworld, Cliff]
| Set the overworld as the default level again. | Set the overworld as the default level again.
| Python | mit | chipx86/the-cure | from thecure.levels.base import *
from thecure.levels.cliff import Cliff
from thecure.levels.overworld import Overworld
def get_levels():
return [Cliff]
#return [Overworld, Cliff]
Set the overworld as the default level again. | from thecure.levels.base import *
from thecure.levels.cliff import Cliff
from thecure.levels.overworld import Overworld
def get_levels():
return [Overworld, Cliff]
| <commit_before>from thecure.levels.base import *
from thecure.levels.cliff import Cliff
from thecure.levels.overworld import Overworld
def get_levels():
return [Cliff]
#return [Overworld, Cliff]
<commit_msg>Set the overworld as the default level again.<commit_after> | from thecure.levels.base import *
from thecure.levels.cliff import Cliff
from thecure.levels.overworld import Overworld
def get_levels():
return [Overworld, Cliff]
| from thecure.levels.base import *
from thecure.levels.cliff import Cliff
from thecure.levels.overworld import Overworld
def get_levels():
return [Cliff]
#return [Overworld, Cliff]
Set the overworld as the default level again.from thecure.levels.base import *
from thecure.levels.cliff import Cliff
from thecure... | <commit_before>from thecure.levels.base import *
from thecure.levels.cliff import Cliff
from thecure.levels.overworld import Overworld
def get_levels():
return [Cliff]
#return [Overworld, Cliff]
<commit_msg>Set the overworld as the default level again.<commit_after>from thecure.levels.base import *
from thecu... |
e8cfb78df42021097e54009c5b724c1d176822bc | sale_analytic_cost/__openerp__.py | sale_analytic_cost/__openerp__.py | # -*- coding: utf-8 -*-
# (c) 2015 Ainara Galdona - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Sale Analytic Cost',
"version": "8.0.1.0.0",
"license": 'AGPL-3',
"author": 'AvanzOSC,'
'Serv. Tecnol. Avanzados - Pedro M. Baeza',
'website': "http... | # -*- coding: utf-8 -*-
# (c) 2015 Ainara Galdona - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Sale Analytic Cost',
"version": "8.0.1.0.0",
"license": 'AGPL-3',
"author": 'AvanzOSC,'
'Serv. Tecnol. Avanzados - Pedro M. Baeza',
'website': "http... | Change dependency with "mrp_production_project_estimated_cost" by dependecy "mrp_production_estimated_cost". | [FIX] sale_analytic_cost: Change dependency with "mrp_production_project_estimated_cost" by dependecy "mrp_production_estimated_cost".
| Python | agpl-3.0 | Daniel-CA/odoo-addons,alfredoavanzosc/odoo-addons,mikelarre/hr-addons,Daniel-CA/odoo-addons,esthermm/odoo-addons,agaldona/odoo-addons,alfredoavanzosc/odoo-addons,esthermm/odoo-addons,agaldona/odoo-addons,agaldona/odoo-addons,esthermm/odoo-addons,Daniel-CA/odoo-addons | # -*- coding: utf-8 -*-
# (c) 2015 Ainara Galdona - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Sale Analytic Cost',
"version": "8.0.1.0.0",
"license": 'AGPL-3',
"author": 'AvanzOSC,'
'Serv. Tecnol. Avanzados - Pedro M. Baeza',
'website': "http... | # -*- coding: utf-8 -*-
# (c) 2015 Ainara Galdona - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Sale Analytic Cost',
"version": "8.0.1.0.0",
"license": 'AGPL-3',
"author": 'AvanzOSC,'
'Serv. Tecnol. Avanzados - Pedro M. Baeza',
'website': "http... | <commit_before># -*- coding: utf-8 -*-
# (c) 2015 Ainara Galdona - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Sale Analytic Cost',
"version": "8.0.1.0.0",
"license": 'AGPL-3',
"author": 'AvanzOSC,'
'Serv. Tecnol. Avanzados - Pedro M. Baeza',
'... | # -*- coding: utf-8 -*-
# (c) 2015 Ainara Galdona - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Sale Analytic Cost',
"version": "8.0.1.0.0",
"license": 'AGPL-3',
"author": 'AvanzOSC,'
'Serv. Tecnol. Avanzados - Pedro M. Baeza',
'website': "http... | # -*- coding: utf-8 -*-
# (c) 2015 Ainara Galdona - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Sale Analytic Cost',
"version": "8.0.1.0.0",
"license": 'AGPL-3',
"author": 'AvanzOSC,'
'Serv. Tecnol. Avanzados - Pedro M. Baeza',
'website': "http... | <commit_before># -*- coding: utf-8 -*-
# (c) 2015 Ainara Galdona - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Sale Analytic Cost',
"version": "8.0.1.0.0",
"license": 'AGPL-3',
"author": 'AvanzOSC,'
'Serv. Tecnol. Avanzados - Pedro M. Baeza',
'... |
9b239f3484f3ec3e03ad1fda2a76d35852f662e6 | _releng/deploy.py | _releng/deploy.py | #!/usr/bin/env python3
import os
import subprocess
PUBLIC_URL = "https://frida.re"
BUCKET_URI = "s3://frida.re"
MAX_PURGES_PER_REQUEST = 30
def main():
repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
urls = []
listing = subprocess.check_output([
"s3cmd",
"ls",
... | #!/usr/bin/env python3
import os
import subprocess
PUBLIC_URL = "https://frida.re"
BUCKET_URI = "s3://frida.re"
MAX_PURGES_PER_REQUEST = 30
def main():
repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
urls = []
listing = subprocess.check_output([
"s3cmd",
"ls",
... | Make cache purging logic a bit more thorough | Make cache purging logic a bit more thorough
| Python | mit | frida/frida-website,frida/frida-website,frida/frida-website | #!/usr/bin/env python3
import os
import subprocess
PUBLIC_URL = "https://frida.re"
BUCKET_URI = "s3://frida.re"
MAX_PURGES_PER_REQUEST = 30
def main():
repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
urls = []
listing = subprocess.check_output([
"s3cmd",
"ls",
... | #!/usr/bin/env python3
import os
import subprocess
PUBLIC_URL = "https://frida.re"
BUCKET_URI = "s3://frida.re"
MAX_PURGES_PER_REQUEST = 30
def main():
repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
urls = []
listing = subprocess.check_output([
"s3cmd",
"ls",
... | <commit_before>#!/usr/bin/env python3
import os
import subprocess
PUBLIC_URL = "https://frida.re"
BUCKET_URI = "s3://frida.re"
MAX_PURGES_PER_REQUEST = 30
def main():
repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
urls = []
listing = subprocess.check_output([
"s3cmd",
... | #!/usr/bin/env python3
import os
import subprocess
PUBLIC_URL = "https://frida.re"
BUCKET_URI = "s3://frida.re"
MAX_PURGES_PER_REQUEST = 30
def main():
repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
urls = []
listing = subprocess.check_output([
"s3cmd",
"ls",
... | #!/usr/bin/env python3
import os
import subprocess
PUBLIC_URL = "https://frida.re"
BUCKET_URI = "s3://frida.re"
MAX_PURGES_PER_REQUEST = 30
def main():
repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
urls = []
listing = subprocess.check_output([
"s3cmd",
"ls",
... | <commit_before>#!/usr/bin/env python3
import os
import subprocess
PUBLIC_URL = "https://frida.re"
BUCKET_URI = "s3://frida.re"
MAX_PURGES_PER_REQUEST = 30
def main():
repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
urls = []
listing = subprocess.check_output([
"s3cmd",
... |
fa42219c1e6763f3adfc1f6ede4080f769e476a6 | tests/test_mongo.py | tests/test_mongo.py | #!/usr/bin/env python
# coding=utf8
from uuid import uuid4 as uuid
import pytest
pymongo = pytest.importorskip('pymongo')
from simplekv.db.mongo import MongoStore
from basic_store import BasicStore
class TestMongoDB(BasicStore):
@pytest.fixture
def db_name(self):
return '_simplekv_test_{}'.format(u... | #!/usr/bin/env python
# coding=utf8
from uuid import uuid4 as uuid
import pytest
pymongo = pytest.importorskip('pymongo')
from simplekv.db.mongo import MongoStore
from basic_store import BasicStore
class TestMongoDB(BasicStore):
@pytest.fixture
def db_name(self):
return '_simplekv_test_{}'.format(u... | Add database table name to MongoStore tests. | Add database table name to MongoStore tests.
| Python | mit | fmarczin/simplekv,karteek/simplekv,mbr/simplekv,mbr/simplekv,fmarczin/simplekv,karteek/simplekv | #!/usr/bin/env python
# coding=utf8
from uuid import uuid4 as uuid
import pytest
pymongo = pytest.importorskip('pymongo')
from simplekv.db.mongo import MongoStore
from basic_store import BasicStore
class TestMongoDB(BasicStore):
@pytest.fixture
def db_name(self):
return '_simplekv_test_{}'.format(u... | #!/usr/bin/env python
# coding=utf8
from uuid import uuid4 as uuid
import pytest
pymongo = pytest.importorskip('pymongo')
from simplekv.db.mongo import MongoStore
from basic_store import BasicStore
class TestMongoDB(BasicStore):
@pytest.fixture
def db_name(self):
return '_simplekv_test_{}'.format(u... | <commit_before>#!/usr/bin/env python
# coding=utf8
from uuid import uuid4 as uuid
import pytest
pymongo = pytest.importorskip('pymongo')
from simplekv.db.mongo import MongoStore
from basic_store import BasicStore
class TestMongoDB(BasicStore):
@pytest.fixture
def db_name(self):
return '_simplekv_te... | #!/usr/bin/env python
# coding=utf8
from uuid import uuid4 as uuid
import pytest
pymongo = pytest.importorskip('pymongo')
from simplekv.db.mongo import MongoStore
from basic_store import BasicStore
class TestMongoDB(BasicStore):
@pytest.fixture
def db_name(self):
return '_simplekv_test_{}'.format(u... | #!/usr/bin/env python
# coding=utf8
from uuid import uuid4 as uuid
import pytest
pymongo = pytest.importorskip('pymongo')
from simplekv.db.mongo import MongoStore
from basic_store import BasicStore
class TestMongoDB(BasicStore):
@pytest.fixture
def db_name(self):
return '_simplekv_test_{}'.format(u... | <commit_before>#!/usr/bin/env python
# coding=utf8
from uuid import uuid4 as uuid
import pytest
pymongo = pytest.importorskip('pymongo')
from simplekv.db.mongo import MongoStore
from basic_store import BasicStore
class TestMongoDB(BasicStore):
@pytest.fixture
def db_name(self):
return '_simplekv_te... |
af6c31d09aef686ba896b2a2c74fbb88cc7f1be0 | tests/test_utils.py | tests/test_utils.py | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | Add a start and end method to MockRequest | Add a start and end method to MockRequest
| Python | apache-2.0 | SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | <commit_before>#!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | <commit_before>#!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
bff9e9c8c72be580bca4d82abf2d7931379f8ebf | scripts/get_services_to_deploy.py | scripts/get_services_to_deploy.py | #!/usr/bin/env python
import requests
import json
import sys
import argparse
parser = argparse.ArgumentParser('Queries Monorail to get the services and deployNotes where a list of Pull requests will be deployed')
parser.add_argument('--url', help='URL where Monorail is located')
parser.add_argument('--pr', help='List... | #!/usr/bin/env python
import requests
import json
import sys
import argparse
parser = argparse.ArgumentParser('Queries Monorail to get the services and deployNotes where a list of Pull requests will be deployed')
parser.add_argument('--url', help='URL where Monorail is located')
parser.add_argument('--pr', help='List... | Print variables for initial testing | Print variables for initial testing
| Python | mit | AudienseCo/monorail,AudienseCo/monorail | #!/usr/bin/env python
import requests
import json
import sys
import argparse
parser = argparse.ArgumentParser('Queries Monorail to get the services and deployNotes where a list of Pull requests will be deployed')
parser.add_argument('--url', help='URL where Monorail is located')
parser.add_argument('--pr', help='List... | #!/usr/bin/env python
import requests
import json
import sys
import argparse
parser = argparse.ArgumentParser('Queries Monorail to get the services and deployNotes where a list of Pull requests will be deployed')
parser.add_argument('--url', help='URL where Monorail is located')
parser.add_argument('--pr', help='List... | <commit_before>#!/usr/bin/env python
import requests
import json
import sys
import argparse
parser = argparse.ArgumentParser('Queries Monorail to get the services and deployNotes where a list of Pull requests will be deployed')
parser.add_argument('--url', help='URL where Monorail is located')
parser.add_argument('--... | #!/usr/bin/env python
import requests
import json
import sys
import argparse
parser = argparse.ArgumentParser('Queries Monorail to get the services and deployNotes where a list of Pull requests will be deployed')
parser.add_argument('--url', help='URL where Monorail is located')
parser.add_argument('--pr', help='List... | #!/usr/bin/env python
import requests
import json
import sys
import argparse
parser = argparse.ArgumentParser('Queries Monorail to get the services and deployNotes where a list of Pull requests will be deployed')
parser.add_argument('--url', help='URL where Monorail is located')
parser.add_argument('--pr', help='List... | <commit_before>#!/usr/bin/env python
import requests
import json
import sys
import argparse
parser = argparse.ArgumentParser('Queries Monorail to get the services and deployNotes where a list of Pull requests will be deployed')
parser.add_argument('--url', help='URL where Monorail is located')
parser.add_argument('--... |
e3545cf444aea043fa892caeaff5a66ce893a0bb | misc/move-objects.py | misc/move-objects.py | from sys import argv
from axiom.store import Store
from entropy.store import ImmutableObject
from entropy.util import getAppStore
def moveObjects(appStore, start, limit=1000):
obj = None
for obj in appStore.query(
ImmutableObject,
ImmutableObject.storeID >= start,
limit=li... | from sys import argv
from axiom.store import Store
from entropy.store import ImmutableObject
from entropy.util import getAppStore
def moveObjects(appStore, start, limit):
obj = None
for obj in appStore.query(
ImmutableObject,
ImmutableObject.storeID >= start,
limit=limit):... | Make limit a command-line parameter too. | Make limit a command-line parameter too.
| Python | mit | fusionapp/entropy | from sys import argv
from axiom.store import Store
from entropy.store import ImmutableObject
from entropy.util import getAppStore
def moveObjects(appStore, start, limit=1000):
obj = None
for obj in appStore.query(
ImmutableObject,
ImmutableObject.storeID >= start,
limit=li... | from sys import argv
from axiom.store import Store
from entropy.store import ImmutableObject
from entropy.util import getAppStore
def moveObjects(appStore, start, limit):
obj = None
for obj in appStore.query(
ImmutableObject,
ImmutableObject.storeID >= start,
limit=limit):... | <commit_before>from sys import argv
from axiom.store import Store
from entropy.store import ImmutableObject
from entropy.util import getAppStore
def moveObjects(appStore, start, limit=1000):
obj = None
for obj in appStore.query(
ImmutableObject,
ImmutableObject.storeID >= start,
... | from sys import argv
from axiom.store import Store
from entropy.store import ImmutableObject
from entropy.util import getAppStore
def moveObjects(appStore, start, limit):
obj = None
for obj in appStore.query(
ImmutableObject,
ImmutableObject.storeID >= start,
limit=limit):... | from sys import argv
from axiom.store import Store
from entropy.store import ImmutableObject
from entropy.util import getAppStore
def moveObjects(appStore, start, limit=1000):
obj = None
for obj in appStore.query(
ImmutableObject,
ImmutableObject.storeID >= start,
limit=li... | <commit_before>from sys import argv
from axiom.store import Store
from entropy.store import ImmutableObject
from entropy.util import getAppStore
def moveObjects(appStore, start, limit=1000):
obj = None
for obj in appStore.query(
ImmutableObject,
ImmutableObject.storeID >= start,
... |
b1382e380016c9034826b090540275ce2bbe3a95 | src/ggrc_basic_permissions/roles/ProgramAuditReader.py | src/ggrc_basic_permissions/roles/ProgramAuditReader.py | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "AuditImplied"
description = """
A user with the ProgramReader role fo... | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "AuditImplied"
description = """
A user with the ProgramReader role fo... | Allow Program Readers to view comments | Allow Program Readers to view comments
| Python | apache-2.0 | jmakov/ggrc-core,plamut/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,kr41/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,kr41/ggrc-core,NejcZupec/ggrc-core,edofic/ggrc-core,jmakov/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,josthk... | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "AuditImplied"
description = """
A user with the ProgramReader role fo... | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "AuditImplied"
description = """
A user with the ProgramReader role fo... | <commit_before># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "AuditImplied"
description = """
A user with the Progra... | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "AuditImplied"
description = """
A user with the ProgramReader role fo... | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "AuditImplied"
description = """
A user with the ProgramReader role fo... | <commit_before># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "AuditImplied"
description = """
A user with the Progra... |
8773f652a1cf78299e3dd5ba9296ca2a50143caa | aiopg/__init__.py | aiopg/__init__.py | import re
import sys
from collections import namedtuple
from .connection import connect, Connection
from .cursor import Cursor
from .pool import create_pool, Pool
__all__ = ('connect', 'create_pool', 'Connection', 'Cursor', 'Pool',
'version', 'version_info')
__version__ = '0.3.2'
version = __version__ +... | import re
import sys
from collections import namedtuple
from .connection import connect, Connection
from .cursor import Cursor
from .pool import create_pool, Pool
__all__ = ('connect', 'create_pool', 'Connection', 'Cursor', 'Pool',
'version', 'version_info')
__version__ = '0.4.0a0'
version = __version__... | Revert master version to 0.4.0a0 | Revert master version to 0.4.0a0
| Python | bsd-2-clause | eirnym/aiopg,graingert/aiopg,hyzhak/aiopg,aio-libs/aiopg,luhn/aiopg,nerandell/aiopg | import re
import sys
from collections import namedtuple
from .connection import connect, Connection
from .cursor import Cursor
from .pool import create_pool, Pool
__all__ = ('connect', 'create_pool', 'Connection', 'Cursor', 'Pool',
'version', 'version_info')
__version__ = '0.3.2'
version = __version__ +... | import re
import sys
from collections import namedtuple
from .connection import connect, Connection
from .cursor import Cursor
from .pool import create_pool, Pool
__all__ = ('connect', 'create_pool', 'Connection', 'Cursor', 'Pool',
'version', 'version_info')
__version__ = '0.4.0a0'
version = __version__... | <commit_before>import re
import sys
from collections import namedtuple
from .connection import connect, Connection
from .cursor import Cursor
from .pool import create_pool, Pool
__all__ = ('connect', 'create_pool', 'Connection', 'Cursor', 'Pool',
'version', 'version_info')
__version__ = '0.3.2'
version ... | import re
import sys
from collections import namedtuple
from .connection import connect, Connection
from .cursor import Cursor
from .pool import create_pool, Pool
__all__ = ('connect', 'create_pool', 'Connection', 'Cursor', 'Pool',
'version', 'version_info')
__version__ = '0.4.0a0'
version = __version__... | import re
import sys
from collections import namedtuple
from .connection import connect, Connection
from .cursor import Cursor
from .pool import create_pool, Pool
__all__ = ('connect', 'create_pool', 'Connection', 'Cursor', 'Pool',
'version', 'version_info')
__version__ = '0.3.2'
version = __version__ +... | <commit_before>import re
import sys
from collections import namedtuple
from .connection import connect, Connection
from .cursor import Cursor
from .pool import create_pool, Pool
__all__ = ('connect', 'create_pool', 'Connection', 'Cursor', 'Pool',
'version', 'version_info')
__version__ = '0.3.2'
version ... |
d0e7d3578fe79432ad2b2cc62be2203d4ff36014 | examples/charts/file/cat_heatmap.py | examples/charts/file/cat_heatmap.py | from bokeh.charts import HeatMap, output_file, show
from bokeh.sampledata.unemployment1948 import data
# pandas magic
df = data[data.columns[:-2]]
df2 = df.set_index(df[df.columns[0]].astype(str))
df2.drop(df.columns[0], axis=1, inplace=True)
df3 = df2.transpose()
output_file("cat_heatmap.html")
hm = HeatMap(df3, ti... | from bokeh.charts import HeatMap, output_file, show
from bokeh.palettes import YlOrRd9 as palette
from bokeh.sampledata.unemployment1948 import data
# pandas magic
df = data[data.columns[:-1]]
df2 = df.set_index(df[df.columns[0]].astype(str))
df2.drop(df.columns[0], axis=1, inplace=True)
df3 = df2.transpose()
output_... | Use all the months of the year and tweak palette. | Use all the months of the year and tweak palette.
- Picked a continuous palette and reversed as better for the data.
| Python | bsd-3-clause | abele/bokeh,laurent-george/bokeh,azjps/bokeh,josherick/bokeh,rs2/bokeh,timsnyder/bokeh,draperjames/bokeh,matbra/bokeh,ptitjano/bokeh,DuCorey/bokeh,awanke/bokeh,akloster/bokeh,xguse/bokeh,stonebig/bokeh,KasperPRasmussen/bokeh,phobson/bokeh,stonebig/bokeh,CrazyGuo/bokeh,ericmjl/bokeh,rhiever/bokeh,caseyclements/bokeh,rox... | from bokeh.charts import HeatMap, output_file, show
from bokeh.sampledata.unemployment1948 import data
# pandas magic
df = data[data.columns[:-2]]
df2 = df.set_index(df[df.columns[0]].astype(str))
df2.drop(df.columns[0], axis=1, inplace=True)
df3 = df2.transpose()
output_file("cat_heatmap.html")
hm = HeatMap(df3, ti... | from bokeh.charts import HeatMap, output_file, show
from bokeh.palettes import YlOrRd9 as palette
from bokeh.sampledata.unemployment1948 import data
# pandas magic
df = data[data.columns[:-1]]
df2 = df.set_index(df[df.columns[0]].astype(str))
df2.drop(df.columns[0], axis=1, inplace=True)
df3 = df2.transpose()
output_... | <commit_before>from bokeh.charts import HeatMap, output_file, show
from bokeh.sampledata.unemployment1948 import data
# pandas magic
df = data[data.columns[:-2]]
df2 = df.set_index(df[df.columns[0]].astype(str))
df2.drop(df.columns[0], axis=1, inplace=True)
df3 = df2.transpose()
output_file("cat_heatmap.html")
hm = ... | from bokeh.charts import HeatMap, output_file, show
from bokeh.palettes import YlOrRd9 as palette
from bokeh.sampledata.unemployment1948 import data
# pandas magic
df = data[data.columns[:-1]]
df2 = df.set_index(df[df.columns[0]].astype(str))
df2.drop(df.columns[0], axis=1, inplace=True)
df3 = df2.transpose()
output_... | from bokeh.charts import HeatMap, output_file, show
from bokeh.sampledata.unemployment1948 import data
# pandas magic
df = data[data.columns[:-2]]
df2 = df.set_index(df[df.columns[0]].astype(str))
df2.drop(df.columns[0], axis=1, inplace=True)
df3 = df2.transpose()
output_file("cat_heatmap.html")
hm = HeatMap(df3, ti... | <commit_before>from bokeh.charts import HeatMap, output_file, show
from bokeh.sampledata.unemployment1948 import data
# pandas magic
df = data[data.columns[:-2]]
df2 = df.set_index(df[df.columns[0]].astype(str))
df2.drop(df.columns[0], axis=1, inplace=True)
df3 = df2.transpose()
output_file("cat_heatmap.html")
hm = ... |
a7c5c9d27d29e14ebb2d314890b40eab318501ac | dialogos/admin.py | dialogos/admin.py | from django.contrib import admin
from dialogos.models import Comment
class CommentAdmin(admin.ModelAdmin):
list_display = ['author', 'content_type', 'public']
list_filter = ['public', 'content_type']
admin.site.register(Comment, CommentAdmin)
| from django.contrib import admin
from dialogos.models import Comment
class CommentAdmin(admin.ModelAdmin):
list_display = ["author", "content_type", "public"]
list_filter = ["public", "content_type"]
admin.site.register(Comment, CommentAdmin)
| Update style to match Pinax conventions | Update style to match Pinax conventions | Python | mit | pinax/pinax-comments,rizumu/dialogos,GeoNode/geonode-dialogos,eldarion/dialogos,georgedorn/dialogos,pinax/pinax-comments | from django.contrib import admin
from dialogos.models import Comment
class CommentAdmin(admin.ModelAdmin):
list_display = ['author', 'content_type', 'public']
list_filter = ['public', 'content_type']
admin.site.register(Comment, CommentAdmin)
Update style to match Pinax conventions | from django.contrib import admin
from dialogos.models import Comment
class CommentAdmin(admin.ModelAdmin):
list_display = ["author", "content_type", "public"]
list_filter = ["public", "content_type"]
admin.site.register(Comment, CommentAdmin)
| <commit_before>from django.contrib import admin
from dialogos.models import Comment
class CommentAdmin(admin.ModelAdmin):
list_display = ['author', 'content_type', 'public']
list_filter = ['public', 'content_type']
admin.site.register(Comment, CommentAdmin)
<commit_msg>Update style to match Pinax convention... | from django.contrib import admin
from dialogos.models import Comment
class CommentAdmin(admin.ModelAdmin):
list_display = ["author", "content_type", "public"]
list_filter = ["public", "content_type"]
admin.site.register(Comment, CommentAdmin)
| from django.contrib import admin
from dialogos.models import Comment
class CommentAdmin(admin.ModelAdmin):
list_display = ['author', 'content_type', 'public']
list_filter = ['public', 'content_type']
admin.site.register(Comment, CommentAdmin)
Update style to match Pinax conventionsfrom django.contrib import... | <commit_before>from django.contrib import admin
from dialogos.models import Comment
class CommentAdmin(admin.ModelAdmin):
list_display = ['author', 'content_type', 'public']
list_filter = ['public', 'content_type']
admin.site.register(Comment, CommentAdmin)
<commit_msg>Update style to match Pinax convention... |
c09465f6f5d70789ca01470015985cbbdb465db9 | problem_2/solution.py | problem_2/solution.py | from timeit import timeit
def sum_even_fibonacci_numbers_1():
f1, f2, s, = 0, 1, 0,
while f2 < 4000000:
f2, f1 = f1, f1 + f2
if f2 % 2 == 0:
s += f2
return s
def sum_even_fibonacci_numbers_2():
s, a, b = 0, 1, 1
c = a + b
while c < 4000000:
s += c
a = ... | import time
def sum_even_fibonacci_numbers_1():
f1, f2, s, = 0, 1, 0,
while f2 < 4000000:
f2, f1 = f1, f1 + f2
if f2 % 2 == 0:
s += f2
return s
def sum_even_fibonacci_numbers_2():
s, a, b = 0, 1, 1
c = a + b
while c < 4000000:
s += c
a = b + c
... | Add better timing for python implementation of problem 2 | Add better timing for python implementation of problem 2
| Python | mit | mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler | from timeit import timeit
def sum_even_fibonacci_numbers_1():
f1, f2, s, = 0, 1, 0,
while f2 < 4000000:
f2, f1 = f1, f1 + f2
if f2 % 2 == 0:
s += f2
return s
def sum_even_fibonacci_numbers_2():
s, a, b = 0, 1, 1
c = a + b
while c < 4000000:
s += c
a = ... | import time
def sum_even_fibonacci_numbers_1():
f1, f2, s, = 0, 1, 0,
while f2 < 4000000:
f2, f1 = f1, f1 + f2
if f2 % 2 == 0:
s += f2
return s
def sum_even_fibonacci_numbers_2():
s, a, b = 0, 1, 1
c = a + b
while c < 4000000:
s += c
a = b + c
... | <commit_before>from timeit import timeit
def sum_even_fibonacci_numbers_1():
f1, f2, s, = 0, 1, 0,
while f2 < 4000000:
f2, f1 = f1, f1 + f2
if f2 % 2 == 0:
s += f2
return s
def sum_even_fibonacci_numbers_2():
s, a, b = 0, 1, 1
c = a + b
while c < 4000000:
s +=... | import time
def sum_even_fibonacci_numbers_1():
f1, f2, s, = 0, 1, 0,
while f2 < 4000000:
f2, f1 = f1, f1 + f2
if f2 % 2 == 0:
s += f2
return s
def sum_even_fibonacci_numbers_2():
s, a, b = 0, 1, 1
c = a + b
while c < 4000000:
s += c
a = b + c
... | from timeit import timeit
def sum_even_fibonacci_numbers_1():
f1, f2, s, = 0, 1, 0,
while f2 < 4000000:
f2, f1 = f1, f1 + f2
if f2 % 2 == 0:
s += f2
return s
def sum_even_fibonacci_numbers_2():
s, a, b = 0, 1, 1
c = a + b
while c < 4000000:
s += c
a = ... | <commit_before>from timeit import timeit
def sum_even_fibonacci_numbers_1():
f1, f2, s, = 0, 1, 0,
while f2 < 4000000:
f2, f1 = f1, f1 + f2
if f2 % 2 == 0:
s += f2
return s
def sum_even_fibonacci_numbers_2():
s, a, b = 0, 1, 1
c = a + b
while c < 4000000:
s +=... |
a612a245937781e86391e5c3ec8a740f36b405ce | problems/19/Solver.py | problems/19/Solver.py | class Solver:
def solve(self, start_number):
recipient = 1
remaining = start_number
power = 1
while remaining > 1:
new_remaining = remaining // 2
remaining_was_odd = remaining % 2
power *= 2
remaining = new_remaining
if rema... | class Solver:
def __init__(self):
self.next_elves = {}
def solve(self, start_number):
recipient = 1
remaining = start_number
power = 1
while remaining > 1:
new_remaining = remaining // 2
remaining_was_odd = remaining % 2
power *= 2
... | Refactor to use linked list | Refactor to use linked list
| Python | mit | tmct/adventOfCode2016 | class Solver:
def solve(self, start_number):
recipient = 1
remaining = start_number
power = 1
while remaining > 1:
new_remaining = remaining // 2
remaining_was_odd = remaining % 2
power *= 2
remaining = new_remaining
if rema... | class Solver:
def __init__(self):
self.next_elves = {}
def solve(self, start_number):
recipient = 1
remaining = start_number
power = 1
while remaining > 1:
new_remaining = remaining // 2
remaining_was_odd = remaining % 2
power *= 2
... | <commit_before>class Solver:
def solve(self, start_number):
recipient = 1
remaining = start_number
power = 1
while remaining > 1:
new_remaining = remaining // 2
remaining_was_odd = remaining % 2
power *= 2
remaining = new_remaining
... | class Solver:
def __init__(self):
self.next_elves = {}
def solve(self, start_number):
recipient = 1
remaining = start_number
power = 1
while remaining > 1:
new_remaining = remaining // 2
remaining_was_odd = remaining % 2
power *= 2
... | class Solver:
def solve(self, start_number):
recipient = 1
remaining = start_number
power = 1
while remaining > 1:
new_remaining = remaining // 2
remaining_was_odd = remaining % 2
power *= 2
remaining = new_remaining
if rema... | <commit_before>class Solver:
def solve(self, start_number):
recipient = 1
remaining = start_number
power = 1
while remaining > 1:
new_remaining = remaining // 2
remaining_was_odd = remaining % 2
power *= 2
remaining = new_remaining
... |
44191360586beeec04a4abc8a4aa262bc5ec052d | odinweb/exceptions.py | odinweb/exceptions.py | # -*- coding: utf-8 -*-
"""
Exceptions
~~~~~~~~~~
"""
from .constants import HTTPStatus
from .resources import Error
class ImmediateHttpResponse(Exception):
"""
A response that should be returned immediately.
"""
def __init__(self, resource, status=HTTPStatus.OK, headers=None):
self.resource ... | # -*- coding: utf-8 -*-
"""
Exceptions
~~~~~~~~~~
"""
from .constants import HTTPStatus
from .resources import Error
__all__ = ('ImmediateHttpResponse', 'HttpError', 'PermissionDenied')
class ImmediateHttpResponse(Exception):
"""
A response that should be returned immediately.
"""
def __init__(self,... | Refactor HttpError to use Error.from_status helper | Refactor HttpError to use Error.from_status helper
| Python | bsd-3-clause | python-odin/odinweb,python-odin/odinweb | # -*- coding: utf-8 -*-
"""
Exceptions
~~~~~~~~~~
"""
from .constants import HTTPStatus
from .resources import Error
class ImmediateHttpResponse(Exception):
"""
A response that should be returned immediately.
"""
def __init__(self, resource, status=HTTPStatus.OK, headers=None):
self.resource ... | # -*- coding: utf-8 -*-
"""
Exceptions
~~~~~~~~~~
"""
from .constants import HTTPStatus
from .resources import Error
__all__ = ('ImmediateHttpResponse', 'HttpError', 'PermissionDenied')
class ImmediateHttpResponse(Exception):
"""
A response that should be returned immediately.
"""
def __init__(self,... | <commit_before># -*- coding: utf-8 -*-
"""
Exceptions
~~~~~~~~~~
"""
from .constants import HTTPStatus
from .resources import Error
class ImmediateHttpResponse(Exception):
"""
A response that should be returned immediately.
"""
def __init__(self, resource, status=HTTPStatus.OK, headers=None):
... | # -*- coding: utf-8 -*-
"""
Exceptions
~~~~~~~~~~
"""
from .constants import HTTPStatus
from .resources import Error
__all__ = ('ImmediateHttpResponse', 'HttpError', 'PermissionDenied')
class ImmediateHttpResponse(Exception):
"""
A response that should be returned immediately.
"""
def __init__(self,... | # -*- coding: utf-8 -*-
"""
Exceptions
~~~~~~~~~~
"""
from .constants import HTTPStatus
from .resources import Error
class ImmediateHttpResponse(Exception):
"""
A response that should be returned immediately.
"""
def __init__(self, resource, status=HTTPStatus.OK, headers=None):
self.resource ... | <commit_before># -*- coding: utf-8 -*-
"""
Exceptions
~~~~~~~~~~
"""
from .constants import HTTPStatus
from .resources import Error
class ImmediateHttpResponse(Exception):
"""
A response that should be returned immediately.
"""
def __init__(self, resource, status=HTTPStatus.OK, headers=None):
... |
7ae151e277d2cb03037d40e1598b190ba4736433 | dthm4kaiako/events/views.py | dthm4kaiako/events/views.py | """Views for events application."""
from django.views import generic
from django.utils.timezone import now
from events.models import (
Event,
Location,
)
class HomeView(generic.TemplateView):
"""View for event homepage."""
template_name = 'events/home.html'
def get_context_data(self, **kwargs):... | """Views for events application."""
from django.views import generic
from django.utils.timezone import now
from events.models import (
Event,
Location,
)
class HomeView(generic.TemplateView):
"""View for event homepage."""
template_name = 'events/home.html'
def get_context_data(self, **kwargs):... | Reduce SQL queries for events homepage | Reduce SQL queries for events homepage
| Python | mit | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | """Views for events application."""
from django.views import generic
from django.utils.timezone import now
from events.models import (
Event,
Location,
)
class HomeView(generic.TemplateView):
"""View for event homepage."""
template_name = 'events/home.html'
def get_context_data(self, **kwargs):... | """Views for events application."""
from django.views import generic
from django.utils.timezone import now
from events.models import (
Event,
Location,
)
class HomeView(generic.TemplateView):
"""View for event homepage."""
template_name = 'events/home.html'
def get_context_data(self, **kwargs):... | <commit_before>"""Views for events application."""
from django.views import generic
from django.utils.timezone import now
from events.models import (
Event,
Location,
)
class HomeView(generic.TemplateView):
"""View for event homepage."""
template_name = 'events/home.html'
def get_context_data(s... | """Views for events application."""
from django.views import generic
from django.utils.timezone import now
from events.models import (
Event,
Location,
)
class HomeView(generic.TemplateView):
"""View for event homepage."""
template_name = 'events/home.html'
def get_context_data(self, **kwargs):... | """Views for events application."""
from django.views import generic
from django.utils.timezone import now
from events.models import (
Event,
Location,
)
class HomeView(generic.TemplateView):
"""View for event homepage."""
template_name = 'events/home.html'
def get_context_data(self, **kwargs):... | <commit_before>"""Views for events application."""
from django.views import generic
from django.utils.timezone import now
from events.models import (
Event,
Location,
)
class HomeView(generic.TemplateView):
"""View for event homepage."""
template_name = 'events/home.html'
def get_context_data(s... |
33f47fc9aff361d0cea9557e6470d505a352e5f0 | forms.py | forms.py | from flask.ext.wtf import Form
from wtforms import SelectField, BooleanField, IntegerField, TextField, \
validators
class TeamForm(Form):
number = IntegerField("Number", [validators.Required(),
validators.NumberRange(min=1, max=99999)])
name = TextField("Name", [valida... | from flask.ext.wtf import Form
from wtforms import SelectField, BooleanField, IntegerField, TextField, \
validators
from models import RobotScore
class TeamForm(Form):
number = IntegerField("Number", [validators.Required(),
validators.NumberRange(min=1, max=99999)])
na... | Validate that score doesn't already exist for a round when submitting the form | Validate that score doesn't already exist for a round when submitting the form
| Python | mit | rtfoley/scorepy,rtfoley/scorepy,rtfoley/scorepy | from flask.ext.wtf import Form
from wtforms import SelectField, BooleanField, IntegerField, TextField, \
validators
class TeamForm(Form):
number = IntegerField("Number", [validators.Required(),
validators.NumberRange(min=1, max=99999)])
name = TextField("Name", [valida... | from flask.ext.wtf import Form
from wtforms import SelectField, BooleanField, IntegerField, TextField, \
validators
from models import RobotScore
class TeamForm(Form):
number = IntegerField("Number", [validators.Required(),
validators.NumberRange(min=1, max=99999)])
na... | <commit_before>from flask.ext.wtf import Form
from wtforms import SelectField, BooleanField, IntegerField, TextField, \
validators
class TeamForm(Form):
number = IntegerField("Number", [validators.Required(),
validators.NumberRange(min=1, max=99999)])
name = TextField(... | from flask.ext.wtf import Form
from wtforms import SelectField, BooleanField, IntegerField, TextField, \
validators
from models import RobotScore
class TeamForm(Form):
number = IntegerField("Number", [validators.Required(),
validators.NumberRange(min=1, max=99999)])
na... | from flask.ext.wtf import Form
from wtforms import SelectField, BooleanField, IntegerField, TextField, \
validators
class TeamForm(Form):
number = IntegerField("Number", [validators.Required(),
validators.NumberRange(min=1, max=99999)])
name = TextField("Name", [valida... | <commit_before>from flask.ext.wtf import Form
from wtforms import SelectField, BooleanField, IntegerField, TextField, \
validators
class TeamForm(Form):
number = IntegerField("Number", [validators.Required(),
validators.NumberRange(min=1, max=99999)])
name = TextField(... |
08a7389e5be0d3f7a9e6c4e12b13f82da50480b1 | reference/gittaggers.py | reference/gittaggers.py | from setuptools.command.egg_info import egg_info
import subprocess
import time
class EggInfoFromGit(egg_info):
"""Tag the build with git commit timestamp.
If a build tag has already been set (e.g., "egg_info -b", building
from source package), leave it alone.
"""
def git_timestamp_tag(self):
... | from setuptools.command.egg_info import egg_info
import subprocess
import time
class EggInfoFromGit(egg_info):
"""Tag the build with git commit timestamp.
If a build tag has already been set (e.g., "egg_info -b", building
from source package), leave it alone.
"""
def git_timestamp_tag(self):
... | Fix Python packaging to use correct git log for package time/version stamps (2nd try) | Fix Python packaging to use correct git log for package time/version stamps (2nd try)
| Python | apache-2.0 | chapmanb/cwltool,brainstorm/common-workflow-language,curoverse/common-workflow-language,chapmanb/cwltool,hmenager/common-workflow-language,common-workflow-language/cwltool,foreveremain/common-workflow-language,StarvingMarvin/common-workflow-language,jeremiahsavage/cwltool,foreveremain/common-workflow-language,satra/com... | from setuptools.command.egg_info import egg_info
import subprocess
import time
class EggInfoFromGit(egg_info):
"""Tag the build with git commit timestamp.
If a build tag has already been set (e.g., "egg_info -b", building
from source package), leave it alone.
"""
def git_timestamp_tag(self):
... | from setuptools.command.egg_info import egg_info
import subprocess
import time
class EggInfoFromGit(egg_info):
"""Tag the build with git commit timestamp.
If a build tag has already been set (e.g., "egg_info -b", building
from source package), leave it alone.
"""
def git_timestamp_tag(self):
... | <commit_before>from setuptools.command.egg_info import egg_info
import subprocess
import time
class EggInfoFromGit(egg_info):
"""Tag the build with git commit timestamp.
If a build tag has already been set (e.g., "egg_info -b", building
from source package), leave it alone.
"""
def git_timestamp_t... | from setuptools.command.egg_info import egg_info
import subprocess
import time
class EggInfoFromGit(egg_info):
"""Tag the build with git commit timestamp.
If a build tag has already been set (e.g., "egg_info -b", building
from source package), leave it alone.
"""
def git_timestamp_tag(self):
... | from setuptools.command.egg_info import egg_info
import subprocess
import time
class EggInfoFromGit(egg_info):
"""Tag the build with git commit timestamp.
If a build tag has already been set (e.g., "egg_info -b", building
from source package), leave it alone.
"""
def git_timestamp_tag(self):
... | <commit_before>from setuptools.command.egg_info import egg_info
import subprocess
import time
class EggInfoFromGit(egg_info):
"""Tag the build with git commit timestamp.
If a build tag has already been set (e.g., "egg_info -b", building
from source package), leave it alone.
"""
def git_timestamp_t... |
834349fc6cc2f6d281f03f339dab116b897615fc | knowledge_repo/postprocessors/format_checks.py | knowledge_repo/postprocessors/format_checks.py | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | Refactor to avoid duplicate code | Refactor to avoid duplicate code
| Python | apache-2.0 | airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | <commit_before>from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
... | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
for fie... | <commit_before>from ..constants import FORMAT_CHECKS
from ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES
from ..postprocessor import KnowledgePostProcessor
class FormatChecks(KnowledgePostProcessor):
_registry_keys = [FORMAT_CHECKS]
def process(self, kp):
headers = kp.headers
... |
5d2110059731069a6a29a31d2b9f02bb2743e90b | scripts/cleanup-images.py | scripts/cleanup-images.py | #!/usr/bin/python
import os, sys
import pwd
if os.geteuid():
print >> sys.stderr, "Script must be run as root to manipulate permissions"
sys.exit(1)
from conary import dbstore
from mint import config
apacheGid = pwd.getpwnam('apache')[3]
isogenUid = pwd.getpwnam('isogen')[2]
cfg = config.MintConfig()
cfg.r... | #!/usr/bin/python
import os, sys
import pwd
if os.geteuid():
print >> sys.stderr, "Script must be run as root to manipulate permissions"
sys.exit(1)
from conary import dbstore
from mint import config
apacheGid = pwd.getpwnam('apache')[3]
isogenUid = pwd.getpwnam('isogen')[2]
cfg = config.MintConfig()
cfg.r... | Kill off another hardcoded path | Kill off another hardcoded path
| Python | apache-2.0 | sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint | #!/usr/bin/python
import os, sys
import pwd
if os.geteuid():
print >> sys.stderr, "Script must be run as root to manipulate permissions"
sys.exit(1)
from conary import dbstore
from mint import config
apacheGid = pwd.getpwnam('apache')[3]
isogenUid = pwd.getpwnam('isogen')[2]
cfg = config.MintConfig()
cfg.r... | #!/usr/bin/python
import os, sys
import pwd
if os.geteuid():
print >> sys.stderr, "Script must be run as root to manipulate permissions"
sys.exit(1)
from conary import dbstore
from mint import config
apacheGid = pwd.getpwnam('apache')[3]
isogenUid = pwd.getpwnam('isogen')[2]
cfg = config.MintConfig()
cfg.r... | <commit_before>#!/usr/bin/python
import os, sys
import pwd
if os.geteuid():
print >> sys.stderr, "Script must be run as root to manipulate permissions"
sys.exit(1)
from conary import dbstore
from mint import config
apacheGid = pwd.getpwnam('apache')[3]
isogenUid = pwd.getpwnam('isogen')[2]
cfg = config.Min... | #!/usr/bin/python
import os, sys
import pwd
if os.geteuid():
print >> sys.stderr, "Script must be run as root to manipulate permissions"
sys.exit(1)
from conary import dbstore
from mint import config
apacheGid = pwd.getpwnam('apache')[3]
isogenUid = pwd.getpwnam('isogen')[2]
cfg = config.MintConfig()
cfg.r... | #!/usr/bin/python
import os, sys
import pwd
if os.geteuid():
print >> sys.stderr, "Script must be run as root to manipulate permissions"
sys.exit(1)
from conary import dbstore
from mint import config
apacheGid = pwd.getpwnam('apache')[3]
isogenUid = pwd.getpwnam('isogen')[2]
cfg = config.MintConfig()
cfg.r... | <commit_before>#!/usr/bin/python
import os, sys
import pwd
if os.geteuid():
print >> sys.stderr, "Script must be run as root to manipulate permissions"
sys.exit(1)
from conary import dbstore
from mint import config
apacheGid = pwd.getpwnam('apache')[3]
isogenUid = pwd.getpwnam('isogen')[2]
cfg = config.Min... |
eabc02aed1cd5a109554f48bfb82f185e392c404 | remo/base/middleware.py | remo/base/middleware.py | from django.conf import settings
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
class RegisterMiddleware(object):
"""Middleware to enforce users to complete registration.
When a user logins and has the registration_complete field in his
... | from django.conf import settings
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
class RegisterMiddleware(object):
"""Middleware to enforce users to complete registration.
When a user logins and has the registration_complete field in his
... | Add 'oidc_logout' in allowed urls. | Add 'oidc_logout' in allowed urls.
| Python | bsd-3-clause | flamingspaz/remo,akatsoulas/remo,mozilla/remo,Mte90/remo,flamingspaz/remo,akatsoulas/remo,Mte90/remo,Mte90/remo,flamingspaz/remo,mozilla/remo,akatsoulas/remo,tsmrachel/remo,tsmrachel/remo,akatsoulas/remo,tsmrachel/remo,tsmrachel/remo,mozilla/remo,flamingspaz/remo,Mte90/remo,mozilla/remo | from django.conf import settings
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
class RegisterMiddleware(object):
"""Middleware to enforce users to complete registration.
When a user logins and has the registration_complete field in his
... | from django.conf import settings
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
class RegisterMiddleware(object):
"""Middleware to enforce users to complete registration.
When a user logins and has the registration_complete field in his
... | <commit_before>from django.conf import settings
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
class RegisterMiddleware(object):
"""Middleware to enforce users to complete registration.
When a user logins and has the registration_complet... | from django.conf import settings
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
class RegisterMiddleware(object):
"""Middleware to enforce users to complete registration.
When a user logins and has the registration_complete field in his
... | from django.conf import settings
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
class RegisterMiddleware(object):
"""Middleware to enforce users to complete registration.
When a user logins and has the registration_complete field in his
... | <commit_before>from django.conf import settings
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
class RegisterMiddleware(object):
"""Middleware to enforce users to complete registration.
When a user logins and has the registration_complet... |
d1afc8b673595accb854639b311bbdd49be56022 | server/LikeLines/debug.py | server/LikeLines/debug.py | """
Debug Blueprints.
"""
from flask import Blueprint, current_app, redirect, jsonify, url_for
debug_pages = Blueprint('debug', __name__)
@debug_pages.route("/clear_all")
def clear_all():
mongo = current_app.mongo
mongo.db.userSessions.remove()
mongo.db.interactionSessions.remove()
return redirect(ur... | """
Debug Blueprints.
"""
from flask import Blueprint, current_app, redirect, jsonify, url_for, request
debug_pages = Blueprint('debug', __name__)
@debug_pages.route("/clear_all", methods=['GET', 'POST'])
def clear_all():
if request.method == 'GET':
return '<form method="POST"><input type="submit" value=... | Make it harder to accidentally empty the database | Make it harder to accidentally empty the database
| Python | mit | ShinNoNoir/likelines-player,ShinNoNoir/likelines-player,ShinNoNoir/likelines-player | """
Debug Blueprints.
"""
from flask import Blueprint, current_app, redirect, jsonify, url_for
debug_pages = Blueprint('debug', __name__)
@debug_pages.route("/clear_all")
def clear_all():
mongo = current_app.mongo
mongo.db.userSessions.remove()
mongo.db.interactionSessions.remove()
return redirect(ur... | """
Debug Blueprints.
"""
from flask import Blueprint, current_app, redirect, jsonify, url_for, request
debug_pages = Blueprint('debug', __name__)
@debug_pages.route("/clear_all", methods=['GET', 'POST'])
def clear_all():
if request.method == 'GET':
return '<form method="POST"><input type="submit" value=... | <commit_before>"""
Debug Blueprints.
"""
from flask import Blueprint, current_app, redirect, jsonify, url_for
debug_pages = Blueprint('debug', __name__)
@debug_pages.route("/clear_all")
def clear_all():
mongo = current_app.mongo
mongo.db.userSessions.remove()
mongo.db.interactionSessions.remove()
ret... | """
Debug Blueprints.
"""
from flask import Blueprint, current_app, redirect, jsonify, url_for, request
debug_pages = Blueprint('debug', __name__)
@debug_pages.route("/clear_all", methods=['GET', 'POST'])
def clear_all():
if request.method == 'GET':
return '<form method="POST"><input type="submit" value=... | """
Debug Blueprints.
"""
from flask import Blueprint, current_app, redirect, jsonify, url_for
debug_pages = Blueprint('debug', __name__)
@debug_pages.route("/clear_all")
def clear_all():
mongo = current_app.mongo
mongo.db.userSessions.remove()
mongo.db.interactionSessions.remove()
return redirect(ur... | <commit_before>"""
Debug Blueprints.
"""
from flask import Blueprint, current_app, redirect, jsonify, url_for
debug_pages = Blueprint('debug', __name__)
@debug_pages.route("/clear_all")
def clear_all():
mongo = current_app.mongo
mongo.db.userSessions.remove()
mongo.db.interactionSessions.remove()
ret... |
5ab34396d4f494f884ddf98fb993bcf1b928216e | api/citations/urls.py | api/citations/urls.py | from django.conf.urls import url
from api.citations import views
urlpatterns = [
url(r'^$', views.CitationList.as_view(), name=views.CitationList.view_name),
url(r'^(?P<citation_id>\w+)/$', views.CitationDetail.as_view(), name=views.CitationDetail.view_name),
]
| from django.conf.urls import url
from api.citations import views
urlpatterns = [
url(r'^styles/$', views.CitationList.as_view(), name=views.CitationList.view_name),
url(r'^styles/(?P<citation_id>\w+)/$', views.CitationDetail.as_view(), name=views.CitationDetail.view_name),
]
| Add styles prefix to match api v1 | Add styles prefix to match api v1
| Python | apache-2.0 | mattclark/osf.io,chennan47/osf.io,rdhyee/osf.io,alexschiller/osf.io,mluo613/osf.io,HalcyonChimera/osf.io,TomBaxter/osf.io,laurenrevere/osf.io,Nesiehr/osf.io,mfraezz/osf.io,caneruguz/osf.io,crcresearch/osf.io,sloria/osf.io,adlius/osf.io,caseyrollins/osf.io,monikagrabowska/osf.io,caseyrollins/osf.io,brianjgeiger/osf.io,i... | from django.conf.urls import url
from api.citations import views
urlpatterns = [
url(r'^$', views.CitationList.as_view(), name=views.CitationList.view_name),
url(r'^(?P<citation_id>\w+)/$', views.CitationDetail.as_view(), name=views.CitationDetail.view_name),
]
Add styles prefix to match api v1 | from django.conf.urls import url
from api.citations import views
urlpatterns = [
url(r'^styles/$', views.CitationList.as_view(), name=views.CitationList.view_name),
url(r'^styles/(?P<citation_id>\w+)/$', views.CitationDetail.as_view(), name=views.CitationDetail.view_name),
]
| <commit_before>from django.conf.urls import url
from api.citations import views
urlpatterns = [
url(r'^$', views.CitationList.as_view(), name=views.CitationList.view_name),
url(r'^(?P<citation_id>\w+)/$', views.CitationDetail.as_view(), name=views.CitationDetail.view_name),
]
<commit_msg>Add styles prefix to ... | from django.conf.urls import url
from api.citations import views
urlpatterns = [
url(r'^styles/$', views.CitationList.as_view(), name=views.CitationList.view_name),
url(r'^styles/(?P<citation_id>\w+)/$', views.CitationDetail.as_view(), name=views.CitationDetail.view_name),
]
| from django.conf.urls import url
from api.citations import views
urlpatterns = [
url(r'^$', views.CitationList.as_view(), name=views.CitationList.view_name),
url(r'^(?P<citation_id>\w+)/$', views.CitationDetail.as_view(), name=views.CitationDetail.view_name),
]
Add styles prefix to match api v1from django.con... | <commit_before>from django.conf.urls import url
from api.citations import views
urlpatterns = [
url(r'^$', views.CitationList.as_view(), name=views.CitationList.view_name),
url(r'^(?P<citation_id>\w+)/$', views.CitationDetail.as_view(), name=views.CitationDetail.view_name),
]
<commit_msg>Add styles prefix to ... |
3059f6448e0fc2dd49ad38306f8efedc734b3aab | api/projects/tasks.py | api/projects/tasks.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
from api.settings import CeleryTasks, Intervals
from api.celery_api import app as celery_app
from experiments.tasks import build_experiment
from projects.models import ExperimentGroup
logger = logging.getLogger('p... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
from api.settings import CeleryTasks, Intervals
from api.celery_api import app as celery_app
from experiments.tasks import build_experiment
from projects.models import ExperimentGroup
logger = logging.getLogger('p... | Fix retry for experiment group | Fix retry for experiment group
| Python | apache-2.0 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
from api.settings import CeleryTasks, Intervals
from api.celery_api import app as celery_app
from experiments.tasks import build_experiment
from projects.models import ExperimentGroup
logger = logging.getLogger('p... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
from api.settings import CeleryTasks, Intervals
from api.celery_api import app as celery_app
from experiments.tasks import build_experiment
from projects.models import ExperimentGroup
logger = logging.getLogger('p... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
from api.settings import CeleryTasks, Intervals
from api.celery_api import app as celery_app
from experiments.tasks import build_experiment
from projects.models import ExperimentGroup
logger = loggi... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
from api.settings import CeleryTasks, Intervals
from api.celery_api import app as celery_app
from experiments.tasks import build_experiment
from projects.models import ExperimentGroup
logger = logging.getLogger('p... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
from api.settings import CeleryTasks, Intervals
from api.celery_api import app as celery_app
from experiments.tasks import build_experiment
from projects.models import ExperimentGroup
logger = logging.getLogger('p... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
from api.settings import CeleryTasks, Intervals
from api.celery_api import app as celery_app
from experiments.tasks import build_experiment
from projects.models import ExperimentGroup
logger = loggi... |
10655be79d9ab65f86939d0bd085197e0e35b39d | CodeFights/knapsackLight.py | CodeFights/knapsackLight.py | #!/usr/local/bin/python
# Code Fights Knapsack Problem
def knapsackLight(value1, weight1, value2, weight2, maxW):
if weight1 + weight2 <= maxW:
return value1 + value2
else:
return max([v for v, w in zip((value1, value2), (weight1, weight2))
if w <= maxW] + [0])
def main():... | #!/usr/local/bin/python
# Code Fights Knapsack Problem
def knapsackLight(value1, weight1, value2, weight2, maxW):
if weight1 + weight2 <= maxW:
return value1 + value2
else:
return max([v for v, w in zip((value1, value2), (weight1, weight2))
if w <= maxW] + [0])
def main():... | Format Code Fights knapsack light problem | Format Code Fights knapsack light problem
| Python | mit | HKuz/Test_Code | #!/usr/local/bin/python
# Code Fights Knapsack Problem
def knapsackLight(value1, weight1, value2, weight2, maxW):
if weight1 + weight2 <= maxW:
return value1 + value2
else:
return max([v for v, w in zip((value1, value2), (weight1, weight2))
if w <= maxW] + [0])
def main():... | #!/usr/local/bin/python
# Code Fights Knapsack Problem
def knapsackLight(value1, weight1, value2, weight2, maxW):
if weight1 + weight2 <= maxW:
return value1 + value2
else:
return max([v for v, w in zip((value1, value2), (weight1, weight2))
if w <= maxW] + [0])
def main():... | <commit_before>#!/usr/local/bin/python
# Code Fights Knapsack Problem
def knapsackLight(value1, weight1, value2, weight2, maxW):
if weight1 + weight2 <= maxW:
return value1 + value2
else:
return max([v for v, w in zip((value1, value2), (weight1, weight2))
if w <= maxW] + [0]... | #!/usr/local/bin/python
# Code Fights Knapsack Problem
def knapsackLight(value1, weight1, value2, weight2, maxW):
if weight1 + weight2 <= maxW:
return value1 + value2
else:
return max([v for v, w in zip((value1, value2), (weight1, weight2))
if w <= maxW] + [0])
def main():... | #!/usr/local/bin/python
# Code Fights Knapsack Problem
def knapsackLight(value1, weight1, value2, weight2, maxW):
if weight1 + weight2 <= maxW:
return value1 + value2
else:
return max([v for v, w in zip((value1, value2), (weight1, weight2))
if w <= maxW] + [0])
def main():... | <commit_before>#!/usr/local/bin/python
# Code Fights Knapsack Problem
def knapsackLight(value1, weight1, value2, weight2, maxW):
if weight1 + weight2 <= maxW:
return value1 + value2
else:
return max([v for v, w in zip((value1, value2), (weight1, weight2))
if w <= maxW] + [0]... |
82796dfb24c3e65b669d4336948e76e2a64cf73f | LR/lr/model/node_service.py | LR/lr/model/node_service.py | #!/usr/bin/pyton
# Copyright 2011 Lockheed Martin
'''
Created on Mar 17, 2011
Base model class for learning registry data model
@author: jpoyau
'''
from base_model import createBaseModel, ModelParser, defaultCouchServer, appConfig
from pylons import *
import datetime, logging
log = logging.getLogger(__name__)... | #!/usr/bin/pyton
# Copyright 2011 Lockheed Martin
'''
Created on Mar 17, 2011
Base model class for learning registry data model
@author: jpoyau
'''
from base_model import createBaseModel, ModelParser, defaultCouchServer, appConfig
from pylons import *
import datetime, logging
log = logging.getLogger(__name__)... | Add 'distribute' to the node services | Add 'distribute' to the node services
| Python | apache-2.0 | jimklo/LearningRegistry,jimklo/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningR... | #!/usr/bin/pyton
# Copyright 2011 Lockheed Martin
'''
Created on Mar 17, 2011
Base model class for learning registry data model
@author: jpoyau
'''
from base_model import createBaseModel, ModelParser, defaultCouchServer, appConfig
from pylons import *
import datetime, logging
log = logging.getLogger(__name__)... | #!/usr/bin/pyton
# Copyright 2011 Lockheed Martin
'''
Created on Mar 17, 2011
Base model class for learning registry data model
@author: jpoyau
'''
from base_model import createBaseModel, ModelParser, defaultCouchServer, appConfig
from pylons import *
import datetime, logging
log = logging.getLogger(__name__)... | <commit_before>#!/usr/bin/pyton
# Copyright 2011 Lockheed Martin
'''
Created on Mar 17, 2011
Base model class for learning registry data model
@author: jpoyau
'''
from base_model import createBaseModel, ModelParser, defaultCouchServer, appConfig
from pylons import *
import datetime, logging
log = logging.getL... | #!/usr/bin/pyton
# Copyright 2011 Lockheed Martin
'''
Created on Mar 17, 2011
Base model class for learning registry data model
@author: jpoyau
'''
from base_model import createBaseModel, ModelParser, defaultCouchServer, appConfig
from pylons import *
import datetime, logging
log = logging.getLogger(__name__)... | #!/usr/bin/pyton
# Copyright 2011 Lockheed Martin
'''
Created on Mar 17, 2011
Base model class for learning registry data model
@author: jpoyau
'''
from base_model import createBaseModel, ModelParser, defaultCouchServer, appConfig
from pylons import *
import datetime, logging
log = logging.getLogger(__name__)... | <commit_before>#!/usr/bin/pyton
# Copyright 2011 Lockheed Martin
'''
Created on Mar 17, 2011
Base model class for learning registry data model
@author: jpoyau
'''
from base_model import createBaseModel, ModelParser, defaultCouchServer, appConfig
from pylons import *
import datetime, logging
log = logging.getL... |
dcd97762b65df37b5f7c4724892ab76bb631762f | src/havenctl/havenctl/launcher.py | src/havenctl/havenctl/launcher.py | import sys
import getopt
from ctl import HavenCtl
def print_version():
import pkg_resources # part of setuptools
version = pkg_resources.require("havenctl")[0].version
print(version)
def print_usage():
print """
Usage: havenctl [-a <remote_address> | --address=<remote_address>]
[-p <... | import sys
import getopt
from ctl import HavenCtl
def print_version():
import pkg_resources # part of setuptools
version = pkg_resources.require("havenctl")[0].version
print(version)
def print_usage():
print """
Usage: havenctl [-a <remote_address> | --address=<remote_address>]
[-p <... | Make plain repl work again. | Make plain repl work again.
| Python | apache-2.0 | fintler/tomatodb,fintler/tomatodb,fintler/tomatodb | import sys
import getopt
from ctl import HavenCtl
def print_version():
import pkg_resources # part of setuptools
version = pkg_resources.require("havenctl")[0].version
print(version)
def print_usage():
print """
Usage: havenctl [-a <remote_address> | --address=<remote_address>]
[-p <... | import sys
import getopt
from ctl import HavenCtl
def print_version():
import pkg_resources # part of setuptools
version = pkg_resources.require("havenctl")[0].version
print(version)
def print_usage():
print """
Usage: havenctl [-a <remote_address> | --address=<remote_address>]
[-p <... | <commit_before>import sys
import getopt
from ctl import HavenCtl
def print_version():
import pkg_resources # part of setuptools
version = pkg_resources.require("havenctl")[0].version
print(version)
def print_usage():
print """
Usage: havenctl [-a <remote_address> | --address=<remote_address>]
... | import sys
import getopt
from ctl import HavenCtl
def print_version():
import pkg_resources # part of setuptools
version = pkg_resources.require("havenctl")[0].version
print(version)
def print_usage():
print """
Usage: havenctl [-a <remote_address> | --address=<remote_address>]
[-p <... | import sys
import getopt
from ctl import HavenCtl
def print_version():
import pkg_resources # part of setuptools
version = pkg_resources.require("havenctl")[0].version
print(version)
def print_usage():
print """
Usage: havenctl [-a <remote_address> | --address=<remote_address>]
[-p <... | <commit_before>import sys
import getopt
from ctl import HavenCtl
def print_version():
import pkg_resources # part of setuptools
version = pkg_resources.require("havenctl")[0].version
print(version)
def print_usage():
print """
Usage: havenctl [-a <remote_address> | --address=<remote_address>]
... |
7ce0478dafebb7f6c52150a3563ae4cc59d68d6e | mass_mailing_switzerland/models/mailchimp_merge_fields.py | mass_mailing_switzerland/models/mailchimp_merge_fields.py | ##############################################################################
#
# Copyright (C) 2021 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
#####################... | ##############################################################################
#
# Copyright (C) 2021 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
#####################... | FIX mailing_contact merge fields value | FIX mailing_contact merge fields value
| Python | agpl-3.0 | CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland | ##############################################################################
#
# Copyright (C) 2021 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
#####################... | ##############################################################################
#
# Copyright (C) 2021 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
#####################... | <commit_before>##############################################################################
#
# Copyright (C) 2021 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
######... | ##############################################################################
#
# Copyright (C) 2021 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
#####################... | ##############################################################################
#
# Copyright (C) 2021 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
#####################... | <commit_before>##############################################################################
#
# Copyright (C) 2021 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
######... |
2ad16c44adb20e9ba023e873149d67068504c34c | saleor/cart/__init__.py | saleor/cart/__init__.py | from __future__ import unicode_literals
from django.utils.translation import pgettext
from satchless import cart
from satchless.item import ItemList, ClassifyingPartitioner
from ..product.models import DigitalShip
class ShippedGroup(ItemList):
'''
Group for shippable products.
'''
pass
class Digit... | from __future__ import unicode_literals
from django.utils.translation import pgettext
from satchless import cart
from satchless.item import ItemList, ClassifyingPartitioner
from ..product.models import DigitalShip
class ShippedGroup(ItemList):
'''
Group for shippable products.
'''
pass
class Digit... | Add ability to clear cart | Add ability to clear cart
| Python | bsd-3-clause | avorio/saleor,laosunhust/saleor,hongquan/saleor,maferelo/saleor,avorio/saleor,car3oon/saleor,tfroehlich82/saleor,UITools/saleor,car3oon/saleor,Drekscott/Motlaesaleor,maferelo/saleor,hongquan/saleor,josesanch/saleor,taedori81/saleor,KenMutemi/saleor,tfroehlich82/saleor,spartonia/saleor,mociepka/saleor,itbabu/saleor,UITo... | from __future__ import unicode_literals
from django.utils.translation import pgettext
from satchless import cart
from satchless.item import ItemList, ClassifyingPartitioner
from ..product.models import DigitalShip
class ShippedGroup(ItemList):
'''
Group for shippable products.
'''
pass
class Digit... | from __future__ import unicode_literals
from django.utils.translation import pgettext
from satchless import cart
from satchless.item import ItemList, ClassifyingPartitioner
from ..product.models import DigitalShip
class ShippedGroup(ItemList):
'''
Group for shippable products.
'''
pass
class Digit... | <commit_before>from __future__ import unicode_literals
from django.utils.translation import pgettext
from satchless import cart
from satchless.item import ItemList, ClassifyingPartitioner
from ..product.models import DigitalShip
class ShippedGroup(ItemList):
'''
Group for shippable products.
'''
pas... | from __future__ import unicode_literals
from django.utils.translation import pgettext
from satchless import cart
from satchless.item import ItemList, ClassifyingPartitioner
from ..product.models import DigitalShip
class ShippedGroup(ItemList):
'''
Group for shippable products.
'''
pass
class Digit... | from __future__ import unicode_literals
from django.utils.translation import pgettext
from satchless import cart
from satchless.item import ItemList, ClassifyingPartitioner
from ..product.models import DigitalShip
class ShippedGroup(ItemList):
'''
Group for shippable products.
'''
pass
class Digit... | <commit_before>from __future__ import unicode_literals
from django.utils.translation import pgettext
from satchless import cart
from satchless.item import ItemList, ClassifyingPartitioner
from ..product.models import DigitalShip
class ShippedGroup(ItemList):
'''
Group for shippable products.
'''
pas... |
5f9cf67c473ef7d304da067b70b56d77f71ca4fa | web/impact/impact/middleware/method_override_middleware.py | web/impact/impact/middleware/method_override_middleware.py | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
# METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'
METHOD_OVERRIDE_HEADER = 'X-HTTP-Method-Override'
class MethodOverrideMiddleware(object):
def process_request(self, request):
if request.method != 'POST':
return
if METHOD_OV... | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'
class MethodOverrideMiddleware(object):
def process_request(self, request):
if request.method != 'POST':
return
if METHOD_OVERRIDE_HEADER not in request.META:
retur... | Revert Changes To Middleware To Prevent Build Hangup | [AC-4959] Revert Changes To Middleware To Prevent Build Hangup
| Python | mit | masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
# METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'
METHOD_OVERRIDE_HEADER = 'X-HTTP-Method-Override'
class MethodOverrideMiddleware(object):
def process_request(self, request):
if request.method != 'POST':
return
if METHOD_OV... | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'
class MethodOverrideMiddleware(object):
def process_request(self, request):
if request.method != 'POST':
return
if METHOD_OVERRIDE_HEADER not in request.META:
retur... | <commit_before># MIT License
# Copyright (c) 2017 MassChallenge, Inc.
# METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'
METHOD_OVERRIDE_HEADER = 'X-HTTP-Method-Override'
class MethodOverrideMiddleware(object):
def process_request(self, request):
if request.method != 'POST':
return
... | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'
class MethodOverrideMiddleware(object):
def process_request(self, request):
if request.method != 'POST':
return
if METHOD_OVERRIDE_HEADER not in request.META:
retur... | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
# METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'
METHOD_OVERRIDE_HEADER = 'X-HTTP-Method-Override'
class MethodOverrideMiddleware(object):
def process_request(self, request):
if request.method != 'POST':
return
if METHOD_OV... | <commit_before># MIT License
# Copyright (c) 2017 MassChallenge, Inc.
# METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'
METHOD_OVERRIDE_HEADER = 'X-HTTP-Method-Override'
class MethodOverrideMiddleware(object):
def process_request(self, request):
if request.method != 'POST':
return
... |
42a0dd7f808b87035f8067c5d0ad4bb688632135 | ecmd-core/pyapi/init/__init__.py | ecmd-core/pyapi/init/__init__.py | # import the right SWIG module depending on Python version
from sys import version_info
from sys import path as sys_path
from os import path as os_path
if version_info[0] >= 3:
sys_path.insert(0, os_path.join(os_path.dirname(__file__), "python3"))
from .python3 import *
else:
sys_path.insert(0, os_path.join... | # import the right SWIG module depending on Python version
from sys import version_info
from sys import path as sys_path
from os import path as os_path
if version_info[0] >= 3:
sys_path.append(os_path.join(os_path.dirname(__file__), "python3"))
from .python3 import *
else:
sys_path.append(os_path.join(os_pa... | Append version specific path to os.path rather than prepend | pyapi: Append version specific path to os.path rather than prepend
Other code might depend on os.path[0] being the path of the executed
script, and there is no need for our new path to be at the front.
| Python | apache-2.0 | open-power/eCMD,mklight/eCMD,mklight/eCMD,open-power/eCMD,mklight/eCMD,mklight/eCMD,open-power/eCMD,open-power/eCMD,open-power/eCMD,mklight/eCMD | # import the right SWIG module depending on Python version
from sys import version_info
from sys import path as sys_path
from os import path as os_path
if version_info[0] >= 3:
sys_path.insert(0, os_path.join(os_path.dirname(__file__), "python3"))
from .python3 import *
else:
sys_path.insert(0, os_path.join... | # import the right SWIG module depending on Python version
from sys import version_info
from sys import path as sys_path
from os import path as os_path
if version_info[0] >= 3:
sys_path.append(os_path.join(os_path.dirname(__file__), "python3"))
from .python3 import *
else:
sys_path.append(os_path.join(os_pa... | <commit_before># import the right SWIG module depending on Python version
from sys import version_info
from sys import path as sys_path
from os import path as os_path
if version_info[0] >= 3:
sys_path.insert(0, os_path.join(os_path.dirname(__file__), "python3"))
from .python3 import *
else:
sys_path.insert(... | # import the right SWIG module depending on Python version
from sys import version_info
from sys import path as sys_path
from os import path as os_path
if version_info[0] >= 3:
sys_path.append(os_path.join(os_path.dirname(__file__), "python3"))
from .python3 import *
else:
sys_path.append(os_path.join(os_pa... | # import the right SWIG module depending on Python version
from sys import version_info
from sys import path as sys_path
from os import path as os_path
if version_info[0] >= 3:
sys_path.insert(0, os_path.join(os_path.dirname(__file__), "python3"))
from .python3 import *
else:
sys_path.insert(0, os_path.join... | <commit_before># import the right SWIG module depending on Python version
from sys import version_info
from sys import path as sys_path
from os import path as os_path
if version_info[0] >= 3:
sys_path.insert(0, os_path.join(os_path.dirname(__file__), "python3"))
from .python3 import *
else:
sys_path.insert(... |
b03c8ebe8cc426e21b45f4de0d8d6e7176a4a647 | api/admin.py | api/admin.py | from django.contrib import admin
from api import models
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'country', )
class EventAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ('title',)}
list_display = ('title', 'status', 'location', 'country', 'start_date')
list_editable... | from django.contrib import admin
from api import models
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'country', )
search_fields = ['user__email', 'user__username', 'user__first_name', 'user__last_name']
class EventAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ('title',)}
... | Allow searching by email, username and names in user profiles | Allow searching by email, username and names in user profiles
This is needed as user profiles need to be edited for setting main
contact flag and ambassador roles.
| Python | mit | codeeu/coding-events,michelesr/coding-events,michelesr/coding-events,michelesr/coding-events,codeeu/coding-events,codeeu/coding-events,michelesr/coding-events,codeeu/coding-events,codeeu/coding-events,michelesr/coding-events | from django.contrib import admin
from api import models
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'country', )
class EventAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ('title',)}
list_display = ('title', 'status', 'location', 'country', 'start_date')
list_editable... | from django.contrib import admin
from api import models
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'country', )
search_fields = ['user__email', 'user__username', 'user__first_name', 'user__last_name']
class EventAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ('title',)}
... | <commit_before>from django.contrib import admin
from api import models
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'country', )
class EventAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ('title',)}
list_display = ('title', 'status', 'location', 'country', 'start_date')
... | from django.contrib import admin
from api import models
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'country', )
search_fields = ['user__email', 'user__username', 'user__first_name', 'user__last_name']
class EventAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ('title',)}
... | from django.contrib import admin
from api import models
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'country', )
class EventAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ('title',)}
list_display = ('title', 'status', 'location', 'country', 'start_date')
list_editable... | <commit_before>from django.contrib import admin
from api import models
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'country', )
class EventAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ('title',)}
list_display = ('title', 'status', 'location', 'country', 'start_date')
... |
eb313bcced5a71f80cff8b3314d3346a151297a9 | flickr_api/__init__.py | flickr_api/__init__.py | """
Object Oriented implementation of Flickr API.
Important notes:
- For consistency, the nameing of methods might differ from the name
in the official API. Please check the method "docstring" to know
what is the implemented method.
- For methods which expect an object "id", eith... | """
Object Oriented implementation of Flickr API.
Important notes:
- For consistency, the nameing of methods might differ from the name
in the official API. Please check the method "docstring" to know
what is the implemented method.
- For methods which expect an object "id", eith... | Put some import clauses into try/except blocks to be able to use flickr_api.tools when the list of methods is not up to date | Put some import clauses into try/except blocks to be able to use flickr_api.tools when the list of methods is not up to date
| Python | bsd-3-clause | alexis-mignon/python-flickr-api,alexis-mignon/python-flickr-api,bryndin/tornado-flickr-api | """
Object Oriented implementation of Flickr API.
Important notes:
- For consistency, the nameing of methods might differ from the name
in the official API. Please check the method "docstring" to know
what is the implemented method.
- For methods which expect an object "id", eith... | """
Object Oriented implementation of Flickr API.
Important notes:
- For consistency, the nameing of methods might differ from the name
in the official API. Please check the method "docstring" to know
what is the implemented method.
- For methods which expect an object "id", eith... | <commit_before>"""
Object Oriented implementation of Flickr API.
Important notes:
- For consistency, the nameing of methods might differ from the name
in the official API. Please check the method "docstring" to know
what is the implemented method.
- For methods which expect an ob... | """
Object Oriented implementation of Flickr API.
Important notes:
- For consistency, the nameing of methods might differ from the name
in the official API. Please check the method "docstring" to know
what is the implemented method.
- For methods which expect an object "id", eith... | """
Object Oriented implementation of Flickr API.
Important notes:
- For consistency, the nameing of methods might differ from the name
in the official API. Please check the method "docstring" to know
what is the implemented method.
- For methods which expect an object "id", eith... | <commit_before>"""
Object Oriented implementation of Flickr API.
Important notes:
- For consistency, the nameing of methods might differ from the name
in the official API. Please check the method "docstring" to know
what is the implemented method.
- For methods which expect an ob... |
c1c2503933243fe51bb14f7d63222f958178d7e7 | tfx/components/transform/executor_v2_test.py | tfx/components/transform/executor_v2_test.py | # Lint as: python3
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | # Lint as: python3
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | Remove version check now that TFX 0.25 is released. | Remove version check now that TFX 0.25 is released.
PiperOrigin-RevId: 343533114
| Python | apache-2.0 | tensorflow/tfx,tensorflow/tfx | # Lint as: python3
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | # Lint as: python3
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | <commit_before># Lint as: python3
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... | # Lint as: python3
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | # Lint as: python3
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | <commit_before># Lint as: python3
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... |
eab299ce4bd3fa4734b8a3adbc805c3f5863bfc5 | fastpt/v2/util.py | fastpt/v2/util.py | import sys
from threading import local
def debug():
def pm(etype, value, tb): # pragma no cover
import pdb, traceback
try:
from IPython.ipapi import make_session; make_session()
from IPython.Debugger import Pdb
sys.stderr.write('Entering post-mortem IPDB shell\n'... | import sys
from threading import local
def debug():# pragma no cover
def pm(etype, value, tb):
import pdb, traceback
try:
from IPython.ipapi import make_session; make_session()
from IPython.Debugger import Pdb
sys.stderr.write('Entering post-mortem IPDB shell\n'... | Remove more obsolete code in v2 | Remove more obsolete code in v2
| Python | mit | moreati/kajiki,ollyc/kajiki,ollyc/kajiki,moreati/kajiki,moreati/kajiki,ollyc/kajiki | import sys
from threading import local
def debug():
def pm(etype, value, tb): # pragma no cover
import pdb, traceback
try:
from IPython.ipapi import make_session; make_session()
from IPython.Debugger import Pdb
sys.stderr.write('Entering post-mortem IPDB shell\n'... | import sys
from threading import local
def debug():# pragma no cover
def pm(etype, value, tb):
import pdb, traceback
try:
from IPython.ipapi import make_session; make_session()
from IPython.Debugger import Pdb
sys.stderr.write('Entering post-mortem IPDB shell\n'... | <commit_before>import sys
from threading import local
def debug():
def pm(etype, value, tb): # pragma no cover
import pdb, traceback
try:
from IPython.ipapi import make_session; make_session()
from IPython.Debugger import Pdb
sys.stderr.write('Entering post-morte... | import sys
from threading import local
def debug():# pragma no cover
def pm(etype, value, tb):
import pdb, traceback
try:
from IPython.ipapi import make_session; make_session()
from IPython.Debugger import Pdb
sys.stderr.write('Entering post-mortem IPDB shell\n'... | import sys
from threading import local
def debug():
def pm(etype, value, tb): # pragma no cover
import pdb, traceback
try:
from IPython.ipapi import make_session; make_session()
from IPython.Debugger import Pdb
sys.stderr.write('Entering post-mortem IPDB shell\n'... | <commit_before>import sys
from threading import local
def debug():
def pm(etype, value, tb): # pragma no cover
import pdb, traceback
try:
from IPython.ipapi import make_session; make_session()
from IPython.Debugger import Pdb
sys.stderr.write('Entering post-morte... |
1eb6f65e40fccb3cea4b35374e7ddc25dd574dfa | examples/test/test_scratchnet.py | examples/test/test_scratchnet.py | #!/usr/bin/env python
"""
Test for scratchnet.py
"""
import unittest
import pexpect
class testScratchNet( unittest.TestCase ):
opts = [ "1 packets transmitted, 1 received, 0% packet loss", pexpect.EOF ]
def pingTest( self, name ):
"Verify that no ping packets were dropped"
p = pexpect.spawn... | #!/usr/bin/env python
"""
Test for scratchnet.py
"""
import unittest
import pexpect
class testScratchNet( unittest.TestCase ):
opts = [ "1 packets transmitted, 1 received, 0% packet loss", pexpect.EOF ]
def pingTest( self, name ):
"Verify that no ping packets were dropped"
p = pexpect.spawn... | Increase scratchnet timeout to see if it's just slow. | Increase scratchnet timeout to see if it's just slow.
| Python | bsd-3-clause | mininet/mininet,mininet/mininet,mininet/mininet | #!/usr/bin/env python
"""
Test for scratchnet.py
"""
import unittest
import pexpect
class testScratchNet( unittest.TestCase ):
opts = [ "1 packets transmitted, 1 received, 0% packet loss", pexpect.EOF ]
def pingTest( self, name ):
"Verify that no ping packets were dropped"
p = pexpect.spawn... | #!/usr/bin/env python
"""
Test for scratchnet.py
"""
import unittest
import pexpect
class testScratchNet( unittest.TestCase ):
opts = [ "1 packets transmitted, 1 received, 0% packet loss", pexpect.EOF ]
def pingTest( self, name ):
"Verify that no ping packets were dropped"
p = pexpect.spawn... | <commit_before>#!/usr/bin/env python
"""
Test for scratchnet.py
"""
import unittest
import pexpect
class testScratchNet( unittest.TestCase ):
opts = [ "1 packets transmitted, 1 received, 0% packet loss", pexpect.EOF ]
def pingTest( self, name ):
"Verify that no ping packets were dropped"
p ... | #!/usr/bin/env python
"""
Test for scratchnet.py
"""
import unittest
import pexpect
class testScratchNet( unittest.TestCase ):
opts = [ "1 packets transmitted, 1 received, 0% packet loss", pexpect.EOF ]
def pingTest( self, name ):
"Verify that no ping packets were dropped"
p = pexpect.spawn... | #!/usr/bin/env python
"""
Test for scratchnet.py
"""
import unittest
import pexpect
class testScratchNet( unittest.TestCase ):
opts = [ "1 packets transmitted, 1 received, 0% packet loss", pexpect.EOF ]
def pingTest( self, name ):
"Verify that no ping packets were dropped"
p = pexpect.spawn... | <commit_before>#!/usr/bin/env python
"""
Test for scratchnet.py
"""
import unittest
import pexpect
class testScratchNet( unittest.TestCase ):
opts = [ "1 packets transmitted, 1 received, 0% packet loss", pexpect.EOF ]
def pingTest( self, name ):
"Verify that no ping packets were dropped"
p ... |
47c5bb272040f47bc20cde647f76b9a8e673698c | Bindings/Python/tests/test_component_interface.py | Bindings/Python/tests/test_component_interface.py | import os
import unittest
import opensim as osim
test_dir = os.path.join(os.path.dirname(os.path.abspath(osim.__file__)),
'tests')
# Silence warning messages if mesh (.vtp) files cannot be found.
osim.Model.setDebugLevel(0)
class TestComponentInterface(unittest.TestCase):
def test_printC... | import os
import unittest
import opensim as osim
test_dir = os.path.join(os.path.dirname(os.path.abspath(osim.__file__)),
'tests')
# Silence warning messages if mesh (.vtp) files cannot be found.
osim.Model.setDebugLevel(0)
class TestComponentInterface(unittest.TestCase):
def test_printC... | Add the ModelComponentSets to the number of subcomponents. | Add the ModelComponentSets to the number of subcomponents.
| Python | apache-2.0 | opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core | import os
import unittest
import opensim as osim
test_dir = os.path.join(os.path.dirname(os.path.abspath(osim.__file__)),
'tests')
# Silence warning messages if mesh (.vtp) files cannot be found.
osim.Model.setDebugLevel(0)
class TestComponentInterface(unittest.TestCase):
def test_printC... | import os
import unittest
import opensim as osim
test_dir = os.path.join(os.path.dirname(os.path.abspath(osim.__file__)),
'tests')
# Silence warning messages if mesh (.vtp) files cannot be found.
osim.Model.setDebugLevel(0)
class TestComponentInterface(unittest.TestCase):
def test_printC... | <commit_before>import os
import unittest
import opensim as osim
test_dir = os.path.join(os.path.dirname(os.path.abspath(osim.__file__)),
'tests')
# Silence warning messages if mesh (.vtp) files cannot be found.
osim.Model.setDebugLevel(0)
class TestComponentInterface(unittest.TestCase):
... | import os
import unittest
import opensim as osim
test_dir = os.path.join(os.path.dirname(os.path.abspath(osim.__file__)),
'tests')
# Silence warning messages if mesh (.vtp) files cannot be found.
osim.Model.setDebugLevel(0)
class TestComponentInterface(unittest.TestCase):
def test_printC... | import os
import unittest
import opensim as osim
test_dir = os.path.join(os.path.dirname(os.path.abspath(osim.__file__)),
'tests')
# Silence warning messages if mesh (.vtp) files cannot be found.
osim.Model.setDebugLevel(0)
class TestComponentInterface(unittest.TestCase):
def test_printC... | <commit_before>import os
import unittest
import opensim as osim
test_dir = os.path.join(os.path.dirname(os.path.abspath(osim.__file__)),
'tests')
# Silence warning messages if mesh (.vtp) files cannot be found.
osim.Model.setDebugLevel(0)
class TestComponentInterface(unittest.TestCase):
... |
c6e16cf939e74640fc8aec3475bf917214ee8ee6 | copyrightme.py | copyrightme.py | import sublime, sublime_plugin
class CopyrightmeCommand(sublime_plugin.TextCommand):
def run(self, edit, text):
region = self.view.visible_region()
if text not in self.view.substr(region):
self.view.split_by_newlines(region)
self.view.insert(edit, 0, text + '\n\n')
| import sublime, sublime_plugin
class CopyrightmeCommand(sublime_plugin.TextCommand):
def run(self, edit, text):
region = self.view.visible_region()
if text not in self.view.substr(region):
self.view.insert(edit, 0, text + '\n\n')
| Remove line splitting in view | Remove line splitting in view | Python | mit | tatarin0/CopyrightMe,tatarin0/CopyrightMe | import sublime, sublime_plugin
class CopyrightmeCommand(sublime_plugin.TextCommand):
def run(self, edit, text):
region = self.view.visible_region()
if text not in self.view.substr(region):
self.view.split_by_newlines(region)
self.view.insert(edit, 0, text + '\n\n')
Remove line splitting in view | import sublime, sublime_plugin
class CopyrightmeCommand(sublime_plugin.TextCommand):
def run(self, edit, text):
region = self.view.visible_region()
if text not in self.view.substr(region):
self.view.insert(edit, 0, text + '\n\n')
| <commit_before>import sublime, sublime_plugin
class CopyrightmeCommand(sublime_plugin.TextCommand):
def run(self, edit, text):
region = self.view.visible_region()
if text not in self.view.substr(region):
self.view.split_by_newlines(region)
self.view.insert(edit, 0, text + '\n\n')
<commit_msg>Remove lin... | import sublime, sublime_plugin
class CopyrightmeCommand(sublime_plugin.TextCommand):
def run(self, edit, text):
region = self.view.visible_region()
if text not in self.view.substr(region):
self.view.insert(edit, 0, text + '\n\n')
| import sublime, sublime_plugin
class CopyrightmeCommand(sublime_plugin.TextCommand):
def run(self, edit, text):
region = self.view.visible_region()
if text not in self.view.substr(region):
self.view.split_by_newlines(region)
self.view.insert(edit, 0, text + '\n\n')
Remove line splitting in viewimport s... | <commit_before>import sublime, sublime_plugin
class CopyrightmeCommand(sublime_plugin.TextCommand):
def run(self, edit, text):
region = self.view.visible_region()
if text not in self.view.substr(region):
self.view.split_by_newlines(region)
self.view.insert(edit, 0, text + '\n\n')
<commit_msg>Remove lin... |
1a242dc184adf4a3917b6c82742a667399c16ae9 | respite/middleware.py | respite/middleware.py | from django.http import QueryDict
class HttpMethodOverrideMiddleware:
"""
Facilitate for overriding the HTTP method with the X-HTTP-Method-Override
header or a '_method' HTTP POST parameter.
"""
def process_request(self, request):
if request.META.has_key('HTTP_X_HTTP_METHOD_OVERRIDE') \
... | import re
from django.http import QueryDict
class HttpMethodOverrideMiddleware:
"""
Facilitate for overriding the HTTP method with the X-HTTP-Method-Override
header or a '_method' HTTP POST parameter.
"""
def process_request(self, request):
if request.META.has_key('HTTP_X_HTTP_METHOD_OVER... | Discard the '_method' parameter on HTTP POST | Discard the '_method' parameter on HTTP POST
| Python | mit | jgorset/django-respite,jgorset/django-respite,jgorset/django-respite | from django.http import QueryDict
class HttpMethodOverrideMiddleware:
"""
Facilitate for overriding the HTTP method with the X-HTTP-Method-Override
header or a '_method' HTTP POST parameter.
"""
def process_request(self, request):
if request.META.has_key('HTTP_X_HTTP_METHOD_OVERRIDE') \
... | import re
from django.http import QueryDict
class HttpMethodOverrideMiddleware:
"""
Facilitate for overriding the HTTP method with the X-HTTP-Method-Override
header or a '_method' HTTP POST parameter.
"""
def process_request(self, request):
if request.META.has_key('HTTP_X_HTTP_METHOD_OVER... | <commit_before>from django.http import QueryDict
class HttpMethodOverrideMiddleware:
"""
Facilitate for overriding the HTTP method with the X-HTTP-Method-Override
header or a '_method' HTTP POST parameter.
"""
def process_request(self, request):
if request.META.has_key('HTTP_X_HTTP_METHOD_... | import re
from django.http import QueryDict
class HttpMethodOverrideMiddleware:
"""
Facilitate for overriding the HTTP method with the X-HTTP-Method-Override
header or a '_method' HTTP POST parameter.
"""
def process_request(self, request):
if request.META.has_key('HTTP_X_HTTP_METHOD_OVER... | from django.http import QueryDict
class HttpMethodOverrideMiddleware:
"""
Facilitate for overriding the HTTP method with the X-HTTP-Method-Override
header or a '_method' HTTP POST parameter.
"""
def process_request(self, request):
if request.META.has_key('HTTP_X_HTTP_METHOD_OVERRIDE') \
... | <commit_before>from django.http import QueryDict
class HttpMethodOverrideMiddleware:
"""
Facilitate for overriding the HTTP method with the X-HTTP-Method-Override
header or a '_method' HTTP POST parameter.
"""
def process_request(self, request):
if request.META.has_key('HTTP_X_HTTP_METHOD_... |
04e243aafbd08008556d83d73fbbf22e5398aab4 | telostats/stations/models.py | telostats/stations/models.py | from django.db import models
from django.utils import timezone
class Station(models.Model):
id = models.IntegerField(unique=True, primary_key=True)
name = models.CharField(u'name', max_length=100)
longitude = models.FloatField(u'longitude')
latitude = models.FloatField(u'latitude')
class Status(mode... | from django.db import models
from django.utils import timezone
class Station(models.Model):
id = models.IntegerField(unique=True, primary_key=True)
name = models.CharField(u'name', max_length=100)
longitude = models.FloatField(u'longitude')
latitude = models.FloatField(u'latitude')
def __unicode_... | Add unicode methods to Station/Status | Add unicode methods to Station/Status
| Python | bsd-3-clause | idan/telostats,idan/telostats,idan/telostats | from django.db import models
from django.utils import timezone
class Station(models.Model):
id = models.IntegerField(unique=True, primary_key=True)
name = models.CharField(u'name', max_length=100)
longitude = models.FloatField(u'longitude')
latitude = models.FloatField(u'latitude')
class Status(mode... | from django.db import models
from django.utils import timezone
class Station(models.Model):
id = models.IntegerField(unique=True, primary_key=True)
name = models.CharField(u'name', max_length=100)
longitude = models.FloatField(u'longitude')
latitude = models.FloatField(u'latitude')
def __unicode_... | <commit_before>from django.db import models
from django.utils import timezone
class Station(models.Model):
id = models.IntegerField(unique=True, primary_key=True)
name = models.CharField(u'name', max_length=100)
longitude = models.FloatField(u'longitude')
latitude = models.FloatField(u'latitude')
cl... | from django.db import models
from django.utils import timezone
class Station(models.Model):
id = models.IntegerField(unique=True, primary_key=True)
name = models.CharField(u'name', max_length=100)
longitude = models.FloatField(u'longitude')
latitude = models.FloatField(u'latitude')
def __unicode_... | from django.db import models
from django.utils import timezone
class Station(models.Model):
id = models.IntegerField(unique=True, primary_key=True)
name = models.CharField(u'name', max_length=100)
longitude = models.FloatField(u'longitude')
latitude = models.FloatField(u'latitude')
class Status(mode... | <commit_before>from django.db import models
from django.utils import timezone
class Station(models.Model):
id = models.IntegerField(unique=True, primary_key=True)
name = models.CharField(u'name', max_length=100)
longitude = models.FloatField(u'longitude')
latitude = models.FloatField(u'latitude')
cl... |
bd0310663a4f646873119e6b01afe585d0ef40bb | lib/interpreters/ScssInterpreter.py | lib/interpreters/ScssInterpreter.py | import re
from os import path
from ..interpreter import *
from ..SIMode import SIMode
from ..utils import endswith
class ScssInterpreter(Interpreter):
def run(self):
self.settings = {
"extensions": [".scss"],
"remove_extensions": [".scss"],
"extra_extensions": [".jpg", ".png", ".gif", ".svg"],
... | import re
from os import path
from ..interpreter import *
from ..SIMode import SIMode
from ..utils import endswith
class ScssInterpreter(Interpreter):
def run(self):
self.settings = {
"extensions": [".scss"],
"remove_extensions": [".scss"],
"extra_extensions": [".jpg", ".png", ".gif", ".svg"],
... | Add single-quotes setting to scss | Add single-quotes setting to scss
| Python | mit | vinpac/sublime-simple-import,vini175pa/sublime-simple-import,vini175pa/sublime-simple-import,vini175pa/simple-import-js,vini175pa/simple-import-js | import re
from os import path
from ..interpreter import *
from ..SIMode import SIMode
from ..utils import endswith
class ScssInterpreter(Interpreter):
def run(self):
self.settings = {
"extensions": [".scss"],
"remove_extensions": [".scss"],
"extra_extensions": [".jpg", ".png", ".gif", ".svg"],
... | import re
from os import path
from ..interpreter import *
from ..SIMode import SIMode
from ..utils import endswith
class ScssInterpreter(Interpreter):
def run(self):
self.settings = {
"extensions": [".scss"],
"remove_extensions": [".scss"],
"extra_extensions": [".jpg", ".png", ".gif", ".svg"],
... | <commit_before>import re
from os import path
from ..interpreter import *
from ..SIMode import SIMode
from ..utils import endswith
class ScssInterpreter(Interpreter):
def run(self):
self.settings = {
"extensions": [".scss"],
"remove_extensions": [".scss"],
"extra_extensions": [".jpg", ".png", ".... | import re
from os import path
from ..interpreter import *
from ..SIMode import SIMode
from ..utils import endswith
class ScssInterpreter(Interpreter):
def run(self):
self.settings = {
"extensions": [".scss"],
"remove_extensions": [".scss"],
"extra_extensions": [".jpg", ".png", ".gif", ".svg"],
... | import re
from os import path
from ..interpreter import *
from ..SIMode import SIMode
from ..utils import endswith
class ScssInterpreter(Interpreter):
def run(self):
self.settings = {
"extensions": [".scss"],
"remove_extensions": [".scss"],
"extra_extensions": [".jpg", ".png", ".gif", ".svg"],
... | <commit_before>import re
from os import path
from ..interpreter import *
from ..SIMode import SIMode
from ..utils import endswith
class ScssInterpreter(Interpreter):
def run(self):
self.settings = {
"extensions": [".scss"],
"remove_extensions": [".scss"],
"extra_extensions": [".jpg", ".png", ".... |
9219a70106ce3008e5d4a394bb0d8507d474405b | pylib/mapit/areas/management/commands/utils.py | pylib/mapit/areas/management/commands/utils.py | import sys
def save_polygons(lookup):
for shape in lookup.values():
m, poly = shape
if not poly:
continue
sys.stdout.write(".")
sys.stdout.flush()
#g = OGRGeometry(OGRGeomType('MultiPolygon'))
m.polygons.all().delete()
for p in poly:
p... | import sys
def save_polygons(lookup):
for shape in lookup.values():
m, poly = shape
if not poly:
continue
sys.stdout.write(".")
sys.stdout.flush()
#g = OGRGeometry(OGRGeomType('MultiPolygon'))
m.polygons.all().delete()
for p in poly:
p... | Work around KML -> Django import bug. | Work around KML -> Django import bug.
| Python | agpl-3.0 | chris48s/mapit,chris48s/mapit,opencorato/mapit,chris48s/mapit,opencorato/mapit,New-Bamboo/mapit,Code4SA/mapit,opencorato/mapit,Sinar/mapit,Sinar/mapit,Code4SA/mapit,Code4SA/mapit,New-Bamboo/mapit | import sys
def save_polygons(lookup):
for shape in lookup.values():
m, poly = shape
if not poly:
continue
sys.stdout.write(".")
sys.stdout.flush()
#g = OGRGeometry(OGRGeomType('MultiPolygon'))
m.polygons.all().delete()
for p in poly:
p... | import sys
def save_polygons(lookup):
for shape in lookup.values():
m, poly = shape
if not poly:
continue
sys.stdout.write(".")
sys.stdout.flush()
#g = OGRGeometry(OGRGeomType('MultiPolygon'))
m.polygons.all().delete()
for p in poly:
p... | <commit_before>import sys
def save_polygons(lookup):
for shape in lookup.values():
m, poly = shape
if not poly:
continue
sys.stdout.write(".")
sys.stdout.flush()
#g = OGRGeometry(OGRGeomType('MultiPolygon'))
m.polygons.all().delete()
for p in poly... | import sys
def save_polygons(lookup):
for shape in lookup.values():
m, poly = shape
if not poly:
continue
sys.stdout.write(".")
sys.stdout.flush()
#g = OGRGeometry(OGRGeomType('MultiPolygon'))
m.polygons.all().delete()
for p in poly:
p... | import sys
def save_polygons(lookup):
for shape in lookup.values():
m, poly = shape
if not poly:
continue
sys.stdout.write(".")
sys.stdout.flush()
#g = OGRGeometry(OGRGeomType('MultiPolygon'))
m.polygons.all().delete()
for p in poly:
p... | <commit_before>import sys
def save_polygons(lookup):
for shape in lookup.values():
m, poly = shape
if not poly:
continue
sys.stdout.write(".")
sys.stdout.flush()
#g = OGRGeometry(OGRGeomType('MultiPolygon'))
m.polygons.all().delete()
for p in poly... |
f3ae9106bf738fc3e86609fbf4d7ed26d4c76354 | bookmarks/database.py | bookmarks/database.py | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from bookmarks import app
DATABASE_URL = 'postgresql://{}:{}@{}/{}'.format(
app.config['DATABASE_USERNAME'],
app.config['DATABASE_PASSWORD'],
app.config['DATA... | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from bookmarks import app
engine = create_engine(app.config['DATABASE_URI'], convert_unicode=True)
db_session = scoped_session(sessionmaker(autocommit=False,
... | Use a DATABASE_URI config for db reference | Use a DATABASE_URI config for db reference
| Python | apache-2.0 | byanofsky/bookmarks,byanofsky/bookmarks,byanofsky/bookmarks | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from bookmarks import app
DATABASE_URL = 'postgresql://{}:{}@{}/{}'.format(
app.config['DATABASE_USERNAME'],
app.config['DATABASE_PASSWORD'],
app.config['DATA... | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from bookmarks import app
engine = create_engine(app.config['DATABASE_URI'], convert_unicode=True)
db_session = scoped_session(sessionmaker(autocommit=False,
... | <commit_before>from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from bookmarks import app
DATABASE_URL = 'postgresql://{}:{}@{}/{}'.format(
app.config['DATABASE_USERNAME'],
app.config['DATABASE_PASSWORD'],
a... | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from bookmarks import app
engine = create_engine(app.config['DATABASE_URI'], convert_unicode=True)
db_session = scoped_session(sessionmaker(autocommit=False,
... | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from bookmarks import app
DATABASE_URL = 'postgresql://{}:{}@{}/{}'.format(
app.config['DATABASE_USERNAME'],
app.config['DATABASE_PASSWORD'],
app.config['DATA... | <commit_before>from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from bookmarks import app
DATABASE_URL = 'postgresql://{}:{}@{}/{}'.format(
app.config['DATABASE_USERNAME'],
app.config['DATABASE_PASSWORD'],
a... |
62622d78c5cd45fbbe04497de856ff5424051678 | tensorflow/models/rnn/__init__.py | tensorflow/models/rnn/__init__.py | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Fix doc string weirdness introduced by script | Fix doc string weirdness introduced by script
The doc string is still pretty confusing, but this is what it was before I
messed it up with my script.
Change: 114470999
| Python | apache-2.0 | sandeepdsouza93/TensorFlow-15712,alsrgv/tensorflow,annarev/tensorflow,EvenStrangest/tensorflow,chemelnucfin/tensorflow,SnakeJenny/TensorFlow,Carmezim/tensorflow,admcrae/tensorflow,cxxgtxy/tensorflow,anilmuthineni/tensorflow,benoitsteiner/tensorflow-xsmm,ppwwyyxx/tensorflow,calebfoss/tensorflow,MostafaGazar/tensorflow,h... | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
de2ea6f02af98902bf50afbef25f51760715fc4a | ci/generate_pipeline_yml.py | ci/generate_pipeline_yml.py | #!/usr/bin/env python
import os
from jinja2 import Template
clusters = ['2_0', '2_1', '2_2']
# Commenting out this as we only have one example and it breaks
tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))]
with open('pipeline.yml.jinja2', 'r') as f:
t = Template(... | #!/usr/bin/env python
import os
from jinja2 import Template
clusters = ['2_0', '2_1', '2_2', '2_3']
# Commenting out this as we only have one example and it breaks
tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))]
with open('pipeline.yml.jinja2', 'r') as f:
t = Te... | Add PCF 2.3 to CI pipeline. | Add PCF 2.3 to CI pipeline.
| Python | apache-2.0 | cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator | #!/usr/bin/env python
import os
from jinja2 import Template
clusters = ['2_0', '2_1', '2_2']
# Commenting out this as we only have one example and it breaks
tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))]
with open('pipeline.yml.jinja2', 'r') as f:
t = Template(... | #!/usr/bin/env python
import os
from jinja2 import Template
clusters = ['2_0', '2_1', '2_2', '2_3']
# Commenting out this as we only have one example and it breaks
tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))]
with open('pipeline.yml.jinja2', 'r') as f:
t = Te... | <commit_before>#!/usr/bin/env python
import os
from jinja2 import Template
clusters = ['2_0', '2_1', '2_2']
# Commenting out this as we only have one example and it breaks
tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))]
with open('pipeline.yml.jinja2', 'r') as f:
... | #!/usr/bin/env python
import os
from jinja2 import Template
clusters = ['2_0', '2_1', '2_2', '2_3']
# Commenting out this as we only have one example and it breaks
tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))]
with open('pipeline.yml.jinja2', 'r') as f:
t = Te... | #!/usr/bin/env python
import os
from jinja2 import Template
clusters = ['2_0', '2_1', '2_2']
# Commenting out this as we only have one example and it breaks
tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))]
with open('pipeline.yml.jinja2', 'r') as f:
t = Template(... | <commit_before>#!/usr/bin/env python
import os
from jinja2 import Template
clusters = ['2_0', '2_1', '2_2']
# Commenting out this as we only have one example and it breaks
tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))]
with open('pipeline.yml.jinja2', 'r') as f:
... |
1b0fdfdc2ff49d6dfc7d239b5a9cda1ff334f20b | candidates/cache.py | candidates/cache.py | from django.core.cache import cache
def post_cache_key(mapit_area_id):
"""Form the cache key used for post data"""
return "post:{0}".format(mapit_area_id)
def invalidate_posts(post_ids):
for post_id in post_ids:
post_key = post_cache_key(post_id)
cache.delete(post_key)
def get_post_cached... | from django.core.cache import cache
def post_cache_key(mapit_area_id):
"""Form the cache key used for post data"""
return "post:{0}".format(mapit_area_id)
def person_cache_key(person_id):
"""Form the cache key used for person data"""
return "person:{0}".format(person_id)
def invalidate_posts(post_ids... | Add functions for caching person data from PopIt | Add functions for caching person data from PopIt
| Python | agpl-3.0 | mysociety/yournextrepresentative,openstate/yournextrepresentative,DemocracyClub/yournextrepresentative,mysociety/yournextrepresentative,datamade/yournextmp-popit,openstate/yournextrepresentative,mysociety/yournextmp-popit,DemocracyClub/yournextrepresentative,mysociety/yournextrepresentative,datamade/yournextmp-popit,Yo... | from django.core.cache import cache
def post_cache_key(mapit_area_id):
"""Form the cache key used for post data"""
return "post:{0}".format(mapit_area_id)
def invalidate_posts(post_ids):
for post_id in post_ids:
post_key = post_cache_key(post_id)
cache.delete(post_key)
def get_post_cached... | from django.core.cache import cache
def post_cache_key(mapit_area_id):
"""Form the cache key used for post data"""
return "post:{0}".format(mapit_area_id)
def person_cache_key(person_id):
"""Form the cache key used for person data"""
return "person:{0}".format(person_id)
def invalidate_posts(post_ids... | <commit_before>from django.core.cache import cache
def post_cache_key(mapit_area_id):
"""Form the cache key used for post data"""
return "post:{0}".format(mapit_area_id)
def invalidate_posts(post_ids):
for post_id in post_ids:
post_key = post_cache_key(post_id)
cache.delete(post_key)
def ... | from django.core.cache import cache
def post_cache_key(mapit_area_id):
"""Form the cache key used for post data"""
return "post:{0}".format(mapit_area_id)
def person_cache_key(person_id):
"""Form the cache key used for person data"""
return "person:{0}".format(person_id)
def invalidate_posts(post_ids... | from django.core.cache import cache
def post_cache_key(mapit_area_id):
"""Form the cache key used for post data"""
return "post:{0}".format(mapit_area_id)
def invalidate_posts(post_ids):
for post_id in post_ids:
post_key = post_cache_key(post_id)
cache.delete(post_key)
def get_post_cached... | <commit_before>from django.core.cache import cache
def post_cache_key(mapit_area_id):
"""Form the cache key used for post data"""
return "post:{0}".format(mapit_area_id)
def invalidate_posts(post_ids):
for post_id in post_ids:
post_key = post_cache_key(post_id)
cache.delete(post_key)
def ... |
5831fe52a4b8296bd4f0c71e5e98369d704b8fc3 | painter/urls.py | painter/urls.py | from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from . import views
urlpatterns = [
url(r'^noreload$', views.CardDisplay.as_view(), name='card_display_noreload'),
url(r'^$', views.CardDisplayReload.as_view(), name='card_display'),
]
urlpatterns += staticf... | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^noreload$', views.CardDisplay.as_view(), name='card_display_noreload'),
url(r'^$', views.CardDisplayReload.as_view(), name='card_display'),
]
| Remove the staticfiles from the painter app URLconf. | Remove the staticfiles from the painter app URLconf.
| Python | mit | adam-thomas/imperial-painter,adam-thomas/imperial-painter,adam-incuna/imperial-painter,adam-incuna/imperial-painter | from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from . import views
urlpatterns = [
url(r'^noreload$', views.CardDisplay.as_view(), name='card_display_noreload'),
url(r'^$', views.CardDisplayReload.as_view(), name='card_display'),
]
urlpatterns += staticf... | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^noreload$', views.CardDisplay.as_view(), name='card_display_noreload'),
url(r'^$', views.CardDisplayReload.as_view(), name='card_display'),
]
| <commit_before>from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from . import views
urlpatterns = [
url(r'^noreload$', views.CardDisplay.as_view(), name='card_display_noreload'),
url(r'^$', views.CardDisplayReload.as_view(), name='card_display'),
]
urlpatt... | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^noreload$', views.CardDisplay.as_view(), name='card_display_noreload'),
url(r'^$', views.CardDisplayReload.as_view(), name='card_display'),
]
| from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from . import views
urlpatterns = [
url(r'^noreload$', views.CardDisplay.as_view(), name='card_display_noreload'),
url(r'^$', views.CardDisplayReload.as_view(), name='card_display'),
]
urlpatterns += staticf... | <commit_before>from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from . import views
urlpatterns = [
url(r'^noreload$', views.CardDisplay.as_view(), name='card_display_noreload'),
url(r'^$', views.CardDisplayReload.as_view(), name='card_display'),
]
urlpatt... |
4971f5cd840d17df237fc09dbd11cb8e265bc6e8 | quickphotos/utils.py | quickphotos/utils.py | from django.utils.timezone import make_aware, utc
from .models import Photo
def update_photos(photos):
for i in photos:
image = i.images['standard_resolution']
obj, created = Photo.objects.update_or_create(photo_id=i.id, defaults={
'user': i.user.username,
'image': image.... | from django.utils.timezone import make_aware, utc
from .models import Photo
def update_photos(photos):
obj_list = []
for i in photos:
image = i.images['standard_resolution']
obj, created = Photo.objects.update_or_create(photo_id=i.id, defaults={
'user': i.user.username,
... | Return a list of all photo objects which have been updated | Return a list of all photo objects which have been updated
| Python | bsd-3-clause | blancltd/django-quick-photos,kmlebedev/mezzanine-instagram-quickphotos | from django.utils.timezone import make_aware, utc
from .models import Photo
def update_photos(photos):
for i in photos:
image = i.images['standard_resolution']
obj, created = Photo.objects.update_or_create(photo_id=i.id, defaults={
'user': i.user.username,
'image': image.... | from django.utils.timezone import make_aware, utc
from .models import Photo
def update_photos(photos):
obj_list = []
for i in photos:
image = i.images['standard_resolution']
obj, created = Photo.objects.update_or_create(photo_id=i.id, defaults={
'user': i.user.username,
... | <commit_before>from django.utils.timezone import make_aware, utc
from .models import Photo
def update_photos(photos):
for i in photos:
image = i.images['standard_resolution']
obj, created = Photo.objects.update_or_create(photo_id=i.id, defaults={
'user': i.user.username,
... | from django.utils.timezone import make_aware, utc
from .models import Photo
def update_photos(photos):
obj_list = []
for i in photos:
image = i.images['standard_resolution']
obj, created = Photo.objects.update_or_create(photo_id=i.id, defaults={
'user': i.user.username,
... | from django.utils.timezone import make_aware, utc
from .models import Photo
def update_photos(photos):
for i in photos:
image = i.images['standard_resolution']
obj, created = Photo.objects.update_or_create(photo_id=i.id, defaults={
'user': i.user.username,
'image': image.... | <commit_before>from django.utils.timezone import make_aware, utc
from .models import Photo
def update_photos(photos):
for i in photos:
image = i.images['standard_resolution']
obj, created = Photo.objects.update_or_create(photo_id=i.id, defaults={
'user': i.user.username,
... |
fb8fa7fedd18d751aeb7c060786377c96a8b2319 | characters/tests.py | characters/tests.py | from django.test import TestCase
from .models import Character, Team
class TeamGetAbsoluteUrl(TestCase):
def test_slug_appears_in_url(self):
slug_value = "slug-value"
team = Team()
team.slug = "dont-care"
sut = Character()
sut.slug = slug_value
sut.team = team
... | from django.test import TestCase
from .models import Character, Team
class CharacterGetAbsoluteUrl(TestCase):
def test_slug_appears_in_url(self):
slug_value = "slug-value"
team = Team()
team.slug = "dont-care"
sut = Character()
sut.slug = slug_value
sut.team = t... | Fix name - it is testing Character, not Team | Fix name - it is testing Character, not Team
| Python | mit | evanepio/dotmanca,evanepio/dotmanca,evanepio/dotmanca | from django.test import TestCase
from .models import Character, Team
class TeamGetAbsoluteUrl(TestCase):
def test_slug_appears_in_url(self):
slug_value = "slug-value"
team = Team()
team.slug = "dont-care"
sut = Character()
sut.slug = slug_value
sut.team = team
... | from django.test import TestCase
from .models import Character, Team
class CharacterGetAbsoluteUrl(TestCase):
def test_slug_appears_in_url(self):
slug_value = "slug-value"
team = Team()
team.slug = "dont-care"
sut = Character()
sut.slug = slug_value
sut.team = t... | <commit_before>from django.test import TestCase
from .models import Character, Team
class TeamGetAbsoluteUrl(TestCase):
def test_slug_appears_in_url(self):
slug_value = "slug-value"
team = Team()
team.slug = "dont-care"
sut = Character()
sut.slug = slug_value
su... | from django.test import TestCase
from .models import Character, Team
class CharacterGetAbsoluteUrl(TestCase):
def test_slug_appears_in_url(self):
slug_value = "slug-value"
team = Team()
team.slug = "dont-care"
sut = Character()
sut.slug = slug_value
sut.team = t... | from django.test import TestCase
from .models import Character, Team
class TeamGetAbsoluteUrl(TestCase):
def test_slug_appears_in_url(self):
slug_value = "slug-value"
team = Team()
team.slug = "dont-care"
sut = Character()
sut.slug = slug_value
sut.team = team
... | <commit_before>from django.test import TestCase
from .models import Character, Team
class TeamGetAbsoluteUrl(TestCase):
def test_slug_appears_in_url(self):
slug_value = "slug-value"
team = Team()
team.slug = "dont-care"
sut = Character()
sut.slug = slug_value
su... |
47162e68dd7662efd8f1c2463d11dc9228726523 | solar/dblayer/standalone_session_wrapper.py | solar/dblayer/standalone_session_wrapper.py | # Copyright 2015 Mirantis, Inc.
#
# 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 ... | # Copyright 2015 Mirantis, Inc.
#
# 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 ... | Fix session in CLI on Debian systems | Fix session in CLI on Debian systems
Change-Id: I4b1a3e45417a8d8442e097d440ebee8a09a8aaa2
| Python | apache-2.0 | openstack/solar,pigmej/solar,openstack/solar,openstack/solar,pigmej/solar,pigmej/solar | # Copyright 2015 Mirantis, Inc.
#
# 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 ... | # Copyright 2015 Mirantis, Inc.
#
# 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 ... | <commit_before># Copyright 2015 Mirantis, Inc.
#
# 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 app... | # Copyright 2015 Mirantis, Inc.
#
# 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 ... | # Copyright 2015 Mirantis, Inc.
#
# 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 ... | <commit_before># Copyright 2015 Mirantis, Inc.
#
# 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 app... |
fd599497011fcb94d8b5c29dc696128eafb9d603 | tests/app/test_create_app.py | tests/app/test_create_app.py | """Verifies that instance_links are being retrieved properly from LINKS. Verifies that app_data.json.j2
contains the instance link information"""
from unittest import mock
from foremast.plugin_manager import PluginManager
MANAGER = PluginManager('app', 'aws')
PLUGIN = MANAGER.load()
@mock.patch('foremast.app.aws.ba... | """Verifies that instance_links are being retrieved properly from LINKS. Verifies that app_data.json.j2
contains the instance link information"""
from unittest import mock
from foremast.plugin_manager import PluginManager
MANAGER = PluginManager('app', 'aws')
PLUGIN = MANAGER.load()
@mock.patch('foremast.app.aws.ba... | Check handling duplicate key for instance links | test: Check handling duplicate key for instance links
| Python | apache-2.0 | gogoair/foremast,gogoair/foremast | """Verifies that instance_links are being retrieved properly from LINKS. Verifies that app_data.json.j2
contains the instance link information"""
from unittest import mock
from foremast.plugin_manager import PluginManager
MANAGER = PluginManager('app', 'aws')
PLUGIN = MANAGER.load()
@mock.patch('foremast.app.aws.ba... | """Verifies that instance_links are being retrieved properly from LINKS. Verifies that app_data.json.j2
contains the instance link information"""
from unittest import mock
from foremast.plugin_manager import PluginManager
MANAGER = PluginManager('app', 'aws')
PLUGIN = MANAGER.load()
@mock.patch('foremast.app.aws.ba... | <commit_before>"""Verifies that instance_links are being retrieved properly from LINKS. Verifies that app_data.json.j2
contains the instance link information"""
from unittest import mock
from foremast.plugin_manager import PluginManager
MANAGER = PluginManager('app', 'aws')
PLUGIN = MANAGER.load()
@mock.patch('fore... | """Verifies that instance_links are being retrieved properly from LINKS. Verifies that app_data.json.j2
contains the instance link information"""
from unittest import mock
from foremast.plugin_manager import PluginManager
MANAGER = PluginManager('app', 'aws')
PLUGIN = MANAGER.load()
@mock.patch('foremast.app.aws.ba... | """Verifies that instance_links are being retrieved properly from LINKS. Verifies that app_data.json.j2
contains the instance link information"""
from unittest import mock
from foremast.plugin_manager import PluginManager
MANAGER = PluginManager('app', 'aws')
PLUGIN = MANAGER.load()
@mock.patch('foremast.app.aws.ba... | <commit_before>"""Verifies that instance_links are being retrieved properly from LINKS. Verifies that app_data.json.j2
contains the instance link information"""
from unittest import mock
from foremast.plugin_manager import PluginManager
MANAGER = PluginManager('app', 'aws')
PLUGIN = MANAGER.load()
@mock.patch('fore... |
3f5867695e5b980e05f1516f2bcbd246cdc3241f | install_deps.py | install_deps.py | #!/usr/bin/env python
"""
Install the packages you have listed in the requirements file you input as
first argument.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import sys
import fileinput
import subprocess
from pip.req import parse_requirements
... | #!/usr/bin/env python
"""
Install the packages you have listed in the requirements file you input as
first argument.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import sys
import fileinput
import subprocess
from pip.req import parse_requirements
i... | Fix parse_requirements call for new pip version. | Fix parse_requirements call for new pip version.
| Python | bsd-3-clause | Neurita/boyle | #!/usr/bin/env python
"""
Install the packages you have listed in the requirements file you input as
first argument.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import sys
import fileinput
import subprocess
from pip.req import parse_requirements
... | #!/usr/bin/env python
"""
Install the packages you have listed in the requirements file you input as
first argument.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import sys
import fileinput
import subprocess
from pip.req import parse_requirements
i... | <commit_before>#!/usr/bin/env python
"""
Install the packages you have listed in the requirements file you input as
first argument.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import sys
import fileinput
import subprocess
from pip.req import parse... | #!/usr/bin/env python
"""
Install the packages you have listed in the requirements file you input as
first argument.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import sys
import fileinput
import subprocess
from pip.req import parse_requirements
i... | #!/usr/bin/env python
"""
Install the packages you have listed in the requirements file you input as
first argument.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import sys
import fileinput
import subprocess
from pip.req import parse_requirements
... | <commit_before>#!/usr/bin/env python
"""
Install the packages you have listed in the requirements file you input as
first argument.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import sys
import fileinput
import subprocess
from pip.req import parse... |
f1eae848aa48ef3891407f400410827d59d7c880 | pyservice/__init__.py | pyservice/__init__.py | """
Copyright (c) 2014, Joseph Cross.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute,... | """
Copyright (c) 2014, Joseph Cross.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute,... | Make Client, Service importable from pyservice | Make Client, Service importable from pyservice
| Python | mit | numberoverzero/pyservice | """
Copyright (c) 2014, Joseph Cross.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute,... | """
Copyright (c) 2014, Joseph Cross.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute,... | <commit_before>"""
Copyright (c) 2014, Joseph Cross.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publi... | """
Copyright (c) 2014, Joseph Cross.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute,... | """
Copyright (c) 2014, Joseph Cross.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute,... | <commit_before>"""
Copyright (c) 2014, Joseph Cross.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publi... |
74d4868a0e43e5eb089d6d7a0a07545b7f829806 | main.py | main.py | from common.bounty import *
from common.peers import *
from common import settings
from time import sleep
from common.safeprint import safeprint
def main():
settings.setup()
try:
import miniupnpc
except:
settings.config['outbound'] = True
safeprint("settings are:")
safeprint(setting... | from common.bounty import *
from common.peers import *
from common import settings
from time import sleep
from common.safeprint import safeprint
def main():
settings.setup()
try:
import miniupnpc
except:
settings.config['outbound'] = True
safeprint("settings are:")
safeprint(setting... | Add delay after listener start (for testing) | Add delay after listener start (for testing) [skip ci] | Python | mit | gappleto97/Senior-Project | from common.bounty import *
from common.peers import *
from common import settings
from time import sleep
from common.safeprint import safeprint
def main():
settings.setup()
try:
import miniupnpc
except:
settings.config['outbound'] = True
safeprint("settings are:")
safeprint(setting... | from common.bounty import *
from common.peers import *
from common import settings
from time import sleep
from common.safeprint import safeprint
def main():
settings.setup()
try:
import miniupnpc
except:
settings.config['outbound'] = True
safeprint("settings are:")
safeprint(setting... | <commit_before>from common.bounty import *
from common.peers import *
from common import settings
from time import sleep
from common.safeprint import safeprint
def main():
settings.setup()
try:
import miniupnpc
except:
settings.config['outbound'] = True
safeprint("settings are:")
sa... | from common.bounty import *
from common.peers import *
from common import settings
from time import sleep
from common.safeprint import safeprint
def main():
settings.setup()
try:
import miniupnpc
except:
settings.config['outbound'] = True
safeprint("settings are:")
safeprint(setting... | from common.bounty import *
from common.peers import *
from common import settings
from time import sleep
from common.safeprint import safeprint
def main():
settings.setup()
try:
import miniupnpc
except:
settings.config['outbound'] = True
safeprint("settings are:")
safeprint(setting... | <commit_before>from common.bounty import *
from common.peers import *
from common import settings
from time import sleep
from common.safeprint import safeprint
def main():
settings.setup()
try:
import miniupnpc
except:
settings.config['outbound'] = True
safeprint("settings are:")
sa... |
c72500abaeb1149d35fd6fcb28cb6a321b998045 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
requirements = [
'boto3',
'pandas<0.20',
'psycopg2',
]
test_requirements = [
'pytest',
]
setup(
name='demae',
version='0.8.0',
description="",
author="Kazato Sugimoto",
author_email='kazato.sugimoto@gmail.com',
url='https://g... | #!/usr/bin/env python
from setuptools import setup
requirements = [
'boto3',
'pandas<0.20',
'psycopg2',
]
test_requirements = [
'pytest',
]
setup(
name='demae',
version='0.8.0',
description="",
author="Kazato Sugimoto",
author_email='kazato.sugimoto@gmail.com',
url='https://g... | Add source and dest to packages | Add source and dest to packages
| Python | mit | uiureo/demae | #!/usr/bin/env python
from setuptools import setup
requirements = [
'boto3',
'pandas<0.20',
'psycopg2',
]
test_requirements = [
'pytest',
]
setup(
name='demae',
version='0.8.0',
description="",
author="Kazato Sugimoto",
author_email='kazato.sugimoto@gmail.com',
url='https://g... | #!/usr/bin/env python
from setuptools import setup
requirements = [
'boto3',
'pandas<0.20',
'psycopg2',
]
test_requirements = [
'pytest',
]
setup(
name='demae',
version='0.8.0',
description="",
author="Kazato Sugimoto",
author_email='kazato.sugimoto@gmail.com',
url='https://g... | <commit_before>#!/usr/bin/env python
from setuptools import setup
requirements = [
'boto3',
'pandas<0.20',
'psycopg2',
]
test_requirements = [
'pytest',
]
setup(
name='demae',
version='0.8.0',
description="",
author="Kazato Sugimoto",
author_email='kazato.sugimoto@gmail.com',
... | #!/usr/bin/env python
from setuptools import setup
requirements = [
'boto3',
'pandas<0.20',
'psycopg2',
]
test_requirements = [
'pytest',
]
setup(
name='demae',
version='0.8.0',
description="",
author="Kazato Sugimoto",
author_email='kazato.sugimoto@gmail.com',
url='https://g... | #!/usr/bin/env python
from setuptools import setup
requirements = [
'boto3',
'pandas<0.20',
'psycopg2',
]
test_requirements = [
'pytest',
]
setup(
name='demae',
version='0.8.0',
description="",
author="Kazato Sugimoto",
author_email='kazato.sugimoto@gmail.com',
url='https://g... | <commit_before>#!/usr/bin/env python
from setuptools import setup
requirements = [
'boto3',
'pandas<0.20',
'psycopg2',
]
test_requirements = [
'pytest',
]
setup(
name='demae',
version='0.8.0',
description="",
author="Kazato Sugimoto",
author_email='kazato.sugimoto@gmail.com',
... |
8465394884eea4fd6fa0eb9e45f9ec91bec57cb9 | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(
name='sumproduct',
version='0.0.1',
description='The sum-product algorithm. Belief propag... | import os
from setuptools import setup, find_packages
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(
name='sumproduct',
version='0.0.1',
description='The sum-product algorithm. Belief propag... | Add some topics for next deploy | Add some topics for next deploy
| Python | mit | ilyakava/sumproduct | import os
from setuptools import setup, find_packages
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(
name='sumproduct',
version='0.0.1',
description='The sum-product algorithm. Belief propag... | import os
from setuptools import setup, find_packages
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(
name='sumproduct',
version='0.0.1',
description='The sum-product algorithm. Belief propag... | <commit_before>import os
from setuptools import setup, find_packages
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(
name='sumproduct',
version='0.0.1',
description='The sum-product algorithm... | import os
from setuptools import setup, find_packages
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(
name='sumproduct',
version='0.0.1',
description='The sum-product algorithm. Belief propag... | import os
from setuptools import setup, find_packages
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(
name='sumproduct',
version='0.0.1',
description='The sum-product algorithm. Belief propag... | <commit_before>import os
from setuptools import setup, find_packages
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(
name='sumproduct',
version='0.0.1',
description='The sum-product algorithm... |
44b311eade20016f613311a98d666b2463826ad1 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='panoptes_client',
url='https://github.com/zooniverse/panoptes-python-client',
author='Adam McMaster',
author_email='adam@zooniverse.org',
version='1.0.3',
packages=find_packages(),
include_package_data=True,
install_requires=[
... | from setuptools import setup, find_packages
setup(
name='panoptes_client',
url='https://github.com/zooniverse/panoptes-python-client',
author='Adam McMaster',
author_email='adam@zooniverse.org',
version='1.0.3',
packages=find_packages(),
include_package_data=True,
install_requires=[
... | Update requests requirement from <2.21,>=2.4.2 to >=2.4.2,<2.22 | Update requests requirement from <2.21,>=2.4.2 to >=2.4.2,<2.22
Updates the requirements on [requests](https://github.com/requests/requests) to permit the latest version.
- [Release notes](https://github.com/requests/requests/releases)
- [Changelog](https://github.com/requests/requests/blob/master/HISTORY.md)
- [Commi... | Python | apache-2.0 | zooniverse/panoptes-python-client | from setuptools import setup, find_packages
setup(
name='panoptes_client',
url='https://github.com/zooniverse/panoptes-python-client',
author='Adam McMaster',
author_email='adam@zooniverse.org',
version='1.0.3',
packages=find_packages(),
include_package_data=True,
install_requires=[
... | from setuptools import setup, find_packages
setup(
name='panoptes_client',
url='https://github.com/zooniverse/panoptes-python-client',
author='Adam McMaster',
author_email='adam@zooniverse.org',
version='1.0.3',
packages=find_packages(),
include_package_data=True,
install_requires=[
... | <commit_before>from setuptools import setup, find_packages
setup(
name='panoptes_client',
url='https://github.com/zooniverse/panoptes-python-client',
author='Adam McMaster',
author_email='adam@zooniverse.org',
version='1.0.3',
packages=find_packages(),
include_package_data=True,
install... | from setuptools import setup, find_packages
setup(
name='panoptes_client',
url='https://github.com/zooniverse/panoptes-python-client',
author='Adam McMaster',
author_email='adam@zooniverse.org',
version='1.0.3',
packages=find_packages(),
include_package_data=True,
install_requires=[
... | from setuptools import setup, find_packages
setup(
name='panoptes_client',
url='https://github.com/zooniverse/panoptes-python-client',
author='Adam McMaster',
author_email='adam@zooniverse.org',
version='1.0.3',
packages=find_packages(),
include_package_data=True,
install_requires=[
... | <commit_before>from setuptools import setup, find_packages
setup(
name='panoptes_client',
url='https://github.com/zooniverse/panoptes-python-client',
author='Adam McMaster',
author_email='adam@zooniverse.org',
version='1.0.3',
packages=find_packages(),
include_package_data=True,
install... |
34452461de40c35d28bfc8b2a18b6fa14ebb875d | onadata/apps/fsforms/management/commands/update_mongo_value_type.py | onadata/apps/fsforms/management/commands/update_mongo_value_type.py | from django.conf import settings
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Update value type of fs_site and fs_uuid in mongo instances to make string type to int type"
def handle(self, *args, **kwargs):
xform_instances = settings.MONGO_DB.instances
... | from django.conf import settings
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Update value type of fs_site and fs_uuid in mongo instances to make string type to int type"
def handle(self, *args, **kwargs):
xform_instances = settings.MONGO_DB.instances
... | Handle cases update mongo value type | Handle cases update mongo value type
| Python | bsd-2-clause | awemulya/fieldsight-kobocat,awemulya/fieldsight-kobocat,awemulya/fieldsight-kobocat,awemulya/fieldsight-kobocat | from django.conf import settings
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Update value type of fs_site and fs_uuid in mongo instances to make string type to int type"
def handle(self, *args, **kwargs):
xform_instances = settings.MONGO_DB.instances
... | from django.conf import settings
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Update value type of fs_site and fs_uuid in mongo instances to make string type to int type"
def handle(self, *args, **kwargs):
xform_instances = settings.MONGO_DB.instances
... | <commit_before>from django.conf import settings
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Update value type of fs_site and fs_uuid in mongo instances to make string type to int type"
def handle(self, *args, **kwargs):
xform_instances = settings.MONGO_DB.i... | from django.conf import settings
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Update value type of fs_site and fs_uuid in mongo instances to make string type to int type"
def handle(self, *args, **kwargs):
xform_instances = settings.MONGO_DB.instances
... | from django.conf import settings
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Update value type of fs_site and fs_uuid in mongo instances to make string type to int type"
def handle(self, *args, **kwargs):
xform_instances = settings.MONGO_DB.instances
... | <commit_before>from django.conf import settings
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Update value type of fs_site and fs_uuid in mongo instances to make string type to int type"
def handle(self, *args, **kwargs):
xform_instances = settings.MONGO_DB.i... |
c6b51b82fa0503a2696161374160c47297211c7c | qubs_data_api/urls.py | qubs_data_api/urls.py | from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^climate/', include('climate.urls')),
url(r'^herbarium/', include('herbarium.urls')),
url(r'^api-auth/', include('rest_framework.urls')),
url(r'^admin/', admin.site.urls),
]
| from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^', include('core.urls')),
url(r'^climate/', include('climate.urls')),
url(r'^herbarium/', include('herbarium.urls')),
url(r'^api-auth/', include('rest_framework.urls')),
url(r'^admin/', admin.site.urls... | Include Core URLS at the base URL path. | Include Core URLS at the base URL path.
| Python | apache-2.0 | qubs/data-centre,qubs/data-centre,qubs/climate-data-api,qubs/climate-data-api | from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^climate/', include('climate.urls')),
url(r'^herbarium/', include('herbarium.urls')),
url(r'^api-auth/', include('rest_framework.urls')),
url(r'^admin/', admin.site.urls),
]
Include Core URLS at the base UR... | from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^', include('core.urls')),
url(r'^climate/', include('climate.urls')),
url(r'^herbarium/', include('herbarium.urls')),
url(r'^api-auth/', include('rest_framework.urls')),
url(r'^admin/', admin.site.urls... | <commit_before>from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^climate/', include('climate.urls')),
url(r'^herbarium/', include('herbarium.urls')),
url(r'^api-auth/', include('rest_framework.urls')),
url(r'^admin/', admin.site.urls),
]
<commit_msg>Inclu... | from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^', include('core.urls')),
url(r'^climate/', include('climate.urls')),
url(r'^herbarium/', include('herbarium.urls')),
url(r'^api-auth/', include('rest_framework.urls')),
url(r'^admin/', admin.site.urls... | from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^climate/', include('climate.urls')),
url(r'^herbarium/', include('herbarium.urls')),
url(r'^api-auth/', include('rest_framework.urls')),
url(r'^admin/', admin.site.urls),
]
Include Core URLS at the base UR... | <commit_before>from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^climate/', include('climate.urls')),
url(r'^herbarium/', include('herbarium.urls')),
url(r'^api-auth/', include('rest_framework.urls')),
url(r'^admin/', admin.site.urls),
]
<commit_msg>Inclu... |
102a35d9ce74a4f29be2fc0bb34b80cb7ee4d77d | tests/helper_methods_test.py | tests/helper_methods_test.py | import os
import unittest
from config import Config
class HelperMethodsTest(unittest.TestCase):
def test_that_config_week_is_only_A_or_B(self):
"""
This test ensures that the only value set for 'WEEK'
in the envvars is A or B.
"""
config = Config()
if os.path.exis... | import os
import unittest
from config import Config
class HelperMethodsTest(unittest.TestCase):
def test_that_config_week_is_only_A_or_B(self):
"""
This test ensures that the only value set for 'WEEK'
in the envvars is A or B.
"""
config = Config()
week_options = [... | Update tests for config week | Update tests for config week
| Python | mit | andela-kanyanwu/food-bot-review | import os
import unittest
from config import Config
class HelperMethodsTest(unittest.TestCase):
def test_that_config_week_is_only_A_or_B(self):
"""
This test ensures that the only value set for 'WEEK'
in the envvars is A or B.
"""
config = Config()
if os.path.exis... | import os
import unittest
from config import Config
class HelperMethodsTest(unittest.TestCase):
def test_that_config_week_is_only_A_or_B(self):
"""
This test ensures that the only value set for 'WEEK'
in the envvars is A or B.
"""
config = Config()
week_options = [... | <commit_before>import os
import unittest
from config import Config
class HelperMethodsTest(unittest.TestCase):
def test_that_config_week_is_only_A_or_B(self):
"""
This test ensures that the only value set for 'WEEK'
in the envvars is A or B.
"""
config = Config()
... | import os
import unittest
from config import Config
class HelperMethodsTest(unittest.TestCase):
def test_that_config_week_is_only_A_or_B(self):
"""
This test ensures that the only value set for 'WEEK'
in the envvars is A or B.
"""
config = Config()
week_options = [... | import os
import unittest
from config import Config
class HelperMethodsTest(unittest.TestCase):
def test_that_config_week_is_only_A_or_B(self):
"""
This test ensures that the only value set for 'WEEK'
in the envvars is A or B.
"""
config = Config()
if os.path.exis... | <commit_before>import os
import unittest
from config import Config
class HelperMethodsTest(unittest.TestCase):
def test_that_config_week_is_only_A_or_B(self):
"""
This test ensures that the only value set for 'WEEK'
in the envvars is A or B.
"""
config = Config()
... |
126d79011221da6692d70f9a9aba1f335155ab58 | us_ignite/apps/management/commands/app_load_fixtures.py | us_ignite/apps/management/commands/app_load_fixtures.py | from django.core.management.base import BaseCommand
from us_ignite.apps.models import Feature, Domain
FEATURE_LIST = (
'SDN',
'OpenFlow',
'Ultra fast',
'Speed',
'Low-latency',
'Local cloud / edge computing',
)
DOMAIN_LIST = (
'Healthcare',
'Education & Workforce',
'Energy',
'... | from django.core.management.base import BaseCommand
from us_ignite.apps.models import Feature, Domain
FEATURE_LIST = (
'SDN',
'OpenFlow',
'Ultra fast',
'Speed',
'Low-latency',
'Local cloud / edge computing',
'Advanced wireless',
'Ultra-fast/Gigabit to end-user',
'GENI/US Ignite Ra... | Update app domain initial fixtures. | Update app domain initial fixtures.
| Python | bsd-3-clause | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | from django.core.management.base import BaseCommand
from us_ignite.apps.models import Feature, Domain
FEATURE_LIST = (
'SDN',
'OpenFlow',
'Ultra fast',
'Speed',
'Low-latency',
'Local cloud / edge computing',
)
DOMAIN_LIST = (
'Healthcare',
'Education & Workforce',
'Energy',
'... | from django.core.management.base import BaseCommand
from us_ignite.apps.models import Feature, Domain
FEATURE_LIST = (
'SDN',
'OpenFlow',
'Ultra fast',
'Speed',
'Low-latency',
'Local cloud / edge computing',
'Advanced wireless',
'Ultra-fast/Gigabit to end-user',
'GENI/US Ignite Ra... | <commit_before>from django.core.management.base import BaseCommand
from us_ignite.apps.models import Feature, Domain
FEATURE_LIST = (
'SDN',
'OpenFlow',
'Ultra fast',
'Speed',
'Low-latency',
'Local cloud / edge computing',
)
DOMAIN_LIST = (
'Healthcare',
'Education & Workforce',
... | from django.core.management.base import BaseCommand
from us_ignite.apps.models import Feature, Domain
FEATURE_LIST = (
'SDN',
'OpenFlow',
'Ultra fast',
'Speed',
'Low-latency',
'Local cloud / edge computing',
'Advanced wireless',
'Ultra-fast/Gigabit to end-user',
'GENI/US Ignite Ra... | from django.core.management.base import BaseCommand
from us_ignite.apps.models import Feature, Domain
FEATURE_LIST = (
'SDN',
'OpenFlow',
'Ultra fast',
'Speed',
'Low-latency',
'Local cloud / edge computing',
)
DOMAIN_LIST = (
'Healthcare',
'Education & Workforce',
'Energy',
'... | <commit_before>from django.core.management.base import BaseCommand
from us_ignite.apps.models import Feature, Domain
FEATURE_LIST = (
'SDN',
'OpenFlow',
'Ultra fast',
'Speed',
'Low-latency',
'Local cloud / edge computing',
)
DOMAIN_LIST = (
'Healthcare',
'Education & Workforce',
... |
0bd76b828fbd81ac85b7384174692e46e8ef3205 | devlol/urls.py | devlol/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'devlol.views.index'),
# Static Stuff
url(r'^location/$', 'devlol.views.location'),
url(r'^mail/$', 'devlol.views.mail'),
# Diary Stuff
url(r'^diary/$', ... | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'devlol.views.index'),
# Static Stuff
url(r'^location/$', 'devlol.views.location'),
url(r'^mail/$', 'devlol.views.mail'),
# Diary Stuff
url(r'^diary/$', ... | Fix rout for diary/event, argument has to be item_id | Fix rout for diary/event, argument has to be item_id
For error see here: http://devlol.at/diary/event/22/ as an example | Python | mit | DevLoL/devlol.at,DevLoL/devlol.at,DevLoL/devlol.at,DevLoL/devlol.at | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'devlol.views.index'),
# Static Stuff
url(r'^location/$', 'devlol.views.location'),
url(r'^mail/$', 'devlol.views.mail'),
# Diary Stuff
url(r'^diary/$', ... | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'devlol.views.index'),
# Static Stuff
url(r'^location/$', 'devlol.views.location'),
url(r'^mail/$', 'devlol.views.mail'),
# Diary Stuff
url(r'^diary/$', ... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'devlol.views.index'),
# Static Stuff
url(r'^location/$', 'devlol.views.location'),
url(r'^mail/$', 'devlol.views.mail'),
# Diary Stuff
url(r'^diary/$'... | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'devlol.views.index'),
# Static Stuff
url(r'^location/$', 'devlol.views.location'),
url(r'^mail/$', 'devlol.views.mail'),
# Diary Stuff
url(r'^diary/$', ... | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'devlol.views.index'),
# Static Stuff
url(r'^location/$', 'devlol.views.location'),
url(r'^mail/$', 'devlol.views.mail'),
# Diary Stuff
url(r'^diary/$', ... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'devlol.views.index'),
# Static Stuff
url(r'^location/$', 'devlol.views.location'),
url(r'^mail/$', 'devlol.views.mail'),
# Diary Stuff
url(r'^diary/$'... |
6e4e073b4979bbf6099d0054181f13134f8cfe73 | stash_test_case.py | stash_test_case.py | import os
import shutil
import unittest
from stash import Stash
class StashTestCase(unittest.TestCase):
"""Base class for test cases that test stash functionality.
This base class makes sure that all unit tests are executed in a sandbox
environment.
"""
PATCHES_PATH = os.path.join('test', '.patc... | import os
import shutil
import unittest
from stash import Stash
class StashTestCase(unittest.TestCase):
"""Base class for test cases that test stash functionality.
This base class makes sure that all unit tests are executed in a sandbox
environment.
"""
PATCHES_PATH = os.path.join('test', '.patc... | Remove patches in between unit tests. | Remove patches in between unit tests.
| Python | bsd-3-clause | ton/stash,ton/stash | import os
import shutil
import unittest
from stash import Stash
class StashTestCase(unittest.TestCase):
"""Base class for test cases that test stash functionality.
This base class makes sure that all unit tests are executed in a sandbox
environment.
"""
PATCHES_PATH = os.path.join('test', '.patc... | import os
import shutil
import unittest
from stash import Stash
class StashTestCase(unittest.TestCase):
"""Base class for test cases that test stash functionality.
This base class makes sure that all unit tests are executed in a sandbox
environment.
"""
PATCHES_PATH = os.path.join('test', '.patc... | <commit_before>import os
import shutil
import unittest
from stash import Stash
class StashTestCase(unittest.TestCase):
"""Base class for test cases that test stash functionality.
This base class makes sure that all unit tests are executed in a sandbox
environment.
"""
PATCHES_PATH = os.path.join... | import os
import shutil
import unittest
from stash import Stash
class StashTestCase(unittest.TestCase):
"""Base class for test cases that test stash functionality.
This base class makes sure that all unit tests are executed in a sandbox
environment.
"""
PATCHES_PATH = os.path.join('test', '.patc... | import os
import shutil
import unittest
from stash import Stash
class StashTestCase(unittest.TestCase):
"""Base class for test cases that test stash functionality.
This base class makes sure that all unit tests are executed in a sandbox
environment.
"""
PATCHES_PATH = os.path.join('test', '.patc... | <commit_before>import os
import shutil
import unittest
from stash import Stash
class StashTestCase(unittest.TestCase):
"""Base class for test cases that test stash functionality.
This base class makes sure that all unit tests are executed in a sandbox
environment.
"""
PATCHES_PATH = os.path.join... |
7535e8020b2d29abbe45e724f5ff4f51613d95d0 | survey/__init__.py | survey/__init__.py | import logging
LOGGER = logging.getLogger(__name__)
DEFAULT_SETTINGS = [
"CHOICES_SEPARATOR",
"USER_DID_NOT_ANSWER",
"TEX_CONFIGURATION_FILE",
"SURVEY_DEFAULT_PIE_COLOR",
"EXCEL_COMPATIBLE_CSV",
]
def set_default_settings():
try:
from django.conf import settings
from . import... | import logging
LOGGER = logging.getLogger(__name__)
DEFAULT_SETTINGS = [
"CHOICES_SEPARATOR",
"USER_DID_NOT_ANSWER",
"TEX_CONFIGURATION_FILE",
"SURVEY_DEFAULT_PIE_COLOR",
"EXCEL_COMPATIBLE_CSV",
]
def set_default_settings():
try:
from django.conf import settings
from . import... | Fix Use % formatting in logging functions | Fix Use % formatting in logging functions
| Python | agpl-3.0 | Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey | import logging
LOGGER = logging.getLogger(__name__)
DEFAULT_SETTINGS = [
"CHOICES_SEPARATOR",
"USER_DID_NOT_ANSWER",
"TEX_CONFIGURATION_FILE",
"SURVEY_DEFAULT_PIE_COLOR",
"EXCEL_COMPATIBLE_CSV",
]
def set_default_settings():
try:
from django.conf import settings
from . import... | import logging
LOGGER = logging.getLogger(__name__)
DEFAULT_SETTINGS = [
"CHOICES_SEPARATOR",
"USER_DID_NOT_ANSWER",
"TEX_CONFIGURATION_FILE",
"SURVEY_DEFAULT_PIE_COLOR",
"EXCEL_COMPATIBLE_CSV",
]
def set_default_settings():
try:
from django.conf import settings
from . import... | <commit_before>import logging
LOGGER = logging.getLogger(__name__)
DEFAULT_SETTINGS = [
"CHOICES_SEPARATOR",
"USER_DID_NOT_ANSWER",
"TEX_CONFIGURATION_FILE",
"SURVEY_DEFAULT_PIE_COLOR",
"EXCEL_COMPATIBLE_CSV",
]
def set_default_settings():
try:
from django.conf import settings
... | import logging
LOGGER = logging.getLogger(__name__)
DEFAULT_SETTINGS = [
"CHOICES_SEPARATOR",
"USER_DID_NOT_ANSWER",
"TEX_CONFIGURATION_FILE",
"SURVEY_DEFAULT_PIE_COLOR",
"EXCEL_COMPATIBLE_CSV",
]
def set_default_settings():
try:
from django.conf import settings
from . import... | import logging
LOGGER = logging.getLogger(__name__)
DEFAULT_SETTINGS = [
"CHOICES_SEPARATOR",
"USER_DID_NOT_ANSWER",
"TEX_CONFIGURATION_FILE",
"SURVEY_DEFAULT_PIE_COLOR",
"EXCEL_COMPATIBLE_CSV",
]
def set_default_settings():
try:
from django.conf import settings
from . import... | <commit_before>import logging
LOGGER = logging.getLogger(__name__)
DEFAULT_SETTINGS = [
"CHOICES_SEPARATOR",
"USER_DID_NOT_ANSWER",
"TEX_CONFIGURATION_FILE",
"SURVEY_DEFAULT_PIE_COLOR",
"EXCEL_COMPATIBLE_CSV",
]
def set_default_settings():
try:
from django.conf import settings
... |
d4de0c4fdf205c1107b08ccba0b428125d81de1a | src/biokbase/narrative/common/url_config.py | src/biokbase/narrative/common/url_config.py | import os
import json
class Struct:
def __init__(self, **args):
self.__dict__.update(args)
def get_url(self, key):
self._dict__.get(key)
try:
nar_path = os.environ["NARRATIVEDIR"]
config_json = open(os.path.join(nar_path, "config.json")).read()
config = json.loads(config_json)
... | import os
import json
class Struct:
def __init__(self, **args):
self.__dict__.update(args)
def get_url(self, key):
self.__dict__.get(key)
try:
nar_path = os.environ["NARRATIVEDIR"]
config_json = open(os.path.join(nar_path, "config.json")).read()
config = json.loads(config_json)
... | Fix bug in new url config method | Fix bug in new url config method | Python | mit | msneddon/narrative,psnovichkov/narrative,aekazakov/narrative,msneddon/narrative,psnovichkov/narrative,psnovichkov/narrative,jmchandonia/narrative,briehl/narrative,rsutormin/narrative,aekazakov/narrative,psnovichkov/narrative,psnovichkov/narrative,briehl/narrative,nlharris/narrative,msneddon/narrative,scanon/narrative,j... | import os
import json
class Struct:
def __init__(self, **args):
self.__dict__.update(args)
def get_url(self, key):
self._dict__.get(key)
try:
nar_path = os.environ["NARRATIVEDIR"]
config_json = open(os.path.join(nar_path, "config.json")).read()
config = json.loads(config_json)
... | import os
import json
class Struct:
def __init__(self, **args):
self.__dict__.update(args)
def get_url(self, key):
self.__dict__.get(key)
try:
nar_path = os.environ["NARRATIVEDIR"]
config_json = open(os.path.join(nar_path, "config.json")).read()
config = json.loads(config_json)
... | <commit_before>import os
import json
class Struct:
def __init__(self, **args):
self.__dict__.update(args)
def get_url(self, key):
self._dict__.get(key)
try:
nar_path = os.environ["NARRATIVEDIR"]
config_json = open(os.path.join(nar_path, "config.json")).read()
config = json.loads(... | import os
import json
class Struct:
def __init__(self, **args):
self.__dict__.update(args)
def get_url(self, key):
self.__dict__.get(key)
try:
nar_path = os.environ["NARRATIVEDIR"]
config_json = open(os.path.join(nar_path, "config.json")).read()
config = json.loads(config_json)
... | import os
import json
class Struct:
def __init__(self, **args):
self.__dict__.update(args)
def get_url(self, key):
self._dict__.get(key)
try:
nar_path = os.environ["NARRATIVEDIR"]
config_json = open(os.path.join(nar_path, "config.json")).read()
config = json.loads(config_json)
... | <commit_before>import os
import json
class Struct:
def __init__(self, **args):
self.__dict__.update(args)
def get_url(self, key):
self._dict__.get(key)
try:
nar_path = os.environ["NARRATIVEDIR"]
config_json = open(os.path.join(nar_path, "config.json")).read()
config = json.loads(... |
7c9b0ac281d39cbe8b694a4cb7a4dd0c171351e0 | custom/uth/tasks.py | custom/uth/tasks.py | from custom.uth.utils import create_case, match_case, attach_images_to_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
@task
def async_create_case(upload_id):
upload_doc = SonositeUpload.get(upload_id)
files = {}
for f in upload_doc._attachments.keys():
... | from custom.uth.utils import create_case, match_case, attach_images_to_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
import io
@task
def async_create_case(upload_id):
upload_doc = SonositeUpload.get(upload_id)
files = {}
for f in upload_doc._attachments.keys(... | Fix file type for post submissions | Fix file type for post submissions
| Python | bsd-3-clause | qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,q... | from custom.uth.utils import create_case, match_case, attach_images_to_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
@task
def async_create_case(upload_id):
upload_doc = SonositeUpload.get(upload_id)
files = {}
for f in upload_doc._attachments.keys():
... | from custom.uth.utils import create_case, match_case, attach_images_to_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
import io
@task
def async_create_case(upload_id):
upload_doc = SonositeUpload.get(upload_id)
files = {}
for f in upload_doc._attachments.keys(... | <commit_before>from custom.uth.utils import create_case, match_case, attach_images_to_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
@task
def async_create_case(upload_id):
upload_doc = SonositeUpload.get(upload_id)
files = {}
for f in upload_doc._attachments.... | from custom.uth.utils import create_case, match_case, attach_images_to_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
import io
@task
def async_create_case(upload_id):
upload_doc = SonositeUpload.get(upload_id)
files = {}
for f in upload_doc._attachments.keys(... | from custom.uth.utils import create_case, match_case, attach_images_to_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
@task
def async_create_case(upload_id):
upload_doc = SonositeUpload.get(upload_id)
files = {}
for f in upload_doc._attachments.keys():
... | <commit_before>from custom.uth.utils import create_case, match_case, attach_images_to_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
@task
def async_create_case(upload_id):
upload_doc = SonositeUpload.get(upload_id)
files = {}
for f in upload_doc._attachments.... |
7902711589cf3ce0fe492442dbfec2497fd06dc4 | build-aux/dist-docs.py | build-aux/dist-docs.py | #!/usr/bin/env python3
import os
import shutil
import subprocess
from pathlib import PurePath
references = [
'docs/json-glib/json-glib-1.0',
]
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
buildroot = os.environ.get('MESON_BUILD_ROOT')
distroot = os.environ.get('MESON_DIST_ROOT')
for reference in reference... | #!/usr/bin/env python3
import os
import shutil
references = [
'doc/json-glib-1.0',
]
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
buildroot = os.environ.get('MESON_BUILD_ROOT')
distroot = os.environ.get('MESON_DIST_ROOT')
for reference in references:
src_path = os.path.join(buildroot, reference)
if... | Fix the docs path in the dist script | build: Fix the docs path in the dist script
Fixes: #66
| Python | lgpl-2.1 | frida/json-glib,GNOME/json-glib,GNOME/json-glib,frida/json-glib | #!/usr/bin/env python3
import os
import shutil
import subprocess
from pathlib import PurePath
references = [
'docs/json-glib/json-glib-1.0',
]
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
buildroot = os.environ.get('MESON_BUILD_ROOT')
distroot = os.environ.get('MESON_DIST_ROOT')
for reference in reference... | #!/usr/bin/env python3
import os
import shutil
references = [
'doc/json-glib-1.0',
]
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
buildroot = os.environ.get('MESON_BUILD_ROOT')
distroot = os.environ.get('MESON_DIST_ROOT')
for reference in references:
src_path = os.path.join(buildroot, reference)
if... | <commit_before>#!/usr/bin/env python3
import os
import shutil
import subprocess
from pathlib import PurePath
references = [
'docs/json-glib/json-glib-1.0',
]
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
buildroot = os.environ.get('MESON_BUILD_ROOT')
distroot = os.environ.get('MESON_DIST_ROOT')
for referen... | #!/usr/bin/env python3
import os
import shutil
references = [
'doc/json-glib-1.0',
]
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
buildroot = os.environ.get('MESON_BUILD_ROOT')
distroot = os.environ.get('MESON_DIST_ROOT')
for reference in references:
src_path = os.path.join(buildroot, reference)
if... | #!/usr/bin/env python3
import os
import shutil
import subprocess
from pathlib import PurePath
references = [
'docs/json-glib/json-glib-1.0',
]
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
buildroot = os.environ.get('MESON_BUILD_ROOT')
distroot = os.environ.get('MESON_DIST_ROOT')
for reference in reference... | <commit_before>#!/usr/bin/env python3
import os
import shutil
import subprocess
from pathlib import PurePath
references = [
'docs/json-glib/json-glib-1.0',
]
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
buildroot = os.environ.get('MESON_BUILD_ROOT')
distroot = os.environ.get('MESON_DIST_ROOT')
for referen... |
ac00ef4ac08c6e47de80c33a6781d00c7b2bc943 | flask_sockets.py | flask_sockets.py | # -*- coding: utf-8 -*-
def log_request(self):
log = self.server.log
if log:
if hasattr(log, 'info'):
log.info(self.format_request() + '\n')
else:
log.write(self.format_request() + '\n')
# Monkeys are made for freedom.
try:
import gevent
from geventwebsocket.gu... | # -*- coding: utf-8 -*-
from functools import wraps
from flask import request
def log_request(self):
log = self.server.log
if log:
if hasattr(log, 'info'):
log.info(self.format_request() + '\n')
else:
log.write(self.format_request() + '\n')
# Monkeys are made for fr... | Use Flask routing to allow for variables in URL | Use Flask routing to allow for variables in URL
| Python | mit | clarkduvall/flask-sockets | # -*- coding: utf-8 -*-
def log_request(self):
log = self.server.log
if log:
if hasattr(log, 'info'):
log.info(self.format_request() + '\n')
else:
log.write(self.format_request() + '\n')
# Monkeys are made for freedom.
try:
import gevent
from geventwebsocket.gu... | # -*- coding: utf-8 -*-
from functools import wraps
from flask import request
def log_request(self):
log = self.server.log
if log:
if hasattr(log, 'info'):
log.info(self.format_request() + '\n')
else:
log.write(self.format_request() + '\n')
# Monkeys are made for fr... | <commit_before># -*- coding: utf-8 -*-
def log_request(self):
log = self.server.log
if log:
if hasattr(log, 'info'):
log.info(self.format_request() + '\n')
else:
log.write(self.format_request() + '\n')
# Monkeys are made for freedom.
try:
import gevent
from gev... | # -*- coding: utf-8 -*-
from functools import wraps
from flask import request
def log_request(self):
log = self.server.log
if log:
if hasattr(log, 'info'):
log.info(self.format_request() + '\n')
else:
log.write(self.format_request() + '\n')
# Monkeys are made for fr... | # -*- coding: utf-8 -*-
def log_request(self):
log = self.server.log
if log:
if hasattr(log, 'info'):
log.info(self.format_request() + '\n')
else:
log.write(self.format_request() + '\n')
# Monkeys are made for freedom.
try:
import gevent
from geventwebsocket.gu... | <commit_before># -*- coding: utf-8 -*-
def log_request(self):
log = self.server.log
if log:
if hasattr(log, 'info'):
log.info(self.format_request() + '\n')
else:
log.write(self.format_request() + '\n')
# Monkeys are made for freedom.
try:
import gevent
from gev... |
b77174948721413de84d6037ef4e4329978978cc | taskzilla/views.py | taskzilla/views.py | from django.shortcuts import render
from .models import Task
def index(request):
tasks_list = Task.objects.filter(closed=False)
context = {'tasks_list' : tasks_list,}
return render(request, 'taskzilla/index.html', context)
def task_page(request, task_id):
task = Task.objects.get(pk=task_id)
context = {'task' :... | from django.shortcuts import render
from .models import Task
def index(request):
tasks_list = Task.objects.filter(closed=False)
context = {'tasks_list' : tasks_list,}
return render(request, 'taskzilla/index.html', context)
def task_page(request, task_id):
task = Task.objects.get(pk=task_id)
context = {'task' :... | Add comments to the Task Page | Views: Add comments to the Task Page
| Python | mit | static-code-generators/taskzilla,jailuthra/taskzilla,jailuthra/taskzilla,static-code-generators/taskzilla,static-code-generators/taskzilla,jailuthra/taskzilla | from django.shortcuts import render
from .models import Task
def index(request):
tasks_list = Task.objects.filter(closed=False)
context = {'tasks_list' : tasks_list,}
return render(request, 'taskzilla/index.html', context)
def task_page(request, task_id):
task = Task.objects.get(pk=task_id)
context = {'task' :... | from django.shortcuts import render
from .models import Task
def index(request):
tasks_list = Task.objects.filter(closed=False)
context = {'tasks_list' : tasks_list,}
return render(request, 'taskzilla/index.html', context)
def task_page(request, task_id):
task = Task.objects.get(pk=task_id)
context = {'task' :... | <commit_before>from django.shortcuts import render
from .models import Task
def index(request):
tasks_list = Task.objects.filter(closed=False)
context = {'tasks_list' : tasks_list,}
return render(request, 'taskzilla/index.html', context)
def task_page(request, task_id):
task = Task.objects.get(pk=task_id)
cont... | from django.shortcuts import render
from .models import Task
def index(request):
tasks_list = Task.objects.filter(closed=False)
context = {'tasks_list' : tasks_list,}
return render(request, 'taskzilla/index.html', context)
def task_page(request, task_id):
task = Task.objects.get(pk=task_id)
context = {'task' :... | from django.shortcuts import render
from .models import Task
def index(request):
tasks_list = Task.objects.filter(closed=False)
context = {'tasks_list' : tasks_list,}
return render(request, 'taskzilla/index.html', context)
def task_page(request, task_id):
task = Task.objects.get(pk=task_id)
context = {'task' :... | <commit_before>from django.shortcuts import render
from .models import Task
def index(request):
tasks_list = Task.objects.filter(closed=False)
context = {'tasks_list' : tasks_list,}
return render(request, 'taskzilla/index.html', context)
def task_page(request, task_id):
task = Task.objects.get(pk=task_id)
cont... |
1f13b7734b06e3c9572865734defa0b1afd4db8b | jobs_executor.py | jobs_executor.py | import subprocess
import os
import mail_handler
from datetime import datetime
from settings_handler import settings
def execJobs(jobs):
try:
for job in jobs:
if not execJob(job):
return False
print "Jobs executed"
return True
except:
print "Executed failed"
return False
finally:
output = "tmp/out... | import subprocess
import os
import mail_handler
import tempfile
from datetime import datetime
from settings_handler import settings
def execJobs(jobs):
try:
for job in jobs:
if not execJob(job):
return False
print "Jobs executed"
return True
except:
print "Executed failed"
return False
def execJob(... | Use the tempfile module to create system indipendend temporary file for the output. | Use the tempfile module to create system indipendend temporary file for the output.
closes #1
| Python | apache-2.0 | baumartig/paperboy | import subprocess
import os
import mail_handler
from datetime import datetime
from settings_handler import settings
def execJobs(jobs):
try:
for job in jobs:
if not execJob(job):
return False
print "Jobs executed"
return True
except:
print "Executed failed"
return False
finally:
output = "tmp/out... | import subprocess
import os
import mail_handler
import tempfile
from datetime import datetime
from settings_handler import settings
def execJobs(jobs):
try:
for job in jobs:
if not execJob(job):
return False
print "Jobs executed"
return True
except:
print "Executed failed"
return False
def execJob(... | <commit_before>import subprocess
import os
import mail_handler
from datetime import datetime
from settings_handler import settings
def execJobs(jobs):
try:
for job in jobs:
if not execJob(job):
return False
print "Jobs executed"
return True
except:
print "Executed failed"
return False
finally:
ou... | import subprocess
import os
import mail_handler
import tempfile
from datetime import datetime
from settings_handler import settings
def execJobs(jobs):
try:
for job in jobs:
if not execJob(job):
return False
print "Jobs executed"
return True
except:
print "Executed failed"
return False
def execJob(... | import subprocess
import os
import mail_handler
from datetime import datetime
from settings_handler import settings
def execJobs(jobs):
try:
for job in jobs:
if not execJob(job):
return False
print "Jobs executed"
return True
except:
print "Executed failed"
return False
finally:
output = "tmp/out... | <commit_before>import subprocess
import os
import mail_handler
from datetime import datetime
from settings_handler import settings
def execJobs(jobs):
try:
for job in jobs:
if not execJob(job):
return False
print "Jobs executed"
return True
except:
print "Executed failed"
return False
finally:
ou... |
7ff11cc0d8183a03bb83430236b12aa70ac2f8dc | lib/allosmod/get_ss.py | lib/allosmod/get_ss.py | """Get secondary structure with DSSP."""
from __future__ import print_function, absolute_import
import optparse
import subprocess
def check_output(args, stderr=None, retcode=0, input=None, *other):
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=stderr,
stdin=subprocess.PIPE if ... | """Get secondary structure with DSSP."""
from __future__ import print_function, absolute_import
import optparse
import subprocess
def check_output(args, stderr=None, retcode=0, input=None, *other):
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=stderr,
stdin=subprocess.PIPE if ... | Return results as a generator, not in a file. | Return results as a generator, not in a file.
| Python | lgpl-2.1 | salilab/allosmod-lib,salilab/allosmod-lib,salilab/allosmod-lib,salilab/allosmod-lib,salilab/allosmod-lib | """Get secondary structure with DSSP."""
from __future__ import print_function, absolute_import
import optparse
import subprocess
def check_output(args, stderr=None, retcode=0, input=None, *other):
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=stderr,
stdin=subprocess.PIPE if ... | """Get secondary structure with DSSP."""
from __future__ import print_function, absolute_import
import optparse
import subprocess
def check_output(args, stderr=None, retcode=0, input=None, *other):
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=stderr,
stdin=subprocess.PIPE if ... | <commit_before>"""Get secondary structure with DSSP."""
from __future__ import print_function, absolute_import
import optparse
import subprocess
def check_output(args, stderr=None, retcode=0, input=None, *other):
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=stderr,
stdin=subp... | """Get secondary structure with DSSP."""
from __future__ import print_function, absolute_import
import optparse
import subprocess
def check_output(args, stderr=None, retcode=0, input=None, *other):
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=stderr,
stdin=subprocess.PIPE if ... | """Get secondary structure with DSSP."""
from __future__ import print_function, absolute_import
import optparse
import subprocess
def check_output(args, stderr=None, retcode=0, input=None, *other):
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=stderr,
stdin=subprocess.PIPE if ... | <commit_before>"""Get secondary structure with DSSP."""
from __future__ import print_function, absolute_import
import optparse
import subprocess
def check_output(args, stderr=None, retcode=0, input=None, *other):
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=stderr,
stdin=subp... |
b0c7e61178a5eb81dc24aab9911baaeccda546ff | searchapi/__init__.py | searchapi/__init__.py | import os, logging
from flask import Flask
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.config.from_object(os.environ.get('SETTINGS'))
app.logger.debug("\nConfiguration\n%s\n" % app.config)
# Sentry exception reporting
if 'SENTRY_DSN' in os.environ:
sentry = Sentry(app, dsn=os.environ['SENTR... | import os, logging
from flask import Flask
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.config.from_object(os.environ.get('SETTINGS'))
app.logger.debug("\nConfiguration\n%s\n" % app.config)
from werkzeug.contrib.fixers import ProxyFix
app.wsgi_app = ProxyFix(app.wsgi_app)
# Sentry exception rep... | Add proxy fix as in lr this will run with reverse proxy | Add proxy fix as in lr this will run with reverse proxy
| Python | mit | LandRegistry/search-api-alpha,LandRegistry/search-api-alpha | import os, logging
from flask import Flask
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.config.from_object(os.environ.get('SETTINGS'))
app.logger.debug("\nConfiguration\n%s\n" % app.config)
# Sentry exception reporting
if 'SENTRY_DSN' in os.environ:
sentry = Sentry(app, dsn=os.environ['SENTR... | import os, logging
from flask import Flask
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.config.from_object(os.environ.get('SETTINGS'))
app.logger.debug("\nConfiguration\n%s\n" % app.config)
from werkzeug.contrib.fixers import ProxyFix
app.wsgi_app = ProxyFix(app.wsgi_app)
# Sentry exception rep... | <commit_before>import os, logging
from flask import Flask
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.config.from_object(os.environ.get('SETTINGS'))
app.logger.debug("\nConfiguration\n%s\n" % app.config)
# Sentry exception reporting
if 'SENTRY_DSN' in os.environ:
sentry = Sentry(app, dsn=os... | import os, logging
from flask import Flask
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.config.from_object(os.environ.get('SETTINGS'))
app.logger.debug("\nConfiguration\n%s\n" % app.config)
from werkzeug.contrib.fixers import ProxyFix
app.wsgi_app = ProxyFix(app.wsgi_app)
# Sentry exception rep... | import os, logging
from flask import Flask
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.config.from_object(os.environ.get('SETTINGS'))
app.logger.debug("\nConfiguration\n%s\n" % app.config)
# Sentry exception reporting
if 'SENTRY_DSN' in os.environ:
sentry = Sentry(app, dsn=os.environ['SENTR... | <commit_before>import os, logging
from flask import Flask
from raven.contrib.flask import Sentry
app = Flask(__name__)
app.config.from_object(os.environ.get('SETTINGS'))
app.logger.debug("\nConfiguration\n%s\n" % app.config)
# Sentry exception reporting
if 'SENTRY_DSN' in os.environ:
sentry = Sentry(app, dsn=os... |
d49118a52c15b2434a43a717476cdc7340dfc8c6 | test/test_suite.py | test/test_suite.py |
# list examples
a=['spam','eggs',100,1234]
log(a[:2]+['bacon',2*2])
log(3*a[:3]+['Boo!'])
log(a[:])
a[2]=a[2]+23
log(a)
a[0:2]=[1,12]
log(a)
a[0:2]=[]
log(a)
a[1:1]=['bletch','xyzzy']
log(a)
a[:0]=a
log(a)
a[:]=[]
log(a) |
# list examples
a=['spam','eggs',100,1234]
log(a[:2]+['bacon',2*2])
log(3*a[:3]+['Boo!'])
log(a[:])
a[2]=a[2]+23
log(a)
a[0:2]=[1,12]
log(a)
a[0:2]=[]
log(a)
a[1:1]=['bletch','xyzzy']
log(a)
a[:0]=a
log(a)
a[:]=[]
log(a)
a.extend('ab')
log(a)
a.extend([1,2,33])
log(a)
| Test suite copied from Python tutorial | Test suite copied from Python tutorial | Python | bsd-3-clause | sgzwiz/brython,sgzwiz/brython,sgzwiz/brython |
# list examples
a=['spam','eggs',100,1234]
log(a[:2]+['bacon',2*2])
log(3*a[:3]+['Boo!'])
log(a[:])
a[2]=a[2]+23
log(a)
a[0:2]=[1,12]
log(a)
a[0:2]=[]
log(a)
a[1:1]=['bletch','xyzzy']
log(a)
a[:0]=a
log(a)
a[:]=[]
log(a)Test suite copied from Python tutorial |
# list examples
a=['spam','eggs',100,1234]
log(a[:2]+['bacon',2*2])
log(3*a[:3]+['Boo!'])
log(a[:])
a[2]=a[2]+23
log(a)
a[0:2]=[1,12]
log(a)
a[0:2]=[]
log(a)
a[1:1]=['bletch','xyzzy']
log(a)
a[:0]=a
log(a)
a[:]=[]
log(a)
a.extend('ab')
log(a)
a.extend([1,2,33])
log(a)
| <commit_before>
# list examples
a=['spam','eggs',100,1234]
log(a[:2]+['bacon',2*2])
log(3*a[:3]+['Boo!'])
log(a[:])
a[2]=a[2]+23
log(a)
a[0:2]=[1,12]
log(a)
a[0:2]=[]
log(a)
a[1:1]=['bletch','xyzzy']
log(a)
a[:0]=a
log(a)
a[:]=[]
log(a)<commit_msg>Test suite copied from Python tutorial<commit_after> |
# list examples
a=['spam','eggs',100,1234]
log(a[:2]+['bacon',2*2])
log(3*a[:3]+['Boo!'])
log(a[:])
a[2]=a[2]+23
log(a)
a[0:2]=[1,12]
log(a)
a[0:2]=[]
log(a)
a[1:1]=['bletch','xyzzy']
log(a)
a[:0]=a
log(a)
a[:]=[]
log(a)
a.extend('ab')
log(a)
a.extend([1,2,33])
log(a)
|
# list examples
a=['spam','eggs',100,1234]
log(a[:2]+['bacon',2*2])
log(3*a[:3]+['Boo!'])
log(a[:])
a[2]=a[2]+23
log(a)
a[0:2]=[1,12]
log(a)
a[0:2]=[]
log(a)
a[1:1]=['bletch','xyzzy']
log(a)
a[:0]=a
log(a)
a[:]=[]
log(a)Test suite copied from Python tutorial
# list examples
a=['spam','eggs',100,1234]
log(a[:2]+['bacon... | <commit_before>
# list examples
a=['spam','eggs',100,1234]
log(a[:2]+['bacon',2*2])
log(3*a[:3]+['Boo!'])
log(a[:])
a[2]=a[2]+23
log(a)
a[0:2]=[1,12]
log(a)
a[0:2]=[]
log(a)
a[1:1]=['bletch','xyzzy']
log(a)
a[:0]=a
log(a)
a[:]=[]
log(a)<commit_msg>Test suite copied from Python tutorial<commit_after>
# list examples
a=[... |
eec8ddc6beb08a02577831b6f64b0455e5c1ef05 | local.py | local.py | import gntp
import Growl
class GNTPRegister(gntp.GNTPRegister):
def send(self):
print 'Sending Registration'
growl = Growl.GrowlNotifier(
applicationName = self.headers['Application-Name'],
notifications = self.notifications,
defaultNotifications = self.defaultNotifications,
)
growl.register()
... | import gntp
import Growl
class GNTPRegister(gntp.GNTPRegister):
def send(self):
print 'Sending Local Registration'
growl = Growl.GrowlNotifier(
applicationName = self.headers['Application-Name'],
notifications = self.notifications,
defaultNotifications = self.defaultNotifications,
)
growl.registe... | Disable icon temporarily and adjust the debug print statements | Disable icon temporarily and adjust the debug print statements | Python | mit | kfdm/gntp | import gntp
import Growl
class GNTPRegister(gntp.GNTPRegister):
def send(self):
print 'Sending Registration'
growl = Growl.GrowlNotifier(
applicationName = self.headers['Application-Name'],
notifications = self.notifications,
defaultNotifications = self.defaultNotifications,
)
growl.register()
... | import gntp
import Growl
class GNTPRegister(gntp.GNTPRegister):
def send(self):
print 'Sending Local Registration'
growl = Growl.GrowlNotifier(
applicationName = self.headers['Application-Name'],
notifications = self.notifications,
defaultNotifications = self.defaultNotifications,
)
growl.registe... | <commit_before>import gntp
import Growl
class GNTPRegister(gntp.GNTPRegister):
def send(self):
print 'Sending Registration'
growl = Growl.GrowlNotifier(
applicationName = self.headers['Application-Name'],
notifications = self.notifications,
defaultNotifications = self.defaultNotifications,
)
grow... | import gntp
import Growl
class GNTPRegister(gntp.GNTPRegister):
def send(self):
print 'Sending Local Registration'
growl = Growl.GrowlNotifier(
applicationName = self.headers['Application-Name'],
notifications = self.notifications,
defaultNotifications = self.defaultNotifications,
)
growl.registe... | import gntp
import Growl
class GNTPRegister(gntp.GNTPRegister):
def send(self):
print 'Sending Registration'
growl = Growl.GrowlNotifier(
applicationName = self.headers['Application-Name'],
notifications = self.notifications,
defaultNotifications = self.defaultNotifications,
)
growl.register()
... | <commit_before>import gntp
import Growl
class GNTPRegister(gntp.GNTPRegister):
def send(self):
print 'Sending Registration'
growl = Growl.GrowlNotifier(
applicationName = self.headers['Application-Name'],
notifications = self.notifications,
defaultNotifications = self.defaultNotifications,
)
grow... |
0d3507d5eb9801b38c66fb03804e15b089fb2233 | tests/cdek_test.py | tests/cdek_test.py | # coding: utf-8
from __future__ import unicode_literals, print_function
import datetime
import unittest
import mock
from cdek import api, exceptions
@mock.patch('cdek.api.urlopen')
class CdekApiTest(unittest.TestCase):
def setUp(self):
self.reg_user = api.CdekCalc('123456', '123456')
self.unr... | # coding: utf-8
from __future__ import unicode_literals, print_function
import datetime
import unittest
import mock
from cdek import api, exceptions
@mock.patch('cdek.api.urlopen')
class CdekApiTest(unittest.TestCase):
def setUp(self):
self.reg_user = api.CdekCalc('123456', '123456')
self.unr... | Fix date for generate secure_key | Fix date for generate secure_key
| Python | mit | xtelaur/python-cdek,xtelaur/python-cdek | # coding: utf-8
from __future__ import unicode_literals, print_function
import datetime
import unittest
import mock
from cdek import api, exceptions
@mock.patch('cdek.api.urlopen')
class CdekApiTest(unittest.TestCase):
def setUp(self):
self.reg_user = api.CdekCalc('123456', '123456')
self.unr... | # coding: utf-8
from __future__ import unicode_literals, print_function
import datetime
import unittest
import mock
from cdek import api, exceptions
@mock.patch('cdek.api.urlopen')
class CdekApiTest(unittest.TestCase):
def setUp(self):
self.reg_user = api.CdekCalc('123456', '123456')
self.unr... | <commit_before># coding: utf-8
from __future__ import unicode_literals, print_function
import datetime
import unittest
import mock
from cdek import api, exceptions
@mock.patch('cdek.api.urlopen')
class CdekApiTest(unittest.TestCase):
def setUp(self):
self.reg_user = api.CdekCalc('123456', '123456')
... | # coding: utf-8
from __future__ import unicode_literals, print_function
import datetime
import unittest
import mock
from cdek import api, exceptions
@mock.patch('cdek.api.urlopen')
class CdekApiTest(unittest.TestCase):
def setUp(self):
self.reg_user = api.CdekCalc('123456', '123456')
self.unr... | # coding: utf-8
from __future__ import unicode_literals, print_function
import datetime
import unittest
import mock
from cdek import api, exceptions
@mock.patch('cdek.api.urlopen')
class CdekApiTest(unittest.TestCase):
def setUp(self):
self.reg_user = api.CdekCalc('123456', '123456')
self.unr... | <commit_before># coding: utf-8
from __future__ import unicode_literals, print_function
import datetime
import unittest
import mock
from cdek import api, exceptions
@mock.patch('cdek.api.urlopen')
class CdekApiTest(unittest.TestCase):
def setUp(self):
self.reg_user = api.CdekCalc('123456', '123456')
... |
00fd8b13e36c5e7020b7769f6dcd1afecfb79fb3 | examples/source.py | examples/source.py | """Test client that connects and sends infinite data."""
import sys
from tulip import *
def dprint(*args):
print('source:', *args, file=sys.stderr)
class Client(Protocol):
data = b'x'*16*1024
def connection_made(self, tr):
dprint('connecting to', tr.get_extra_info('addr'))
self.tr ... | """Test client that connects and sends infinite data."""
import sys
from tulip import *
def dprint(*args):
print('source:', *args, file=sys.stderr)
class Client(Protocol):
data = b'x'*16*1024
def connection_made(self, tr):
dprint('connecting to', tr.get_extra_info('addr'))
self.tr ... | Fix logic around lost connection. | Fix logic around lost connection.
| Python | apache-2.0 | Martiusweb/asyncio,manipopopo/asyncio,jashandeep-sohi/asyncio,manipopopo/asyncio,ajdavis/asyncio,1st1/asyncio,gvanrossum/asyncio,manipopopo/asyncio,1st1/asyncio,fallen/asyncio,vxgmichel/asyncio,haypo/trollius,gvanrossum/asyncio,vxgmichel/asyncio,fallen/asyncio,ajdavis/asyncio,gsb-eng/asyncio,jashandeep-sohi/asyncio,Mar... | """Test client that connects and sends infinite data."""
import sys
from tulip import *
def dprint(*args):
print('source:', *args, file=sys.stderr)
class Client(Protocol):
data = b'x'*16*1024
def connection_made(self, tr):
dprint('connecting to', tr.get_extra_info('addr'))
self.tr ... | """Test client that connects and sends infinite data."""
import sys
from tulip import *
def dprint(*args):
print('source:', *args, file=sys.stderr)
class Client(Protocol):
data = b'x'*16*1024
def connection_made(self, tr):
dprint('connecting to', tr.get_extra_info('addr'))
self.tr ... | <commit_before>"""Test client that connects and sends infinite data."""
import sys
from tulip import *
def dprint(*args):
print('source:', *args, file=sys.stderr)
class Client(Protocol):
data = b'x'*16*1024
def connection_made(self, tr):
dprint('connecting to', tr.get_extra_info('addr'))
... | """Test client that connects and sends infinite data."""
import sys
from tulip import *
def dprint(*args):
print('source:', *args, file=sys.stderr)
class Client(Protocol):
data = b'x'*16*1024
def connection_made(self, tr):
dprint('connecting to', tr.get_extra_info('addr'))
self.tr ... | """Test client that connects and sends infinite data."""
import sys
from tulip import *
def dprint(*args):
print('source:', *args, file=sys.stderr)
class Client(Protocol):
data = b'x'*16*1024
def connection_made(self, tr):
dprint('connecting to', tr.get_extra_info('addr'))
self.tr ... | <commit_before>"""Test client that connects and sends infinite data."""
import sys
from tulip import *
def dprint(*args):
print('source:', *args, file=sys.stderr)
class Client(Protocol):
data = b'x'*16*1024
def connection_made(self, tr):
dprint('connecting to', tr.get_extra_info('addr'))
... |
991a376736e50ddd6622947d713f61cebb565c8d | server/server/urls.py | server/server/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'server.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
| from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'django_inventory.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^django/inventory/$', 'inventory.views.index'),
u... | Add some CRUD URLs to Django. | Add some CRUD URLs to Django.
| Python | agpl-3.0 | TomDataworks/angular-inventory,TomDataworks/angular-inventory | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'server.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
Add some CRUD URLs to D... | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'django_inventory.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^django/inventory/$', 'inventory.views.index'),
u... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'server.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
<commit_... | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'django_inventory.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^django/inventory/$', 'inventory.views.index'),
u... | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'server.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
Add some CRUD URLs to D... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'server.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
<commit_... |
4823b42b23580e0a294c1e4ddb3b5b62abf9c7bc | sf/mmck/parameters.py | sf/mmck/parameters.py | from sf.lib.orderedattrdict import OrderedAttrDict
class Parameters(OrderedAttrDict):
pass
class ParameterValues(OrderedAttrDict):
pass
class Parameter(object):
def __init__(self, default=None, label=None):
self.default = default
self.label = label
class Integer(Parameter):
def... | from collections import OrderedDict
from sf.lib.orderedattrdict import OrderedAttrDict
class Parameters(OrderedAttrDict):
pass
class ParameterValues(OrderedAttrDict):
pass
class Parameter(object):
def __init__(self, default=None, label=None):
self.default = default
self.label = label... | Add a key/value pairs parameter type | Add a key/value pairs parameter type
| Python | mit | metrasynth/solar-flares | from sf.lib.orderedattrdict import OrderedAttrDict
class Parameters(OrderedAttrDict):
pass
class ParameterValues(OrderedAttrDict):
pass
class Parameter(object):
def __init__(self, default=None, label=None):
self.default = default
self.label = label
class Integer(Parameter):
def... | from collections import OrderedDict
from sf.lib.orderedattrdict import OrderedAttrDict
class Parameters(OrderedAttrDict):
pass
class ParameterValues(OrderedAttrDict):
pass
class Parameter(object):
def __init__(self, default=None, label=None):
self.default = default
self.label = label... | <commit_before>from sf.lib.orderedattrdict import OrderedAttrDict
class Parameters(OrderedAttrDict):
pass
class ParameterValues(OrderedAttrDict):
pass
class Parameter(object):
def __init__(self, default=None, label=None):
self.default = default
self.label = label
class Integer(Param... | from collections import OrderedDict
from sf.lib.orderedattrdict import OrderedAttrDict
class Parameters(OrderedAttrDict):
pass
class ParameterValues(OrderedAttrDict):
pass
class Parameter(object):
def __init__(self, default=None, label=None):
self.default = default
self.label = label... | from sf.lib.orderedattrdict import OrderedAttrDict
class Parameters(OrderedAttrDict):
pass
class ParameterValues(OrderedAttrDict):
pass
class Parameter(object):
def __init__(self, default=None, label=None):
self.default = default
self.label = label
class Integer(Parameter):
def... | <commit_before>from sf.lib.orderedattrdict import OrderedAttrDict
class Parameters(OrderedAttrDict):
pass
class ParameterValues(OrderedAttrDict):
pass
class Parameter(object):
def __init__(self, default=None, label=None):
self.default = default
self.label = label
class Integer(Param... |
ab83da7b6152dfdc50cf40fa328f3c3d24c13861 | emailmgr/urls.py | emailmgr/urls.py | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
from views import email_add, email_list, email_delete, \
email_send_activation, email_activate, email_make_primary
#add an email to a User account
urlpatterns = patterns('',
url(
... | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from django.conf import settings
from views import email_add, email_list, email_delete, \
email_send_activation, email_activate, email_make_primary
#add an email to a User account
urlpatterns = patterns('',
url(
r'^emai... | Fix import for django 1.6 | Fix import for django 1.6 | Python | bsd-3-clause | un33k/django-emailmgr,un33k/django-emailmgr | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
from views import email_add, email_list, email_delete, \
email_send_activation, email_activate, email_make_primary
#add an email to a User account
urlpatterns = patterns('',
url(
... | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from django.conf import settings
from views import email_add, email_list, email_delete, \
email_send_activation, email_activate, email_make_primary
#add an email to a User account
urlpatterns = patterns('',
url(
r'^emai... | <commit_before># -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
from views import email_add, email_list, email_delete, \
email_send_activation, email_activate, email_make_primary
#add an email to a User account
urlpatterns = patterns('',
... | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from django.conf import settings
from views import email_add, email_list, email_delete, \
email_send_activation, email_activate, email_make_primary
#add an email to a User account
urlpatterns = patterns('',
url(
r'^emai... | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
from views import email_add, email_list, email_delete, \
email_send_activation, email_activate, email_make_primary
#add an email to a User account
urlpatterns = patterns('',
url(
... | <commit_before># -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
from views import email_add, email_list, email_delete, \
email_send_activation, email_activate, email_make_primary
#add an email to a User account
urlpatterns = patterns('',
... |
aa15e9195c6e16ec000338e71051f64a692642e0 | nightreads/user_manager/forms.py | nightreads/user_manager/forms.py | from django.contrib.auth.models import User
from django import forms
class SubscribeForm(forms.Form):
email = forms.EmailField()
tags = forms.CharField()
def clean_tags(self):
tags = self.cleaned_data['tags'].split(',')
return [t.strip().lower() for t in tags]
class UnsubscribeForm(form... | from django.contrib.auth.models import User
from django.core.signing import BadSignature, SignatureExpired
from django import forms
from . import user_service
class SubscribeForm(forms.Form):
email = forms.EmailField()
tags = forms.CharField()
def clean_tags(self):
tags = self.cleaned_data['tags... | Update `ConfirmEmailForm` to use `user_service.validate_key` | Update `ConfirmEmailForm` to use `user_service.validate_key`
| Python | mit | avinassh/nightreads,avinassh/nightreads | from django.contrib.auth.models import User
from django import forms
class SubscribeForm(forms.Form):
email = forms.EmailField()
tags = forms.CharField()
def clean_tags(self):
tags = self.cleaned_data['tags'].split(',')
return [t.strip().lower() for t in tags]
class UnsubscribeForm(form... | from django.contrib.auth.models import User
from django.core.signing import BadSignature, SignatureExpired
from django import forms
from . import user_service
class SubscribeForm(forms.Form):
email = forms.EmailField()
tags = forms.CharField()
def clean_tags(self):
tags = self.cleaned_data['tags... | <commit_before>from django.contrib.auth.models import User
from django import forms
class SubscribeForm(forms.Form):
email = forms.EmailField()
tags = forms.CharField()
def clean_tags(self):
tags = self.cleaned_data['tags'].split(',')
return [t.strip().lower() for t in tags]
class Unsub... | from django.contrib.auth.models import User
from django.core.signing import BadSignature, SignatureExpired
from django import forms
from . import user_service
class SubscribeForm(forms.Form):
email = forms.EmailField()
tags = forms.CharField()
def clean_tags(self):
tags = self.cleaned_data['tags... | from django.contrib.auth.models import User
from django import forms
class SubscribeForm(forms.Form):
email = forms.EmailField()
tags = forms.CharField()
def clean_tags(self):
tags = self.cleaned_data['tags'].split(',')
return [t.strip().lower() for t in tags]
class UnsubscribeForm(form... | <commit_before>from django.contrib.auth.models import User
from django import forms
class SubscribeForm(forms.Form):
email = forms.EmailField()
tags = forms.CharField()
def clean_tags(self):
tags = self.cleaned_data['tags'].split(',')
return [t.strip().lower() for t in tags]
class Unsub... |
d3356d42aa083ecebf53bb7792a573ed2289173b | unityparser/csharp/csharp_class_body_parser.py | unityparser/csharp/csharp_class_body_parser.py | import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
from csharp_element import CSharpElement
import csharp_class_method_parser
import csharp_class_member_parser
import csharp_class... | import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
from csharp_element import CSharpElement
import csharp_class_method_parser
import csharp_class_member_parser
# import csharp_cla... | Comment out property parser due to commit mistake | Comment out property parser due to commit mistake
| Python | mit | adrianogil/SublimeUnityIntel | import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
from csharp_element import CSharpElement
import csharp_class_method_parser
import csharp_class_member_parser
import csharp_class... | import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
from csharp_element import CSharpElement
import csharp_class_method_parser
import csharp_class_member_parser
# import csharp_cla... | <commit_before>import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
from csharp_element import CSharpElement
import csharp_class_method_parser
import csharp_class_member_parser
impo... | import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
from csharp_element import CSharpElement
import csharp_class_method_parser
import csharp_class_member_parser
# import csharp_cla... | import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
from csharp_element import CSharpElement
import csharp_class_method_parser
import csharp_class_member_parser
import csharp_class... | <commit_before>import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
from csharp_element import CSharpElement
import csharp_class_method_parser
import csharp_class_member_parser
impo... |
8f226fffd17b9d89d916ad4a1c42d43afc1f0634 | minitrue/utils.py | minitrue/utils.py | """
Generically useful utilities.
"""
import urlparse
try: # pragma: no cover
from cStringIO import StringIO; StringIO
except ImportError:
from StringIO import StringIO; StringIO
class Constructor(object):
def __init__(self):
self.kw = {}
def kwarg(self, kwargName=None):
"""
... | """
Generically useful utilities.
"""
import urlparse
from twisted.internet import defer
from twisted.python import log
try: # pragma: no cover
from cStringIO import StringIO; StringIO
except ImportError:
from StringIO import StringIO; StringIO
class Constructor(object):
def __init__(self):
self... | Support for deferred-returning manglers for Combined. Added OrderedCombined that guarantees order of execution. | Support for deferred-returning manglers for Combined. Added OrderedCombined that guarantees order of execution.
| Python | isc | lvh/minitrue | """
Generically useful utilities.
"""
import urlparse
try: # pragma: no cover
from cStringIO import StringIO; StringIO
except ImportError:
from StringIO import StringIO; StringIO
class Constructor(object):
def __init__(self):
self.kw = {}
def kwarg(self, kwargName=None):
"""
... | """
Generically useful utilities.
"""
import urlparse
from twisted.internet import defer
from twisted.python import log
try: # pragma: no cover
from cStringIO import StringIO; StringIO
except ImportError:
from StringIO import StringIO; StringIO
class Constructor(object):
def __init__(self):
self... | <commit_before>"""
Generically useful utilities.
"""
import urlparse
try: # pragma: no cover
from cStringIO import StringIO; StringIO
except ImportError:
from StringIO import StringIO; StringIO
class Constructor(object):
def __init__(self):
self.kw = {}
def kwarg(self, kwargName=None):
... | """
Generically useful utilities.
"""
import urlparse
from twisted.internet import defer
from twisted.python import log
try: # pragma: no cover
from cStringIO import StringIO; StringIO
except ImportError:
from StringIO import StringIO; StringIO
class Constructor(object):
def __init__(self):
self... | """
Generically useful utilities.
"""
import urlparse
try: # pragma: no cover
from cStringIO import StringIO; StringIO
except ImportError:
from StringIO import StringIO; StringIO
class Constructor(object):
def __init__(self):
self.kw = {}
def kwarg(self, kwargName=None):
"""
... | <commit_before>"""
Generically useful utilities.
"""
import urlparse
try: # pragma: no cover
from cStringIO import StringIO; StringIO
except ImportError:
from StringIO import StringIO; StringIO
class Constructor(object):
def __init__(self):
self.kw = {}
def kwarg(self, kwargName=None):
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.