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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e9b422c74382d88787114796e7e4b6dfd2b25225 | codesharer/app.py | codesharer/app.py | from flask import Flask
from flaskext.redis import Redis
def create_app():
from codesharer.apps.classifier.views import frontend
app = Flask(__name__)
app.config.from_object('codesharer.conf.Config')
app.register_module(frontend)
db = Redis(app)
db.init_app(app)
app.db = db
ret... | from flask import Flask
from flaskext.redis import Redis
def create_app():
from codesharer.apps.snippets.views import frontend
app = Flask(__name__)
app.config.from_object('codesharer.conf.Config')
app.register_module(frontend)
db = Redis(app)
db.init_app(app)
app.db = db
retur... | Correct path to frontend views | Correct path to frontend views
| Python | apache-2.0 | disqus/codebox,disqus/codebox | from flask import Flask
from flaskext.redis import Redis
def create_app():
from codesharer.apps.classifier.views import frontend
app = Flask(__name__)
app.config.from_object('codesharer.conf.Config')
app.register_module(frontend)
db = Redis(app)
db.init_app(app)
app.db = db
ret... | from flask import Flask
from flaskext.redis import Redis
def create_app():
from codesharer.apps.snippets.views import frontend
app = Flask(__name__)
app.config.from_object('codesharer.conf.Config')
app.register_module(frontend)
db = Redis(app)
db.init_app(app)
app.db = db
retur... | <commit_before>from flask import Flask
from flaskext.redis import Redis
def create_app():
from codesharer.apps.classifier.views import frontend
app = Flask(__name__)
app.config.from_object('codesharer.conf.Config')
app.register_module(frontend)
db = Redis(app)
db.init_app(app)
app.d... | from flask import Flask
from flaskext.redis import Redis
def create_app():
from codesharer.apps.snippets.views import frontend
app = Flask(__name__)
app.config.from_object('codesharer.conf.Config')
app.register_module(frontend)
db = Redis(app)
db.init_app(app)
app.db = db
retur... | from flask import Flask
from flaskext.redis import Redis
def create_app():
from codesharer.apps.classifier.views import frontend
app = Flask(__name__)
app.config.from_object('codesharer.conf.Config')
app.register_module(frontend)
db = Redis(app)
db.init_app(app)
app.db = db
ret... | <commit_before>from flask import Flask
from flaskext.redis import Redis
def create_app():
from codesharer.apps.classifier.views import frontend
app = Flask(__name__)
app.config.from_object('codesharer.conf.Config')
app.register_module(frontend)
db = Redis(app)
db.init_app(app)
app.d... |
a8a0dd55a5289825aae34aa45765ea328811523e | spotpy/unittests/test_fast.py | spotpy/unittests/test_fast.py | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 200 # REP must be a... | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
# Test only untder Python 3 as Python >2.7.10 results in a strange fft error
if sys.version_info >= (3, 5):
class TestFast(unittest... | Exclude Fast test for Python 2 | Exclude Fast test for Python 2
| Python | mit | bees4ever/spotpy,bees4ever/spotpy,thouska/spotpy,thouska/spotpy,bees4ever/spotpy,thouska/spotpy | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 200 # REP must be a... | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
# Test only untder Python 3 as Python >2.7.10 results in a strange fft error
if sys.version_info >= (3, 5):
class TestFast(unittest... | <commit_before>import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 200 ... | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
# Test only untder Python 3 as Python >2.7.10 results in a strange fft error
if sys.version_info >= (3, 5):
class TestFast(unittest... | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 200 # REP must be a... | <commit_before>import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 200 ... |
e736482bec7be7871bd4edd270f8c064961c20fc | setup.py | setup.py | #!/usr/bin/env python
from __future__ import unicode_literals
from setuptools import setup, find_packages
install_requires = [
"Jinja2",
"boto",
"flask",
"httpretty>=0.6.1",
"requests",
"xmltodict",
"six",
"werkzeug",
]
import sys
if sys.version_info < (2, 7):
# No buildint Ordere... | #!/usr/bin/env python
from __future__ import unicode_literals
from setuptools import setup, find_packages
install_requires = [
"Jinja2",
"boto>=2.20.0",
"flask",
"httpretty>=0.6.1",
"requests",
"xmltodict",
"six",
"werkzeug",
]
import sys
if sys.version_info < (2, 7):
# No buildin... | Update minimum support boto version. | Update minimum support boto version.
boto 2.20.0 introduces kinesis. alternatively, this requirement could be
relaxed by using conditional imports.
| Python | apache-2.0 | gjtempleton/moto,botify-labs/moto,dbfr3qs/moto,botify-labs/moto,heddle317/moto,braintreeps/moto,spulec/moto,rocky4570/moto,ZuluPro/moto,kennethd/moto,okomestudio/moto,Affirm/moto,alexdebrie/moto,Brett55/moto,riccardomc/moto,2mf/moto,heddle317/moto,rocky4570/moto,dbfr3qs/moto,botify-labs/moto,dbfr3qs/moto,2rs2ts/moto,js... | #!/usr/bin/env python
from __future__ import unicode_literals
from setuptools import setup, find_packages
install_requires = [
"Jinja2",
"boto",
"flask",
"httpretty>=0.6.1",
"requests",
"xmltodict",
"six",
"werkzeug",
]
import sys
if sys.version_info < (2, 7):
# No buildint Ordere... | #!/usr/bin/env python
from __future__ import unicode_literals
from setuptools import setup, find_packages
install_requires = [
"Jinja2",
"boto>=2.20.0",
"flask",
"httpretty>=0.6.1",
"requests",
"xmltodict",
"six",
"werkzeug",
]
import sys
if sys.version_info < (2, 7):
# No buildin... | <commit_before>#!/usr/bin/env python
from __future__ import unicode_literals
from setuptools import setup, find_packages
install_requires = [
"Jinja2",
"boto",
"flask",
"httpretty>=0.6.1",
"requests",
"xmltodict",
"six",
"werkzeug",
]
import sys
if sys.version_info < (2, 7):
# No ... | #!/usr/bin/env python
from __future__ import unicode_literals
from setuptools import setup, find_packages
install_requires = [
"Jinja2",
"boto>=2.20.0",
"flask",
"httpretty>=0.6.1",
"requests",
"xmltodict",
"six",
"werkzeug",
]
import sys
if sys.version_info < (2, 7):
# No buildin... | #!/usr/bin/env python
from __future__ import unicode_literals
from setuptools import setup, find_packages
install_requires = [
"Jinja2",
"boto",
"flask",
"httpretty>=0.6.1",
"requests",
"xmltodict",
"six",
"werkzeug",
]
import sys
if sys.version_info < (2, 7):
# No buildint Ordere... | <commit_before>#!/usr/bin/env python
from __future__ import unicode_literals
from setuptools import setup, find_packages
install_requires = [
"Jinja2",
"boto",
"flask",
"httpretty>=0.6.1",
"requests",
"xmltodict",
"six",
"werkzeug",
]
import sys
if sys.version_info < (2, 7):
# No ... |
522b197500bffb748dc2daf3bf0ea448b3094af7 | example_config.py | example_config.py | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | Add another missing heroku config variable | Add another missing heroku config variable
| Python | agpl-3.0 | paulocheque/guides-cms,pluralsight/guides-cms,paulocheque/guides-cms,pluralsight/guides-cms,pluralsight/guides-cms,paulocheque/guides-cms | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | <commit_before>"""
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID... | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | <commit_before>"""
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID... |
52841517a575ba7df354b809cb23bc2851c9fcd4 | exec_proc.py | exec_proc.py | #!/usr/bin/env python
# Copyright 2014 Boundary, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | #!/usr/bin/env python
# Copyright 2014 Boundary, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | Remove carriage returns from the output | Remove carriage returns from the output
| Python | apache-2.0 | jdgwartney/boundary-plugin-shell,boundary/boundary-plugin-shell,boundary/boundary-plugin-shell,jdgwartney/boundary-plugin-shell | #!/usr/bin/env python
# Copyright 2014 Boundary, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | #!/usr/bin/env python
# Copyright 2014 Boundary, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | <commit_before>#!/usr/bin/env python
# Copyright 2014 Boundary, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | #!/usr/bin/env python
# Copyright 2014 Boundary, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | #!/usr/bin/env python
# Copyright 2014 Boundary, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | <commit_before>#!/usr/bin/env python
# Copyright 2014 Boundary, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... |
5ab0c1c1323b2b12a19ef58de4c03236db84644d | cellcounter/accounts/urls.py | cellcounter/accounts/urls.py | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | Remove old views and replace with new PasswordResetConfirmView | Remove old views and replace with new PasswordResetConfirmView
| Python | mit | haematologic/cellcounter,haematologic/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,haematologic/cellcounter,cellcounter/cellcounter | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | <commit_before>from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.... | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | <commit_before>from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.... |
f0acf5023db56e8011a6872f230514a69ec9f311 | extractor.py | extractor.py | import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
root = tk.Tk()
root.title('SNES Wolfenstein 3D Extractor')
root.minsize(400, 100)
ui.MainApplication(root).pack(side="top", fill="both", expand=True)
root.mainloop()
main()
| import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
## root = tk.Tk()
## root.title('SNES Wolfenstein 3D Extractor')
## root.minsize(400, 100)
## ui.MainApplication(root).pack(side="top", fill="both", expand=True)
## root.mainloop()
ui.MainApplication().mainloop()
main()
| Use new MainApplication Tk class. | Use new MainApplication Tk class.
| Python | mit | adambiser/snes-wolf3d-extractor | import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
root = tk.Tk()
root.title('SNES Wolfenstein 3D Extractor')
root.minsize(400, 100)
ui.MainApplication(root).pack(side="top", fill="both", expand=True)
root.mainloop()
main()
Use new MainApplication Tk class. | import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
## root = tk.Tk()
## root.title('SNES Wolfenstein 3D Extractor')
## root.minsize(400, 100)
## ui.MainApplication(root).pack(side="top", fill="both", expand=True)
## root.mainloop()
ui.MainApplication().mainloop()
main()
| <commit_before>import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
root = tk.Tk()
root.title('SNES Wolfenstein 3D Extractor')
root.minsize(400, 100)
ui.MainApplication(root).pack(side="top", fill="both", expand=True)
root.mainloop()
main()
<commit_msg>Use new MainApplication... | import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
## root = tk.Tk()
## root.title('SNES Wolfenstein 3D Extractor')
## root.minsize(400, 100)
## ui.MainApplication(root).pack(side="top", fill="both", expand=True)
## root.mainloop()
ui.MainApplication().mainloop()
main()
| import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
root = tk.Tk()
root.title('SNES Wolfenstein 3D Extractor')
root.minsize(400, 100)
ui.MainApplication(root).pack(side="top", fill="both", expand=True)
root.mainloop()
main()
Use new MainApplication Tk class.import extractor.... | <commit_before>import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
root = tk.Tk()
root.title('SNES Wolfenstein 3D Extractor')
root.minsize(400, 100)
ui.MainApplication(root).pack(side="top", fill="both", expand=True)
root.mainloop()
main()
<commit_msg>Use new MainApplication... |
5e53f1e86fc7c4f1c7b42479684ac393c997ce52 | client/test/test-unrealcv.py | client/test/test-unrealcv.py | # TODO: Test robustness, test speed
import unittest, time, sys
from common_conf import *
from test_server import EchoServer, MessageServer
import argparse
import threading
from test_server import TestMessageServer
from test_client import TestClientWithDummyServer
from test_commands import TestCommands
from test_realist... | # TODO: Test robustness, test speed
import unittest, time, sys
from common_conf import *
from test_server import EchoServer, MessageServer
import argparse
import threading
from test_server import TestMessageServer
from test_client import TestClientWithDummyServer
from test_commands import TestCommands
from test_realist... | Fix exit code of unittest. | Fix exit code of unittest.
| Python | mit | qiuwch/unrealcv,qiuwch/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,qiuwch/unrealcv,qiuwch/unrealcv,qiuwch/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv | # TODO: Test robustness, test speed
import unittest, time, sys
from common_conf import *
from test_server import EchoServer, MessageServer
import argparse
import threading
from test_server import TestMessageServer
from test_client import TestClientWithDummyServer
from test_commands import TestCommands
from test_realist... | # TODO: Test robustness, test speed
import unittest, time, sys
from common_conf import *
from test_server import EchoServer, MessageServer
import argparse
import threading
from test_server import TestMessageServer
from test_client import TestClientWithDummyServer
from test_commands import TestCommands
from test_realist... | <commit_before># TODO: Test robustness, test speed
import unittest, time, sys
from common_conf import *
from test_server import EchoServer, MessageServer
import argparse
import threading
from test_server import TestMessageServer
from test_client import TestClientWithDummyServer
from test_commands import TestCommands
fr... | # TODO: Test robustness, test speed
import unittest, time, sys
from common_conf import *
from test_server import EchoServer, MessageServer
import argparse
import threading
from test_server import TestMessageServer
from test_client import TestClientWithDummyServer
from test_commands import TestCommands
from test_realist... | # TODO: Test robustness, test speed
import unittest, time, sys
from common_conf import *
from test_server import EchoServer, MessageServer
import argparse
import threading
from test_server import TestMessageServer
from test_client import TestClientWithDummyServer
from test_commands import TestCommands
from test_realist... | <commit_before># TODO: Test robustness, test speed
import unittest, time, sys
from common_conf import *
from test_server import EchoServer, MessageServer
import argparse
import threading
from test_server import TestMessageServer
from test_client import TestClientWithDummyServer
from test_commands import TestCommands
fr... |
ce9da309294f2520f297980d80773160f050e8bf | yubico/yubico_exceptions.py | yubico/yubico_exceptions.py | class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):
self.status_code = status_code
def __str__(self):
return ('Yubico server returned the following status code: %s' %
... | __all___ = [
'YubicoError',
'StatusCodeError',
'InvalidClientIdError',
'SignatureVerificationError'
]
class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):
self.status_code = statu... | Add __all__ in exceptions module. | Add __all__ in exceptions module. | Python | bsd-3-clause | Kami/python-yubico-client | class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):
self.status_code = status_code
def __str__(self):
return ('Yubico server returned the following status code: %s' %
... | __all___ = [
'YubicoError',
'StatusCodeError',
'InvalidClientIdError',
'SignatureVerificationError'
]
class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):
self.status_code = statu... | <commit_before>class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):
self.status_code = status_code
def __str__(self):
return ('Yubico server returned the following status code: %s' %
... | __all___ = [
'YubicoError',
'StatusCodeError',
'InvalidClientIdError',
'SignatureVerificationError'
]
class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):
self.status_code = statu... | class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):
self.status_code = status_code
def __str__(self):
return ('Yubico server returned the following status code: %s' %
... | <commit_before>class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):
self.status_code = status_code
def __str__(self):
return ('Yubico server returned the following status code: %s' %
... |
b20320301eb311bb1345061a8b74ac63495051b1 | tastydocs/urls.py | tastydocs/urls.py | from django.conf.urls.defaults import patterns
from views import doc
urlpatterns = patterns(
'',
(r'^api$', doc),
(r'^example/(?P<resource_name>\w+)/', 'tastydocs.views.example_data'),
)
| from django.conf.urls.defaults import patterns
from views import doc
urlpatterns = patterns(
'',
(r'^api/$', doc),
(r'^example/(?P<resource_name>\w+)/', 'tastydocs.views.example_data'),
)
| Add trailing slash to /docs/api/ url pattern. This provides more flexibility for end users in that they can choose to navigate to /docs/api or /docs/api/ successfully. Without the trailing slash in the url pattern, /docs/api/ returns a 404. | Add trailing slash to /docs/api/ url pattern. This provides more flexibility for end users in that they can choose to navigate to /docs/api or /docs/api/ successfully. Without the trailing slash in the url pattern, /docs/api/ returns a 404.
| Python | bsd-3-clause | juanique/django-tastydocs,juanique/django-tastydocs,juanique/django-tastydocs,juanique/django-tastydocs | from django.conf.urls.defaults import patterns
from views import doc
urlpatterns = patterns(
'',
(r'^api$', doc),
(r'^example/(?P<resource_name>\w+)/', 'tastydocs.views.example_data'),
)
Add trailing slash to /docs/api/ url pattern. This provides more flexibility for end users in that they can choose to na... | from django.conf.urls.defaults import patterns
from views import doc
urlpatterns = patterns(
'',
(r'^api/$', doc),
(r'^example/(?P<resource_name>\w+)/', 'tastydocs.views.example_data'),
)
| <commit_before>from django.conf.urls.defaults import patterns
from views import doc
urlpatterns = patterns(
'',
(r'^api$', doc),
(r'^example/(?P<resource_name>\w+)/', 'tastydocs.views.example_data'),
)
<commit_msg>Add trailing slash to /docs/api/ url pattern. This provides more flexibility for end users in... | from django.conf.urls.defaults import patterns
from views import doc
urlpatterns = patterns(
'',
(r'^api/$', doc),
(r'^example/(?P<resource_name>\w+)/', 'tastydocs.views.example_data'),
)
| from django.conf.urls.defaults import patterns
from views import doc
urlpatterns = patterns(
'',
(r'^api$', doc),
(r'^example/(?P<resource_name>\w+)/', 'tastydocs.views.example_data'),
)
Add trailing slash to /docs/api/ url pattern. This provides more flexibility for end users in that they can choose to na... | <commit_before>from django.conf.urls.defaults import patterns
from views import doc
urlpatterns = patterns(
'',
(r'^api$', doc),
(r'^example/(?P<resource_name>\w+)/', 'tastydocs.views.example_data'),
)
<commit_msg>Add trailing slash to /docs/api/ url pattern. This provides more flexibility for end users in... |
682f45ffd222dc582ee770a0326c962540657c68 | django_twilio/models.py | django_twilio/models.py | # -*- coding: utf-8 -*-
from django.db import models
from phonenumber_field.modelfields import PhoneNumberField
class Caller(models.Model):
"""A caller is defined uniquely by their phone number.
:param bool blacklisted: Designates whether the caller can use our
services.
:param char phone_number... | # -*- coding: utf-8 -*-
from django.db import models
from phonenumber_field.modelfields import PhoneNumberField
class Caller(models.Model):
"""A caller is defined uniquely by their phone number.
:param bool blacklisted: Designates whether the caller can use our
services.
:param char phone_number... | Fix an error in __unicode__ | Fix an error in __unicode__
__unicode__ name displaying incorrectly - FIXED
| Python | unlicense | rdegges/django-twilio,aditweb/django-twilio | # -*- coding: utf-8 -*-
from django.db import models
from phonenumber_field.modelfields import PhoneNumberField
class Caller(models.Model):
"""A caller is defined uniquely by their phone number.
:param bool blacklisted: Designates whether the caller can use our
services.
:param char phone_number... | # -*- coding: utf-8 -*-
from django.db import models
from phonenumber_field.modelfields import PhoneNumberField
class Caller(models.Model):
"""A caller is defined uniquely by their phone number.
:param bool blacklisted: Designates whether the caller can use our
services.
:param char phone_number... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
from phonenumber_field.modelfields import PhoneNumberField
class Caller(models.Model):
"""A caller is defined uniquely by their phone number.
:param bool blacklisted: Designates whether the caller can use our
services.
:param ch... | # -*- coding: utf-8 -*-
from django.db import models
from phonenumber_field.modelfields import PhoneNumberField
class Caller(models.Model):
"""A caller is defined uniquely by their phone number.
:param bool blacklisted: Designates whether the caller can use our
services.
:param char phone_number... | # -*- coding: utf-8 -*-
from django.db import models
from phonenumber_field.modelfields import PhoneNumberField
class Caller(models.Model):
"""A caller is defined uniquely by their phone number.
:param bool blacklisted: Designates whether the caller can use our
services.
:param char phone_number... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
from phonenumber_field.modelfields import PhoneNumberField
class Caller(models.Model):
"""A caller is defined uniquely by their phone number.
:param bool blacklisted: Designates whether the caller can use our
services.
:param ch... |
946f8ff1c475ebf6f339c4df5eb5f7069c5633e9 | apps/core/views.py | apps/core/views.py | from django.views.generic.detail import ContextMixin
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from apps.categories.models import Category
from apps.books.models import Book
class BaseView(ContextMixin):
"""docstring for BaseView"""
model = ... | from django.views.generic.detail import ContextMixin
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from apps.categories.models import Category
from apps.books.models import Book
class BaseView(ContextMixin):
"""docstring for BaseView"""
model = ... | Fix did not return HttpResponse when comment | Fix did not return HttpResponse when comment
| Python | mit | vuonghv/brs,vuonghv/brs,vuonghv/brs,vuonghv/brs | from django.views.generic.detail import ContextMixin
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from apps.categories.models import Category
from apps.books.models import Book
class BaseView(ContextMixin):
"""docstring for BaseView"""
model = ... | from django.views.generic.detail import ContextMixin
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from apps.categories.models import Category
from apps.books.models import Book
class BaseView(ContextMixin):
"""docstring for BaseView"""
model = ... | <commit_before>from django.views.generic.detail import ContextMixin
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from apps.categories.models import Category
from apps.books.models import Book
class BaseView(ContextMixin):
"""docstring for BaseView"... | from django.views.generic.detail import ContextMixin
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from apps.categories.models import Category
from apps.books.models import Book
class BaseView(ContextMixin):
"""docstring for BaseView"""
model = ... | from django.views.generic.detail import ContextMixin
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from apps.categories.models import Category
from apps.books.models import Book
class BaseView(ContextMixin):
"""docstring for BaseView"""
model = ... | <commit_before>from django.views.generic.detail import ContextMixin
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from apps.categories.models import Category
from apps.books.models import Book
class BaseView(ContextMixin):
"""docstring for BaseView"... |
4a782f94e8fe5a26e2998408c2cb013f2aebe9ac | contentcuration/contentcuration/migrations/0091_auto_20180724_2243.py | contentcuration/contentcuration/migrations/0091_auto_20180724_2243.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-07-24 22:43
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contentcuration', '0090_auto_20180724_1625'),
]
... | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-07-24 22:43
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contentcuration', '0089_auto_20180706_2242'),
]
... | Remove reference to old, bad migration that was in my local tree. | Remove reference to old, bad migration that was in my local tree.
| Python | mit | jayoshih/content-curation,jayoshih/content-curation,jayoshih/content-curation,fle-internal/content-curation,DXCanas/content-curation,fle-internal/content-curation,DXCanas/content-curation,fle-internal/content-curation,fle-internal/content-curation,jayoshih/content-curation,DXCanas/content-curation,DXCanas/content-curat... | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-07-24 22:43
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contentcuration', '0090_auto_20180724_1625'),
]
... | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-07-24 22:43
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contentcuration', '0089_auto_20180706_2242'),
]
... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-07-24 22:43
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contentcuration', '0090_auto_20180724_162... | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-07-24 22:43
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contentcuration', '0089_auto_20180706_2242'),
]
... | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-07-24 22:43
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contentcuration', '0090_auto_20180724_1625'),
]
... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-07-24 22:43
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contentcuration', '0090_auto_20180724_162... |
69a8528801ae5c3fdde57b9766917fcf8690c54e | telephus/translate.py | telephus/translate.py | class APIMismatch(Exception):
pass
def translateArgs(request, api_version):
args = request.args
if request.method == 'system_add_keyspace' \
or request.method == 'system_update_keyspace':
args = adapt_ksdef_rf(args[0]) + args[1:]
return args
def postProcess(results, method):
if method ... | class APIMismatch(Exception):
pass
def translateArgs(request, api_version):
args = request.args
if request.method == 'system_add_keyspace' \
or request.method == 'system_update_keyspace':
adapted_ksdef = adapt_ksdef_rf(args[0])
args = (adapted_ksdef,) + args[1:]
return args
def pos... | Fix args manipulation in when translating ksdefs | Fix args manipulation in when translating ksdefs
| Python | mit | Metaswitch/Telephus,driftx/Telephus,ClearwaterCore/Telephus,driftx/Telephus,Metaswitch/Telephus,ClearwaterCore/Telephus | class APIMismatch(Exception):
pass
def translateArgs(request, api_version):
args = request.args
if request.method == 'system_add_keyspace' \
or request.method == 'system_update_keyspace':
args = adapt_ksdef_rf(args[0]) + args[1:]
return args
def postProcess(results, method):
if method ... | class APIMismatch(Exception):
pass
def translateArgs(request, api_version):
args = request.args
if request.method == 'system_add_keyspace' \
or request.method == 'system_update_keyspace':
adapted_ksdef = adapt_ksdef_rf(args[0])
args = (adapted_ksdef,) + args[1:]
return args
def pos... | <commit_before>class APIMismatch(Exception):
pass
def translateArgs(request, api_version):
args = request.args
if request.method == 'system_add_keyspace' \
or request.method == 'system_update_keyspace':
args = adapt_ksdef_rf(args[0]) + args[1:]
return args
def postProcess(results, method):... | class APIMismatch(Exception):
pass
def translateArgs(request, api_version):
args = request.args
if request.method == 'system_add_keyspace' \
or request.method == 'system_update_keyspace':
adapted_ksdef = adapt_ksdef_rf(args[0])
args = (adapted_ksdef,) + args[1:]
return args
def pos... | class APIMismatch(Exception):
pass
def translateArgs(request, api_version):
args = request.args
if request.method == 'system_add_keyspace' \
or request.method == 'system_update_keyspace':
args = adapt_ksdef_rf(args[0]) + args[1:]
return args
def postProcess(results, method):
if method ... | <commit_before>class APIMismatch(Exception):
pass
def translateArgs(request, api_version):
args = request.args
if request.method == 'system_add_keyspace' \
or request.method == 'system_update_keyspace':
args = adapt_ksdef_rf(args[0]) + args[1:]
return args
def postProcess(results, method):... |
172768dacc224f3c14e85f8e732209efe9ce075a | app/soc/models/project_survey.py | app/soc/models/project_survey.py | #!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | #!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | Set the default prefix for ProjectSurveys to gsoc_program. | Set the default prefix for ProjectSurveys to gsoc_program.
| Python | apache-2.0 | SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange | #!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | #!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | <commit_before>#!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | #!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | #!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | <commit_before>#!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
48e15b8f99bb0714b7ec465a0131e452c67004e5 | Chapter4_TheGreatestTheoremNeverTold/top_pic_comments.py | Chapter4_TheGreatestTheoremNeverTold/top_pic_comments.py | import sys
import numpy as np
from IPython.core.display import Image
import praw
reddit = praw.Reddit("BayesianMethodsForHackers")
subreddit = reddit.get_subreddit( "pics" )
top_submissions = subreddit.get_top()
n_pic = int( sys.argv[1] ) if sys.argv[1] else 1
i = 0
while i < n_pic:
top_submission = top_su... | import sys
import numpy as np
from IPython.core.display import Image
import praw
reddit = praw.Reddit("BayesianMethodsForHackers")
subreddit = reddit.get_subreddit( "pics" )
top_submissions = subreddit.get_top()
n_pic = int( sys.argv[1] ) if len(sys.argv) > 1 else 1
i = 0
while i < n_pic:
top_submission = ... | Fix index to list when there is no 2nd element | Fix index to list when there is no 2nd element
| Python | mit | chengwliu/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers,ultinomics/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers,Fillll/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers,ifduyue/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers,jrmontag/Probabilistic-Programming-and-Bayesian-... | import sys
import numpy as np
from IPython.core.display import Image
import praw
reddit = praw.Reddit("BayesianMethodsForHackers")
subreddit = reddit.get_subreddit( "pics" )
top_submissions = subreddit.get_top()
n_pic = int( sys.argv[1] ) if sys.argv[1] else 1
i = 0
while i < n_pic:
top_submission = top_su... | import sys
import numpy as np
from IPython.core.display import Image
import praw
reddit = praw.Reddit("BayesianMethodsForHackers")
subreddit = reddit.get_subreddit( "pics" )
top_submissions = subreddit.get_top()
n_pic = int( sys.argv[1] ) if len(sys.argv) > 1 else 1
i = 0
while i < n_pic:
top_submission = ... | <commit_before>import sys
import numpy as np
from IPython.core.display import Image
import praw
reddit = praw.Reddit("BayesianMethodsForHackers")
subreddit = reddit.get_subreddit( "pics" )
top_submissions = subreddit.get_top()
n_pic = int( sys.argv[1] ) if sys.argv[1] else 1
i = 0
while i < n_pic:
top_subm... | import sys
import numpy as np
from IPython.core.display import Image
import praw
reddit = praw.Reddit("BayesianMethodsForHackers")
subreddit = reddit.get_subreddit( "pics" )
top_submissions = subreddit.get_top()
n_pic = int( sys.argv[1] ) if len(sys.argv) > 1 else 1
i = 0
while i < n_pic:
top_submission = ... | import sys
import numpy as np
from IPython.core.display import Image
import praw
reddit = praw.Reddit("BayesianMethodsForHackers")
subreddit = reddit.get_subreddit( "pics" )
top_submissions = subreddit.get_top()
n_pic = int( sys.argv[1] ) if sys.argv[1] else 1
i = 0
while i < n_pic:
top_submission = top_su... | <commit_before>import sys
import numpy as np
from IPython.core.display import Image
import praw
reddit = praw.Reddit("BayesianMethodsForHackers")
subreddit = reddit.get_subreddit( "pics" )
top_submissions = subreddit.get_top()
n_pic = int( sys.argv[1] ) if sys.argv[1] else 1
i = 0
while i < n_pic:
top_subm... |
afd27c62049e87eaefbfb5f38c6b61b461656384 | formulae/token.py | formulae/token.py | class Token:
"""Representation of a single Token"""
def __init__(self, _type, lexeme, literal=None):
self.type = _type
self.lexeme = lexeme
self.literal = literal
def __repr__(self):
string_list = [
"'type': " + str(self.type),
"'lexeme': " + str(sel... | class Token:
"""Representation of a single Token"""
def __init__(self, _type, lexeme, literal=None):
self.type = _type
self.lexeme = lexeme
self.literal = literal
def __hash__(self):
return hash((self.type, self.lexeme, self.literal))
def __eq__(self, other):
i... | Add hash and eq methods to Token | Add hash and eq methods to Token
| Python | mit | bambinos/formulae | class Token:
"""Representation of a single Token"""
def __init__(self, _type, lexeme, literal=None):
self.type = _type
self.lexeme = lexeme
self.literal = literal
def __repr__(self):
string_list = [
"'type': " + str(self.type),
"'lexeme': " + str(sel... | class Token:
"""Representation of a single Token"""
def __init__(self, _type, lexeme, literal=None):
self.type = _type
self.lexeme = lexeme
self.literal = literal
def __hash__(self):
return hash((self.type, self.lexeme, self.literal))
def __eq__(self, other):
i... | <commit_before>class Token:
"""Representation of a single Token"""
def __init__(self, _type, lexeme, literal=None):
self.type = _type
self.lexeme = lexeme
self.literal = literal
def __repr__(self):
string_list = [
"'type': " + str(self.type),
"'lexem... | class Token:
"""Representation of a single Token"""
def __init__(self, _type, lexeme, literal=None):
self.type = _type
self.lexeme = lexeme
self.literal = literal
def __hash__(self):
return hash((self.type, self.lexeme, self.literal))
def __eq__(self, other):
i... | class Token:
"""Representation of a single Token"""
def __init__(self, _type, lexeme, literal=None):
self.type = _type
self.lexeme = lexeme
self.literal = literal
def __repr__(self):
string_list = [
"'type': " + str(self.type),
"'lexeme': " + str(sel... | <commit_before>class Token:
"""Representation of a single Token"""
def __init__(self, _type, lexeme, literal=None):
self.type = _type
self.lexeme = lexeme
self.literal = literal
def __repr__(self):
string_list = [
"'type': " + str(self.type),
"'lexem... |
d012763c57450555d45385ed9b254f500388618e | automata/render.py | automata/render.py | import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.animation as animation
class AnimatedGif:
""" Setup various rendering things
"""
def __init__(self, dpi=100, colors="Purples"):
self.frames = []
self.fig = plt.figure(dpi=dpi)
plt.axis("off")... | import matplotlib
matplotlib.use('Agg')
import matplotlib.colors
import matplotlib.pyplot as plt
import matplotlib.animation as animation
class AnimatedGif:
""" Setup various rendering things
"""
def __init__(self, dpi=100, colors="Purples"):
self.frames = []
self.fig = plt.figure(dpi=dpi... | Use the same normlization for whole gif | Use the same normlization for whole gif
| Python | apache-2.0 | stevearm/automata | import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.animation as animation
class AnimatedGif:
""" Setup various rendering things
"""
def __init__(self, dpi=100, colors="Purples"):
self.frames = []
self.fig = plt.figure(dpi=dpi)
plt.axis("off")... | import matplotlib
matplotlib.use('Agg')
import matplotlib.colors
import matplotlib.pyplot as plt
import matplotlib.animation as animation
class AnimatedGif:
""" Setup various rendering things
"""
def __init__(self, dpi=100, colors="Purples"):
self.frames = []
self.fig = plt.figure(dpi=dpi... | <commit_before>import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.animation as animation
class AnimatedGif:
""" Setup various rendering things
"""
def __init__(self, dpi=100, colors="Purples"):
self.frames = []
self.fig = plt.figure(dpi=dpi)
... | import matplotlib
matplotlib.use('Agg')
import matplotlib.colors
import matplotlib.pyplot as plt
import matplotlib.animation as animation
class AnimatedGif:
""" Setup various rendering things
"""
def __init__(self, dpi=100, colors="Purples"):
self.frames = []
self.fig = plt.figure(dpi=dpi... | import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.animation as animation
class AnimatedGif:
""" Setup various rendering things
"""
def __init__(self, dpi=100, colors="Purples"):
self.frames = []
self.fig = plt.figure(dpi=dpi)
plt.axis("off")... | <commit_before>import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.animation as animation
class AnimatedGif:
""" Setup various rendering things
"""
def __init__(self, dpi=100, colors="Purples"):
self.frames = []
self.fig = plt.figure(dpi=dpi)
... |
ce7c31f3dd97716051b72951c7c745dd2c63efcd | plugins/audit_logs/server/__init__.py | plugins/audit_logs/server/__init__.py | import cherrypy
import logging
from girder import auditLogger
from girder.models.model_base import Model
from girder.api.rest import getCurrentUser
class Record(Model):
def initialize(self):
self.name = 'audit_log_record'
def validate(self, doc):
return doc
class AuditLogHandler(logging.Han... | import cherrypy
import datetime
import logging
from girder import auditLogger
from girder.models.model_base import Model
from girder.api.rest import getCurrentUser
class Record(Model):
def initialize(self):
self.name = 'audit_log_record'
def validate(self, doc):
return doc
class AuditLogHan... | Include timestamp in audit logs | Include timestamp in audit logs
| Python | apache-2.0 | RafaelPalomar/girder,data-exp-lab/girder,RafaelPalomar/girder,data-exp-lab/girder,girder/girder,kotfic/girder,RafaelPalomar/girder,Kitware/girder,manthey/girder,jbeezley/girder,manthey/girder,girder/girder,data-exp-lab/girder,kotfic/girder,RafaelPalomar/girder,Kitware/girder,Kitware/girder,data-exp-lab/girder,kotfic/gi... | import cherrypy
import logging
from girder import auditLogger
from girder.models.model_base import Model
from girder.api.rest import getCurrentUser
class Record(Model):
def initialize(self):
self.name = 'audit_log_record'
def validate(self, doc):
return doc
class AuditLogHandler(logging.Han... | import cherrypy
import datetime
import logging
from girder import auditLogger
from girder.models.model_base import Model
from girder.api.rest import getCurrentUser
class Record(Model):
def initialize(self):
self.name = 'audit_log_record'
def validate(self, doc):
return doc
class AuditLogHan... | <commit_before>import cherrypy
import logging
from girder import auditLogger
from girder.models.model_base import Model
from girder.api.rest import getCurrentUser
class Record(Model):
def initialize(self):
self.name = 'audit_log_record'
def validate(self, doc):
return doc
class AuditLogHand... | import cherrypy
import datetime
import logging
from girder import auditLogger
from girder.models.model_base import Model
from girder.api.rest import getCurrentUser
class Record(Model):
def initialize(self):
self.name = 'audit_log_record'
def validate(self, doc):
return doc
class AuditLogHan... | import cherrypy
import logging
from girder import auditLogger
from girder.models.model_base import Model
from girder.api.rest import getCurrentUser
class Record(Model):
def initialize(self):
self.name = 'audit_log_record'
def validate(self, doc):
return doc
class AuditLogHandler(logging.Han... | <commit_before>import cherrypy
import logging
from girder import auditLogger
from girder.models.model_base import Model
from girder.api.rest import getCurrentUser
class Record(Model):
def initialize(self):
self.name = 'audit_log_record'
def validate(self, doc):
return doc
class AuditLogHand... |
3453b7961fae365f833199c88c7395428fcdf788 | tensorpy/constants.py | tensorpy/constants.py | """ Defining constants for tensorpy use """
DOWNLOADS_FOLDER = "downloads_folder" # Folder created for downloaded files
MIN_W_H = 50 # Minimum width/height for classifying images on a page
MAX_THREADS = 4 # Total threads to spin up for classifying images on a page
MAX_IMAGES_PER_PAGE = 15 # Limit of image classifi... | """ Defining constants for tensorpy use """
DOWNLOADS_FOLDER = "downloads_folder" # Folder created for downloaded files
MIN_W_H = 50 # Minimum width/height for classifying images on a page
MAX_THREADS = 3 # Total threads to spin up for classifying images on a page
MAX_IMAGES_PER_PAGE = 15 # Limit of image classifi... | Set default max threads for multithreading to 3 | Set default max threads for multithreading to 3
| Python | mit | TensorPy/TensorPy,TensorPy/TensorPy | """ Defining constants for tensorpy use """
DOWNLOADS_FOLDER = "downloads_folder" # Folder created for downloaded files
MIN_W_H = 50 # Minimum width/height for classifying images on a page
MAX_THREADS = 4 # Total threads to spin up for classifying images on a page
MAX_IMAGES_PER_PAGE = 15 # Limit of image classifi... | """ Defining constants for tensorpy use """
DOWNLOADS_FOLDER = "downloads_folder" # Folder created for downloaded files
MIN_W_H = 50 # Minimum width/height for classifying images on a page
MAX_THREADS = 3 # Total threads to spin up for classifying images on a page
MAX_IMAGES_PER_PAGE = 15 # Limit of image classifi... | <commit_before>""" Defining constants for tensorpy use """
DOWNLOADS_FOLDER = "downloads_folder" # Folder created for downloaded files
MIN_W_H = 50 # Minimum width/height for classifying images on a page
MAX_THREADS = 4 # Total threads to spin up for classifying images on a page
MAX_IMAGES_PER_PAGE = 15 # Limit of... | """ Defining constants for tensorpy use """
DOWNLOADS_FOLDER = "downloads_folder" # Folder created for downloaded files
MIN_W_H = 50 # Minimum width/height for classifying images on a page
MAX_THREADS = 3 # Total threads to spin up for classifying images on a page
MAX_IMAGES_PER_PAGE = 15 # Limit of image classifi... | """ Defining constants for tensorpy use """
DOWNLOADS_FOLDER = "downloads_folder" # Folder created for downloaded files
MIN_W_H = 50 # Minimum width/height for classifying images on a page
MAX_THREADS = 4 # Total threads to spin up for classifying images on a page
MAX_IMAGES_PER_PAGE = 15 # Limit of image classifi... | <commit_before>""" Defining constants for tensorpy use """
DOWNLOADS_FOLDER = "downloads_folder" # Folder created for downloaded files
MIN_W_H = 50 # Minimum width/height for classifying images on a page
MAX_THREADS = 4 # Total threads to spin up for classifying images on a page
MAX_IMAGES_PER_PAGE = 15 # Limit of... |
b2069b2b4a07d82cc6831dde0e396d7dae79d23e | autopidact/view.py | autopidact/view.py | from gi.repository import Gtk, GdkPixbuf, GLib
import cv2
class View(Gtk.Window):
def __init__(self, title, camera, interval=200):
Gtk.Window.__init__(self)
self.set_title(title)
self.cam = camera
self.img = Gtk.Image()
self.add(self.img)
GLib.timeout_add(interval, self.update)
def update(self):
if se... | from gi.repository import Gtk, GdkPixbuf, GLib
import cv2
class View(Gtk.Window):
def __init__(self, title, camera, interval=200):
Gtk.Window.__init__(self)
self.set_title(title)
self.set_size_request(640, 480)
self.set_resizable(False)
self.cam = camera
self.img = Gtk.Image()
self.add(self.img)
GLib.... | Set an initial size and disallow resizing | Set an initial size and disallow resizing
| Python | mit | fkmclane/AutoPidact | from gi.repository import Gtk, GdkPixbuf, GLib
import cv2
class View(Gtk.Window):
def __init__(self, title, camera, interval=200):
Gtk.Window.__init__(self)
self.set_title(title)
self.cam = camera
self.img = Gtk.Image()
self.add(self.img)
GLib.timeout_add(interval, self.update)
def update(self):
if se... | from gi.repository import Gtk, GdkPixbuf, GLib
import cv2
class View(Gtk.Window):
def __init__(self, title, camera, interval=200):
Gtk.Window.__init__(self)
self.set_title(title)
self.set_size_request(640, 480)
self.set_resizable(False)
self.cam = camera
self.img = Gtk.Image()
self.add(self.img)
GLib.... | <commit_before>from gi.repository import Gtk, GdkPixbuf, GLib
import cv2
class View(Gtk.Window):
def __init__(self, title, camera, interval=200):
Gtk.Window.__init__(self)
self.set_title(title)
self.cam = camera
self.img = Gtk.Image()
self.add(self.img)
GLib.timeout_add(interval, self.update)
def update... | from gi.repository import Gtk, GdkPixbuf, GLib
import cv2
class View(Gtk.Window):
def __init__(self, title, camera, interval=200):
Gtk.Window.__init__(self)
self.set_title(title)
self.set_size_request(640, 480)
self.set_resizable(False)
self.cam = camera
self.img = Gtk.Image()
self.add(self.img)
GLib.... | from gi.repository import Gtk, GdkPixbuf, GLib
import cv2
class View(Gtk.Window):
def __init__(self, title, camera, interval=200):
Gtk.Window.__init__(self)
self.set_title(title)
self.cam = camera
self.img = Gtk.Image()
self.add(self.img)
GLib.timeout_add(interval, self.update)
def update(self):
if se... | <commit_before>from gi.repository import Gtk, GdkPixbuf, GLib
import cv2
class View(Gtk.Window):
def __init__(self, title, camera, interval=200):
Gtk.Window.__init__(self)
self.set_title(title)
self.cam = camera
self.img = Gtk.Image()
self.add(self.img)
GLib.timeout_add(interval, self.update)
def update... |
fb01aa54032b7ab73dcd5a3e73d4ece5f36517e2 | locations/tasks.py | locations/tasks.py | from future.standard_library import install_aliases
install_aliases() # noqa
from urllib.parse import urlparse
from celery.task import Task
from django.conf import settings
from seed_services_client import IdentityStoreApiClient
from .models import Parish
class SyncLocations(Task):
"""
Has a look at all th... | from future.standard_library import install_aliases
install_aliases() # noqa
from urllib.parse import urlparse
from celery.task import Task
from django.conf import settings
from seed_services_client import IdentityStoreApiClient
from .models import Parish
class SyncLocations(Task):
"""
Has a look at all th... | Add comment to explain pagination handling | Add comment to explain pagination handling
| Python | bsd-3-clause | praekelt/familyconnect-registration,praekelt/familyconnect-registration | from future.standard_library import install_aliases
install_aliases() # noqa
from urllib.parse import urlparse
from celery.task import Task
from django.conf import settings
from seed_services_client import IdentityStoreApiClient
from .models import Parish
class SyncLocations(Task):
"""
Has a look at all th... | from future.standard_library import install_aliases
install_aliases() # noqa
from urllib.parse import urlparse
from celery.task import Task
from django.conf import settings
from seed_services_client import IdentityStoreApiClient
from .models import Parish
class SyncLocations(Task):
"""
Has a look at all th... | <commit_before>from future.standard_library import install_aliases
install_aliases() # noqa
from urllib.parse import urlparse
from celery.task import Task
from django.conf import settings
from seed_services_client import IdentityStoreApiClient
from .models import Parish
class SyncLocations(Task):
"""
Has a... | from future.standard_library import install_aliases
install_aliases() # noqa
from urllib.parse import urlparse
from celery.task import Task
from django.conf import settings
from seed_services_client import IdentityStoreApiClient
from .models import Parish
class SyncLocations(Task):
"""
Has a look at all th... | from future.standard_library import install_aliases
install_aliases() # noqa
from urllib.parse import urlparse
from celery.task import Task
from django.conf import settings
from seed_services_client import IdentityStoreApiClient
from .models import Parish
class SyncLocations(Task):
"""
Has a look at all th... | <commit_before>from future.standard_library import install_aliases
install_aliases() # noqa
from urllib.parse import urlparse
from celery.task import Task
from django.conf import settings
from seed_services_client import IdentityStoreApiClient
from .models import Parish
class SyncLocations(Task):
"""
Has a... |
e9fc291faca8af35398b958d046e951aa8471cbf | apps/core/tests/test_factories.py | apps/core/tests/test_factories.py | from .. import factories
from . import CoreFixturesTestCase
class AnalysisFactoryTestCase(CoreFixturesTestCase):
def test_new_factory_with_Experiments(self):
experiments = factories.ExperimentFactory.create_batch(3)
# build
analysis = factories.AnalysisFactory.build(experiments=experime... | from .. import factories, models
from . import CoreFixturesTestCase
class AnalysisFactoryTestCase(CoreFixturesTestCase):
def test_new_factory_with_Experiments(self):
experiments = factories.ExperimentFactory.create_batch(3)
# build
analysis = factories.AnalysisFactory.build(experiments=... | Fix broken test since models new default ordering | Fix broken test since models new default ordering
| Python | bsd-3-clause | Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel | from .. import factories
from . import CoreFixturesTestCase
class AnalysisFactoryTestCase(CoreFixturesTestCase):
def test_new_factory_with_Experiments(self):
experiments = factories.ExperimentFactory.create_batch(3)
# build
analysis = factories.AnalysisFactory.build(experiments=experime... | from .. import factories, models
from . import CoreFixturesTestCase
class AnalysisFactoryTestCase(CoreFixturesTestCase):
def test_new_factory_with_Experiments(self):
experiments = factories.ExperimentFactory.create_batch(3)
# build
analysis = factories.AnalysisFactory.build(experiments=... | <commit_before>from .. import factories
from . import CoreFixturesTestCase
class AnalysisFactoryTestCase(CoreFixturesTestCase):
def test_new_factory_with_Experiments(self):
experiments = factories.ExperimentFactory.create_batch(3)
# build
analysis = factories.AnalysisFactory.build(exper... | from .. import factories, models
from . import CoreFixturesTestCase
class AnalysisFactoryTestCase(CoreFixturesTestCase):
def test_new_factory_with_Experiments(self):
experiments = factories.ExperimentFactory.create_batch(3)
# build
analysis = factories.AnalysisFactory.build(experiments=... | from .. import factories
from . import CoreFixturesTestCase
class AnalysisFactoryTestCase(CoreFixturesTestCase):
def test_new_factory_with_Experiments(self):
experiments = factories.ExperimentFactory.create_batch(3)
# build
analysis = factories.AnalysisFactory.build(experiments=experime... | <commit_before>from .. import factories
from . import CoreFixturesTestCase
class AnalysisFactoryTestCase(CoreFixturesTestCase):
def test_new_factory_with_Experiments(self):
experiments = factories.ExperimentFactory.create_batch(3)
# build
analysis = factories.AnalysisFactory.build(exper... |
f4e36132448a4a55bff5660b3f5a669e0095ecc5 | awx/main/models/activity_stream.py | awx/main/models/activity_stream.py | # Copyright (c) 2013 AnsibleWorks, Inc.
# All Rights Reserved.
from django.db import models
class ActivityStream(models.Model):
'''
Model used to describe activity stream (audit) events
'''
OPERATION_CHOICES = [
('create', _('Entity Created')),
('update', _("Entity Updated")),
... | # Copyright (c) 2013 AnsibleWorks, Inc.
# All Rights Reserved.
from django.db import models
from django.utils.translation import ugettext_lazy as _
class ActivityStream(models.Model):
'''
Model used to describe activity stream (audit) events
'''
class Meta:
app_label = 'main'
OPERATION_... | Fix up some issues with supporting schema migration | Fix up some issues with supporting schema migration
| Python | apache-2.0 | wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx,wwitzel3/awx | # Copyright (c) 2013 AnsibleWorks, Inc.
# All Rights Reserved.
from django.db import models
class ActivityStream(models.Model):
'''
Model used to describe activity stream (audit) events
'''
OPERATION_CHOICES = [
('create', _('Entity Created')),
('update', _("Entity Updated")),
... | # Copyright (c) 2013 AnsibleWorks, Inc.
# All Rights Reserved.
from django.db import models
from django.utils.translation import ugettext_lazy as _
class ActivityStream(models.Model):
'''
Model used to describe activity stream (audit) events
'''
class Meta:
app_label = 'main'
OPERATION_... | <commit_before># Copyright (c) 2013 AnsibleWorks, Inc.
# All Rights Reserved.
from django.db import models
class ActivityStream(models.Model):
'''
Model used to describe activity stream (audit) events
'''
OPERATION_CHOICES = [
('create', _('Entity Created')),
('update', _("Entity Upda... | # Copyright (c) 2013 AnsibleWorks, Inc.
# All Rights Reserved.
from django.db import models
from django.utils.translation import ugettext_lazy as _
class ActivityStream(models.Model):
'''
Model used to describe activity stream (audit) events
'''
class Meta:
app_label = 'main'
OPERATION_... | # Copyright (c) 2013 AnsibleWorks, Inc.
# All Rights Reserved.
from django.db import models
class ActivityStream(models.Model):
'''
Model used to describe activity stream (audit) events
'''
OPERATION_CHOICES = [
('create', _('Entity Created')),
('update', _("Entity Updated")),
... | <commit_before># Copyright (c) 2013 AnsibleWorks, Inc.
# All Rights Reserved.
from django.db import models
class ActivityStream(models.Model):
'''
Model used to describe activity stream (audit) events
'''
OPERATION_CHOICES = [
('create', _('Entity Created')),
('update', _("Entity Upda... |
29eb3661ace0f3dd62d210621ebd24ef95261162 | src/listen.py | src/listen.py |
import redis
import re
from common import get_db
from datetime import datetime
MSGPATTERN = re.compile('^(\w+)\|(\d)\|([\s\S]*)$')
CHANNEL = 'logfire'
def listen(args):
global MSGPATTERN
rserver = redis.Redis('localhost')
pubsub = rserver.pubsub()
pubsub.subscribe(CHANNEL)
db = get_db(args.mongohost)
... |
import redis
import re
from common import get_db
from datetime import datetime
MSGPATTERN = re.compile('^(\w+)\|(\d)\|([\s\S]*)$')
CHANNEL = 'logfire'
def listen(args):
global MSGPATTERN
rserver = redis.Redis('localhost')
pubsub = rserver.pubsub()
pubsub.subscribe(CHANNEL)
db = get_db(args.mongohost)
... | Make sure timestamp of log message is UTC when it goes into DB | Make sure timestamp of log message is UTC when it goes into DB
| Python | mit | jay3sh/logfire,jay3sh/logfire |
import redis
import re
from common import get_db
from datetime import datetime
MSGPATTERN = re.compile('^(\w+)\|(\d)\|([\s\S]*)$')
CHANNEL = 'logfire'
def listen(args):
global MSGPATTERN
rserver = redis.Redis('localhost')
pubsub = rserver.pubsub()
pubsub.subscribe(CHANNEL)
db = get_db(args.mongohost)
... |
import redis
import re
from common import get_db
from datetime import datetime
MSGPATTERN = re.compile('^(\w+)\|(\d)\|([\s\S]*)$')
CHANNEL = 'logfire'
def listen(args):
global MSGPATTERN
rserver = redis.Redis('localhost')
pubsub = rserver.pubsub()
pubsub.subscribe(CHANNEL)
db = get_db(args.mongohost)
... | <commit_before>
import redis
import re
from common import get_db
from datetime import datetime
MSGPATTERN = re.compile('^(\w+)\|(\d)\|([\s\S]*)$')
CHANNEL = 'logfire'
def listen(args):
global MSGPATTERN
rserver = redis.Redis('localhost')
pubsub = rserver.pubsub()
pubsub.subscribe(CHANNEL)
db = get_db(arg... |
import redis
import re
from common import get_db
from datetime import datetime
MSGPATTERN = re.compile('^(\w+)\|(\d)\|([\s\S]*)$')
CHANNEL = 'logfire'
def listen(args):
global MSGPATTERN
rserver = redis.Redis('localhost')
pubsub = rserver.pubsub()
pubsub.subscribe(CHANNEL)
db = get_db(args.mongohost)
... |
import redis
import re
from common import get_db
from datetime import datetime
MSGPATTERN = re.compile('^(\w+)\|(\d)\|([\s\S]*)$')
CHANNEL = 'logfire'
def listen(args):
global MSGPATTERN
rserver = redis.Redis('localhost')
pubsub = rserver.pubsub()
pubsub.subscribe(CHANNEL)
db = get_db(args.mongohost)
... | <commit_before>
import redis
import re
from common import get_db
from datetime import datetime
MSGPATTERN = re.compile('^(\w+)\|(\d)\|([\s\S]*)$')
CHANNEL = 'logfire'
def listen(args):
global MSGPATTERN
rserver = redis.Redis('localhost')
pubsub = rserver.pubsub()
pubsub.subscribe(CHANNEL)
db = get_db(arg... |
941ab0315d71fbea552b0ab12d75e4d8968adfce | cube2sphere/blender_init.py | cube2sphere/blender_init.py | __author__ = 'Xyene'
import bpy
import sys
import math
bpy.context.scene.cycles.resolution_x = int(sys.argv[-5])
bpy.context.scene.cycles.resolution_y = int(sys.argv[-4])
for i, name in enumerate(['bottom', 'top', 'left', 'right', 'back', 'front']):
bpy.data.images[name].filepath = "%s" % sys.argv[-6 - i]
came... | __author__ = 'Xyene'
import bpy
import sys
import math
for scene in bpy.data.scenes:
scene.render.resolution_x = int(sys.argv[-5])
scene.render.resolution_y = int(sys.argv[-4])
scene.render.resolution_percentage = 100
scene.render.use_border = False
for i, name in enumerate(['bottom', 'top', 'left',... | Change the way we pass resolution to blender | Change the way we pass resolution to blender | Python | agpl-3.0 | Xyene/cube2sphere | __author__ = 'Xyene'
import bpy
import sys
import math
bpy.context.scene.cycles.resolution_x = int(sys.argv[-5])
bpy.context.scene.cycles.resolution_y = int(sys.argv[-4])
for i, name in enumerate(['bottom', 'top', 'left', 'right', 'back', 'front']):
bpy.data.images[name].filepath = "%s" % sys.argv[-6 - i]
came... | __author__ = 'Xyene'
import bpy
import sys
import math
for scene in bpy.data.scenes:
scene.render.resolution_x = int(sys.argv[-5])
scene.render.resolution_y = int(sys.argv[-4])
scene.render.resolution_percentage = 100
scene.render.use_border = False
for i, name in enumerate(['bottom', 'top', 'left',... | <commit_before>__author__ = 'Xyene'
import bpy
import sys
import math
bpy.context.scene.cycles.resolution_x = int(sys.argv[-5])
bpy.context.scene.cycles.resolution_y = int(sys.argv[-4])
for i, name in enumerate(['bottom', 'top', 'left', 'right', 'back', 'front']):
bpy.data.images[name].filepath = "%s" % sys.arg... | __author__ = 'Xyene'
import bpy
import sys
import math
for scene in bpy.data.scenes:
scene.render.resolution_x = int(sys.argv[-5])
scene.render.resolution_y = int(sys.argv[-4])
scene.render.resolution_percentage = 100
scene.render.use_border = False
for i, name in enumerate(['bottom', 'top', 'left',... | __author__ = 'Xyene'
import bpy
import sys
import math
bpy.context.scene.cycles.resolution_x = int(sys.argv[-5])
bpy.context.scene.cycles.resolution_y = int(sys.argv[-4])
for i, name in enumerate(['bottom', 'top', 'left', 'right', 'back', 'front']):
bpy.data.images[name].filepath = "%s" % sys.argv[-6 - i]
came... | <commit_before>__author__ = 'Xyene'
import bpy
import sys
import math
bpy.context.scene.cycles.resolution_x = int(sys.argv[-5])
bpy.context.scene.cycles.resolution_y = int(sys.argv[-4])
for i, name in enumerate(['bottom', 'top', 'left', 'right', 'back', 'front']):
bpy.data.images[name].filepath = "%s" % sys.arg... |
ad8d69e4c5447297db535f8ca9d1ac00e85f01e8 | httpbin/runner.py | httpbin/runner.py | # -*- coding: utf-8 -*-
"""
httpbin.runner
~~~~~~~~~~~~~~
This module serves as a command-line runner for httpbin, powered by
gunicorn.
"""
import sys
from gevent.wsgi import WSGIServer
from httpbin import app
def main():
try:
port = int(sys.argv[1])
except (KeyError, ValueError, IndexError):
... | # -*- coding: utf-8 -*-
"""
httpbin.runner
~~~~~~~~~~~~~~
This module serves as a command-line runner for httpbin, powered by
gunicorn.
"""
import sys
from gevent.pywsgi import WSGIServer
from httpbin import app
def main():
try:
port = int(sys.argv[1])
except (KeyError, ValueError, IndexError):
... | Use pywsgi.py instead of wsgi (better chunked handling) | Use pywsgi.py instead of wsgi (better chunked handling)
| Python | isc | ewdurbin/httpbin,luhkevin/httpbin,Jaccorot/httpbin,yemingm/httpbin,shaunstanislaus/httpbin,mozillazg/bustard-httpbin,postmanlabs/httpbin,logonmy/httpbin,admin-zhx/httpbin,vscarpenter/httpbin,Lukasa/httpbin,Lukasa/httpbin,ashcoding/httpbin,yangruiyou85/httpbin,pestanko/httpbin,luosam1123/httpbin,mansilladev/httpbin,moja... | # -*- coding: utf-8 -*-
"""
httpbin.runner
~~~~~~~~~~~~~~
This module serves as a command-line runner for httpbin, powered by
gunicorn.
"""
import sys
from gevent.wsgi import WSGIServer
from httpbin import app
def main():
try:
port = int(sys.argv[1])
except (KeyError, ValueError, IndexError):
... | # -*- coding: utf-8 -*-
"""
httpbin.runner
~~~~~~~~~~~~~~
This module serves as a command-line runner for httpbin, powered by
gunicorn.
"""
import sys
from gevent.pywsgi import WSGIServer
from httpbin import app
def main():
try:
port = int(sys.argv[1])
except (KeyError, ValueError, IndexError):
... | <commit_before># -*- coding: utf-8 -*-
"""
httpbin.runner
~~~~~~~~~~~~~~
This module serves as a command-line runner for httpbin, powered by
gunicorn.
"""
import sys
from gevent.wsgi import WSGIServer
from httpbin import app
def main():
try:
port = int(sys.argv[1])
except (KeyError, ValueError, I... | # -*- coding: utf-8 -*-
"""
httpbin.runner
~~~~~~~~~~~~~~
This module serves as a command-line runner for httpbin, powered by
gunicorn.
"""
import sys
from gevent.pywsgi import WSGIServer
from httpbin import app
def main():
try:
port = int(sys.argv[1])
except (KeyError, ValueError, IndexError):
... | # -*- coding: utf-8 -*-
"""
httpbin.runner
~~~~~~~~~~~~~~
This module serves as a command-line runner for httpbin, powered by
gunicorn.
"""
import sys
from gevent.wsgi import WSGIServer
from httpbin import app
def main():
try:
port = int(sys.argv[1])
except (KeyError, ValueError, IndexError):
... | <commit_before># -*- coding: utf-8 -*-
"""
httpbin.runner
~~~~~~~~~~~~~~
This module serves as a command-line runner for httpbin, powered by
gunicorn.
"""
import sys
from gevent.wsgi import WSGIServer
from httpbin import app
def main():
try:
port = int(sys.argv[1])
except (KeyError, ValueError, I... |
8ddbd0b39687f46637041848ab7190bcefd57b68 | pyramid_mongodb/__init__.py | pyramid_mongodb/__init__.py | """
simplified mongodb integration
1. Add two lines to app/__init__.py ( the import and the call to initialize_mongo_db )
import python_mongodb
def main(global_config, **settings):
## ...
# Initialize mongodb , which is a subscriber
python_mongodb.initialize_mongo_db( config , settin... | """
simplified mongodb integration
1. Add two lines to app/__init__.py ( the import and the call to initialize_mongo_db )
import python_mongodb
def main(global_config, **settings):
## ...
# Initialize mongodb , which is a subscriber
python_mongodb.initialize_mongo_db( config , settin... | Use set_request_property instead of subscriber to improve performance | Use set_request_property instead of subscriber to improve performance
| Python | mit | niallo/pyramid_mongodb | """
simplified mongodb integration
1. Add two lines to app/__init__.py ( the import and the call to initialize_mongo_db )
import python_mongodb
def main(global_config, **settings):
## ...
# Initialize mongodb , which is a subscriber
python_mongodb.initialize_mongo_db( config , settin... | """
simplified mongodb integration
1. Add two lines to app/__init__.py ( the import and the call to initialize_mongo_db )
import python_mongodb
def main(global_config, **settings):
## ...
# Initialize mongodb , which is a subscriber
python_mongodb.initialize_mongo_db( config , settin... | <commit_before>"""
simplified mongodb integration
1. Add two lines to app/__init__.py ( the import and the call to initialize_mongo_db )
import python_mongodb
def main(global_config, **settings):
## ...
# Initialize mongodb , which is a subscriber
python_mongodb.initialize_mongo_db( ... | """
simplified mongodb integration
1. Add two lines to app/__init__.py ( the import and the call to initialize_mongo_db )
import python_mongodb
def main(global_config, **settings):
## ...
# Initialize mongodb , which is a subscriber
python_mongodb.initialize_mongo_db( config , settin... | """
simplified mongodb integration
1. Add two lines to app/__init__.py ( the import and the call to initialize_mongo_db )
import python_mongodb
def main(global_config, **settings):
## ...
# Initialize mongodb , which is a subscriber
python_mongodb.initialize_mongo_db( config , settin... | <commit_before>"""
simplified mongodb integration
1. Add two lines to app/__init__.py ( the import and the call to initialize_mongo_db )
import python_mongodb
def main(global_config, **settings):
## ...
# Initialize mongodb , which is a subscriber
python_mongodb.initialize_mongo_db( ... |
92c024c2112573e4c4b2d1288b1ec3c7a40bc670 | test/test_uploader.py | test/test_uploader.py | import boto3
from os import path
from lambda_uploader import uploader, config
from moto import mock_s3
EX_CONFIG = path.normpath(path.join(path.dirname(__file__),
'../test/configs'))
@mock_s3
def test_s3_upload():
mock_bucket = 'mybucket'
conn = boto3.resource('s3')
conn.create... | import boto3
from os import path
from lambda_uploader import uploader, config
from moto import mock_s3
EX_CONFIG = path.normpath(path.join(path.dirname(__file__),
'../test/configs'))
@mock_s3
def test_s3_upload():
mock_bucket = 'mybucket'
conn = boto3.resource('s3')
conn.create... | Add additional assertion that the file we uploaded is correct | Add additional assertion that the file we uploaded is correct
We should pull back down the S3 bucket file and be sure it's the same, proving we used the boto3 API correctly. We should probably, at some point, also upload a _real_ zip file and not just a plaintext file.
| Python | apache-2.0 | rackerlabs/lambda-uploader,dsouzajude/lambda-uploader | import boto3
from os import path
from lambda_uploader import uploader, config
from moto import mock_s3
EX_CONFIG = path.normpath(path.join(path.dirname(__file__),
'../test/configs'))
@mock_s3
def test_s3_upload():
mock_bucket = 'mybucket'
conn = boto3.resource('s3')
conn.create... | import boto3
from os import path
from lambda_uploader import uploader, config
from moto import mock_s3
EX_CONFIG = path.normpath(path.join(path.dirname(__file__),
'../test/configs'))
@mock_s3
def test_s3_upload():
mock_bucket = 'mybucket'
conn = boto3.resource('s3')
conn.create... | <commit_before>import boto3
from os import path
from lambda_uploader import uploader, config
from moto import mock_s3
EX_CONFIG = path.normpath(path.join(path.dirname(__file__),
'../test/configs'))
@mock_s3
def test_s3_upload():
mock_bucket = 'mybucket'
conn = boto3.resource('s3')
... | import boto3
from os import path
from lambda_uploader import uploader, config
from moto import mock_s3
EX_CONFIG = path.normpath(path.join(path.dirname(__file__),
'../test/configs'))
@mock_s3
def test_s3_upload():
mock_bucket = 'mybucket'
conn = boto3.resource('s3')
conn.create... | import boto3
from os import path
from lambda_uploader import uploader, config
from moto import mock_s3
EX_CONFIG = path.normpath(path.join(path.dirname(__file__),
'../test/configs'))
@mock_s3
def test_s3_upload():
mock_bucket = 'mybucket'
conn = boto3.resource('s3')
conn.create... | <commit_before>import boto3
from os import path
from lambda_uploader import uploader, config
from moto import mock_s3
EX_CONFIG = path.normpath(path.join(path.dirname(__file__),
'../test/configs'))
@mock_s3
def test_s3_upload():
mock_bucket = 'mybucket'
conn = boto3.resource('s3')
... |
cc4b68c7eccf05ca32802022b2abfd31b51bce32 | chef/exceptions.py | chef/exceptions.py | # Exception hierarchy for chef
# Copyright (c) 2010 Noah Kantrowitz <[email protected]>
class ChefError(Exception):
"""Top-level Chef error."""
class ChefServerError(ChefError):
"""An error from a Chef server. May include a HTTP response code."""
def __init__(self, message, code=None):
ChefError... | # Exception hierarchy for chef
# Copyright (c) 2010 Noah Kantrowitz <[email protected]>
class ChefError(Exception):
"""Top-level Chef error."""
class ChefServerError(ChefError):
"""An error from a Chef server. May include a HTTP response code."""
def __init__(self, message, code=None):
super(Ch... | Use super() for great justice. | Use super() for great justice.
| Python | apache-2.0 | Scalr/pychef,Scalr/pychef,cread/pychef,dipakvwarade/pychef,dipakvwarade/pychef,cread/pychef,coderanger/pychef,coderanger/pychef,jarosser06/pychef,jarosser06/pychef | # Exception hierarchy for chef
# Copyright (c) 2010 Noah Kantrowitz <[email protected]>
class ChefError(Exception):
"""Top-level Chef error."""
class ChefServerError(ChefError):
"""An error from a Chef server. May include a HTTP response code."""
def __init__(self, message, code=None):
ChefError... | # Exception hierarchy for chef
# Copyright (c) 2010 Noah Kantrowitz <[email protected]>
class ChefError(Exception):
"""Top-level Chef error."""
class ChefServerError(ChefError):
"""An error from a Chef server. May include a HTTP response code."""
def __init__(self, message, code=None):
super(Ch... | <commit_before># Exception hierarchy for chef
# Copyright (c) 2010 Noah Kantrowitz <[email protected]>
class ChefError(Exception):
"""Top-level Chef error."""
class ChefServerError(ChefError):
"""An error from a Chef server. May include a HTTP response code."""
def __init__(self, message, code=None):
... | # Exception hierarchy for chef
# Copyright (c) 2010 Noah Kantrowitz <[email protected]>
class ChefError(Exception):
"""Top-level Chef error."""
class ChefServerError(ChefError):
"""An error from a Chef server. May include a HTTP response code."""
def __init__(self, message, code=None):
super(Ch... | # Exception hierarchy for chef
# Copyright (c) 2010 Noah Kantrowitz <[email protected]>
class ChefError(Exception):
"""Top-level Chef error."""
class ChefServerError(ChefError):
"""An error from a Chef server. May include a HTTP response code."""
def __init__(self, message, code=None):
ChefError... | <commit_before># Exception hierarchy for chef
# Copyright (c) 2010 Noah Kantrowitz <[email protected]>
class ChefError(Exception):
"""Top-level Chef error."""
class ChefServerError(ChefError):
"""An error from a Chef server. May include a HTTP response code."""
def __init__(self, message, code=None):
... |
f11d7232486a92bf5e9dba28432ee2ed97e02da4 | print_web_django/api/views.py | print_web_django/api/views.py | from rest_framework import viewsets
from . import serializers, models
class PrintJobViewSet(viewsets.ModelViewSet):
serializer_class = serializers.PrintJobSerializer
def get_queryset(self):
return self.request.user.printjobs.all()
def perform_create(self, serializer):
# need to also pass... | from rest_framework import viewsets
from . import serializers, models
class PrintJobViewSet(viewsets.ModelViewSet):
serializer_class = serializers.PrintJobSerializer
def get_queryset(self):
return self.request.user.printjobs.all().order_by('-created')
def perform_create(self, serializer):
... | Sort by descending date created (new first) | Sort by descending date created (new first)
| Python | mit | aabmass/print-web,aabmass/print-web,aabmass/print-web | from rest_framework import viewsets
from . import serializers, models
class PrintJobViewSet(viewsets.ModelViewSet):
serializer_class = serializers.PrintJobSerializer
def get_queryset(self):
return self.request.user.printjobs.all()
def perform_create(self, serializer):
# need to also pass... | from rest_framework import viewsets
from . import serializers, models
class PrintJobViewSet(viewsets.ModelViewSet):
serializer_class = serializers.PrintJobSerializer
def get_queryset(self):
return self.request.user.printjobs.all().order_by('-created')
def perform_create(self, serializer):
... | <commit_before>from rest_framework import viewsets
from . import serializers, models
class PrintJobViewSet(viewsets.ModelViewSet):
serializer_class = serializers.PrintJobSerializer
def get_queryset(self):
return self.request.user.printjobs.all()
def perform_create(self, serializer):
# ne... | from rest_framework import viewsets
from . import serializers, models
class PrintJobViewSet(viewsets.ModelViewSet):
serializer_class = serializers.PrintJobSerializer
def get_queryset(self):
return self.request.user.printjobs.all().order_by('-created')
def perform_create(self, serializer):
... | from rest_framework import viewsets
from . import serializers, models
class PrintJobViewSet(viewsets.ModelViewSet):
serializer_class = serializers.PrintJobSerializer
def get_queryset(self):
return self.request.user.printjobs.all()
def perform_create(self, serializer):
# need to also pass... | <commit_before>from rest_framework import viewsets
from . import serializers, models
class PrintJobViewSet(viewsets.ModelViewSet):
serializer_class = serializers.PrintJobSerializer
def get_queryset(self):
return self.request.user.printjobs.all()
def perform_create(self, serializer):
# ne... |
97d6f5e7b346944ac6757fd4570bfbc7dcf52425 | survey/admin.py | survey/admin.py | # -*- coding: utf-8 -*-
from django.contrib import admin
from survey.models import Answer, Category, Question, Response, Survey
from .actions import make_published
class QuestionInline(admin.TabularInline):
model = Question
ordering = ("order", "category")
extra = 1
class CategoryInline(admin.Tabular... | # -*- coding: utf-8 -*-
from django.contrib import admin
from survey.actions import make_published
from survey.models import Answer, Category, Question, Response, Survey
class QuestionInline(admin.TabularInline):
model = Question
ordering = ("order", "category")
extra = 1
class CategoryInline(admin.Ta... | Fix Attempted relative import beyond top-level package | Fix Attempted relative import beyond top-level package
| Python | agpl-3.0 | Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey | # -*- coding: utf-8 -*-
from django.contrib import admin
from survey.models import Answer, Category, Question, Response, Survey
from .actions import make_published
class QuestionInline(admin.TabularInline):
model = Question
ordering = ("order", "category")
extra = 1
class CategoryInline(admin.Tabular... | # -*- coding: utf-8 -*-
from django.contrib import admin
from survey.actions import make_published
from survey.models import Answer, Category, Question, Response, Survey
class QuestionInline(admin.TabularInline):
model = Question
ordering = ("order", "category")
extra = 1
class CategoryInline(admin.Ta... | <commit_before># -*- coding: utf-8 -*-
from django.contrib import admin
from survey.models import Answer, Category, Question, Response, Survey
from .actions import make_published
class QuestionInline(admin.TabularInline):
model = Question
ordering = ("order", "category")
extra = 1
class CategoryInlin... | # -*- coding: utf-8 -*-
from django.contrib import admin
from survey.actions import make_published
from survey.models import Answer, Category, Question, Response, Survey
class QuestionInline(admin.TabularInline):
model = Question
ordering = ("order", "category")
extra = 1
class CategoryInline(admin.Ta... | # -*- coding: utf-8 -*-
from django.contrib import admin
from survey.models import Answer, Category, Question, Response, Survey
from .actions import make_published
class QuestionInline(admin.TabularInline):
model = Question
ordering = ("order", "category")
extra = 1
class CategoryInline(admin.Tabular... | <commit_before># -*- coding: utf-8 -*-
from django.contrib import admin
from survey.models import Answer, Category, Question, Response, Survey
from .actions import make_published
class QuestionInline(admin.TabularInline):
model = Question
ordering = ("order", "category")
extra = 1
class CategoryInlin... |
a03eb91088943a4b3ed0ae5fc87b104562a4a645 | location_field/urls.py | location_field/urls.py | try:
from django.conf.urls import patterns # Django>=1.6
except ImportError:
from django.conf.urls.defaults import patterns # Django<1.6
import os
app_dir = os.path.dirname(__file__)
urlpatterns = patterns(
'',
(r'^media/(.*)$', 'django.views.static.serve', {
'document_root': '%s/media' % a... | from django.conf.urls import patterns
import os
app_dir = os.path.dirname(__file__)
urlpatterns = patterns(
'',
(r'^media/(.*)$', 'django.views.static.serve', {
'document_root': '%s/media' % app_dir}),
)
| Drop support for Django 1.6 | Drop support for Django 1.6
| Python | mit | Mixser/django-location-field,recklessromeo/django-location-field,Mixser/django-location-field,voodmania/django-location-field,recklessromeo/django-location-field,undernewmanagement/django-location-field,voodmania/django-location-field,caioariede/django-location-field,caioariede/django-location-field,undernewmanagement/... | try:
from django.conf.urls import patterns # Django>=1.6
except ImportError:
from django.conf.urls.defaults import patterns # Django<1.6
import os
app_dir = os.path.dirname(__file__)
urlpatterns = patterns(
'',
(r'^media/(.*)$', 'django.views.static.serve', {
'document_root': '%s/media' % a... | from django.conf.urls import patterns
import os
app_dir = os.path.dirname(__file__)
urlpatterns = patterns(
'',
(r'^media/(.*)$', 'django.views.static.serve', {
'document_root': '%s/media' % app_dir}),
)
| <commit_before>try:
from django.conf.urls import patterns # Django>=1.6
except ImportError:
from django.conf.urls.defaults import patterns # Django<1.6
import os
app_dir = os.path.dirname(__file__)
urlpatterns = patterns(
'',
(r'^media/(.*)$', 'django.views.static.serve', {
'document_root':... | from django.conf.urls import patterns
import os
app_dir = os.path.dirname(__file__)
urlpatterns = patterns(
'',
(r'^media/(.*)$', 'django.views.static.serve', {
'document_root': '%s/media' % app_dir}),
)
| try:
from django.conf.urls import patterns # Django>=1.6
except ImportError:
from django.conf.urls.defaults import patterns # Django<1.6
import os
app_dir = os.path.dirname(__file__)
urlpatterns = patterns(
'',
(r'^media/(.*)$', 'django.views.static.serve', {
'document_root': '%s/media' % a... | <commit_before>try:
from django.conf.urls import patterns # Django>=1.6
except ImportError:
from django.conf.urls.defaults import patterns # Django<1.6
import os
app_dir = os.path.dirname(__file__)
urlpatterns = patterns(
'',
(r'^media/(.*)$', 'django.views.static.serve', {
'document_root':... |
f292cfa783bcc30c2625b340ad763db2723ce056 | test/test_db.py | test/test_db.py | from piper.db import DbCLI
import mock
class DbCLIBase(object):
def setup_method(self, method):
self.cli = DbCLI(mock.Mock())
self.ns = mock.Mock()
self.config = mock.Mock()
class TestDbCLIRun(DbCLIBase):
def test_plain_run(self):
self.cli.cls.init = mock.Mock()
ret ... | from piper.db import DbCLI
from piper.db import DatabaseBase
import mock
import pytest
class DbCLIBase(object):
def setup_method(self, method):
self.cli = DbCLI(mock.Mock())
self.ns = mock.Mock()
self.config = mock.Mock()
class TestDbCLIRun(DbCLIBase):
def test_plain_run(self):
... | Add tests for DatabaseBase abstraction | Add tests for DatabaseBase abstraction
| Python | mit | thiderman/piper | from piper.db import DbCLI
import mock
class DbCLIBase(object):
def setup_method(self, method):
self.cli = DbCLI(mock.Mock())
self.ns = mock.Mock()
self.config = mock.Mock()
class TestDbCLIRun(DbCLIBase):
def test_plain_run(self):
self.cli.cls.init = mock.Mock()
ret ... | from piper.db import DbCLI
from piper.db import DatabaseBase
import mock
import pytest
class DbCLIBase(object):
def setup_method(self, method):
self.cli = DbCLI(mock.Mock())
self.ns = mock.Mock()
self.config = mock.Mock()
class TestDbCLIRun(DbCLIBase):
def test_plain_run(self):
... | <commit_before>from piper.db import DbCLI
import mock
class DbCLIBase(object):
def setup_method(self, method):
self.cli = DbCLI(mock.Mock())
self.ns = mock.Mock()
self.config = mock.Mock()
class TestDbCLIRun(DbCLIBase):
def test_plain_run(self):
self.cli.cls.init = mock.Mock... | from piper.db import DbCLI
from piper.db import DatabaseBase
import mock
import pytest
class DbCLIBase(object):
def setup_method(self, method):
self.cli = DbCLI(mock.Mock())
self.ns = mock.Mock()
self.config = mock.Mock()
class TestDbCLIRun(DbCLIBase):
def test_plain_run(self):
... | from piper.db import DbCLI
import mock
class DbCLIBase(object):
def setup_method(self, method):
self.cli = DbCLI(mock.Mock())
self.ns = mock.Mock()
self.config = mock.Mock()
class TestDbCLIRun(DbCLIBase):
def test_plain_run(self):
self.cli.cls.init = mock.Mock()
ret ... | <commit_before>from piper.db import DbCLI
import mock
class DbCLIBase(object):
def setup_method(self, method):
self.cli = DbCLI(mock.Mock())
self.ns = mock.Mock()
self.config = mock.Mock()
class TestDbCLIRun(DbCLIBase):
def test_plain_run(self):
self.cli.cls.init = mock.Mock... |
1fbb79762c7e8342e840f0c1bc95c99fd981b81d | dariah_contributions/urls.py | dariah_contributions/urls.py | from django.conf.urls import patterns, url
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from .models import Contribution
from .views import ContributionCreate, ContributionDelete, ContributionUpdate, ContributionRDF
urlpatterns = patterns('',
url(r'^(all)?/$',... | from django.conf.urls import patterns, url
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from .models import Contribution
from .views import ContributionCreate, ContributionDelete, ContributionUpdate, ContributionRDF
urlpatterns = patterns('',
url(r'^(all/)?$',... | Fix the 'contribution/all' or 'contribution/' URL. | Fix the 'contribution/all' or 'contribution/' URL.
| Python | apache-2.0 | DANS-KNAW/dariah-contribute,DANS-KNAW/dariah-contribute | from django.conf.urls import patterns, url
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from .models import Contribution
from .views import ContributionCreate, ContributionDelete, ContributionUpdate, ContributionRDF
urlpatterns = patterns('',
url(r'^(all)?/$',... | from django.conf.urls import patterns, url
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from .models import Contribution
from .views import ContributionCreate, ContributionDelete, ContributionUpdate, ContributionRDF
urlpatterns = patterns('',
url(r'^(all/)?$',... | <commit_before>from django.conf.urls import patterns, url
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from .models import Contribution
from .views import ContributionCreate, ContributionDelete, ContributionUpdate, ContributionRDF
urlpatterns = patterns('',
ur... | from django.conf.urls import patterns, url
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from .models import Contribution
from .views import ContributionCreate, ContributionDelete, ContributionUpdate, ContributionRDF
urlpatterns = patterns('',
url(r'^(all/)?$',... | from django.conf.urls import patterns, url
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from .models import Contribution
from .views import ContributionCreate, ContributionDelete, ContributionUpdate, ContributionRDF
urlpatterns = patterns('',
url(r'^(all)?/$',... | <commit_before>from django.conf.urls import patterns, url
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from .models import Contribution
from .views import ContributionCreate, ContributionDelete, ContributionUpdate, ContributionRDF
urlpatterns = patterns('',
ur... |
63c2cc935d3c97ecb8b297ae387bfdf719cf1350 | apps/admin/forms.py | apps/admin/forms.py | from django.contrib.auth.models import User
from django import forms
from apps.categories.models import *
from apps.books.models import *
class LoginForm(forms.ModelForm):
"""docstring for LoginForm"""
class Meta:
model = User
fields = ['username', 'password']
class CategoryForm(forms.ModelFo... | from django.contrib.auth.models import User
from django import forms
from apps.categories.models import *
from apps.books.models import *
class CategoryForm(forms.ModelForm):
"""docstring for CategoryForm"""
class Meta:
model = Category
fields = '__all__'
class BookForm(forms... | Remove unused FormLogin in admin app | [REMOVE] Remove unused FormLogin in admin app
| Python | mit | vuonghv/brs,vuonghv/brs,vuonghv/brs,vuonghv/brs | from django.contrib.auth.models import User
from django import forms
from apps.categories.models import *
from apps.books.models import *
class LoginForm(forms.ModelForm):
"""docstring for LoginForm"""
class Meta:
model = User
fields = ['username', 'password']
class CategoryForm(forms.ModelFo... | from django.contrib.auth.models import User
from django import forms
from apps.categories.models import *
from apps.books.models import *
class CategoryForm(forms.ModelForm):
"""docstring for CategoryForm"""
class Meta:
model = Category
fields = '__all__'
class BookForm(forms... | <commit_before>from django.contrib.auth.models import User
from django import forms
from apps.categories.models import *
from apps.books.models import *
class LoginForm(forms.ModelForm):
"""docstring for LoginForm"""
class Meta:
model = User
fields = ['username', 'password']
class CategoryFor... | from django.contrib.auth.models import User
from django import forms
from apps.categories.models import *
from apps.books.models import *
class CategoryForm(forms.ModelForm):
"""docstring for CategoryForm"""
class Meta:
model = Category
fields = '__all__'
class BookForm(forms... | from django.contrib.auth.models import User
from django import forms
from apps.categories.models import *
from apps.books.models import *
class LoginForm(forms.ModelForm):
"""docstring for LoginForm"""
class Meta:
model = User
fields = ['username', 'password']
class CategoryForm(forms.ModelFo... | <commit_before>from django.contrib.auth.models import User
from django import forms
from apps.categories.models import *
from apps.books.models import *
class LoginForm(forms.ModelForm):
"""docstring for LoginForm"""
class Meta:
model = User
fields = ['username', 'password']
class CategoryFor... |
0d33acf31254714b3a9f76d3fe97c77e7270c110 | tests/_utils.py | tests/_utils.py | """Utilities for tests.
"""
import codecs
import codecs
import os
import re
def strip_ansi(string):
"""Strip ANSI encoding from given string.
Parameters
----------
string : str
String from which encoding needs to be removed
Returns
-------
str
Encoding free string... | """Utilities for tests.
"""
import errno
import codecs
import os
import re
def strip_ansi(string):
"""Strip ANSI encoding from given string.
Parameters
----------
string : str
String from which encoding needs to be removed
Returns
-------
str
Encoding free string
... | Test Utils: Cleans up the code | Test Utils: Cleans up the code
| Python | mit | manrajgrover/halo,ManrajGrover/halo | """Utilities for tests.
"""
import codecs
import codecs
import os
import re
def strip_ansi(string):
"""Strip ANSI encoding from given string.
Parameters
----------
string : str
String from which encoding needs to be removed
Returns
-------
str
Encoding free string... | """Utilities for tests.
"""
import errno
import codecs
import os
import re
def strip_ansi(string):
"""Strip ANSI encoding from given string.
Parameters
----------
string : str
String from which encoding needs to be removed
Returns
-------
str
Encoding free string
... | <commit_before>"""Utilities for tests.
"""
import codecs
import codecs
import os
import re
def strip_ansi(string):
"""Strip ANSI encoding from given string.
Parameters
----------
string : str
String from which encoding needs to be removed
Returns
-------
str
Encod... | """Utilities for tests.
"""
import errno
import codecs
import os
import re
def strip_ansi(string):
"""Strip ANSI encoding from given string.
Parameters
----------
string : str
String from which encoding needs to be removed
Returns
-------
str
Encoding free string
... | """Utilities for tests.
"""
import codecs
import codecs
import os
import re
def strip_ansi(string):
"""Strip ANSI encoding from given string.
Parameters
----------
string : str
String from which encoding needs to be removed
Returns
-------
str
Encoding free string... | <commit_before>"""Utilities for tests.
"""
import codecs
import codecs
import os
import re
def strip_ansi(string):
"""Strip ANSI encoding from given string.
Parameters
----------
string : str
String from which encoding needs to be removed
Returns
-------
str
Encod... |
6f464e422befe22e56bb759a7ac7ff52a353c6d9 | accountant/functional_tests/test_layout_and_styling.py | accountant/functional_tests/test_layout_and_styling.py | # -*- coding: utf-8 -*-
import unittest
from .base import FunctionalTestCase
from .pages import game
class StylesheetTests(FunctionalTestCase):
def test_color_css_loaded(self):
self.story('Create a game')
self.browser.get(self.live_server_url)
page = game.Homepage(self.browser)
page... | # -*- coding: utf-8 -*-
import unittest
from .base import FunctionalTestCase
from .pages import game
class StylesheetTests(FunctionalTestCase):
def test_color_css_loaded(self):
self.story('Create a game')
self.browser.get(self.live_server_url)
page = game.Homepage(self.browser)
page... | Test is loaded CSS is applied | Test is loaded CSS is applied
| Python | mit | XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant | # -*- coding: utf-8 -*-
import unittest
from .base import FunctionalTestCase
from .pages import game
class StylesheetTests(FunctionalTestCase):
def test_color_css_loaded(self):
self.story('Create a game')
self.browser.get(self.live_server_url)
page = game.Homepage(self.browser)
page... | # -*- coding: utf-8 -*-
import unittest
from .base import FunctionalTestCase
from .pages import game
class StylesheetTests(FunctionalTestCase):
def test_color_css_loaded(self):
self.story('Create a game')
self.browser.get(self.live_server_url)
page = game.Homepage(self.browser)
page... | <commit_before># -*- coding: utf-8 -*-
import unittest
from .base import FunctionalTestCase
from .pages import game
class StylesheetTests(FunctionalTestCase):
def test_color_css_loaded(self):
self.story('Create a game')
self.browser.get(self.live_server_url)
page = game.Homepage(self.browse... | # -*- coding: utf-8 -*-
import unittest
from .base import FunctionalTestCase
from .pages import game
class StylesheetTests(FunctionalTestCase):
def test_color_css_loaded(self):
self.story('Create a game')
self.browser.get(self.live_server_url)
page = game.Homepage(self.browser)
page... | # -*- coding: utf-8 -*-
import unittest
from .base import FunctionalTestCase
from .pages import game
class StylesheetTests(FunctionalTestCase):
def test_color_css_loaded(self):
self.story('Create a game')
self.browser.get(self.live_server_url)
page = game.Homepage(self.browser)
page... | <commit_before># -*- coding: utf-8 -*-
import unittest
from .base import FunctionalTestCase
from .pages import game
class StylesheetTests(FunctionalTestCase):
def test_color_css_loaded(self):
self.story('Create a game')
self.browser.get(self.live_server_url)
page = game.Homepage(self.browse... |
517f53dc91164f4249de9dbaf31be65df02ffde7 | numpy/fft/setup.py | numpy/fft/setup.py |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('fft', parent_package, top_path)
config.add_data_dir('tests')
# Configure pocketfft_internal
config.add_extension('_pocketfft_internal',
sources=... | import sys
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('fft', parent_package, top_path)
config.add_data_dir('tests')
# AIX needs to be told to use large file support - at all times
defs = [('_LARGE_FILES', None)] i... | Add _LARGE_FILES to def_macros[] when platform is AIX (gh-15938) | BUG: Add _LARGE_FILES to def_macros[] when platform is AIX (gh-15938)
AIX needs to be told to use large file support at all times. Fixes parts of gh-15801. | Python | bsd-3-clause | mhvk/numpy,pbrod/numpy,mattip/numpy,anntzer/numpy,numpy/numpy,numpy/numpy,pbrod/numpy,rgommers/numpy,numpy/numpy,endolith/numpy,abalkin/numpy,pdebuyl/numpy,grlee77/numpy,mattip/numpy,grlee77/numpy,pdebuyl/numpy,charris/numpy,charris/numpy,seberg/numpy,pbrod/numpy,grlee77/numpy,anntzer/numpy,jakirkham/numpy,seberg/numpy... |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('fft', parent_package, top_path)
config.add_data_dir('tests')
# Configure pocketfft_internal
config.add_extension('_pocketfft_internal',
sources=... | import sys
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('fft', parent_package, top_path)
config.add_data_dir('tests')
# AIX needs to be told to use large file support - at all times
defs = [('_LARGE_FILES', None)] i... | <commit_before>
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('fft', parent_package, top_path)
config.add_data_dir('tests')
# Configure pocketfft_internal
config.add_extension('_pocketfft_internal',
... | import sys
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('fft', parent_package, top_path)
config.add_data_dir('tests')
# AIX needs to be told to use large file support - at all times
defs = [('_LARGE_FILES', None)] i... |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('fft', parent_package, top_path)
config.add_data_dir('tests')
# Configure pocketfft_internal
config.add_extension('_pocketfft_internal',
sources=... | <commit_before>
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('fft', parent_package, top_path)
config.add_data_dir('tests')
# Configure pocketfft_internal
config.add_extension('_pocketfft_internal',
... |
8a522bc92bbf5bee8bc32a0cc332dc77fa86fcd6 | drcontroller/http_server.py | drcontroller/http_server.py | import eventlet
import os
import commands
from eventlet import wsgi
from paste.deploy import loadapp
def main():
conf = "conf/api-paste.ini"
appname = "main"
commands.getoutput('mkdir -p ../logs')
app = loadapp("config:%s" % os.path.abspath(conf), appname)
wsgi.server(eventlet.listen(('', 80)), a... | import eventlet
import os
import commands
from eventlet import wsgi
from paste.deploy import loadapp
# Monkey patch socket, time, select, threads
eventlet.patcher.monkey_patch(all=False, socket=True, time=True,
select=True, thread=True, os=True)
def main():
conf = "conf/api-paste.i... | Update http server to un-blocking | Update http server to un-blocking
| Python | apache-2.0 | fs714/drcontroller | import eventlet
import os
import commands
from eventlet import wsgi
from paste.deploy import loadapp
def main():
conf = "conf/api-paste.ini"
appname = "main"
commands.getoutput('mkdir -p ../logs')
app = loadapp("config:%s" % os.path.abspath(conf), appname)
wsgi.server(eventlet.listen(('', 80)), a... | import eventlet
import os
import commands
from eventlet import wsgi
from paste.deploy import loadapp
# Monkey patch socket, time, select, threads
eventlet.patcher.monkey_patch(all=False, socket=True, time=True,
select=True, thread=True, os=True)
def main():
conf = "conf/api-paste.i... | <commit_before>import eventlet
import os
import commands
from eventlet import wsgi
from paste.deploy import loadapp
def main():
conf = "conf/api-paste.ini"
appname = "main"
commands.getoutput('mkdir -p ../logs')
app = loadapp("config:%s" % os.path.abspath(conf), appname)
wsgi.server(eventlet.list... | import eventlet
import os
import commands
from eventlet import wsgi
from paste.deploy import loadapp
# Monkey patch socket, time, select, threads
eventlet.patcher.monkey_patch(all=False, socket=True, time=True,
select=True, thread=True, os=True)
def main():
conf = "conf/api-paste.i... | import eventlet
import os
import commands
from eventlet import wsgi
from paste.deploy import loadapp
def main():
conf = "conf/api-paste.ini"
appname = "main"
commands.getoutput('mkdir -p ../logs')
app = loadapp("config:%s" % os.path.abspath(conf), appname)
wsgi.server(eventlet.listen(('', 80)), a... | <commit_before>import eventlet
import os
import commands
from eventlet import wsgi
from paste.deploy import loadapp
def main():
conf = "conf/api-paste.ini"
appname = "main"
commands.getoutput('mkdir -p ../logs')
app = loadapp("config:%s" % os.path.abspath(conf), appname)
wsgi.server(eventlet.list... |
9bc9b2ea4a53e27b4d9f5f55e2c36fe483ab2de5 | pylancard/trainer.py | pylancard/trainer.py | import logging
import random
DIRECT = 'direct'
REVERSE = 'reverse'
LOG = logging.getLogger(__name__)
class Trainer:
def __init__(self, store, kind=DIRECT):
self.store = store
if kind == DIRECT:
self._words = list(store.direct_index.items())
self._plugin = store.meaning_p... | import logging
import random
DIRECT = 'direct'
REVERSE = 'reverse'
LOG = logging.getLogger(__name__)
class Trainer:
def __init__(self, store, kind=DIRECT):
self.store = store
if kind == DIRECT:
self._words = list(store.direct_index.items())
self._plugin = store.meaning_p... | Initialize random sequence of words when starting training, so that words do not repeat | Initialize random sequence of words when starting training, so that words do not repeat
| Python | bsd-2-clause | dtantsur/pylancard | import logging
import random
DIRECT = 'direct'
REVERSE = 'reverse'
LOG = logging.getLogger(__name__)
class Trainer:
def __init__(self, store, kind=DIRECT):
self.store = store
if kind == DIRECT:
self._words = list(store.direct_index.items())
self._plugin = store.meaning_p... | import logging
import random
DIRECT = 'direct'
REVERSE = 'reverse'
LOG = logging.getLogger(__name__)
class Trainer:
def __init__(self, store, kind=DIRECT):
self.store = store
if kind == DIRECT:
self._words = list(store.direct_index.items())
self._plugin = store.meaning_p... | <commit_before>import logging
import random
DIRECT = 'direct'
REVERSE = 'reverse'
LOG = logging.getLogger(__name__)
class Trainer:
def __init__(self, store, kind=DIRECT):
self.store = store
if kind == DIRECT:
self._words = list(store.direct_index.items())
self._plugin = ... | import logging
import random
DIRECT = 'direct'
REVERSE = 'reverse'
LOG = logging.getLogger(__name__)
class Trainer:
def __init__(self, store, kind=DIRECT):
self.store = store
if kind == DIRECT:
self._words = list(store.direct_index.items())
self._plugin = store.meaning_p... | import logging
import random
DIRECT = 'direct'
REVERSE = 'reverse'
LOG = logging.getLogger(__name__)
class Trainer:
def __init__(self, store, kind=DIRECT):
self.store = store
if kind == DIRECT:
self._words = list(store.direct_index.items())
self._plugin = store.meaning_p... | <commit_before>import logging
import random
DIRECT = 'direct'
REVERSE = 'reverse'
LOG = logging.getLogger(__name__)
class Trainer:
def __init__(self, store, kind=DIRECT):
self.store = store
if kind == DIRECT:
self._words = list(store.direct_index.items())
self._plugin = ... |
620bf504292583b2547cf7489eeeaaa582ddad77 | indra/tests/test_ctd.py | indra/tests/test_ctd.py | import os
from indra.statements import *
from indra.sources import ctd
from indra.sources.ctd.processor import CTDChemicalGeneProcessor
HERE = os.path.dirname(os.path.abspath(__file__))
def test_statement_type_mapping():
st = CTDChemicalGeneProcessor.get_statement_types(
'decreases^phosphorylation', 'X',... | import os
from indra.statements import *
from indra.sources import ctd
from indra.sources.ctd.processor import CTDChemicalGeneProcessor
HERE = os.path.dirname(os.path.abspath(__file__))
def test_statement_type_mapping():
st = CTDChemicalGeneProcessor.get_statement_types(
'decreases^phosphorylation', 'X',... | Fix and extend test conditions | Fix and extend test conditions
| Python | bsd-2-clause | sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,bgyori/indra,bgyori/indra,sorgerlab/belpy | import os
from indra.statements import *
from indra.sources import ctd
from indra.sources.ctd.processor import CTDChemicalGeneProcessor
HERE = os.path.dirname(os.path.abspath(__file__))
def test_statement_type_mapping():
st = CTDChemicalGeneProcessor.get_statement_types(
'decreases^phosphorylation', 'X',... | import os
from indra.statements import *
from indra.sources import ctd
from indra.sources.ctd.processor import CTDChemicalGeneProcessor
HERE = os.path.dirname(os.path.abspath(__file__))
def test_statement_type_mapping():
st = CTDChemicalGeneProcessor.get_statement_types(
'decreases^phosphorylation', 'X',... | <commit_before>import os
from indra.statements import *
from indra.sources import ctd
from indra.sources.ctd.processor import CTDChemicalGeneProcessor
HERE = os.path.dirname(os.path.abspath(__file__))
def test_statement_type_mapping():
st = CTDChemicalGeneProcessor.get_statement_types(
'decreases^phospho... | import os
from indra.statements import *
from indra.sources import ctd
from indra.sources.ctd.processor import CTDChemicalGeneProcessor
HERE = os.path.dirname(os.path.abspath(__file__))
def test_statement_type_mapping():
st = CTDChemicalGeneProcessor.get_statement_types(
'decreases^phosphorylation', 'X',... | import os
from indra.statements import *
from indra.sources import ctd
from indra.sources.ctd.processor import CTDChemicalGeneProcessor
HERE = os.path.dirname(os.path.abspath(__file__))
def test_statement_type_mapping():
st = CTDChemicalGeneProcessor.get_statement_types(
'decreases^phosphorylation', 'X',... | <commit_before>import os
from indra.statements import *
from indra.sources import ctd
from indra.sources.ctd.processor import CTDChemicalGeneProcessor
HERE = os.path.dirname(os.path.abspath(__file__))
def test_statement_type_mapping():
st = CTDChemicalGeneProcessor.get_statement_types(
'decreases^phospho... |
0e2270415b287cb643cff5023dcaacbcb2d5e3fc | translators/google.py | translators/google.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import requests
def save_google_translation(queue, source_text, client_id, client_secret, translate_from='et', translate_to='en'):
translation = ''
try:
begin = time.time()
translation = google_translation(source_text,
... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import requests
import json
def save_google_translation(queue, source_text, translate_from='et', translate_to='en'):
translation = ''
try:
begin = time.time()
translation = google_translation(source_text,
... | Fix Google Translator request & processing | Fix Google Translator request & processing
| Python | mit | ChameleonTartu/neurotolge,ChameleonTartu/neurotolge,ChameleonTartu/neurotolge | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import requests
def save_google_translation(queue, source_text, client_id, client_secret, translate_from='et', translate_to='en'):
translation = ''
try:
begin = time.time()
translation = google_translation(source_text,
... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import requests
import json
def save_google_translation(queue, source_text, translate_from='et', translate_to='en'):
translation = ''
try:
begin = time.time()
translation = google_translation(source_text,
... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import requests
def save_google_translation(queue, source_text, client_id, client_secret, translate_from='et', translate_to='en'):
translation = ''
try:
begin = time.time()
translation = google_translation(source_text,
... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import requests
import json
def save_google_translation(queue, source_text, translate_from='et', translate_to='en'):
translation = ''
try:
begin = time.time()
translation = google_translation(source_text,
... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import requests
def save_google_translation(queue, source_text, client_id, client_secret, translate_from='et', translate_to='en'):
translation = ''
try:
begin = time.time()
translation = google_translation(source_text,
... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import requests
def save_google_translation(queue, source_text, client_id, client_secret, translate_from='et', translate_to='en'):
translation = ''
try:
begin = time.time()
translation = google_translation(source_text,
... |
0f018ec9bfd0c93d980b232af325be453c065632 | qsimcirq/_version.py | qsimcirq/_version.py | """The version number defined here is read automatically in setup.py."""
__version__ = "0.14.0"
| """The version number defined here is read automatically in setup.py."""
__version__ = "0.14.1.dev20220804"
| Update to dev version 0.14.1+dev20220804 | Update to dev version 0.14.1+dev20220804 | Python | apache-2.0 | quantumlib/qsim,quantumlib/qsim,quantumlib/qsim,quantumlib/qsim | """The version number defined here is read automatically in setup.py."""
__version__ = "0.14.0"
Update to dev version 0.14.1+dev20220804 | """The version number defined here is read automatically in setup.py."""
__version__ = "0.14.1.dev20220804"
| <commit_before>"""The version number defined here is read automatically in setup.py."""
__version__ = "0.14.0"
<commit_msg>Update to dev version 0.14.1+dev20220804<commit_after> | """The version number defined here is read automatically in setup.py."""
__version__ = "0.14.1.dev20220804"
| """The version number defined here is read automatically in setup.py."""
__version__ = "0.14.0"
Update to dev version 0.14.1+dev20220804"""The version number defined here is read automatically in setup.py."""
__version__ = "0.14.1.dev20220804"
| <commit_before>"""The version number defined here is read automatically in setup.py."""
__version__ = "0.14.0"
<commit_msg>Update to dev version 0.14.1+dev20220804<commit_after>"""The version number defined here is read automatically in setup.py."""
__version__ = "0.14.1.dev20220804"
|
0a2dc53cd388f73064bb66e794e3af5f3e48a92f | bot/setup.py | bot/setup.py | from setuptools import setup, find_packages
PACKAGE_NAME = "ReviewBot"
VERSION = "0.1"
setup(name=PACKAGE_NAME,
version=VERSION,
description="ReviewBot, the automated code reviewer",
author="Steven MacLeod",
author_email="[email protected]",
packages=find_packages(),
entry_points... | from setuptools import setup, find_packages
PACKAGE_NAME = "ReviewBot"
VERSION = "0.1"
setup(name=PACKAGE_NAME,
version=VERSION,
description="ReviewBot, the automated code reviewer",
author="Steven MacLeod",
author_email="[email protected]",
packages=find_packages(),
entry_points... | Update the required version of Celery | Update the required version of Celery
| Python | mit | reviewboard/ReviewBot,reviewboard/ReviewBot,reviewboard/ReviewBot,reviewboard/ReviewBot | from setuptools import setup, find_packages
PACKAGE_NAME = "ReviewBot"
VERSION = "0.1"
setup(name=PACKAGE_NAME,
version=VERSION,
description="ReviewBot, the automated code reviewer",
author="Steven MacLeod",
author_email="[email protected]",
packages=find_packages(),
entry_points... | from setuptools import setup, find_packages
PACKAGE_NAME = "ReviewBot"
VERSION = "0.1"
setup(name=PACKAGE_NAME,
version=VERSION,
description="ReviewBot, the automated code reviewer",
author="Steven MacLeod",
author_email="[email protected]",
packages=find_packages(),
entry_points... | <commit_before>from setuptools import setup, find_packages
PACKAGE_NAME = "ReviewBot"
VERSION = "0.1"
setup(name=PACKAGE_NAME,
version=VERSION,
description="ReviewBot, the automated code reviewer",
author="Steven MacLeod",
author_email="[email protected]",
packages=find_packages(),
... | from setuptools import setup, find_packages
PACKAGE_NAME = "ReviewBot"
VERSION = "0.1"
setup(name=PACKAGE_NAME,
version=VERSION,
description="ReviewBot, the automated code reviewer",
author="Steven MacLeod",
author_email="[email protected]",
packages=find_packages(),
entry_points... | from setuptools import setup, find_packages
PACKAGE_NAME = "ReviewBot"
VERSION = "0.1"
setup(name=PACKAGE_NAME,
version=VERSION,
description="ReviewBot, the automated code reviewer",
author="Steven MacLeod",
author_email="[email protected]",
packages=find_packages(),
entry_points... | <commit_before>from setuptools import setup, find_packages
PACKAGE_NAME = "ReviewBot"
VERSION = "0.1"
setup(name=PACKAGE_NAME,
version=VERSION,
description="ReviewBot, the automated code reviewer",
author="Steven MacLeod",
author_email="[email protected]",
packages=find_packages(),
... |
1c86e9164d9df9cbb75b520b9700a5621a1116f9 | bqx/_func.py | bqx/_func.py | from .parts import Column
def BETWEEN(expr1, expr2, expr3):
return Column('%s BETWEEN %s AND %s' % (_actual_n(expr1), _actual_n(expr2), _actual_n(expr3)))
def CAST(type1, type2):
return Column('CAST(%s AS %s)' % (type1, type2))
def CONCAT(*args):
arg = [_actual_n(a) for a in args]
arg = ', '.join(... | from .parts import Column
def BETWEEN(expr1, expr2, expr3):
return Column('%s BETWEEN %s AND %s' % (_actual_n(expr1), _actual_n(expr2), _actual_n(expr3)))
def CAST(type1, type2):
return Column('CAST(%s AS %s)' % (type1, type2))
def CONCAT(*args):
arg = [_actual_n(a) for a in args]
arg = ', '.join(... | Fix columns not to be converted into str | Fix columns not to be converted into str
| Python | bsd-3-clause | fuller-inc/bqx | from .parts import Column
def BETWEEN(expr1, expr2, expr3):
return Column('%s BETWEEN %s AND %s' % (_actual_n(expr1), _actual_n(expr2), _actual_n(expr3)))
def CAST(type1, type2):
return Column('CAST(%s AS %s)' % (type1, type2))
def CONCAT(*args):
arg = [_actual_n(a) for a in args]
arg = ', '.join(... | from .parts import Column
def BETWEEN(expr1, expr2, expr3):
return Column('%s BETWEEN %s AND %s' % (_actual_n(expr1), _actual_n(expr2), _actual_n(expr3)))
def CAST(type1, type2):
return Column('CAST(%s AS %s)' % (type1, type2))
def CONCAT(*args):
arg = [_actual_n(a) for a in args]
arg = ', '.join(... | <commit_before>from .parts import Column
def BETWEEN(expr1, expr2, expr3):
return Column('%s BETWEEN %s AND %s' % (_actual_n(expr1), _actual_n(expr2), _actual_n(expr3)))
def CAST(type1, type2):
return Column('CAST(%s AS %s)' % (type1, type2))
def CONCAT(*args):
arg = [_actual_n(a) for a in args]
a... | from .parts import Column
def BETWEEN(expr1, expr2, expr3):
return Column('%s BETWEEN %s AND %s' % (_actual_n(expr1), _actual_n(expr2), _actual_n(expr3)))
def CAST(type1, type2):
return Column('CAST(%s AS %s)' % (type1, type2))
def CONCAT(*args):
arg = [_actual_n(a) for a in args]
arg = ', '.join(... | from .parts import Column
def BETWEEN(expr1, expr2, expr3):
return Column('%s BETWEEN %s AND %s' % (_actual_n(expr1), _actual_n(expr2), _actual_n(expr3)))
def CAST(type1, type2):
return Column('CAST(%s AS %s)' % (type1, type2))
def CONCAT(*args):
arg = [_actual_n(a) for a in args]
arg = ', '.join(... | <commit_before>from .parts import Column
def BETWEEN(expr1, expr2, expr3):
return Column('%s BETWEEN %s AND %s' % (_actual_n(expr1), _actual_n(expr2), _actual_n(expr3)))
def CAST(type1, type2):
return Column('CAST(%s AS %s)' % (type1, type2))
def CONCAT(*args):
arg = [_actual_n(a) for a in args]
a... |
4e8dc0ca41ee1e21a75a3e803c3b2b223d9f14cb | users/managers.py | users/managers.py | from django.utils import timezone
from django.contrib.auth.models import BaseUserManager
from model_utils.managers import InheritanceQuerySet
from .conf import settings
class UserManager(BaseUserManager):
def _create_user(self, email, password,
is_staff, is_superuser, **extra_fields):
... | from django.utils import timezone
from django.contrib.auth.models import BaseUserManager
from model_utils.managers import InheritanceQuerySet
from .conf import settings
class UserManager(BaseUserManager):
def _create_user(self, email, password,
is_staff, is_superuser, **extra_fields):
... | Fix issue with create_superuser method on UserManager | Fix issue with create_superuser method on UserManager
| Python | bsd-3-clause | mishbahr/django-users2,mishbahr/django-users2 | from django.utils import timezone
from django.contrib.auth.models import BaseUserManager
from model_utils.managers import InheritanceQuerySet
from .conf import settings
class UserManager(BaseUserManager):
def _create_user(self, email, password,
is_staff, is_superuser, **extra_fields):
... | from django.utils import timezone
from django.contrib.auth.models import BaseUserManager
from model_utils.managers import InheritanceQuerySet
from .conf import settings
class UserManager(BaseUserManager):
def _create_user(self, email, password,
is_staff, is_superuser, **extra_fields):
... | <commit_before>from django.utils import timezone
from django.contrib.auth.models import BaseUserManager
from model_utils.managers import InheritanceQuerySet
from .conf import settings
class UserManager(BaseUserManager):
def _create_user(self, email, password,
is_staff, is_superuser, **extr... | from django.utils import timezone
from django.contrib.auth.models import BaseUserManager
from model_utils.managers import InheritanceQuerySet
from .conf import settings
class UserManager(BaseUserManager):
def _create_user(self, email, password,
is_staff, is_superuser, **extra_fields):
... | from django.utils import timezone
from django.contrib.auth.models import BaseUserManager
from model_utils.managers import InheritanceQuerySet
from .conf import settings
class UserManager(BaseUserManager):
def _create_user(self, email, password,
is_staff, is_superuser, **extra_fields):
... | <commit_before>from django.utils import timezone
from django.contrib.auth.models import BaseUserManager
from model_utils.managers import InheritanceQuerySet
from .conf import settings
class UserManager(BaseUserManager):
def _create_user(self, email, password,
is_staff, is_superuser, **extr... |
818e15028c4dd158fa93fe4bcd351255585c2f4f | src/model/predict_rf_model.py | src/model/predict_rf_model.py | import numpy as np
import pandas as pd
import sys
import os
from sklearn.externals import joblib
from sklearn.ensemble import RandomForestClassifier
scriptpath = os.path.dirname(os.path.realpath(sys.argv[0])) + '/../'
sys.path.append(os.path.abspath(scriptpath))
import utils
parameter_str = '_'.join(['top', str(utils... | import numpy as np
import pandas as pd
import sys
import os
from sklearn.externals import joblib
from sklearn.ensemble import RandomForestClassifier
scriptpath = os.path.dirname(os.path.realpath(sys.argv[0])) + '/../'
sys.path.append(os.path.abspath(scriptpath))
import utils
parameter_str = '_'.join(['top', str(utils... | Handle missing value in predit rf | Handle missing value in predit rf
| Python | bsd-3-clause | parkerzf/kaggle-expedia,parkerzf/kaggle-expedia,parkerzf/kaggle-expedia | import numpy as np
import pandas as pd
import sys
import os
from sklearn.externals import joblib
from sklearn.ensemble import RandomForestClassifier
scriptpath = os.path.dirname(os.path.realpath(sys.argv[0])) + '/../'
sys.path.append(os.path.abspath(scriptpath))
import utils
parameter_str = '_'.join(['top', str(utils... | import numpy as np
import pandas as pd
import sys
import os
from sklearn.externals import joblib
from sklearn.ensemble import RandomForestClassifier
scriptpath = os.path.dirname(os.path.realpath(sys.argv[0])) + '/../'
sys.path.append(os.path.abspath(scriptpath))
import utils
parameter_str = '_'.join(['top', str(utils... | <commit_before>import numpy as np
import pandas as pd
import sys
import os
from sklearn.externals import joblib
from sklearn.ensemble import RandomForestClassifier
scriptpath = os.path.dirname(os.path.realpath(sys.argv[0])) + '/../'
sys.path.append(os.path.abspath(scriptpath))
import utils
parameter_str = '_'.join(['... | import numpy as np
import pandas as pd
import sys
import os
from sklearn.externals import joblib
from sklearn.ensemble import RandomForestClassifier
scriptpath = os.path.dirname(os.path.realpath(sys.argv[0])) + '/../'
sys.path.append(os.path.abspath(scriptpath))
import utils
parameter_str = '_'.join(['top', str(utils... | import numpy as np
import pandas as pd
import sys
import os
from sklearn.externals import joblib
from sklearn.ensemble import RandomForestClassifier
scriptpath = os.path.dirname(os.path.realpath(sys.argv[0])) + '/../'
sys.path.append(os.path.abspath(scriptpath))
import utils
parameter_str = '_'.join(['top', str(utils... | <commit_before>import numpy as np
import pandas as pd
import sys
import os
from sklearn.externals import joblib
from sklearn.ensemble import RandomForestClassifier
scriptpath = os.path.dirname(os.path.realpath(sys.argv[0])) + '/../'
sys.path.append(os.path.abspath(scriptpath))
import utils
parameter_str = '_'.join(['... |
a9fb1bb437e27f0bcd5a382e82f100722d9f0688 | data_structures/circular_buffer.py | data_structures/circular_buffer.py | from .transition import Transition
class CircularBuffer(object):
def __init__(self, capacity=100000):
self.capacity = capacity
self.memory = []
self.position = 0
def push(self, *args):
if len(self.memory) < self.capacity:
self.memory.append(Transition(*args))
... | from .transition import Transition
class CircularBuffer(object):
def __init__(self, capacity=100000):
self.capacity = capacity
self.memory = []
self.position = 0
def push(self, *args):
if len(self.memory) < self.capacity:
self.memory.append(Transition(*args))
... | Fix index. Caught by Tudor. | Fix index. Caught by Tudor.
| Python | mit | floringogianu/categorical-dqn | from .transition import Transition
class CircularBuffer(object):
def __init__(self, capacity=100000):
self.capacity = capacity
self.memory = []
self.position = 0
def push(self, *args):
if len(self.memory) < self.capacity:
self.memory.append(Transition(*args))
... | from .transition import Transition
class CircularBuffer(object):
def __init__(self, capacity=100000):
self.capacity = capacity
self.memory = []
self.position = 0
def push(self, *args):
if len(self.memory) < self.capacity:
self.memory.append(Transition(*args))
... | <commit_before>from .transition import Transition
class CircularBuffer(object):
def __init__(self, capacity=100000):
self.capacity = capacity
self.memory = []
self.position = 0
def push(self, *args):
if len(self.memory) < self.capacity:
self.memory.append(Transitio... | from .transition import Transition
class CircularBuffer(object):
def __init__(self, capacity=100000):
self.capacity = capacity
self.memory = []
self.position = 0
def push(self, *args):
if len(self.memory) < self.capacity:
self.memory.append(Transition(*args))
... | from .transition import Transition
class CircularBuffer(object):
def __init__(self, capacity=100000):
self.capacity = capacity
self.memory = []
self.position = 0
def push(self, *args):
if len(self.memory) < self.capacity:
self.memory.append(Transition(*args))
... | <commit_before>from .transition import Transition
class CircularBuffer(object):
def __init__(self, capacity=100000):
self.capacity = capacity
self.memory = []
self.position = 0
def push(self, *args):
if len(self.memory) < self.capacity:
self.memory.append(Transitio... |
7cda2fe25dd65b3120f177d331088ce7733d1c6c | server.py | server.py | from japronto import Application
from services.articles import ArticleService
from mongoengine import *
article_service = ArticleService()
def index(req):
"""
The main index
"""
return req.Response(text='You reached the index!')
def articles(req):
"""
Get alll articles
"""
docs = article_service.all()
ret... | from japronto import Application
from services.articles import ArticleService
from mongoengine import *
article_service = ArticleService()
def index(req):
"""
The main index
"""
return req.Response(text='You reached the index!')
def articles(req):
"""
Get alll articles
"""
docs = article_service.all()
ret... | Increase request buffer as workaround for stackoverflow in asyncio | Increase request buffer as workaround for stackoverflow in asyncio
| Python | mit | azzuwan/PyApiServerExample | from japronto import Application
from services.articles import ArticleService
from mongoengine import *
article_service = ArticleService()
def index(req):
"""
The main index
"""
return req.Response(text='You reached the index!')
def articles(req):
"""
Get alll articles
"""
docs = article_service.all()
ret... | from japronto import Application
from services.articles import ArticleService
from mongoengine import *
article_service = ArticleService()
def index(req):
"""
The main index
"""
return req.Response(text='You reached the index!')
def articles(req):
"""
Get alll articles
"""
docs = article_service.all()
ret... | <commit_before>from japronto import Application
from services.articles import ArticleService
from mongoengine import *
article_service = ArticleService()
def index(req):
"""
The main index
"""
return req.Response(text='You reached the index!')
def articles(req):
"""
Get alll articles
"""
docs = article_serv... | from japronto import Application
from services.articles import ArticleService
from mongoengine import *
article_service = ArticleService()
def index(req):
"""
The main index
"""
return req.Response(text='You reached the index!')
def articles(req):
"""
Get alll articles
"""
docs = article_service.all()
ret... | from japronto import Application
from services.articles import ArticleService
from mongoengine import *
article_service = ArticleService()
def index(req):
"""
The main index
"""
return req.Response(text='You reached the index!')
def articles(req):
"""
Get alll articles
"""
docs = article_service.all()
ret... | <commit_before>from japronto import Application
from services.articles import ArticleService
from mongoengine import *
article_service = ArticleService()
def index(req):
"""
The main index
"""
return req.Response(text='You reached the index!')
def articles(req):
"""
Get alll articles
"""
docs = article_serv... |
8cc8f9a1535a2361c27e9411f9163ecd2a9958d5 | utils/__init__.py | utils/__init__.py |
import pymongo
connection = pymongo.MongoClient("mongodb://localhost")
db = connection.vcf_explorer
import database
import parse_vcf
import filter_vcf
import query
|
import pymongo
import config #config.py
connection = pymongo.MongoClient(host=config.MONGODB_HOST, port=config.MONGODB_PORT)
db = connection[config.MONGODB_NAME]
import database
import parse_vcf
import filter_vcf
import query
| Set mongodb settings using config.py | Set mongodb settings using config.py
| Python | mit | CuppenResearch/vcf-explorer,CuppenResearch/vcf-explorer,CuppenResearch/vcf-explorer,CuppenResearch/vcf-explorer |
import pymongo
connection = pymongo.MongoClient("mongodb://localhost")
db = connection.vcf_explorer
import database
import parse_vcf
import filter_vcf
import query
Set mongodb settings using config.py |
import pymongo
import config #config.py
connection = pymongo.MongoClient(host=config.MONGODB_HOST, port=config.MONGODB_PORT)
db = connection[config.MONGODB_NAME]
import database
import parse_vcf
import filter_vcf
import query
| <commit_before>
import pymongo
connection = pymongo.MongoClient("mongodb://localhost")
db = connection.vcf_explorer
import database
import parse_vcf
import filter_vcf
import query
<commit_msg>Set mongodb settings using config.py<commit_after> |
import pymongo
import config #config.py
connection = pymongo.MongoClient(host=config.MONGODB_HOST, port=config.MONGODB_PORT)
db = connection[config.MONGODB_NAME]
import database
import parse_vcf
import filter_vcf
import query
|
import pymongo
connection = pymongo.MongoClient("mongodb://localhost")
db = connection.vcf_explorer
import database
import parse_vcf
import filter_vcf
import query
Set mongodb settings using config.py
import pymongo
import config #config.py
connection = pymongo.MongoClient(host=config.MONGODB_HOST, port=config.MON... | <commit_before>
import pymongo
connection = pymongo.MongoClient("mongodb://localhost")
db = connection.vcf_explorer
import database
import parse_vcf
import filter_vcf
import query
<commit_msg>Set mongodb settings using config.py<commit_after>
import pymongo
import config #config.py
connection = pymongo.MongoClient(... |
2206681a89346970b71ca8d0ed1ff60a861b2ff9 | doc/examples/plot_pyramid.py | doc/examples/plot_pyramid.py | """
====================
Build image pyramids
====================
This example shows how to build image pyramids.
"""
import numpy as np
import matplotlib.pyplot as plt
from skimage import data
from skimage import img_as_float
from skimage.transform import build_gaussian_pyramid
image = data.lena()
rows, cols, di... | """
====================
Build image pyramids
====================
The `build_gauassian_pyramid` function takes an image and yields successive
images shrunk by a constant scale factor. Image pyramids are often used, e.g.,
to implement algorithms for denoising, texture discrimination, and scale-
invariant detection.
""... | Update pyramid example with longer description | Update pyramid example with longer description
| Python | bsd-3-clause | chintak/scikit-image,paalge/scikit-image,keflavich/scikit-image,SamHames/scikit-image,jwiggins/scikit-image,bsipocz/scikit-image,keflavich/scikit-image,rjeli/scikit-image,vighneshbirodkar/scikit-image,SamHames/scikit-image,youprofit/scikit-image,chintak/scikit-image,dpshelio/scikit-image,Midafi/scikit-image,WarrenWecke... | """
====================
Build image pyramids
====================
This example shows how to build image pyramids.
"""
import numpy as np
import matplotlib.pyplot as plt
from skimage import data
from skimage import img_as_float
from skimage.transform import build_gaussian_pyramid
image = data.lena()
rows, cols, di... | """
====================
Build image pyramids
====================
The `build_gauassian_pyramid` function takes an image and yields successive
images shrunk by a constant scale factor. Image pyramids are often used, e.g.,
to implement algorithms for denoising, texture discrimination, and scale-
invariant detection.
""... | <commit_before>"""
====================
Build image pyramids
====================
This example shows how to build image pyramids.
"""
import numpy as np
import matplotlib.pyplot as plt
from skimage import data
from skimage import img_as_float
from skimage.transform import build_gaussian_pyramid
image = data.lena()... | """
====================
Build image pyramids
====================
The `build_gauassian_pyramid` function takes an image and yields successive
images shrunk by a constant scale factor. Image pyramids are often used, e.g.,
to implement algorithms for denoising, texture discrimination, and scale-
invariant detection.
""... | """
====================
Build image pyramids
====================
This example shows how to build image pyramids.
"""
import numpy as np
import matplotlib.pyplot as plt
from skimage import data
from skimage import img_as_float
from skimage.transform import build_gaussian_pyramid
image = data.lena()
rows, cols, di... | <commit_before>"""
====================
Build image pyramids
====================
This example shows how to build image pyramids.
"""
import numpy as np
import matplotlib.pyplot as plt
from skimage import data
from skimage import img_as_float
from skimage.transform import build_gaussian_pyramid
image = data.lena()... |
1454b42049e94db896aab99e2dd1b286ca2d04e3 | convert-bookmarks.py | convert-bookmarks.py | #!/usr/bin/env python
#
# Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json
#
from argparse import ArgumentParser
from bs4 import BeautifulSoup
from datetime import datetime, timezone
import json
parser = ArgumentParser(description='Convert Netscape bookmarks to JSON')
parser.add_argument(dest... | #!/usr/bin/env python
#
# Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json
#
from argparse import ArgumentParser
from bs4 import BeautifulSoup
from datetime import datetime, timezone
import json
parser = ArgumentParser(description='Convert Netscape bookmarks to JSON')
parser.add_argument(dest... | Add options for add date and tags. | Add options for add date and tags.
| Python | mit | jhh/netscape-bookmark-converter | #!/usr/bin/env python
#
# Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json
#
from argparse import ArgumentParser
from bs4 import BeautifulSoup
from datetime import datetime, timezone
import json
parser = ArgumentParser(description='Convert Netscape bookmarks to JSON')
parser.add_argument(dest... | #!/usr/bin/env python
#
# Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json
#
from argparse import ArgumentParser
from bs4 import BeautifulSoup
from datetime import datetime, timezone
import json
parser = ArgumentParser(description='Convert Netscape bookmarks to JSON')
parser.add_argument(dest... | <commit_before>#!/usr/bin/env python
#
# Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json
#
from argparse import ArgumentParser
from bs4 import BeautifulSoup
from datetime import datetime, timezone
import json
parser = ArgumentParser(description='Convert Netscape bookmarks to JSON')
parser.ad... | #!/usr/bin/env python
#
# Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json
#
from argparse import ArgumentParser
from bs4 import BeautifulSoup
from datetime import datetime, timezone
import json
parser = ArgumentParser(description='Convert Netscape bookmarks to JSON')
parser.add_argument(dest... | #!/usr/bin/env python
#
# Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json
#
from argparse import ArgumentParser
from bs4 import BeautifulSoup
from datetime import datetime, timezone
import json
parser = ArgumentParser(description='Convert Netscape bookmarks to JSON')
parser.add_argument(dest... | <commit_before>#!/usr/bin/env python
#
# Convert browser bookmark export (NETSCAPE-Bookmark-file-1 format) to json
#
from argparse import ArgumentParser
from bs4 import BeautifulSoup
from datetime import datetime, timezone
import json
parser = ArgumentParser(description='Convert Netscape bookmarks to JSON')
parser.ad... |
82daed35cb328590e710800672fc3524c226d166 | feder/letters/tests/base.py | feder/letters/tests/base.py | import email
from os.path import dirname, join
from django.utils import six
from django_mailbox.models import Mailbox
from feder.letters.signals import MessageParser
class MessageMixin(object):
def setUp(self):
self.mailbox = Mailbox.objects.create(from_email='[email protected]')
super(MessageMix... | import email
from os.path import dirname, join
from django.utils import six
from django_mailbox.models import Mailbox
from feder.letters.signals import MessageParser
class MessageMixin(object):
def setUp(self):
self.mailbox = Mailbox.objects.create(from_email='[email protected]')
super(MessageMix... | Fix detect Git-LFS in tests | Fix detect Git-LFS in tests
| Python | mit | watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder | import email
from os.path import dirname, join
from django.utils import six
from django_mailbox.models import Mailbox
from feder.letters.signals import MessageParser
class MessageMixin(object):
def setUp(self):
self.mailbox = Mailbox.objects.create(from_email='[email protected]')
super(MessageMix... | import email
from os.path import dirname, join
from django.utils import six
from django_mailbox.models import Mailbox
from feder.letters.signals import MessageParser
class MessageMixin(object):
def setUp(self):
self.mailbox = Mailbox.objects.create(from_email='[email protected]')
super(MessageMix... | <commit_before>import email
from os.path import dirname, join
from django.utils import six
from django_mailbox.models import Mailbox
from feder.letters.signals import MessageParser
class MessageMixin(object):
def setUp(self):
self.mailbox = Mailbox.objects.create(from_email='[email protected]')
s... | import email
from os.path import dirname, join
from django.utils import six
from django_mailbox.models import Mailbox
from feder.letters.signals import MessageParser
class MessageMixin(object):
def setUp(self):
self.mailbox = Mailbox.objects.create(from_email='[email protected]')
super(MessageMix... | import email
from os.path import dirname, join
from django.utils import six
from django_mailbox.models import Mailbox
from feder.letters.signals import MessageParser
class MessageMixin(object):
def setUp(self):
self.mailbox = Mailbox.objects.create(from_email='[email protected]')
super(MessageMix... | <commit_before>import email
from os.path import dirname, join
from django.utils import six
from django_mailbox.models import Mailbox
from feder.letters.signals import MessageParser
class MessageMixin(object):
def setUp(self):
self.mailbox = Mailbox.objects.create(from_email='[email protected]')
s... |
dabb6e7b3855d93df74d690607432e27b5d9c82f | ipython/profile/00_import_sciqnd.py | ipython/profile/00_import_sciqnd.py | import cPickle as pickle
import glob
import json
import math
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
# The following ... | import cPickle as pickle
import glob
import json
import math
import os
import sys
import cv2
import h5py
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
# The... | Add h5py on sciqnd ipython profile | Add h5py on sciqnd ipython profile
| Python | mit | escorciav/linux-utils,escorciav/linux-utils | import cPickle as pickle
import glob
import json
import math
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
# The following ... | import cPickle as pickle
import glob
import json
import math
import os
import sys
import cv2
import h5py
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
# The... | <commit_before>import cPickle as pickle
import glob
import json
import math
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
#... | import cPickle as pickle
import glob
import json
import math
import os
import sys
import cv2
import h5py
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
# The... | import cPickle as pickle
import glob
import json
import math
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
# The following ... | <commit_before>import cPickle as pickle
import glob
import json
import math
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
#... |
6cd7e79fc32ebf75776ab0bcf367854d76dd5e03 | src/redditsubscraper/items.py | src/redditsubscraper/items.py | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import scrapy
class Post(scrapy.Item):
"""
A model representing a single Reddit post.
"""
id = scrapy.Field()
class Comment(scrapy.Item):
"""
A model representing a single Reddit comment
"""
id = scrapy.Field()
parent_id = scrapy.... | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import scrapy
class Post(scrapy.Item):
"""
A model representing a single Reddit post.
"""
"""An id encoded in base-36 without any prefixes."""
id = scrapy.Field()
class Comment(scrapy.Item):
"""
A model representing a single Reddit comme... | Add comments to item fields. | Add comments to item fields.
| Python | mit | rfkrocktk/subreddit-scraper | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import scrapy
class Post(scrapy.Item):
"""
A model representing a single Reddit post.
"""
id = scrapy.Field()
class Comment(scrapy.Item):
"""
A model representing a single Reddit comment
"""
id = scrapy.Field()
parent_id = scrapy.... | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import scrapy
class Post(scrapy.Item):
"""
A model representing a single Reddit post.
"""
"""An id encoded in base-36 without any prefixes."""
id = scrapy.Field()
class Comment(scrapy.Item):
"""
A model representing a single Reddit comme... | <commit_before>#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import scrapy
class Post(scrapy.Item):
"""
A model representing a single Reddit post.
"""
id = scrapy.Field()
class Comment(scrapy.Item):
"""
A model representing a single Reddit comment
"""
id = scrapy.Field()
pare... | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import scrapy
class Post(scrapy.Item):
"""
A model representing a single Reddit post.
"""
"""An id encoded in base-36 without any prefixes."""
id = scrapy.Field()
class Comment(scrapy.Item):
"""
A model representing a single Reddit comme... | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import scrapy
class Post(scrapy.Item):
"""
A model representing a single Reddit post.
"""
id = scrapy.Field()
class Comment(scrapy.Item):
"""
A model representing a single Reddit comment
"""
id = scrapy.Field()
parent_id = scrapy.... | <commit_before>#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import scrapy
class Post(scrapy.Item):
"""
A model representing a single Reddit post.
"""
id = scrapy.Field()
class Comment(scrapy.Item):
"""
A model representing a single Reddit comment
"""
id = scrapy.Field()
pare... |
b590ddd735131faa3fd1bdc91b1866e1bd7b0738 | us_ignite/snippets/management/commands/snippets_load_fixtures.py | us_ignite/snippets/management/commands/snippets_load_fixtures.py | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'Up next:',
'body': '',
'url_text': 'Get involved',
'url': '',
},
]
class Command(BaseCommand):
def handle(self, *args, *... | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'UP NEXT: LOREM IPSUM',
'body': '',
'url_text': 'GET INVOLVED',
'url': '',
},
{
'slug': 'featured',
'name': ... | Add featured homepage initial fixture. | Add featured homepage initial fixture.
| Python | bsd-3-clause | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'Up next:',
'body': '',
'url_text': 'Get involved',
'url': '',
},
]
class Command(BaseCommand):
def handle(self, *args, *... | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'UP NEXT: LOREM IPSUM',
'body': '',
'url_text': 'GET INVOLVED',
'url': '',
},
{
'slug': 'featured',
'name': ... | <commit_before>from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'Up next:',
'body': '',
'url_text': 'Get involved',
'url': '',
},
]
class Command(BaseCommand):
def handle... | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'UP NEXT: LOREM IPSUM',
'body': '',
'url_text': 'GET INVOLVED',
'url': '',
},
{
'slug': 'featured',
'name': ... | from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'Up next:',
'body': '',
'url_text': 'Get involved',
'url': '',
},
]
class Command(BaseCommand):
def handle(self, *args, *... | <commit_before>from django.core.management.base import BaseCommand
from us_ignite.snippets.models import Snippet
FIXTURES = [
{
'slug': 'home-box',
'name': 'Up next:',
'body': '',
'url_text': 'Get involved',
'url': '',
},
]
class Command(BaseCommand):
def handle... |
d37f91f50dd6c0c3202258daca95ee6ee111688f | pyjswidgets/pyjamas/ui/Focus.oldmoz.py | pyjswidgets/pyjamas/ui/Focus.oldmoz.py |
def ensureFocusHandler():
JS("""
return (focusHandler !== null) ? focusHandler : (focusHandler =
@{{createFocusHandler}}());
""")
def createFocusHandler():
JS("""
return function(evt) {
// This function is called directly as an event handler, so 'this' is
// set up by the b... |
def ensureFocusHandler():
JS("""
return (focusHandler !== null) ? focusHandler : (focusHandler =
@{{createFocusHandler}}());
""")
def createFocusHandler():
JS("""
return function(evt) {
// This function is called directly as an event handler, so 'this' is
// set up by the b... | Fix for IE 11 (Focus) | Fix for IE 11 (Focus)
IE presents itself as mozilla, so it trips on the bug.
| Python | apache-2.0 | gpitel/pyjs,spaceone/pyjs,lancezlin/pyjs,spaceone/pyjs,lancezlin/pyjs,pombredanne/pyjs,pyjs/pyjs,Hasimir/pyjs,gpitel/pyjs,pyjs/pyjs,spaceone/pyjs,pyjs/pyjs,Hasimir/pyjs,lancezlin/pyjs,pyjs/pyjs,pombredanne/pyjs,gpitel/pyjs,Hasimir/pyjs,gpitel/pyjs,spaceone/pyjs,pombredanne/pyjs,lancezlin/pyjs,pombredanne/pyjs,Hasimir/p... |
def ensureFocusHandler():
JS("""
return (focusHandler !== null) ? focusHandler : (focusHandler =
@{{createFocusHandler}}());
""")
def createFocusHandler():
JS("""
return function(evt) {
// This function is called directly as an event handler, so 'this' is
// set up by the b... |
def ensureFocusHandler():
JS("""
return (focusHandler !== null) ? focusHandler : (focusHandler =
@{{createFocusHandler}}());
""")
def createFocusHandler():
JS("""
return function(evt) {
// This function is called directly as an event handler, so 'this' is
// set up by the b... | <commit_before>
def ensureFocusHandler():
JS("""
return (focusHandler !== null) ? focusHandler : (focusHandler =
@{{createFocusHandler}}());
""")
def createFocusHandler():
JS("""
return function(evt) {
// This function is called directly as an event handler, so 'this' is
// ... |
def ensureFocusHandler():
JS("""
return (focusHandler !== null) ? focusHandler : (focusHandler =
@{{createFocusHandler}}());
""")
def createFocusHandler():
JS("""
return function(evt) {
// This function is called directly as an event handler, so 'this' is
// set up by the b... |
def ensureFocusHandler():
JS("""
return (focusHandler !== null) ? focusHandler : (focusHandler =
@{{createFocusHandler}}());
""")
def createFocusHandler():
JS("""
return function(evt) {
// This function is called directly as an event handler, so 'this' is
// set up by the b... | <commit_before>
def ensureFocusHandler():
JS("""
return (focusHandler !== null) ? focusHandler : (focusHandler =
@{{createFocusHandler}}());
""")
def createFocusHandler():
JS("""
return function(evt) {
// This function is called directly as an event handler, so 'this' is
// ... |
f7373a4c2adc74fc2ff18a7c441a978b6982df89 | pip/utils/packaging.py | pip/utils/packaging.py | from __future__ import absolute_import
import logging
import sys
from pip._vendor import pkg_resources
from pip._vendor.packaging import specifiers
from pip._vendor.packaging import version
logger = logging.getLogger(__name__)
def get_metadata(dist):
if (isinstance(dist, pkg_resources.DistInfoDistribution) and... | from __future__ import absolute_import
import logging
import sys
from pip._vendor import pkg_resources
from pip._vendor.packaging import specifiers
from pip._vendor.packaging import version
logger = logging.getLogger(__name__)
def get_metadata(dist):
if (isinstance(dist, pkg_resources.DistInfoDistribution) and... | Update check_requires_python and describe behavior in docstring | Update check_requires_python and describe behavior in docstring
| Python | mit | pradyunsg/pip,fiber-space/pip,atdaemon/pip,RonnyPfannschmidt/pip,techtonik/pip,rouge8/pip,xavfernandez/pip,fiber-space/pip,rouge8/pip,pradyunsg/pip,zvezdan/pip,techtonik/pip,pypa/pip,sigmavirus24/pip,sigmavirus24/pip,RonnyPfannschmidt/pip,zvezdan/pip,benesch/pip,rouge8/pip,atdaemon/pip,pfmoore/pip,pypa/pip,sbidoul/pip,... | from __future__ import absolute_import
import logging
import sys
from pip._vendor import pkg_resources
from pip._vendor.packaging import specifiers
from pip._vendor.packaging import version
logger = logging.getLogger(__name__)
def get_metadata(dist):
if (isinstance(dist, pkg_resources.DistInfoDistribution) and... | from __future__ import absolute_import
import logging
import sys
from pip._vendor import pkg_resources
from pip._vendor.packaging import specifiers
from pip._vendor.packaging import version
logger = logging.getLogger(__name__)
def get_metadata(dist):
if (isinstance(dist, pkg_resources.DistInfoDistribution) and... | <commit_before>from __future__ import absolute_import
import logging
import sys
from pip._vendor import pkg_resources
from pip._vendor.packaging import specifiers
from pip._vendor.packaging import version
logger = logging.getLogger(__name__)
def get_metadata(dist):
if (isinstance(dist, pkg_resources.DistInfoDi... | from __future__ import absolute_import
import logging
import sys
from pip._vendor import pkg_resources
from pip._vendor.packaging import specifiers
from pip._vendor.packaging import version
logger = logging.getLogger(__name__)
def get_metadata(dist):
if (isinstance(dist, pkg_resources.DistInfoDistribution) and... | from __future__ import absolute_import
import logging
import sys
from pip._vendor import pkg_resources
from pip._vendor.packaging import specifiers
from pip._vendor.packaging import version
logger = logging.getLogger(__name__)
def get_metadata(dist):
if (isinstance(dist, pkg_resources.DistInfoDistribution) and... | <commit_before>from __future__ import absolute_import
import logging
import sys
from pip._vendor import pkg_resources
from pip._vendor.packaging import specifiers
from pip._vendor.packaging import version
logger = logging.getLogger(__name__)
def get_metadata(dist):
if (isinstance(dist, pkg_resources.DistInfoDi... |
3d5fd3233ecaf2bae5fbd5a1ae349c55d2f4cdc7 | scistack/scistack.py | scistack/scistack.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SciStack: the web app to build docker containers for reproducable science
"""
import os
import flask
app = flask.Flask(__name__)
@app.route("/")
def hello():
return "Choose a domain!"
if __name__ == "__main__":
app.run()
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SciStack: the web app to build docker containers for reproducable science
"""
import os
import flask
import inspect
app = flask.Flask(__name__, static_url_path='')
# Home of any pre-build docker files
docker_file_path = os.path.join(os.path.dirname(os.path.abspath(
... | Return pre-built dockerfile to user | Return pre-built dockerfile to user
| Python | mit | callaghanmt/research-stacks,callaghanmt/research-stacks,callaghanmt/research-stacks | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SciStack: the web app to build docker containers for reproducable science
"""
import os
import flask
app = flask.Flask(__name__)
@app.route("/")
def hello():
return "Choose a domain!"
if __name__ == "__main__":
app.run()
Return pre-built dockerfile to user | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SciStack: the web app to build docker containers for reproducable science
"""
import os
import flask
import inspect
app = flask.Flask(__name__, static_url_path='')
# Home of any pre-build docker files
docker_file_path = os.path.join(os.path.dirname(os.path.abspath(
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SciStack: the web app to build docker containers for reproducable science
"""
import os
import flask
app = flask.Flask(__name__)
@app.route("/")
def hello():
return "Choose a domain!"
if __name__ == "__main__":
app.run()
<commit_msg>Return p... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SciStack: the web app to build docker containers for reproducable science
"""
import os
import flask
import inspect
app = flask.Flask(__name__, static_url_path='')
# Home of any pre-build docker files
docker_file_path = os.path.join(os.path.dirname(os.path.abspath(
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SciStack: the web app to build docker containers for reproducable science
"""
import os
import flask
app = flask.Flask(__name__)
@app.route("/")
def hello():
return "Choose a domain!"
if __name__ == "__main__":
app.run()
Return pre-built dockerfile to user... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SciStack: the web app to build docker containers for reproducable science
"""
import os
import flask
app = flask.Flask(__name__)
@app.route("/")
def hello():
return "Choose a domain!"
if __name__ == "__main__":
app.run()
<commit_msg>Return p... |
834d02d65b0d71bd044b18b0be031751a8c1a7de | script/lib/config.py | script/lib/config.py | #!/usr/bin/env python
NODE_VERSION = 'v0.11.10'
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '607907aed2c1dcdd3b5968a756a990ba3f47bca7'
| #!/usr/bin/env python
NODE_VERSION = 'v0.11.10'
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '276722e68bb643e3ae3b468b701c276aeb884838'
| Upgrade libchromiumcontent: Add support for acceptsFirstMouse. | Upgrade libchromiumcontent: Add support for acceptsFirstMouse.
| Python | mit | bbondy/electron,greyhwndz/electron,Neron-X5/electron,jacksondc/electron,baiwyc119/electron,brave/electron,tinydew4/electron,trigrass2/electron,pirafrank/electron,arturts/electron,RobertJGabriel/electron,takashi/electron,wan-qy/electron,hokein/atom-shell,digideskio/electron,tincan24/electron,jonatasfreitasv/electron,ben... | #!/usr/bin/env python
NODE_VERSION = 'v0.11.10'
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '607907aed2c1dcdd3b5968a756a990ba3f47bca7'
Upgrade libchromiumcontent: Add support for acceptsFirstMouse. | #!/usr/bin/env python
NODE_VERSION = 'v0.11.10'
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '276722e68bb643e3ae3b468b701c276aeb884838'
| <commit_before>#!/usr/bin/env python
NODE_VERSION = 'v0.11.10'
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '607907aed2c1dcdd3b5968a756a990ba3f47bca7'
<commit_msg>Upgrade libchromiumcontent: Add support for acceptsFirstMouse.<commit_after> | #!/usr/bin/env python
NODE_VERSION = 'v0.11.10'
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '276722e68bb643e3ae3b468b701c276aeb884838'
| #!/usr/bin/env python
NODE_VERSION = 'v0.11.10'
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '607907aed2c1dcdd3b5968a756a990ba3f47bca7'
Upgrade libchromiumcontent: Add support for acceptsFirstMouse.#!/usr/bin/env python
NODE_VERSION = 'v0.11.10'
BASE_URL = ... | <commit_before>#!/usr/bin/env python
NODE_VERSION = 'v0.11.10'
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '607907aed2c1dcdd3b5968a756a990ba3f47bca7'
<commit_msg>Upgrade libchromiumcontent: Add support for acceptsFirstMouse.<commit_after>#!/usr/bin/env pyth... |
099eb53d3c7a4be19fd79f11c9ccf52faff300d4 | script/lib/config.py | script/lib/config.py | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'e4b283c22236560fd289fe59c03e50adf39e7c4b'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'aa87035cc012ce0d533bb56b947bca81a6e71b82'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | Upgrade libchromiumcontent to fix generating node.lib | Upgrade libchromiumcontent to fix generating node.lib
| Python | mit | setzer777/electron,dkfiresky/electron,carsonmcdonald/electron,davazp/electron,michaelchiche/electron,gerhardberger/electron,systembugtj/electron,renaesop/electron,mirrh/electron,bbondy/electron,subblue/electron,Andrey-Pavlov/electron,joaomoreno/atom-shell,bpasero/electron,hokein/atom-shell,bpasero/electron,benweissmann... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'e4b283c22236560fd289fe59c03e50adf39e7c4b'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'aa87035cc012ce0d533bb56b947bca81a6e71b82'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | <commit_before>#!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'e4b283c22236560fd289fe59c03e50adf39e7c4b'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'wi... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'aa87035cc012ce0d533bb56b947bca81a6e71b82'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'e4b283c22236560fd289fe59c03e50adf39e7c4b'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | <commit_before>#!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'e4b283c22236560fd289fe59c03e50adf39e7c4b'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'wi... |
f2071eb5781f4dfa4cacbcd9f0d1c71412ba80b1 | constants.py | constants.py | # Store various constants here
# Maximum file upload size (in bytes).
MAX_CONTENT_LENGTH = 1 * 1024 * 1024 * 1024
# Authentication constants
PWD_HASH_ALGORITHM = 'pbkdf2_sha256'
SALT_SIZE = 24
MIN_PASSWORD_LENGTH = 8
MAX_PASSWORD_LENGTH = 1024
HASH_ROUNDS = 50000
PWD_RESET_KEY_LENGTH = 32
# Length of time before reco... | # Store various constants here
# Maximum file upload size (in bytes).
MAX_CONTENT_LENGTH = 1 * 1024 * 1024 * 1024
# Authentication constants
PWD_HASH_ALGORITHM = 'pbkdf2_sha256'
SALT_SIZE = 24
MIN_PASSWORD_LENGTH = 8
MAX_PASSWORD_LENGTH = 1024
HASH_ROUNDS = 100000
PWD_RESET_KEY_LENGTH = 32
# Length of time before rec... | Set hash rounds back to 100000 | Set hash rounds back to 100000
- Installed python-m2crypto package which speeds up pbkdf2 enough that
100K rounds is fine again.
| Python | mit | RuddockHouse/RuddockWebsite,RuddockHouse/RuddockWebsite,RuddockHouse/RuddockWebsite | # Store various constants here
# Maximum file upload size (in bytes).
MAX_CONTENT_LENGTH = 1 * 1024 * 1024 * 1024
# Authentication constants
PWD_HASH_ALGORITHM = 'pbkdf2_sha256'
SALT_SIZE = 24
MIN_PASSWORD_LENGTH = 8
MAX_PASSWORD_LENGTH = 1024
HASH_ROUNDS = 50000
PWD_RESET_KEY_LENGTH = 32
# Length of time before reco... | # Store various constants here
# Maximum file upload size (in bytes).
MAX_CONTENT_LENGTH = 1 * 1024 * 1024 * 1024
# Authentication constants
PWD_HASH_ALGORITHM = 'pbkdf2_sha256'
SALT_SIZE = 24
MIN_PASSWORD_LENGTH = 8
MAX_PASSWORD_LENGTH = 1024
HASH_ROUNDS = 100000
PWD_RESET_KEY_LENGTH = 32
# Length of time before rec... | <commit_before># Store various constants here
# Maximum file upload size (in bytes).
MAX_CONTENT_LENGTH = 1 * 1024 * 1024 * 1024
# Authentication constants
PWD_HASH_ALGORITHM = 'pbkdf2_sha256'
SALT_SIZE = 24
MIN_PASSWORD_LENGTH = 8
MAX_PASSWORD_LENGTH = 1024
HASH_ROUNDS = 50000
PWD_RESET_KEY_LENGTH = 32
# Length of t... | # Store various constants here
# Maximum file upload size (in bytes).
MAX_CONTENT_LENGTH = 1 * 1024 * 1024 * 1024
# Authentication constants
PWD_HASH_ALGORITHM = 'pbkdf2_sha256'
SALT_SIZE = 24
MIN_PASSWORD_LENGTH = 8
MAX_PASSWORD_LENGTH = 1024
HASH_ROUNDS = 100000
PWD_RESET_KEY_LENGTH = 32
# Length of time before rec... | # Store various constants here
# Maximum file upload size (in bytes).
MAX_CONTENT_LENGTH = 1 * 1024 * 1024 * 1024
# Authentication constants
PWD_HASH_ALGORITHM = 'pbkdf2_sha256'
SALT_SIZE = 24
MIN_PASSWORD_LENGTH = 8
MAX_PASSWORD_LENGTH = 1024
HASH_ROUNDS = 50000
PWD_RESET_KEY_LENGTH = 32
# Length of time before reco... | <commit_before># Store various constants here
# Maximum file upload size (in bytes).
MAX_CONTENT_LENGTH = 1 * 1024 * 1024 * 1024
# Authentication constants
PWD_HASH_ALGORITHM = 'pbkdf2_sha256'
SALT_SIZE = 24
MIN_PASSWORD_LENGTH = 8
MAX_PASSWORD_LENGTH = 1024
HASH_ROUNDS = 50000
PWD_RESET_KEY_LENGTH = 32
# Length of t... |
3a78496f350c904ce64d30f422dfae8b6bc879c3 | flask_api/tests/runtests.py | flask_api/tests/runtests.py | import unittest
import sys
import subprocess
if __name__ == '__main__':
if len(sys.argv) > 1:
unittest.main(module='flask_api.tests')
else:
subprocess.call([sys.executable, '-m', 'unittest', 'discover'])
| import unittest
if __name__ == '__main__':
unittest.main(module='flask_api.tests')
| Simplify test execution to restore coverage measurement | Simplify test execution to restore coverage measurement
| Python | bsd-2-clause | theskumar-archive/flask-api,theskumar-archive/flask-api,theskumar-archive/flask-api,theskumar-archive/flask-api | import unittest
import sys
import subprocess
if __name__ == '__main__':
if len(sys.argv) > 1:
unittest.main(module='flask_api.tests')
else:
subprocess.call([sys.executable, '-m', 'unittest', 'discover'])
Simplify test execution to restore coverage measurement | import unittest
if __name__ == '__main__':
unittest.main(module='flask_api.tests')
| <commit_before>import unittest
import sys
import subprocess
if __name__ == '__main__':
if len(sys.argv) > 1:
unittest.main(module='flask_api.tests')
else:
subprocess.call([sys.executable, '-m', 'unittest', 'discover'])
<commit_msg>Simplify test execution to restore coverage measurement<commit_... | import unittest
if __name__ == '__main__':
unittest.main(module='flask_api.tests')
| import unittest
import sys
import subprocess
if __name__ == '__main__':
if len(sys.argv) > 1:
unittest.main(module='flask_api.tests')
else:
subprocess.call([sys.executable, '-m', 'unittest', 'discover'])
Simplify test execution to restore coverage measurementimport unittest
if __name__ == '_... | <commit_before>import unittest
import sys
import subprocess
if __name__ == '__main__':
if len(sys.argv) > 1:
unittest.main(module='flask_api.tests')
else:
subprocess.call([sys.executable, '-m', 'unittest', 'discover'])
<commit_msg>Simplify test execution to restore coverage measurement<commit_... |
dcb8add6685dfb7dff626742b17ce03e013e72a1 | src/enrich/kucera_francis_enricher.py | src/enrich/kucera_francis_enricher.py | __author__ = 's7a'
# All imports
from extras import KuceraFrancis
from resource import Resource
from os import path
# The Kucera Francis enrichment class
class KuceraFrancisEnricher:
# Constructor for the Kucera Francis Enricher
def __init__(self):
self.kf = KuceraFrancis(path.join('data', 'kucera_f... | __author__ = 's7a'
# All imports
from extras import StemmedKuceraFrancis
from resource import Resource
from os import path
# The Kucera Francis enrichment class
class KuceraFrancisEnricher:
# Constructor for the Kucera Francis Enricher
def __init__(self):
self.kf = StemmedKuceraFrancis(path.join('da... | Use stemmed Kucera Francis for Enrichment | Use stemmed Kucera Francis for Enrichment
| Python | mit | Somsubhra/Simplify,Somsubhra/Simplify,Somsubhra/Simplify | __author__ = 's7a'
# All imports
from extras import KuceraFrancis
from resource import Resource
from os import path
# The Kucera Francis enrichment class
class KuceraFrancisEnricher:
# Constructor for the Kucera Francis Enricher
def __init__(self):
self.kf = KuceraFrancis(path.join('data', 'kucera_f... | __author__ = 's7a'
# All imports
from extras import StemmedKuceraFrancis
from resource import Resource
from os import path
# The Kucera Francis enrichment class
class KuceraFrancisEnricher:
# Constructor for the Kucera Francis Enricher
def __init__(self):
self.kf = StemmedKuceraFrancis(path.join('da... | <commit_before>__author__ = 's7a'
# All imports
from extras import KuceraFrancis
from resource import Resource
from os import path
# The Kucera Francis enrichment class
class KuceraFrancisEnricher:
# Constructor for the Kucera Francis Enricher
def __init__(self):
self.kf = KuceraFrancis(path.join('d... | __author__ = 's7a'
# All imports
from extras import StemmedKuceraFrancis
from resource import Resource
from os import path
# The Kucera Francis enrichment class
class KuceraFrancisEnricher:
# Constructor for the Kucera Francis Enricher
def __init__(self):
self.kf = StemmedKuceraFrancis(path.join('da... | __author__ = 's7a'
# All imports
from extras import KuceraFrancis
from resource import Resource
from os import path
# The Kucera Francis enrichment class
class KuceraFrancisEnricher:
# Constructor for the Kucera Francis Enricher
def __init__(self):
self.kf = KuceraFrancis(path.join('data', 'kucera_f... | <commit_before>__author__ = 's7a'
# All imports
from extras import KuceraFrancis
from resource import Resource
from os import path
# The Kucera Francis enrichment class
class KuceraFrancisEnricher:
# Constructor for the Kucera Francis Enricher
def __init__(self):
self.kf = KuceraFrancis(path.join('d... |
d57844d1d6b2172fe196db4945517a5b3a68d343 | satchless/process/__init__.py | satchless/process/__init__.py | class InvalidData(Exception):
"""
Raised for by step validation process
"""
pass
class Step(object):
"""
A single step in a multistep process
"""
def validate(self):
raise NotImplementedError() # pragma: no cover
class ProcessManager(object):
"""
A multistep process ... | class InvalidData(Exception):
"""
Raised for by step validation process
"""
pass
class Step(object):
"""
A single step in a multistep process
"""
def validate(self):
raise NotImplementedError() # pragma: no cover
class ProcessManager(object):
"""
A multistep process ... | Check explicit that next step is None | Check explicit that next step is None
| Python | bsd-3-clause | taedori81/satchless | class InvalidData(Exception):
"""
Raised for by step validation process
"""
pass
class Step(object):
"""
A single step in a multistep process
"""
def validate(self):
raise NotImplementedError() # pragma: no cover
class ProcessManager(object):
"""
A multistep process ... | class InvalidData(Exception):
"""
Raised for by step validation process
"""
pass
class Step(object):
"""
A single step in a multistep process
"""
def validate(self):
raise NotImplementedError() # pragma: no cover
class ProcessManager(object):
"""
A multistep process ... | <commit_before>class InvalidData(Exception):
"""
Raised for by step validation process
"""
pass
class Step(object):
"""
A single step in a multistep process
"""
def validate(self):
raise NotImplementedError() # pragma: no cover
class ProcessManager(object):
"""
A mul... | class InvalidData(Exception):
"""
Raised for by step validation process
"""
pass
class Step(object):
"""
A single step in a multistep process
"""
def validate(self):
raise NotImplementedError() # pragma: no cover
class ProcessManager(object):
"""
A multistep process ... | class InvalidData(Exception):
"""
Raised for by step validation process
"""
pass
class Step(object):
"""
A single step in a multistep process
"""
def validate(self):
raise NotImplementedError() # pragma: no cover
class ProcessManager(object):
"""
A multistep process ... | <commit_before>class InvalidData(Exception):
"""
Raised for by step validation process
"""
pass
class Step(object):
"""
A single step in a multistep process
"""
def validate(self):
raise NotImplementedError() # pragma: no cover
class ProcessManager(object):
"""
A mul... |
221a84d52e5165013a5c7eb0b00c3ebcae294c8a | dashboard_app/extension.py | dashboard_app/extension.py | from lava_server.extension import LavaServerExtension
class DashboardExtension(LavaServerExtension):
@property
def app_name(self):
return "dashboard_app"
@property
def name(self):
return "Dashboard"
@property
def main_view_name(self):
return "dashboard_app.views.bund... | from lava_server.extension import LavaServerExtension
class DashboardExtension(LavaServerExtension):
@property
def app_name(self):
return "dashboard_app"
@property
def name(self):
return "Dashboard"
@property
def main_view_name(self):
return "dashboard_app.views.bund... | Add support for configuring data views and reports | Add support for configuring data views and reports
| Python | agpl-3.0 | Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server | from lava_server.extension import LavaServerExtension
class DashboardExtension(LavaServerExtension):
@property
def app_name(self):
return "dashboard_app"
@property
def name(self):
return "Dashboard"
@property
def main_view_name(self):
return "dashboard_app.views.bund... | from lava_server.extension import LavaServerExtension
class DashboardExtension(LavaServerExtension):
@property
def app_name(self):
return "dashboard_app"
@property
def name(self):
return "Dashboard"
@property
def main_view_name(self):
return "dashboard_app.views.bund... | <commit_before>from lava_server.extension import LavaServerExtension
class DashboardExtension(LavaServerExtension):
@property
def app_name(self):
return "dashboard_app"
@property
def name(self):
return "Dashboard"
@property
def main_view_name(self):
return "dashboard... | from lava_server.extension import LavaServerExtension
class DashboardExtension(LavaServerExtension):
@property
def app_name(self):
return "dashboard_app"
@property
def name(self):
return "Dashboard"
@property
def main_view_name(self):
return "dashboard_app.views.bund... | from lava_server.extension import LavaServerExtension
class DashboardExtension(LavaServerExtension):
@property
def app_name(self):
return "dashboard_app"
@property
def name(self):
return "Dashboard"
@property
def main_view_name(self):
return "dashboard_app.views.bund... | <commit_before>from lava_server.extension import LavaServerExtension
class DashboardExtension(LavaServerExtension):
@property
def app_name(self):
return "dashboard_app"
@property
def name(self):
return "Dashboard"
@property
def main_view_name(self):
return "dashboard... |
0003ee31f78d7861713a2bb7daacb9701b26a1b9 | cinder/wsgi/wsgi.py | cinder/wsgi/wsgi.py | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# di... | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# di... | Initialize osprofiler in WSGI application | Initialize osprofiler in WSGI application
This patch adds missing initialization of OSProfiler
when Cinder API is running as WSGI application.
Change-Id: Ifaffa2d58eeadf5d47fafbdde5538d26bcd346a6
| Python | apache-2.0 | Datera/cinder,phenoxim/cinder,mahak/cinder,openstack/cinder,j-griffith/cinder,Datera/cinder,j-griffith/cinder,mahak/cinder,openstack/cinder,phenoxim/cinder | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# di... | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# di... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# di... | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# di... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... |
ef50e82c3c1f49d63d013ac538d932d40c430a46 | pyradiator/endpoint.py | pyradiator/endpoint.py | import queue
import threading
class Producer(object):
def __init__(self, period_in_seconds, queue, function):
self._period_in_seconds = period_in_seconds
self._queue = queue
self._function = function
self._event = threading.Event()
self._thread = threading.Thread(target=se... | try:
import queue
except ImportError:
import Queue
import threading
class Producer(object):
def __init__(self, period_in_seconds, queue, function):
self._period_in_seconds = period_in_seconds
self._queue = queue
self._function = function
self._event = threading.Event()
... | Handle import error on older python versions | Handle import error on older python versions
| Python | mit | crashmaster/pyradiator | import queue
import threading
class Producer(object):
def __init__(self, period_in_seconds, queue, function):
self._period_in_seconds = period_in_seconds
self._queue = queue
self._function = function
self._event = threading.Event()
self._thread = threading.Thread(target=se... | try:
import queue
except ImportError:
import Queue
import threading
class Producer(object):
def __init__(self, period_in_seconds, queue, function):
self._period_in_seconds = period_in_seconds
self._queue = queue
self._function = function
self._event = threading.Event()
... | <commit_before>import queue
import threading
class Producer(object):
def __init__(self, period_in_seconds, queue, function):
self._period_in_seconds = period_in_seconds
self._queue = queue
self._function = function
self._event = threading.Event()
self._thread = threading.T... | try:
import queue
except ImportError:
import Queue
import threading
class Producer(object):
def __init__(self, period_in_seconds, queue, function):
self._period_in_seconds = period_in_seconds
self._queue = queue
self._function = function
self._event = threading.Event()
... | import queue
import threading
class Producer(object):
def __init__(self, period_in_seconds, queue, function):
self._period_in_seconds = period_in_seconds
self._queue = queue
self._function = function
self._event = threading.Event()
self._thread = threading.Thread(target=se... | <commit_before>import queue
import threading
class Producer(object):
def __init__(self, period_in_seconds, queue, function):
self._period_in_seconds = period_in_seconds
self._queue = queue
self._function = function
self._event = threading.Event()
self._thread = threading.T... |
91556f15e64f2407d77ab6ea35d74abccc9f1984 | pystitch/dmc_colors.py | pystitch/dmc_colors.py | import csv
import os
import color
def _GetDataDirPath():
return os.path.join(os.path.dirname(__file__), 'data')
def _GetCsvPath():
return os.path.join(_GetDataDirPath(), 'dmccolors.csv')
def _GetCsvString():
with open(_GetCsvPath()) as f:
return f.read().strip()
def _CreateDmcColorFromRow(row):
print ro... | import csv
import os
import color
def _GetDataDirPath():
return os.path.join(os.path.dirname(__file__), 'data')
def _GetCsvPath():
return os.path.join(_GetDataDirPath(), 'dmccolors.csv')
def _GetCsvString():
with open(_GetCsvPath()) as f:
return f.read().strip()
def _CreateDmcColorFromRow(row):
number =... | Add functionality to build the DMCColors set. | Add functionality to build the DMCColors set.
| Python | apache-2.0 | nanaze/pystitch,nanaze/pystitch | import csv
import os
import color
def _GetDataDirPath():
return os.path.join(os.path.dirname(__file__), 'data')
def _GetCsvPath():
return os.path.join(_GetDataDirPath(), 'dmccolors.csv')
def _GetCsvString():
with open(_GetCsvPath()) as f:
return f.read().strip()
def _CreateDmcColorFromRow(row):
print ro... | import csv
import os
import color
def _GetDataDirPath():
return os.path.join(os.path.dirname(__file__), 'data')
def _GetCsvPath():
return os.path.join(_GetDataDirPath(), 'dmccolors.csv')
def _GetCsvString():
with open(_GetCsvPath()) as f:
return f.read().strip()
def _CreateDmcColorFromRow(row):
number =... | <commit_before>import csv
import os
import color
def _GetDataDirPath():
return os.path.join(os.path.dirname(__file__), 'data')
def _GetCsvPath():
return os.path.join(_GetDataDirPath(), 'dmccolors.csv')
def _GetCsvString():
with open(_GetCsvPath()) as f:
return f.read().strip()
def _CreateDmcColorFromRow(r... | import csv
import os
import color
def _GetDataDirPath():
return os.path.join(os.path.dirname(__file__), 'data')
def _GetCsvPath():
return os.path.join(_GetDataDirPath(), 'dmccolors.csv')
def _GetCsvString():
with open(_GetCsvPath()) as f:
return f.read().strip()
def _CreateDmcColorFromRow(row):
number =... | import csv
import os
import color
def _GetDataDirPath():
return os.path.join(os.path.dirname(__file__), 'data')
def _GetCsvPath():
return os.path.join(_GetDataDirPath(), 'dmccolors.csv')
def _GetCsvString():
with open(_GetCsvPath()) as f:
return f.read().strip()
def _CreateDmcColorFromRow(row):
print ro... | <commit_before>import csv
import os
import color
def _GetDataDirPath():
return os.path.join(os.path.dirname(__file__), 'data')
def _GetCsvPath():
return os.path.join(_GetDataDirPath(), 'dmccolors.csv')
def _GetCsvString():
with open(_GetCsvPath()) as f:
return f.read().strip()
def _CreateDmcColorFromRow(r... |
511a133599b86deae83d9ad8a3f7a7c5c45e07bf | core/views.py | core/views.py | from django.shortcuts import render
from django.http import Http404
from django.contrib.messages import success
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore.models import Page
from .models import HomePage, StaticPage
from category.models import Category
from .forms import ContactFo... | from django.shortcuts import render
from django.http import Http404
from django.contrib.messages import success
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore.models import Page
from .models import HomePage, StaticPage
from category.models import Category
from .forms import ContactFo... | Clear the contact form after it has been successfully posted. | Clear the contact form after it has been successfully posted.
| Python | bsd-3-clause | PARINetwork/pari,PARINetwork/pari,PARINetwork/pari,PARINetwork/pari | from django.shortcuts import render
from django.http import Http404
from django.contrib.messages import success
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore.models import Page
from .models import HomePage, StaticPage
from category.models import Category
from .forms import ContactFo... | from django.shortcuts import render
from django.http import Http404
from django.contrib.messages import success
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore.models import Page
from .models import HomePage, StaticPage
from category.models import Category
from .forms import ContactFo... | <commit_before>from django.shortcuts import render
from django.http import Http404
from django.contrib.messages import success
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore.models import Page
from .models import HomePage, StaticPage
from category.models import Category
from .forms i... | from django.shortcuts import render
from django.http import Http404
from django.contrib.messages import success
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore.models import Page
from .models import HomePage, StaticPage
from category.models import Category
from .forms import ContactFo... | from django.shortcuts import render
from django.http import Http404
from django.contrib.messages import success
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore.models import Page
from .models import HomePage, StaticPage
from category.models import Category
from .forms import ContactFo... | <commit_before>from django.shortcuts import render
from django.http import Http404
from django.contrib.messages import success
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore.models import Page
from .models import HomePage, StaticPage
from category.models import Category
from .forms i... |
7cb68f6a749a38fef9820004a857e301c12a3044 | morenines/util.py | morenines/util.py | import os
import hashlib
from fnmatch import fnmatchcase
def get_files(index):
paths = []
for dirpath, dirnames, filenames in os.walk(index.headers['root_path']):
# Remove ignored directories
dirnames = [d for d in dirnames if not index.ignores.match(d)]
for filename in (f for f in ... | import os
import hashlib
def get_files(index):
paths = []
for dirpath, dirnames, filenames in os.walk(index.headers['root_path']):
# Remove ignored directories
dirnames[:] = [d for d in dirnames if not index.ignores.match(d)]
for filename in (f for f in filenames if not index.ignores... | Fix in-place os.walk() dirs modification | Fix in-place os.walk() dirs modification
| Python | mit | mcgid/morenines,mcgid/morenines | import os
import hashlib
from fnmatch import fnmatchcase
def get_files(index):
paths = []
for dirpath, dirnames, filenames in os.walk(index.headers['root_path']):
# Remove ignored directories
dirnames = [d for d in dirnames if not index.ignores.match(d)]
for filename in (f for f in ... | import os
import hashlib
def get_files(index):
paths = []
for dirpath, dirnames, filenames in os.walk(index.headers['root_path']):
# Remove ignored directories
dirnames[:] = [d for d in dirnames if not index.ignores.match(d)]
for filename in (f for f in filenames if not index.ignores... | <commit_before>import os
import hashlib
from fnmatch import fnmatchcase
def get_files(index):
paths = []
for dirpath, dirnames, filenames in os.walk(index.headers['root_path']):
# Remove ignored directories
dirnames = [d for d in dirnames if not index.ignores.match(d)]
for filename ... | import os
import hashlib
def get_files(index):
paths = []
for dirpath, dirnames, filenames in os.walk(index.headers['root_path']):
# Remove ignored directories
dirnames[:] = [d for d in dirnames if not index.ignores.match(d)]
for filename in (f for f in filenames if not index.ignores... | import os
import hashlib
from fnmatch import fnmatchcase
def get_files(index):
paths = []
for dirpath, dirnames, filenames in os.walk(index.headers['root_path']):
# Remove ignored directories
dirnames = [d for d in dirnames if not index.ignores.match(d)]
for filename in (f for f in ... | <commit_before>import os
import hashlib
from fnmatch import fnmatchcase
def get_files(index):
paths = []
for dirpath, dirnames, filenames in os.walk(index.headers['root_path']):
# Remove ignored directories
dirnames = [d for d in dirnames if not index.ignores.match(d)]
for filename ... |
c157ddeae7131e4141bca43857730103617b42c4 | froide/upload/serializers.py | froide/upload/serializers.py | from rest_framework import serializers
from .models import Upload
class UploadSerializer(serializers.ModelSerializer):
class Meta:
model = Upload
fields = '__all__'
| from rest_framework import serializers
from .models import Upload
class UploadSerializer(serializers.ModelSerializer):
class Meta:
model = Upload
fields = '__all__'
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['guid'].required = True
| Make guid required in upload API | Make guid required in upload API | Python | mit | stefanw/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide,fin/froide,stefanw/froide | from rest_framework import serializers
from .models import Upload
class UploadSerializer(serializers.ModelSerializer):
class Meta:
model = Upload
fields = '__all__'
Make guid required in upload API | from rest_framework import serializers
from .models import Upload
class UploadSerializer(serializers.ModelSerializer):
class Meta:
model = Upload
fields = '__all__'
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['guid'].required = True
| <commit_before>from rest_framework import serializers
from .models import Upload
class UploadSerializer(serializers.ModelSerializer):
class Meta:
model = Upload
fields = '__all__'
<commit_msg>Make guid required in upload API<commit_after> | from rest_framework import serializers
from .models import Upload
class UploadSerializer(serializers.ModelSerializer):
class Meta:
model = Upload
fields = '__all__'
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['guid'].required = True
| from rest_framework import serializers
from .models import Upload
class UploadSerializer(serializers.ModelSerializer):
class Meta:
model = Upload
fields = '__all__'
Make guid required in upload APIfrom rest_framework import serializers
from .models import Upload
class UploadSerializer(serializ... | <commit_before>from rest_framework import serializers
from .models import Upload
class UploadSerializer(serializers.ModelSerializer):
class Meta:
model = Upload
fields = '__all__'
<commit_msg>Make guid required in upload API<commit_after>from rest_framework import serializers
from .models import... |
1d32debc1ea2ce8d11c8bc1abad048d6e4937520 | froide_campaign/listeners.py | froide_campaign/listeners.py | from asgiref.sync import async_to_sync
from channels.layers import get_channel_layer
from .consumers import PRESENCE_ROOM
from .models import Campaign
def connect_info_object(sender, **kwargs):
reference = kwargs.get('reference')
if not reference:
return
if not reference.startswith('campaign:'):
... | from asgiref.sync import async_to_sync
from channels.layers import get_channel_layer
from .consumers import PRESENCE_ROOM
from .models import Campaign
def connect_info_object(sender, **kwargs):
reference = kwargs.get('reference')
if not reference:
return
if not reference.startswith('campaign:'):
... | Fix non-iobj campaign request connection | Fix non-iobj campaign request connection | Python | mit | okfde/froide-campaign,okfde/froide-campaign,okfde/froide-campaign | from asgiref.sync import async_to_sync
from channels.layers import get_channel_layer
from .consumers import PRESENCE_ROOM
from .models import Campaign
def connect_info_object(sender, **kwargs):
reference = kwargs.get('reference')
if not reference:
return
if not reference.startswith('campaign:'):
... | from asgiref.sync import async_to_sync
from channels.layers import get_channel_layer
from .consumers import PRESENCE_ROOM
from .models import Campaign
def connect_info_object(sender, **kwargs):
reference = kwargs.get('reference')
if not reference:
return
if not reference.startswith('campaign:'):
... | <commit_before>from asgiref.sync import async_to_sync
from channels.layers import get_channel_layer
from .consumers import PRESENCE_ROOM
from .models import Campaign
def connect_info_object(sender, **kwargs):
reference = kwargs.get('reference')
if not reference:
return
if not reference.startswith... | from asgiref.sync import async_to_sync
from channels.layers import get_channel_layer
from .consumers import PRESENCE_ROOM
from .models import Campaign
def connect_info_object(sender, **kwargs):
reference = kwargs.get('reference')
if not reference:
return
if not reference.startswith('campaign:'):
... | from asgiref.sync import async_to_sync
from channels.layers import get_channel_layer
from .consumers import PRESENCE_ROOM
from .models import Campaign
def connect_info_object(sender, **kwargs):
reference = kwargs.get('reference')
if not reference:
return
if not reference.startswith('campaign:'):
... | <commit_before>from asgiref.sync import async_to_sync
from channels.layers import get_channel_layer
from .consumers import PRESENCE_ROOM
from .models import Campaign
def connect_info_object(sender, **kwargs):
reference = kwargs.get('reference')
if not reference:
return
if not reference.startswith... |
83bc5fbaff357b43c49f948ec685e7ab067b8f78 | core/urls.py | core/urls.py |
from django.conf.urls.defaults import *
urlpatterns = patterns("core.views",
url("^airport_list/(?P<south>.*)/(?P<west>.*)/(?P<north>.*)/(?P<east>.*)/",
"airports_for_boundary", name="airports_for_boundary"),
)
|
from django.conf.urls.defaults import *
urlpatterns = patterns("core.views",
url("^airport/list/(?P<south>.*)/(?P<west>.*)/(?P<north>.*)/(?P<east>.*)/",
"airports_for_boundary", name="airports_for_boundary"),
)
| Change URL pattern for airport list. | Change URL pattern for airport list.
| Python | bsd-2-clause | stephenmcd/ratemyflight,stephenmcd/ratemyflight |
from django.conf.urls.defaults import *
urlpatterns = patterns("core.views",
url("^airport_list/(?P<south>.*)/(?P<west>.*)/(?P<north>.*)/(?P<east>.*)/",
"airports_for_boundary", name="airports_for_boundary"),
)
Change URL pattern for airport list. |
from django.conf.urls.defaults import *
urlpatterns = patterns("core.views",
url("^airport/list/(?P<south>.*)/(?P<west>.*)/(?P<north>.*)/(?P<east>.*)/",
"airports_for_boundary", name="airports_for_boundary"),
)
| <commit_before>
from django.conf.urls.defaults import *
urlpatterns = patterns("core.views",
url("^airport_list/(?P<south>.*)/(?P<west>.*)/(?P<north>.*)/(?P<east>.*)/",
"airports_for_boundary", name="airports_for_boundary"),
)
<commit_msg>Change URL pattern for airport list.<commit_after> |
from django.conf.urls.defaults import *
urlpatterns = patterns("core.views",
url("^airport/list/(?P<south>.*)/(?P<west>.*)/(?P<north>.*)/(?P<east>.*)/",
"airports_for_boundary", name="airports_for_boundary"),
)
|
from django.conf.urls.defaults import *
urlpatterns = patterns("core.views",
url("^airport_list/(?P<south>.*)/(?P<west>.*)/(?P<north>.*)/(?P<east>.*)/",
"airports_for_boundary", name="airports_for_boundary"),
)
Change URL pattern for airport list.
from django.conf.urls.defaults import *
urlpatter... | <commit_before>
from django.conf.urls.defaults import *
urlpatterns = patterns("core.views",
url("^airport_list/(?P<south>.*)/(?P<west>.*)/(?P<north>.*)/(?P<east>.*)/",
"airports_for_boundary", name="airports_for_boundary"),
)
<commit_msg>Change URL pattern for airport list.<commit_after>
from django... |
de1ff8a480cc6d6e86bb179e6820ab9f21145679 | byceps/services/user/event_service.py | byceps/services/user/event_service.py | """
byceps.services.user.event_service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime
from typing import Sequence
from ...database import db
from ...typing import UserID
from .models.event import UserEv... | """
byceps.services.user.event_service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime
from typing import Optional, Sequence
from ...database import db
from ...typing import UserID
from .models.event imp... | Allow to provide a custom `occurred_at` value when building a user event | Allow to provide a custom `occurred_at` value when building a user event
| Python | bsd-3-clause | homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps | """
byceps.services.user.event_service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime
from typing import Sequence
from ...database import db
from ...typing import UserID
from .models.event import UserEv... | """
byceps.services.user.event_service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime
from typing import Optional, Sequence
from ...database import db
from ...typing import UserID
from .models.event imp... | <commit_before>"""
byceps.services.user.event_service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime
from typing import Sequence
from ...database import db
from ...typing import UserID
from .models.even... | """
byceps.services.user.event_service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime
from typing import Optional, Sequence
from ...database import db
from ...typing import UserID
from .models.event imp... | """
byceps.services.user.event_service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime
from typing import Sequence
from ...database import db
from ...typing import UserID
from .models.event import UserEv... | <commit_before>"""
byceps.services.user.event_service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime
from typing import Sequence
from ...database import db
from ...typing import UserID
from .models.even... |
e4b2d60af93fd84407eb7107497b2b500d79f9d7 | calexicon/dates/tests/test_distant.py | calexicon/dates/tests/test_distant.py | import unittest
from datetime import date as vanilla_date, timedelta
from calexicon.dates import DistantDate
class TestDistantDate(unittest.TestCase):
def test_subtraction(self):
dd = DistantDate(10000, 1, 1)
self.assertIsInstance(dd - vanilla_date(9999, 1, 1), timedelta)
self.assertIsIn... | import unittest
from datetime import date as vanilla_date, timedelta
from calexicon.calendars import ProlepticJulianCalendar
from calexicon.dates import DateWithCalendar, DistantDate
class TestDistantDate(unittest.TestCase):
def test_subtraction(self):
dd = DistantDate(10000, 1, 1)
self.assertIs... | Add a passing test for equality. | Add a passing test for equality.
Narrow down problems with constructing a date far in the future.
| Python | apache-2.0 | jwg4/qual,jwg4/calexicon | import unittest
from datetime import date as vanilla_date, timedelta
from calexicon.dates import DistantDate
class TestDistantDate(unittest.TestCase):
def test_subtraction(self):
dd = DistantDate(10000, 1, 1)
self.assertIsInstance(dd - vanilla_date(9999, 1, 1), timedelta)
self.assertIsIn... | import unittest
from datetime import date as vanilla_date, timedelta
from calexicon.calendars import ProlepticJulianCalendar
from calexicon.dates import DateWithCalendar, DistantDate
class TestDistantDate(unittest.TestCase):
def test_subtraction(self):
dd = DistantDate(10000, 1, 1)
self.assertIs... | <commit_before>import unittest
from datetime import date as vanilla_date, timedelta
from calexicon.dates import DistantDate
class TestDistantDate(unittest.TestCase):
def test_subtraction(self):
dd = DistantDate(10000, 1, 1)
self.assertIsInstance(dd - vanilla_date(9999, 1, 1), timedelta)
... | import unittest
from datetime import date as vanilla_date, timedelta
from calexicon.calendars import ProlepticJulianCalendar
from calexicon.dates import DateWithCalendar, DistantDate
class TestDistantDate(unittest.TestCase):
def test_subtraction(self):
dd = DistantDate(10000, 1, 1)
self.assertIs... | import unittest
from datetime import date as vanilla_date, timedelta
from calexicon.dates import DistantDate
class TestDistantDate(unittest.TestCase):
def test_subtraction(self):
dd = DistantDate(10000, 1, 1)
self.assertIsInstance(dd - vanilla_date(9999, 1, 1), timedelta)
self.assertIsIn... | <commit_before>import unittest
from datetime import date as vanilla_date, timedelta
from calexicon.dates import DistantDate
class TestDistantDate(unittest.TestCase):
def test_subtraction(self):
dd = DistantDate(10000, 1, 1)
self.assertIsInstance(dd - vanilla_date(9999, 1, 1), timedelta)
... |
1f2d8fadd114106cefbc23060f742163be415376 | cherrypy/process/__init__.py | cherrypy/process/__init__.py | """Site container for an HTTP server.
A Web Site Process Bus object is used to connect applications, servers,
and frameworks with site-wide services such as daemonization, process
reload, signal handling, drop privileges, PID file management, logging
for all of these, and many more.
The 'plugins' module defines a few... | """Site container for an HTTP server.
A Web Site Process Bus object is used to connect applications, servers,
and frameworks with site-wide services such as daemonization, process
reload, signal handling, drop privileges, PID file management, logging
for all of these, and many more.
The 'plugins' module defines a few... | Use __all__ to avoid linter errors | Use __all__ to avoid linter errors
| Python | bsd-3-clause | Safihre/cherrypy,Safihre/cherrypy,cherrypy/cherrypy,cherrypy/cherrypy | """Site container for an HTTP server.
A Web Site Process Bus object is used to connect applications, servers,
and frameworks with site-wide services such as daemonization, process
reload, signal handling, drop privileges, PID file management, logging
for all of these, and many more.
The 'plugins' module defines a few... | """Site container for an HTTP server.
A Web Site Process Bus object is used to connect applications, servers,
and frameworks with site-wide services such as daemonization, process
reload, signal handling, drop privileges, PID file management, logging
for all of these, and many more.
The 'plugins' module defines a few... | <commit_before>"""Site container for an HTTP server.
A Web Site Process Bus object is used to connect applications, servers,
and frameworks with site-wide services such as daemonization, process
reload, signal handling, drop privileges, PID file management, logging
for all of these, and many more.
The 'plugins' modul... | """Site container for an HTTP server.
A Web Site Process Bus object is used to connect applications, servers,
and frameworks with site-wide services such as daemonization, process
reload, signal handling, drop privileges, PID file management, logging
for all of these, and many more.
The 'plugins' module defines a few... | """Site container for an HTTP server.
A Web Site Process Bus object is used to connect applications, servers,
and frameworks with site-wide services such as daemonization, process
reload, signal handling, drop privileges, PID file management, logging
for all of these, and many more.
The 'plugins' module defines a few... | <commit_before>"""Site container for an HTTP server.
A Web Site Process Bus object is used to connect applications, servers,
and frameworks with site-wide services such as daemonization, process
reload, signal handling, drop privileges, PID file management, logging
for all of these, and many more.
The 'plugins' modul... |
9deef39639bd42d6a6c91f6aafdf8e92a73a605d | fortdepend/preprocessor.py | fortdepend/preprocessor.py | import io
import pcpp
class FortranPreprocessor(pcpp.Preprocessor):
def __init__(self):
super(pcpp.Preprocessor, self).__init__()
def parse_to_string_lines(self, text):
with io.StringIO() as f:
self.parse(text)
self.write(f)
f.seek(0)
result = f... | import io
import pcpp
class FortranPreprocessor(pcpp.Preprocessor):
def __init__(self):
super(FortranPreprocessor, self).__init__()
def parse_to_string_lines(self, text):
with io.StringIO() as f:
self.parse(text)
self.write(f)
f.seek(0)
result =... | Fix super() call (properly) for py2.7 | Fix super() call (properly) for py2.7
| Python | mit | ZedThree/fort_depend.py,ZedThree/fort_depend.py | import io
import pcpp
class FortranPreprocessor(pcpp.Preprocessor):
def __init__(self):
super(pcpp.Preprocessor, self).__init__()
def parse_to_string_lines(self, text):
with io.StringIO() as f:
self.parse(text)
self.write(f)
f.seek(0)
result = f... | import io
import pcpp
class FortranPreprocessor(pcpp.Preprocessor):
def __init__(self):
super(FortranPreprocessor, self).__init__()
def parse_to_string_lines(self, text):
with io.StringIO() as f:
self.parse(text)
self.write(f)
f.seek(0)
result =... | <commit_before>import io
import pcpp
class FortranPreprocessor(pcpp.Preprocessor):
def __init__(self):
super(pcpp.Preprocessor, self).__init__()
def parse_to_string_lines(self, text):
with io.StringIO() as f:
self.parse(text)
self.write(f)
f.seek(0)
... | import io
import pcpp
class FortranPreprocessor(pcpp.Preprocessor):
def __init__(self):
super(FortranPreprocessor, self).__init__()
def parse_to_string_lines(self, text):
with io.StringIO() as f:
self.parse(text)
self.write(f)
f.seek(0)
result =... | import io
import pcpp
class FortranPreprocessor(pcpp.Preprocessor):
def __init__(self):
super(pcpp.Preprocessor, self).__init__()
def parse_to_string_lines(self, text):
with io.StringIO() as f:
self.parse(text)
self.write(f)
f.seek(0)
result = f... | <commit_before>import io
import pcpp
class FortranPreprocessor(pcpp.Preprocessor):
def __init__(self):
super(pcpp.Preprocessor, self).__init__()
def parse_to_string_lines(self, text):
with io.StringIO() as f:
self.parse(text)
self.write(f)
f.seek(0)
... |
0a234829ecdde1483273d0f6fb249cc9fc0425d5 | ffmpeg_process.py | ffmpeg_process.py | # coding: utf-8
import logging
import psutil
from subprocess import PIPE
class FfmpegProcess(object):
def __init__(self):
self._cmdline = None
self._process = None
self._paused = False
def run(self):
if self._cmdline is None:
logging.debug('cmdline is not yet defin... | # coding: utf-8
import logging
import psutil
from subprocess import PIPE
class FfmpegProcess(object):
def __init__(self):
self._cmdline = None
self._process = None
self._paused = False
def run(self):
if self._cmdline is None:
logging.debug('cmdline is not yet defin... | Implement pause property more accurately | Implement pause property more accurately
| Python | mit | dkrikun/ffmpeg-rcd | # coding: utf-8
import logging
import psutil
from subprocess import PIPE
class FfmpegProcess(object):
def __init__(self):
self._cmdline = None
self._process = None
self._paused = False
def run(self):
if self._cmdline is None:
logging.debug('cmdline is not yet defin... | # coding: utf-8
import logging
import psutil
from subprocess import PIPE
class FfmpegProcess(object):
def __init__(self):
self._cmdline = None
self._process = None
self._paused = False
def run(self):
if self._cmdline is None:
logging.debug('cmdline is not yet defin... | <commit_before># coding: utf-8
import logging
import psutil
from subprocess import PIPE
class FfmpegProcess(object):
def __init__(self):
self._cmdline = None
self._process = None
self._paused = False
def run(self):
if self._cmdline is None:
logging.debug('cmdline i... | # coding: utf-8
import logging
import psutil
from subprocess import PIPE
class FfmpegProcess(object):
def __init__(self):
self._cmdline = None
self._process = None
self._paused = False
def run(self):
if self._cmdline is None:
logging.debug('cmdline is not yet defin... | # coding: utf-8
import logging
import psutil
from subprocess import PIPE
class FfmpegProcess(object):
def __init__(self):
self._cmdline = None
self._process = None
self._paused = False
def run(self):
if self._cmdline is None:
logging.debug('cmdline is not yet defin... | <commit_before># coding: utf-8
import logging
import psutil
from subprocess import PIPE
class FfmpegProcess(object):
def __init__(self):
self._cmdline = None
self._process = None
self._paused = False
def run(self):
if self._cmdline is None:
logging.debug('cmdline i... |
2649e2e6a2d79febad14e0728c65b1429beb8858 | spotpy/unittests/test_fast.py | spotpy/unittests/test_fast.py | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 800 # REP must be a... | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 200 # REP must be a... | Reduce amounts of runs for fast test analysis | Reduce amounts of runs for fast test analysis
| Python | mit | thouska/spotpy,bees4ever/spotpy,thouska/spotpy,bees4ever/spotpy,bees4ever/spotpy,thouska/spotpy | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 800 # REP must be a... | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 200 # REP must be a... | <commit_before>import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 800 ... | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 200 # REP must be a... | import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 800 # REP must be a... | <commit_before>import unittest
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
import spotpy
from spotpy.examples.spot_setup_hymod_python import spot_setup
class TestFast(unittest.TestCase):
def setUp(self):
self.spot_setup = spot_setup()
self.rep = 800 ... |
6dc4314f1c5510a6e5f857d739956654909d97b2 | pronto/__init__.py | pronto/__init__.py | # coding: utf-8
"""a Python frontend to ontologies
"""
from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = 'dev'
__author__ = 'Martin Larralde'
__author_email__ = '[email protected]'
__license__ = "MIT"
from .ontology import Ontology
from .term import Term, T... | # coding: utf-8
"""a Python frontend to ontologies
"""
from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = 'dev'
__author__ = 'Martin Larralde'
__author_email__ = '[email protected]'
__license__ = "MIT"
from .ontology import Ontology
from .term import Term, T... | Add `Description` to top-level imports | Add `Description` to top-level imports
| Python | mit | althonos/pronto | # coding: utf-8
"""a Python frontend to ontologies
"""
from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = 'dev'
__author__ = 'Martin Larralde'
__author_email__ = '[email protected]'
__license__ = "MIT"
from .ontology import Ontology
from .term import Term, T... | # coding: utf-8
"""a Python frontend to ontologies
"""
from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = 'dev'
__author__ = 'Martin Larralde'
__author_email__ = '[email protected]'
__license__ = "MIT"
from .ontology import Ontology
from .term import Term, T... | <commit_before># coding: utf-8
"""a Python frontend to ontologies
"""
from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = 'dev'
__author__ = 'Martin Larralde'
__author_email__ = '[email protected]'
__license__ = "MIT"
from .ontology import Ontology
from .term... | # coding: utf-8
"""a Python frontend to ontologies
"""
from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = 'dev'
__author__ = 'Martin Larralde'
__author_email__ = '[email protected]'
__license__ = "MIT"
from .ontology import Ontology
from .term import Term, T... | # coding: utf-8
"""a Python frontend to ontologies
"""
from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = 'dev'
__author__ = 'Martin Larralde'
__author_email__ = '[email protected]'
__license__ = "MIT"
from .ontology import Ontology
from .term import Term, T... | <commit_before># coding: utf-8
"""a Python frontend to ontologies
"""
from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = 'dev'
__author__ = 'Martin Larralde'
__author_email__ = '[email protected]'
__license__ = "MIT"
from .ontology import Ontology
from .term... |
1e47f79647baffd62d2a434710fe98b3c2247f28 | tests/pgcomplex_app/models.py | tests/pgcomplex_app/models.py | # -*- coding: utf-8 -*-
from django.db import models
from django_orm.postgresql.fields.arrays import ArrayField
from django_orm.postgresql.fields.interval import IntervalField
from django_orm.postgresql.fields.bytea import ByteaField
from django_orm.postgresql.manager import PgManager
class IntModel(models.Model):
... | # -*- coding: utf-8 -*-
from django.db import models
from django_orm.postgresql.fields.arrays import ArrayField
from django_orm.postgresql.fields.interval import IntervalField
from django_orm.postgresql.fields.bytea import ByteaField
from django_orm.manager import Manager
class IntModel(models.Model):
lista = Arr... | Fix tests with last changes on api. | Fix tests with last changes on api.
| Python | bsd-3-clause | EnTeQuAk/django-orm,EnTeQuAk/django-orm | # -*- coding: utf-8 -*-
from django.db import models
from django_orm.postgresql.fields.arrays import ArrayField
from django_orm.postgresql.fields.interval import IntervalField
from django_orm.postgresql.fields.bytea import ByteaField
from django_orm.postgresql.manager import PgManager
class IntModel(models.Model):
... | # -*- coding: utf-8 -*-
from django.db import models
from django_orm.postgresql.fields.arrays import ArrayField
from django_orm.postgresql.fields.interval import IntervalField
from django_orm.postgresql.fields.bytea import ByteaField
from django_orm.manager import Manager
class IntModel(models.Model):
lista = Arr... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
from django_orm.postgresql.fields.arrays import ArrayField
from django_orm.postgresql.fields.interval import IntervalField
from django_orm.postgresql.fields.bytea import ByteaField
from django_orm.postgresql.manager import PgManager
class IntModel(mo... | # -*- coding: utf-8 -*-
from django.db import models
from django_orm.postgresql.fields.arrays import ArrayField
from django_orm.postgresql.fields.interval import IntervalField
from django_orm.postgresql.fields.bytea import ByteaField
from django_orm.manager import Manager
class IntModel(models.Model):
lista = Arr... | # -*- coding: utf-8 -*-
from django.db import models
from django_orm.postgresql.fields.arrays import ArrayField
from django_orm.postgresql.fields.interval import IntervalField
from django_orm.postgresql.fields.bytea import ByteaField
from django_orm.postgresql.manager import PgManager
class IntModel(models.Model):
... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
from django_orm.postgresql.fields.arrays import ArrayField
from django_orm.postgresql.fields.interval import IntervalField
from django_orm.postgresql.fields.bytea import ByteaField
from django_orm.postgresql.manager import PgManager
class IntModel(mo... |
035d871399a5e9a60786332b2a8c42fbea98397f | docker/settings.py | docker/settings.py | from .base_settings import *
import os
INSTALLED_APPS += [
'data_aggregator.apps.DataAggregatorConfig',
'webpack_loader',
]
if os.getenv('ENV') == 'localdev':
DEBUG = True
DATA_AGGREGATOR_ACCESS_GROUP = 'u_test_group'
DATA_AGGREGATOR_THREADING_ENABLED = False
RESTCLIENTS_DAO_CACHE_CLASS = None... | from .base_settings import *
import os
INSTALLED_APPS += [
'data_aggregator.apps.DataAggregatorConfig',
'webpack_loader',
]
if os.getenv('ENV') == 'localdev':
DEBUG = True
DATA_AGGREGATOR_ACCESS_GROUP = 'u_test_group'
DATA_AGGREGATOR_THREADING_ENABLED = False
RESTCLIENTS_DAO_CACHE_CLASS = None... | Revert "Increase rest client pool size to 100" | Revert "Increase rest client pool size to 100"
| Python | apache-2.0 | uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics | from .base_settings import *
import os
INSTALLED_APPS += [
'data_aggregator.apps.DataAggregatorConfig',
'webpack_loader',
]
if os.getenv('ENV') == 'localdev':
DEBUG = True
DATA_AGGREGATOR_ACCESS_GROUP = 'u_test_group'
DATA_AGGREGATOR_THREADING_ENABLED = False
RESTCLIENTS_DAO_CACHE_CLASS = None... | from .base_settings import *
import os
INSTALLED_APPS += [
'data_aggregator.apps.DataAggregatorConfig',
'webpack_loader',
]
if os.getenv('ENV') == 'localdev':
DEBUG = True
DATA_AGGREGATOR_ACCESS_GROUP = 'u_test_group'
DATA_AGGREGATOR_THREADING_ENABLED = False
RESTCLIENTS_DAO_CACHE_CLASS = None... | <commit_before>from .base_settings import *
import os
INSTALLED_APPS += [
'data_aggregator.apps.DataAggregatorConfig',
'webpack_loader',
]
if os.getenv('ENV') == 'localdev':
DEBUG = True
DATA_AGGREGATOR_ACCESS_GROUP = 'u_test_group'
DATA_AGGREGATOR_THREADING_ENABLED = False
RESTCLIENTS_DAO_CAC... | from .base_settings import *
import os
INSTALLED_APPS += [
'data_aggregator.apps.DataAggregatorConfig',
'webpack_loader',
]
if os.getenv('ENV') == 'localdev':
DEBUG = True
DATA_AGGREGATOR_ACCESS_GROUP = 'u_test_group'
DATA_AGGREGATOR_THREADING_ENABLED = False
RESTCLIENTS_DAO_CACHE_CLASS = None... | from .base_settings import *
import os
INSTALLED_APPS += [
'data_aggregator.apps.DataAggregatorConfig',
'webpack_loader',
]
if os.getenv('ENV') == 'localdev':
DEBUG = True
DATA_AGGREGATOR_ACCESS_GROUP = 'u_test_group'
DATA_AGGREGATOR_THREADING_ENABLED = False
RESTCLIENTS_DAO_CACHE_CLASS = None... | <commit_before>from .base_settings import *
import os
INSTALLED_APPS += [
'data_aggregator.apps.DataAggregatorConfig',
'webpack_loader',
]
if os.getenv('ENV') == 'localdev':
DEBUG = True
DATA_AGGREGATOR_ACCESS_GROUP = 'u_test_group'
DATA_AGGREGATOR_THREADING_ENABLED = False
RESTCLIENTS_DAO_CAC... |
7665e2b0af042948dfc7a1814275cd3309f5f6cf | pages/tests/__init__.py | pages/tests/__init__.py | """Django page CMS test suite module"""
from djangox.test.depth import alltests
def suite():
return alltests(__file__, __name__)
| """Django page CMS test suite module"""
import unittest
def suite():
suite = unittest.TestSuite()
from pages.tests.test_functionnal import FunctionnalTestCase
from pages.tests.test_unit import UnitTestCase
from pages.tests.test_regression import RegressionTestCase
from pages.tests.test_pages_link i... | Remove the dependency to django-unittest-depth | Remove the dependency to django-unittest-depth
| Python | bsd-3-clause | remik/django-page-cms,oliciv/django-page-cms,remik/django-page-cms,remik/django-page-cms,pombredanne/django-page-cms-1,batiste/django-page-cms,batiste/django-page-cms,akaihola/django-page-cms,oliciv/django-page-cms,remik/django-page-cms,pombredanne/django-page-cms-1,akaihola/django-page-cms,akaihola/django-page-cms,bat... | """Django page CMS test suite module"""
from djangox.test.depth import alltests
def suite():
return alltests(__file__, __name__)
Remove the dependency to django-unittest-depth | """Django page CMS test suite module"""
import unittest
def suite():
suite = unittest.TestSuite()
from pages.tests.test_functionnal import FunctionnalTestCase
from pages.tests.test_unit import UnitTestCase
from pages.tests.test_regression import RegressionTestCase
from pages.tests.test_pages_link i... | <commit_before>"""Django page CMS test suite module"""
from djangox.test.depth import alltests
def suite():
return alltests(__file__, __name__)
<commit_msg>Remove the dependency to django-unittest-depth<commit_after> | """Django page CMS test suite module"""
import unittest
def suite():
suite = unittest.TestSuite()
from pages.tests.test_functionnal import FunctionnalTestCase
from pages.tests.test_unit import UnitTestCase
from pages.tests.test_regression import RegressionTestCase
from pages.tests.test_pages_link i... | """Django page CMS test suite module"""
from djangox.test.depth import alltests
def suite():
return alltests(__file__, __name__)
Remove the dependency to django-unittest-depth"""Django page CMS test suite module"""
import unittest
def suite():
suite = unittest.TestSuite()
from pages.tests.test_functionnal... | <commit_before>"""Django page CMS test suite module"""
from djangox.test.depth import alltests
def suite():
return alltests(__file__, __name__)
<commit_msg>Remove the dependency to django-unittest-depth<commit_after>"""Django page CMS test suite module"""
import unittest
def suite():
suite = unittest.TestSuit... |
8dccce77f6c08a7c20f38b9f1bacc27b71ab56a1 | examples/web/wiki/macros/utils.py | examples/web/wiki/macros/utils.py | """Utils macros
Utility macros
"""
def macros(macro, environ, *args, **kwargs):
"""Return a list of available macros"""
s = "\n".join(["* %s" % k for k in environ["macros"].keys()])
return environ["parser"].generate(s, environ=environ)
| """Utils macros
Utility macros
"""
from inspect import getdoc
def macros(macro, environ, *args, **kwargs):
"""Return a list of available macros"""
macros = environ["macros"].items()
s = "\n".join(["== %s ==\n%s\n" % (k, getdoc(v)) for k, v in macros])
return environ["parser"].generate(s, environ=en... | Change the output of <<macros>> | examples/web/wiki: Change the output of <<macros>>
| Python | mit | treemo/circuits,eriol/circuits,treemo/circuits,eriol/circuits,nizox/circuits,treemo/circuits,eriol/circuits | """Utils macros
Utility macros
"""
def macros(macro, environ, *args, **kwargs):
"""Return a list of available macros"""
s = "\n".join(["* %s" % k for k in environ["macros"].keys()])
return environ["parser"].generate(s, environ=environ)
examples/web/wiki: Change the output of <<macros>> | """Utils macros
Utility macros
"""
from inspect import getdoc
def macros(macro, environ, *args, **kwargs):
"""Return a list of available macros"""
macros = environ["macros"].items()
s = "\n".join(["== %s ==\n%s\n" % (k, getdoc(v)) for k, v in macros])
return environ["parser"].generate(s, environ=en... | <commit_before>"""Utils macros
Utility macros
"""
def macros(macro, environ, *args, **kwargs):
"""Return a list of available macros"""
s = "\n".join(["* %s" % k for k in environ["macros"].keys()])
return environ["parser"].generate(s, environ=environ)
<commit_msg>examples/web/wiki: Change the output of <... | """Utils macros
Utility macros
"""
from inspect import getdoc
def macros(macro, environ, *args, **kwargs):
"""Return a list of available macros"""
macros = environ["macros"].items()
s = "\n".join(["== %s ==\n%s\n" % (k, getdoc(v)) for k, v in macros])
return environ["parser"].generate(s, environ=en... | """Utils macros
Utility macros
"""
def macros(macro, environ, *args, **kwargs):
"""Return a list of available macros"""
s = "\n".join(["* %s" % k for k in environ["macros"].keys()])
return environ["parser"].generate(s, environ=environ)
examples/web/wiki: Change the output of <<macros>>"""Utils macros
U... | <commit_before>"""Utils macros
Utility macros
"""
def macros(macro, environ, *args, **kwargs):
"""Return a list of available macros"""
s = "\n".join(["* %s" % k for k in environ["macros"].keys()])
return environ["parser"].generate(s, environ=environ)
<commit_msg>examples/web/wiki: Change the output of <... |
38833f68daabe845650250e3edf9cb4b3cc9cb62 | events/templatetags/humantime.py | events/templatetags/humantime.py | # -*- encoding:utf-8 -*-
# Template tag
from django.template.defaultfilters import stringfilter
from datetime import datetime, timedelta
from django import template
register = template.Library()
@register.filter
def event_time(start, end):
today = datetime.today ()
result = ""
if start == today:
... | # -*- encoding:utf-8 -*-
# Template tag
from django.template.defaultfilters import stringfilter
from datetime import datetime, timedelta
from django import template
import locale
register = template.Library()
@register.filter
def event_time(start, end):
today = datetime.today ()
result = ""
# Hack! get t... | Print date in fr_CA locale | hack: Print date in fr_CA locale
| Python | agpl-3.0 | mlhamel/agendadulibre,mlhamel/agendadulibre,vcorreze/agendaEteAccoord,mlhamel/agendadulibre,vcorreze/agendaEteAccoord,vcorreze/agendaEteAccoord | # -*- encoding:utf-8 -*-
# Template tag
from django.template.defaultfilters import stringfilter
from datetime import datetime, timedelta
from django import template
register = template.Library()
@register.filter
def event_time(start, end):
today = datetime.today ()
result = ""
if start == today:
... | # -*- encoding:utf-8 -*-
# Template tag
from django.template.defaultfilters import stringfilter
from datetime import datetime, timedelta
from django import template
import locale
register = template.Library()
@register.filter
def event_time(start, end):
today = datetime.today ()
result = ""
# Hack! get t... | <commit_before># -*- encoding:utf-8 -*-
# Template tag
from django.template.defaultfilters import stringfilter
from datetime import datetime, timedelta
from django import template
register = template.Library()
@register.filter
def event_time(start, end):
today = datetime.today ()
result = ""
if start == ... | # -*- encoding:utf-8 -*-
# Template tag
from django.template.defaultfilters import stringfilter
from datetime import datetime, timedelta
from django import template
import locale
register = template.Library()
@register.filter
def event_time(start, end):
today = datetime.today ()
result = ""
# Hack! get t... | # -*- encoding:utf-8 -*-
# Template tag
from django.template.defaultfilters import stringfilter
from datetime import datetime, timedelta
from django import template
register = template.Library()
@register.filter
def event_time(start, end):
today = datetime.today ()
result = ""
if start == today:
... | <commit_before># -*- encoding:utf-8 -*-
# Template tag
from django.template.defaultfilters import stringfilter
from datetime import datetime, timedelta
from django import template
register = template.Library()
@register.filter
def event_time(start, end):
today = datetime.today ()
result = ""
if start == ... |
e715dd65d3adf74624bc2102afd6a6d8f8706da6 | dlm/models/components/linear.py | dlm/models/components/linear.py | import numpy
import theano
import theano.tensor as T
class Linear():
def __init__(self, rng, input, n_in, n_out, W=None, b=None):
self.input = input
if W is None:
W_values = numpy.asarray(
rng.uniform(
low = -0.01, #low=-numpy.sqrt(6. / (n_in + n_out)),
high = 0.01, #high=numpy.sqrt(6. / (n_in... | import numpy
import theano
import theano.tensor as T
class Linear():
def __init__(self, rng, input, n_in, n_out, W_values=None, b_values=None):
self.input = input
if W_values is None:
W_values = numpy.asarray(
rng.uniform(
low = -0.01, #low=-numpy.sqrt(6. / (n_in + n_out)),
high = 0.01, #high=... | Initialize from argument or using a uniform distribution | Initialize from argument or using a uniform distribution
| Python | mit | nusnlp/corelm | import numpy
import theano
import theano.tensor as T
class Linear():
def __init__(self, rng, input, n_in, n_out, W=None, b=None):
self.input = input
if W is None:
W_values = numpy.asarray(
rng.uniform(
low = -0.01, #low=-numpy.sqrt(6. / (n_in + n_out)),
high = 0.01, #high=numpy.sqrt(6. / (n_in... | import numpy
import theano
import theano.tensor as T
class Linear():
def __init__(self, rng, input, n_in, n_out, W_values=None, b_values=None):
self.input = input
if W_values is None:
W_values = numpy.asarray(
rng.uniform(
low = -0.01, #low=-numpy.sqrt(6. / (n_in + n_out)),
high = 0.01, #high=... | <commit_before>import numpy
import theano
import theano.tensor as T
class Linear():
def __init__(self, rng, input, n_in, n_out, W=None, b=None):
self.input = input
if W is None:
W_values = numpy.asarray(
rng.uniform(
low = -0.01, #low=-numpy.sqrt(6. / (n_in + n_out)),
high = 0.01, #high=numpy.... | import numpy
import theano
import theano.tensor as T
class Linear():
def __init__(self, rng, input, n_in, n_out, W_values=None, b_values=None):
self.input = input
if W_values is None:
W_values = numpy.asarray(
rng.uniform(
low = -0.01, #low=-numpy.sqrt(6. / (n_in + n_out)),
high = 0.01, #high=... | import numpy
import theano
import theano.tensor as T
class Linear():
def __init__(self, rng, input, n_in, n_out, W=None, b=None):
self.input = input
if W is None:
W_values = numpy.asarray(
rng.uniform(
low = -0.01, #low=-numpy.sqrt(6. / (n_in + n_out)),
high = 0.01, #high=numpy.sqrt(6. / (n_in... | <commit_before>import numpy
import theano
import theano.tensor as T
class Linear():
def __init__(self, rng, input, n_in, n_out, W=None, b=None):
self.input = input
if W is None:
W_values = numpy.asarray(
rng.uniform(
low = -0.01, #low=-numpy.sqrt(6. / (n_in + n_out)),
high = 0.01, #high=numpy.... |
e0091310ffdb39127f7138966026445b0bac53fc | salt/states/rdp.py | salt/states/rdp.py | # -*- coding: utf-8 -*-
'''
Manage RDP Service on Windows servers
'''
def __virtual__():
'''
Load only if network_win is loaded
'''
return 'rdp' if 'rdp.enable' in __salt__ else False
def enabled(name):
'''
Enable RDP the service on the server
'''
ret = {'name': name,
'res... | # -*- coding: utf-8 -*-
'''
Manage RDP Service on Windows servers
'''
def __virtual__():
'''
Load only if network_win is loaded
'''
return 'rdp' if 'rdp.enable' in __salt__ else False
def enabled(name):
'''
Enable RDP the service on the server
'''
ret = {'name': name,
'res... | Return proper results for 'test=True' | Return proper results for 'test=True'
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | # -*- coding: utf-8 -*-
'''
Manage RDP Service on Windows servers
'''
def __virtual__():
'''
Load only if network_win is loaded
'''
return 'rdp' if 'rdp.enable' in __salt__ else False
def enabled(name):
'''
Enable RDP the service on the server
'''
ret = {'name': name,
'res... | # -*- coding: utf-8 -*-
'''
Manage RDP Service on Windows servers
'''
def __virtual__():
'''
Load only if network_win is loaded
'''
return 'rdp' if 'rdp.enable' in __salt__ else False
def enabled(name):
'''
Enable RDP the service on the server
'''
ret = {'name': name,
'res... | <commit_before># -*- coding: utf-8 -*-
'''
Manage RDP Service on Windows servers
'''
def __virtual__():
'''
Load only if network_win is loaded
'''
return 'rdp' if 'rdp.enable' in __salt__ else False
def enabled(name):
'''
Enable RDP the service on the server
'''
ret = {'name': name,
... | # -*- coding: utf-8 -*-
'''
Manage RDP Service on Windows servers
'''
def __virtual__():
'''
Load only if network_win is loaded
'''
return 'rdp' if 'rdp.enable' in __salt__ else False
def enabled(name):
'''
Enable RDP the service on the server
'''
ret = {'name': name,
'res... | # -*- coding: utf-8 -*-
'''
Manage RDP Service on Windows servers
'''
def __virtual__():
'''
Load only if network_win is loaded
'''
return 'rdp' if 'rdp.enable' in __salt__ else False
def enabled(name):
'''
Enable RDP the service on the server
'''
ret = {'name': name,
'res... | <commit_before># -*- coding: utf-8 -*-
'''
Manage RDP Service on Windows servers
'''
def __virtual__():
'''
Load only if network_win is loaded
'''
return 'rdp' if 'rdp.enable' in __salt__ else False
def enabled(name):
'''
Enable RDP the service on the server
'''
ret = {'name': name,
... |
1a3c251abe2e8ebf3020a21a3449abae6b04c2b1 | perf/tests/test_system.py | perf/tests/test_system.py | import os.path
import sys
from perf.tests import get_output
from perf.tests import unittest
class SystemTests(unittest.TestCase):
def test_show(self):
args = [sys.executable, '-m', 'perf', 'system', 'show']
proc = get_output(args)
regex = ('(Run "%s -m perf system tune" to tune the syste... | import os.path
import sys
from perf.tests import get_output
from perf.tests import unittest
class SystemTests(unittest.TestCase):
def test_show(self):
args = [sys.executable, '-m', 'perf', 'system', 'show']
proc = get_output(args)
regex = ('(Run "%s -m perf system tune" to tune the syste... | Fix test_show test to support tuned systems | Fix test_show test to support tuned systems
| Python | mit | vstinner/pyperf,haypo/perf | import os.path
import sys
from perf.tests import get_output
from perf.tests import unittest
class SystemTests(unittest.TestCase):
def test_show(self):
args = [sys.executable, '-m', 'perf', 'system', 'show']
proc = get_output(args)
regex = ('(Run "%s -m perf system tune" to tune the syste... | import os.path
import sys
from perf.tests import get_output
from perf.tests import unittest
class SystemTests(unittest.TestCase):
def test_show(self):
args = [sys.executable, '-m', 'perf', 'system', 'show']
proc = get_output(args)
regex = ('(Run "%s -m perf system tune" to tune the syste... | <commit_before>import os.path
import sys
from perf.tests import get_output
from perf.tests import unittest
class SystemTests(unittest.TestCase):
def test_show(self):
args = [sys.executable, '-m', 'perf', 'system', 'show']
proc = get_output(args)
regex = ('(Run "%s -m perf system tune" to... | import os.path
import sys
from perf.tests import get_output
from perf.tests import unittest
class SystemTests(unittest.TestCase):
def test_show(self):
args = [sys.executable, '-m', 'perf', 'system', 'show']
proc = get_output(args)
regex = ('(Run "%s -m perf system tune" to tune the syste... | import os.path
import sys
from perf.tests import get_output
from perf.tests import unittest
class SystemTests(unittest.TestCase):
def test_show(self):
args = [sys.executable, '-m', 'perf', 'system', 'show']
proc = get_output(args)
regex = ('(Run "%s -m perf system tune" to tune the syste... | <commit_before>import os.path
import sys
from perf.tests import get_output
from perf.tests import unittest
class SystemTests(unittest.TestCase):
def test_show(self):
args = [sys.executable, '-m', 'perf', 'system', 'show']
proc = get_output(args)
regex = ('(Run "%s -m perf system tune" to... |
141eb2a647490142adf017d3a755d03ab89ed687 | jrnl/plugins/tag_exporter.py | jrnl/plugins/tag_exporter.py | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
from .text_exporter import TextExporter
from .util import get_tags_count
class TagExporter(TextExporter):
"""This Exporter can convert entries and journals into json."""
names = ["tags"]
extension = "tags"
... | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
from .text_exporter import TextExporter
from .util import get_tags_count
class TagExporter(TextExporter):
"""This Exporter can lists the tags for entries and journals, exported as a plain text file."""
names = ["... | Update `Tag` exporter code documentation. | Update `Tag` exporter code documentation.
| Python | mit | maebert/jrnl,notbalanced/jrnl,philipsd6/jrnl,MinchinWeb/jrnl | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
from .text_exporter import TextExporter
from .util import get_tags_count
class TagExporter(TextExporter):
"""This Exporter can convert entries and journals into json."""
names = ["tags"]
extension = "tags"
... | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
from .text_exporter import TextExporter
from .util import get_tags_count
class TagExporter(TextExporter):
"""This Exporter can lists the tags for entries and journals, exported as a plain text file."""
names = ["... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
from .text_exporter import TextExporter
from .util import get_tags_count
class TagExporter(TextExporter):
"""This Exporter can convert entries and journals into json."""
names = ["tags"]
extens... | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
from .text_exporter import TextExporter
from .util import get_tags_count
class TagExporter(TextExporter):
"""This Exporter can lists the tags for entries and journals, exported as a plain text file."""
names = ["... | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
from .text_exporter import TextExporter
from .util import get_tags_count
class TagExporter(TextExporter):
"""This Exporter can convert entries and journals into json."""
names = ["tags"]
extension = "tags"
... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
from .text_exporter import TextExporter
from .util import get_tags_count
class TagExporter(TextExporter):
"""This Exporter can convert entries and journals into json."""
names = ["tags"]
extens... |
093c9065de9e0e08f248bbb84696bf30309bd536 | examples/parallel/timer.py | examples/parallel/timer.py | import rx
import concurrent.futures
import time
seconds = [5, 1, 2, 4, 3]
def sleep(t):
time.sleep(t)
return t
def output(result):
print '%d seconds' % result
with concurrent.futures.ProcessPoolExecutor(5) as executor:
rx.Observable.from_(seconds).flat_map(
lambda s: executor.submit(sleep,... | from __future__ import print_function
import rx
import concurrent.futures
import time
seconds = [5, 1, 2, 4, 3]
def sleep(t):
time.sleep(t)
return t
def output(result):
print('%d seconds' % result)
with concurrent.futures.ProcessPoolExecutor(5) as executor:
rx.Observable.from_(seconds).flat_map(
... | Fix parallel example for Python 3 | Fix parallel example for Python 3
| Python | mit | dbrattli/RxPY,ReactiveX/RxPY,ReactiveX/RxPY | import rx
import concurrent.futures
import time
seconds = [5, 1, 2, 4, 3]
def sleep(t):
time.sleep(t)
return t
def output(result):
print '%d seconds' % result
with concurrent.futures.ProcessPoolExecutor(5) as executor:
rx.Observable.from_(seconds).flat_map(
lambda s: executor.submit(sleep,... | from __future__ import print_function
import rx
import concurrent.futures
import time
seconds = [5, 1, 2, 4, 3]
def sleep(t):
time.sleep(t)
return t
def output(result):
print('%d seconds' % result)
with concurrent.futures.ProcessPoolExecutor(5) as executor:
rx.Observable.from_(seconds).flat_map(
... | <commit_before>import rx
import concurrent.futures
import time
seconds = [5, 1, 2, 4, 3]
def sleep(t):
time.sleep(t)
return t
def output(result):
print '%d seconds' % result
with concurrent.futures.ProcessPoolExecutor(5) as executor:
rx.Observable.from_(seconds).flat_map(
lambda s: executo... | from __future__ import print_function
import rx
import concurrent.futures
import time
seconds = [5, 1, 2, 4, 3]
def sleep(t):
time.sleep(t)
return t
def output(result):
print('%d seconds' % result)
with concurrent.futures.ProcessPoolExecutor(5) as executor:
rx.Observable.from_(seconds).flat_map(
... | import rx
import concurrent.futures
import time
seconds = [5, 1, 2, 4, 3]
def sleep(t):
time.sleep(t)
return t
def output(result):
print '%d seconds' % result
with concurrent.futures.ProcessPoolExecutor(5) as executor:
rx.Observable.from_(seconds).flat_map(
lambda s: executor.submit(sleep,... | <commit_before>import rx
import concurrent.futures
import time
seconds = [5, 1, 2, 4, 3]
def sleep(t):
time.sleep(t)
return t
def output(result):
print '%d seconds' % result
with concurrent.futures.ProcessPoolExecutor(5) as executor:
rx.Observable.from_(seconds).flat_map(
lambda s: executo... |
efeb8bbf351f8c2c25be15b5ca32d5f76ebdd4ef | launch_control/models/hw_device.py | launch_control/models/hw_device.py | """
Module with the HardwareDevice model.
"""
from launch_control.utils.json import PlainOldData
class HardwareDevice(PlainOldData):
"""
Model representing any HardwareDevice
A device is just a "device_type" attribute with a bag of properties
and a human readable description. Individual device types... | """
Module with the HardwareDevice model.
"""
from launch_control.utils.json import PlainOldData
class HardwareDevice(PlainOldData):
"""
Model representing any HardwareDevice
A device is just a "device_type" attribute with a bag of properties
and a human readable description. Individual device types... | Fix slot name in HardwareDevice | Fix slot name in HardwareDevice
| Python | agpl-3.0 | Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,OSSystems/lava-server | """
Module with the HardwareDevice model.
"""
from launch_control.utils.json import PlainOldData
class HardwareDevice(PlainOldData):
"""
Model representing any HardwareDevice
A device is just a "device_type" attribute with a bag of properties
and a human readable description. Individual device types... | """
Module with the HardwareDevice model.
"""
from launch_control.utils.json import PlainOldData
class HardwareDevice(PlainOldData):
"""
Model representing any HardwareDevice
A device is just a "device_type" attribute with a bag of properties
and a human readable description. Individual device types... | <commit_before>"""
Module with the HardwareDevice model.
"""
from launch_control.utils.json import PlainOldData
class HardwareDevice(PlainOldData):
"""
Model representing any HardwareDevice
A device is just a "device_type" attribute with a bag of properties
and a human readable description. Individu... | """
Module with the HardwareDevice model.
"""
from launch_control.utils.json import PlainOldData
class HardwareDevice(PlainOldData):
"""
Model representing any HardwareDevice
A device is just a "device_type" attribute with a bag of properties
and a human readable description. Individual device types... | """
Module with the HardwareDevice model.
"""
from launch_control.utils.json import PlainOldData
class HardwareDevice(PlainOldData):
"""
Model representing any HardwareDevice
A device is just a "device_type" attribute with a bag of properties
and a human readable description. Individual device types... | <commit_before>"""
Module with the HardwareDevice model.
"""
from launch_control.utils.json import PlainOldData
class HardwareDevice(PlainOldData):
"""
Model representing any HardwareDevice
A device is just a "device_type" attribute with a bag of properties
and a human readable description. Individu... |
351dd3d0540b6169a58897f9cb2ec6b1c20d57a5 | core/forms/games.py | core/forms/games.py | from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, HTML, Submit, Button, Fieldset
from django.forms import ModelForm, Textarea
from core.models import Game
class GameForm(ModelForm):
class Meta:
model = Game
exclude = [... | from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, HTML, Submit, Button, Fieldset
from django.forms import ModelForm, Textarea
from core.models import Game
class GameForm(ModelForm):
class Meta:
model = Game
exclude = [... | Remove unused field from game form | Remove unused field from game form
| Python | mit | joshsamara/game-website,joshsamara/game-website,joshsamara/game-website | from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, HTML, Submit, Button, Fieldset
from django.forms import ModelForm, Textarea
from core.models import Game
class GameForm(ModelForm):
class Meta:
model = Game
exclude = [... | from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, HTML, Submit, Button, Fieldset
from django.forms import ModelForm, Textarea
from core.models import Game
class GameForm(ModelForm):
class Meta:
model = Game
exclude = [... | <commit_before>from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, HTML, Submit, Button, Fieldset
from django.forms import ModelForm, Textarea
from core.models import Game
class GameForm(ModelForm):
class Meta:
model = Game
... | from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, HTML, Submit, Button, Fieldset
from django.forms import ModelForm, Textarea
from core.models import Game
class GameForm(ModelForm):
class Meta:
model = Game
exclude = [... | from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, HTML, Submit, Button, Fieldset
from django.forms import ModelForm, Textarea
from core.models import Game
class GameForm(ModelForm):
class Meta:
model = Game
exclude = [... | <commit_before>from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, HTML, Submit, Button, Fieldset
from django.forms import ModelForm, Textarea
from core.models import Game
class GameForm(ModelForm):
class Meta:
model = Game
... |
26b66a830fd9322dcc826fee2f1924670ea6c976 | tests/functional/test_requests.py | tests/functional/test_requests.py | import pytest
from tests.lib import PipTestEnvironment
@pytest.mark.network
def test_timeout(script: PipTestEnvironment) -> None:
result = script.pip(
"--timeout",
"0.0001",
"install",
"-vvv",
"INITools",
expect_error=True,
)
assert (
"Could not fet... | import pytest
from tests.lib import PipTestEnvironment
@pytest.mark.network
def test_timeout(script: PipTestEnvironment) -> None:
result = script.pip(
"--timeout",
"0.00001",
"install",
"-vvv",
"INITools",
expect_error=True,
)
assert (
"Could not fe... | Decrease timeout to make test less flaky | Decrease timeout to make test less flaky
| Python | mit | pypa/pip,pradyunsg/pip,sbidoul/pip,sbidoul/pip,pfmoore/pip,pradyunsg/pip,pypa/pip,pfmoore/pip | import pytest
from tests.lib import PipTestEnvironment
@pytest.mark.network
def test_timeout(script: PipTestEnvironment) -> None:
result = script.pip(
"--timeout",
"0.0001",
"install",
"-vvv",
"INITools",
expect_error=True,
)
assert (
"Could not fet... | import pytest
from tests.lib import PipTestEnvironment
@pytest.mark.network
def test_timeout(script: PipTestEnvironment) -> None:
result = script.pip(
"--timeout",
"0.00001",
"install",
"-vvv",
"INITools",
expect_error=True,
)
assert (
"Could not fe... | <commit_before>import pytest
from tests.lib import PipTestEnvironment
@pytest.mark.network
def test_timeout(script: PipTestEnvironment) -> None:
result = script.pip(
"--timeout",
"0.0001",
"install",
"-vvv",
"INITools",
expect_error=True,
)
assert (
... | import pytest
from tests.lib import PipTestEnvironment
@pytest.mark.network
def test_timeout(script: PipTestEnvironment) -> None:
result = script.pip(
"--timeout",
"0.00001",
"install",
"-vvv",
"INITools",
expect_error=True,
)
assert (
"Could not fe... | import pytest
from tests.lib import PipTestEnvironment
@pytest.mark.network
def test_timeout(script: PipTestEnvironment) -> None:
result = script.pip(
"--timeout",
"0.0001",
"install",
"-vvv",
"INITools",
expect_error=True,
)
assert (
"Could not fet... | <commit_before>import pytest
from tests.lib import PipTestEnvironment
@pytest.mark.network
def test_timeout(script: PipTestEnvironment) -> None:
result = script.pip(
"--timeout",
"0.0001",
"install",
"-vvv",
"INITools",
expect_error=True,
)
assert (
... |
51f6272870e4e72d2364b2c2f660457b5c9286ef | doc/sample_code/search_forking_pro.py | doc/sample_code/search_forking_pro.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
sys.path.append('./../../')
from pyogi.ki2converter import *
from pyogi.kifu import *
if __name__ == '__main__':
for n in range(0, 50000):
n1 = (n // 10000)
n2 = int(n < 10000)
relpath = '~/data/shogi/2chkifu/{... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import pandas as pd
sys.path.append('./../../')
from pyogi.ki2converter import *
from pyogi.kifu import *
if __name__ == '__main__':
res_table = []
for n in range(0, 50000):
n1 = (n // 10000)
n2 = int(n < 10000)
... | Add sum up part using pd.crosstab | Add sum up part using pd.crosstab
| Python | mit | tosh1ki/pyogi,tosh1ki/pyogi | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
sys.path.append('./../../')
from pyogi.ki2converter import *
from pyogi.kifu import *
if __name__ == '__main__':
for n in range(0, 50000):
n1 = (n // 10000)
n2 = int(n < 10000)
relpath = '~/data/shogi/2chkifu/{... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import pandas as pd
sys.path.append('./../../')
from pyogi.ki2converter import *
from pyogi.kifu import *
if __name__ == '__main__':
res_table = []
for n in range(0, 50000):
n1 = (n // 10000)
n2 = int(n < 10000)
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
sys.path.append('./../../')
from pyogi.ki2converter import *
from pyogi.kifu import *
if __name__ == '__main__':
for n in range(0, 50000):
n1 = (n // 10000)
n2 = int(n < 10000)
relpath = '~/data/... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import pandas as pd
sys.path.append('./../../')
from pyogi.ki2converter import *
from pyogi.kifu import *
if __name__ == '__main__':
res_table = []
for n in range(0, 50000):
n1 = (n // 10000)
n2 = int(n < 10000)
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
sys.path.append('./../../')
from pyogi.ki2converter import *
from pyogi.kifu import *
if __name__ == '__main__':
for n in range(0, 50000):
n1 = (n // 10000)
n2 = int(n < 10000)
relpath = '~/data/shogi/2chkifu/{... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
sys.path.append('./../../')
from pyogi.ki2converter import *
from pyogi.kifu import *
if __name__ == '__main__':
for n in range(0, 50000):
n1 = (n // 10000)
n2 = int(n < 10000)
relpath = '~/data/... |
4db93f27d6d4f9b05b33af96bff15108272df6ce | src/webapp/public.py | src/webapp/public.py | import json
from flask import Blueprint, render_template
import database as db
from database.model import Team
bp = Blueprint('public', __name__)
@bp.route("/map")
def map_page():
return render_template("public/map.html")
@bp.route("/map_teams")
def map_teams():
qry = db.session.query(Team).filter_by(conf... | import json
from flask import Blueprint, render_template
import database as db
from database.model import Team
bp = Blueprint('public', __name__)
@bp.route("/map")
def map_page():
return render_template("public/map.html")
@bp.route("/map_teams")
def map_teams():
qry = db.session.query(Team).filter_by(conf... | Add multi team output in markers | Add multi team output in markers
Signed-off-by: Dominik Pataky <[email protected]>
| Python | bsd-3-clause | eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system | import json
from flask import Blueprint, render_template
import database as db
from database.model import Team
bp = Blueprint('public', __name__)
@bp.route("/map")
def map_page():
return render_template("public/map.html")
@bp.route("/map_teams")
def map_teams():
qry = db.session.query(Team).filter_by(conf... | import json
from flask import Blueprint, render_template
import database as db
from database.model import Team
bp = Blueprint('public', __name__)
@bp.route("/map")
def map_page():
return render_template("public/map.html")
@bp.route("/map_teams")
def map_teams():
qry = db.session.query(Team).filter_by(conf... | <commit_before>import json
from flask import Blueprint, render_template
import database as db
from database.model import Team
bp = Blueprint('public', __name__)
@bp.route("/map")
def map_page():
return render_template("public/map.html")
@bp.route("/map_teams")
def map_teams():
qry = db.session.query(Team)... | import json
from flask import Blueprint, render_template
import database as db
from database.model import Team
bp = Blueprint('public', __name__)
@bp.route("/map")
def map_page():
return render_template("public/map.html")
@bp.route("/map_teams")
def map_teams():
qry = db.session.query(Team).filter_by(conf... | import json
from flask import Blueprint, render_template
import database as db
from database.model import Team
bp = Blueprint('public', __name__)
@bp.route("/map")
def map_page():
return render_template("public/map.html")
@bp.route("/map_teams")
def map_teams():
qry = db.session.query(Team).filter_by(conf... | <commit_before>import json
from flask import Blueprint, render_template
import database as db
from database.model import Team
bp = Blueprint('public', __name__)
@bp.route("/map")
def map_page():
return render_template("public/map.html")
@bp.route("/map_teams")
def map_teams():
qry = db.session.query(Team)... |
3885e8fd36f419976d0b002c391dc246588929c7 | admin/metrics/views.py | admin/metrics/views.py | from django.views.generic import TemplateView
from admin.base.settings import KEEN_CREDENTIALS
from admin.base.utils import OSFAdmin
class MetricsView(OSFAdmin, TemplateView):
template_name = 'metrics/osf_metrics.html'
def get_context_data(self, **kwargs):
kwargs.update(KEEN_CREDENTIALS.copy())
... | from django.views.generic import TemplateView
from django.contrib.auth.mixins import PermissionRequiredMixin
from admin.base.settings import KEEN_CREDENTIALS
from admin.base.utils import OSFAdmin
class MetricsView(OSFAdmin, TemplateView, PermissionRequiredMixin):
template_name = 'metrics/osf_metrics.html'
... | Add view metrics permission to metrics view | Add view metrics permission to metrics view
| Python | apache-2.0 | sloria/osf.io,monikagrabowska/osf.io,brianjgeiger/osf.io,sloria/osf.io,erinspace/osf.io,TomBaxter/osf.io,mfraezz/osf.io,chrisseto/osf.io,crcresearch/osf.io,adlius/osf.io,laurenrevere/osf.io,monikagrabowska/osf.io,acshi/osf.io,crcresearch/osf.io,cwisecarver/osf.io,icereval/osf.io,cwisecarver/osf.io,aaxelb/osf.io,adlius/... | from django.views.generic import TemplateView
from admin.base.settings import KEEN_CREDENTIALS
from admin.base.utils import OSFAdmin
class MetricsView(OSFAdmin, TemplateView):
template_name = 'metrics/osf_metrics.html'
def get_context_data(self, **kwargs):
kwargs.update(KEEN_CREDENTIALS.copy())
... | from django.views.generic import TemplateView
from django.contrib.auth.mixins import PermissionRequiredMixin
from admin.base.settings import KEEN_CREDENTIALS
from admin.base.utils import OSFAdmin
class MetricsView(OSFAdmin, TemplateView, PermissionRequiredMixin):
template_name = 'metrics/osf_metrics.html'
... | <commit_before>from django.views.generic import TemplateView
from admin.base.settings import KEEN_CREDENTIALS
from admin.base.utils import OSFAdmin
class MetricsView(OSFAdmin, TemplateView):
template_name = 'metrics/osf_metrics.html'
def get_context_data(self, **kwargs):
kwargs.update(KEEN_CREDEN... | from django.views.generic import TemplateView
from django.contrib.auth.mixins import PermissionRequiredMixin
from admin.base.settings import KEEN_CREDENTIALS
from admin.base.utils import OSFAdmin
class MetricsView(OSFAdmin, TemplateView, PermissionRequiredMixin):
template_name = 'metrics/osf_metrics.html'
... | from django.views.generic import TemplateView
from admin.base.settings import KEEN_CREDENTIALS
from admin.base.utils import OSFAdmin
class MetricsView(OSFAdmin, TemplateView):
template_name = 'metrics/osf_metrics.html'
def get_context_data(self, **kwargs):
kwargs.update(KEEN_CREDENTIALS.copy())
... | <commit_before>from django.views.generic import TemplateView
from admin.base.settings import KEEN_CREDENTIALS
from admin.base.utils import OSFAdmin
class MetricsView(OSFAdmin, TemplateView):
template_name = 'metrics/osf_metrics.html'
def get_context_data(self, **kwargs):
kwargs.update(KEEN_CREDEN... |
d10720d1dd7997b5e1543cb27f2cd3e1088f30f5 | server/fulltext.py | server/fulltext.py | #!/usr/bin/env python
# encoding: utf-8
"""
"""
from bottle import route, run, template, request
import urllib2
import urllib
import sys
import os
from whoosh.index import create_in, open_dir
from whoosh.fields import *
from whoosh.qparser import QueryParser, MultifieldParser
from whoosh.query import *
@route('/')
... | #!/usr/bin/env python
# encoding: utf-8
"""
"""
from bottle import route, run, template, request
import urllib2
import urllib
import sys
import os
from whoosh.index import create_in, open_dir
from whoosh.fields import *
from whoosh.qparser import QueryParser, MultifieldParser
from whoosh.query import *
@route('/')
... | Add advanced search by select type or status | Add advanced search by select type or status
| Python | bsd-2-clause | klokantech/epsg.io,dudaerich/epsg.io,dudaerich/epsg.io,klokantech/epsg.io,klokantech/epsg.io,dudaerich/epsg.io,dudaerich/epsg.io,klokantech/epsg.io | #!/usr/bin/env python
# encoding: utf-8
"""
"""
from bottle import route, run, template, request
import urllib2
import urllib
import sys
import os
from whoosh.index import create_in, open_dir
from whoosh.fields import *
from whoosh.qparser import QueryParser, MultifieldParser
from whoosh.query import *
@route('/')
... | #!/usr/bin/env python
# encoding: utf-8
"""
"""
from bottle import route, run, template, request
import urllib2
import urllib
import sys
import os
from whoosh.index import create_in, open_dir
from whoosh.fields import *
from whoosh.qparser import QueryParser, MultifieldParser
from whoosh.query import *
@route('/')
... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
"""
"""
from bottle import route, run, template, request
import urllib2
import urllib
import sys
import os
from whoosh.index import create_in, open_dir
from whoosh.fields import *
from whoosh.qparser import QueryParser, MultifieldParser
from whoosh.query import *... | #!/usr/bin/env python
# encoding: utf-8
"""
"""
from bottle import route, run, template, request
import urllib2
import urllib
import sys
import os
from whoosh.index import create_in, open_dir
from whoosh.fields import *
from whoosh.qparser import QueryParser, MultifieldParser
from whoosh.query import *
@route('/')
... | #!/usr/bin/env python
# encoding: utf-8
"""
"""
from bottle import route, run, template, request
import urllib2
import urllib
import sys
import os
from whoosh.index import create_in, open_dir
from whoosh.fields import *
from whoosh.qparser import QueryParser, MultifieldParser
from whoosh.query import *
@route('/')
... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
"""
"""
from bottle import route, run, template, request
import urllib2
import urllib
import sys
import os
from whoosh.index import create_in, open_dir
from whoosh.fields import *
from whoosh.qparser import QueryParser, MultifieldParser
from whoosh.query import *... |
a01a3f9c07e0e5d93fc664df118c6085668410c1 | test/test_url_subcommand.py | test/test_url_subcommand.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
import responses
import simplesqlite
from click.testing import CliRunner
from sqlitebiter._enum import ExitCode
from sqlitebiter.sqlitebiter import cmd
from .common import print_traceback
... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
import responses
import simplesqlite
from click.testing import CliRunner
from sqlitebiter._enum import ExitCode
from sqlitebiter.sqlitebiter import cmd
from .common import print_traceback
... | Fix a test class name | Fix a test class name
| Python | mit | thombashi/sqlitebiter,thombashi/sqlitebiter | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
import responses
import simplesqlite
from click.testing import CliRunner
from sqlitebiter._enum import ExitCode
from sqlitebiter.sqlitebiter import cmd
from .common import print_traceback
... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
import responses
import simplesqlite
from click.testing import CliRunner
from sqlitebiter._enum import ExitCode
from sqlitebiter.sqlitebiter import cmd
from .common import print_traceback
... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
import responses
import simplesqlite
from click.testing import CliRunner
from sqlitebiter._enum import ExitCode
from sqlitebiter.sqlitebiter import cmd
from .common import p... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
import responses
import simplesqlite
from click.testing import CliRunner
from sqlitebiter._enum import ExitCode
from sqlitebiter.sqlitebiter import cmd
from .common import print_traceback
... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
import responses
import simplesqlite
from click.testing import CliRunner
from sqlitebiter._enum import ExitCode
from sqlitebiter.sqlitebiter import cmd
from .common import print_traceback
... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
import responses
import simplesqlite
from click.testing import CliRunner
from sqlitebiter._enum import ExitCode
from sqlitebiter.sqlitebiter import cmd
from .common import p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.