Search is not available for this dataset
id stringlengths 1 8 | text stringlengths 72 9.81M | addition_count int64 0 10k | commit_subject stringlengths 0 3.7k | deletion_count int64 0 8.43k | file_extension stringlengths 0 32 | lang stringlengths 1 94 | license stringclasses 10
values | repo_name stringlengths 9 59 |
|---|---|---|---|---|---|---|---|---|
1600 | <NME> pool.py
<BEF> """
Connection Pooling
"""
import datetime
import logging
import os
import threading
import time
import weakref
import psycopg2
LOGGER = logging.getLogger(__name__)
DEFAULT_IDLE_TTL = 60
DEFAULT_MAX_SIZE = int(os.environ.get('QUERIES_MAX_POOL_SIZE', 1))
class Connection(object):
"""Contain... | 1 | queries.pool: Iterate over connection.keys() in close method. | 1 | .py | py | bsd-3-clause | gmr/queries |
1601 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Bump the version | 1 | .py | py | bsd-3-clause | gmr/queries |
1602 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Bump the version | 1 | .py | py | bsd-3-clause | gmr/queries |
1603 | <NME> tests.py
<BEF> ADDFILE
<MSG> Initial tests adding coverage of connection caching
<DFF> @@ -0,0 +1,84 @@
+"""
+Tests for the pgsql_wrapper module
+
+"""
+import mock
+import time
+
+try:
+ import unittest2
+except ImportError:
+ import unittest
+
+import pgsql_wrapper
+
+
+class ConnectionCachingTests(unitt... | 84 | Initial tests adding coverage of connection caching | 0 | .py | py | bsd-3-clause | gmr/queries |
1604 | <NME> tests.py
<BEF> ADDFILE
<MSG> Initial tests adding coverage of connection caching
<DFF> @@ -0,0 +1,84 @@
+"""
+Tests for the pgsql_wrapper module
+
+"""
+import mock
+import time
+
+try:
+ import unittest2
+except ImportError:
+ import unittest
+
+import pgsql_wrapper
+
+
+class ConnectionCachingTests(unitt... | 84 | Initial tests adding coverage of connection caching | 0 | .py | py | bsd-3-clause | gmr/queries |
1605 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 0 | No need to wrap _exec_cleanup with @gen.engine | 2 | .py | py | bsd-3-clause | gmr/queries |
1606 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 0 | No need to wrap _exec_cleanup with @gen.engine | 2 | .py | py | bsd-3-clause | gmr/queries |
1607 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 1 | Fix the code block | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1608 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 1 | Fix the code block | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1609 | <NME> index.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
|Version| |Downloads|
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often... | 15 | Update docs and badges with new info | 9 | .rst | rst | bsd-3-clause | gmr/queries |
1610 | <NME> index.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
|Version| |Downloads|
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often... | 15 | Update docs and badges with new info | 9 | .rst | rst | bsd-3-clause | gmr/queries |
1611 | <NME> utils_tests.py
<BEF> """
Tests for functionality in the utils module
"""
import platform
import unittest
import mock
import queries
from queries import utils
class GetCurrentUserTests(unittest.TestCase):
@mock.patch('pwd.getpwuid')
def test_get_current_user(self, getpwuid):
"""get_current_us... | 4 | Add unquoting of URL characters in the password | 3 | .py | py | bsd-3-clause | gmr/queries |
1612 | <NME> utils_tests.py
<BEF> """
Tests for functionality in the utils module
"""
import platform
import unittest
import mock
import queries
from queries import utils
class GetCurrentUserTests(unittest.TestCase):
@mock.patch('pwd.getpwuid')
def test_get_current_user(self, getpwuid):
"""get_current_us... | 4 | Add unquoting of URL characters in the password | 3 | .py | py | bsd-3-clause | gmr/queries |
1613 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<2.9']
else:
install_requires = ['psycopg2>=2.5.1,<2.9']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOC... | 2 | Adjust psycopg2 constraint to allow 2.9.x | 2 | .py | py | bsd-3-clause | gmr/queries |
1614 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<2.9']
else:
install_requires = ['psycopg2>=2.5.1,<2.9']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOC... | 2 | Adjust psycopg2 constraint to allow 2.9.x | 2 | .py | py | bsd-3-clause | gmr/queries |
1615 | <NME> session_tests.py
<BEF> """
Tests for functionality in the session module
"""
import hashlib
import logging
import unittest
import mock
from psycopg2 import extras
import psycopg2
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, results, session, utils
LOGGER = logging.getLo... | 9 | Remove JSON support due to psycopg2ct not supporting it, update tests | 23 | .py | py | bsd-3-clause | gmr/queries |
1616 | <NME> session_tests.py
<BEF> """
Tests for functionality in the session module
"""
import hashlib
import logging
import unittest
import mock
from psycopg2 import extras
import psycopg2
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, results, session, utils
LOGGER = logging.getLo... | 9 | Remove JSON support due to psycopg2ct not supporting it, update tests | 23 | .py | py | bsd-3-clause | gmr/queries |
1617 | <NME> .travis.yml
<BEF> sudo: false
language: python
python:
- 2.6
- 2.7
- pypy
- 3.3
- 3.4
- 3.5
services:
- postgresql
install:
- pip install -r test-requirements.txt
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi
- python setup.py develop
script: nosetests
after_succes... | 58 | Setup combined coverage in travis | 22 | .yml | travis | bsd-3-clause | gmr/queries |
1618 | <NME> .travis.yml
<BEF> sudo: false
language: python
python:
- 2.6
- 2.7
- pypy
- 3.3
- 3.4
- 3.5
services:
- postgresql
install:
- pip install -r test-requirements.txt
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi
- python setup.py develop
script: nosetests
after_succes... | 58 | Setup combined coverage in travis | 22 | .yml | travis | bsd-3-clause | gmr/queries |
1619 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 6 | Log a warning when a result is leaked. | 0 | .py | py | bsd-3-clause | gmr/queries |
1620 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 6 | Log a warning when a result is leaked. | 0 | .py | py | bsd-3-clause | gmr/queries |
1621 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Add 3.4 to the trove classifiers | 0 | .py | py | bsd-3-clause | gmr/queries |
1622 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Add 3.4 to the trove classifiers | 0 | .py | py | bsd-3-clause | gmr/queries |
1623 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import unittest
import mock
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, tornado_session
from psycopg2 import extras
from tornado import concurrent, gen, ioloop, testing
class... | 2 | Catch bare exception in test | 2 | .py | py | bsd-3-clause | gmr/queries |
1624 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import unittest
import mock
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, tornado_session
from psycopg2 import extras
from tornado import concurrent, gen, ioloop, testing
class... | 2 | Catch bare exception in test | 2 | .py | py | bsd-3-clause | gmr/queries |
1625 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 1 | Remove non-working codeclimate badge | 4 | .rst | rst | bsd-3-clause | gmr/queries |
1626 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 1 | Remove non-working codeclimate badge | 4 | .rst | rst | bsd-3-clause | gmr/queries |
1627 | <NME> pool_tests.py
<BEF> """
Tests for functionality in the pool module
"""
import time
import unittest
import uuid
except ImportError:
import unittest
import uuid
import weakref
from queries import pool
def mock_connection():
conn = mock.MagicMock('psycopg2.extensions.connection')
conn.close = mock.M... | 0 | Fix typo, remove unused import | 1 | .py | py | bsd-3-clause | gmr/queries |
1628 | <NME> pool_tests.py
<BEF> """
Tests for functionality in the pool module
"""
import time
import unittest
import uuid
except ImportError:
import unittest
import uuid
import weakref
from queries import pool
def mock_connection():
conn = mock.MagicMock('psycopg2.extensions.connection')
conn.close = mock.M... | 0 | Fix typo, remove unused import | 1 | .py | py | bsd-3-clause | gmr/queries |
1629 | <NME> history.rst
<BEF> Version History
===============
2.0.0 2018-01-29
-----------------
- REMOVED support for Python 2.6
- FIXED CPU Pegging bug: Cleanup IOLoop and internal stack in ``TornadoSession``
on connection error. In the case of a connection error, the failure to do this
caused CPU to peg @ 100% ut... | 3 | Fix version history formatting | 9 | .rst | rst | bsd-3-clause | gmr/queries |
1630 | <NME> history.rst
<BEF> Version History
===============
2.0.0 2018-01-29
-----------------
- REMOVED support for Python 2.6
- FIXED CPU Pegging bug: Cleanup IOLoop and internal stack in ``TornadoSession``
on connection error. In the case of a connection error, the failure to do this
caused CPU to peg @ 100% ut... | 3 | Fix version history formatting | 9 | .rst | rst | bsd-3-clause | gmr/queries |
1631 | <NME> pool.py
<BEF> """
Connection Pooling
"""
import datetime
import logging
import os
import threading
import time
import weakref
import psycopg2
LOGGER = logging.getLogger(__name__)
DEFAULT_IDLE_TTL = 60
DEFAULT_MAX_SIZE = int(os.environ.get('QUERIES_MAX_POOL_SIZE', 1))
class Connection(object):
"""Contain... | 6 | Fix property iterators | 6 | .py | py | bsd-3-clause | gmr/queries |
1632 | <NME> pool.py
<BEF> """
Connection Pooling
"""
import datetime
import logging
import os
import threading
import time
import weakref
import psycopg2
LOGGER = logging.getLogger(__name__)
DEFAULT_IDLE_TTL = 60
DEFAULT_MAX_SIZE = int(os.environ.get('QUERIES_MAX_POOL_SIZE', 1))
class Connection(object):
"""Contain... | 6 | Fix property iterators | 6 | .py | py | bsd-3-clause | gmr/queries |
1633 | <NME> .travis.yml
<BEF> sudo: false
language: python
dist: xenial
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- secure: "inURdx4ldkJqQXL1TyvKImC3EnL5TixC1DlNMBYi5ttygwAk+mSSSw8Yc7klB6D1m6q79xUlHRk06vbz23CsXTM4AClC5Emrk6XN2GlUKl5WI+z+A2skI59buEhLWe7e2KzhB/AVx2E3TfKa0oY7raM0UUnaOkpV... | 7 | Update the travis notification webhooks for gitter | 0 | .yml | travis | bsd-3-clause | gmr/queries |
1634 | <NME> .travis.yml
<BEF> sudo: false
language: python
dist: xenial
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- secure: "inURdx4ldkJqQXL1TyvKImC3EnL5TixC1DlNMBYi5ttygwAk+mSSSw8Yc7klB6D1m6q79xUlHRk06vbz23CsXTM4AClC5Emrk6XN2GlUKl5WI+z+A2skI59buEhLWe7e2KzhB/AVx2E3TfKa0oY7raM0UUnaOkpV... | 7 | Update the travis notification webhooks for gitter | 0 | .yml | travis | bsd-3-clause | gmr/queries |
1635 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Bump the rev | 1 | .py | py | bsd-3-clause | gmr/queries |
1636 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Bump the rev | 1 | .py | py | bsd-3-clause | gmr/queries |
1637 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 10 | Ensure the pool exists when executing a query | 6 | .py | py | bsd-3-clause | gmr/queries |
1638 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 10 | Ensure the pool exists when executing a query | 6 | .py | py | bsd-3-clause | gmr/queries |
1639 | <NME> .travis.yml
<BEF> sudo: false
cache:
directories:
- $HOME/.pip-cache/
language: python
python:
- 2.6
env:
global:
- 3.3
- 3.4
- 3.5
addons:
postgresql: '9.3'
install:
- pip install -r test-requirements.txt
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2 --download-cach... | 3 | Update Travis config | 13 | .yml | travis | bsd-3-clause | gmr/queries |
1640 | <NME> .travis.yml
<BEF> sudo: false
cache:
directories:
- $HOME/.pip-cache/
language: python
python:
- 2.6
env:
global:
- 3.3
- 3.4
- 3.5
addons:
postgresql: '9.3'
install:
- pip install -r test-requirements.txt
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2 --download-cach... | 3 | Update Travis config | 13 | .yml | travis | bsd-3-clause | gmr/queries |
1641 | <NME> .gitignore
<BEF> .DS_Store
.idea
*.pyc
build
dist
*.egg-info
atlassian-ide-plugin.xml
docs/_build
.coverage
<MSG> Ignore virtualenv dir
<DFF> @@ -7,3 +7,4 @@ dist
atlassian-ide-plugin.xml
docs/_build
.coverage
+env
| 1 | Ignore virtualenv dir | 0 | gitignore | bsd-3-clause | gmr/queries | |
1642 | <NME> .gitignore
<BEF> .DS_Store
.idea
*.pyc
build
dist
*.egg-info
atlassian-ide-plugin.xml
docs/_build
.coverage
<MSG> Ignore virtualenv dir
<DFF> @@ -7,3 +7,4 @@ dist
atlassian-ide-plugin.xml
docs/_build
.coverage
+env
| 1 | Ignore virtualenv dir | 0 | gitignore | bsd-3-clause | gmr/queries | |
1643 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 4 | Dont close when cleaning up (all the time) — add counters | 3 | .py | py | bsd-3-clause | gmr/queries |
1644 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 4 | Dont close when cleaning up (all the time) — add counters | 3 | .py | py | bsd-3-clause | gmr/queries |
1645 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Update history and version for release of 1.7.0 | 1 | .py | py | bsd-3-clause | gmr/queries |
1646 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Update history and version for release of 1.7.0 | 1 | .py | py | bsd-3-clause | gmr/queries |
1647 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import unittest
import mock
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, tornado_session
from psycopg2 import extras
from tornado import concurrent, gen, ioloop, testing
class... | 50 | Add additional TornadoSession tests | 30 | .py | py | bsd-3-clause | gmr/queries |
1648 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import unittest
import mock
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, tornado_session
from psycopg2 import extras
from tornado import concurrent, gen, ioloop, testing
class... | 50 | Add additional TornadoSession tests | 30 | .py | py | bsd-3-clause | gmr/queries |
1649 | <NME> results.py
<BEF> """
query or callproc Results
"""
import logging
import psycopg2
LOGGER = logging.getLogger(__name__)
class Results(object):
"""The :py:class:`Results` class contains the results returned from
:py:meth:`Session.query <queries.Session.query>` and
:py:meth:`Session.callproc <queries... | 4 | Merge pull request #31 from nvllsvm/iterfix | 6 | .py | py | bsd-3-clause | gmr/queries |
1650 | <NME> results.py
<BEF> """
query or callproc Results
"""
import logging
import psycopg2
LOGGER = logging.getLogger(__name__)
class Results(object):
"""The :py:class:`Results` class contains the results returned from
:py:meth:`Session.query <queries.Session.query>` and
:py:meth:`Session.callproc <queries... | 4 | Merge pull request #31 from nvllsvm/iterfix | 6 | .py | py | bsd-3-clause | gmr/queries |
1651 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import unittest
import mock
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, tornado_session
from psycopg2 import extras
from tornado import concurrent, gen, ioloop, testing
class... | 38 | Add additional test coverage | 0 | .py | py | bsd-3-clause | gmr/queries |
1652 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import unittest
import mock
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, tornado_session
from psycopg2 import extras
from tornado import concurrent, gen, ioloop, testing
class... | 38 | Add additional test coverage | 0 | .py | py | bsd-3-clause | gmr/queries |
1653 | <NME> session_tests.py
<BEF> """
Tests for functionality in the session module
"""
import hashlib
import logging
import unittest
import mock
from psycopg2 import extras
import psycopg2
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, results, session, utils
LOGGER = logging.getLo... | 26 | Fix tests | 12 | .py | py | bsd-3-clause | gmr/queries |
1654 | <NME> session_tests.py
<BEF> """
Tests for functionality in the session module
"""
import hashlib
import logging
import unittest
import mock
from psycopg2 import extras
import psycopg2
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, results, session, utils
LOGGER = logging.getLo... | 26 | Fix tests | 12 | .py | py | bsd-3-clause | gmr/queries |
1655 | <NME> session.rst
<BEF> .. py:module:: queries.session
Session API
===========
The Session class allows for a unified (and simplified) view of interfacing with
a PostgreSQL database server.
Connection details are passed in as a PostgreSQL URI and connections are pooled
by default, allowing for reuse of connections ac... | 1 | These are @property methods, set to :py:attr: | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1656 | <NME> session.rst
<BEF> .. py:module:: queries.session
Session API
===========
The Session class allows for a unified (and simplified) view of interfacing with
a PostgreSQL database server.
Connection details are passed in as a PostgreSQL URI and connections are pooled
by default, allowing for reuse of connections ac... | 1 | These are @property methods, set to :py:attr: | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1657 | <NME> __init__.py
<BEF> """
Queries: PostgreSQL database access simplified
Queries is an opinionated wrapper for interfacing with PostgreSQL that offers
caching of connections and support for PyPy via psycopg2ct.
The core `queries.Queries` class will automatically register support for UUIDs,
Unicode and Unicode array... | 3 | Add a few things to ignore coverage checking for | 3 | .py | py | bsd-3-clause | gmr/queries |
1658 | <NME> __init__.py
<BEF> """
Queries: PostgreSQL database access simplified
Queries is an opinionated wrapper for interfacing with PostgreSQL that offers
caching of connections and support for PyPy via psycopg2ct.
The core `queries.Queries` class will automatically register support for UUIDs,
Unicode and Unicode array... | 3 | Add a few things to ignore coverage checking for | 3 | .py | py | bsd-3-clause | gmr/queries |
1659 | <NME> utils.py
<BEF> """
Utility functions for access to OS level info and URI parsing
"""
import collections
import getpass
import logging
import os
import platform
# All systems do not support pwd module
try:
import pwd
except ImportError:
pwd = None
# Python 2 & 3 compatibility
try:
from urllib import... | 9 | Fix query parameters parsing in Python 2.6 | 2 | .py | py | bsd-3-clause | gmr/queries |
1660 | <NME> utils.py
<BEF> """
Utility functions for access to OS level info and URI parsing
"""
import collections
import getpass
import logging
import os
import platform
# All systems do not support pwd module
try:
import pwd
except ImportError:
pwd = None
# Python 2 & 3 compatibility
try:
from urllib import... | 9 | Fix query parameters parsing in Python 2.6 | 2 | .py | py | bsd-3-clause | gmr/queries |
1661 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 1 | Update tornado_session.py | 1 | .py | py | bsd-3-clause | gmr/queries |
1662 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 1 | Update tornado_session.py | 1 | .py | py | bsd-3-clause | gmr/queries |
1663 | <NME> simple-tornado.py
<BEF> import logging
import queries
from tornado import gen, ioloop, web
class ExampleHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession()
@gen.coroutine
def get(self):
try:
result = yield self.session.query('SELEC... | 25 | Add more functionality to the example | 9 | .py | py | bsd-3-clause | gmr/queries |
1664 | <NME> simple-tornado.py
<BEF> import logging
import queries
from tornado import gen, ioloop, web
class ExampleHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession()
@gen.coroutine
def get(self):
try:
result = yield self.session.query('SELEC... | 25 | Add more functionality to the example | 9 | .py | py | bsd-3-clause | gmr/queries |
1665 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Bump the revision | 1 | .py | py | bsd-3-clause | gmr/queries |
1666 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Bump the revision | 1 | .py | py | bsd-3-clause | gmr/queries |
1667 | <NME> integration_tests.py
<BEF> import datetime
try:
import unittest2 as unittest
except ImportError:
import unittest
import queries
from tornado import testing
class SessionIntegrationTests(unittest.TestCase):
def setUp(self):
uri = queries.uri('localhost', 5432, 'postgres', 'postgres')
... | 24 | Refactor integration test structure for local docker | 16 | .py | py | bsd-3-clause | gmr/queries |
1668 | <NME> integration_tests.py
<BEF> import datetime
try:
import unittest2 as unittest
except ImportError:
import unittest
import queries
from tornado import testing
class SessionIntegrationTests(unittest.TestCase):
def setUp(self):
uri = queries.uri('localhost', 5432, 'postgres', 'postgres')
... | 24 | Refactor integration test structure for local docker | 16 | .py | py | bsd-3-clause | gmr/queries |
1669 | <NME> .travis.yml
<BEF> sudo: false
language: python
dist: xenial
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- 3.4
install:
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install -r requirements.txt; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip instal... | 6 | Update requirements installation for travis | 6 | .yml | travis | bsd-3-clause | gmr/queries |
1670 | <NME> .travis.yml
<BEF> sudo: false
language: python
dist: xenial
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- 3.4
install:
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install -r requirements.txt; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip instal... | 6 | Update requirements installation for travis | 6 | .yml | travis | bsd-3-clause | gmr/queries |
1671 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import mock
import unittest
from psycopg2 import extras
from tornado import concurrent
from tornado import gen
class ResultsTests(unittest.TestCase):
def setUp(self):
self.cursor = mock.Mock()
sel... | 4 | Conditional psycopg2cffi import for pypy3 | 1 | .py | py | bsd-3-clause | gmr/queries |
1672 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import mock
import unittest
from psycopg2 import extras
from tornado import concurrent
from tornado import gen
class ResultsTests(unittest.TestCase):
def setUp(self):
self.cursor = mock.Mock()
sel... | 4 | Conditional psycopg2cffi import for pypy3 | 1 | .py | py | bsd-3-clause | gmr/queries |
1673 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Merge pull request #10 from djt5019/fix-env-var | 1 | .py | py | bsd-3-clause | gmr/queries |
1674 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Merge pull request #10 from djt5019/fix-env-var | 1 | .py | py | bsd-3-clause | gmr/queries |
1675 | <NME> integration_tests.py
<BEF> import datetime
import os
import unittest
from tornado import gen, testing
import queries
class URIMixin(object):
@property
def pg_uri(self):
return queries.uri(os.getenv('PGHOST', 'localhost'),
int(os.getenv('PGPORT', '5432')), 'postgres'... | 23 | Cleanup and fix related to errors connection errors (#28) | 0 | .py | py | bsd-3-clause | gmr/queries |
1676 | <NME> integration_tests.py
<BEF> import datetime
import os
import unittest
from tornado import gen, testing
import queries
class URIMixin(object):
@property
def pg_uri(self):
return queries.uri(os.getenv('PGHOST', 'localhost'),
int(os.getenv('PGPORT', '5432')), 'postgres'... | 23 | Cleanup and fix related to errors connection errors (#28) | 0 | .py | py | bsd-3-clause | gmr/queries |
1677 | <NME> RedisSessionDAOTest.java
<BEF> package org.crazycake.shiro;
import org.apache.shiro.session.InvalidSessionException;
import org.apache.shiro.session.Session;
import org.crazycake.shiro.exception.SerializationException;
import org.crazycake.shiro.serializer.ObjectSerializer;
import org.crazycake.shiro.serializer.... | 2 | 2.8.0 release: 1. Add Redis Sentinel support 2. Using Scan to get keys 3. Some refactor | 2 | .java | java | mit | alexxiyang/shiro-redis |
1678 | <NME> RedisCacheTest.java
<BEF> package org.crazycake.shiro;
import org.apache.shiro.subject.PrincipalCollection;
import org.crazycake.shiro.exception.SerializationException;
import org.crazycake.shiro.serializer.ObjectSerializer;
import org.crazycake.shiro.serializer.StringSerializer;
import org.junit.jupiter.api.Ass... | 4 | Fix RedisCache keyprefix cannot be changed defect Set separate expire time of Session and Cache instead of only one expire time of RedisManager | 6 | .java | java | mit | alexxiyang/shiro-redis |
1679 | <NME> tested_on.rst
<BEF> Tested on
=========
Working on
----------
This is an list of environments that Hitch is tested on
and been found to work. If you use one of these environments
and you discover a problem, that's a bug. Please raise an issue.
OSes:
* Ubuntu 14.04
* Mac OS X Mavericks
* Mac OS X Yosemite
* De... | 3 | DOCS : Updated long out of date 'tested on' docs. | 4 | .rst | rst | agpl-3.0 | hitchtest/hitch |
1680 | <NME> README.md
<BEF> shiro-redis
=============
[](https://travis-ci.org/alexxiyang/shiro-redis)
shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help ... | 1 | Add Maven badge | 1 | .md | md | mit | alexxiyang/shiro-redis |
1681 | <NME> RedisSessionDAOTest.java
<BEF> package org.crazycake.shiro;
import org.apache.shiro.session.InvalidSessionException;
import org.apache.shiro.session.Session;
import org.crazycake.shiro.exception.SerializationException;
import org.crazycake.shiro.serializer.ObjectSerializer;
import org.crazycake.shiro.serializer.... | 12 | 1. Include sessionInMemory update in sessionDAO.doUpdate 2. Add sessionInMemoryEnabled to turn on/off sessionInMemory | 0 | .java | java | mit | alexxiyang/shiro-redis |
1682 | <NME> hitchmysql.rst
<BEF> HitchMySQL
==========
.. note::
This documentation applies to the latest version of hitchmysql.
HitchMySQL is a :doc:`/glossary/hitch_plugin` created to make testing applications that use MySQL easier.
It contains:
* A :doc:`/glossary/hitch_package` to download and install specified ... | 1 | DOCS : Fixed errant reference to Postgres -- https://github.com/hitchtest/hitchmysql/issues/1 (hat tip @kevindixon) | 1 | .rst | rst | agpl-3.0 | hitchtest/hitch |
1683 | <NME> RedisSentinelManager.java
<BEF> package org.crazycake.shiro;
import org.crazycake.shiro.common.WorkAloneRedisManager;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisSentinelPool;
import redis.clients.jedis.Protocol;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;... | 1 | Merge branch 'master' of github.com:alexxiyang/shiro-redis | 1 | .java | java | mit | alexxiyang/shiro-redis |
1684 | <NME> dense_concat_op.cc
<BEF> ADDFILE
<MSG> add custom concat op for densenet
<DFF> @@ -0,0 +1,81 @@
+#include "operators/vision/dense_concat_op.h"
+#include "core/workspace.h"
+#include "utils/op_kernel.h"
+
+namespace dragon {
+
+template <class Context>
+void DenseConcatOp<Context>::RunOnDevice() {
+ ConcatOp<C... | 81 | add custom concat op for densenet | 0 | .cc | cc | bsd-2-clause | neopenx/Dragon |
1685 | <NME> dense_concat_op.cc
<BEF> ADDFILE
<MSG> add custom concat op for densenet
<DFF> @@ -0,0 +1,81 @@
+#include "operators/vision/dense_concat_op.h"
+#include "core/workspace.h"
+#include "utils/op_kernel.h"
+
+namespace dragon {
+
+template <class Context>
+void DenseConcatOp<Context>::RunOnDevice() {
+ ConcatOp<C... | 81 | add custom concat op for densenet | 0 | .cc | cc | bsd-2-clause | neopenx/Dragon |
1686 | <NME> RedisCacheTest.java
<BEF> package org.crazycake.shiro;
import org.apache.shiro.subject.PrincipalCollection;
import org.crazycake.shiro.exception.SerializationException;
import org.crazycake.shiro.serializer.ObjectSerializer;
import org.crazycake.shiro.serializer.StringSerializer;
import org.junit.jupiter.api.Ass... | 5 | Enhance unit test | 2 | .java | java | mit | alexxiyang/shiro-redis |
1687 | <NME> RedisCacheManager.java
<BEF> package org.crazycake.shiro;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;
import org.crazycake.shiro.serializer.ObjectSerializer;
import org.crazycake.shiro.serializer.RedisSerializer;
import org.crazyc... | 2 | Move cache key prefix to redisCacheManager | 1 | .java | java | mit | alexxiyang/shiro-redis |
1688 | <NME> README.md
<BEF> shiro-redis
=============
## Introduction
shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!
## Documentation
Official documentation [is located here](http://alexxiyang.github.io/shiro-redis/).
<dep... | 1 | Update README.md | 1 | .md | md | mit | alexxiyang/shiro-redis |
1689 | <NME> RedisCache.java
<BEF> package org.crazycake.shiro;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.util.CollectionUtils;
import org.crazycake.shiro.exception.CacheManagerPrincipalIdNotAssignedException... | 11 | Fix checkstyle error | 6 | .java | java | mit | alexxiyang/shiro-redis |
1690 | <NME> README.md
<BEF> shiro-redis
=============
## Introduction
shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!
## Documentation
Official documentation [is located here](http://alexxiyang.github.io/shiro-redis/).
## ... | 1 | Update README.md | 1 | .md | md | mit | alexxiyang/shiro-redis |
1691 | <NME> hitchnode.rst
<BEF> ADDFILE
<MSG> add doc for basic usage of hitchnode
<DFF> @@ -0,0 +1,59 @@
+HitchNode
+==========
+
+.. note::
+
+ This documentation applies to the latest version of hitchnode.
+
+HitchNode is a :doc:`/glossary/hitch_plugin` created to make testing applications that use Node easier.
+
+It ... | 59 | add doc for basic usage of hitchnode | 0 | .rst | rst | agpl-3.0 | hitchtest/hitch |
1692 | <NME> README.md
<BEF> shiro-redis
=============
## Introduction
shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!
## Documentation
Official documentation [is located here](http://alexxiyang.github.io/shiro-redis/).
## ... | 1 | Merge remote-tracking branch 'origin/master' | 1 | .md | md | mit | alexxiyang/shiro-redis |
1693 | <NME> RedisCacheTest.java
<BEF> package org.crazycake.shiro;
import org.apache.shiro.subject.PrincipalCollection;
import org.crazycake.shiro.exception.SerializationException;
import org.crazycake.shiro.serializer.ObjectSerializer;
import org.crazycake.shiro.serializer.StringSerializer;
import org.junit.jupiter.api.Ass... | 1 | Release 3.2.1. Add shiro-redis-spring-boot-starter. | 1 | .java | java | mit | alexxiyang/shiro-redis |
1694 | <NME> RedisSentinelManager.java
<BEF> package org.crazycake.shiro;
import org.crazycake.shiro.common.WorkAloneRedisManager;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisSentinelPool;
import redis.clients.jedis.Protocol;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;... | 2 | Merge branch 'master' of https://github.com/alexxiyang/shiro-redis | 2 | .java | java | mit | alexxiyang/shiro-redis |
1695 | <NME> README.md
<BEF> shiro-redis
=============
## Introduction
shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!
## Documentation
Official documentation [is located here](http://alexxiyang.github.io/shiro-redis/).
spr... | 23 | Add shiro-redis-spring-tutorial project | 26 | .md | md | mit | alexxiyang/shiro-redis |
1696 | <NME> README.md
<BEF> shiro-redis
=============
## Introduction
shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!
## Documentation
Official documentation [is located here](http://alexxiyang.github.io/shiro-redis/).
```... | 1 | Update README.md | 1 | .md | md | mit | alexxiyang/shiro-redis |
1697 | <NME> RedisSentinelManager.java
<BEF> package org.crazycake.shiro;
import org.crazycake.shiro.common.WorkAloneRedisManager;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisSentinelPool;
import redis.clients.jedis.Protocol;
import java.util.HashSet;
import java.util.Set;
public class RedisSentinelMa... | 1 | Change BaseRedisManager into WorkAloneRedisManager. Remove port from RedisManager. Remove AuthCachePrincipal | 1 | .java | java | mit | alexxiyang/shiro-redis |
1698 | <NME> README.md
<BEF> ADDFILE
<MSG> Add docs folder
<DFF> @@ -0,0 +1,435 @@
+shiro-redis
+=============
+
+[](https://travis-ci.org/alexxiyang/shiro-redis)
+
+
+shiro only provide the support of ehcache and concurrentHashMap. Here is an imp... | 435 | Add docs folder | 0 | .md | md | mit | alexxiyang/shiro-redis |
1699 | <NME> RedisSessionDAOTest.java
<BEF> package org.crazycake.shiro;
import org.apache.shiro.session.InvalidSessionException;
import org.apache.shiro.session.Session;
import org.crazycake.shiro.exception.SerializationException;
import org.crazycake.shiro.serializer.ObjectSerializer;
import org.crazycake.shiro.serializer.... | 2 | Merge branch 'master' of https://github.com/alexxiyang/shiro-redis | 2 | .java | java | mit | alexxiyang/shiro-redis |