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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bb59028a3dab81139a83f9a0eb8a4c58b9c25829 | sample_application/app.py | sample_application/app.py | import os
from flask import Blueprint, Flask
from flask import Flask, g
from views import blueprint, Resources, UnixTime, PrintArg, ExampleApiUsage
from flask.ext.restful import Api
from client import Client
def create_app():
api = Api(blueprint)
api.add_resource(Resources, '/resources')
api.add_resource(UnixTim... | import os
from flask import Blueprint, Flask
from flask import Flask, g
from views import blueprint, Resources, UnixTime, PrintArg, ExampleApiUsage
from flask.ext.restful import Api
from client import Client
def create_app():
api = Api(blueprint)
api.add_resource(Resources, '/resources')
api.add_resource(UnixTim... | Change config import strategy to config.from_pyfile() | Change config import strategy to config.from_pyfile()
| Python | mit | adsabs/adsabs-webservices-blueprint,jonnybazookatone/adsabs-webservices-blueprint | import os
from flask import Blueprint, Flask
from flask import Flask, g
from views import blueprint, Resources, UnixTime, PrintArg, ExampleApiUsage
from flask.ext.restful import Api
from client import Client
def create_app():
api = Api(blueprint)
api.add_resource(Resources, '/resources')
api.add_resource(UnixTim... | import os
from flask import Blueprint, Flask
from flask import Flask, g
from views import blueprint, Resources, UnixTime, PrintArg, ExampleApiUsage
from flask.ext.restful import Api
from client import Client
def create_app():
api = Api(blueprint)
api.add_resource(Resources, '/resources')
api.add_resource(UnixTim... | <commit_before>import os
from flask import Blueprint, Flask
from flask import Flask, g
from views import blueprint, Resources, UnixTime, PrintArg, ExampleApiUsage
from flask.ext.restful import Api
from client import Client
def create_app():
api = Api(blueprint)
api.add_resource(Resources, '/resources')
api.add_r... | import os
from flask import Blueprint, Flask
from flask import Flask, g
from views import blueprint, Resources, UnixTime, PrintArg, ExampleApiUsage
from flask.ext.restful import Api
from client import Client
def create_app():
api = Api(blueprint)
api.add_resource(Resources, '/resources')
api.add_resource(UnixTim... | import os
from flask import Blueprint, Flask
from flask import Flask, g
from views import blueprint, Resources, UnixTime, PrintArg, ExampleApiUsage
from flask.ext.restful import Api
from client import Client
def create_app():
api = Api(blueprint)
api.add_resource(Resources, '/resources')
api.add_resource(UnixTim... | <commit_before>import os
from flask import Blueprint, Flask
from flask import Flask, g
from views import blueprint, Resources, UnixTime, PrintArg, ExampleApiUsage
from flask.ext.restful import Api
from client import Client
def create_app():
api = Api(blueprint)
api.add_resource(Resources, '/resources')
api.add_r... |
20c8d494519b3d54bc3981aebdad18871deef3cb | src/sentry/auth/manager.py | src/sentry/auth/manager.py | from __future__ import absolute_import, print_function
__all__ = ['ProviderManager']
from .exceptions import ProviderNotRegistered
# Ideally this and PluginManager abstracted from the same base, but
# InstanceManager has become convulated and wasteful
class ProviderManager(object):
def __init__(self):
s... | from __future__ import absolute_import, print_function
__all__ = ['ProviderManager']
from .exceptions import ProviderNotRegistered
# Ideally this and PluginManager abstracted from the same base, but
# InstanceManager has become convulated and wasteful
class ProviderManager(object):
def __init__(self):
s... | Revert back to using key | Revert back to using key
| Python | bsd-3-clause | argonemyth/sentry,gencer/sentry,JamesMura/sentry,vperron/sentry,nicholasserra/sentry,alexm92/sentry,jokey2k/sentry,zenefits/sentry,jokey2k/sentry,zenefits/sentry,Kryz/sentry,llonchj/sentry,llonchj/sentry,daevaorn/sentry,zenefits/sentry,ewdurbin/sentry,TedaLIEz/sentry,boneyao/sentry,nicholasserra/sentry,felixbuenemann/s... | from __future__ import absolute_import, print_function
__all__ = ['ProviderManager']
from .exceptions import ProviderNotRegistered
# Ideally this and PluginManager abstracted from the same base, but
# InstanceManager has become convulated and wasteful
class ProviderManager(object):
def __init__(self):
s... | from __future__ import absolute_import, print_function
__all__ = ['ProviderManager']
from .exceptions import ProviderNotRegistered
# Ideally this and PluginManager abstracted from the same base, but
# InstanceManager has become convulated and wasteful
class ProviderManager(object):
def __init__(self):
s... | <commit_before>from __future__ import absolute_import, print_function
__all__ = ['ProviderManager']
from .exceptions import ProviderNotRegistered
# Ideally this and PluginManager abstracted from the same base, but
# InstanceManager has become convulated and wasteful
class ProviderManager(object):
def __init__(s... | from __future__ import absolute_import, print_function
__all__ = ['ProviderManager']
from .exceptions import ProviderNotRegistered
# Ideally this and PluginManager abstracted from the same base, but
# InstanceManager has become convulated and wasteful
class ProviderManager(object):
def __init__(self):
s... | from __future__ import absolute_import, print_function
__all__ = ['ProviderManager']
from .exceptions import ProviderNotRegistered
# Ideally this and PluginManager abstracted from the same base, but
# InstanceManager has become convulated and wasteful
class ProviderManager(object):
def __init__(self):
s... | <commit_before>from __future__ import absolute_import, print_function
__all__ = ['ProviderManager']
from .exceptions import ProviderNotRegistered
# Ideally this and PluginManager abstracted from the same base, but
# InstanceManager has become convulated and wasteful
class ProviderManager(object):
def __init__(s... |
2bf4aacbc2a43305506d2d16cef97c6c89c30ee9 | pythontutorials/books/AutomateTheBoringStuff/Ch13/P3_combinePDFs.py | pythontutorials/books/AutomateTheBoringStuff/Ch13/P3_combinePDFs.py | #! python3
"""Combine PDFs
Combines all the PDFs in the current working directory into a single PDF.
Note:
* Example PDFs can be downloaded from http://nostarch.com/automatestuff/
* Book uses PyPDF2; I'm an overachiever that uses PyPDF4
"""
def main():
import PyPDF4, os
# Get all the PDF filenames... | #! python3
"""Combine PDFs
Combines all the PDFs in the current working directory into a single PDF.
Note:
* Example PDFs can be downloaded from http://nostarch.com/automatestuff/
* Book uses :py:mod:`PyPDF2`; I'm an overachiever that uses PyPDF4
"""
def main():
import PyPDF4, os
# Get all the PDF... | Update P2_combinePDF.py added module reference in docstring | Update P2_combinePDF.py
added module reference in docstring
| Python | mit | JoseALermaIII/python-tutorials,JoseALermaIII/python-tutorials | #! python3
"""Combine PDFs
Combines all the PDFs in the current working directory into a single PDF.
Note:
* Example PDFs can be downloaded from http://nostarch.com/automatestuff/
* Book uses PyPDF2; I'm an overachiever that uses PyPDF4
"""
def main():
import PyPDF4, os
# Get all the PDF filenames... | #! python3
"""Combine PDFs
Combines all the PDFs in the current working directory into a single PDF.
Note:
* Example PDFs can be downloaded from http://nostarch.com/automatestuff/
* Book uses :py:mod:`PyPDF2`; I'm an overachiever that uses PyPDF4
"""
def main():
import PyPDF4, os
# Get all the PDF... | <commit_before>#! python3
"""Combine PDFs
Combines all the PDFs in the current working directory into a single PDF.
Note:
* Example PDFs can be downloaded from http://nostarch.com/automatestuff/
* Book uses PyPDF2; I'm an overachiever that uses PyPDF4
"""
def main():
import PyPDF4, os
# Get all th... | #! python3
"""Combine PDFs
Combines all the PDFs in the current working directory into a single PDF.
Note:
* Example PDFs can be downloaded from http://nostarch.com/automatestuff/
* Book uses :py:mod:`PyPDF2`; I'm an overachiever that uses PyPDF4
"""
def main():
import PyPDF4, os
# Get all the PDF... | #! python3
"""Combine PDFs
Combines all the PDFs in the current working directory into a single PDF.
Note:
* Example PDFs can be downloaded from http://nostarch.com/automatestuff/
* Book uses PyPDF2; I'm an overachiever that uses PyPDF4
"""
def main():
import PyPDF4, os
# Get all the PDF filenames... | <commit_before>#! python3
"""Combine PDFs
Combines all the PDFs in the current working directory into a single PDF.
Note:
* Example PDFs can be downloaded from http://nostarch.com/automatestuff/
* Book uses PyPDF2; I'm an overachiever that uses PyPDF4
"""
def main():
import PyPDF4, os
# Get all th... |
ce25cea7e8d10f9c318e2e7ef1dc1013921ed062 | clint/textui/prompt.py | clint/textui/prompt.py | # -*- coding: utf8 -*-
"""
clint.textui.prompt
~~~~~~~~~~~~~~~~~~~
Module for simple interactive prompts handling
"""
from __future__ import absolute_import
from re import match, I
def yn(prompt, default='y', batch=False):
# A sanity check against default value
# If not y/n then y is assumed
if defau... | # -*- coding: utf8 -*-
"""
clint.textui.prompt
~~~~~~~~~~~~~~~~~~~
Module for simple interactive prompts handling
"""
from __future__ import absolute_import, print_function
from re import match, I
def yn(prompt, default='y', batch=False):
# A sanity check against default value
# If not y/n then y is assum... | Use print() function to fix install on python 3 | Use print() function to fix install on python 3
clint 0.3.2 can't be installed on python 3.3 because of a print statement. | Python | isc | 1gitGrey/clint,thusoy/clint,wkentaro/clint,1gitGrey/clint,glorizen/clint,wkentaro/clint,tz70s/clint,Lh4cKg/clint,nathancahill/clint,kennethreitz/clint,nathancahill/clint | # -*- coding: utf8 -*-
"""
clint.textui.prompt
~~~~~~~~~~~~~~~~~~~
Module for simple interactive prompts handling
"""
from __future__ import absolute_import
from re import match, I
def yn(prompt, default='y', batch=False):
# A sanity check against default value
# If not y/n then y is assumed
if defau... | # -*- coding: utf8 -*-
"""
clint.textui.prompt
~~~~~~~~~~~~~~~~~~~
Module for simple interactive prompts handling
"""
from __future__ import absolute_import, print_function
from re import match, I
def yn(prompt, default='y', batch=False):
# A sanity check against default value
# If not y/n then y is assum... | <commit_before># -*- coding: utf8 -*-
"""
clint.textui.prompt
~~~~~~~~~~~~~~~~~~~
Module for simple interactive prompts handling
"""
from __future__ import absolute_import
from re import match, I
def yn(prompt, default='y', batch=False):
# A sanity check against default value
# If not y/n then y is assume... | # -*- coding: utf8 -*-
"""
clint.textui.prompt
~~~~~~~~~~~~~~~~~~~
Module for simple interactive prompts handling
"""
from __future__ import absolute_import, print_function
from re import match, I
def yn(prompt, default='y', batch=False):
# A sanity check against default value
# If not y/n then y is assum... | # -*- coding: utf8 -*-
"""
clint.textui.prompt
~~~~~~~~~~~~~~~~~~~
Module for simple interactive prompts handling
"""
from __future__ import absolute_import
from re import match, I
def yn(prompt, default='y', batch=False):
# A sanity check against default value
# If not y/n then y is assumed
if defau... | <commit_before># -*- coding: utf8 -*-
"""
clint.textui.prompt
~~~~~~~~~~~~~~~~~~~
Module for simple interactive prompts handling
"""
from __future__ import absolute_import
from re import match, I
def yn(prompt, default='y', batch=False):
# A sanity check against default value
# If not y/n then y is assume... |
9be4dcdf9ea312465a27d6f105213d88d8dd0909 | anchorhub/lib/tests/test_data/test_filetolist.py | anchorhub/lib/tests/test_data/test_filetolist.py | """
Tests for filetolist.py
filetolist.py:
http://www.github.com/samjabrahams/anchorhub/lib/filetolist.py
"""
from anchorhub.lib.filetolist import FileToList
from anchorhub.util.getanchorhubpath import get_anchorhub_path
from anchorhub.compatibility import get_path_separator
def test_file_to_list_basic():
sep = ... | """
Tests for filetolist.py
filetolist.py:
http://www.github.com/samjabrahams/anchorhub/lib/filetolist.py
"""
from anchorhub.lib.filetolist import FileToList
from anchorhub.util.getanchorhubpath import get_anchorhub_path
from anchorhub.compatibility import get_path_separator
def test_file_to_list_basic():
sep = ... | Add expression slash to perhaps fix python3 bug | Add expression slash to perhaps fix python3 bug
| Python | apache-2.0 | samjabrahams/anchorhub | """
Tests for filetolist.py
filetolist.py:
http://www.github.com/samjabrahams/anchorhub/lib/filetolist.py
"""
from anchorhub.lib.filetolist import FileToList
from anchorhub.util.getanchorhubpath import get_anchorhub_path
from anchorhub.compatibility import get_path_separator
def test_file_to_list_basic():
sep = ... | """
Tests for filetolist.py
filetolist.py:
http://www.github.com/samjabrahams/anchorhub/lib/filetolist.py
"""
from anchorhub.lib.filetolist import FileToList
from anchorhub.util.getanchorhubpath import get_anchorhub_path
from anchorhub.compatibility import get_path_separator
def test_file_to_list_basic():
sep = ... | <commit_before>"""
Tests for filetolist.py
filetolist.py:
http://www.github.com/samjabrahams/anchorhub/lib/filetolist.py
"""
from anchorhub.lib.filetolist import FileToList
from anchorhub.util.getanchorhubpath import get_anchorhub_path
from anchorhub.compatibility import get_path_separator
def test_file_to_list_basi... | """
Tests for filetolist.py
filetolist.py:
http://www.github.com/samjabrahams/anchorhub/lib/filetolist.py
"""
from anchorhub.lib.filetolist import FileToList
from anchorhub.util.getanchorhubpath import get_anchorhub_path
from anchorhub.compatibility import get_path_separator
def test_file_to_list_basic():
sep = ... | """
Tests for filetolist.py
filetolist.py:
http://www.github.com/samjabrahams/anchorhub/lib/filetolist.py
"""
from anchorhub.lib.filetolist import FileToList
from anchorhub.util.getanchorhubpath import get_anchorhub_path
from anchorhub.compatibility import get_path_separator
def test_file_to_list_basic():
sep = ... | <commit_before>"""
Tests for filetolist.py
filetolist.py:
http://www.github.com/samjabrahams/anchorhub/lib/filetolist.py
"""
from anchorhub.lib.filetolist import FileToList
from anchorhub.util.getanchorhubpath import get_anchorhub_path
from anchorhub.compatibility import get_path_separator
def test_file_to_list_basi... |
2b0f1c47a85c79c39e6066e0658c9b47090b46c4 | .ci-support/upload_label.py | .ci-support/upload_label.py | import os
travis_tag = os.getenv('TRAVIS_TAG')
appveyor_tag = os.getenv('APPVEYOR_REPO_TAG')
def generate_label(version):
dev_names = ['dev', 'alpha', 'beta', 'rc']
is_dev = any(name in version for name in dev_names)
# Output is the name of the label to which the package should be
# uploaded on ana... | import os
travis_tag = os.getenv('TRAVIS_TAG')
appveyor_tag = os.getenv('APPVEYOR_REPO_TAG_NAME')
def generate_label(version):
dev_names = ['dev', 'alpha', 'beta', 'rc']
is_dev = any(name in version for name in dev_names)
# Output is the name of the label to which the package should be
# uploaded o... | Fix name of environment variable on appveyor tht contains tag name | Fix name of environment variable on appveyor tht contains tag name | Python | mit | mwcraig/vpython-jupyter,mwcraig/vpython-jupyter,BruceSherwood/vpython-jupyter,BruceSherwood/vpython-jupyter,mwcraig/vpython-jupyter,BruceSherwood/vpython-jupyter,mwcraig/vpython-jupyter,BruceSherwood/vpython-jupyter | import os
travis_tag = os.getenv('TRAVIS_TAG')
appveyor_tag = os.getenv('APPVEYOR_REPO_TAG')
def generate_label(version):
dev_names = ['dev', 'alpha', 'beta', 'rc']
is_dev = any(name in version for name in dev_names)
# Output is the name of the label to which the package should be
# uploaded on ana... | import os
travis_tag = os.getenv('TRAVIS_TAG')
appveyor_tag = os.getenv('APPVEYOR_REPO_TAG_NAME')
def generate_label(version):
dev_names = ['dev', 'alpha', 'beta', 'rc']
is_dev = any(name in version for name in dev_names)
# Output is the name of the label to which the package should be
# uploaded o... | <commit_before>import os
travis_tag = os.getenv('TRAVIS_TAG')
appveyor_tag = os.getenv('APPVEYOR_REPO_TAG')
def generate_label(version):
dev_names = ['dev', 'alpha', 'beta', 'rc']
is_dev = any(name in version for name in dev_names)
# Output is the name of the label to which the package should be
# ... | import os
travis_tag = os.getenv('TRAVIS_TAG')
appveyor_tag = os.getenv('APPVEYOR_REPO_TAG_NAME')
def generate_label(version):
dev_names = ['dev', 'alpha', 'beta', 'rc']
is_dev = any(name in version for name in dev_names)
# Output is the name of the label to which the package should be
# uploaded o... | import os
travis_tag = os.getenv('TRAVIS_TAG')
appveyor_tag = os.getenv('APPVEYOR_REPO_TAG')
def generate_label(version):
dev_names = ['dev', 'alpha', 'beta', 'rc']
is_dev = any(name in version for name in dev_names)
# Output is the name of the label to which the package should be
# uploaded on ana... | <commit_before>import os
travis_tag = os.getenv('TRAVIS_TAG')
appveyor_tag = os.getenv('APPVEYOR_REPO_TAG')
def generate_label(version):
dev_names = ['dev', 'alpha', 'beta', 'rc']
is_dev = any(name in version for name in dev_names)
# Output is the name of the label to which the package should be
# ... |
d677f3762e0daf16e1be05a88b058194ddf43e15 | comics/comics/perrybiblefellowship.py | comics/comics/perrybiblefellowship.py | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "The Perry Bible Fellowship"
language = "en"
url = "http://www.pbfcomics.com/"
start_date = "2001-01-01"
rights = "Nicholas Gurewitch"
class Cra... | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "The Perry Bible Fellowship"
language = "en"
url = "http://www.pbfcomics.com/"
start_date = "2001-01-01"
rights = "Nicholas Gurewitch"
class Cra... | Rewrite "The Perry Bible Fellowship" after feed change | Rewrite "The Perry Bible Fellowship" after feed change
| Python | agpl-3.0 | datagutten/comics,jodal/comics,datagutten/comics,datagutten/comics,jodal/comics,jodal/comics,jodal/comics,datagutten/comics | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "The Perry Bible Fellowship"
language = "en"
url = "http://www.pbfcomics.com/"
start_date = "2001-01-01"
rights = "Nicholas Gurewitch"
class Cra... | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "The Perry Bible Fellowship"
language = "en"
url = "http://www.pbfcomics.com/"
start_date = "2001-01-01"
rights = "Nicholas Gurewitch"
class Cra... | <commit_before>from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "The Perry Bible Fellowship"
language = "en"
url = "http://www.pbfcomics.com/"
start_date = "2001-01-01"
rights = "Nicholas Gurewit... | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "The Perry Bible Fellowship"
language = "en"
url = "http://www.pbfcomics.com/"
start_date = "2001-01-01"
rights = "Nicholas Gurewitch"
class Cra... | from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "The Perry Bible Fellowship"
language = "en"
url = "http://www.pbfcomics.com/"
start_date = "2001-01-01"
rights = "Nicholas Gurewitch"
class Cra... | <commit_before>from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "The Perry Bible Fellowship"
language = "en"
url = "http://www.pbfcomics.com/"
start_date = "2001-01-01"
rights = "Nicholas Gurewit... |
dc4307a781e34bf051b20b18935d4939b2de1f8e | examples/unicode_commands.py | examples/unicode_commands.py | #!/usr/bin/env python
# coding=utf-8
"""A simple example demonstrating support for unicode command names.
"""
import math
import cmd2
class UnicodeApp(cmd2.Cmd):
"""Example cmd2 application with unicode command names."""
def __init__(self):
super().__init__()
self.intro = 'Welcome the Unicode... | #!/usr/bin/env python
# coding=utf-8
"""A simple example demonstrating support for unicode command names.
"""
import math
import cmd2
class UnicodeApp(cmd2.Cmd):
"""Example cmd2 application with unicode command names."""
def __init__(self):
super().__init__()
self.intro = 'Welcome the Unicode... | Fix flake8 error due to extra blank line in example | Fix flake8 error due to extra blank line in example
| Python | mit | python-cmd2/cmd2,python-cmd2/cmd2 | #!/usr/bin/env python
# coding=utf-8
"""A simple example demonstrating support for unicode command names.
"""
import math
import cmd2
class UnicodeApp(cmd2.Cmd):
"""Example cmd2 application with unicode command names."""
def __init__(self):
super().__init__()
self.intro = 'Welcome the Unicode... | #!/usr/bin/env python
# coding=utf-8
"""A simple example demonstrating support for unicode command names.
"""
import math
import cmd2
class UnicodeApp(cmd2.Cmd):
"""Example cmd2 application with unicode command names."""
def __init__(self):
super().__init__()
self.intro = 'Welcome the Unicode... | <commit_before>#!/usr/bin/env python
# coding=utf-8
"""A simple example demonstrating support for unicode command names.
"""
import math
import cmd2
class UnicodeApp(cmd2.Cmd):
"""Example cmd2 application with unicode command names."""
def __init__(self):
super().__init__()
self.intro = 'Welc... | #!/usr/bin/env python
# coding=utf-8
"""A simple example demonstrating support for unicode command names.
"""
import math
import cmd2
class UnicodeApp(cmd2.Cmd):
"""Example cmd2 application with unicode command names."""
def __init__(self):
super().__init__()
self.intro = 'Welcome the Unicode... | #!/usr/bin/env python
# coding=utf-8
"""A simple example demonstrating support for unicode command names.
"""
import math
import cmd2
class UnicodeApp(cmd2.Cmd):
"""Example cmd2 application with unicode command names."""
def __init__(self):
super().__init__()
self.intro = 'Welcome the Unicode... | <commit_before>#!/usr/bin/env python
# coding=utf-8
"""A simple example demonstrating support for unicode command names.
"""
import math
import cmd2
class UnicodeApp(cmd2.Cmd):
"""Example cmd2 application with unicode command names."""
def __init__(self):
super().__init__()
self.intro = 'Welc... |
241d1e6b36eb8f87a5c6111bfa52104feb821bb8 | test/dependencies_test.py | test/dependencies_test.py | import luigi
import sciluigi as sl
import os
TESTFILE_PATH = '/tmp/test.out'
class TestTask(sl.Task):
def out_data(self):
return sl.TargetInfo(self, TESTFILE_PATH)
def run(self):
with self.out_data().open('w') as outfile:
outfile.write('File written by luigi\n')
class TestRunTas... | import logging
import luigi
import sciluigi as sl
import os
TESTFILE_PATH = '/tmp/test.out'
log = logging.getLogger('sciluigi-interface')
log.setLevel(logging.WARNING)
class TestTask(sl.Task):
def out_data(self):
return sl.TargetInfo(self, TESTFILE_PATH)
def run(self):
with self.out_data().... | Set log level to WARNING when testing | Set log level to WARNING when testing
| Python | mit | pharmbio/sciluigi,samuell/sciluigi,pharmbio/sciluigi | import luigi
import sciluigi as sl
import os
TESTFILE_PATH = '/tmp/test.out'
class TestTask(sl.Task):
def out_data(self):
return sl.TargetInfo(self, TESTFILE_PATH)
def run(self):
with self.out_data().open('w') as outfile:
outfile.write('File written by luigi\n')
class TestRunTas... | import logging
import luigi
import sciluigi as sl
import os
TESTFILE_PATH = '/tmp/test.out'
log = logging.getLogger('sciluigi-interface')
log.setLevel(logging.WARNING)
class TestTask(sl.Task):
def out_data(self):
return sl.TargetInfo(self, TESTFILE_PATH)
def run(self):
with self.out_data().... | <commit_before>import luigi
import sciluigi as sl
import os
TESTFILE_PATH = '/tmp/test.out'
class TestTask(sl.Task):
def out_data(self):
return sl.TargetInfo(self, TESTFILE_PATH)
def run(self):
with self.out_data().open('w') as outfile:
outfile.write('File written by luigi\n')
c... | import logging
import luigi
import sciluigi as sl
import os
TESTFILE_PATH = '/tmp/test.out'
log = logging.getLogger('sciluigi-interface')
log.setLevel(logging.WARNING)
class TestTask(sl.Task):
def out_data(self):
return sl.TargetInfo(self, TESTFILE_PATH)
def run(self):
with self.out_data().... | import luigi
import sciluigi as sl
import os
TESTFILE_PATH = '/tmp/test.out'
class TestTask(sl.Task):
def out_data(self):
return sl.TargetInfo(self, TESTFILE_PATH)
def run(self):
with self.out_data().open('w') as outfile:
outfile.write('File written by luigi\n')
class TestRunTas... | <commit_before>import luigi
import sciluigi as sl
import os
TESTFILE_PATH = '/tmp/test.out'
class TestTask(sl.Task):
def out_data(self):
return sl.TargetInfo(self, TESTFILE_PATH)
def run(self):
with self.out_data().open('w') as outfile:
outfile.write('File written by luigi\n')
c... |
758a8bff354d1e1542b5c4614276bdfa229f3dbc | extended_choices/__init__.py | extended_choices/__init__.py | """Little helper application to improve django choices (for fields)"""
from __future__ import unicode_literals
from .choices import Choices, OrderedChoices
__author__ = 'Stephane "Twidi" Ange;'
__contact__ = "s.angel@twidi.com"
__homepage__ = "https://pypi.python.org/pypi/django-extended-choices"
__version__ = "1.1.... | """Little helper application to improve django choices (for fields)"""
from __future__ import unicode_literals
from .choices import Choices, OrderedChoices
__all__ = ['Choices', 'OrderedChoices']
__author__ = 'Stephane "Twidi" Ange;'
__contact__ = "s.angel@twidi.com"
__homepage__ = "https://pypi.python.org/pypi/djan... | Add `__all__` at package root level | Add `__all__` at package root level
| Python | bsd-3-clause | twidi/django-extended-choices | """Little helper application to improve django choices (for fields)"""
from __future__ import unicode_literals
from .choices import Choices, OrderedChoices
__author__ = 'Stephane "Twidi" Ange;'
__contact__ = "s.angel@twidi.com"
__homepage__ = "https://pypi.python.org/pypi/django-extended-choices"
__version__ = "1.1.... | """Little helper application to improve django choices (for fields)"""
from __future__ import unicode_literals
from .choices import Choices, OrderedChoices
__all__ = ['Choices', 'OrderedChoices']
__author__ = 'Stephane "Twidi" Ange;'
__contact__ = "s.angel@twidi.com"
__homepage__ = "https://pypi.python.org/pypi/djan... | <commit_before>"""Little helper application to improve django choices (for fields)"""
from __future__ import unicode_literals
from .choices import Choices, OrderedChoices
__author__ = 'Stephane "Twidi" Ange;'
__contact__ = "s.angel@twidi.com"
__homepage__ = "https://pypi.python.org/pypi/django-extended-choices"
__ve... | """Little helper application to improve django choices (for fields)"""
from __future__ import unicode_literals
from .choices import Choices, OrderedChoices
__all__ = ['Choices', 'OrderedChoices']
__author__ = 'Stephane "Twidi" Ange;'
__contact__ = "s.angel@twidi.com"
__homepage__ = "https://pypi.python.org/pypi/djan... | """Little helper application to improve django choices (for fields)"""
from __future__ import unicode_literals
from .choices import Choices, OrderedChoices
__author__ = 'Stephane "Twidi" Ange;'
__contact__ = "s.angel@twidi.com"
__homepage__ = "https://pypi.python.org/pypi/django-extended-choices"
__version__ = "1.1.... | <commit_before>"""Little helper application to improve django choices (for fields)"""
from __future__ import unicode_literals
from .choices import Choices, OrderedChoices
__author__ = 'Stephane "Twidi" Ange;'
__contact__ = "s.angel@twidi.com"
__homepage__ = "https://pypi.python.org/pypi/django-extended-choices"
__ve... |
389bd3773d2f89321c31b05da8a733b65ccbeef8 | tests/test_coefficient.py | tests/test_coefficient.py | # -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def test_coefficient_proratisation_only_contract_pe... | # -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def test_coefficient_proratisation_only_contract_pe... | Fix test to avoid weird period handling | Fix test to avoid weird period handling
| Python | agpl-3.0 | sgmap/openfisca-france,antoinearnoud/openfisca-france,sgmap/openfisca-france,antoinearnoud/openfisca-france | # -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def test_coefficient_proratisation_only_contract_pe... | # -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def test_coefficient_proratisation_only_contract_pe... | <commit_before># -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def test_coefficient_proratisation_o... | # -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def test_coefficient_proratisation_only_contract_pe... | # -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def test_coefficient_proratisation_only_contract_pe... | <commit_before># -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def test_coefficient_proratisation_o... |
ee4c8b806ecf0ada51916fe63f9da9e81c03850d | django_react_templatetags/tests/demosite/urls.py | django_react_templatetags/tests/demosite/urls.py | from django.urls import path
from django_react_templatetags.tests.demosite import views
urlpatterns = [
path(
'static-react-view',
views.StaticReactView.as_view(),
name='static_react_view',
),
]
| from django.conf.urls import url
from django_react_templatetags.tests.demosite import views
urlpatterns = [
url(
'static-react-view',
views.StaticReactView.as_view(),
name='static_react_view',
),
]
| Use url instead of path (to keep django 1 compat) | Use url instead of path (to keep django 1 compat)
| Python | mit | Frojd/django-react-templatetags,Frojd/django-react-templatetags,Frojd/django-react-templatetags | from django.urls import path
from django_react_templatetags.tests.demosite import views
urlpatterns = [
path(
'static-react-view',
views.StaticReactView.as_view(),
name='static_react_view',
),
]
Use url instead of path (to keep django 1 compat) | from django.conf.urls import url
from django_react_templatetags.tests.demosite import views
urlpatterns = [
url(
'static-react-view',
views.StaticReactView.as_view(),
name='static_react_view',
),
]
| <commit_before>from django.urls import path
from django_react_templatetags.tests.demosite import views
urlpatterns = [
path(
'static-react-view',
views.StaticReactView.as_view(),
name='static_react_view',
),
]
<commit_msg>Use url instead of path (to keep django 1 compat)<commit_after> | from django.conf.urls import url
from django_react_templatetags.tests.demosite import views
urlpatterns = [
url(
'static-react-view',
views.StaticReactView.as_view(),
name='static_react_view',
),
]
| from django.urls import path
from django_react_templatetags.tests.demosite import views
urlpatterns = [
path(
'static-react-view',
views.StaticReactView.as_view(),
name='static_react_view',
),
]
Use url instead of path (to keep django 1 compat)from django.conf.urls import url
from d... | <commit_before>from django.urls import path
from django_react_templatetags.tests.demosite import views
urlpatterns = [
path(
'static-react-view',
views.StaticReactView.as_view(),
name='static_react_view',
),
]
<commit_msg>Use url instead of path (to keep django 1 compat)<commit_after>... |
4244e285c25c0c13a1f7f6e172b31ebb8f2bb7b1 | spacy/lang/es/__init__.py | spacy/lang/es/__init__.py | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lemmatizer import LOOKUP
from .syntax_iterators import SYNTAX_ITERATORS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ..norm_exc... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lemmatizer import LOOKUP
from .syntax_iterators import SYNTAX_ITERATORS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ..norm_exc... | Fix Spanish noun_chunks failure caused by typo | Fix Spanish noun_chunks failure caused by typo | Python | mit | recognai/spaCy,explosion/spaCy,aikramer2/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,aikramer2/spaCy,honnibal/spaCy,spacy-io/spaCy,recognai/spaCy,recognai/spaCy,spacy-io/spaCy,recognai/spaCy,recognai/spaCy,explosion/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/spaCy,explosion/spaCy,honnibal/spaCy,aikramer2/... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lemmatizer import LOOKUP
from .syntax_iterators import SYNTAX_ITERATORS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ..norm_exc... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lemmatizer import LOOKUP
from .syntax_iterators import SYNTAX_ITERATORS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ..norm_exc... | <commit_before># coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lemmatizer import LOOKUP
from .syntax_iterators import SYNTAX_ITERATORS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lemmatizer import LOOKUP
from .syntax_iterators import SYNTAX_ITERATORS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ..norm_exc... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lemmatizer import LOOKUP
from .syntax_iterators import SYNTAX_ITERATORS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ..norm_exc... | <commit_before># coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lemmatizer import LOOKUP
from .syntax_iterators import SYNTAX_ITERATORS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
... |
78af5e585eb109049299bd1c826f93001e4f6c68 | adama/store.py | adama/store.py | import collections
import pickle
import redis
from .tools import location
class Store(collections.MutableMapping):
def __init__(self, db=0):
host, port = location('redis', 6379)
self._db = redis.StrictRedis(host=host, port=port, db=db)
def __getitem__(self, key):
obj = self._db.get... | import collections
import pickle
import redis
class Store(collections.MutableMapping):
def __init__(self, db=0):
host, port = 'redis', 6379
self._db = redis.StrictRedis(host=host, port=port, db=db)
def __getitem__(self, key):
obj = self._db.get(key)
if obj is None:
... | Use /etc/hosts to find redis | Use /etc/hosts to find redis | Python | mit | waltermoreira/adama-app,waltermoreira/adama-app,waltermoreira/adama-app | import collections
import pickle
import redis
from .tools import location
class Store(collections.MutableMapping):
def __init__(self, db=0):
host, port = location('redis', 6379)
self._db = redis.StrictRedis(host=host, port=port, db=db)
def __getitem__(self, key):
obj = self._db.get... | import collections
import pickle
import redis
class Store(collections.MutableMapping):
def __init__(self, db=0):
host, port = 'redis', 6379
self._db = redis.StrictRedis(host=host, port=port, db=db)
def __getitem__(self, key):
obj = self._db.get(key)
if obj is None:
... | <commit_before>import collections
import pickle
import redis
from .tools import location
class Store(collections.MutableMapping):
def __init__(self, db=0):
host, port = location('redis', 6379)
self._db = redis.StrictRedis(host=host, port=port, db=db)
def __getitem__(self, key):
obj... | import collections
import pickle
import redis
class Store(collections.MutableMapping):
def __init__(self, db=0):
host, port = 'redis', 6379
self._db = redis.StrictRedis(host=host, port=port, db=db)
def __getitem__(self, key):
obj = self._db.get(key)
if obj is None:
... | import collections
import pickle
import redis
from .tools import location
class Store(collections.MutableMapping):
def __init__(self, db=0):
host, port = location('redis', 6379)
self._db = redis.StrictRedis(host=host, port=port, db=db)
def __getitem__(self, key):
obj = self._db.get... | <commit_before>import collections
import pickle
import redis
from .tools import location
class Store(collections.MutableMapping):
def __init__(self, db=0):
host, port = location('redis', 6379)
self._db = redis.StrictRedis(host=host, port=port, db=db)
def __getitem__(self, key):
obj... |
50f8e32521ccf871177b4402b6a410dad896b272 | src/schema_matching/collector/description/_argparser.py | src/schema_matching/collector/description/_argparser.py | import utilities
def parse(src):
if src == ':':
from ..description import default as desc
elif src.startswith(':'):
import importlib
desc = importlib.import_module(src[1:])
else:
import os, imp
from .. import description as parent_package # needs to be imported before its child modules
with open(src) a... | import importlib
def parse(src):
try:
if src == ':':
from ..description import default as desc
elif src.startswith(':'):
desc = importlib.import_module(src[1:], __package__.partition('.')[0])
else:
desc = importlib.machinery.SourceFileLoader(src, src).load_module()
except:
raise ImportError(src)
... | Use importlib in favour of imp | Use importlib in favour of imp
| Python | mit | davidfoerster/schema-matching | import utilities
def parse(src):
if src == ':':
from ..description import default as desc
elif src.startswith(':'):
import importlib
desc = importlib.import_module(src[1:])
else:
import os, imp
from .. import description as parent_package # needs to be imported before its child modules
with open(src) a... | import importlib
def parse(src):
try:
if src == ':':
from ..description import default as desc
elif src.startswith(':'):
desc = importlib.import_module(src[1:], __package__.partition('.')[0])
else:
desc = importlib.machinery.SourceFileLoader(src, src).load_module()
except:
raise ImportError(src)
... | <commit_before>import utilities
def parse(src):
if src == ':':
from ..description import default as desc
elif src.startswith(':'):
import importlib
desc = importlib.import_module(src[1:])
else:
import os, imp
from .. import description as parent_package # needs to be imported before its child modules
w... | import importlib
def parse(src):
try:
if src == ':':
from ..description import default as desc
elif src.startswith(':'):
desc = importlib.import_module(src[1:], __package__.partition('.')[0])
else:
desc = importlib.machinery.SourceFileLoader(src, src).load_module()
except:
raise ImportError(src)
... | import utilities
def parse(src):
if src == ':':
from ..description import default as desc
elif src.startswith(':'):
import importlib
desc = importlib.import_module(src[1:])
else:
import os, imp
from .. import description as parent_package # needs to be imported before its child modules
with open(src) a... | <commit_before>import utilities
def parse(src):
if src == ':':
from ..description import default as desc
elif src.startswith(':'):
import importlib
desc = importlib.import_module(src[1:])
else:
import os, imp
from .. import description as parent_package # needs to be imported before its child modules
w... |
e94e3931ec254e432993d18d9f4ac79f559a2257 | scripts/starting_py_program.py | scripts/starting_py_program.py |
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def main(argv=None):
if argv is None:
argv = sys.argv
return 0
if __name__ == "__main__":
sys.exit(main())
| #!/usr/bin/env python3
# from __future__ import print_function #(if python2)
import sys
def eprint(*args, **kwargs):
""" Just like the print function, but on stderr
"""
print(*args, file=sys.stderr, **kwargs)
def main(argv=None):
""" Program starting point, it can started by the OS or as normal fun... | Add docstrings to starting py program | Add docstrings to starting py program
| Python | unlicense | paolobolzoni/useful-conf,paolobolzoni/useful-conf,paolobolzoni/useful-conf |
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def main(argv=None):
if argv is None:
argv = sys.argv
return 0
if __name__ == "__main__":
sys.exit(main())
Add docstrings to starting py program | #!/usr/bin/env python3
# from __future__ import print_function #(if python2)
import sys
def eprint(*args, **kwargs):
""" Just like the print function, but on stderr
"""
print(*args, file=sys.stderr, **kwargs)
def main(argv=None):
""" Program starting point, it can started by the OS or as normal fun... | <commit_before>
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def main(argv=None):
if argv is None:
argv = sys.argv
return 0
if __name__ == "__main__":
sys.exit(main())
<commit_msg>Add docstrings to starting py program<commit_after> | #!/usr/bin/env python3
# from __future__ import print_function #(if python2)
import sys
def eprint(*args, **kwargs):
""" Just like the print function, but on stderr
"""
print(*args, file=sys.stderr, **kwargs)
def main(argv=None):
""" Program starting point, it can started by the OS or as normal fun... |
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def main(argv=None):
if argv is None:
argv = sys.argv
return 0
if __name__ == "__main__":
sys.exit(main())
Add docstrings to starting py program#!/usr/bin/env python3
# from __future__ import print_function #(if... | <commit_before>
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def main(argv=None):
if argv is None:
argv = sys.argv
return 0
if __name__ == "__main__":
sys.exit(main())
<commit_msg>Add docstrings to starting py program<commit_after>#!/usr/bin/env python3
# f... |
13f8d6feebcfb28b96bb0f69d1e5625a337c22fa | demo/ok_test/tests/q1.py | demo/ok_test/tests/q1.py | test = {
'name': 'Question 1',
'points': 3,
'suites': [
{
'cases': [
{
'answer': 'Domain is numbers. Range is numbers',
'choices': [
'Domain is numbers. Range is numbers',
'Domain is numbers. Range is strings',
'Domain is strings. Range is ... | test = {
'name': 'Question 1',
'points': 3,
'suites': [
{
'type': 'concept',
'cases': [
{
'answer': 'Domain is numbers. Range is numbers',
'choices': [
'Domain is numbers. Range is numbers',
'Domain is numbers. Range is strings',
'Dom... | Add a demo for wwpp | Add a demo for wwpp
| Python | apache-2.0 | jathak/ok-client,Cal-CS-61A-Staff/ok-client,jackzhao-mj/ok-client | test = {
'name': 'Question 1',
'points': 3,
'suites': [
{
'cases': [
{
'answer': 'Domain is numbers. Range is numbers',
'choices': [
'Domain is numbers. Range is numbers',
'Domain is numbers. Range is strings',
'Domain is strings. Range is ... | test = {
'name': 'Question 1',
'points': 3,
'suites': [
{
'type': 'concept',
'cases': [
{
'answer': 'Domain is numbers. Range is numbers',
'choices': [
'Domain is numbers. Range is numbers',
'Domain is numbers. Range is strings',
'Dom... | <commit_before>test = {
'name': 'Question 1',
'points': 3,
'suites': [
{
'cases': [
{
'answer': 'Domain is numbers. Range is numbers',
'choices': [
'Domain is numbers. Range is numbers',
'Domain is numbers. Range is strings',
'Domain is str... | test = {
'name': 'Question 1',
'points': 3,
'suites': [
{
'type': 'concept',
'cases': [
{
'answer': 'Domain is numbers. Range is numbers',
'choices': [
'Domain is numbers. Range is numbers',
'Domain is numbers. Range is strings',
'Dom... | test = {
'name': 'Question 1',
'points': 3,
'suites': [
{
'cases': [
{
'answer': 'Domain is numbers. Range is numbers',
'choices': [
'Domain is numbers. Range is numbers',
'Domain is numbers. Range is strings',
'Domain is strings. Range is ... | <commit_before>test = {
'name': 'Question 1',
'points': 3,
'suites': [
{
'cases': [
{
'answer': 'Domain is numbers. Range is numbers',
'choices': [
'Domain is numbers. Range is numbers',
'Domain is numbers. Range is strings',
'Domain is str... |
6dadf50366b1e142f96ef3bf4a356f7aa98f37be | geokey_export/__init__.py | geokey_export/__init__.py | from geokey.extensions.base import register
VERSION = (0, 2, 0)
__version__ = '.'.join(map(str, VERSION))
register(
'geokey_export',
'Export',
display_admin=True,
superuser=False,
version=__version__
)
| from geokey.extensions.base import register
VERSION = (0, 2, 0)
__version__ = '.'.join(map(str, VERSION))
register(
'geokey_export',
'Export',
display_admin=True,
superuser=False
)
| Undo previous commit (should not been on new branch) - Sorry! | Undo previous commit (should not been on new branch) - Sorry!
Signed-off-by: Matthias Stevens <3e0606afd16757d2df162884117429808539458f@gmail.com>
| Python | mit | ExCiteS/geokey-export,ExCiteS/geokey-export,ExCiteS/geokey-export | from geokey.extensions.base import register
VERSION = (0, 2, 0)
__version__ = '.'.join(map(str, VERSION))
register(
'geokey_export',
'Export',
display_admin=True,
superuser=False,
version=__version__
)
Undo previous commit (should not been on new branch) - Sorry!
Signed-off-by: Matthias Stevens ... | from geokey.extensions.base import register
VERSION = (0, 2, 0)
__version__ = '.'.join(map(str, VERSION))
register(
'geokey_export',
'Export',
display_admin=True,
superuser=False
)
| <commit_before>from geokey.extensions.base import register
VERSION = (0, 2, 0)
__version__ = '.'.join(map(str, VERSION))
register(
'geokey_export',
'Export',
display_admin=True,
superuser=False,
version=__version__
)
<commit_msg>Undo previous commit (should not been on new branch) - Sorry!
Signe... | from geokey.extensions.base import register
VERSION = (0, 2, 0)
__version__ = '.'.join(map(str, VERSION))
register(
'geokey_export',
'Export',
display_admin=True,
superuser=False
)
| from geokey.extensions.base import register
VERSION = (0, 2, 0)
__version__ = '.'.join(map(str, VERSION))
register(
'geokey_export',
'Export',
display_admin=True,
superuser=False,
version=__version__
)
Undo previous commit (should not been on new branch) - Sorry!
Signed-off-by: Matthias Stevens ... | <commit_before>from geokey.extensions.base import register
VERSION = (0, 2, 0)
__version__ = '.'.join(map(str, VERSION))
register(
'geokey_export',
'Export',
display_admin=True,
superuser=False,
version=__version__
)
<commit_msg>Undo previous commit (should not been on new branch) - Sorry!
Signe... |
a6774092839f8c6aff743cf8f4cc982fe8ce2e63 | interfaces/cython/cantera/mixmaster/utilities.py | interfaces/cython/cantera/mixmaster/utilities.py | import string
import os, sys
import types, traceback
try:
if sys.version_info[0] == 3:
from tkinter import Tk
from tkinter import messagebox
else:
from Tkinter import Tk
import tkMessageBox
_hasTk = 1
except:
_hasTk = 0
def write_CSV(f,x):
"""write list x to file f... | import string
import os, sys
import types, traceback
try:
if sys.version_info[0] == 3:
from tkinter import Tk
from tkinter import messagebox
else:
from Tkinter import Tk
import tkMessageBox as messagebox
_hasTk = 1
except:
_hasTk = 0
def write_CSV(f,x):
"""write li... | Fix displaying of errors when using Python 2 | [MixMaster] Fix displaying of errors when using Python 2
| Python | bsd-3-clause | Heathckliff/cantera,imitrichev/cantera,imitrichev/cantera,imitrichev/cantera,Heathckliff/cantera,Heathckliff/cantera,Heathckliff/cantera,imitrichev/cantera,Heathckliff/cantera,imitrichev/cantera,Heathckliff/cantera,imitrichev/cantera | import string
import os, sys
import types, traceback
try:
if sys.version_info[0] == 3:
from tkinter import Tk
from tkinter import messagebox
else:
from Tkinter import Tk
import tkMessageBox
_hasTk = 1
except:
_hasTk = 0
def write_CSV(f,x):
"""write list x to file f... | import string
import os, sys
import types, traceback
try:
if sys.version_info[0] == 3:
from tkinter import Tk
from tkinter import messagebox
else:
from Tkinter import Tk
import tkMessageBox as messagebox
_hasTk = 1
except:
_hasTk = 0
def write_CSV(f,x):
"""write li... | <commit_before>import string
import os, sys
import types, traceback
try:
if sys.version_info[0] == 3:
from tkinter import Tk
from tkinter import messagebox
else:
from Tkinter import Tk
import tkMessageBox
_hasTk = 1
except:
_hasTk = 0
def write_CSV(f,x):
"""write l... | import string
import os, sys
import types, traceback
try:
if sys.version_info[0] == 3:
from tkinter import Tk
from tkinter import messagebox
else:
from Tkinter import Tk
import tkMessageBox as messagebox
_hasTk = 1
except:
_hasTk = 0
def write_CSV(f,x):
"""write li... | import string
import os, sys
import types, traceback
try:
if sys.version_info[0] == 3:
from tkinter import Tk
from tkinter import messagebox
else:
from Tkinter import Tk
import tkMessageBox
_hasTk = 1
except:
_hasTk = 0
def write_CSV(f,x):
"""write list x to file f... | <commit_before>import string
import os, sys
import types, traceback
try:
if sys.version_info[0] == 3:
from tkinter import Tk
from tkinter import messagebox
else:
from Tkinter import Tk
import tkMessageBox
_hasTk = 1
except:
_hasTk = 0
def write_CSV(f,x):
"""write l... |
f13e9ff10c79f58df2f6d43c8b840b642be56dab | core/admin.py | core/admin.py | # -*- encoding: UTF-8 -*-
#
# Copyright 2014-2015
#
# STIC-Investigación - Universidad de La Laguna (ULL) <gesinv@ull.edu.es>
#
# This file is part of Portal del Investigador.
#
# Portal del Investigador is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero Gen... | # -*- encoding: UTF-8 -*-
#
# Copyright 2014-2015
#
# STIC-Investigación - Universidad de La Laguna (ULL) <gesinv@ull.edu.es>
#
# This file is part of Portal del Investigador.
#
# Portal del Investigador is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero Gen... | Patch django submit_row templatetag so it takes into account button config sent in context | Patch django submit_row templatetag so it takes into account button config sent in context
| Python | agpl-3.0 | tic-ull/portal-del-investigador,tic-ull/portal-del-investigador,tic-ull/portal-del-investigador,tic-ull/portal-del-investigador | # -*- encoding: UTF-8 -*-
#
# Copyright 2014-2015
#
# STIC-Investigación - Universidad de La Laguna (ULL) <gesinv@ull.edu.es>
#
# This file is part of Portal del Investigador.
#
# Portal del Investigador is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero Gen... | # -*- encoding: UTF-8 -*-
#
# Copyright 2014-2015
#
# STIC-Investigación - Universidad de La Laguna (ULL) <gesinv@ull.edu.es>
#
# This file is part of Portal del Investigador.
#
# Portal del Investigador is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero Gen... | <commit_before># -*- encoding: UTF-8 -*-
#
# Copyright 2014-2015
#
# STIC-Investigación - Universidad de La Laguna (ULL) <gesinv@ull.edu.es>
#
# This file is part of Portal del Investigador.
#
# Portal del Investigador is free software: you can redistribute it and/or
# modify it under the terms of the... | # -*- encoding: UTF-8 -*-
#
# Copyright 2014-2015
#
# STIC-Investigación - Universidad de La Laguna (ULL) <gesinv@ull.edu.es>
#
# This file is part of Portal del Investigador.
#
# Portal del Investigador is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero Gen... | # -*- encoding: UTF-8 -*-
#
# Copyright 2014-2015
#
# STIC-Investigación - Universidad de La Laguna (ULL) <gesinv@ull.edu.es>
#
# This file is part of Portal del Investigador.
#
# Portal del Investigador is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero Gen... | <commit_before># -*- encoding: UTF-8 -*-
#
# Copyright 2014-2015
#
# STIC-Investigación - Universidad de La Laguna (ULL) <gesinv@ull.edu.es>
#
# This file is part of Portal del Investigador.
#
# Portal del Investigador is free software: you can redistribute it and/or
# modify it under the terms of the... |
6e43c5a69bd7b0291ef54d1936f64d0596189fa5 | userena/contrib/umessages/urls.py | userena/contrib/umessages/urls.py | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | Allow spaces in username, cont'd: forgotten url pattern. | Allow spaces in username, cont'd: forgotten url pattern.
| Python | bsd-3-clause | ugoertz/django-userena,ugoertz/django-userena,ugoertz/django-userena | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | <commit_before>from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/... | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... | <commit_before>from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/... |
30bfe04e0fa1386e263cbd0e8dbc6f3689f9cb21 | connector_carepoint/migrations/9.0.1.3.0/pre-migrate.py | connector_carepoint/migrations/9.0.1.3.0/pre-migrate.py | # -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
def migrate(cr, version):
cr.execute('ALTER TABLE carepoint_medical_prescription_order_line '
'RENAME TO carepoint_rx_ord_ln')
cr.execute('ALTER TABLE carepoint_carepoint_organ... | # -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
_logger = logging.getLogger(__name__)
def migrate(cr, version):
try:
cr.execute('ALTER TABLE carepoint_medical_prescription_order_line '
'RENAME TO care... | Fix prescription migration * Add try/catch & rollback to db alterations in case server re-upgrades | [FIX] connector_carepoint: Fix prescription migration
* Add try/catch & rollback to db alterations in case server re-upgrades
| Python | agpl-3.0 | laslabs/odoo-connector-carepoint | # -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
def migrate(cr, version):
cr.execute('ALTER TABLE carepoint_medical_prescription_order_line '
'RENAME TO carepoint_rx_ord_ln')
cr.execute('ALTER TABLE carepoint_carepoint_organ... | # -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
_logger = logging.getLogger(__name__)
def migrate(cr, version):
try:
cr.execute('ALTER TABLE carepoint_medical_prescription_order_line '
'RENAME TO care... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
def migrate(cr, version):
cr.execute('ALTER TABLE carepoint_medical_prescription_order_line '
'RENAME TO carepoint_rx_ord_ln')
cr.execute('ALTER TABLE carepoint_... | # -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
_logger = logging.getLogger(__name__)
def migrate(cr, version):
try:
cr.execute('ALTER TABLE carepoint_medical_prescription_order_line '
'RENAME TO care... | # -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
def migrate(cr, version):
cr.execute('ALTER TABLE carepoint_medical_prescription_order_line '
'RENAME TO carepoint_rx_ord_ln')
cr.execute('ALTER TABLE carepoint_carepoint_organ... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
def migrate(cr, version):
cr.execute('ALTER TABLE carepoint_medical_prescription_order_line '
'RENAME TO carepoint_rx_ord_ln')
cr.execute('ALTER TABLE carepoint_... |
259ac1bf6390c050892fa678842c1793e7f1dda0 | runtests.py | runtests.py | #!/usr/bin/env python
import os
import sys
import unittest
from huey import tests
def _requirements_installed():
try:
import django
return True
except Exception:
return False
def run_tests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittes... | #!/usr/bin/env python
import os
import sys
import unittest
from huey import tests
def _requirements_installed():
try:
import django
return True
except Exception:
return False
def run_tests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittes... | Allow running tests without Django. | Allow running tests without Django.
| Python | mit | coleifer/huey,rsalmaso/huey,pombredanne/huey | #!/usr/bin/env python
import os
import sys
import unittest
from huey import tests
def _requirements_installed():
try:
import django
return True
except Exception:
return False
def run_tests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittes... | #!/usr/bin/env python
import os
import sys
import unittest
from huey import tests
def _requirements_installed():
try:
import django
return True
except Exception:
return False
def run_tests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittes... | <commit_before>#!/usr/bin/env python
import os
import sys
import unittest
from huey import tests
def _requirements_installed():
try:
import django
return True
except Exception:
return False
def run_tests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
r... | #!/usr/bin/env python
import os
import sys
import unittest
from huey import tests
def _requirements_installed():
try:
import django
return True
except Exception:
return False
def run_tests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittes... | #!/usr/bin/env python
import os
import sys
import unittest
from huey import tests
def _requirements_installed():
try:
import django
return True
except Exception:
return False
def run_tests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittes... | <commit_before>#!/usr/bin/env python
import os
import sys
import unittest
from huey import tests
def _requirements_installed():
try:
import django
return True
except Exception:
return False
def run_tests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
r... |
746cc719ce80636c19b2eea4b3d7328e680f7624 | settings_example.py | settings_example.py | """
Example settings module.
This should be copied as `settings.py` and the values modified there.
That file is ignored by the repo, since it will contain environment
specific and sensitive information (like passwords).
"""
import logging
import os
import re
import yaml
from imap import EmailCheckError, EmailServe... | """
Example settings module.
This should be copied as `settings.py` and the values modified there.
That file is ignored by the repo, since it will contain environment
specific and sensitive information (like passwords).
"""
import logging
import os
import re
import yaml
from imap import EmailCheckError, EmailServe... | Change file name to logger name in example settings | Change file name to logger name in example settings
| Python | mit | AustralianAntarcticDataCentre/save_emails_to_files,AustralianAntarcticDataCentre/save_emails_to_files | """
Example settings module.
This should be copied as `settings.py` and the values modified there.
That file is ignored by the repo, since it will contain environment
specific and sensitive information (like passwords).
"""
import logging
import os
import re
import yaml
from imap import EmailCheckError, EmailServe... | """
Example settings module.
This should be copied as `settings.py` and the values modified there.
That file is ignored by the repo, since it will contain environment
specific and sensitive information (like passwords).
"""
import logging
import os
import re
import yaml
from imap import EmailCheckError, EmailServe... | <commit_before>"""
Example settings module.
This should be copied as `settings.py` and the values modified there.
That file is ignored by the repo, since it will contain environment
specific and sensitive information (like passwords).
"""
import logging
import os
import re
import yaml
from imap import EmailCheckEr... | """
Example settings module.
This should be copied as `settings.py` and the values modified there.
That file is ignored by the repo, since it will contain environment
specific and sensitive information (like passwords).
"""
import logging
import os
import re
import yaml
from imap import EmailCheckError, EmailServe... | """
Example settings module.
This should be copied as `settings.py` and the values modified there.
That file is ignored by the repo, since it will contain environment
specific and sensitive information (like passwords).
"""
import logging
import os
import re
import yaml
from imap import EmailCheckError, EmailServe... | <commit_before>"""
Example settings module.
This should be copied as `settings.py` and the values modified there.
That file is ignored by the repo, since it will contain environment
specific and sensitive information (like passwords).
"""
import logging
import os
import re
import yaml
from imap import EmailCheckEr... |
1ef0e4db1079995b5dd6a013d3fa51c1b61db178 | config-example.py | config-example.py | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspotmail.com>'
# Flask's secret key, used to e... | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspotmail.com>'
# Flask's secret key, used to e... | Make ORG_TITLE the complete pre-existing title. | Make ORG_TITLE the complete pre-existing title. | Python | mit | Yelp/love,Yelp/love,Yelp/love | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspotmail.com>'
# Flask's secret key, used to e... | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspotmail.com>'
# Flask's secret key, used to e... | <commit_before># Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspotmail.com>'
# Flask's secret... | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspotmail.com>'
# Flask's secret key, used to e... | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspotmail.com>'
# Flask's secret key, used to e... | <commit_before># Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspotmail.com>'
# Flask's secret... |
650c94107106cddafccaf5d2021a6407fcac990e | bend/src/users/jwt_util.py | bend/src/users/jwt_util.py | from jwt_auth.forms import JSONWebTokenForm
def loginUser(username, password):
"""Should login user and return a jwt token, piggyback on jwt_auth"""
request = {"username": username, "password": password}
form = JSONWebTokenForm(request)
if not form.is_valid():
return print("JWT form not valid"... | from jwt_auth.forms import JSONWebTokenForm
def loginUser(username, password):
"""Should login user and return a jwt token, piggyback on jwt_auth"""
request = {"username": username, "password": password}
form = JSONWebTokenForm(request)
if not form.is_valid():
return print("JWT form not valid"... | Return the token string instead of object with string | Return the token string instead of object with string
| Python | mit | ncrmro/ango,ncrmro/reango,ncrmro/ango,ncrmro/reango,ncrmro/ango,ncrmro/reango | from jwt_auth.forms import JSONWebTokenForm
def loginUser(username, password):
"""Should login user and return a jwt token, piggyback on jwt_auth"""
request = {"username": username, "password": password}
form = JSONWebTokenForm(request)
if not form.is_valid():
return print("JWT form not valid"... | from jwt_auth.forms import JSONWebTokenForm
def loginUser(username, password):
"""Should login user and return a jwt token, piggyback on jwt_auth"""
request = {"username": username, "password": password}
form = JSONWebTokenForm(request)
if not form.is_valid():
return print("JWT form not valid"... | <commit_before>from jwt_auth.forms import JSONWebTokenForm
def loginUser(username, password):
"""Should login user and return a jwt token, piggyback on jwt_auth"""
request = {"username": username, "password": password}
form = JSONWebTokenForm(request)
if not form.is_valid():
return print("JWT ... | from jwt_auth.forms import JSONWebTokenForm
def loginUser(username, password):
"""Should login user and return a jwt token, piggyback on jwt_auth"""
request = {"username": username, "password": password}
form = JSONWebTokenForm(request)
if not form.is_valid():
return print("JWT form not valid"... | from jwt_auth.forms import JSONWebTokenForm
def loginUser(username, password):
"""Should login user and return a jwt token, piggyback on jwt_auth"""
request = {"username": username, "password": password}
form = JSONWebTokenForm(request)
if not form.is_valid():
return print("JWT form not valid"... | <commit_before>from jwt_auth.forms import JSONWebTokenForm
def loginUser(username, password):
"""Should login user and return a jwt token, piggyback on jwt_auth"""
request = {"username": username, "password": password}
form = JSONWebTokenForm(request)
if not form.is_valid():
return print("JWT ... |
994e185e7bb8b2ffb78f20012121c441ea6b73a1 | comics/views.py | comics/views.py | from django.views import generic
from gallery.models import GalleryImage
from .models import Arc, Issue
class IndexView(generic.ListView):
model = Arc
template_name = "comics/index.html"
context_object_name = "arcs"
class IssueView(generic.DetailView):
model = Issue
template_name = "comics/issu... | from django.views import generic
from gallery.models import GalleryImage
from .models import Arc, Issue
class IndexView(generic.ListView):
model = Arc
template_name = "comics/index.html"
context_object_name = "arcs"
class IssueView(generic.DetailView):
model = Issue
template_name = "comics/issu... | Fix bug where arc slug could be literally anything | Fix bug where arc slug could be literally anything
| Python | mit | evanepio/dotmanca,evanepio/dotmanca,evanepio/dotmanca | from django.views import generic
from gallery.models import GalleryImage
from .models import Arc, Issue
class IndexView(generic.ListView):
model = Arc
template_name = "comics/index.html"
context_object_name = "arcs"
class IssueView(generic.DetailView):
model = Issue
template_name = "comics/issu... | from django.views import generic
from gallery.models import GalleryImage
from .models import Arc, Issue
class IndexView(generic.ListView):
model = Arc
template_name = "comics/index.html"
context_object_name = "arcs"
class IssueView(generic.DetailView):
model = Issue
template_name = "comics/issu... | <commit_before>from django.views import generic
from gallery.models import GalleryImage
from .models import Arc, Issue
class IndexView(generic.ListView):
model = Arc
template_name = "comics/index.html"
context_object_name = "arcs"
class IssueView(generic.DetailView):
model = Issue
template_name... | from django.views import generic
from gallery.models import GalleryImage
from .models import Arc, Issue
class IndexView(generic.ListView):
model = Arc
template_name = "comics/index.html"
context_object_name = "arcs"
class IssueView(generic.DetailView):
model = Issue
template_name = "comics/issu... | from django.views import generic
from gallery.models import GalleryImage
from .models import Arc, Issue
class IndexView(generic.ListView):
model = Arc
template_name = "comics/index.html"
context_object_name = "arcs"
class IssueView(generic.DetailView):
model = Issue
template_name = "comics/issu... | <commit_before>from django.views import generic
from gallery.models import GalleryImage
from .models import Arc, Issue
class IndexView(generic.ListView):
model = Arc
template_name = "comics/index.html"
context_object_name = "arcs"
class IssueView(generic.DetailView):
model = Issue
template_name... |
d624a1e638cf6f1fca7b7d8966f3ab7c6c9f7300 | linter.py | linter.py | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template=gcc', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>warning|style|performance|portabilit... | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>war... | Use explicit template instead of 'gcc' | Use explicit template instead of 'gcc'
cppcheck 1.84 changed the meaning of --template=gcc to add a second line of output that confuses the linter plugin, so explicitly request the old format
see https://github.com/danmar/cppcheck/commit/f058d9ad083a6111e9339b4b3506c5da7db579e0 for the details of that change | Python | mit | SublimeLinter/SublimeLinter-cppcheck | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template=gcc', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>warning|style|performance|portabilit... | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>war... | <commit_before>from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template=gcc', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>warning|style|perform... | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>war... | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template=gcc', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>warning|style|performance|portabilit... | <commit_before>from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template=gcc', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>warning|style|perform... |
2b81d198b7d3dd9094f47d2f8e51f0275ee31463 | osf/migrations/0084_migrate_node_info_for_target.py | osf/migrations/0084_migrate_node_info_for_target.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-13 16:14
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('osf', '0083_add_file_fields_for_target'),
]
operations = [
migrations.RunSQL(
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-13 16:14
from __future__ import unicode_literals
from django.db import migrations, models, connection
from django.contrib.contenttypes.models import ContentType
def set_basefilenode_target(apps, schema_editor):
BaseFileNode = apps.get_model('osf', '... | Use batches instead of raw sql for long migration | Use batches instead of raw sql for long migration
| Python | apache-2.0 | baylee-d/osf.io,Johnetordoff/osf.io,mfraezz/osf.io,mattclark/osf.io,aaxelb/osf.io,HalcyonChimera/osf.io,adlius/osf.io,felliott/osf.io,pattisdr/osf.io,CenterForOpenScience/osf.io,Johnetordoff/osf.io,brianjgeiger/osf.io,brianjgeiger/osf.io,mfraezz/osf.io,erinspace/osf.io,HalcyonChimera/osf.io,CenterForOpenScience/osf.io,... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-13 16:14
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('osf', '0083_add_file_fields_for_target'),
]
operations = [
migrations.RunSQL(
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-13 16:14
from __future__ import unicode_literals
from django.db import migrations, models, connection
from django.contrib.contenttypes.models import ContentType
def set_basefilenode_target(apps, schema_editor):
BaseFileNode = apps.get_model('osf', '... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-13 16:14
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('osf', '0083_add_file_fields_for_target'),
]
operations = [
migration... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-13 16:14
from __future__ import unicode_literals
from django.db import migrations, models, connection
from django.contrib.contenttypes.models import ContentType
def set_basefilenode_target(apps, schema_editor):
BaseFileNode = apps.get_model('osf', '... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-13 16:14
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('osf', '0083_add_file_fields_for_target'),
]
operations = [
migrations.RunSQL(
... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-13 16:14
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('osf', '0083_add_file_fields_for_target'),
]
operations = [
migration... |
d9d52d2ba93b29f04d1f0e6903a6a343718f7bce | Instanssi/dblog/models.py | Instanssi/dblog/models.py | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from Instanssi.kompomaatti.models import Event
class DBLogEntry(models.Model):
user = models.ForeignKey(User, blank=True, null=True)
event = models.ForeignKey(Event, blank=True, null=True)
date = models.DateT... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from Instanssi.kompomaatti.models import Event
class DBLogEntry(models.Model):
user = models.ForeignKey(User, blank=True, null=True)
event = models.ForeignKey(Event, blank=True, null=True)
date = models.DateT... | Fix log entry __unicode__ method functionality | dblog: Fix log entry __unicode__ method functionality
| Python | mit | Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from Instanssi.kompomaatti.models import Event
class DBLogEntry(models.Model):
user = models.ForeignKey(User, blank=True, null=True)
event = models.ForeignKey(Event, blank=True, null=True)
date = models.DateT... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from Instanssi.kompomaatti.models import Event
class DBLogEntry(models.Model):
user = models.ForeignKey(User, blank=True, null=True)
event = models.ForeignKey(Event, blank=True, null=True)
date = models.DateT... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from Instanssi.kompomaatti.models import Event
class DBLogEntry(models.Model):
user = models.ForeignKey(User, blank=True, null=True)
event = models.ForeignKey(Event, blank=True, null=True)
date... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from Instanssi.kompomaatti.models import Event
class DBLogEntry(models.Model):
user = models.ForeignKey(User, blank=True, null=True)
event = models.ForeignKey(Event, blank=True, null=True)
date = models.DateT... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from Instanssi.kompomaatti.models import Event
class DBLogEntry(models.Model):
user = models.ForeignKey(User, blank=True, null=True)
event = models.ForeignKey(Event, blank=True, null=True)
date = models.DateT... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from Instanssi.kompomaatti.models import Event
class DBLogEntry(models.Model):
user = models.ForeignKey(User, blank=True, null=True)
event = models.ForeignKey(Event, blank=True, null=True)
date... |
77d3f60468fcf814c19d693e3401b1769e4993a9 | cob/cli/migrate_cli.py | cob/cli/migrate_cli.py | import click
import logbook
from .utils import appcontext_command
from ..ctx import context
import flask_migrate
_logger = logbook.Logger(__name__)
@click.group()
def migrate():
pass
@migrate.command()
@appcontext_command
def init():
flask_migrate.init('migrations', False)
@migrate.command()
@click.opt... | import click
import logbook
from .utils import appcontext_command
from ..ctx import context
import flask_migrate
_logger = logbook.Logger(__name__)
@click.group()
def migrate():
pass
@migrate.command()
@appcontext_command
def init():
flask_migrate.init('migrations', False)
@migrate.command()
@click.opt... | Fix typo in cob migrate down | Fix typo in cob migrate down
| Python | bsd-3-clause | getweber/weber-cli | import click
import logbook
from .utils import appcontext_command
from ..ctx import context
import flask_migrate
_logger = logbook.Logger(__name__)
@click.group()
def migrate():
pass
@migrate.command()
@appcontext_command
def init():
flask_migrate.init('migrations', False)
@migrate.command()
@click.opt... | import click
import logbook
from .utils import appcontext_command
from ..ctx import context
import flask_migrate
_logger = logbook.Logger(__name__)
@click.group()
def migrate():
pass
@migrate.command()
@appcontext_command
def init():
flask_migrate.init('migrations', False)
@migrate.command()
@click.opt... | <commit_before>import click
import logbook
from .utils import appcontext_command
from ..ctx import context
import flask_migrate
_logger = logbook.Logger(__name__)
@click.group()
def migrate():
pass
@migrate.command()
@appcontext_command
def init():
flask_migrate.init('migrations', False)
@migrate.comma... | import click
import logbook
from .utils import appcontext_command
from ..ctx import context
import flask_migrate
_logger = logbook.Logger(__name__)
@click.group()
def migrate():
pass
@migrate.command()
@appcontext_command
def init():
flask_migrate.init('migrations', False)
@migrate.command()
@click.opt... | import click
import logbook
from .utils import appcontext_command
from ..ctx import context
import flask_migrate
_logger = logbook.Logger(__name__)
@click.group()
def migrate():
pass
@migrate.command()
@appcontext_command
def init():
flask_migrate.init('migrations', False)
@migrate.command()
@click.opt... | <commit_before>import click
import logbook
from .utils import appcontext_command
from ..ctx import context
import flask_migrate
_logger = logbook.Logger(__name__)
@click.group()
def migrate():
pass
@migrate.command()
@appcontext_command
def init():
flask_migrate.init('migrations', False)
@migrate.comma... |
56e2bea0798ae3afbc50d53947e505e7df9edba3 | config/invariant_checks.py | config/invariant_checks.py | from sts.invariant_checker import InvariantChecker
def check_for_loops_or_connectivity(simulation):
from sts.invariant_checker import InvariantChecker
result = InvariantChecker.check_loops(simulation)
if result:
return result
result = InvariantChecker.python_check_connectivity(simulation)
if not result:
... | from sts.invariant_checker import InvariantChecker
import sys
def bail_on_connectivity(simulation):
result = InvariantChecker.python_check_connectivity(simulation)
if not result:
print "Connectivity established - bailing out"
sys.exit(0)
return []
def check_for_loops_or_connectivity(simulation):
resul... | Add a new invariant check: check blackholes *or* loops | Add a new invariant check: check blackholes *or* loops
| Python | apache-2.0 | ucb-sts/sts,jmiserez/sts,jmiserez/sts,ucb-sts/sts | from sts.invariant_checker import InvariantChecker
def check_for_loops_or_connectivity(simulation):
from sts.invariant_checker import InvariantChecker
result = InvariantChecker.check_loops(simulation)
if result:
return result
result = InvariantChecker.python_check_connectivity(simulation)
if not result:
... | from sts.invariant_checker import InvariantChecker
import sys
def bail_on_connectivity(simulation):
result = InvariantChecker.python_check_connectivity(simulation)
if not result:
print "Connectivity established - bailing out"
sys.exit(0)
return []
def check_for_loops_or_connectivity(simulation):
resul... | <commit_before>from sts.invariant_checker import InvariantChecker
def check_for_loops_or_connectivity(simulation):
from sts.invariant_checker import InvariantChecker
result = InvariantChecker.check_loops(simulation)
if result:
return result
result = InvariantChecker.python_check_connectivity(simulation)
... | from sts.invariant_checker import InvariantChecker
import sys
def bail_on_connectivity(simulation):
result = InvariantChecker.python_check_connectivity(simulation)
if not result:
print "Connectivity established - bailing out"
sys.exit(0)
return []
def check_for_loops_or_connectivity(simulation):
resul... | from sts.invariant_checker import InvariantChecker
def check_for_loops_or_connectivity(simulation):
from sts.invariant_checker import InvariantChecker
result = InvariantChecker.check_loops(simulation)
if result:
return result
result = InvariantChecker.python_check_connectivity(simulation)
if not result:
... | <commit_before>from sts.invariant_checker import InvariantChecker
def check_for_loops_or_connectivity(simulation):
from sts.invariant_checker import InvariantChecker
result = InvariantChecker.check_loops(simulation)
if result:
return result
result = InvariantChecker.python_check_connectivity(simulation)
... |
d58c04d9745f1a0af46f35fba7b3e2aef704547e | application.py | application.py | import os
from flask import Flask
from whitenoise import WhiteNoise
from app import create_app
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'app', 'static')
STATIC_URL = 'static/'
app = Flask('app')
create_app(app)
application = WhiteNoise(app, STATIC_ROOT, STA... | import os
from flask import Flask
from whitenoise import WhiteNoise
from app import create_app
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'app', 'static')
STATIC_URL = 'static/'
app = Flask('app')
create_app(app)
app.wsgi_app = WhiteNoise(app.wsgi_app, STATIC... | Make Whitenoise serve static assets | Make Whitenoise serve static assets
Currently it’s not configured properly, so isn’t having any effect.
This change makes it wrap the Flask app, so it intercepts any requests
for static content.
Follows the pattern documented in http://whitenoise.evans.io/en/stable/flask.html#enable-whitenoise
| Python | mit | alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin | import os
from flask import Flask
from whitenoise import WhiteNoise
from app import create_app
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'app', 'static')
STATIC_URL = 'static/'
app = Flask('app')
create_app(app)
application = WhiteNoise(app, STATIC_ROOT, STA... | import os
from flask import Flask
from whitenoise import WhiteNoise
from app import create_app
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'app', 'static')
STATIC_URL = 'static/'
app = Flask('app')
create_app(app)
app.wsgi_app = WhiteNoise(app.wsgi_app, STATIC... | <commit_before>import os
from flask import Flask
from whitenoise import WhiteNoise
from app import create_app
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'app', 'static')
STATIC_URL = 'static/'
app = Flask('app')
create_app(app)
application = WhiteNoise(app, S... | import os
from flask import Flask
from whitenoise import WhiteNoise
from app import create_app
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'app', 'static')
STATIC_URL = 'static/'
app = Flask('app')
create_app(app)
app.wsgi_app = WhiteNoise(app.wsgi_app, STATIC... | import os
from flask import Flask
from whitenoise import WhiteNoise
from app import create_app
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'app', 'static')
STATIC_URL = 'static/'
app = Flask('app')
create_app(app)
application = WhiteNoise(app, STATIC_ROOT, STA... | <commit_before>import os
from flask import Flask
from whitenoise import WhiteNoise
from app import create_app
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'app', 'static')
STATIC_URL = 'static/'
app = Flask('app')
create_app(app)
application = WhiteNoise(app, S... |
7231111564145bdbc773ed2bb5479b6edc0c7426 | issues/admin.py | issues/admin.py | from django.contrib.admin import site, ModelAdmin
from .models import Issue, Jurisdiction, Service, Application
class ApplicationAdmin(ModelAdmin):
list_display = ('identifier', 'name', 'active')
list_filter = ('active',)
search_fields = ('identifier', 'name',)
def get_readonly_fields(self, requ... | from django.contrib.admin import site, ModelAdmin
from parler.admin import TranslatableAdmin
from .models import Issue, Jurisdiction, Service, Application
class ApplicationAdmin(ModelAdmin):
list_display = ('identifier', 'name', 'active')
list_filter = ('active',)
search_fields = ('identifier', 'name',)
... | Use a `TranslatableAdmin` for `Service`s | Use a `TranslatableAdmin` for `Service`s
Fixes #70
| Python | mit | 6aika/issue-reporting,6aika/issue-reporting,6aika/issue-reporting | from django.contrib.admin import site, ModelAdmin
from .models import Issue, Jurisdiction, Service, Application
class ApplicationAdmin(ModelAdmin):
list_display = ('identifier', 'name', 'active')
list_filter = ('active',)
search_fields = ('identifier', 'name',)
def get_readonly_fields(self, requ... | from django.contrib.admin import site, ModelAdmin
from parler.admin import TranslatableAdmin
from .models import Issue, Jurisdiction, Service, Application
class ApplicationAdmin(ModelAdmin):
list_display = ('identifier', 'name', 'active')
list_filter = ('active',)
search_fields = ('identifier', 'name',)
... | <commit_before>from django.contrib.admin import site, ModelAdmin
from .models import Issue, Jurisdiction, Service, Application
class ApplicationAdmin(ModelAdmin):
list_display = ('identifier', 'name', 'active')
list_filter = ('active',)
search_fields = ('identifier', 'name',)
def get_readonly_fi... | from django.contrib.admin import site, ModelAdmin
from parler.admin import TranslatableAdmin
from .models import Issue, Jurisdiction, Service, Application
class ApplicationAdmin(ModelAdmin):
list_display = ('identifier', 'name', 'active')
list_filter = ('active',)
search_fields = ('identifier', 'name',)
... | from django.contrib.admin import site, ModelAdmin
from .models import Issue, Jurisdiction, Service, Application
class ApplicationAdmin(ModelAdmin):
list_display = ('identifier', 'name', 'active')
list_filter = ('active',)
search_fields = ('identifier', 'name',)
def get_readonly_fields(self, requ... | <commit_before>from django.contrib.admin import site, ModelAdmin
from .models import Issue, Jurisdiction, Service, Application
class ApplicationAdmin(ModelAdmin):
list_display = ('identifier', 'name', 'active')
list_filter = ('active',)
search_fields = ('identifier', 'name',)
def get_readonly_fi... |
4d446f6b810fdb1a996ab9b65259c1212c6b951a | connect_to_postgres.py | connect_to_postgres.py | import os
import psycopg2
import urlparse
urlparse.uses_netloc.append("postgres")
url = urlparse.urlparse(os.environ["DATABASE_URL"])
conn = psycopg2.connect(
database=url.path[1:],
user=url.username,
password=url.password,
host=url.hostname,
port=url.port
)
cur = conn.cursor()
cur.execute("SE... | import os
import psycopg2
import urlparse
# urlparse.uses_netloc.append("postgres")
# url = urlparse.urlparse(os.environ["DATABASE_URL"])
# conn = psycopg2.connect(
# database=url.path[1:],
# user=url.username,
# password=url.password,
# host=url.hostname,
# port=url.port
# )
# cur = conn.cursor(... | Test functional version of connecting to postgres | Test functional version of connecting to postgres
| Python | mit | gsganden/pitcher-reports,gsganden/pitcher-reports | import os
import psycopg2
import urlparse
urlparse.uses_netloc.append("postgres")
url = urlparse.urlparse(os.environ["DATABASE_URL"])
conn = psycopg2.connect(
database=url.path[1:],
user=url.username,
password=url.password,
host=url.hostname,
port=url.port
)
cur = conn.cursor()
cur.execute("SE... | import os
import psycopg2
import urlparse
# urlparse.uses_netloc.append("postgres")
# url = urlparse.urlparse(os.environ["DATABASE_URL"])
# conn = psycopg2.connect(
# database=url.path[1:],
# user=url.username,
# password=url.password,
# host=url.hostname,
# port=url.port
# )
# cur = conn.cursor(... | <commit_before>import os
import psycopg2
import urlparse
urlparse.uses_netloc.append("postgres")
url = urlparse.urlparse(os.environ["DATABASE_URL"])
conn = psycopg2.connect(
database=url.path[1:],
user=url.username,
password=url.password,
host=url.hostname,
port=url.port
)
cur = conn.cursor()
... | import os
import psycopg2
import urlparse
# urlparse.uses_netloc.append("postgres")
# url = urlparse.urlparse(os.environ["DATABASE_URL"])
# conn = psycopg2.connect(
# database=url.path[1:],
# user=url.username,
# password=url.password,
# host=url.hostname,
# port=url.port
# )
# cur = conn.cursor(... | import os
import psycopg2
import urlparse
urlparse.uses_netloc.append("postgres")
url = urlparse.urlparse(os.environ["DATABASE_URL"])
conn = psycopg2.connect(
database=url.path[1:],
user=url.username,
password=url.password,
host=url.hostname,
port=url.port
)
cur = conn.cursor()
cur.execute("SE... | <commit_before>import os
import psycopg2
import urlparse
urlparse.uses_netloc.append("postgres")
url = urlparse.urlparse(os.environ["DATABASE_URL"])
conn = psycopg2.connect(
database=url.path[1:],
user=url.username,
password=url.password,
host=url.hostname,
port=url.port
)
cur = conn.cursor()
... |
5839e70f2ffab6640997e3a609a26e50ff2b4da6 | opps/containers/urls.py | opps/containers/urls.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.decorators.cache import cache_page
from .views import ContainerList, ContainerDetail
from .views import Search
from opps.contrib.feeds.views import ContainerFeed, ChannelFeed
ur... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.decorators.cache import cache_page
from .views import ContainerList, ContainerDetail
from .views import ContainerAPIList, ContainerAPIDetail
from .views import Search
from opps.co... | Add url entry container api | Add url entry container api
| Python | mit | jeanmask/opps,williamroot/opps,opps/opps,opps/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,opps/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,YACOWS/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.decorators.cache import cache_page
from .views import ContainerList, ContainerDetail
from .views import Search
from opps.contrib.feeds.views import ContainerFeed, ChannelFeed
ur... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.decorators.cache import cache_page
from .views import ContainerList, ContainerDetail
from .views import ContainerAPIList, ContainerAPIDetail
from .views import Search
from opps.co... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.decorators.cache import cache_page
from .views import ContainerList, ContainerDetail
from .views import Search
from opps.contrib.feeds.views import ContainerFeed, C... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.decorators.cache import cache_page
from .views import ContainerList, ContainerDetail
from .views import ContainerAPIList, ContainerAPIDetail
from .views import Search
from opps.co... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.decorators.cache import cache_page
from .views import ContainerList, ContainerDetail
from .views import Search
from opps.contrib.feeds.views import ContainerFeed, ChannelFeed
ur... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.decorators.cache import cache_page
from .views import ContainerList, ContainerDetail
from .views import Search
from opps.contrib.feeds.views import ContainerFeed, C... |
959c317f9929dc781d9ad08611896963f1bc3172 | zou/app/blueprints/crud/notifications.py | zou/app/blueprints/crud/notifications.py | from zou.app.models.notifications import Notification
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class NotificationsResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, Notification)
def check_create_permissions(self,... | from zou.app.models.notifications import Notification
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class NotificationsResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, Notification)
def check_create_permissions(self,... | Fix crud controller for notifacation | Fix crud controller for notifacation
It was not possible to get, update or retrieve a notification
| Python | agpl-3.0 | cgwire/zou | from zou.app.models.notifications import Notification
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class NotificationsResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, Notification)
def check_create_permissions(self,... | from zou.app.models.notifications import Notification
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class NotificationsResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, Notification)
def check_create_permissions(self,... | <commit_before>from zou.app.models.notifications import Notification
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class NotificationsResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, Notification)
def check_create_pe... | from zou.app.models.notifications import Notification
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class NotificationsResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, Notification)
def check_create_permissions(self,... | from zou.app.models.notifications import Notification
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class NotificationsResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, Notification)
def check_create_permissions(self,... | <commit_before>from zou.app.models.notifications import Notification
from zou.app.utils import permissions
from .base import BaseModelResource, BaseModelsResource
class NotificationsResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, Notification)
def check_create_pe... |
adc76c9a629cb9f6e70ea1780351304dfba16197 | pcad/gen.py | pcad/gen.py | from genshi.template import TemplateLoader
import os
import sys
if len(sys.argv) < 2:
print("I need the name of a file as the first argument!")
exit(1)
loader = TemplateLoader(os.path.dirname(__file__))
tmpl = loader.load(sys.argv[1])
print(tmpl.generate(r_outer=100,
r_inner=25,
... | from genshi.template import TemplateLoader
import os
import sys
if len(sys.argv) < 2:
print("I need the name of a file as the first argument!")
exit(1)
loader = TemplateLoader(os.path.dirname(__file__))
tmpl = loader.load(sys.argv[1])
print(tmpl.generate(r_outer=100,
r_inner=25,
... | Increase spacing for quadrature encoders | Increase spacing for quadrature encoders
| Python | mit | WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox | from genshi.template import TemplateLoader
import os
import sys
if len(sys.argv) < 2:
print("I need the name of a file as the first argument!")
exit(1)
loader = TemplateLoader(os.path.dirname(__file__))
tmpl = loader.load(sys.argv[1])
print(tmpl.generate(r_outer=100,
r_inner=25,
... | from genshi.template import TemplateLoader
import os
import sys
if len(sys.argv) < 2:
print("I need the name of a file as the first argument!")
exit(1)
loader = TemplateLoader(os.path.dirname(__file__))
tmpl = loader.load(sys.argv[1])
print(tmpl.generate(r_outer=100,
r_inner=25,
... | <commit_before>from genshi.template import TemplateLoader
import os
import sys
if len(sys.argv) < 2:
print("I need the name of a file as the first argument!")
exit(1)
loader = TemplateLoader(os.path.dirname(__file__))
tmpl = loader.load(sys.argv[1])
print(tmpl.generate(r_outer=100,
r_inner... | from genshi.template import TemplateLoader
import os
import sys
if len(sys.argv) < 2:
print("I need the name of a file as the first argument!")
exit(1)
loader = TemplateLoader(os.path.dirname(__file__))
tmpl = loader.load(sys.argv[1])
print(tmpl.generate(r_outer=100,
r_inner=25,
... | from genshi.template import TemplateLoader
import os
import sys
if len(sys.argv) < 2:
print("I need the name of a file as the first argument!")
exit(1)
loader = TemplateLoader(os.path.dirname(__file__))
tmpl = loader.load(sys.argv[1])
print(tmpl.generate(r_outer=100,
r_inner=25,
... | <commit_before>from genshi.template import TemplateLoader
import os
import sys
if len(sys.argv) < 2:
print("I need the name of a file as the first argument!")
exit(1)
loader = TemplateLoader(os.path.dirname(__file__))
tmpl = loader.load(sys.argv[1])
print(tmpl.generate(r_outer=100,
r_inner... |
6c1b81705beeaf9981deb2890382622026a37ba9 | app/redidropper/startup/initializer.py | app/redidropper/startup/initializer.py | # Goal: Init the application routes and read the settings
#
# @authors:
# Andrei Sura <sura.andrei@gmail.com>
# Ruchi Vivek Desai <ruchivdesai@gmail.com>
# Sanath Pasumarthy <sanath@ufl.edu>
from flask_user import UserManager, SQLAlchemyAdapter
import logging
def do_init(app, db, extra_... | # Goal: Init the application routes and read the settings
#
# @authors:
# Andrei Sura <sura.andrei@gmail.com>
# Ruchi Vivek Desai <ruchivdesai@gmail.com>
# Sanath Pasumarthy <sanath@ufl.edu>
from flask_user import UserManager, SQLAlchemyAdapter
import logging
from logging import Formatter... | Call `configure_logging` to enable more debug information | Call `configure_logging` to enable more debug information
| Python | bsd-3-clause | indera/redi-dropper-client,indera/redi-dropper-client,indera/redi-dropper-client,indera/redi-dropper-client,indera/redi-dropper-client | # Goal: Init the application routes and read the settings
#
# @authors:
# Andrei Sura <sura.andrei@gmail.com>
# Ruchi Vivek Desai <ruchivdesai@gmail.com>
# Sanath Pasumarthy <sanath@ufl.edu>
from flask_user import UserManager, SQLAlchemyAdapter
import logging
def do_init(app, db, extra_... | # Goal: Init the application routes and read the settings
#
# @authors:
# Andrei Sura <sura.andrei@gmail.com>
# Ruchi Vivek Desai <ruchivdesai@gmail.com>
# Sanath Pasumarthy <sanath@ufl.edu>
from flask_user import UserManager, SQLAlchemyAdapter
import logging
from logging import Formatter... | <commit_before># Goal: Init the application routes and read the settings
#
# @authors:
# Andrei Sura <sura.andrei@gmail.com>
# Ruchi Vivek Desai <ruchivdesai@gmail.com>
# Sanath Pasumarthy <sanath@ufl.edu>
from flask_user import UserManager, SQLAlchemyAdapter
import logging
def do_init(... | # Goal: Init the application routes and read the settings
#
# @authors:
# Andrei Sura <sura.andrei@gmail.com>
# Ruchi Vivek Desai <ruchivdesai@gmail.com>
# Sanath Pasumarthy <sanath@ufl.edu>
from flask_user import UserManager, SQLAlchemyAdapter
import logging
from logging import Formatter... | # Goal: Init the application routes and read the settings
#
# @authors:
# Andrei Sura <sura.andrei@gmail.com>
# Ruchi Vivek Desai <ruchivdesai@gmail.com>
# Sanath Pasumarthy <sanath@ufl.edu>
from flask_user import UserManager, SQLAlchemyAdapter
import logging
def do_init(app, db, extra_... | <commit_before># Goal: Init the application routes and read the settings
#
# @authors:
# Andrei Sura <sura.andrei@gmail.com>
# Ruchi Vivek Desai <ruchivdesai@gmail.com>
# Sanath Pasumarthy <sanath@ufl.edu>
from flask_user import UserManager, SQLAlchemyAdapter
import logging
def do_init(... |
0cf393c9bafbe99e29a76cf289f34ac8edcc9416 | pianette/PianetteApi.py | pianette/PianetteApi.py | # coding: utf-8
from pianette.utils import Debug
from flask import Flask, render_template, request
from threading import Thread
app = Flask(__name__, template_folder='../templates')
import logging
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
@app.route('/', methods = ['GET'])
def home():
retur... | # coding: utf-8
from pianette.utils import Debug
from flask import Flask, render_template, request
from threading import Thread
app = Flask(__name__, template_folder='../templates')
import logging
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
@app.route('/', methods = ['GET'])
def home():
retur... | Add external IP for Flask | Add external IP for Flask
| Python | mit | tchapi/pianette,tchapi/pianette,tchapi/pianette,tchapi/pianette | # coding: utf-8
from pianette.utils import Debug
from flask import Flask, render_template, request
from threading import Thread
app = Flask(__name__, template_folder='../templates')
import logging
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
@app.route('/', methods = ['GET'])
def home():
retur... | # coding: utf-8
from pianette.utils import Debug
from flask import Flask, render_template, request
from threading import Thread
app = Flask(__name__, template_folder='../templates')
import logging
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
@app.route('/', methods = ['GET'])
def home():
retur... | <commit_before># coding: utf-8
from pianette.utils import Debug
from flask import Flask, render_template, request
from threading import Thread
app = Flask(__name__, template_folder='../templates')
import logging
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
@app.route('/', methods = ['GET'])
def ho... | # coding: utf-8
from pianette.utils import Debug
from flask import Flask, render_template, request
from threading import Thread
app = Flask(__name__, template_folder='../templates')
import logging
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
@app.route('/', methods = ['GET'])
def home():
retur... | # coding: utf-8
from pianette.utils import Debug
from flask import Flask, render_template, request
from threading import Thread
app = Flask(__name__, template_folder='../templates')
import logging
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
@app.route('/', methods = ['GET'])
def home():
retur... | <commit_before># coding: utf-8
from pianette.utils import Debug
from flask import Flask, render_template, request
from threading import Thread
app = Flask(__name__, template_folder='../templates')
import logging
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
@app.route('/', methods = ['GET'])
def ho... |
2205ea40f64b09f611b7f6cb4c9716d8e29136d4 | grammpy/Rule.py | grammpy/Rule.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
class Rule:
pass
| #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from grammpy import EPSILON
class Rule:
right = [EPSILON]
left = [EPSILON]
rule = ([EPSILON], [EPSILON])
rules = [([EPSILON], [EPSILON])]
def is_regular(self):
return False
... | Add base interface for rule | Add base interface for rule
| Python | mit | PatrikValkovic/grammpy | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
class Rule:
pass
Add base interface for rule | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from grammpy import EPSILON
class Rule:
right = [EPSILON]
left = [EPSILON]
rule = ([EPSILON], [EPSILON])
rules = [([EPSILON], [EPSILON])]
def is_regular(self):
return False
... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
class Rule:
pass
<commit_msg>Add base interface for rule<commit_after> | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from grammpy import EPSILON
class Rule:
right = [EPSILON]
left = [EPSILON]
rule = ([EPSILON], [EPSILON])
rules = [([EPSILON], [EPSILON])]
def is_regular(self):
return False
... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
class Rule:
pass
Add base interface for rule#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from grammpy import EPSILON
class Rule:
... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
class Rule:
pass
<commit_msg>Add base interface for rule<commit_after>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from... |
0ea263fa9a496d8dbd8ff3f966cc23eba170842c | django_mfa/models.py | django_mfa/models.py | from django.db import models
from django.conf import settings
class UserOTP(models.Model):
OTP_TYPES = (
('HOTP', 'hotp'),
('TOTP', 'totp'),
)
user = models.OneToOneField(settings.AUTH_USER_MODEL)
otp_type = models.CharField(max_length=20, choices=OTP_TYPES)
secre... | from django.conf import settings
from django.db import models
class UserOTP(models.Model):
OTP_TYPES = (
('HOTP', 'hotp'),
('TOTP', 'totp'),
)
user = models.OneToOneField(settings.AUTH_USER_MODEL)
otp_type = models.CharField(max_length=20, choices=OTP_TYPES)
secret_key = models.C... | Remove try/except from determing if mfa is enabled | Remove try/except from determing if mfa is enabled
| Python | mit | MicroPyramid/django-mfa,MicroPyramid/django-mfa,MicroPyramid/django-mfa | from django.db import models
from django.conf import settings
class UserOTP(models.Model):
OTP_TYPES = (
('HOTP', 'hotp'),
('TOTP', 'totp'),
)
user = models.OneToOneField(settings.AUTH_USER_MODEL)
otp_type = models.CharField(max_length=20, choices=OTP_TYPES)
secre... | from django.conf import settings
from django.db import models
class UserOTP(models.Model):
OTP_TYPES = (
('HOTP', 'hotp'),
('TOTP', 'totp'),
)
user = models.OneToOneField(settings.AUTH_USER_MODEL)
otp_type = models.CharField(max_length=20, choices=OTP_TYPES)
secret_key = models.C... | <commit_before>from django.db import models
from django.conf import settings
class UserOTP(models.Model):
OTP_TYPES = (
('HOTP', 'hotp'),
('TOTP', 'totp'),
)
user = models.OneToOneField(settings.AUTH_USER_MODEL)
otp_type = models.CharField(max_length=20, choices=OTP_T... | from django.conf import settings
from django.db import models
class UserOTP(models.Model):
OTP_TYPES = (
('HOTP', 'hotp'),
('TOTP', 'totp'),
)
user = models.OneToOneField(settings.AUTH_USER_MODEL)
otp_type = models.CharField(max_length=20, choices=OTP_TYPES)
secret_key = models.C... | from django.db import models
from django.conf import settings
class UserOTP(models.Model):
OTP_TYPES = (
('HOTP', 'hotp'),
('TOTP', 'totp'),
)
user = models.OneToOneField(settings.AUTH_USER_MODEL)
otp_type = models.CharField(max_length=20, choices=OTP_TYPES)
secre... | <commit_before>from django.db import models
from django.conf import settings
class UserOTP(models.Model):
OTP_TYPES = (
('HOTP', 'hotp'),
('TOTP', 'totp'),
)
user = models.OneToOneField(settings.AUTH_USER_MODEL)
otp_type = models.CharField(max_length=20, choices=OTP_T... |
2bdbcf41cc99f9c7430f8d429cc8d2a5e2ee6701 | pyrho/NEURON/minimal.py | pyrho/NEURON/minimal.py | # minNEURON.py
cell = h.SectionList()
soma = h.Section(name='soma') #create soma
soma.push()
#h.topology()
# Geometry
soma.nseg = 1
soma.L = 20
soma.diam = 20
# Biophysics
for sec in h.allsec():
sec.Ra = 100
sec.cm = 1
sec.insert('pas')
#sec.insert('hh') # insert hh
cell.append(sec)
#h('objre... | # minNEURON.py
from neuron import h
cell = h.SectionList()
soma = h.Section(name='soma') #create soma
soma.push()
#h.topology()
# Geometry
soma.nseg = 1
soma.L = 20
soma.diam = 20
# Biophysics
for sec in h.allsec():
sec.Ra = 100
sec.cm = 1
sec.insert('pas')
#sec.insert('hh') # insert hh
cell.a... | Add import to stop warnings | Add import to stop warnings
| Python | bsd-3-clause | ProjectPyRhO/PyRhO,ProjectPyRhO/PyRhO | # minNEURON.py
cell = h.SectionList()
soma = h.Section(name='soma') #create soma
soma.push()
#h.topology()
# Geometry
soma.nseg = 1
soma.L = 20
soma.diam = 20
# Biophysics
for sec in h.allsec():
sec.Ra = 100
sec.cm = 1
sec.insert('pas')
#sec.insert('hh') # insert hh
cell.append(sec)
#h('objre... | # minNEURON.py
from neuron import h
cell = h.SectionList()
soma = h.Section(name='soma') #create soma
soma.push()
#h.topology()
# Geometry
soma.nseg = 1
soma.L = 20
soma.diam = 20
# Biophysics
for sec in h.allsec():
sec.Ra = 100
sec.cm = 1
sec.insert('pas')
#sec.insert('hh') # insert hh
cell.a... | <commit_before># minNEURON.py
cell = h.SectionList()
soma = h.Section(name='soma') #create soma
soma.push()
#h.topology()
# Geometry
soma.nseg = 1
soma.L = 20
soma.diam = 20
# Biophysics
for sec in h.allsec():
sec.Ra = 100
sec.cm = 1
sec.insert('pas')
#sec.insert('hh') # insert hh
cell.append(... | # minNEURON.py
from neuron import h
cell = h.SectionList()
soma = h.Section(name='soma') #create soma
soma.push()
#h.topology()
# Geometry
soma.nseg = 1
soma.L = 20
soma.diam = 20
# Biophysics
for sec in h.allsec():
sec.Ra = 100
sec.cm = 1
sec.insert('pas')
#sec.insert('hh') # insert hh
cell.a... | # minNEURON.py
cell = h.SectionList()
soma = h.Section(name='soma') #create soma
soma.push()
#h.topology()
# Geometry
soma.nseg = 1
soma.L = 20
soma.diam = 20
# Biophysics
for sec in h.allsec():
sec.Ra = 100
sec.cm = 1
sec.insert('pas')
#sec.insert('hh') # insert hh
cell.append(sec)
#h('objre... | <commit_before># minNEURON.py
cell = h.SectionList()
soma = h.Section(name='soma') #create soma
soma.push()
#h.topology()
# Geometry
soma.nseg = 1
soma.L = 20
soma.diam = 20
# Biophysics
for sec in h.allsec():
sec.Ra = 100
sec.cm = 1
sec.insert('pas')
#sec.insert('hh') # insert hh
cell.append(... |
800d69acf0e7a68d39e0e258258b750d3b8e0ace | debugtools/__init__.py | debugtools/__init__.py | # following PEP 386
__version__ = "1.2"
VERSION = (1, 2)
# Make sure the ``{% print %}`` is always available, even without a {% load debug_tags %} call.
# **NOTE** this uses the undocumented, unofficial add_to_builtins() call. It's not promoted
# by Django developers because it's better to be explicit with a {% load ... | # following PEP 386
__version__ = "1.2"
VERSION = (1, 2)
# Make sure the ``{% print %}`` is always available, even without a {% load debug_tags %} call.
# **NOTE** this uses the undocumented, unofficial add_to_builtins() call. It's not promoted
# by Django developers because it's better to be explicit with a {% load ... | Fix add_to_builtins import for Django 1.7 support | Fix add_to_builtins import for Django 1.7 support
Older Django versions also use this location already.
| Python | apache-2.0 | edoburu/django-debugtools,edoburu/django-debugtools,edoburu/django-debugtools | # following PEP 386
__version__ = "1.2"
VERSION = (1, 2)
# Make sure the ``{% print %}`` is always available, even without a {% load debug_tags %} call.
# **NOTE** this uses the undocumented, unofficial add_to_builtins() call. It's not promoted
# by Django developers because it's better to be explicit with a {% load ... | # following PEP 386
__version__ = "1.2"
VERSION = (1, 2)
# Make sure the ``{% print %}`` is always available, even without a {% load debug_tags %} call.
# **NOTE** this uses the undocumented, unofficial add_to_builtins() call. It's not promoted
# by Django developers because it's better to be explicit with a {% load ... | <commit_before># following PEP 386
__version__ = "1.2"
VERSION = (1, 2)
# Make sure the ``{% print %}`` is always available, even without a {% load debug_tags %} call.
# **NOTE** this uses the undocumented, unofficial add_to_builtins() call. It's not promoted
# by Django developers because it's better to be explicit ... | # following PEP 386
__version__ = "1.2"
VERSION = (1, 2)
# Make sure the ``{% print %}`` is always available, even without a {% load debug_tags %} call.
# **NOTE** this uses the undocumented, unofficial add_to_builtins() call. It's not promoted
# by Django developers because it's better to be explicit with a {% load ... | # following PEP 386
__version__ = "1.2"
VERSION = (1, 2)
# Make sure the ``{% print %}`` is always available, even without a {% load debug_tags %} call.
# **NOTE** this uses the undocumented, unofficial add_to_builtins() call. It's not promoted
# by Django developers because it's better to be explicit with a {% load ... | <commit_before># following PEP 386
__version__ = "1.2"
VERSION = (1, 2)
# Make sure the ``{% print %}`` is always available, even without a {% load debug_tags %} call.
# **NOTE** this uses the undocumented, unofficial add_to_builtins() call. It's not promoted
# by Django developers because it's better to be explicit ... |
be16b3c2b67f160e46ed951a8e9e691bc09b8d05 | easypyplot/pdf.py | easypyplot/pdf.py | """
* Copyright (c) 2016. Mingyu Gao
* All rights reserved.
*
"""
import matplotlib.backends.backend_pdf
from .format import paper_plot
def plot_setup(name, dims, fontsize=9):
""" Setup a PDF page for plot.
name: PDF file name. If not ending with .pdf, will automatically append.
dims: dimension of the... | """
* Copyright (c) 2016. Mingyu Gao
* All rights reserved.
*
"""
from contextlib import contextmanager
import matplotlib.backends.backend_pdf
from .format import paper_plot
def plot_setup(name, figsize=None, fontsize=9):
""" Setup a PDF page for plot.
name: PDF file name. If not ending with .pdf, will au... | Add a context manager for PDF plot. | Add a context manager for PDF plot.
| Python | bsd-3-clause | gaomy3832/easypyplot,gaomy3832/easypyplot | """
* Copyright (c) 2016. Mingyu Gao
* All rights reserved.
*
"""
import matplotlib.backends.backend_pdf
from .format import paper_plot
def plot_setup(name, dims, fontsize=9):
""" Setup a PDF page for plot.
name: PDF file name. If not ending with .pdf, will automatically append.
dims: dimension of the... | """
* Copyright (c) 2016. Mingyu Gao
* All rights reserved.
*
"""
from contextlib import contextmanager
import matplotlib.backends.backend_pdf
from .format import paper_plot
def plot_setup(name, figsize=None, fontsize=9):
""" Setup a PDF page for plot.
name: PDF file name. If not ending with .pdf, will au... | <commit_before>"""
* Copyright (c) 2016. Mingyu Gao
* All rights reserved.
*
"""
import matplotlib.backends.backend_pdf
from .format import paper_plot
def plot_setup(name, dims, fontsize=9):
""" Setup a PDF page for plot.
name: PDF file name. If not ending with .pdf, will automatically append.
dims: d... | """
* Copyright (c) 2016. Mingyu Gao
* All rights reserved.
*
"""
from contextlib import contextmanager
import matplotlib.backends.backend_pdf
from .format import paper_plot
def plot_setup(name, figsize=None, fontsize=9):
""" Setup a PDF page for plot.
name: PDF file name. If not ending with .pdf, will au... | """
* Copyright (c) 2016. Mingyu Gao
* All rights reserved.
*
"""
import matplotlib.backends.backend_pdf
from .format import paper_plot
def plot_setup(name, dims, fontsize=9):
""" Setup a PDF page for plot.
name: PDF file name. If not ending with .pdf, will automatically append.
dims: dimension of the... | <commit_before>"""
* Copyright (c) 2016. Mingyu Gao
* All rights reserved.
*
"""
import matplotlib.backends.backend_pdf
from .format import paper_plot
def plot_setup(name, dims, fontsize=9):
""" Setup a PDF page for plot.
name: PDF file name. If not ending with .pdf, will automatically append.
dims: d... |
792d0ace4f84023d1132f8d61a88bd48e3d7775d | test/contrib/test_pyopenssl.py | test/contrib/test_pyopenssl.py | from nose.plugins.skip import SkipTest
from urllib3.packages import six
if six.PY3:
raise SkipTest('Testing of PyOpenSSL disabled on PY3')
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
raise SkipTe... | from nose.plugins.skip import SkipTest
from urllib3.packages import six
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
raise SkipTest('Could not import PyOpenSSL: %r' % e)
from ..with_dummyserver.test_... | Enable PyOpenSSL testing on Python 3. | Enable PyOpenSSL testing on Python 3.
| Python | mit | Lukasa/urllib3,haikuginger/urllib3,Disassem/urllib3,urllib3/urllib3,Disassem/urllib3,haikuginger/urllib3,urllib3/urllib3,sigmavirus24/urllib3,sigmavirus24/urllib3,Lukasa/urllib3 | from nose.plugins.skip import SkipTest
from urllib3.packages import six
if six.PY3:
raise SkipTest('Testing of PyOpenSSL disabled on PY3')
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
raise SkipTe... | from nose.plugins.skip import SkipTest
from urllib3.packages import six
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
raise SkipTest('Could not import PyOpenSSL: %r' % e)
from ..with_dummyserver.test_... | <commit_before>from nose.plugins.skip import SkipTest
from urllib3.packages import six
if six.PY3:
raise SkipTest('Testing of PyOpenSSL disabled on PY3')
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
... | from nose.plugins.skip import SkipTest
from urllib3.packages import six
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
raise SkipTest('Could not import PyOpenSSL: %r' % e)
from ..with_dummyserver.test_... | from nose.plugins.skip import SkipTest
from urllib3.packages import six
if six.PY3:
raise SkipTest('Testing of PyOpenSSL disabled on PY3')
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
raise SkipTe... | <commit_before>from nose.plugins.skip import SkipTest
from urllib3.packages import six
if six.PY3:
raise SkipTest('Testing of PyOpenSSL disabled on PY3')
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
... |
ad4ecad2e5785ddeb7bbd595e59dc12345c4b256 | xbob/blitz/__init__.py | xbob/blitz/__init__.py | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
import pkg_resources
from ._library import array, as_blitz
from . import version
from .version import module as __version__
from .version import api as __api_v... | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
import pkg_resources
from ._library import array, as_blitz
from . import version
from .version import module as __version__
from .version import api as __api_v... | Add API number in get_config() | Add API number in get_config()
| Python | bsd-3-clause | tiagofrepereira2012/bob.blitz,tiagofrepereira2012/bob.blitz,tiagofrepereira2012/bob.blitz | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
import pkg_resources
from ._library import array, as_blitz
from . import version
from .version import module as __version__
from .version import api as __api_v... | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
import pkg_resources
from ._library import array, as_blitz
from . import version
from .version import module as __version__
from .version import api as __api_v... | <commit_before>#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
import pkg_resources
from ._library import array, as_blitz
from . import version
from .version import module as __version__
from .version import... | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
import pkg_resources
from ._library import array, as_blitz
from . import version
from .version import module as __version__
from .version import api as __api_v... | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
import pkg_resources
from ._library import array, as_blitz
from . import version
from .version import module as __version__
from .version import api as __api_v... | <commit_before>#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
"""Blitz++ Array bindings for Python"""
import pkg_resources
from ._library import array, as_blitz
from . import version
from .version import module as __version__
from .version import... |
0388ab2bb8ad50aa40716a1c5f83f5e1f400bb32 | scripts/start_baxter.py | scripts/start_baxter.py | #!/usr/bin/python
from baxter_myo.arm_controller import ArmController
from baxter_myo.config_reader import ConfigReader
def main():
c = ConfigReader("demo_config")
c.parse_all()
s = ArmController('right', c.right_angles, c.push_thresh)
s.move_loop()
if __name__ == "__main__":
main()
| #!/usr/bin/python
import time
import rospy
from baxter_myo.arm_controller import ArmController
from baxter_myo.config_reader import ConfigReader
def main():
c = ConfigReader("demo_config")
c.parse_all()
s = ArmController('right', c.right_angles, c.push_thresh)
while not rospy.is_shutdown():
s... | Enable ctrl-c control with rospy | Enable ctrl-c control with rospy
| Python | mit | ipab-rad/baxter_myo,ipab-rad/myo_baxter_pc,ipab-rad/myo_baxter_pc,ipab-rad/baxter_myo | #!/usr/bin/python
from baxter_myo.arm_controller import ArmController
from baxter_myo.config_reader import ConfigReader
def main():
c = ConfigReader("demo_config")
c.parse_all()
s = ArmController('right', c.right_angles, c.push_thresh)
s.move_loop()
if __name__ == "__main__":
main()
Enable ctrl-... | #!/usr/bin/python
import time
import rospy
from baxter_myo.arm_controller import ArmController
from baxter_myo.config_reader import ConfigReader
def main():
c = ConfigReader("demo_config")
c.parse_all()
s = ArmController('right', c.right_angles, c.push_thresh)
while not rospy.is_shutdown():
s... | <commit_before>#!/usr/bin/python
from baxter_myo.arm_controller import ArmController
from baxter_myo.config_reader import ConfigReader
def main():
c = ConfigReader("demo_config")
c.parse_all()
s = ArmController('right', c.right_angles, c.push_thresh)
s.move_loop()
if __name__ == "__main__":
main... | #!/usr/bin/python
import time
import rospy
from baxter_myo.arm_controller import ArmController
from baxter_myo.config_reader import ConfigReader
def main():
c = ConfigReader("demo_config")
c.parse_all()
s = ArmController('right', c.right_angles, c.push_thresh)
while not rospy.is_shutdown():
s... | #!/usr/bin/python
from baxter_myo.arm_controller import ArmController
from baxter_myo.config_reader import ConfigReader
def main():
c = ConfigReader("demo_config")
c.parse_all()
s = ArmController('right', c.right_angles, c.push_thresh)
s.move_loop()
if __name__ == "__main__":
main()
Enable ctrl-... | <commit_before>#!/usr/bin/python
from baxter_myo.arm_controller import ArmController
from baxter_myo.config_reader import ConfigReader
def main():
c = ConfigReader("demo_config")
c.parse_all()
s = ArmController('right', c.right_angles, c.push_thresh)
s.move_loop()
if __name__ == "__main__":
main... |
f198941de6191ef9f729d1d8758c588654598f48 | runtests.py | runtests.py | #!/usr/bin/env python
from __future__ import unicode_literals
import os, sys
import six
try:
from django.conf import settings
except ImportError:
print("Django has not been installed.")
sys.exit(0)
if not settings.configured:
settings.configure(
INSTALLED_APPS=["jstemplate"],
DATABAS... | #!/usr/bin/env python
from __future__ import unicode_literals
import os, sys
try:
import six
from django.conf import settings
except ImportError:
print("Django has not been installed.")
sys.exit(0)
if not settings.configured:
settings.configure(
INSTALLED_APPS=["jstemplate"],
DAT... | Check whether six has been installed before running tests | Check whether six has been installed before running tests
| Python | bsd-3-clause | mjumbewu/django-jstemplate,mjumbewu/django-jstemplate,bopo/django-jstemplate,bopo/django-jstemplate,bopo/django-jstemplate,mjumbewu/django-jstemplate | #!/usr/bin/env python
from __future__ import unicode_literals
import os, sys
import six
try:
from django.conf import settings
except ImportError:
print("Django has not been installed.")
sys.exit(0)
if not settings.configured:
settings.configure(
INSTALLED_APPS=["jstemplate"],
DATABAS... | #!/usr/bin/env python
from __future__ import unicode_literals
import os, sys
try:
import six
from django.conf import settings
except ImportError:
print("Django has not been installed.")
sys.exit(0)
if not settings.configured:
settings.configure(
INSTALLED_APPS=["jstemplate"],
DAT... | <commit_before>#!/usr/bin/env python
from __future__ import unicode_literals
import os, sys
import six
try:
from django.conf import settings
except ImportError:
print("Django has not been installed.")
sys.exit(0)
if not settings.configured:
settings.configure(
INSTALLED_APPS=["jstemplate"],
... | #!/usr/bin/env python
from __future__ import unicode_literals
import os, sys
try:
import six
from django.conf import settings
except ImportError:
print("Django has not been installed.")
sys.exit(0)
if not settings.configured:
settings.configure(
INSTALLED_APPS=["jstemplate"],
DAT... | #!/usr/bin/env python
from __future__ import unicode_literals
import os, sys
import six
try:
from django.conf import settings
except ImportError:
print("Django has not been installed.")
sys.exit(0)
if not settings.configured:
settings.configure(
INSTALLED_APPS=["jstemplate"],
DATABAS... | <commit_before>#!/usr/bin/env python
from __future__ import unicode_literals
import os, sys
import six
try:
from django.conf import settings
except ImportError:
print("Django has not been installed.")
sys.exit(0)
if not settings.configured:
settings.configure(
INSTALLED_APPS=["jstemplate"],
... |
0b8e99a6c7ecf5b35c61ce4eed1b2eec3110d41d | runtests.py | runtests.py | import os
import sys
# Force this to happen before loading django
try:
os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings"
test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, test_dir)
except ImportError:
pass
else:
import django
from django.conf ... | import argparse
import os
import sys
# Force this to happen before loading django
try:
os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings"
test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, test_dir)
except ImportError:
pass
else:
import django
f... | Add ability to run tests with verbosity and failfast options | Add ability to run tests with verbosity and failfast options
| Python | mit | aljosa/django-tinymce,aljosa/django-tinymce,aljosa/django-tinymce,aljosa/django-tinymce | import os
import sys
# Force this to happen before loading django
try:
os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings"
test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, test_dir)
except ImportError:
pass
else:
import django
from django.conf ... | import argparse
import os
import sys
# Force this to happen before loading django
try:
os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings"
test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, test_dir)
except ImportError:
pass
else:
import django
f... | <commit_before>import os
import sys
# Force this to happen before loading django
try:
os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings"
test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, test_dir)
except ImportError:
pass
else:
import django
fr... | import argparse
import os
import sys
# Force this to happen before loading django
try:
os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings"
test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, test_dir)
except ImportError:
pass
else:
import django
f... | import os
import sys
# Force this to happen before loading django
try:
os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings"
test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, test_dir)
except ImportError:
pass
else:
import django
from django.conf ... | <commit_before>import os
import sys
# Force this to happen before loading django
try:
os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings"
test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, test_dir)
except ImportError:
pass
else:
import django
fr... |
50a88c05c605f5157eebadb26e30f418dc3251b6 | tests/teamscale_client_test.py | tests/teamscale_client_test.py | import requests
import responses
from teamscale_client.teamscale_client import TeamscaleClient
def get_client():
return TeamscaleClient("http://localhost:8080", "admin", "admin", "foo")
@responses.activate
def test_put():
responses.add(responses.PUT, 'http://localhost:8080',
body='succes... | import requests
import responses
import re
from teamscale_client.teamscale_client import TeamscaleClient
URL = "http://localhost:8080"
def get_client():
return TeamscaleClient(URL, "admin", "admin", "foo")
def get_project_service_mock(service_id):
return re.compile(r'%s/p/foo/%s/.*' % (URL, service_id))
def... | Add basic execution tests for upload methods | Add basic execution tests for upload methods
| Python | apache-2.0 | cqse/teamscale-client-python | import requests
import responses
from teamscale_client.teamscale_client import TeamscaleClient
def get_client():
return TeamscaleClient("http://localhost:8080", "admin", "admin", "foo")
@responses.activate
def test_put():
responses.add(responses.PUT, 'http://localhost:8080',
body='succes... | import requests
import responses
import re
from teamscale_client.teamscale_client import TeamscaleClient
URL = "http://localhost:8080"
def get_client():
return TeamscaleClient(URL, "admin", "admin", "foo")
def get_project_service_mock(service_id):
return re.compile(r'%s/p/foo/%s/.*' % (URL, service_id))
def... | <commit_before>import requests
import responses
from teamscale_client.teamscale_client import TeamscaleClient
def get_client():
return TeamscaleClient("http://localhost:8080", "admin", "admin", "foo")
@responses.activate
def test_put():
responses.add(responses.PUT, 'http://localhost:8080',
... | import requests
import responses
import re
from teamscale_client.teamscale_client import TeamscaleClient
URL = "http://localhost:8080"
def get_client():
return TeamscaleClient(URL, "admin", "admin", "foo")
def get_project_service_mock(service_id):
return re.compile(r'%s/p/foo/%s/.*' % (URL, service_id))
def... | import requests
import responses
from teamscale_client.teamscale_client import TeamscaleClient
def get_client():
return TeamscaleClient("http://localhost:8080", "admin", "admin", "foo")
@responses.activate
def test_put():
responses.add(responses.PUT, 'http://localhost:8080',
body='succes... | <commit_before>import requests
import responses
from teamscale_client.teamscale_client import TeamscaleClient
def get_client():
return TeamscaleClient("http://localhost:8080", "admin", "admin", "foo")
@responses.activate
def test_put():
responses.add(responses.PUT, 'http://localhost:8080',
... |
441eac1b7d9d3f2fb30fbd2faf1dbe8fe3908402 | 99_misc/control_flow.py | 99_misc/control_flow.py | #!/usr/bin/env python
# function
def sum(op1, op2):
return op1 + op2
my_sum = sum
print my_sum(1, 2)
print my_sum("I am ", "zzz");
# pass
print "press ctrl + c to continue"
while True:
pass
| #!/usr/bin/env python
# function
def sum(op1, op2):
return op1 + op2
my_sum = sum
print my_sum(1, 2)
print my_sum("I am ", "zzz");
# Default value in a fuction
init = 12
def accumulate(val = init):
val += val
return val
my_accu = accumulate
init = 11
print my_accu() # is 12 + 12 rather than 11 + 11
# pa... | Test default value of a function | Test default value of a function
| Python | bsd-2-clause | zzz0072/Python_Exercises,zzz0072/Python_Exercises | #!/usr/bin/env python
# function
def sum(op1, op2):
return op1 + op2
my_sum = sum
print my_sum(1, 2)
print my_sum("I am ", "zzz");
# pass
print "press ctrl + c to continue"
while True:
pass
Test default value of a function | #!/usr/bin/env python
# function
def sum(op1, op2):
return op1 + op2
my_sum = sum
print my_sum(1, 2)
print my_sum("I am ", "zzz");
# Default value in a fuction
init = 12
def accumulate(val = init):
val += val
return val
my_accu = accumulate
init = 11
print my_accu() # is 12 + 12 rather than 11 + 11
# pa... | <commit_before>#!/usr/bin/env python
# function
def sum(op1, op2):
return op1 + op2
my_sum = sum
print my_sum(1, 2)
print my_sum("I am ", "zzz");
# pass
print "press ctrl + c to continue"
while True:
pass
<commit_msg>Test default value of a function<commit_after> | #!/usr/bin/env python
# function
def sum(op1, op2):
return op1 + op2
my_sum = sum
print my_sum(1, 2)
print my_sum("I am ", "zzz");
# Default value in a fuction
init = 12
def accumulate(val = init):
val += val
return val
my_accu = accumulate
init = 11
print my_accu() # is 12 + 12 rather than 11 + 11
# pa... | #!/usr/bin/env python
# function
def sum(op1, op2):
return op1 + op2
my_sum = sum
print my_sum(1, 2)
print my_sum("I am ", "zzz");
# pass
print "press ctrl + c to continue"
while True:
pass
Test default value of a function#!/usr/bin/env python
# function
def sum(op1, op2):
return op1 + op2
my_sum = sum... | <commit_before>#!/usr/bin/env python
# function
def sum(op1, op2):
return op1 + op2
my_sum = sum
print my_sum(1, 2)
print my_sum("I am ", "zzz");
# pass
print "press ctrl + c to continue"
while True:
pass
<commit_msg>Test default value of a function<commit_after>#!/usr/bin/env python
# function
def sum(op1,... |
c4cdb8429ab9eeeeb7182191589e0594c201d0d2 | glue/_mpl_backend.py | glue/_mpl_backend.py | class MatplotlibBackendSetter(object):
"""
Import hook to make sure the proper Qt backend is set when importing
Matplotlib.
"""
enabled = True
def find_module(self, mod_name, pth):
if self.enabled and 'matplotlib' in mod_name:
self.enabled = False
set_mpl_backen... | class MatplotlibBackendSetter(object):
"""
Import hook to make sure the proper Qt backend is set when importing
Matplotlib.
"""
enabled = True
def find_module(self, mod_name, pth):
if self.enabled and 'matplotlib' in mod_name:
self.enabled = False
set_mpl_backen... | Add missing find_spec for import hook, to avoid issues when trying to set colormap | Add missing find_spec for import hook, to avoid issues when trying to set colormap | Python | bsd-3-clause | stscieisenhamer/glue,saimn/glue,saimn/glue,stscieisenhamer/glue | class MatplotlibBackendSetter(object):
"""
Import hook to make sure the proper Qt backend is set when importing
Matplotlib.
"""
enabled = True
def find_module(self, mod_name, pth):
if self.enabled and 'matplotlib' in mod_name:
self.enabled = False
set_mpl_backen... | class MatplotlibBackendSetter(object):
"""
Import hook to make sure the proper Qt backend is set when importing
Matplotlib.
"""
enabled = True
def find_module(self, mod_name, pth):
if self.enabled and 'matplotlib' in mod_name:
self.enabled = False
set_mpl_backen... | <commit_before>class MatplotlibBackendSetter(object):
"""
Import hook to make sure the proper Qt backend is set when importing
Matplotlib.
"""
enabled = True
def find_module(self, mod_name, pth):
if self.enabled and 'matplotlib' in mod_name:
self.enabled = False
... | class MatplotlibBackendSetter(object):
"""
Import hook to make sure the proper Qt backend is set when importing
Matplotlib.
"""
enabled = True
def find_module(self, mod_name, pth):
if self.enabled and 'matplotlib' in mod_name:
self.enabled = False
set_mpl_backen... | class MatplotlibBackendSetter(object):
"""
Import hook to make sure the proper Qt backend is set when importing
Matplotlib.
"""
enabled = True
def find_module(self, mod_name, pth):
if self.enabled and 'matplotlib' in mod_name:
self.enabled = False
set_mpl_backen... | <commit_before>class MatplotlibBackendSetter(object):
"""
Import hook to make sure the proper Qt backend is set when importing
Matplotlib.
"""
enabled = True
def find_module(self, mod_name, pth):
if self.enabled and 'matplotlib' in mod_name:
self.enabled = False
... |
db61a650413d7cf9b225fc3d6f79c706afd33871 | grum/api/__init__.py | grum/api/__init__.py | from flask import Blueprint
from flask.ext.restful import Api
api = Blueprint("api", __name__, template_folder="templates")
rest = Api(api)
# Import the non-restful resources
from grum.api import mailgun
# Let's get restful!
from grum.api.inbox import Inbox
rest.add_resource(Inbox, '/inbox')
from grum.api.messages... | from flask import Blueprint
from flask.ext.restful import Api
api = Blueprint("api", __name__, template_folder="templates")
rest = Api(api)
# Import the non-restful resources
from grum.api import mailgun
# Let's get restful!
from grum.api.inbox import Inbox
rest.add_resource(Inbox, '/inbox')
from grum.api.messages... | Move where to post for sending emails | Move where to post for sending emails
| Python | mit | Grum-Hackdee/grum-web,Grum-Hackdee/grum-web,Grum-Hackdee/grum-web,Grum-Hackdee/grum-web | from flask import Blueprint
from flask.ext.restful import Api
api = Blueprint("api", __name__, template_folder="templates")
rest = Api(api)
# Import the non-restful resources
from grum.api import mailgun
# Let's get restful!
from grum.api.inbox import Inbox
rest.add_resource(Inbox, '/inbox')
from grum.api.messages... | from flask import Blueprint
from flask.ext.restful import Api
api = Blueprint("api", __name__, template_folder="templates")
rest = Api(api)
# Import the non-restful resources
from grum.api import mailgun
# Let's get restful!
from grum.api.inbox import Inbox
rest.add_resource(Inbox, '/inbox')
from grum.api.messages... | <commit_before>from flask import Blueprint
from flask.ext.restful import Api
api = Blueprint("api", __name__, template_folder="templates")
rest = Api(api)
# Import the non-restful resources
from grum.api import mailgun
# Let's get restful!
from grum.api.inbox import Inbox
rest.add_resource(Inbox, '/inbox')
from gr... | from flask import Blueprint
from flask.ext.restful import Api
api = Blueprint("api", __name__, template_folder="templates")
rest = Api(api)
# Import the non-restful resources
from grum.api import mailgun
# Let's get restful!
from grum.api.inbox import Inbox
rest.add_resource(Inbox, '/inbox')
from grum.api.messages... | from flask import Blueprint
from flask.ext.restful import Api
api = Blueprint("api", __name__, template_folder="templates")
rest = Api(api)
# Import the non-restful resources
from grum.api import mailgun
# Let's get restful!
from grum.api.inbox import Inbox
rest.add_resource(Inbox, '/inbox')
from grum.api.messages... | <commit_before>from flask import Blueprint
from flask.ext.restful import Api
api = Blueprint("api", __name__, template_folder="templates")
rest = Api(api)
# Import the non-restful resources
from grum.api import mailgun
# Let's get restful!
from grum.api.inbox import Inbox
rest.add_resource(Inbox, '/inbox')
from gr... |
a2cd647966df4f4af5cfd4679ae3c5793c40ee5d | neo/test/iotest/test_asciisignalio.py | neo/test/iotest/test_asciisignalio.py | # -*- coding: utf-8 -*-
"""
Tests of neo.io.asciisignalio
"""
# needed for python 3 compatibility
from __future__ import absolute_import, division
import unittest
from neo.io import AsciiSignalIO
from neo.test.iotest.common_io_test import BaseTestIO
class TestAsciiSignalIO(BaseTestIO, unittest.TestCase, ):
ioc... | # -*- coding: utf-8 -*-
"""
Tests of neo.io.asciisignalio
"""
# needed for python 3 compatibility
from __future__ import absolute_import, division
import unittest
from neo.io import AsciiSignalIO
from neo.test.iotest.common_io_test import BaseTestIO
class TestAsciiSignalIO(BaseTestIO, unittest.TestCase, ):
ioc... | Remove problematic file from testing | Remove problematic file from testing
| Python | bsd-3-clause | apdavison/python-neo,NeuralEnsemble/python-neo,rgerkin/python-neo,INM-6/python-neo,samuelgarcia/python-neo,JuliaSprenger/python-neo | # -*- coding: utf-8 -*-
"""
Tests of neo.io.asciisignalio
"""
# needed for python 3 compatibility
from __future__ import absolute_import, division
import unittest
from neo.io import AsciiSignalIO
from neo.test.iotest.common_io_test import BaseTestIO
class TestAsciiSignalIO(BaseTestIO, unittest.TestCase, ):
ioc... | # -*- coding: utf-8 -*-
"""
Tests of neo.io.asciisignalio
"""
# needed for python 3 compatibility
from __future__ import absolute_import, division
import unittest
from neo.io import AsciiSignalIO
from neo.test.iotest.common_io_test import BaseTestIO
class TestAsciiSignalIO(BaseTestIO, unittest.TestCase, ):
ioc... | <commit_before># -*- coding: utf-8 -*-
"""
Tests of neo.io.asciisignalio
"""
# needed for python 3 compatibility
from __future__ import absolute_import, division
import unittest
from neo.io import AsciiSignalIO
from neo.test.iotest.common_io_test import BaseTestIO
class TestAsciiSignalIO(BaseTestIO, unittest.TestC... | # -*- coding: utf-8 -*-
"""
Tests of neo.io.asciisignalio
"""
# needed for python 3 compatibility
from __future__ import absolute_import, division
import unittest
from neo.io import AsciiSignalIO
from neo.test.iotest.common_io_test import BaseTestIO
class TestAsciiSignalIO(BaseTestIO, unittest.TestCase, ):
ioc... | # -*- coding: utf-8 -*-
"""
Tests of neo.io.asciisignalio
"""
# needed for python 3 compatibility
from __future__ import absolute_import, division
import unittest
from neo.io import AsciiSignalIO
from neo.test.iotest.common_io_test import BaseTestIO
class TestAsciiSignalIO(BaseTestIO, unittest.TestCase, ):
ioc... | <commit_before># -*- coding: utf-8 -*-
"""
Tests of neo.io.asciisignalio
"""
# needed for python 3 compatibility
from __future__ import absolute_import, division
import unittest
from neo.io import AsciiSignalIO
from neo.test.iotest.common_io_test import BaseTestIO
class TestAsciiSignalIO(BaseTestIO, unittest.TestC... |
a65eb4af0c35c8e79d44efa6acb546e19008a8ee | elmo/moon_tracker/forms.py | elmo/moon_tracker/forms.py | from django import forms
import csv
from io import StringIO
class BatchMoonScanForm(forms.Form):
data = forms.CharField(
widget=forms.Textarea(attrs={'class':'form-control monospace'}),
)
def clean(self):
cleaned_data = super(BatchMoonScanForm, self).clean()
raw = StringIO(cleaned... | from django import forms
import csv
from io import StringIO
class BatchMoonScanForm(forms.Form):
data = forms.CharField(
widget=forms.Textarea(attrs={'class':'form-control monospace'}),
)
def clean(self):
cleaned_data = super(BatchMoonScanForm, self).clean()
raw = StringIO(cleaned... | Improve batch form return data structure. | Improve batch form return data structure.
| Python | mit | StephenSwat/eve_lunar_mining_organiser,StephenSwat/eve_lunar_mining_organiser | from django import forms
import csv
from io import StringIO
class BatchMoonScanForm(forms.Form):
data = forms.CharField(
widget=forms.Textarea(attrs={'class':'form-control monospace'}),
)
def clean(self):
cleaned_data = super(BatchMoonScanForm, self).clean()
raw = StringIO(cleaned... | from django import forms
import csv
from io import StringIO
class BatchMoonScanForm(forms.Form):
data = forms.CharField(
widget=forms.Textarea(attrs={'class':'form-control monospace'}),
)
def clean(self):
cleaned_data = super(BatchMoonScanForm, self).clean()
raw = StringIO(cleaned... | <commit_before>from django import forms
import csv
from io import StringIO
class BatchMoonScanForm(forms.Form):
data = forms.CharField(
widget=forms.Textarea(attrs={'class':'form-control monospace'}),
)
def clean(self):
cleaned_data = super(BatchMoonScanForm, self).clean()
raw = S... | from django import forms
import csv
from io import StringIO
class BatchMoonScanForm(forms.Form):
data = forms.CharField(
widget=forms.Textarea(attrs={'class':'form-control monospace'}),
)
def clean(self):
cleaned_data = super(BatchMoonScanForm, self).clean()
raw = StringIO(cleaned... | from django import forms
import csv
from io import StringIO
class BatchMoonScanForm(forms.Form):
data = forms.CharField(
widget=forms.Textarea(attrs={'class':'form-control monospace'}),
)
def clean(self):
cleaned_data = super(BatchMoonScanForm, self).clean()
raw = StringIO(cleaned... | <commit_before>from django import forms
import csv
from io import StringIO
class BatchMoonScanForm(forms.Form):
data = forms.CharField(
widget=forms.Textarea(attrs={'class':'form-control monospace'}),
)
def clean(self):
cleaned_data = super(BatchMoonScanForm, self).clean()
raw = S... |
83fed17149a8b65491b3f418a9f147e3ffe46e9d | prepare_data.py | prepare_data.py | # TODO: Load the csv files into dataframes here.
class data_preparer():
def __init__():
| # TODO: Load the csv files into dataframes here.
import csv
import pandas
class data_preparer():
def __init__(self):
pass
def load(self, filename):
# X = pandas.DataFrame()
# with open(filename) as csvfile:
# filereader = csv.reader(csvfile,delimiter=',')
X = pandas.... | Use 'pandas.read_csv' method to create dataframe | feat: Use 'pandas.read_csv' method to create dataframe
| Python | mit | bwc126/MLND-Subvocal | # TODO: Load the csv files into dataframes here.
class data_preparer():
def __init__():
feat: Use 'pandas.read_csv' method to create dataframe | # TODO: Load the csv files into dataframes here.
import csv
import pandas
class data_preparer():
def __init__(self):
pass
def load(self, filename):
# X = pandas.DataFrame()
# with open(filename) as csvfile:
# filereader = csv.reader(csvfile,delimiter=',')
X = pandas.... | <commit_before># TODO: Load the csv files into dataframes here.
class data_preparer():
def __init__():
<commit_msg>feat: Use 'pandas.read_csv' method to create dataframe<commit_after> | # TODO: Load the csv files into dataframes here.
import csv
import pandas
class data_preparer():
def __init__(self):
pass
def load(self, filename):
# X = pandas.DataFrame()
# with open(filename) as csvfile:
# filereader = csv.reader(csvfile,delimiter=',')
X = pandas.... | # TODO: Load the csv files into dataframes here.
class data_preparer():
def __init__():
feat: Use 'pandas.read_csv' method to create dataframe# TODO: Load the csv files into dataframes here.
import csv
import pandas
class data_preparer():
def __init__(self):
pass
def load(self, filename):
... | <commit_before># TODO: Load the csv files into dataframes here.
class data_preparer():
def __init__():
<commit_msg>feat: Use 'pandas.read_csv' method to create dataframe<commit_after># TODO: Load the csv files into dataframes here.
import csv
import pandas
class data_preparer():
def __init__(self):
... |
d1d7ec0765b842758b35ee1b5d069536bcd33d59 | ereuse_workbench/config.py | ereuse_workbench/config.py | from decouple import AutoConfig
from ereuse_workbench.test import TestDataStorageLength
class WorkbenchConfig:
# Path where find .env file
config = AutoConfig(search_path='/home/user/')
# Env variables for DH parameters
DH_TOKEN = config('DH_TOKEN')
DH_HOST = config('DH_HOST')
DH_DATABASE = ... | from decouple import AutoConfig
from ereuse_workbench.test import TestDataStorageLength
class WorkbenchConfig:
# Path where find settings.ini file
config = AutoConfig(search_path='/home/user/')
# Env variables for DH parameters
DH_TOKEN = config('DH_TOKEN')
DH_HOST = config('DH_HOST')
DH_DAT... | Change .env to settings.ini file | Change .env to settings.ini file
| Python | agpl-3.0 | eReuse/workbench,eReuse/workbench | from decouple import AutoConfig
from ereuse_workbench.test import TestDataStorageLength
class WorkbenchConfig:
# Path where find .env file
config = AutoConfig(search_path='/home/user/')
# Env variables for DH parameters
DH_TOKEN = config('DH_TOKEN')
DH_HOST = config('DH_HOST')
DH_DATABASE = ... | from decouple import AutoConfig
from ereuse_workbench.test import TestDataStorageLength
class WorkbenchConfig:
# Path where find settings.ini file
config = AutoConfig(search_path='/home/user/')
# Env variables for DH parameters
DH_TOKEN = config('DH_TOKEN')
DH_HOST = config('DH_HOST')
DH_DAT... | <commit_before>from decouple import AutoConfig
from ereuse_workbench.test import TestDataStorageLength
class WorkbenchConfig:
# Path where find .env file
config = AutoConfig(search_path='/home/user/')
# Env variables for DH parameters
DH_TOKEN = config('DH_TOKEN')
DH_HOST = config('DH_HOST')
... | from decouple import AutoConfig
from ereuse_workbench.test import TestDataStorageLength
class WorkbenchConfig:
# Path where find settings.ini file
config = AutoConfig(search_path='/home/user/')
# Env variables for DH parameters
DH_TOKEN = config('DH_TOKEN')
DH_HOST = config('DH_HOST')
DH_DAT... | from decouple import AutoConfig
from ereuse_workbench.test import TestDataStorageLength
class WorkbenchConfig:
# Path where find .env file
config = AutoConfig(search_path='/home/user/')
# Env variables for DH parameters
DH_TOKEN = config('DH_TOKEN')
DH_HOST = config('DH_HOST')
DH_DATABASE = ... | <commit_before>from decouple import AutoConfig
from ereuse_workbench.test import TestDataStorageLength
class WorkbenchConfig:
# Path where find .env file
config = AutoConfig(search_path='/home/user/')
# Env variables for DH parameters
DH_TOKEN = config('DH_TOKEN')
DH_HOST = config('DH_HOST')
... |
1e7dd0a322e32621468ade5bf390664f1b8b7a8b | fixture/application.py | fixture/application.py | from selenium.webdriver.firefox.webdriver import WebDriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self):
self.wd = WebDriver()
self.wd.implicitly_wait(60)
self.session = Sess... | from selenium.webdriver.firefox.webdriver import WebDriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self):
self.wd = WebDriver()
self.wd.implicitly_wait(5)
self.session = Sessi... | Change Wait time from 60 to 5 sec | Change Wait time from 60 to 5 sec
| Python | apache-2.0 | tkapriyan/python_training | from selenium.webdriver.firefox.webdriver import WebDriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self):
self.wd = WebDriver()
self.wd.implicitly_wait(60)
self.session = Sess... | from selenium.webdriver.firefox.webdriver import WebDriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self):
self.wd = WebDriver()
self.wd.implicitly_wait(5)
self.session = Sessi... | <commit_before>from selenium.webdriver.firefox.webdriver import WebDriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self):
self.wd = WebDriver()
self.wd.implicitly_wait(60)
self... | from selenium.webdriver.firefox.webdriver import WebDriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self):
self.wd = WebDriver()
self.wd.implicitly_wait(5)
self.session = Sessi... | from selenium.webdriver.firefox.webdriver import WebDriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self):
self.wd = WebDriver()
self.wd.implicitly_wait(60)
self.session = Sess... | <commit_before>from selenium.webdriver.firefox.webdriver import WebDriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self):
self.wd = WebDriver()
self.wd.implicitly_wait(60)
self... |
2b4b4ac3ec238a039717feff727316217c13d294 | test/test_cronquot.py | test/test_cronquot.py | import unittest
from cronquot.cronquot import has_directory
class CronquotTest(unittest.TestCase):
def test_has_directory(self):
self.assertTrue(has_directory('/tmp'))
if __name__ == '__main__':
unittest.test()
| import unittest
import os
from cronquot.cronquot import has_directory
class CronquotTest(unittest.TestCase):
def test_has_directory(self):
sample_dir = os.path.join(
os.path.dirname(__file__), 'crontab')
self.assertTrue(has_directory(sample_dir))
if __name__ == '__main__':
un... | Fix to test crontab dir | Fix to test crontab dir
| Python | mit | pyohei/cronquot,pyohei/cronquot | import unittest
from cronquot.cronquot import has_directory
class CronquotTest(unittest.TestCase):
def test_has_directory(self):
self.assertTrue(has_directory('/tmp'))
if __name__ == '__main__':
unittest.test()
Fix to test crontab dir | import unittest
import os
from cronquot.cronquot import has_directory
class CronquotTest(unittest.TestCase):
def test_has_directory(self):
sample_dir = os.path.join(
os.path.dirname(__file__), 'crontab')
self.assertTrue(has_directory(sample_dir))
if __name__ == '__main__':
un... | <commit_before>import unittest
from cronquot.cronquot import has_directory
class CronquotTest(unittest.TestCase):
def test_has_directory(self):
self.assertTrue(has_directory('/tmp'))
if __name__ == '__main__':
unittest.test()
<commit_msg>Fix to test crontab dir<commit_after> | import unittest
import os
from cronquot.cronquot import has_directory
class CronquotTest(unittest.TestCase):
def test_has_directory(self):
sample_dir = os.path.join(
os.path.dirname(__file__), 'crontab')
self.assertTrue(has_directory(sample_dir))
if __name__ == '__main__':
un... | import unittest
from cronquot.cronquot import has_directory
class CronquotTest(unittest.TestCase):
def test_has_directory(self):
self.assertTrue(has_directory('/tmp'))
if __name__ == '__main__':
unittest.test()
Fix to test crontab dirimport unittest
import os
from cronquot.cronquot import has_direct... | <commit_before>import unittest
from cronquot.cronquot import has_directory
class CronquotTest(unittest.TestCase):
def test_has_directory(self):
self.assertTrue(has_directory('/tmp'))
if __name__ == '__main__':
unittest.test()
<commit_msg>Fix to test crontab dir<commit_after>import unittest
import os... |
038e619e47a05aadf7e0641dd87b6dc573abe3e5 | massa/domain.py | massa/domain.py | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | Add a function to drop db tables. | Add a function to drop db tables. | Python | mit | jaapverloop/massa | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | <commit_before># -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1)... | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1), nullable=Fals... | <commit_before># -*- coding: utf-8 -*-
from sqlalchemy import (
Column,
Date,
Integer,
MetaData,
Numeric,
String,
Table,
create_engine,
)
metadata = MetaData()
measurement = Table('measurement', metadata,
Column('id', Integer, primary_key=True),
Column('weight', Numeric(4, 1)... |
5425c2419b7365969ea8b211432858d599214201 | tests/test_archive.py | tests/test_archive.py | from json import load
from django_archive import __version__
from .base import BaseArchiveTestCase
from .sample.models import Sample
class ArchiveTestCase(BaseArchiveTestCase):
"""
Test that the archive command includes correct data in the archive
"""
def setUp(self):
Sample().save()
... | from json import load
from django.core.files.base import ContentFile
from django_archive import __version__
from .base import BaseArchiveTestCase
from .sample.models import Sample
class ArchiveTestCase(BaseArchiveTestCase):
"""
Test that the archive command includes correct data in the archive
"""
... | Update test to ensure attached files are present in archives. | Update test to ensure attached files are present in archives.
| Python | mit | nathan-osman/django-archive,nathan-osman/django-archive | from json import load
from django_archive import __version__
from .base import BaseArchiveTestCase
from .sample.models import Sample
class ArchiveTestCase(BaseArchiveTestCase):
"""
Test that the archive command includes correct data in the archive
"""
def setUp(self):
Sample().save()
... | from json import load
from django.core.files.base import ContentFile
from django_archive import __version__
from .base import BaseArchiveTestCase
from .sample.models import Sample
class ArchiveTestCase(BaseArchiveTestCase):
"""
Test that the archive command includes correct data in the archive
"""
... | <commit_before>from json import load
from django_archive import __version__
from .base import BaseArchiveTestCase
from .sample.models import Sample
class ArchiveTestCase(BaseArchiveTestCase):
"""
Test that the archive command includes correct data in the archive
"""
def setUp(self):
Sample(... | from json import load
from django.core.files.base import ContentFile
from django_archive import __version__
from .base import BaseArchiveTestCase
from .sample.models import Sample
class ArchiveTestCase(BaseArchiveTestCase):
"""
Test that the archive command includes correct data in the archive
"""
... | from json import load
from django_archive import __version__
from .base import BaseArchiveTestCase
from .sample.models import Sample
class ArchiveTestCase(BaseArchiveTestCase):
"""
Test that the archive command includes correct data in the archive
"""
def setUp(self):
Sample().save()
... | <commit_before>from json import load
from django_archive import __version__
from .base import BaseArchiveTestCase
from .sample.models import Sample
class ArchiveTestCase(BaseArchiveTestCase):
"""
Test that the archive command includes correct data in the archive
"""
def setUp(self):
Sample(... |
1b5fc874924958664797ba2f1e73835b4cbcef57 | mfr/__init__.py | mfr/__init__.py | """The mfr core module."""
# -*- coding: utf-8 -*-
import os
__version__ = '0.1.0-alpha'
__author__ = 'Center for Open Science'
from mfr.core import (render, detect, FileHandler, get_file_extension,
register_filehandler, export, get_file_exporters,
config, collect_static
)
from mfr._config import Config
P... | """The mfr core module."""
# -*- coding: utf-8 -*-
import os
__version__ = '0.1.0-alpha'
__author__ = 'Center for Open Science'
from mfr.core import (
render,
detect,
FileHandler,
get_file_extension,
register_filehandler,
export,
get_file_exporters,
config,
collect_static,
Ren... | Add RenderResult to mfr namespace | Add RenderResult to mfr namespace
| Python | apache-2.0 | TomBaxter/modular-file-renderer,chrisseto/modular-file-renderer,mfraezz/modular-file-renderer,haoyuchen1992/modular-file-renderer,haoyuchen1992/modular-file-renderer,erinspace/modular-file-renderer,rdhyee/modular-file-renderer,CenterForOpenScience/modular-file-renderer,icereval/modular-file-renderer,TomBaxter/modular-f... | """The mfr core module."""
# -*- coding: utf-8 -*-
import os
__version__ = '0.1.0-alpha'
__author__ = 'Center for Open Science'
from mfr.core import (render, detect, FileHandler, get_file_extension,
register_filehandler, export, get_file_exporters,
config, collect_static
)
from mfr._config import Config
P... | """The mfr core module."""
# -*- coding: utf-8 -*-
import os
__version__ = '0.1.0-alpha'
__author__ = 'Center for Open Science'
from mfr.core import (
render,
detect,
FileHandler,
get_file_extension,
register_filehandler,
export,
get_file_exporters,
config,
collect_static,
Ren... | <commit_before>"""The mfr core module."""
# -*- coding: utf-8 -*-
import os
__version__ = '0.1.0-alpha'
__author__ = 'Center for Open Science'
from mfr.core import (render, detect, FileHandler, get_file_extension,
register_filehandler, export, get_file_exporters,
config, collect_static
)
from mfr._config im... | """The mfr core module."""
# -*- coding: utf-8 -*-
import os
__version__ = '0.1.0-alpha'
__author__ = 'Center for Open Science'
from mfr.core import (
render,
detect,
FileHandler,
get_file_extension,
register_filehandler,
export,
get_file_exporters,
config,
collect_static,
Ren... | """The mfr core module."""
# -*- coding: utf-8 -*-
import os
__version__ = '0.1.0-alpha'
__author__ = 'Center for Open Science'
from mfr.core import (render, detect, FileHandler, get_file_extension,
register_filehandler, export, get_file_exporters,
config, collect_static
)
from mfr._config import Config
P... | <commit_before>"""The mfr core module."""
# -*- coding: utf-8 -*-
import os
__version__ = '0.1.0-alpha'
__author__ = 'Center for Open Science'
from mfr.core import (render, detect, FileHandler, get_file_extension,
register_filehandler, export, get_file_exporters,
config, collect_static
)
from mfr._config im... |
0a5331c36cb469b2af10d87ab375d9bd0c6c3fb8 | tests/test_lattice.py | tests/test_lattice.py | import rml.lattice
def test_create_lattice():
l = rml.lattice.Lattice()
assert(len(l)) == 0
| import rml.lattice
def test_create_lattice():
l = rml.lattice.Lattice()
assert(len(l)) == 0
def test_non_negative_lattice():
l = rml.lattice.Lattice()
assert(len(l)) >= 0
| Test lattince length for non-negative values | Test lattince length for non-negative values
| Python | apache-2.0 | willrogers/pml,razvanvasile/RML,willrogers/pml | import rml.lattice
def test_create_lattice():
l = rml.lattice.Lattice()
assert(len(l)) == 0
Test lattince length for non-negative values | import rml.lattice
def test_create_lattice():
l = rml.lattice.Lattice()
assert(len(l)) == 0
def test_non_negative_lattice():
l = rml.lattice.Lattice()
assert(len(l)) >= 0
| <commit_before>import rml.lattice
def test_create_lattice():
l = rml.lattice.Lattice()
assert(len(l)) == 0
<commit_msg>Test lattince length for non-negative values<commit_after> | import rml.lattice
def test_create_lattice():
l = rml.lattice.Lattice()
assert(len(l)) == 0
def test_non_negative_lattice():
l = rml.lattice.Lattice()
assert(len(l)) >= 0
| import rml.lattice
def test_create_lattice():
l = rml.lattice.Lattice()
assert(len(l)) == 0
Test lattince length for non-negative valuesimport rml.lattice
def test_create_lattice():
l = rml.lattice.Lattice()
assert(len(l)) == 0
def test_non_negative_lattice():
l = rml.lattice.Lattice()
asser... | <commit_before>import rml.lattice
def test_create_lattice():
l = rml.lattice.Lattice()
assert(len(l)) == 0
<commit_msg>Test lattince length for non-negative values<commit_after>import rml.lattice
def test_create_lattice():
l = rml.lattice.Lattice()
assert(len(l)) == 0
def test_non_negative_lattice()... |
19dc8b7e1535c4cc431b765f95db117175fc7d24 | server/admin.py | server/admin.py | from django.contrib import admin
from server.models import *
class MachineGroupAdmin(admin.ModelAdmin):
readonly_fields = ('key',)
class MachineAdmin(admin.ModelAdmin):
list_display = ('hostname', 'serial')
admin.site.register(UserProfile)
admin.site.register(BusinessUnit)
admin.site.register(MachineGroup... | from django.contrib import admin
from server.models import *
class ApiKeyAdmin(admin.ModelAdmin):
list_display = ('name', 'public_key', 'private_key')
class MachineAdmin(admin.ModelAdmin):
list_display = ('hostname', 'serial')
class MachineGroupAdmin(admin.ModelAdmin):
readonly_fields = ('key',)
ad... | Sort registrations. Separate classes of imports. Add API key display. | Sort registrations. Separate classes of imports. Add API key display.
| Python | apache-2.0 | salopensource/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal | from django.contrib import admin
from server.models import *
class MachineGroupAdmin(admin.ModelAdmin):
readonly_fields = ('key',)
class MachineAdmin(admin.ModelAdmin):
list_display = ('hostname', 'serial')
admin.site.register(UserProfile)
admin.site.register(BusinessUnit)
admin.site.register(MachineGroup... | from django.contrib import admin
from server.models import *
class ApiKeyAdmin(admin.ModelAdmin):
list_display = ('name', 'public_key', 'private_key')
class MachineAdmin(admin.ModelAdmin):
list_display = ('hostname', 'serial')
class MachineGroupAdmin(admin.ModelAdmin):
readonly_fields = ('key',)
ad... | <commit_before>from django.contrib import admin
from server.models import *
class MachineGroupAdmin(admin.ModelAdmin):
readonly_fields = ('key',)
class MachineAdmin(admin.ModelAdmin):
list_display = ('hostname', 'serial')
admin.site.register(UserProfile)
admin.site.register(BusinessUnit)
admin.site.regist... | from django.contrib import admin
from server.models import *
class ApiKeyAdmin(admin.ModelAdmin):
list_display = ('name', 'public_key', 'private_key')
class MachineAdmin(admin.ModelAdmin):
list_display = ('hostname', 'serial')
class MachineGroupAdmin(admin.ModelAdmin):
readonly_fields = ('key',)
ad... | from django.contrib import admin
from server.models import *
class MachineGroupAdmin(admin.ModelAdmin):
readonly_fields = ('key',)
class MachineAdmin(admin.ModelAdmin):
list_display = ('hostname', 'serial')
admin.site.register(UserProfile)
admin.site.register(BusinessUnit)
admin.site.register(MachineGroup... | <commit_before>from django.contrib import admin
from server.models import *
class MachineGroupAdmin(admin.ModelAdmin):
readonly_fields = ('key',)
class MachineAdmin(admin.ModelAdmin):
list_display = ('hostname', 'serial')
admin.site.register(UserProfile)
admin.site.register(BusinessUnit)
admin.site.regist... |
b5aacae66d4395a3c507c661144b21f9b2838a0f | utils/dakota_utils.py | utils/dakota_utils.py | #! /usr/bin/env python
#
# Dakota utility programs.
#
# Mark Piper (mark.piper@colorado.edu)
import numpy as np
def get_names(dat_file):
'''
Reads the header from Dakota tabular graphics file. Returns a list
of variable names.
'''
fp = open(dat_file, 'r')
return fp.readline().split()
def ge... | #! /usr/bin/env python
#
# Dakota utility programs.
#
# Mark Piper (mark.piper@colorado.edu)
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
def get_names(dat_file):
'''
Reads the header from Dakota tabular graphics file. Returns a list
of variable names.
''... | Add routine to make surface plot from Dakota output | Add routine to make surface plot from Dakota output
| Python | mit | mdpiper/dakota-experiments,mdpiper/dakota-experiments,mdpiper/dakota-experiments,mcflugen/dakota-experiments,mcflugen/dakota-experiments | #! /usr/bin/env python
#
# Dakota utility programs.
#
# Mark Piper (mark.piper@colorado.edu)
import numpy as np
def get_names(dat_file):
'''
Reads the header from Dakota tabular graphics file. Returns a list
of variable names.
'''
fp = open(dat_file, 'r')
return fp.readline().split()
def ge... | #! /usr/bin/env python
#
# Dakota utility programs.
#
# Mark Piper (mark.piper@colorado.edu)
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
def get_names(dat_file):
'''
Reads the header from Dakota tabular graphics file. Returns a list
of variable names.
''... | <commit_before>#! /usr/bin/env python
#
# Dakota utility programs.
#
# Mark Piper (mark.piper@colorado.edu)
import numpy as np
def get_names(dat_file):
'''
Reads the header from Dakota tabular graphics file. Returns a list
of variable names.
'''
fp = open(dat_file, 'r')
return fp.readline().s... | #! /usr/bin/env python
#
# Dakota utility programs.
#
# Mark Piper (mark.piper@colorado.edu)
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
def get_names(dat_file):
'''
Reads the header from Dakota tabular graphics file. Returns a list
of variable names.
''... | #! /usr/bin/env python
#
# Dakota utility programs.
#
# Mark Piper (mark.piper@colorado.edu)
import numpy as np
def get_names(dat_file):
'''
Reads the header from Dakota tabular graphics file. Returns a list
of variable names.
'''
fp = open(dat_file, 'r')
return fp.readline().split()
def ge... | <commit_before>#! /usr/bin/env python
#
# Dakota utility programs.
#
# Mark Piper (mark.piper@colorado.edu)
import numpy as np
def get_names(dat_file):
'''
Reads the header from Dakota tabular graphics file. Returns a list
of variable names.
'''
fp = open(dat_file, 'r')
return fp.readline().s... |
1c22c7806f459ae385c38a0d952ab324fdbc02d9 | lib/ansiblelint/formatters/__init__.py | lib/ansiblelint/formatters/__init__.py | class Formatter(object):
def format(self, match):
formatstr = "[{0}] {1}\n{2}:{3}\n{4}\n"
return formatstr.format(match.rule.id,
match.message,
match.filename,
match.linenumber,
... | class Formatter(object):
def format(self, match):
formatstr = u"[{0}] {1}\n{2}:{3}\n{4}\n"
return formatstr.format(match.rule.id,
match.message,
match.filename,
match.linenumber,
... | Fix crash tasks with unicode string name (like name: héhé). | Fix crash tasks with unicode string name (like name: héhé).
| Python | mit | MatrixCrawler/ansible-lint,willthames/ansible-lint,dataxu/ansible-lint | class Formatter(object):
def format(self, match):
formatstr = "[{0}] {1}\n{2}:{3}\n{4}\n"
return formatstr.format(match.rule.id,
match.message,
match.filename,
match.linenumber,
... | class Formatter(object):
def format(self, match):
formatstr = u"[{0}] {1}\n{2}:{3}\n{4}\n"
return formatstr.format(match.rule.id,
match.message,
match.filename,
match.linenumber,
... | <commit_before>class Formatter(object):
def format(self, match):
formatstr = "[{0}] {1}\n{2}:{3}\n{4}\n"
return formatstr.format(match.rule.id,
match.message,
match.filename,
match.linenumber,
... | class Formatter(object):
def format(self, match):
formatstr = u"[{0}] {1}\n{2}:{3}\n{4}\n"
return formatstr.format(match.rule.id,
match.message,
match.filename,
match.linenumber,
... | class Formatter(object):
def format(self, match):
formatstr = "[{0}] {1}\n{2}:{3}\n{4}\n"
return formatstr.format(match.rule.id,
match.message,
match.filename,
match.linenumber,
... | <commit_before>class Formatter(object):
def format(self, match):
formatstr = "[{0}] {1}\n{2}:{3}\n{4}\n"
return formatstr.format(match.rule.id,
match.message,
match.filename,
match.linenumber,
... |
64368ac4d5d90de7df92110364b165be975719c9 | manager/apps/brand/urls.py | manager/apps/brand/urls.py | from django.conf.urls import patterns, url
from manager.apps.brand.views import BrandListView, BrandView
from manager.apps.brand.views import OwnerListView, OwnerView
urlpatterns = patterns(
'',
url(r'^brand$', BrandListView.as_view(), name='brandlist'),
url(r'^brand/(?P<bsin>[1-9A-NP-Z]{6})', BrandView.as... | from django.conf.urls import patterns, url
from manager.apps.brand.views import BrandListView, BrandView
from manager.apps.brand.views import OwnerListView, OwnerView
urlpatterns = patterns(
'',
url(r'^brand/$', BrandListView.as_view(), name='brandlist'),
url(r'^brand/(?P<bsin>[1-9A-NP-Z]{6})', BrandView.a... | Fix Brand and Owner public links (missing / would get a 404 on brand/ and owner/) | Fix Brand and Owner public links (missing / would get a 404 on brand/ and owner/)
Also follow the same URL scheme as admin (which always have trailing
slash)
| Python | mit | okfn/opd-brand-manager,okfn/opd-brand-manager,okfn/brand-manager,okfn/brand-manager | from django.conf.urls import patterns, url
from manager.apps.brand.views import BrandListView, BrandView
from manager.apps.brand.views import OwnerListView, OwnerView
urlpatterns = patterns(
'',
url(r'^brand$', BrandListView.as_view(), name='brandlist'),
url(r'^brand/(?P<bsin>[1-9A-NP-Z]{6})', BrandView.as... | from django.conf.urls import patterns, url
from manager.apps.brand.views import BrandListView, BrandView
from manager.apps.brand.views import OwnerListView, OwnerView
urlpatterns = patterns(
'',
url(r'^brand/$', BrandListView.as_view(), name='brandlist'),
url(r'^brand/(?P<bsin>[1-9A-NP-Z]{6})', BrandView.a... | <commit_before>from django.conf.urls import patterns, url
from manager.apps.brand.views import BrandListView, BrandView
from manager.apps.brand.views import OwnerListView, OwnerView
urlpatterns = patterns(
'',
url(r'^brand$', BrandListView.as_view(), name='brandlist'),
url(r'^brand/(?P<bsin>[1-9A-NP-Z]{6})... | from django.conf.urls import patterns, url
from manager.apps.brand.views import BrandListView, BrandView
from manager.apps.brand.views import OwnerListView, OwnerView
urlpatterns = patterns(
'',
url(r'^brand/$', BrandListView.as_view(), name='brandlist'),
url(r'^brand/(?P<bsin>[1-9A-NP-Z]{6})', BrandView.a... | from django.conf.urls import patterns, url
from manager.apps.brand.views import BrandListView, BrandView
from manager.apps.brand.views import OwnerListView, OwnerView
urlpatterns = patterns(
'',
url(r'^brand$', BrandListView.as_view(), name='brandlist'),
url(r'^brand/(?P<bsin>[1-9A-NP-Z]{6})', BrandView.as... | <commit_before>from django.conf.urls import patterns, url
from manager.apps.brand.views import BrandListView, BrandView
from manager.apps.brand.views import OwnerListView, OwnerView
urlpatterns = patterns(
'',
url(r'^brand$', BrandListView.as_view(), name='brandlist'),
url(r'^brand/(?P<bsin>[1-9A-NP-Z]{6})... |
50ca3fa53b6bb22dbd38b75cc4cf2244b0a2767c | python/setup.py | python/setup.py | # coding: utf-8
from distutils.core import setup
setup(
name = 'gherkin3',
packages = ['gherkin3'],
version = '3.0.0',
description = 'Gherkin parser',
author = 'Björn Rasmusson',
author_email = 'cukes@googlegroups.com',
url = 'https://github.com/cucumber/gherkin-python',
license = 'MIT',
download_url ... | # coding: utf-8
from distutils.core import setup
setup(
name = 'gherkin3',
packages = ['gherkin3'],
version = '3.0.0',
description = 'Gherkin parser',
author = 'Björn Rasmusson',
author_email = 'cukes@googlegroups.com',
url = 'https://github.com/cucumber/gherkin-python',
license = 'MIT',
download_url ... | Correct the download url for gherkin-python | Correct the download url for gherkin-python
| Python | mit | chebizarro/gherkin3,curzona/gherkin3,Zearin/gherkin3,thetutlage/gherkin3,Zearin/gherkin3,hayd/gherkin3,thiblahute/gherkin3,thetutlage/gherkin3,SabotageAndi/gherkin,concertman/gherkin3,SabotageAndi/gherkin,moreirap/gherkin3,concertman/gherkin3,concertman/gherkin3,concertman/gherkin3,concertman/gherkin3,SabotageAndi/gher... | # coding: utf-8
from distutils.core import setup
setup(
name = 'gherkin3',
packages = ['gherkin3'],
version = '3.0.0',
description = 'Gherkin parser',
author = 'Björn Rasmusson',
author_email = 'cukes@googlegroups.com',
url = 'https://github.com/cucumber/gherkin-python',
license = 'MIT',
download_url ... | # coding: utf-8
from distutils.core import setup
setup(
name = 'gherkin3',
packages = ['gherkin3'],
version = '3.0.0',
description = 'Gherkin parser',
author = 'Björn Rasmusson',
author_email = 'cukes@googlegroups.com',
url = 'https://github.com/cucumber/gherkin-python',
license = 'MIT',
download_url ... | <commit_before># coding: utf-8
from distutils.core import setup
setup(
name = 'gherkin3',
packages = ['gherkin3'],
version = '3.0.0',
description = 'Gherkin parser',
author = 'Björn Rasmusson',
author_email = 'cukes@googlegroups.com',
url = 'https://github.com/cucumber/gherkin-python',
license = 'MIT',
... | # coding: utf-8
from distutils.core import setup
setup(
name = 'gherkin3',
packages = ['gherkin3'],
version = '3.0.0',
description = 'Gherkin parser',
author = 'Björn Rasmusson',
author_email = 'cukes@googlegroups.com',
url = 'https://github.com/cucumber/gherkin-python',
license = 'MIT',
download_url ... | # coding: utf-8
from distutils.core import setup
setup(
name = 'gherkin3',
packages = ['gherkin3'],
version = '3.0.0',
description = 'Gherkin parser',
author = 'Björn Rasmusson',
author_email = 'cukes@googlegroups.com',
url = 'https://github.com/cucumber/gherkin-python',
license = 'MIT',
download_url ... | <commit_before># coding: utf-8
from distutils.core import setup
setup(
name = 'gherkin3',
packages = ['gherkin3'],
version = '3.0.0',
description = 'Gherkin parser',
author = 'Björn Rasmusson',
author_email = 'cukes@googlegroups.com',
url = 'https://github.com/cucumber/gherkin-python',
license = 'MIT',
... |
f5a3148ed638c65a3de3e1de0e5dece96f0c049b | placidity/plugin_loader.py | placidity/plugin_loader.py | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
plugin_class = plugin_file.classes[plugin.name]
self._check_attributes(plugin_class)
plugin_instance = ... | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
if not plugin_file:
continue
plugin_class = plugin_file.classes[plugin.name]
... | Make plugin loader more robust | Make plugin loader more robust
| Python | mit | bebraw/Placidity | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
plugin_class = plugin_file.classes[plugin.name]
self._check_attributes(plugin_class)
plugin_instance = ... | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
if not plugin_file:
continue
plugin_class = plugin_file.classes[plugin.name]
... | <commit_before>class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
plugin_class = plugin_file.classes[plugin.name]
self._check_attributes(plugin_class)
plu... | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
if not plugin_file:
continue
plugin_class = plugin_file.classes[plugin.name]
... | class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
plugin_class = plugin_file.classes[plugin.name]
self._check_attributes(plugin_class)
plugin_instance = ... | <commit_before>class PluginLoader:
def load(self, directory):
ret = []
for plugin in directory.children:
plugin_file = plugin.find(name=plugin.name, type='py')
plugin_class = plugin_file.classes[plugin.name]
self._check_attributes(plugin_class)
plu... |
d39edc6d3e02adeb3cd89ca13fdb9660be3247b4 | hydromet/__init__.py | hydromet/__init__.py | from hydromet import disaggregate
from hydromet import models
from hydromet import stats
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
| from hydromet import disaggregate
#from hydromet import models
from hydromet import stats
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
| Disable import so that hydromet can be used w/o hydromath.so | Disable import so that hydromet can be used w/o hydromath.so
Should make the code for finding/not working if hydromath.so isn't
available a bit more robust, but in the mean time disabling an import so
that other parts of hydromet can be used without requiring hydromath.
| Python | bsd-3-clause | amacd31/hydromet-toolkit,amacd31/hydromet-toolkit | from hydromet import disaggregate
from hydromet import models
from hydromet import stats
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
Disable import so that hydromet can be used w/o hydromath.so
Should make the code for finding/not working if hydromath.so isn't
available... | from hydromet import disaggregate
#from hydromet import models
from hydromet import stats
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
| <commit_before>from hydromet import disaggregate
from hydromet import models
from hydromet import stats
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
<commit_msg>Disable import so that hydromet can be used w/o hydromath.so
Should make the code for finding/not working if h... | from hydromet import disaggregate
#from hydromet import models
from hydromet import stats
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
| from hydromet import disaggregate
from hydromet import models
from hydromet import stats
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
Disable import so that hydromet can be used w/o hydromath.so
Should make the code for finding/not working if hydromath.so isn't
available... | <commit_before>from hydromet import disaggregate
from hydromet import models
from hydromet import stats
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
<commit_msg>Disable import so that hydromet can be used w/o hydromath.so
Should make the code for finding/not working if h... |
b1b8c9b4e392d4865756ece6528e6668e2bc8975 | wafw00f/plugins/expressionengine.py | wafw00f/plugins/expressionengine.py | #!/usr/bin/env python
NAME = 'Expression Engine (EllisLab)'
def is_waf(self):
for attack in self.attacks:
r = attack(self)
if r is None:
return
response, page = r
# There are traces found where cookie is returning values like:
# Set-Cookie: exp_last_query=834y... | #!/usr/bin/env python
NAME = 'Expression Engine (EllisLab)'
def is_waf(self):
for attack in self.attacks:
r = attack(self)
if r is None:
return
response, page = r
# There are traces found where cookie is returning values like:
# Set-Cookie: exp_last_query=834y... | Fix to avoid NoneType bugs | Fix to avoid NoneType bugs
| Python | bsd-3-clause | EnableSecurity/wafw00f | #!/usr/bin/env python
NAME = 'Expression Engine (EllisLab)'
def is_waf(self):
for attack in self.attacks:
r = attack(self)
if r is None:
return
response, page = r
# There are traces found where cookie is returning values like:
# Set-Cookie: exp_last_query=834y... | #!/usr/bin/env python
NAME = 'Expression Engine (EllisLab)'
def is_waf(self):
for attack in self.attacks:
r = attack(self)
if r is None:
return
response, page = r
# There are traces found where cookie is returning values like:
# Set-Cookie: exp_last_query=834y... | <commit_before>#!/usr/bin/env python
NAME = 'Expression Engine (EllisLab)'
def is_waf(self):
for attack in self.attacks:
r = attack(self)
if r is None:
return
response, page = r
# There are traces found where cookie is returning values like:
# Set-Cookie: exp_... | #!/usr/bin/env python
NAME = 'Expression Engine (EllisLab)'
def is_waf(self):
for attack in self.attacks:
r = attack(self)
if r is None:
return
response, page = r
# There are traces found where cookie is returning values like:
# Set-Cookie: exp_last_query=834y... | #!/usr/bin/env python
NAME = 'Expression Engine (EllisLab)'
def is_waf(self):
for attack in self.attacks:
r = attack(self)
if r is None:
return
response, page = r
# There are traces found where cookie is returning values like:
# Set-Cookie: exp_last_query=834y... | <commit_before>#!/usr/bin/env python
NAME = 'Expression Engine (EllisLab)'
def is_waf(self):
for attack in self.attacks:
r = attack(self)
if r is None:
return
response, page = r
# There are traces found where cookie is returning values like:
# Set-Cookie: exp_... |
bf241d6c7aa96c5fca834eb1063fc009a9320329 | portfolio/urls.py | portfolio/urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^about/$', views.about, name='about'),
url(r'^contact/$', views.contact, name='contact'),
url(r'^projects/$', views.projects, name='projects'),
url(r'^tribute/$', views.tribute, name='tri... | from django.conf.urls import url
from django.views.generic import TemplateView
from . import views
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^about/$', views.about, name='about'),
url(r'^contact/$', TemplateView.as_view(template_name="contact.html"), name='contact'),
# url(r'^contact/$... | Change URL pattern for contacts | Change URL pattern for contacts
| Python | mit | bacarlino/portfolio,bacarlino/portfolio,bacarlino/portfolio | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^about/$', views.about, name='about'),
url(r'^contact/$', views.contact, name='contact'),
url(r'^projects/$', views.projects, name='projects'),
url(r'^tribute/$', views.tribute, name='tri... | from django.conf.urls import url
from django.views.generic import TemplateView
from . import views
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^about/$', views.about, name='about'),
url(r'^contact/$', TemplateView.as_view(template_name="contact.html"), name='contact'),
# url(r'^contact/$... | <commit_before>from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^about/$', views.about, name='about'),
url(r'^contact/$', views.contact, name='contact'),
url(r'^projects/$', views.projects, name='projects'),
url(r'^tribute/$', views.tri... | from django.conf.urls import url
from django.views.generic import TemplateView
from . import views
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^about/$', views.about, name='about'),
url(r'^contact/$', TemplateView.as_view(template_name="contact.html"), name='contact'),
# url(r'^contact/$... | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^about/$', views.about, name='about'),
url(r'^contact/$', views.contact, name='contact'),
url(r'^projects/$', views.projects, name='projects'),
url(r'^tribute/$', views.tribute, name='tri... | <commit_before>from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^about/$', views.about, name='about'),
url(r'^contact/$', views.contact, name='contact'),
url(r'^projects/$', views.projects, name='projects'),
url(r'^tribute/$', views.tri... |
6e433c59348ed4c47c040efb50c891c4759bcee4 | jedihttp/__main__.py | jedihttp/__main__.py | # Copyright 2015 Cedraro Andrea <a.cedraro@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
#
# Unless required by applicable law or... | # Copyright 2015 Cedraro Andrea <a.cedraro@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
#
# Unless required by applicable law or... | Add command-line argument for server host | Add command-line argument for server host
| Python | apache-2.0 | vheon/JediHTTP,micbou/JediHTTP,micbou/JediHTTP,vheon/JediHTTP | # Copyright 2015 Cedraro Andrea <a.cedraro@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
#
# Unless required by applicable law or... | # Copyright 2015 Cedraro Andrea <a.cedraro@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
#
# Unless required by applicable law or... | <commit_before># Copyright 2015 Cedraro Andrea <a.cedraro@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
#
# Unless required by ap... | # Copyright 2015 Cedraro Andrea <a.cedraro@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
#
# Unless required by applicable law or... | # Copyright 2015 Cedraro Andrea <a.cedraro@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
#
# Unless required by applicable law or... | <commit_before># Copyright 2015 Cedraro Andrea <a.cedraro@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
#
# Unless required by ap... |
2ee8011b6c793c862b55272bf76c109c71fb5aaa | eigen/3.2/test/conanfile.py | eigen/3.2/test/conanfile.py | from conans.model.conan_file import ConanFile
from conans import CMake
import os
class DefaultNameConan(ConanFile):
name = "DefaultName"
version = "0.1"
settings = "os", "compiler", "arch", "build_type"
generators = "cmake"
requires = "eigen/3.2@jslee02/testing"
def build(self):
cmake ... | from conans.model.conan_file import ConanFile
from conans import CMake
import os
class DefaultNameConan(ConanFile):
name = "DefaultName"
version = "0.1"
settings = "os", "compiler", "arch", "build_type"
generators = "cmake"
requires = "eigen/3.2@jslee02/stable"
def build(self):
cmake =... | Test stable channel instead of testing channel for eigen | Test stable channel instead of testing channel for eigen
| Python | bsd-2-clause | jslee02/conan-dart,jslee02/conan-dart,jslee02/conan-dart | from conans.model.conan_file import ConanFile
from conans import CMake
import os
class DefaultNameConan(ConanFile):
name = "DefaultName"
version = "0.1"
settings = "os", "compiler", "arch", "build_type"
generators = "cmake"
requires = "eigen/3.2@jslee02/testing"
def build(self):
cmake ... | from conans.model.conan_file import ConanFile
from conans import CMake
import os
class DefaultNameConan(ConanFile):
name = "DefaultName"
version = "0.1"
settings = "os", "compiler", "arch", "build_type"
generators = "cmake"
requires = "eigen/3.2@jslee02/stable"
def build(self):
cmake =... | <commit_before>from conans.model.conan_file import ConanFile
from conans import CMake
import os
class DefaultNameConan(ConanFile):
name = "DefaultName"
version = "0.1"
settings = "os", "compiler", "arch", "build_type"
generators = "cmake"
requires = "eigen/3.2@jslee02/testing"
def build(self):... | from conans.model.conan_file import ConanFile
from conans import CMake
import os
class DefaultNameConan(ConanFile):
name = "DefaultName"
version = "0.1"
settings = "os", "compiler", "arch", "build_type"
generators = "cmake"
requires = "eigen/3.2@jslee02/stable"
def build(self):
cmake =... | from conans.model.conan_file import ConanFile
from conans import CMake
import os
class DefaultNameConan(ConanFile):
name = "DefaultName"
version = "0.1"
settings = "os", "compiler", "arch", "build_type"
generators = "cmake"
requires = "eigen/3.2@jslee02/testing"
def build(self):
cmake ... | <commit_before>from conans.model.conan_file import ConanFile
from conans import CMake
import os
class DefaultNameConan(ConanFile):
name = "DefaultName"
version = "0.1"
settings = "os", "compiler", "arch", "build_type"
generators = "cmake"
requires = "eigen/3.2@jslee02/testing"
def build(self):... |
bd4506dc95ee7a778a5b0f062d6d0423ade5890c | alerts/lib/alert_plugin_set.py | alerts/lib/alert_plugin_set.py | from mozdef_util.plugin_set import PluginSet
from mozdef_util.utilities.logger import logger
class AlertPluginSet(PluginSet):
def send_message_to_plugin(self, plugin_class, message, metadata=None):
if 'utctimestamp' in message and 'summary' in message:
message_log_str = '{0} received message:... | from mozdef_util.plugin_set import PluginSet
class AlertPluginSet(PluginSet):
def send_message_to_plugin(self, plugin_class, message, metadata=None):
return plugin_class.onMessage(message), metadata
| Remove logger entry for alert plugins receiving alerts | Remove logger entry for alert plugins receiving alerts
| Python | mpl-2.0 | mozilla/MozDef,jeffbryner/MozDef,jeffbryner/MozDef,mpurzynski/MozDef,mpurzynski/MozDef,mozilla/MozDef,jeffbryner/MozDef,mpurzynski/MozDef,jeffbryner/MozDef,mpurzynski/MozDef,mozilla/MozDef,mozilla/MozDef | from mozdef_util.plugin_set import PluginSet
from mozdef_util.utilities.logger import logger
class AlertPluginSet(PluginSet):
def send_message_to_plugin(self, plugin_class, message, metadata=None):
if 'utctimestamp' in message and 'summary' in message:
message_log_str = '{0} received message:... | from mozdef_util.plugin_set import PluginSet
class AlertPluginSet(PluginSet):
def send_message_to_plugin(self, plugin_class, message, metadata=None):
return plugin_class.onMessage(message), metadata
| <commit_before>from mozdef_util.plugin_set import PluginSet
from mozdef_util.utilities.logger import logger
class AlertPluginSet(PluginSet):
def send_message_to_plugin(self, plugin_class, message, metadata=None):
if 'utctimestamp' in message and 'summary' in message:
message_log_str = '{0} re... | from mozdef_util.plugin_set import PluginSet
class AlertPluginSet(PluginSet):
def send_message_to_plugin(self, plugin_class, message, metadata=None):
return plugin_class.onMessage(message), metadata
| from mozdef_util.plugin_set import PluginSet
from mozdef_util.utilities.logger import logger
class AlertPluginSet(PluginSet):
def send_message_to_plugin(self, plugin_class, message, metadata=None):
if 'utctimestamp' in message and 'summary' in message:
message_log_str = '{0} received message:... | <commit_before>from mozdef_util.plugin_set import PluginSet
from mozdef_util.utilities.logger import logger
class AlertPluginSet(PluginSet):
def send_message_to_plugin(self, plugin_class, message, metadata=None):
if 'utctimestamp' in message and 'summary' in message:
message_log_str = '{0} re... |
1a4d2ea23ad37b63bab1751b7f3b7572f6804f14 | api/base/exceptions.py | api/base/exceptions.py |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... | Use if response since 'is not None' is unnecessary. | Use if response since 'is not None' is unnecessary.
| Python | apache-2.0 | Johnetordoff/osf.io,njantrania/osf.io,pattisdr/osf.io,baylee-d/osf.io,GageGaskins/osf.io,brandonPurvis/osf.io,mfraezz/osf.io,TomHeatwole/osf.io,cosenal/osf.io,erinspace/osf.io,caneruguz/osf.io,crcresearch/osf.io,binoculars/osf.io,RomanZWang/osf.io,samanehsan/osf.io,doublebits/osf.io,caseyrygt/osf.io,TomHeatwole/osf.io,... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... | <commit_before>
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest_framework.view... | <commit_before>
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without Django
from rest... |
b5c9931d75b64d11681f40a7c7badea810f8592a | spiff/__init__.py | spiff/__init__.py | import logging
import inspect
def funcLog():
frame = inspect.stack()[1]
localVars = frame[0].f_locals
if 'self' in localVars:
logName = '%s.%s.%s'%(localVars['self'].__class__.__module__, localVars['self'].__class__.__name__, frame[3])
else:
logName = '%s.%s'%(frame[0].f_globals['__name__'], frame[3])
... | import logging
import inspect
def funcLog(*args, **kwargs):
frame = inspect.stack()[1]
localVars = frame[0].f_locals
if 'self' in localVars:
logName = '%s.%s.%s'%(localVars['self'].__class__.__module__, localVars['self'].__class__.__name__, frame[3])
else:
logName = '%s.%s'%(frame[0].f_globals['__name_... | Add a funcLog shortcut to debug | Add a funcLog shortcut to debug
| Python | agpl-3.0 | SYNHAK/spiff,SYNHAK/spiff,SYNHAK/spiff | import logging
import inspect
def funcLog():
frame = inspect.stack()[1]
localVars = frame[0].f_locals
if 'self' in localVars:
logName = '%s.%s.%s'%(localVars['self'].__class__.__module__, localVars['self'].__class__.__name__, frame[3])
else:
logName = '%s.%s'%(frame[0].f_globals['__name__'], frame[3])
... | import logging
import inspect
def funcLog(*args, **kwargs):
frame = inspect.stack()[1]
localVars = frame[0].f_locals
if 'self' in localVars:
logName = '%s.%s.%s'%(localVars['self'].__class__.__module__, localVars['self'].__class__.__name__, frame[3])
else:
logName = '%s.%s'%(frame[0].f_globals['__name_... | <commit_before>import logging
import inspect
def funcLog():
frame = inspect.stack()[1]
localVars = frame[0].f_locals
if 'self' in localVars:
logName = '%s.%s.%s'%(localVars['self'].__class__.__module__, localVars['self'].__class__.__name__, frame[3])
else:
logName = '%s.%s'%(frame[0].f_globals['__name_... | import logging
import inspect
def funcLog(*args, **kwargs):
frame = inspect.stack()[1]
localVars = frame[0].f_locals
if 'self' in localVars:
logName = '%s.%s.%s'%(localVars['self'].__class__.__module__, localVars['self'].__class__.__name__, frame[3])
else:
logName = '%s.%s'%(frame[0].f_globals['__name_... | import logging
import inspect
def funcLog():
frame = inspect.stack()[1]
localVars = frame[0].f_locals
if 'self' in localVars:
logName = '%s.%s.%s'%(localVars['self'].__class__.__module__, localVars['self'].__class__.__name__, frame[3])
else:
logName = '%s.%s'%(frame[0].f_globals['__name__'], frame[3])
... | <commit_before>import logging
import inspect
def funcLog():
frame = inspect.stack()[1]
localVars = frame[0].f_locals
if 'self' in localVars:
logName = '%s.%s.%s'%(localVars['self'].__class__.__module__, localVars['self'].__class__.__name__, frame[3])
else:
logName = '%s.%s'%(frame[0].f_globals['__name_... |
d87cb6b401e38a06c5d594e40ad813a9db0738e6 | taca/analysis/cli.py | taca/analysis/cli.py | """ CLI for the analysis subcommand
"""
import click
from taca.analysis import analysis as an
@click.group()
def analysis():
""" Analysis methods entry point """
pass
# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
help='Demultiplex only a pa... | """ CLI for the analysis subcommand
"""
import click
from taca.analysis import analysis as an
@click.group()
def analysis():
""" Analysis methods entry point """
pass
# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
help='Demultiplex only a pa... | Add option for triggering or not the analysis | Add option for triggering or not the analysis
| Python | mit | senthil10/TACA,kate-v-stepanova/TACA,SciLifeLab/TACA,SciLifeLab/TACA,vezzi/TACA,guillermo-carrasco/TACA,senthil10/TACA,b97pla/TACA,kate-v-stepanova/TACA,SciLifeLab/TACA,b97pla/TACA,guillermo-carrasco/TACA,vezzi/TACA | """ CLI for the analysis subcommand
"""
import click
from taca.analysis import analysis as an
@click.group()
def analysis():
""" Analysis methods entry point """
pass
# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
help='Demultiplex only a pa... | """ CLI for the analysis subcommand
"""
import click
from taca.analysis import analysis as an
@click.group()
def analysis():
""" Analysis methods entry point """
pass
# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
help='Demultiplex only a pa... | <commit_before>""" CLI for the analysis subcommand
"""
import click
from taca.analysis import analysis as an
@click.group()
def analysis():
""" Analysis methods entry point """
pass
# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
help='Demult... | """ CLI for the analysis subcommand
"""
import click
from taca.analysis import analysis as an
@click.group()
def analysis():
""" Analysis methods entry point """
pass
# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
help='Demultiplex only a pa... | """ CLI for the analysis subcommand
"""
import click
from taca.analysis import analysis as an
@click.group()
def analysis():
""" Analysis methods entry point """
pass
# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
help='Demultiplex only a pa... | <commit_before>""" CLI for the analysis subcommand
"""
import click
from taca.analysis import analysis as an
@click.group()
def analysis():
""" Analysis methods entry point """
pass
# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
help='Demult... |
74a76dd7e21c4248d6a19e55fde69b92169d4008 | osmfilter/parsing.py | osmfilter/parsing.py | from .compat import etree
from .entities import Node, Way, Relation
def parse(fp):
context = etree.iterparse(fp, events=('end',))
for action, elem in context:
# Act only on node, ways and relations
if elem.tag not in ('node', 'way', 'relation'):
continue
tags = {t.get('k'... | from threading import Thread
from .compat import etree
from .entities import Node, Way, Relation
def xml_node_cleanup(elem):
elem.clear()
while elem.getprevious() is not None:
del elem.getparent()[0]
def parse(fp):
context = etree.iterparse(fp, events=('end',))
for action, elem in context:... | Make Reader subclass of Thread | Make Reader subclass of Thread
| Python | mit | gileri/osmfiltering | from .compat import etree
from .entities import Node, Way, Relation
def parse(fp):
context = etree.iterparse(fp, events=('end',))
for action, elem in context:
# Act only on node, ways and relations
if elem.tag not in ('node', 'way', 'relation'):
continue
tags = {t.get('k'... | from threading import Thread
from .compat import etree
from .entities import Node, Way, Relation
def xml_node_cleanup(elem):
elem.clear()
while elem.getprevious() is not None:
del elem.getparent()[0]
def parse(fp):
context = etree.iterparse(fp, events=('end',))
for action, elem in context:... | <commit_before>from .compat import etree
from .entities import Node, Way, Relation
def parse(fp):
context = etree.iterparse(fp, events=('end',))
for action, elem in context:
# Act only on node, ways and relations
if elem.tag not in ('node', 'way', 'relation'):
continue
ta... | from threading import Thread
from .compat import etree
from .entities import Node, Way, Relation
def xml_node_cleanup(elem):
elem.clear()
while elem.getprevious() is not None:
del elem.getparent()[0]
def parse(fp):
context = etree.iterparse(fp, events=('end',))
for action, elem in context:... | from .compat import etree
from .entities import Node, Way, Relation
def parse(fp):
context = etree.iterparse(fp, events=('end',))
for action, elem in context:
# Act only on node, ways and relations
if elem.tag not in ('node', 'way', 'relation'):
continue
tags = {t.get('k'... | <commit_before>from .compat import etree
from .entities import Node, Way, Relation
def parse(fp):
context = etree.iterparse(fp, events=('end',))
for action, elem in context:
# Act only on node, ways and relations
if elem.tag not in ('node', 'way', 'relation'):
continue
ta... |
675c6d78738a56cc556984553216ce92cf0ecd94 | test/parseResults.py | test/parseResults.py | #!/usr/bin/env python3
import json
import sys
PREFIXES = [
["FAIL", "PASS"],
["EXPECTED FAIL", "UNEXPECTED PASS"],
]
def parse_expected_failures():
expected_failures = set()
with open("expected-failures.txt", "r") as fp:
for line in fp:
line = line.strip()
if not line... | #!/usr/bin/env python3
import json
import sys
PREFIXES = [
["FAIL", "PASS"],
["EXPECTED FAIL", "UNEXPECTED PASS"],
]
def parse_expected_failures():
expected_failures = set()
with open("expected-failures.txt", "r") as fp:
for line in fp:
line = line.strip()
if not line... | Print the scenario when running 262-style tests. | Print the scenario when running 262-style tests.
| Python | isc | js-temporal/temporal-polyfill,js-temporal/temporal-polyfill,js-temporal/temporal-polyfill | #!/usr/bin/env python3
import json
import sys
PREFIXES = [
["FAIL", "PASS"],
["EXPECTED FAIL", "UNEXPECTED PASS"],
]
def parse_expected_failures():
expected_failures = set()
with open("expected-failures.txt", "r") as fp:
for line in fp:
line = line.strip()
if not line... | #!/usr/bin/env python3
import json
import sys
PREFIXES = [
["FAIL", "PASS"],
["EXPECTED FAIL", "UNEXPECTED PASS"],
]
def parse_expected_failures():
expected_failures = set()
with open("expected-failures.txt", "r") as fp:
for line in fp:
line = line.strip()
if not line... | <commit_before>#!/usr/bin/env python3
import json
import sys
PREFIXES = [
["FAIL", "PASS"],
["EXPECTED FAIL", "UNEXPECTED PASS"],
]
def parse_expected_failures():
expected_failures = set()
with open("expected-failures.txt", "r") as fp:
for line in fp:
line = line.strip()
... | #!/usr/bin/env python3
import json
import sys
PREFIXES = [
["FAIL", "PASS"],
["EXPECTED FAIL", "UNEXPECTED PASS"],
]
def parse_expected_failures():
expected_failures = set()
with open("expected-failures.txt", "r") as fp:
for line in fp:
line = line.strip()
if not line... | #!/usr/bin/env python3
import json
import sys
PREFIXES = [
["FAIL", "PASS"],
["EXPECTED FAIL", "UNEXPECTED PASS"],
]
def parse_expected_failures():
expected_failures = set()
with open("expected-failures.txt", "r") as fp:
for line in fp:
line = line.strip()
if not line... | <commit_before>#!/usr/bin/env python3
import json
import sys
PREFIXES = [
["FAIL", "PASS"],
["EXPECTED FAIL", "UNEXPECTED PASS"],
]
def parse_expected_failures():
expected_failures = set()
with open("expected-failures.txt", "r") as fp:
for line in fp:
line = line.strip()
... |
da516d06ab294dc2dde4bb671ab16653b1421314 | tests/performance.py | tests/performance.py | """Script to run performance check."""
import time
from examples.game_of_life import GameOfLife, GOLExperiment
from xentica.utils.formatters import sizeof_fmt
MODELS = [
("Conway's Life", GameOfLife, GOLExperiment),
]
NUM_STEPS = 10000
if __name__ == "__main__":
for name, model, experiment in MODELS:
... | """Script to run performance check."""
import time
from examples.game_of_life import (
GameOfLife, GOLExperiment
)
from examples.shifting_sands import (
ShiftingSands, ShiftingSandsExperiment
)
from xentica.utils.formatters import sizeof_fmt
MODELS = [
("Conway's Life", GameOfLife, GOLExperiment),
("... | Add Shifting Sands to benchmark tests | Add Shifting Sands to benchmark tests
| Python | mit | a5kin/hecate,a5kin/hecate | """Script to run performance check."""
import time
from examples.game_of_life import GameOfLife, GOLExperiment
from xentica.utils.formatters import sizeof_fmt
MODELS = [
("Conway's Life", GameOfLife, GOLExperiment),
]
NUM_STEPS = 10000
if __name__ == "__main__":
for name, model, experiment in MODELS:
... | """Script to run performance check."""
import time
from examples.game_of_life import (
GameOfLife, GOLExperiment
)
from examples.shifting_sands import (
ShiftingSands, ShiftingSandsExperiment
)
from xentica.utils.formatters import sizeof_fmt
MODELS = [
("Conway's Life", GameOfLife, GOLExperiment),
("... | <commit_before>"""Script to run performance check."""
import time
from examples.game_of_life import GameOfLife, GOLExperiment
from xentica.utils.formatters import sizeof_fmt
MODELS = [
("Conway's Life", GameOfLife, GOLExperiment),
]
NUM_STEPS = 10000
if __name__ == "__main__":
for name, model, experiment i... | """Script to run performance check."""
import time
from examples.game_of_life import (
GameOfLife, GOLExperiment
)
from examples.shifting_sands import (
ShiftingSands, ShiftingSandsExperiment
)
from xentica.utils.formatters import sizeof_fmt
MODELS = [
("Conway's Life", GameOfLife, GOLExperiment),
("... | """Script to run performance check."""
import time
from examples.game_of_life import GameOfLife, GOLExperiment
from xentica.utils.formatters import sizeof_fmt
MODELS = [
("Conway's Life", GameOfLife, GOLExperiment),
]
NUM_STEPS = 10000
if __name__ == "__main__":
for name, model, experiment in MODELS:
... | <commit_before>"""Script to run performance check."""
import time
from examples.game_of_life import GameOfLife, GOLExperiment
from xentica.utils.formatters import sizeof_fmt
MODELS = [
("Conway's Life", GameOfLife, GOLExperiment),
]
NUM_STEPS = 10000
if __name__ == "__main__":
for name, model, experiment i... |
d2130b64c63bdcfdea854db39fb21c7efe0b24e1 | tests/test_httpheader.py | tests/test_httpheader.py | # MIT licensed
# Copyright (c) 2021 lilydjwg <lilydjwg@gmail.com>, et al.
import pytest
pytestmark = pytest.mark.asyncio
async def test_redirection(get_version):
assert await get_version("jmeter-plugins-manager", {
"source": "httpheader",
"url": "https://www.unifiedremote.com/download/linux-x64-d... | # MIT licensed
# Copyright (c) 2021 lilydjwg <lilydjwg@gmail.com>, et al.
import pytest
pytestmark = pytest.mark.asyncio
async def test_redirection(get_version):
assert await get_version("unifiedremote", {
"source": "httpheader",
"url": "https://www.unifiedremote.com/download/linux-x64-deb",
... | Correct package name in httpheader test | Correct package name in httpheader test
| Python | mit | lilydjwg/nvchecker | # MIT licensed
# Copyright (c) 2021 lilydjwg <lilydjwg@gmail.com>, et al.
import pytest
pytestmark = pytest.mark.asyncio
async def test_redirection(get_version):
assert await get_version("jmeter-plugins-manager", {
"source": "httpheader",
"url": "https://www.unifiedremote.com/download/linux-x64-d... | # MIT licensed
# Copyright (c) 2021 lilydjwg <lilydjwg@gmail.com>, et al.
import pytest
pytestmark = pytest.mark.asyncio
async def test_redirection(get_version):
assert await get_version("unifiedremote", {
"source": "httpheader",
"url": "https://www.unifiedremote.com/download/linux-x64-deb",
... | <commit_before># MIT licensed
# Copyright (c) 2021 lilydjwg <lilydjwg@gmail.com>, et al.
import pytest
pytestmark = pytest.mark.asyncio
async def test_redirection(get_version):
assert await get_version("jmeter-plugins-manager", {
"source": "httpheader",
"url": "https://www.unifiedremote.com/downl... | # MIT licensed
# Copyright (c) 2021 lilydjwg <lilydjwg@gmail.com>, et al.
import pytest
pytestmark = pytest.mark.asyncio
async def test_redirection(get_version):
assert await get_version("unifiedremote", {
"source": "httpheader",
"url": "https://www.unifiedremote.com/download/linux-x64-deb",
... | # MIT licensed
# Copyright (c) 2021 lilydjwg <lilydjwg@gmail.com>, et al.
import pytest
pytestmark = pytest.mark.asyncio
async def test_redirection(get_version):
assert await get_version("jmeter-plugins-manager", {
"source": "httpheader",
"url": "https://www.unifiedremote.com/download/linux-x64-d... | <commit_before># MIT licensed
# Copyright (c) 2021 lilydjwg <lilydjwg@gmail.com>, et al.
import pytest
pytestmark = pytest.mark.asyncio
async def test_redirection(get_version):
assert await get_version("jmeter-plugins-manager", {
"source": "httpheader",
"url": "https://www.unifiedremote.com/downl... |
361a1a1ca88630981bb83a85648714c5bc4c5a89 | thinc/neural/_classes/feed_forward.py | thinc/neural/_classes/feed_forward.py | from .model import Model
from ... import describe
def _run_child_hooks(model, X, y):
for layer in model._layers:
for hook in layer.on_data_hooks:
hook(layer, X, y)
X = layer(X)
@describe.on_data(_run_child_hooks)
class FeedForward(Model):
'''A feed-forward network, that chains mu... | from .model import Model
from ... import describe
def _run_child_hooks(model, X, y):
for layer in model._layers:
for hook in layer.on_data_hooks:
hook(layer, X, y)
X = layer(X)
@describe.on_data(_run_child_hooks)
class FeedForward(Model):
'''A feed-forward network, that chains mu... | Add predict() path to feed-forward | Add predict() path to feed-forward
| Python | mit | explosion/thinc,explosion/thinc,spacy-io/thinc,spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc | from .model import Model
from ... import describe
def _run_child_hooks(model, X, y):
for layer in model._layers:
for hook in layer.on_data_hooks:
hook(layer, X, y)
X = layer(X)
@describe.on_data(_run_child_hooks)
class FeedForward(Model):
'''A feed-forward network, that chains mu... | from .model import Model
from ... import describe
def _run_child_hooks(model, X, y):
for layer in model._layers:
for hook in layer.on_data_hooks:
hook(layer, X, y)
X = layer(X)
@describe.on_data(_run_child_hooks)
class FeedForward(Model):
'''A feed-forward network, that chains mu... | <commit_before>from .model import Model
from ... import describe
def _run_child_hooks(model, X, y):
for layer in model._layers:
for hook in layer.on_data_hooks:
hook(layer, X, y)
X = layer(X)
@describe.on_data(_run_child_hooks)
class FeedForward(Model):
'''A feed-forward network,... | from .model import Model
from ... import describe
def _run_child_hooks(model, X, y):
for layer in model._layers:
for hook in layer.on_data_hooks:
hook(layer, X, y)
X = layer(X)
@describe.on_data(_run_child_hooks)
class FeedForward(Model):
'''A feed-forward network, that chains mu... | from .model import Model
from ... import describe
def _run_child_hooks(model, X, y):
for layer in model._layers:
for hook in layer.on_data_hooks:
hook(layer, X, y)
X = layer(X)
@describe.on_data(_run_child_hooks)
class FeedForward(Model):
'''A feed-forward network, that chains mu... | <commit_before>from .model import Model
from ... import describe
def _run_child_hooks(model, X, y):
for layer in model._layers:
for hook in layer.on_data_hooks:
hook(layer, X, y)
X = layer(X)
@describe.on_data(_run_child_hooks)
class FeedForward(Model):
'''A feed-forward network,... |
76d9d1beaebf5b7d8e2ef051c8b8926724542387 | regenesis/storage.py | regenesis/storage.py | import os
import json
from regenesis.core import app
def cube_path(cube_name, ext):
return os.path.join(
app.config.get('DATA_DIRECTORY'),
cube_name + '.' + ext
)
def store_cube_raw(cube_name, cube_data):
fh = open(cube_path(cube_name, 'raw'), 'wb')
fh.write(cube_data.e... | import os
import json
from regenesis.core import app
def cube_path(cube_name, ext):
return os.path.join(
app.config.get('DATA_DIRECTORY'),
cube_name + '.' + ext
)
def exists_raw(cube_name):
return os.path.isfile(cube_path(cube_name, 'raw'))
def store_cube_raw(cube_name, cu... | Check if a cube exists on disk. | Check if a cube exists on disk. | Python | mit | pudo/regenesis,pudo/regenesis | import os
import json
from regenesis.core import app
def cube_path(cube_name, ext):
return os.path.join(
app.config.get('DATA_DIRECTORY'),
cube_name + '.' + ext
)
def store_cube_raw(cube_name, cube_data):
fh = open(cube_path(cube_name, 'raw'), 'wb')
fh.write(cube_data.e... | import os
import json
from regenesis.core import app
def cube_path(cube_name, ext):
return os.path.join(
app.config.get('DATA_DIRECTORY'),
cube_name + '.' + ext
)
def exists_raw(cube_name):
return os.path.isfile(cube_path(cube_name, 'raw'))
def store_cube_raw(cube_name, cu... | <commit_before>import os
import json
from regenesis.core import app
def cube_path(cube_name, ext):
return os.path.join(
app.config.get('DATA_DIRECTORY'),
cube_name + '.' + ext
)
def store_cube_raw(cube_name, cube_data):
fh = open(cube_path(cube_name, 'raw'), 'wb')
fh.wr... | import os
import json
from regenesis.core import app
def cube_path(cube_name, ext):
return os.path.join(
app.config.get('DATA_DIRECTORY'),
cube_name + '.' + ext
)
def exists_raw(cube_name):
return os.path.isfile(cube_path(cube_name, 'raw'))
def store_cube_raw(cube_name, cu... | import os
import json
from regenesis.core import app
def cube_path(cube_name, ext):
return os.path.join(
app.config.get('DATA_DIRECTORY'),
cube_name + '.' + ext
)
def store_cube_raw(cube_name, cube_data):
fh = open(cube_path(cube_name, 'raw'), 'wb')
fh.write(cube_data.e... | <commit_before>import os
import json
from regenesis.core import app
def cube_path(cube_name, ext):
return os.path.join(
app.config.get('DATA_DIRECTORY'),
cube_name + '.' + ext
)
def store_cube_raw(cube_name, cube_data):
fh = open(cube_path(cube_name, 'raw'), 'wb')
fh.wr... |
593c2ec0d62049cee9bedc282903491b670d811f | ci/set_secrets_file.py | ci/set_secrets_file.py | """
Move the right secrets file into place for Travis CI.
"""
| """
Move the right secrets file into place for Travis CI.
"""
import os
import shutil
from pathlib import Path
def move_secrets_file() -> None:
"""
Move the right secrets file to the current directory.
"""
branch = os.environ['TRAVIS_BRANCH']
is_pr = os.environ['TRAVIS_PULL_REQUEST'] != 'false'
... | Add script to move secrets file | Add script to move secrets file
| Python | mit | adamtheturtle/vws-python,adamtheturtle/vws-python | """
Move the right secrets file into place for Travis CI.
"""
Add script to move secrets file | """
Move the right secrets file into place for Travis CI.
"""
import os
import shutil
from pathlib import Path
def move_secrets_file() -> None:
"""
Move the right secrets file to the current directory.
"""
branch = os.environ['TRAVIS_BRANCH']
is_pr = os.environ['TRAVIS_PULL_REQUEST'] != 'false'
... | <commit_before>"""
Move the right secrets file into place for Travis CI.
"""
<commit_msg>Add script to move secrets file<commit_after> | """
Move the right secrets file into place for Travis CI.
"""
import os
import shutil
from pathlib import Path
def move_secrets_file() -> None:
"""
Move the right secrets file to the current directory.
"""
branch = os.environ['TRAVIS_BRANCH']
is_pr = os.environ['TRAVIS_PULL_REQUEST'] != 'false'
... | """
Move the right secrets file into place for Travis CI.
"""
Add script to move secrets file"""
Move the right secrets file into place for Travis CI.
"""
import os
import shutil
from pathlib import Path
def move_secrets_file() -> None:
"""
Move the right secrets file to the current directory.
"""
br... | <commit_before>"""
Move the right secrets file into place for Travis CI.
"""
<commit_msg>Add script to move secrets file<commit_after>"""
Move the right secrets file into place for Travis CI.
"""
import os
import shutil
from pathlib import Path
def move_secrets_file() -> None:
"""
Move the right secrets file... |
982e523807b42d8258ddcc4b984399b46e8ad74f | tools/tsv_gen_embeddings.py | tools/tsv_gen_embeddings.py | #! /usr/bin/python3
import sys
import argparse
import xml_utils as u
import datetime
from collections import defaultdict
##------------------------------------------------------------
## can be called with:
## tsv_gen_embeddings *.xml dirs
##------------------------------------------------------------
def main (a... | #! /usr/bin/python3
import sys
import argparse
import xml_utils as u
import datetime
from collections import defaultdict
##------------------------------------------------------------
## can be called with:
## tsv_gen_embeddings *.xml dirs
##------------------------------------------------------------
def main (a... | Write out tsv embedding files instead of plotting them. | Write out tsv embedding files instead of plotting them.
| Python | mit | hypraptive/bearid,hypraptive/bearid,hypraptive/bearid | #! /usr/bin/python3
import sys
import argparse
import xml_utils as u
import datetime
from collections import defaultdict
##------------------------------------------------------------
## can be called with:
## tsv_gen_embeddings *.xml dirs
##------------------------------------------------------------
def main (a... | #! /usr/bin/python3
import sys
import argparse
import xml_utils as u
import datetime
from collections import defaultdict
##------------------------------------------------------------
## can be called with:
## tsv_gen_embeddings *.xml dirs
##------------------------------------------------------------
def main (a... | <commit_before>#! /usr/bin/python3
import sys
import argparse
import xml_utils as u
import datetime
from collections import defaultdict
##------------------------------------------------------------
## can be called with:
## tsv_gen_embeddings *.xml dirs
##---------------------------------------------------------... | #! /usr/bin/python3
import sys
import argparse
import xml_utils as u
import datetime
from collections import defaultdict
##------------------------------------------------------------
## can be called with:
## tsv_gen_embeddings *.xml dirs
##------------------------------------------------------------
def main (a... | #! /usr/bin/python3
import sys
import argparse
import xml_utils as u
import datetime
from collections import defaultdict
##------------------------------------------------------------
## can be called with:
## tsv_gen_embeddings *.xml dirs
##------------------------------------------------------------
def main (a... | <commit_before>#! /usr/bin/python3
import sys
import argparse
import xml_utils as u
import datetime
from collections import defaultdict
##------------------------------------------------------------
## can be called with:
## tsv_gen_embeddings *.xml dirs
##---------------------------------------------------------... |
663edbc7b19d5cb99a78bc380359a0dbfae1f1aa | cmsplugin_rst/forms.py | cmsplugin_rst/forms.py | from cmsplugin_rst.models import RstPluginModel, rst_help_text
from django import forms
class RstPluginForm(forms.ModelForm):
body = forms.CharField(
widget=forms.Textarea(attrs={
'rows':30,
'cols':80,
'style':'font-family:monospace'
... | from cmsplugin_rst.models import RstPluginModel, rst_help_text
from django import forms
class RstPluginForm(forms.ModelForm):
body = forms.CharField(
widget=forms.Textarea(attrs={
'rows':20,
'cols':80,
'style':'font-family:monospace'
... | Tweak too high textarea for RST text. | Tweak too high textarea for RST text.
| Python | bsd-3-clause | ojii/cmsplugin-rst,pakal/cmsplugin-rst | from cmsplugin_rst.models import RstPluginModel, rst_help_text
from django import forms
class RstPluginForm(forms.ModelForm):
body = forms.CharField(
widget=forms.Textarea(attrs={
'rows':30,
'cols':80,
'style':'font-family:monospace'
... | from cmsplugin_rst.models import RstPluginModel, rst_help_text
from django import forms
class RstPluginForm(forms.ModelForm):
body = forms.CharField(
widget=forms.Textarea(attrs={
'rows':20,
'cols':80,
'style':'font-family:monospace'
... | <commit_before>from cmsplugin_rst.models import RstPluginModel, rst_help_text
from django import forms
class RstPluginForm(forms.ModelForm):
body = forms.CharField(
widget=forms.Textarea(attrs={
'rows':30,
'cols':80,
'style':'font-famil... | from cmsplugin_rst.models import RstPluginModel, rst_help_text
from django import forms
class RstPluginForm(forms.ModelForm):
body = forms.CharField(
widget=forms.Textarea(attrs={
'rows':20,
'cols':80,
'style':'font-family:monospace'
... | from cmsplugin_rst.models import RstPluginModel, rst_help_text
from django import forms
class RstPluginForm(forms.ModelForm):
body = forms.CharField(
widget=forms.Textarea(attrs={
'rows':30,
'cols':80,
'style':'font-family:monospace'
... | <commit_before>from cmsplugin_rst.models import RstPluginModel, rst_help_text
from django import forms
class RstPluginForm(forms.ModelForm):
body = forms.CharField(
widget=forms.Textarea(attrs={
'rows':30,
'cols':80,
'style':'font-famil... |
255a93e2e075a8db914e4736cb79fbdb58b41a24 | file_transfer/baltrad_to_s3.py | file_transfer/baltrad_to_s3.py | """
Baltrad to S3 porting
"""
import sys
from creds import URL, LOGIN, PASSWORD
import datamover as dm
def main():
"""Run data transfer from Baltrad to S3"""
# ------------------
# DATA TRANSFER
# ------------------
# Setup the connection of the Baltrad and S3
btos = dm.BaltradToS3(URL, L... | """
Baltrad to S3 porting
"""
import sys
from creds import URL, LOGIN, PASSWORD
import datamover as dm
def main():
"""Run data transfer from Baltrad to S3"""
# ------------------
# DATA TRANSFER
# ------------------
# Setup the connection of the Baltrad and S3
btos = dm.BaltradToS3(URL, L... | Extend data pipeline from baltrad | Extend data pipeline from baltrad
| Python | mit | enram/data-repository,enram/data-repository,enram/data-repository,enram/data-repository,enram/infrastructure,enram/infrastructure | """
Baltrad to S3 porting
"""
import sys
from creds import URL, LOGIN, PASSWORD
import datamover as dm
def main():
"""Run data transfer from Baltrad to S3"""
# ------------------
# DATA TRANSFER
# ------------------
# Setup the connection of the Baltrad and S3
btos = dm.BaltradToS3(URL, L... | """
Baltrad to S3 porting
"""
import sys
from creds import URL, LOGIN, PASSWORD
import datamover as dm
def main():
"""Run data transfer from Baltrad to S3"""
# ------------------
# DATA TRANSFER
# ------------------
# Setup the connection of the Baltrad and S3
btos = dm.BaltradToS3(URL, L... | <commit_before>"""
Baltrad to S3 porting
"""
import sys
from creds import URL, LOGIN, PASSWORD
import datamover as dm
def main():
"""Run data transfer from Baltrad to S3"""
# ------------------
# DATA TRANSFER
# ------------------
# Setup the connection of the Baltrad and S3
btos = dm.Bal... | """
Baltrad to S3 porting
"""
import sys
from creds import URL, LOGIN, PASSWORD
import datamover as dm
def main():
"""Run data transfer from Baltrad to S3"""
# ------------------
# DATA TRANSFER
# ------------------
# Setup the connection of the Baltrad and S3
btos = dm.BaltradToS3(URL, L... | """
Baltrad to S3 porting
"""
import sys
from creds import URL, LOGIN, PASSWORD
import datamover as dm
def main():
"""Run data transfer from Baltrad to S3"""
# ------------------
# DATA TRANSFER
# ------------------
# Setup the connection of the Baltrad and S3
btos = dm.BaltradToS3(URL, L... | <commit_before>"""
Baltrad to S3 porting
"""
import sys
from creds import URL, LOGIN, PASSWORD
import datamover as dm
def main():
"""Run data transfer from Baltrad to S3"""
# ------------------
# DATA TRANSFER
# ------------------
# Setup the connection of the Baltrad and S3
btos = dm.Bal... |
fd721c76e30f776b04c7691ce536525561dd2cfa | sympy/matrices/expressions/transpose.py | sympy/matrices/expressions/transpose.py | from matexpr import MatrixExpr
from sympy import Basic
class Transpose(MatrixExpr):
"""Matrix Transpose
Represents the transpose of a matrix expression.
Use .T as shorthand
>>> from sympy import MatrixSymbol, Transpose
>>> A = MatrixSymbol('A', 3, 5)
>>> B = MatrixSymbol('B', 5, 3)
>>> T... | from matexpr import MatrixExpr
from sympy import Basic
class Transpose(MatrixExpr):
"""Matrix Transpose
Represents the transpose of a matrix expression.
Use .T as shorthand
>>> from sympy import MatrixSymbol, Transpose
>>> A = MatrixSymbol('A', 3, 5)
>>> B = MatrixSymbol('B', 5, 3)
>>> T... | Remove unnecessary MatAdd and MatMul imports | Remove unnecessary MatAdd and MatMul imports
| Python | bsd-3-clause | drufat/sympy,hrashk/sympy,toolforger/sympy,yashsharan/sympy,AunShiLord/sympy,oliverlee/sympy,MridulS/sympy,Arafatk/sympy,shikil/sympy,MechCoder/sympy,lindsayad/sympy,kevalds51/sympy,iamutkarshtiwari/sympy,cswiercz/sympy,mafiya69/sympy,AkademieOlympia/sympy,Designist/sympy,garvitr/sympy,sahmed95/sympy,pandeyadarsh/sympy... | from matexpr import MatrixExpr
from sympy import Basic
class Transpose(MatrixExpr):
"""Matrix Transpose
Represents the transpose of a matrix expression.
Use .T as shorthand
>>> from sympy import MatrixSymbol, Transpose
>>> A = MatrixSymbol('A', 3, 5)
>>> B = MatrixSymbol('B', 5, 3)
>>> T... | from matexpr import MatrixExpr
from sympy import Basic
class Transpose(MatrixExpr):
"""Matrix Transpose
Represents the transpose of a matrix expression.
Use .T as shorthand
>>> from sympy import MatrixSymbol, Transpose
>>> A = MatrixSymbol('A', 3, 5)
>>> B = MatrixSymbol('B', 5, 3)
>>> T... | <commit_before>from matexpr import MatrixExpr
from sympy import Basic
class Transpose(MatrixExpr):
"""Matrix Transpose
Represents the transpose of a matrix expression.
Use .T as shorthand
>>> from sympy import MatrixSymbol, Transpose
>>> A = MatrixSymbol('A', 3, 5)
>>> B = MatrixSymbol('B', ... | from matexpr import MatrixExpr
from sympy import Basic
class Transpose(MatrixExpr):
"""Matrix Transpose
Represents the transpose of a matrix expression.
Use .T as shorthand
>>> from sympy import MatrixSymbol, Transpose
>>> A = MatrixSymbol('A', 3, 5)
>>> B = MatrixSymbol('B', 5, 3)
>>> T... | from matexpr import MatrixExpr
from sympy import Basic
class Transpose(MatrixExpr):
"""Matrix Transpose
Represents the transpose of a matrix expression.
Use .T as shorthand
>>> from sympy import MatrixSymbol, Transpose
>>> A = MatrixSymbol('A', 3, 5)
>>> B = MatrixSymbol('B', 5, 3)
>>> T... | <commit_before>from matexpr import MatrixExpr
from sympy import Basic
class Transpose(MatrixExpr):
"""Matrix Transpose
Represents the transpose of a matrix expression.
Use .T as shorthand
>>> from sympy import MatrixSymbol, Transpose
>>> A = MatrixSymbol('A', 3, 5)
>>> B = MatrixSymbol('B', ... |
ed40088b5e913e70c161e8148ab76fdc0b6c5c46 | clt_utils/argparse.py | clt_utils/argparse.py | from datetime import datetime
import argparse
import os
def is_dir(string):
"""
Type check for a valid directory for ArgumentParser.
"""
if not os.path.isdir(string):
msg = '{0} is not a directory'.format(string)
raise argparse.ArgumentTypeError(msg)
return string
def is_file(str... | from __future__ import absolute_import
from datetime import datetime
import argparse as _argparse
import os
def is_dir(string):
"""
Type check for a valid directory for ArgumentParser.
"""
if not os.path.isdir(string):
msg = '{0} is not a directory'.format(string)
raise _argparse.Argu... | Fix bug with self reference | Fix bug with self reference
| Python | apache-2.0 | 55minutes/clt-utils | from datetime import datetime
import argparse
import os
def is_dir(string):
"""
Type check for a valid directory for ArgumentParser.
"""
if not os.path.isdir(string):
msg = '{0} is not a directory'.format(string)
raise argparse.ArgumentTypeError(msg)
return string
def is_file(str... | from __future__ import absolute_import
from datetime import datetime
import argparse as _argparse
import os
def is_dir(string):
"""
Type check for a valid directory for ArgumentParser.
"""
if not os.path.isdir(string):
msg = '{0} is not a directory'.format(string)
raise _argparse.Argu... | <commit_before>from datetime import datetime
import argparse
import os
def is_dir(string):
"""
Type check for a valid directory for ArgumentParser.
"""
if not os.path.isdir(string):
msg = '{0} is not a directory'.format(string)
raise argparse.ArgumentTypeError(msg)
return string
... | from __future__ import absolute_import
from datetime import datetime
import argparse as _argparse
import os
def is_dir(string):
"""
Type check for a valid directory for ArgumentParser.
"""
if not os.path.isdir(string):
msg = '{0} is not a directory'.format(string)
raise _argparse.Argu... | from datetime import datetime
import argparse
import os
def is_dir(string):
"""
Type check for a valid directory for ArgumentParser.
"""
if not os.path.isdir(string):
msg = '{0} is not a directory'.format(string)
raise argparse.ArgumentTypeError(msg)
return string
def is_file(str... | <commit_before>from datetime import datetime
import argparse
import os
def is_dir(string):
"""
Type check for a valid directory for ArgumentParser.
"""
if not os.path.isdir(string):
msg = '{0} is not a directory'.format(string)
raise argparse.ArgumentTypeError(msg)
return string
... |
923ae01ab8beadfd73c5275f0c954510d3a13832 | coherence/__init__.py | coherence/__init__.py | import platform
import sys
__version_info__ = (0, 6, 7)
__version__ = '.'.join(map(str, __version_info__))
SERVER_ID = ','.join([platform.system(),
platform.release(),
'UPnP/1.0,Coherence UPnP framework',
__version__])
try:
from twisted import ve... | import platform
import sys
__version__ = "0.6.7.dev0"
SERVER_ID = ','.join([platform.system(),
platform.release(),
'UPnP/1.0,Coherence UPnP framework',
__version__])
try:
from twisted import version as twisted_version
from twisted.web import ... | Switch to PEP 440 compliant version string and bump to 0.6.7.dev0. | Switch to PEP 440 compliant version string and bump to 0.6.7.dev0.
| Python | mit | coherence-project/Coherence,coherence-project/Coherence | import platform
import sys
__version_info__ = (0, 6, 7)
__version__ = '.'.join(map(str, __version_info__))
SERVER_ID = ','.join([platform.system(),
platform.release(),
'UPnP/1.0,Coherence UPnP framework',
__version__])
try:
from twisted import ve... | import platform
import sys
__version__ = "0.6.7.dev0"
SERVER_ID = ','.join([platform.system(),
platform.release(),
'UPnP/1.0,Coherence UPnP framework',
__version__])
try:
from twisted import version as twisted_version
from twisted.web import ... | <commit_before>import platform
import sys
__version_info__ = (0, 6, 7)
__version__ = '.'.join(map(str, __version_info__))
SERVER_ID = ','.join([platform.system(),
platform.release(),
'UPnP/1.0,Coherence UPnP framework',
__version__])
try:
from tw... | import platform
import sys
__version__ = "0.6.7.dev0"
SERVER_ID = ','.join([platform.system(),
platform.release(),
'UPnP/1.0,Coherence UPnP framework',
__version__])
try:
from twisted import version as twisted_version
from twisted.web import ... | import platform
import sys
__version_info__ = (0, 6, 7)
__version__ = '.'.join(map(str, __version_info__))
SERVER_ID = ','.join([platform.system(),
platform.release(),
'UPnP/1.0,Coherence UPnP framework',
__version__])
try:
from twisted import ve... | <commit_before>import platform
import sys
__version_info__ = (0, 6, 7)
__version__ = '.'.join(map(str, __version_info__))
SERVER_ID = ','.join([platform.system(),
platform.release(),
'UPnP/1.0,Coherence UPnP framework',
__version__])
try:
from tw... |
0202320f5f07437292bfa293c2a6711416dab048 | vumi/transports/integrat/failures.py | vumi/transports/integrat/failures.py | # -*- test-case-name: vumi.transports.intergrat.tests.test_failures -*-
from vumi.transports.failures import FailureWorker
class IntegratFailureWorker(FailureWorker):
def do_retry(self, message, reason):
message = self.update_retry_metadata(message)
self.store_failure(message, reason, message['r... | # -*- test-case-name: vumi.transports.integrat.tests.test_failures -*-
from vumi.transports.failures import FailureWorker
class IntegratFailureWorker(FailureWorker):
def do_retry(self, message, reason):
message = self.update_retry_metadata(message)
self.store_failure(message, reason, message['re... | Fix link to failure tests. | Fix link to failure tests.
| Python | bsd-3-clause | TouK/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,harrissoerja/vumi,TouK/vumi,harrissoerja/vumi,harrissoerja/vumi | # -*- test-case-name: vumi.transports.intergrat.tests.test_failures -*-
from vumi.transports.failures import FailureWorker
class IntegratFailureWorker(FailureWorker):
def do_retry(self, message, reason):
message = self.update_retry_metadata(message)
self.store_failure(message, reason, message['r... | # -*- test-case-name: vumi.transports.integrat.tests.test_failures -*-
from vumi.transports.failures import FailureWorker
class IntegratFailureWorker(FailureWorker):
def do_retry(self, message, reason):
message = self.update_retry_metadata(message)
self.store_failure(message, reason, message['re... | <commit_before># -*- test-case-name: vumi.transports.intergrat.tests.test_failures -*-
from vumi.transports.failures import FailureWorker
class IntegratFailureWorker(FailureWorker):
def do_retry(self, message, reason):
message = self.update_retry_metadata(message)
self.store_failure(message, rea... | # -*- test-case-name: vumi.transports.integrat.tests.test_failures -*-
from vumi.transports.failures import FailureWorker
class IntegratFailureWorker(FailureWorker):
def do_retry(self, message, reason):
message = self.update_retry_metadata(message)
self.store_failure(message, reason, message['re... | # -*- test-case-name: vumi.transports.intergrat.tests.test_failures -*-
from vumi.transports.failures import FailureWorker
class IntegratFailureWorker(FailureWorker):
def do_retry(self, message, reason):
message = self.update_retry_metadata(message)
self.store_failure(message, reason, message['r... | <commit_before># -*- test-case-name: vumi.transports.intergrat.tests.test_failures -*-
from vumi.transports.failures import FailureWorker
class IntegratFailureWorker(FailureWorker):
def do_retry(self, message, reason):
message = self.update_retry_metadata(message)
self.store_failure(message, rea... |
b5663776e89b1d406b2b93d291a346bd9235fcf1 | wafer/utils.py | wafer/utils.py | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | Add query tracking utility for use in tests. | Add query tracking utility for use in tests.
| Python | isc | CarlFK/wafer,CarlFK/wafer,CarlFK/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CarlFK/wafer | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | <commit_before>import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore... | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore')
def cache_... | <commit_before>import functools
import unicodedata
from django.core.cache import get_cache
from django.conf import settings
def normalize_unicode(u):
"""Replace non-ASCII characters with closest ASCII equivalents
where possible.
"""
return unicodedata.normalize('NFKD', u).encode('ascii', 'ignore... |
29f91d362689a53e04557588e47f1ac3e8d0fadc | server/lib/pricing.py | server/lib/pricing.py | def price(printTime, filamentUsed, filament=None):
return round((printTime/60/60)*filament['price'])
| def price(printTime, filamentUsed, filament=None):
return round((printTime/60/60)*200)
| Set constant price for all filaments | Set constant price for all filaments
| Python | agpl-3.0 | MakersLab/custom-print | def price(printTime, filamentUsed, filament=None):
return round((printTime/60/60)*filament['price'])
Set constant price for all filaments | def price(printTime, filamentUsed, filament=None):
return round((printTime/60/60)*200)
| <commit_before>def price(printTime, filamentUsed, filament=None):
return round((printTime/60/60)*filament['price'])
<commit_msg>Set constant price for all filaments<commit_after> | def price(printTime, filamentUsed, filament=None):
return round((printTime/60/60)*200)
| def price(printTime, filamentUsed, filament=None):
return round((printTime/60/60)*filament['price'])
Set constant price for all filamentsdef price(printTime, filamentUsed, filament=None):
return round((printTime/60/60)*200)
| <commit_before>def price(printTime, filamentUsed, filament=None):
return round((printTime/60/60)*filament['price'])
<commit_msg>Set constant price for all filaments<commit_after>def price(printTime, filamentUsed, filament=None):
return round((printTime/60/60)*200)
|
edd2cc66fff3159699c28c8f86c52e6524ce9d86 | social_auth/fields.py | social_auth/fields.py | from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
on database.
"""
__metaclass__ = models.SubfieldBase
def to_python(self, value... | from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
on database.
"""
__metaclass__ = models.SubfieldBase
def to_python(self, value... | Use get_prep_value instead of the database related one. Closes gh-42 | Use get_prep_value instead of the database related one. Closes gh-42
| Python | bsd-3-clause | vuchau/django-social-auth,getsentry/django-social-auth,1st/django-social-auth,michael-borisov/django-social-auth,michael-borisov/django-social-auth,beswarm/django-social-auth,lovehhf/django-social-auth,omab/django-social-auth,adw0rd/django-social-auth,mayankcu/Django-social,caktus/django-social-auth,antoviaque/django-s... | from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
on database.
"""
__metaclass__ = models.SubfieldBase
def to_python(self, value... | from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
on database.
"""
__metaclass__ = models.SubfieldBase
def to_python(self, value... | <commit_before>from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
on database.
"""
__metaclass__ = models.SubfieldBase
def to_pyt... | from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
on database.
"""
__metaclass__ = models.SubfieldBase
def to_python(self, value... | from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
on database.
"""
__metaclass__ = models.SubfieldBase
def to_python(self, value... | <commit_before>from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
on database.
"""
__metaclass__ = models.SubfieldBase
def to_pyt... |
111682e3c19784aa87d5f3d4b56149226e6f9d3b | app/tests/archives_tests/test_models.py | app/tests/archives_tests/test_models.py | import pytest
from tests.archives_tests.factories import ArchiveFactory
from tests.model_helpers import do_test_factory
@pytest.mark.django_db
class TestArchivesModels:
# test functions are added dynamically to this class
def test_study_str(self):
model = ArchiveFactory()
assert str(model) == ... | import pytest
from django.core.exceptions import ObjectDoesNotExist
from tests.archives_tests.factories import ArchiveFactory
from tests.cases_tests.factories import ImageFactoryWithImageFile
from tests.model_helpers import do_test_factory
@pytest.mark.django_db
class TestArchivesModels:
# test functions are add... | Add test for cascading deletion of archive | Add test for cascading deletion of archive
| Python | apache-2.0 | comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django | import pytest
from tests.archives_tests.factories import ArchiveFactory
from tests.model_helpers import do_test_factory
@pytest.mark.django_db
class TestArchivesModels:
# test functions are added dynamically to this class
def test_study_str(self):
model = ArchiveFactory()
assert str(model) == ... | import pytest
from django.core.exceptions import ObjectDoesNotExist
from tests.archives_tests.factories import ArchiveFactory
from tests.cases_tests.factories import ImageFactoryWithImageFile
from tests.model_helpers import do_test_factory
@pytest.mark.django_db
class TestArchivesModels:
# test functions are add... | <commit_before>import pytest
from tests.archives_tests.factories import ArchiveFactory
from tests.model_helpers import do_test_factory
@pytest.mark.django_db
class TestArchivesModels:
# test functions are added dynamically to this class
def test_study_str(self):
model = ArchiveFactory()
assert... | import pytest
from django.core.exceptions import ObjectDoesNotExist
from tests.archives_tests.factories import ArchiveFactory
from tests.cases_tests.factories import ImageFactoryWithImageFile
from tests.model_helpers import do_test_factory
@pytest.mark.django_db
class TestArchivesModels:
# test functions are add... | import pytest
from tests.archives_tests.factories import ArchiveFactory
from tests.model_helpers import do_test_factory
@pytest.mark.django_db
class TestArchivesModels:
# test functions are added dynamically to this class
def test_study_str(self):
model = ArchiveFactory()
assert str(model) == ... | <commit_before>import pytest
from tests.archives_tests.factories import ArchiveFactory
from tests.model_helpers import do_test_factory
@pytest.mark.django_db
class TestArchivesModels:
# test functions are added dynamically to this class
def test_study_str(self):
model = ArchiveFactory()
assert... |
0acbe43b91fab6a01b5a773c4ac494d01138f216 | engines/mako_engine.py | engines/mako_engine.py | #!/usr/bin/env python3
"""Provide the mako templating engine."""
from __future__ import print_function
from mako.template import Template
from mako.lookup import TemplateLookup
from . import Engine
class MakoEngine(Engine):
"""Mako templating engine."""
handle = 'mako'
def __init__(self, template, ... | #!/usr/bin/env python3
"""Provide the mako templating engine."""
from __future__ import print_function
from mako.template import Template
from mako.lookup import TemplateLookup
from . import Engine
class MakoEngine(Engine):
"""Mako templating engine."""
handle = 'mako'
def __init__(self, template, ... | Handle undefined names in tolerant mode in the mako engine. | Handle undefined names in tolerant mode in the mako engine.
| Python | mit | blubberdiblub/eztemplate | #!/usr/bin/env python3
"""Provide the mako templating engine."""
from __future__ import print_function
from mako.template import Template
from mako.lookup import TemplateLookup
from . import Engine
class MakoEngine(Engine):
"""Mako templating engine."""
handle = 'mako'
def __init__(self, template, ... | #!/usr/bin/env python3
"""Provide the mako templating engine."""
from __future__ import print_function
from mako.template import Template
from mako.lookup import TemplateLookup
from . import Engine
class MakoEngine(Engine):
"""Mako templating engine."""
handle = 'mako'
def __init__(self, template, ... | <commit_before>#!/usr/bin/env python3
"""Provide the mako templating engine."""
from __future__ import print_function
from mako.template import Template
from mako.lookup import TemplateLookup
from . import Engine
class MakoEngine(Engine):
"""Mako templating engine."""
handle = 'mako'
def __init__(s... | #!/usr/bin/env python3
"""Provide the mako templating engine."""
from __future__ import print_function
from mako.template import Template
from mako.lookup import TemplateLookup
from . import Engine
class MakoEngine(Engine):
"""Mako templating engine."""
handle = 'mako'
def __init__(self, template, ... | #!/usr/bin/env python3
"""Provide the mako templating engine."""
from __future__ import print_function
from mako.template import Template
from mako.lookup import TemplateLookup
from . import Engine
class MakoEngine(Engine):
"""Mako templating engine."""
handle = 'mako'
def __init__(self, template, ... | <commit_before>#!/usr/bin/env python3
"""Provide the mako templating engine."""
from __future__ import print_function
from mako.template import Template
from mako.lookup import TemplateLookup
from . import Engine
class MakoEngine(Engine):
"""Mako templating engine."""
handle = 'mako'
def __init__(s... |
d2a3f9b1118a965774e0002b2a7b480213bb3fde | alignak_backend_client/__init__.py | alignak_backend_client/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 0)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 1)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | Set version number as 0.5.1 | Set version number as 0.5.1
| Python | agpl-3.0 | Alignak-monitoring-contrib/alignak-backend-client,Alignak-monitoring-contrib/alignakbackend-api-client,Alignak-monitoring-contrib/alignakbackend-api-client,Alignak-monitoring-contrib/alignak-backend-client | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 0)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 1)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 0)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 1)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 0)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 0)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((s... |
c2364bfe321bc19ab2d648fc77c8111522654237 | adhocracy/migration/versions/032_remove_comment_title.py | adhocracy/migration/versions/032_remove_comment_title.py | from datetime import datetime
from sqlalchemy import MetaData, Column, ForeignKey, Table
from sqlalchemy import DateTime, Integer, Unicode, UnicodeText
metadata = MetaData()
old_revision_table = Table('revision', metadata,
Column('id', Integer, primary_key=True),
Column('create_time', DateTime, default=datet... | from datetime import datetime
from sqlalchemy import MetaData, Column, ForeignKey, Table
from sqlalchemy import DateTime, Integer, Unicode, UnicodeText
metadata = MetaData()
old_revision_table = Table('revision', metadata,
Column('id', Integer, primary_key=True),
Column('create_time', DateTime, default=datet... | Remove silly exception inserted for testing | Remove silly exception inserted for testing
| Python | agpl-3.0 | SysTheron/adhocracy,DanielNeugebauer/adhocracy,SysTheron/adhocracy,DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy,SysTheron/adhocracy,alkadis/vcv,liqd/adhocracy,alkadis/vcv,phihag/adhocracy,liqd/adhocracy,alkadis/vcv,liqd/adhocracy,phihag/adhocracy,liqd/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,phiha... | from datetime import datetime
from sqlalchemy import MetaData, Column, ForeignKey, Table
from sqlalchemy import DateTime, Integer, Unicode, UnicodeText
metadata = MetaData()
old_revision_table = Table('revision', metadata,
Column('id', Integer, primary_key=True),
Column('create_time', DateTime, default=datet... | from datetime import datetime
from sqlalchemy import MetaData, Column, ForeignKey, Table
from sqlalchemy import DateTime, Integer, Unicode, UnicodeText
metadata = MetaData()
old_revision_table = Table('revision', metadata,
Column('id', Integer, primary_key=True),
Column('create_time', DateTime, default=datet... | <commit_before>from datetime import datetime
from sqlalchemy import MetaData, Column, ForeignKey, Table
from sqlalchemy import DateTime, Integer, Unicode, UnicodeText
metadata = MetaData()
old_revision_table = Table('revision', metadata,
Column('id', Integer, primary_key=True),
Column('create_time', DateTime... | from datetime import datetime
from sqlalchemy import MetaData, Column, ForeignKey, Table
from sqlalchemy import DateTime, Integer, Unicode, UnicodeText
metadata = MetaData()
old_revision_table = Table('revision', metadata,
Column('id', Integer, primary_key=True),
Column('create_time', DateTime, default=datet... | from datetime import datetime
from sqlalchemy import MetaData, Column, ForeignKey, Table
from sqlalchemy import DateTime, Integer, Unicode, UnicodeText
metadata = MetaData()
old_revision_table = Table('revision', metadata,
Column('id', Integer, primary_key=True),
Column('create_time', DateTime, default=datet... | <commit_before>from datetime import datetime
from sqlalchemy import MetaData, Column, ForeignKey, Table
from sqlalchemy import DateTime, Integer, Unicode, UnicodeText
metadata = MetaData()
old_revision_table = Table('revision', metadata,
Column('id', Integer, primary_key=True),
Column('create_time', DateTime... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.