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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
952550b344e96236995ac72eaa0777fd356f21e2 | infinity.py | infinity.py | try:
from functools import total_ordering
except ImportError:
# Use Python 2.6 port
from total_ordering import total_ordering
@total_ordering
class Infinity(object):
"""
An object that is greater than any other object (except itself).
Inspired by https://pypi.python.org/pypi/Extremes
Exa... | try:
from functools import total_ordering
except ImportError:
# Use Python 2.6 port
from total_ordering import total_ordering
@total_ordering
class Infinity(object):
"""
An object that is greater than any other object (except itself).
Inspired by https://pypi.python.org/pypi/Extremes
Exa... | Add float coercion, datetime comparison support | Add float coercion, datetime comparison support
| Python | bsd-3-clause | kvesteri/infinity | try:
from functools import total_ordering
except ImportError:
# Use Python 2.6 port
from total_ordering import total_ordering
@total_ordering
class Infinity(object):
"""
An object that is greater than any other object (except itself).
Inspired by https://pypi.python.org/pypi/Extremes
Exa... | try:
from functools import total_ordering
except ImportError:
# Use Python 2.6 port
from total_ordering import total_ordering
@total_ordering
class Infinity(object):
"""
An object that is greater than any other object (except itself).
Inspired by https://pypi.python.org/pypi/Extremes
Exa... | <commit_before>try:
from functools import total_ordering
except ImportError:
# Use Python 2.6 port
from total_ordering import total_ordering
@total_ordering
class Infinity(object):
"""
An object that is greater than any other object (except itself).
Inspired by https://pypi.python.org/pypi/Ex... | try:
from functools import total_ordering
except ImportError:
# Use Python 2.6 port
from total_ordering import total_ordering
@total_ordering
class Infinity(object):
"""
An object that is greater than any other object (except itself).
Inspired by https://pypi.python.org/pypi/Extremes
Exa... | try:
from functools import total_ordering
except ImportError:
# Use Python 2.6 port
from total_ordering import total_ordering
@total_ordering
class Infinity(object):
"""
An object that is greater than any other object (except itself).
Inspired by https://pypi.python.org/pypi/Extremes
Exa... | <commit_before>try:
from functools import total_ordering
except ImportError:
# Use Python 2.6 port
from total_ordering import total_ordering
@total_ordering
class Infinity(object):
"""
An object that is greater than any other object (except itself).
Inspired by https://pypi.python.org/pypi/Ex... |
8e01ce70a76811152a86c461fc7235a58dc7f5e3 | cc/license/formatters/rdfa.py | cc/license/formatters/rdfa.py | from cc.license.interfaces import ILicenseFormatter
import zope.interface
class Formatter(object):
zope.interface.implements(ILicenseFormatter)
id = "HTML + RDFa formatter"
def format(self, license, work_dict = {}, locale = 'en'):
"""Return a string serialization for the license, optionally
... | from cc.license.lib.interfaces import ILicenseFormatter
import zope.interface
class Formatter(object):
zope.interface.implements(ILicenseFormatter)
id = "HTML + RDFa formatter"
def format(self, license, work_dict = {}, locale = 'en'):
"""Return a string serialization for the license, optionally
... | Make imports work for formatters module. | Make imports work for formatters module.
| Python | mit | creativecommons/cc.license,creativecommons/cc.license | from cc.license.interfaces import ILicenseFormatter
import zope.interface
class Formatter(object):
zope.interface.implements(ILicenseFormatter)
id = "HTML + RDFa formatter"
def format(self, license, work_dict = {}, locale = 'en'):
"""Return a string serialization for the license, optionally
... | from cc.license.lib.interfaces import ILicenseFormatter
import zope.interface
class Formatter(object):
zope.interface.implements(ILicenseFormatter)
id = "HTML + RDFa formatter"
def format(self, license, work_dict = {}, locale = 'en'):
"""Return a string serialization for the license, optionally
... | <commit_before>from cc.license.interfaces import ILicenseFormatter
import zope.interface
class Formatter(object):
zope.interface.implements(ILicenseFormatter)
id = "HTML + RDFa formatter"
def format(self, license, work_dict = {}, locale = 'en'):
"""Return a string serialization for the license, opt... | from cc.license.lib.interfaces import ILicenseFormatter
import zope.interface
class Formatter(object):
zope.interface.implements(ILicenseFormatter)
id = "HTML + RDFa formatter"
def format(self, license, work_dict = {}, locale = 'en'):
"""Return a string serialization for the license, optionally
... | from cc.license.interfaces import ILicenseFormatter
import zope.interface
class Formatter(object):
zope.interface.implements(ILicenseFormatter)
id = "HTML + RDFa formatter"
def format(self, license, work_dict = {}, locale = 'en'):
"""Return a string serialization for the license, optionally
... | <commit_before>from cc.license.interfaces import ILicenseFormatter
import zope.interface
class Formatter(object):
zope.interface.implements(ILicenseFormatter)
id = "HTML + RDFa formatter"
def format(self, license, work_dict = {}, locale = 'en'):
"""Return a string serialization for the license, opt... |
4334cbf05da1c1f6a6a984e1a062a7e8f252b664 | components/includes/utilities.py | components/includes/utilities.py | import random
import json
import time
import SocketExtend as SockExt
import config as conf
import parser as p
def ping(sock):
try:
rand = random.randint(1, 99999)
data = {'request':'ping', 'contents': {'value':rand}}
SockExt.send_msg(sock, json.dumps(data))
result = json.loads(SockExt.recv_msg(sock))
if ... | import random
import json
import time
import socket
import SocketExtend as SockExt
import config as conf
import parser as p
def ping(sock):
try:
rand = random.randint(1, 99999)
data = {'request':'ping', 'contents': {'value':rand}}
SockExt.send_msg(sock, json.dumps(data))
result = json.loads(SockExt.recv_msg(... | Clean up, comments, liveness checking, robust data transfer | Clean up, comments, liveness checking, robust data transfer
| Python | bsd-2-clause | mavroudisv/Crux | import random
import json
import time
import SocketExtend as SockExt
import config as conf
import parser as p
def ping(sock):
try:
rand = random.randint(1, 99999)
data = {'request':'ping', 'contents': {'value':rand}}
SockExt.send_msg(sock, json.dumps(data))
result = json.loads(SockExt.recv_msg(sock))
if ... | import random
import json
import time
import socket
import SocketExtend as SockExt
import config as conf
import parser as p
def ping(sock):
try:
rand = random.randint(1, 99999)
data = {'request':'ping', 'contents': {'value':rand}}
SockExt.send_msg(sock, json.dumps(data))
result = json.loads(SockExt.recv_msg(... | <commit_before>import random
import json
import time
import SocketExtend as SockExt
import config as conf
import parser as p
def ping(sock):
try:
rand = random.randint(1, 99999)
data = {'request':'ping', 'contents': {'value':rand}}
SockExt.send_msg(sock, json.dumps(data))
result = json.loads(SockExt.recv_msg... | import random
import json
import time
import socket
import SocketExtend as SockExt
import config as conf
import parser as p
def ping(sock):
try:
rand = random.randint(1, 99999)
data = {'request':'ping', 'contents': {'value':rand}}
SockExt.send_msg(sock, json.dumps(data))
result = json.loads(SockExt.recv_msg(... | import random
import json
import time
import SocketExtend as SockExt
import config as conf
import parser as p
def ping(sock):
try:
rand = random.randint(1, 99999)
data = {'request':'ping', 'contents': {'value':rand}}
SockExt.send_msg(sock, json.dumps(data))
result = json.loads(SockExt.recv_msg(sock))
if ... | <commit_before>import random
import json
import time
import SocketExtend as SockExt
import config as conf
import parser as p
def ping(sock):
try:
rand = random.randint(1, 99999)
data = {'request':'ping', 'contents': {'value':rand}}
SockExt.send_msg(sock, json.dumps(data))
result = json.loads(SockExt.recv_msg... |
c538e1a673e208030db04ab9ad3b97e962f3e2ac | download_summaries.py | download_summaries.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# setting target dir and time interval of interest
tgt_dir = r"D:\nhl\official_and_json\2016-17"
tgt_dir = r"d:\tmp\test"
date = "2017/05/01"
to_date = "2017/05/01"
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import argparse
from datetime import datetime
from dateutil.parser import parse
from dateutil.relativedelta import relativedelta
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# retrieving arguments specified on command ... | Allow control of download process via command line | Allow control of download process via command line
| Python | mit | leaffan/pynhldb | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# setting target dir and time interval of interest
tgt_dir = r"D:\nhl\official_and_json\2016-17"
tgt_dir = r"d:\tmp\test"
date = "2017/05/01"
to_date = "2017/05/01"
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import argparse
from datetime import datetime
from dateutil.parser import parse
from dateutil.relativedelta import relativedelta
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# retrieving arguments specified on command ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# setting target dir and time interval of interest
tgt_dir = r"D:\nhl\official_and_json\2016-17"
tgt_dir = r"d:\tmp\test"
date = "2017/05/01"
to_date = "... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import argparse
from datetime import datetime
from dateutil.parser import parse
from dateutil.relativedelta import relativedelta
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# retrieving arguments specified on command ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# setting target dir and time interval of interest
tgt_dir = r"D:\nhl\official_and_json\2016-17"
tgt_dir = r"d:\tmp\test"
date = "2017/05/01"
to_date = "2017/05/01"
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# setting target dir and time interval of interest
tgt_dir = r"D:\nhl\official_and_json\2016-17"
tgt_dir = r"d:\tmp\test"
date = "2017/05/01"
to_date = "... |
2f5417811eb8048659bd9b5408c721d481af4ece | tests/python-support/experiments.py | tests/python-support/experiments.py | import os
import subprocess
import json
def _experiment_runner_path():
this_path = os.path.dirname(os.path.realpath(__file__))
return this_path + "/../../target/release/experiments"
def run_experiment(params):
args = [_experiment_runner_path() ]
result = subprocess.run(args=args,
... | import os
import subprocess
import json
def _experiment_runner_path():
this_path = os.path.dirname(os.path.realpath(__file__))
return this_path + "/../../target/release/experiments"
def run_experiment(params):
args = [_experiment_runner_path()]
result = subprocess.run(args=args,
... | Print JSON document upon parse error | Print JSON document upon parse error
| Python | mit | Andlon/crest,Andlon/crest,Andlon/crest | import os
import subprocess
import json
def _experiment_runner_path():
this_path = os.path.dirname(os.path.realpath(__file__))
return this_path + "/../../target/release/experiments"
def run_experiment(params):
args = [_experiment_runner_path() ]
result = subprocess.run(args=args,
... | import os
import subprocess
import json
def _experiment_runner_path():
this_path = os.path.dirname(os.path.realpath(__file__))
return this_path + "/../../target/release/experiments"
def run_experiment(params):
args = [_experiment_runner_path()]
result = subprocess.run(args=args,
... | <commit_before>import os
import subprocess
import json
def _experiment_runner_path():
this_path = os.path.dirname(os.path.realpath(__file__))
return this_path + "/../../target/release/experiments"
def run_experiment(params):
args = [_experiment_runner_path() ]
result = subprocess.run(args=args,
... | import os
import subprocess
import json
def _experiment_runner_path():
this_path = os.path.dirname(os.path.realpath(__file__))
return this_path + "/../../target/release/experiments"
def run_experiment(params):
args = [_experiment_runner_path()]
result = subprocess.run(args=args,
... | import os
import subprocess
import json
def _experiment_runner_path():
this_path = os.path.dirname(os.path.realpath(__file__))
return this_path + "/../../target/release/experiments"
def run_experiment(params):
args = [_experiment_runner_path() ]
result = subprocess.run(args=args,
... | <commit_before>import os
import subprocess
import json
def _experiment_runner_path():
this_path = os.path.dirname(os.path.realpath(__file__))
return this_path + "/../../target/release/experiments"
def run_experiment(params):
args = [_experiment_runner_path() ]
result = subprocess.run(args=args,
... |
c55d0ff6071c5b96125160da1e911419ee70314c | ditto/configuration/urls.py | ditto/configuration/urls.py | from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(
regex=r'^step([1234])/$',
view=views.edit_initial_config,
name='initialconfig'
),
url(r'^debug/start-again/$',
views.start_again,
name="start-again"),
... | from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(
regex=r'^step([1234])/$',
view=views.edit_initial_config,
name='initialconfig'
),
url(r'^debug/start-again/$',
views.start_again,
name="start-again"),
... | Fix chatroom url pattern to include '-' | Fix chatroom url pattern to include '-'
| Python | bsd-3-clause | Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto | from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(
regex=r'^step([1234])/$',
view=views.edit_initial_config,
name='initialconfig'
),
url(r'^debug/start-again/$',
views.start_again,
name="start-again"),
... | from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(
regex=r'^step([1234])/$',
view=views.edit_initial_config,
name='initialconfig'
),
url(r'^debug/start-again/$',
views.start_again,
name="start-again"),
... | <commit_before>from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(
regex=r'^step([1234])/$',
view=views.edit_initial_config,
name='initialconfig'
),
url(r'^debug/start-again/$',
views.start_again,
name="start-again"),
... | from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(
regex=r'^step([1234])/$',
view=views.edit_initial_config,
name='initialconfig'
),
url(r'^debug/start-again/$',
views.start_again,
name="start-again"),
... | from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(
regex=r'^step([1234])/$',
view=views.edit_initial_config,
name='initialconfig'
),
url(r'^debug/start-again/$',
views.start_again,
name="start-again"),
... | <commit_before>from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(
regex=r'^step([1234])/$',
view=views.edit_initial_config,
name='initialconfig'
),
url(r'^debug/start-again/$',
views.start_again,
name="start-again"),
... |
fcfc9165526daf69d73a3822684efb8098fbb9d1 | moment_polytopes/__init__.py | moment_polytopes/__init__.py | from __future__ import absolute_import, print_function
__version__ = '1.0-dev'
| from __future__ import absolute_import, print_function
__version__ = '1.0.dev0'
| Use appropriate version naming scheme. | Use appropriate version naming scheme. | Python | mit | catch22/moment_polytopes | from __future__ import absolute_import, print_function
__version__ = '1.0-dev'
Use appropriate version naming scheme. | from __future__ import absolute_import, print_function
__version__ = '1.0.dev0'
| <commit_before>from __future__ import absolute_import, print_function
__version__ = '1.0-dev'
<commit_msg>Use appropriate version naming scheme.<commit_after> | from __future__ import absolute_import, print_function
__version__ = '1.0.dev0'
| from __future__ import absolute_import, print_function
__version__ = '1.0-dev'
Use appropriate version naming scheme.from __future__ import absolute_import, print_function
__version__ = '1.0.dev0'
| <commit_before>from __future__ import absolute_import, print_function
__version__ = '1.0-dev'
<commit_msg>Use appropriate version naming scheme.<commit_after>from __future__ import absolute_import, print_function
__version__ = '1.0.dev0'
|
cc2fcbf73b0f3eb6ddfee2b55edc6239df3171e0 | bower/commands/install.py | bower/commands/install.py | import sublime_plugin
from bower.utils.api import API
class InstallCommand(sublime_plugin.WindowCommand):
def run(self, *args, **kwargs):
self.list_packages()
def list_packages(self):
fileList = []
packages = API().get('packages')
packages.reverse()
for package in pack... | import sublime_plugin
from bower.utils.api import API
class InstallCommand(sublime_plugin.WindowCommand):
def run(self, *args, **kwargs):
self.list_packages()
def list_packages(self):
fileList = []
packages = API().get('packages')
packages.reverse()
for package in pack... | Correct my cowboy fix that broke. | Correct my cowboy fix that broke.
| Python | mit | benschwarz/sublime-bower,ebidel/sublime-bower | import sublime_plugin
from bower.utils.api import API
class InstallCommand(sublime_plugin.WindowCommand):
def run(self, *args, **kwargs):
self.list_packages()
def list_packages(self):
fileList = []
packages = API().get('packages')
packages.reverse()
for package in pack... | import sublime_plugin
from bower.utils.api import API
class InstallCommand(sublime_plugin.WindowCommand):
def run(self, *args, **kwargs):
self.list_packages()
def list_packages(self):
fileList = []
packages = API().get('packages')
packages.reverse()
for package in pack... | <commit_before>import sublime_plugin
from bower.utils.api import API
class InstallCommand(sublime_plugin.WindowCommand):
def run(self, *args, **kwargs):
self.list_packages()
def list_packages(self):
fileList = []
packages = API().get('packages')
packages.reverse()
for ... | import sublime_plugin
from bower.utils.api import API
class InstallCommand(sublime_plugin.WindowCommand):
def run(self, *args, **kwargs):
self.list_packages()
def list_packages(self):
fileList = []
packages = API().get('packages')
packages.reverse()
for package in pack... | import sublime_plugin
from bower.utils.api import API
class InstallCommand(sublime_plugin.WindowCommand):
def run(self, *args, **kwargs):
self.list_packages()
def list_packages(self):
fileList = []
packages = API().get('packages')
packages.reverse()
for package in pack... | <commit_before>import sublime_plugin
from bower.utils.api import API
class InstallCommand(sublime_plugin.WindowCommand):
def run(self, *args, **kwargs):
self.list_packages()
def list_packages(self):
fileList = []
packages = API().get('packages')
packages.reverse()
for ... |
969a36dc68ba9675b790f6712405ceb272cf7cbd | easy_thumbnails/__init__.py | easy_thumbnails/__init__.py | VERSION = (1, 0, 'alpha', 14)
def get_version(join=' ', short=False):
"""
Return the version of this package as a string.
The version number is built from a ``VERSION`` tuple, which should consist
of integers, or trailing version information (such as 'alpha', 'beta' or
'final'). For example:
... | VERSION = (1, 0, 'alpha', 15)
def get_version(join=' ', short=False):
"""
Return the version of this package as a string.
The version number is built from a ``VERSION`` tuple, which should consist
of integers, or trailing version information (such as 'alpha', 'beta' or
'final'). For example:
... | Bump the number for a minor release to fix the mysql migrations issue. | Bump the number for a minor release to fix the mysql migrations issue.
| Python | bsd-3-clause | emschorsch/easy-thumbnails,siovene/easy-thumbnails,jrief/easy-thumbnails,Mactory/easy-thumbnails,jrief/easy-thumbnails,jaddison/easy-thumbnails,sandow-digital/easy-thumbnails-cropman,sandow-digital/easy-thumbnails-cropman,emschorsch/easy-thumbnails,SmileyChris/easy-thumbnails | VERSION = (1, 0, 'alpha', 14)
def get_version(join=' ', short=False):
"""
Return the version of this package as a string.
The version number is built from a ``VERSION`` tuple, which should consist
of integers, or trailing version information (such as 'alpha', 'beta' or
'final'). For example:
... | VERSION = (1, 0, 'alpha', 15)
def get_version(join=' ', short=False):
"""
Return the version of this package as a string.
The version number is built from a ``VERSION`` tuple, which should consist
of integers, or trailing version information (such as 'alpha', 'beta' or
'final'). For example:
... | <commit_before>VERSION = (1, 0, 'alpha', 14)
def get_version(join=' ', short=False):
"""
Return the version of this package as a string.
The version number is built from a ``VERSION`` tuple, which should consist
of integers, or trailing version information (such as 'alpha', 'beta' or
'final'). Fo... | VERSION = (1, 0, 'alpha', 15)
def get_version(join=' ', short=False):
"""
Return the version of this package as a string.
The version number is built from a ``VERSION`` tuple, which should consist
of integers, or trailing version information (such as 'alpha', 'beta' or
'final'). For example:
... | VERSION = (1, 0, 'alpha', 14)
def get_version(join=' ', short=False):
"""
Return the version of this package as a string.
The version number is built from a ``VERSION`` tuple, which should consist
of integers, or trailing version information (such as 'alpha', 'beta' or
'final'). For example:
... | <commit_before>VERSION = (1, 0, 'alpha', 14)
def get_version(join=' ', short=False):
"""
Return the version of this package as a string.
The version number is built from a ``VERSION`` tuple, which should consist
of integers, or trailing version information (such as 'alpha', 'beta' or
'final'). Fo... |
dd9fb6cf515d9e7ceb26cc6f7e8fd869d721552c | shop/models/fields.py | shop/models/fields.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql':
from django.contrib.postgres.fields import JSONField as _JSONField
else:
from jsonfield.fields import JSONField as _JSONField
class... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
postgresql_engine_names = [
'django.db.backends.postgresql',
'django.db.backends.postgresql_psycopg2',
]
if settings.DATABASES['default']['ENGINE'] in postgresql_engine_names:
from django.contrib.postgres.fie... | Check for older Postgresql engine name for JSONField | Check for older Postgresql engine name for JSONField
The Postgresql database engine name was changed from
'django.db.backends.postgresql_psycopg2' to
'django.db.backends.postgresql' in Django 1.9. However, the former name
still works in newer versions of Django for compatibility reasons. This
value should also be chec... | Python | bsd-3-clause | divio/django-shop,khchine5/django-shop,nimbis/django-shop,khchine5/django-shop,khchine5/django-shop,awesto/django-shop,khchine5/django-shop,awesto/django-shop,awesto/django-shop,divio/django-shop,nimbis/django-shop,divio/django-shop,nimbis/django-shop,nimbis/django-shop | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql':
from django.contrib.postgres.fields import JSONField as _JSONField
else:
from jsonfield.fields import JSONField as _JSONField
class... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
postgresql_engine_names = [
'django.db.backends.postgresql',
'django.db.backends.postgresql_psycopg2',
]
if settings.DATABASES['default']['ENGINE'] in postgresql_engine_names:
from django.contrib.postgres.fie... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql':
from django.contrib.postgres.fields import JSONField as _JSONField
else:
from jsonfield.fields import JSONField as _JS... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
postgresql_engine_names = [
'django.db.backends.postgresql',
'django.db.backends.postgresql_psycopg2',
]
if settings.DATABASES['default']['ENGINE'] in postgresql_engine_names:
from django.contrib.postgres.fie... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql':
from django.contrib.postgres.fields import JSONField as _JSONField
else:
from jsonfield.fields import JSONField as _JSONField
class... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql':
from django.contrib.postgres.fields import JSONField as _JSONField
else:
from jsonfield.fields import JSONField as _JS... |
adc5c00f5496fed8b0b1b4c523737cfbaf688945 | shortuuid/__init__.py | shortuuid/__init__.py | from shortuuid.main import (
encode,
decode,
uuid,
random,
get_alphabet,
set_alphabet,
ShortUUID,
)
__version__ = "0.4.2"
| from shortuuid.main import (
encode,
decode,
uuid,
random,
get_alphabet,
set_alphabet,
ShortUUID,
)
__version__ = "0.4.3"
| Change to the correct version. | Change to the correct version.
| Python | bsd-3-clause | skorokithakis/shortuuid,stochastic-technologies/shortuuid | from shortuuid.main import (
encode,
decode,
uuid,
random,
get_alphabet,
set_alphabet,
ShortUUID,
)
__version__ = "0.4.2"
Change to the correct version. | from shortuuid.main import (
encode,
decode,
uuid,
random,
get_alphabet,
set_alphabet,
ShortUUID,
)
__version__ = "0.4.3"
| <commit_before>from shortuuid.main import (
encode,
decode,
uuid,
random,
get_alphabet,
set_alphabet,
ShortUUID,
)
__version__ = "0.4.2"
<commit_msg>Change to the correct version.<commit_after> | from shortuuid.main import (
encode,
decode,
uuid,
random,
get_alphabet,
set_alphabet,
ShortUUID,
)
__version__ = "0.4.3"
| from shortuuid.main import (
encode,
decode,
uuid,
random,
get_alphabet,
set_alphabet,
ShortUUID,
)
__version__ = "0.4.2"
Change to the correct version.from shortuuid.main import (
encode,
decode,
uuid,
random,
get_alphabet,
set_alphabet,
ShortUUID,
)
__version_... | <commit_before>from shortuuid.main import (
encode,
decode,
uuid,
random,
get_alphabet,
set_alphabet,
ShortUUID,
)
__version__ = "0.4.2"
<commit_msg>Change to the correct version.<commit_after>from shortuuid.main import (
encode,
decode,
uuid,
random,
get_alphabet,
s... |
74f26f0c0a0cb014539212f5b7a703d436b29f29 | backend/globaleaks/jobs/base.py | backend/globaleaks/jobs/base.py | # -*- coding: UTF-8
# jobs/base
# *********
#
# Base class for implement the scheduled tasks
import sys
from twisted.internet import task
from twisted.python.failure import Failure
from globaleaks.utils.utility import log
from globaleaks.utils.mailutils import mail_exception
class GLJob(task.LoopingCall):
d... | # -*- coding: UTF-8
# jobs/base
# *********
#
# Base class for implement the scheduled tasks
import sys
from twisted.internet import task
from twisted.python.failure import Failure
from globaleaks.utils.utility import log
from globaleaks.utils.mailutils import mail_exception
class GLJob(task.LoopingCall):
d... | Patch job scheduler avoiding possibilities for concurrent runs of the same | Patch job scheduler avoiding possibilities for concurrent runs of the same
| Python | agpl-3.0 | vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks | # -*- coding: UTF-8
# jobs/base
# *********
#
# Base class for implement the scheduled tasks
import sys
from twisted.internet import task
from twisted.python.failure import Failure
from globaleaks.utils.utility import log
from globaleaks.utils.mailutils import mail_exception
class GLJob(task.LoopingCall):
d... | # -*- coding: UTF-8
# jobs/base
# *********
#
# Base class for implement the scheduled tasks
import sys
from twisted.internet import task
from twisted.python.failure import Failure
from globaleaks.utils.utility import log
from globaleaks.utils.mailutils import mail_exception
class GLJob(task.LoopingCall):
d... | <commit_before># -*- coding: UTF-8
# jobs/base
# *********
#
# Base class for implement the scheduled tasks
import sys
from twisted.internet import task
from twisted.python.failure import Failure
from globaleaks.utils.utility import log
from globaleaks.utils.mailutils import mail_exception
class GLJob(task.Loop... | # -*- coding: UTF-8
# jobs/base
# *********
#
# Base class for implement the scheduled tasks
import sys
from twisted.internet import task
from twisted.python.failure import Failure
from globaleaks.utils.utility import log
from globaleaks.utils.mailutils import mail_exception
class GLJob(task.LoopingCall):
d... | # -*- coding: UTF-8
# jobs/base
# *********
#
# Base class for implement the scheduled tasks
import sys
from twisted.internet import task
from twisted.python.failure import Failure
from globaleaks.utils.utility import log
from globaleaks.utils.mailutils import mail_exception
class GLJob(task.LoopingCall):
d... | <commit_before># -*- coding: UTF-8
# jobs/base
# *********
#
# Base class for implement the scheduled tasks
import sys
from twisted.internet import task
from twisted.python.failure import Failure
from globaleaks.utils.utility import log
from globaleaks.utils.mailutils import mail_exception
class GLJob(task.Loop... |
0b53adc34259fedc23e42e7576517fb62f4cb33e | base_contact/models/ir_model.py | base_contact/models/ir_model.py | # -*- coding: utf-8 -*-
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from openerp import api, models
_logger = logging.getLogger(__name__)
class IrModel(models.Model):
_inherit = "ir.model"
@api.cr
... | # -*- coding: utf-8 -*-
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from openerp import api, models
_logger = logging.getLogger(__name__)
class IrModel(models.Model):
_inherit = "ir.model"
@api.cr
... | Downgrade to INFO, since runbots install this. | Downgrade to INFO, since runbots install this.
| Python | agpl-3.0 | open-synergy/partner-contact,acsone/partner-contact,diagramsoftware/partner-contact | # -*- coding: utf-8 -*-
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from openerp import api, models
_logger = logging.getLogger(__name__)
class IrModel(models.Model):
_inherit = "ir.model"
@api.cr
... | # -*- coding: utf-8 -*-
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from openerp import api, models
_logger = logging.getLogger(__name__)
class IrModel(models.Model):
_inherit = "ir.model"
@api.cr
... | <commit_before># -*- coding: utf-8 -*-
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from openerp import api, models
_logger = logging.getLogger(__name__)
class IrModel(models.Model):
_inherit = "ir.model"
... | # -*- coding: utf-8 -*-
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from openerp import api, models
_logger = logging.getLogger(__name__)
class IrModel(models.Model):
_inherit = "ir.model"
@api.cr
... | # -*- coding: utf-8 -*-
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from openerp import api, models
_logger = logging.getLogger(__name__)
class IrModel(models.Model):
_inherit = "ir.model"
@api.cr
... | <commit_before># -*- coding: utf-8 -*-
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from openerp import api, models
_logger = logging.getLogger(__name__)
class IrModel(models.Model):
_inherit = "ir.model"
... |
4178bb331014089c69df81b8a99204c94b6e200f | eventsource_parser.py | eventsource_parser.py | from collections import namedtuple
Event = namedtuple('Event', ['id', 'type', 'data'])
def parse(source):
eid = None
etype = None
data = []
retry = None
extra = ''
dispatch = False
lines = source.splitlines()
for line in lines:
if dispatch:
extra += line + '\n... | from collections import namedtuple
Event = namedtuple('Event', ['id', 'type', 'data'])
def parse(source):
eid = None
etype = None
data = []
retry = None
extra = ''
dispatch = False
cursor = 0
lines = source.splitlines()
for line in lines:
if not line:
... | Fix extra in case of fragmented sources | Fix extra in case of fragmented sources
| Python | apache-2.0 | tOkeshu/eventsource-parser | from collections import namedtuple
Event = namedtuple('Event', ['id', 'type', 'data'])
def parse(source):
eid = None
etype = None
data = []
retry = None
extra = ''
dispatch = False
lines = source.splitlines()
for line in lines:
if dispatch:
extra += line + '\n... | from collections import namedtuple
Event = namedtuple('Event', ['id', 'type', 'data'])
def parse(source):
eid = None
etype = None
data = []
retry = None
extra = ''
dispatch = False
cursor = 0
lines = source.splitlines()
for line in lines:
if not line:
... | <commit_before>from collections import namedtuple
Event = namedtuple('Event', ['id', 'type', 'data'])
def parse(source):
eid = None
etype = None
data = []
retry = None
extra = ''
dispatch = False
lines = source.splitlines()
for line in lines:
if dispatch:
extr... | from collections import namedtuple
Event = namedtuple('Event', ['id', 'type', 'data'])
def parse(source):
eid = None
etype = None
data = []
retry = None
extra = ''
dispatch = False
cursor = 0
lines = source.splitlines()
for line in lines:
if not line:
... | from collections import namedtuple
Event = namedtuple('Event', ['id', 'type', 'data'])
def parse(source):
eid = None
etype = None
data = []
retry = None
extra = ''
dispatch = False
lines = source.splitlines()
for line in lines:
if dispatch:
extra += line + '\n... | <commit_before>from collections import namedtuple
Event = namedtuple('Event', ['id', 'type', 'data'])
def parse(source):
eid = None
etype = None
data = []
retry = None
extra = ''
dispatch = False
lines = source.splitlines()
for line in lines:
if dispatch:
extr... |
5e3a9ad00558547475e7b5674bb623cafc99643a | data_exploration.py | data_exploration.py | # importing modules/ libraries
import pandas as pd
import random
# loading the data
aisles_df = pd.read_csv('Data/aisles.csv')
print(aisles_df.head())
departments_df = pd.read_csv('Data/departments.csv')
print(departments_df.head())
#n = 32434489
#s = round(0.1 * n)
#skip = sorted(random.sample(range(1,n), n-s))
ord... | # importing modules/ libraries
import pandas as pd
# loading the data
aisles_df = pd.read_csv('Data/aisles.csv')
print(aisles_df.head())
departments_df = pd.read_csv('Data/departments.csv')
print(departments_df.head())
order_products__prior_df = pd.read_csv('Data/order_products__prior_sample.csv')
print(order_produc... | Update data explorations data sets to samples | fix: Update data explorations data sets to samples
| Python | mit | rjegankumar/instacart_prediction_model | # importing modules/ libraries
import pandas as pd
import random
# loading the data
aisles_df = pd.read_csv('Data/aisles.csv')
print(aisles_df.head())
departments_df = pd.read_csv('Data/departments.csv')
print(departments_df.head())
#n = 32434489
#s = round(0.1 * n)
#skip = sorted(random.sample(range(1,n), n-s))
ord... | # importing modules/ libraries
import pandas as pd
# loading the data
aisles_df = pd.read_csv('Data/aisles.csv')
print(aisles_df.head())
departments_df = pd.read_csv('Data/departments.csv')
print(departments_df.head())
order_products__prior_df = pd.read_csv('Data/order_products__prior_sample.csv')
print(order_produc... | <commit_before># importing modules/ libraries
import pandas as pd
import random
# loading the data
aisles_df = pd.read_csv('Data/aisles.csv')
print(aisles_df.head())
departments_df = pd.read_csv('Data/departments.csv')
print(departments_df.head())
#n = 32434489
#s = round(0.1 * n)
#skip = sorted(random.sample(range(... | # importing modules/ libraries
import pandas as pd
# loading the data
aisles_df = pd.read_csv('Data/aisles.csv')
print(aisles_df.head())
departments_df = pd.read_csv('Data/departments.csv')
print(departments_df.head())
order_products__prior_df = pd.read_csv('Data/order_products__prior_sample.csv')
print(order_produc... | # importing modules/ libraries
import pandas as pd
import random
# loading the data
aisles_df = pd.read_csv('Data/aisles.csv')
print(aisles_df.head())
departments_df = pd.read_csv('Data/departments.csv')
print(departments_df.head())
#n = 32434489
#s = round(0.1 * n)
#skip = sorted(random.sample(range(1,n), n-s))
ord... | <commit_before># importing modules/ libraries
import pandas as pd
import random
# loading the data
aisles_df = pd.read_csv('Data/aisles.csv')
print(aisles_df.head())
departments_df = pd.read_csv('Data/departments.csv')
print(departments_df.head())
#n = 32434489
#s = round(0.1 * n)
#skip = sorted(random.sample(range(... |
3c1203d5f4665873e34de9600c6cf18cbd7f7611 | moa/tools.py | moa/tools.py |
__all__ = ('to_bool', 'ConfigPropertyList')
from kivy.properties import ConfigParserProperty
from re import compile, split
from functools import partial
to_list_pat = compile(', *')
def to_bool(val):
'''
Takes anything and converts it to a bool type.
'''
if val == 'False':
return False
... |
__all__ = ('to_bool', 'ConfigPropertyList')
from kivy.properties import ConfigParserProperty
from re import compile, split
to_list_pat = compile('(?:, *)?\\n?')
def to_bool(val):
'''
Takes anything and converts it to a bool type.
'''
if val == 'False':
return False
return not not val
... | Add 2d list to ConfigProperty. | Add 2d list to ConfigProperty.
| Python | mit | matham/moa |
__all__ = ('to_bool', 'ConfigPropertyList')
from kivy.properties import ConfigParserProperty
from re import compile, split
from functools import partial
to_list_pat = compile(', *')
def to_bool(val):
'''
Takes anything and converts it to a bool type.
'''
if val == 'False':
return False
... |
__all__ = ('to_bool', 'ConfigPropertyList')
from kivy.properties import ConfigParserProperty
from re import compile, split
to_list_pat = compile('(?:, *)?\\n?')
def to_bool(val):
'''
Takes anything and converts it to a bool type.
'''
if val == 'False':
return False
return not not val
... | <commit_before>
__all__ = ('to_bool', 'ConfigPropertyList')
from kivy.properties import ConfigParserProperty
from re import compile, split
from functools import partial
to_list_pat = compile(', *')
def to_bool(val):
'''
Takes anything and converts it to a bool type.
'''
if val == 'False':
re... |
__all__ = ('to_bool', 'ConfigPropertyList')
from kivy.properties import ConfigParserProperty
from re import compile, split
to_list_pat = compile('(?:, *)?\\n?')
def to_bool(val):
'''
Takes anything and converts it to a bool type.
'''
if val == 'False':
return False
return not not val
... |
__all__ = ('to_bool', 'ConfigPropertyList')
from kivy.properties import ConfigParserProperty
from re import compile, split
from functools import partial
to_list_pat = compile(', *')
def to_bool(val):
'''
Takes anything and converts it to a bool type.
'''
if val == 'False':
return False
... | <commit_before>
__all__ = ('to_bool', 'ConfigPropertyList')
from kivy.properties import ConfigParserProperty
from re import compile, split
from functools import partial
to_list_pat = compile(', *')
def to_bool(val):
'''
Takes anything and converts it to a bool type.
'''
if val == 'False':
re... |
e21fd90de3b97f3ea2564a8d2c35351f2136b4e5 | 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='from@example.com')
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='from@example.com')
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='from@example.com')
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='from@example.com')
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='from@example.com')
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='from@example.com')
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='from@example.com')
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='from@example.com')
s... |
c367d96cdfb7991cbabb38950cf08207f0662f20 | flask_hal/document.py | flask_hal/document.py | #!/usr/bin/env python
# encoding: utf-8
"""
flask_hal.document
==================
Module for constructing ``HAL`` documents.
Example:
>>> from flask_hal.document import Document
>>> d = Document()
>>> d.to_dict()
"""
# Third Party Libs
from flask_hal import link
class Document(object):
"""Construc... | #!/usr/bin/env python
# encoding: utf-8
"""
flask_hal.document
==================
Module for constructing ``HAL`` documents.
Example:
>>> from flask_hal.document import Document
>>> d = Document()
>>> d.to_dict()
"""
# Third Party Libs
from flask_hal import link
class Document(object):
"""Construc... | Raise TypeError if links is not a link.Collection | Raise TypeError if links is not a link.Collection
| Python | unlicense | thisissoon/Flask-HAL,thisissoon/Flask-HAL | #!/usr/bin/env python
# encoding: utf-8
"""
flask_hal.document
==================
Module for constructing ``HAL`` documents.
Example:
>>> from flask_hal.document import Document
>>> d = Document()
>>> d.to_dict()
"""
# Third Party Libs
from flask_hal import link
class Document(object):
"""Construc... | #!/usr/bin/env python
# encoding: utf-8
"""
flask_hal.document
==================
Module for constructing ``HAL`` documents.
Example:
>>> from flask_hal.document import Document
>>> d = Document()
>>> d.to_dict()
"""
# Third Party Libs
from flask_hal import link
class Document(object):
"""Construc... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
"""
flask_hal.document
==================
Module for constructing ``HAL`` documents.
Example:
>>> from flask_hal.document import Document
>>> d = Document()
>>> d.to_dict()
"""
# Third Party Libs
from flask_hal import link
class Document(object):
... | #!/usr/bin/env python
# encoding: utf-8
"""
flask_hal.document
==================
Module for constructing ``HAL`` documents.
Example:
>>> from flask_hal.document import Document
>>> d = Document()
>>> d.to_dict()
"""
# Third Party Libs
from flask_hal import link
class Document(object):
"""Construc... | #!/usr/bin/env python
# encoding: utf-8
"""
flask_hal.document
==================
Module for constructing ``HAL`` documents.
Example:
>>> from flask_hal.document import Document
>>> d = Document()
>>> d.to_dict()
"""
# Third Party Libs
from flask_hal import link
class Document(object):
"""Construc... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
"""
flask_hal.document
==================
Module for constructing ``HAL`` documents.
Example:
>>> from flask_hal.document import Document
>>> d = Document()
>>> d.to_dict()
"""
# Third Party Libs
from flask_hal import link
class Document(object):
... |
b80e1facf3c47364384fa04f764838ba1b8cb55c | form_designer/apps.py | form_designer/apps.py | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class FormDesignerConfig(AppConfig):
name = "form_designer"
verbose_name = _("Form Designer")
| from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class FormDesignerConfig(AppConfig):
default_auto_field = "django.db.models.AutoField"
name = "form_designer"
verbose_name = _("Form Designer")
| Set the default auto field to be AutoField | Set the default auto field to be AutoField
On django 3.2 it creates a migration to be BigAutoField. This fixes it. | Python | bsd-3-clause | feincms/form_designer,feincms/form_designer | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class FormDesignerConfig(AppConfig):
name = "form_designer"
verbose_name = _("Form Designer")
Set the default auto field to be AutoField
On django 3.2 it creates a migration to be BigAutoField. This fixes it. | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class FormDesignerConfig(AppConfig):
default_auto_field = "django.db.models.AutoField"
name = "form_designer"
verbose_name = _("Form Designer")
| <commit_before>from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class FormDesignerConfig(AppConfig):
name = "form_designer"
verbose_name = _("Form Designer")
<commit_msg>Set the default auto field to be AutoField
On django 3.2 it creates a migration to be BigAutoField.... | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class FormDesignerConfig(AppConfig):
default_auto_field = "django.db.models.AutoField"
name = "form_designer"
verbose_name = _("Form Designer")
| from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class FormDesignerConfig(AppConfig):
name = "form_designer"
verbose_name = _("Form Designer")
Set the default auto field to be AutoField
On django 3.2 it creates a migration to be BigAutoField. This fixes it.from django.... | <commit_before>from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class FormDesignerConfig(AppConfig):
name = "form_designer"
verbose_name = _("Form Designer")
<commit_msg>Set the default auto field to be AutoField
On django 3.2 it creates a migration to be BigAutoField.... |
9c176de1fd280e72dd06c9eaa64060e52abca746 | python/prebuild.py | python/prebuild.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def extract_function_names(module):
'''
extract function names from attributes of 'module'.
'''
from importlib import import_module
mod = import_module(module.__name__)
attr_list = dir(mod)
scope = locals()
def iscallable(name):
r... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def extract_function_names(module):
'''
extract function names from attributes of 'module'.
'''
from importlib import import_module
mod = import_module(module.__name__)
attr_list = dir(mod)
scope = locals()
def iscallable(name):
i... | Remove python decorators from list | Remove python decorators from list
| Python | mit | koji-kojiro/matplotlib-d | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def extract_function_names(module):
'''
extract function names from attributes of 'module'.
'''
from importlib import import_module
mod = import_module(module.__name__)
attr_list = dir(mod)
scope = locals()
def iscallable(name):
r... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def extract_function_names(module):
'''
extract function names from attributes of 'module'.
'''
from importlib import import_module
mod = import_module(module.__name__)
attr_list = dir(mod)
scope = locals()
def iscallable(name):
i... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
def extract_function_names(module):
'''
extract function names from attributes of 'module'.
'''
from importlib import import_module
mod = import_module(module.__name__)
attr_list = dir(mod)
scope = locals()
def iscallable(n... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def extract_function_names(module):
'''
extract function names from attributes of 'module'.
'''
from importlib import import_module
mod = import_module(module.__name__)
attr_list = dir(mod)
scope = locals()
def iscallable(name):
i... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def extract_function_names(module):
'''
extract function names from attributes of 'module'.
'''
from importlib import import_module
mod = import_module(module.__name__)
attr_list = dir(mod)
scope = locals()
def iscallable(name):
r... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
def extract_function_names(module):
'''
extract function names from attributes of 'module'.
'''
from importlib import import_module
mod = import_module(module.__name__)
attr_list = dir(mod)
scope = locals()
def iscallable(n... |
4c84dafeca9977543824653e354f113b5142d259 | jsonsempai.py | jsonsempai.py | import imp
import json
import os
import sys
class Dot(dict):
def __init__(self, d):
super(dict, self).__init__()
for k, v in d.iteritems():
if isinstance(v, dict):
self[k] = Dot(v)
else:
self[k] = v
def __getattr__(self, attr):
... | import imp
import json
import os
import sys
class Dot(dict):
def __init__(self, d):
super(dict, self).__init__()
for k, v in iter(d.items()):
if isinstance(v, dict):
self[k] = Dot(v)
else:
self[k] = v
def __getattr__(self, attr):
... | Fix python 3 use of iteritems | Fix python 3 use of iteritems
| Python | mit | kragniz/json-sempai | import imp
import json
import os
import sys
class Dot(dict):
def __init__(self, d):
super(dict, self).__init__()
for k, v in d.iteritems():
if isinstance(v, dict):
self[k] = Dot(v)
else:
self[k] = v
def __getattr__(self, attr):
... | import imp
import json
import os
import sys
class Dot(dict):
def __init__(self, d):
super(dict, self).__init__()
for k, v in iter(d.items()):
if isinstance(v, dict):
self[k] = Dot(v)
else:
self[k] = v
def __getattr__(self, attr):
... | <commit_before>import imp
import json
import os
import sys
class Dot(dict):
def __init__(self, d):
super(dict, self).__init__()
for k, v in d.iteritems():
if isinstance(v, dict):
self[k] = Dot(v)
else:
self[k] = v
def __getattr__(self, ... | import imp
import json
import os
import sys
class Dot(dict):
def __init__(self, d):
super(dict, self).__init__()
for k, v in iter(d.items()):
if isinstance(v, dict):
self[k] = Dot(v)
else:
self[k] = v
def __getattr__(self, attr):
... | import imp
import json
import os
import sys
class Dot(dict):
def __init__(self, d):
super(dict, self).__init__()
for k, v in d.iteritems():
if isinstance(v, dict):
self[k] = Dot(v)
else:
self[k] = v
def __getattr__(self, attr):
... | <commit_before>import imp
import json
import os
import sys
class Dot(dict):
def __init__(self, d):
super(dict, self).__init__()
for k, v in d.iteritems():
if isinstance(v, dict):
self[k] = Dot(v)
else:
self[k] = v
def __getattr__(self, ... |
dcc32e96bccc0f679dc9d3330d3da7f3a7ec3983 | fireplace/cards/tgt/mage.py | fireplace/cards/tgt/mage.py | from ..utils import *
##
# Minions
# Dalaran Aspirant
class AT_006:
inspire = Buff(SELF, "AT_006e")
# Spellslinger
class AT_007:
play = Give(ALL_PLAYERS, RandomSpell())
# Rhonin
class AT_009:
deathrattle = Give(CONTROLLER, "EX1_277") * 3
##
# Spells
# Flame Lance
class AT_001:
play = Hit(TARGET, 8)
# Ar... | from ..utils import *
##
# Minions
# Dalaran Aspirant
class AT_006:
inspire = Buff(SELF, "AT_006e")
# Spellslinger
class AT_007:
play = Give(ALL_PLAYERS, RandomSpell())
# Rhonin
class AT_009:
deathrattle = Give(CONTROLLER, "EX1_277") * 3
##
# Spells
# Flame Lance
class AT_001:
play = Hit(TARGET, 8)
# Ar... | Fix Effigy to properly reveal itself | Fix Effigy to properly reveal itself
| Python | agpl-3.0 | Meerkov/fireplace,Ragowit/fireplace,Ragowit/fireplace,jleclanche/fireplace,smallnamespace/fireplace,amw2104/fireplace,smallnamespace/fireplace,beheh/fireplace,Meerkov/fireplace,NightKev/fireplace,amw2104/fireplace | from ..utils import *
##
# Minions
# Dalaran Aspirant
class AT_006:
inspire = Buff(SELF, "AT_006e")
# Spellslinger
class AT_007:
play = Give(ALL_PLAYERS, RandomSpell())
# Rhonin
class AT_009:
deathrattle = Give(CONTROLLER, "EX1_277") * 3
##
# Spells
# Flame Lance
class AT_001:
play = Hit(TARGET, 8)
# Ar... | from ..utils import *
##
# Minions
# Dalaran Aspirant
class AT_006:
inspire = Buff(SELF, "AT_006e")
# Spellslinger
class AT_007:
play = Give(ALL_PLAYERS, RandomSpell())
# Rhonin
class AT_009:
deathrattle = Give(CONTROLLER, "EX1_277") * 3
##
# Spells
# Flame Lance
class AT_001:
play = Hit(TARGET, 8)
# Ar... | <commit_before>from ..utils import *
##
# Minions
# Dalaran Aspirant
class AT_006:
inspire = Buff(SELF, "AT_006e")
# Spellslinger
class AT_007:
play = Give(ALL_PLAYERS, RandomSpell())
# Rhonin
class AT_009:
deathrattle = Give(CONTROLLER, "EX1_277") * 3
##
# Spells
# Flame Lance
class AT_001:
play = Hit(TA... | from ..utils import *
##
# Minions
# Dalaran Aspirant
class AT_006:
inspire = Buff(SELF, "AT_006e")
# Spellslinger
class AT_007:
play = Give(ALL_PLAYERS, RandomSpell())
# Rhonin
class AT_009:
deathrattle = Give(CONTROLLER, "EX1_277") * 3
##
# Spells
# Flame Lance
class AT_001:
play = Hit(TARGET, 8)
# Ar... | from ..utils import *
##
# Minions
# Dalaran Aspirant
class AT_006:
inspire = Buff(SELF, "AT_006e")
# Spellslinger
class AT_007:
play = Give(ALL_PLAYERS, RandomSpell())
# Rhonin
class AT_009:
deathrattle = Give(CONTROLLER, "EX1_277") * 3
##
# Spells
# Flame Lance
class AT_001:
play = Hit(TARGET, 8)
# Ar... | <commit_before>from ..utils import *
##
# Minions
# Dalaran Aspirant
class AT_006:
inspire = Buff(SELF, "AT_006e")
# Spellslinger
class AT_007:
play = Give(ALL_PLAYERS, RandomSpell())
# Rhonin
class AT_009:
deathrattle = Give(CONTROLLER, "EX1_277") * 3
##
# Spells
# Flame Lance
class AT_001:
play = Hit(TA... |
0a7b83a2866b3988d7718efa8f7798fa9052f7ae | zeus/api/resources/build_details.py | zeus/api/resources/build_details.py | from zeus.config import db, nplusone
from zeus.models import Build, ItemStat, Revision
from zeus.pubsub.utils import publish
from .base_build import BaseBuildResource
from ..schemas import BuildSchema
build_schema = BuildSchema()
class BuildDetailsResource(BaseBuildResource):
def select_resource_for_update(self... | from zeus.config import db, nplusone
from zeus.models import Build, ItemStat, Revision
from zeus.pubsub.utils import publish
from .base_build import BaseBuildResource
from ..schemas import BuildSchema
build_schema = BuildSchema()
class BuildDetailsResource(BaseBuildResource):
# def select_resource_for_update(se... | Disable select for update on build mutation | ref: Disable select for update on build mutation
| Python | apache-2.0 | getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus | from zeus.config import db, nplusone
from zeus.models import Build, ItemStat, Revision
from zeus.pubsub.utils import publish
from .base_build import BaseBuildResource
from ..schemas import BuildSchema
build_schema = BuildSchema()
class BuildDetailsResource(BaseBuildResource):
def select_resource_for_update(self... | from zeus.config import db, nplusone
from zeus.models import Build, ItemStat, Revision
from zeus.pubsub.utils import publish
from .base_build import BaseBuildResource
from ..schemas import BuildSchema
build_schema = BuildSchema()
class BuildDetailsResource(BaseBuildResource):
# def select_resource_for_update(se... | <commit_before>from zeus.config import db, nplusone
from zeus.models import Build, ItemStat, Revision
from zeus.pubsub.utils import publish
from .base_build import BaseBuildResource
from ..schemas import BuildSchema
build_schema = BuildSchema()
class BuildDetailsResource(BaseBuildResource):
def select_resource_... | from zeus.config import db, nplusone
from zeus.models import Build, ItemStat, Revision
from zeus.pubsub.utils import publish
from .base_build import BaseBuildResource
from ..schemas import BuildSchema
build_schema = BuildSchema()
class BuildDetailsResource(BaseBuildResource):
# def select_resource_for_update(se... | from zeus.config import db, nplusone
from zeus.models import Build, ItemStat, Revision
from zeus.pubsub.utils import publish
from .base_build import BaseBuildResource
from ..schemas import BuildSchema
build_schema = BuildSchema()
class BuildDetailsResource(BaseBuildResource):
def select_resource_for_update(self... | <commit_before>from zeus.config import db, nplusone
from zeus.models import Build, ItemStat, Revision
from zeus.pubsub.utils import publish
from .base_build import BaseBuildResource
from ..schemas import BuildSchema
build_schema = BuildSchema()
class BuildDetailsResource(BaseBuildResource):
def select_resource_... |
37c0969db4459162b35b76da4142c290bd4a2fc7 | Utilities/DefaultLoginInfoSetter.py | Utilities/DefaultLoginInfoSetter.py | #--coding:utf-8--
import getpass
import keyring
n = int(raw_input("Number of Accounts: "))
keyring.set_password('FbSpider', 'Account', n)
for i in range(0, n):
Email = raw_input("Email: ")
keyring.set_password('FbSpider', 'Account' + str(i), Email)
keyring.set_password('FbSpider', Email, getpass.getpass("P... | #--coding:utf-8--
import getpass
import keyring
n = int(raw_input("Number of Accounts: "))
keyring.set_password('FbSpider', 'Account', str(n))
for i in range(0, n):
Email = raw_input("Email: ")
keyring.set_password('FbSpider', 'Account' + str(i), Email)
keyring.set_password('FbSpider', Email, getpass.getpa... | Fix Bug: Encode an int | Fix Bug: Encode an int
| Python | mit | nday-dev/FbSpider | #--coding:utf-8--
import getpass
import keyring
n = int(raw_input("Number of Accounts: "))
keyring.set_password('FbSpider', 'Account', n)
for i in range(0, n):
Email = raw_input("Email: ")
keyring.set_password('FbSpider', 'Account' + str(i), Email)
keyring.set_password('FbSpider', Email, getpass.getpass("P... | #--coding:utf-8--
import getpass
import keyring
n = int(raw_input("Number of Accounts: "))
keyring.set_password('FbSpider', 'Account', str(n))
for i in range(0, n):
Email = raw_input("Email: ")
keyring.set_password('FbSpider', 'Account' + str(i), Email)
keyring.set_password('FbSpider', Email, getpass.getpa... | <commit_before>#--coding:utf-8--
import getpass
import keyring
n = int(raw_input("Number of Accounts: "))
keyring.set_password('FbSpider', 'Account', n)
for i in range(0, n):
Email = raw_input("Email: ")
keyring.set_password('FbSpider', 'Account' + str(i), Email)
keyring.set_password('FbSpider', Email, get... | #--coding:utf-8--
import getpass
import keyring
n = int(raw_input("Number of Accounts: "))
keyring.set_password('FbSpider', 'Account', str(n))
for i in range(0, n):
Email = raw_input("Email: ")
keyring.set_password('FbSpider', 'Account' + str(i), Email)
keyring.set_password('FbSpider', Email, getpass.getpa... | #--coding:utf-8--
import getpass
import keyring
n = int(raw_input("Number of Accounts: "))
keyring.set_password('FbSpider', 'Account', n)
for i in range(0, n):
Email = raw_input("Email: ")
keyring.set_password('FbSpider', 'Account' + str(i), Email)
keyring.set_password('FbSpider', Email, getpass.getpass("P... | <commit_before>#--coding:utf-8--
import getpass
import keyring
n = int(raw_input("Number of Accounts: "))
keyring.set_password('FbSpider', 'Account', n)
for i in range(0, n):
Email = raw_input("Email: ")
keyring.set_password('FbSpider', 'Account' + str(i), Email)
keyring.set_password('FbSpider', Email, get... |
cdd8b6a7b669dc81e360fa1bcc9b71b5e798cfd5 | map_loader.py | map_loader.py | import os
def read_map_file(map_name):
""" Load map data from disk. """
root = os.path.dirname(os.path.abspath(__file__))
map_path = os.path.join(root, 'maps', map_name + '.txt')
print('Loading map file [{}]'.format(map_name))
if not os.path.isfile(map_path):
print('Map file [{}] does not ... | import logging
import os
def read_map_file(map_name):
""" Load map data from disk. """
root = os.path.dirname(os.path.abspath(__file__))
map_path = os.path.join(root, 'maps', map_name + '.txt')
if not os.path.isfile(map_path):
logging.error('Map file [{}] does not exist'.format(map_path))
... | Remove debug print and log properly | Remove debug print and log properly
| Python | mit | supermitch/mech-ai,supermitch/mech-ai,supermitch/mech-ai | import os
def read_map_file(map_name):
""" Load map data from disk. """
root = os.path.dirname(os.path.abspath(__file__))
map_path = os.path.join(root, 'maps', map_name + '.txt')
print('Loading map file [{}]'.format(map_name))
if not os.path.isfile(map_path):
print('Map file [{}] does not ... | import logging
import os
def read_map_file(map_name):
""" Load map data from disk. """
root = os.path.dirname(os.path.abspath(__file__))
map_path = os.path.join(root, 'maps', map_name + '.txt')
if not os.path.isfile(map_path):
logging.error('Map file [{}] does not exist'.format(map_path))
... | <commit_before>import os
def read_map_file(map_name):
""" Load map data from disk. """
root = os.path.dirname(os.path.abspath(__file__))
map_path = os.path.join(root, 'maps', map_name + '.txt')
print('Loading map file [{}]'.format(map_name))
if not os.path.isfile(map_path):
print('Map file... | import logging
import os
def read_map_file(map_name):
""" Load map data from disk. """
root = os.path.dirname(os.path.abspath(__file__))
map_path = os.path.join(root, 'maps', map_name + '.txt')
if not os.path.isfile(map_path):
logging.error('Map file [{}] does not exist'.format(map_path))
... | import os
def read_map_file(map_name):
""" Load map data from disk. """
root = os.path.dirname(os.path.abspath(__file__))
map_path = os.path.join(root, 'maps', map_name + '.txt')
print('Loading map file [{}]'.format(map_name))
if not os.path.isfile(map_path):
print('Map file [{}] does not ... | <commit_before>import os
def read_map_file(map_name):
""" Load map data from disk. """
root = os.path.dirname(os.path.abspath(__file__))
map_path = os.path.join(root, 'maps', map_name + '.txt')
print('Loading map file [{}]'.format(map_name))
if not os.path.isfile(map_path):
print('Map file... |
d0f2b11fb67655b884f298bd8c1bf6be8396de4f | mail/email.py | mail/email.py | from django.conf import settings
from mail import models as mail_api
from groups import models as group_api
from mailgun import api as mailgun_api
def send_email( email_uri ):
""" Send the email to the intended target audience """
email = mail_api.get_email(email_uri)
if email['audience'] == 'groups':
... | from django.conf import settings
from mail import models as mail_api
from groups import models as group_api
from mailgun import api as mailgun_api
def send_email( email_uri ):
""" Send the email to the intended target audience """
email = mail_api.get_email(email_uri)
if email['audience'] == 'groups':
... | Fix bug with campaign id | Fix bug with campaign id
| Python | mit | p2pu/mechanical-mooc,p2pu/mechanical-mooc,p2pu/mechanical-mooc,p2pu/mechanical-mooc | from django.conf import settings
from mail import models as mail_api
from groups import models as group_api
from mailgun import api as mailgun_api
def send_email( email_uri ):
""" Send the email to the intended target audience """
email = mail_api.get_email(email_uri)
if email['audience'] == 'groups':
... | from django.conf import settings
from mail import models as mail_api
from groups import models as group_api
from mailgun import api as mailgun_api
def send_email( email_uri ):
""" Send the email to the intended target audience """
email = mail_api.get_email(email_uri)
if email['audience'] == 'groups':
... | <commit_before>from django.conf import settings
from mail import models as mail_api
from groups import models as group_api
from mailgun import api as mailgun_api
def send_email( email_uri ):
""" Send the email to the intended target audience """
email = mail_api.get_email(email_uri)
if email['audience'] ... | from django.conf import settings
from mail import models as mail_api
from groups import models as group_api
from mailgun import api as mailgun_api
def send_email( email_uri ):
""" Send the email to the intended target audience """
email = mail_api.get_email(email_uri)
if email['audience'] == 'groups':
... | from django.conf import settings
from mail import models as mail_api
from groups import models as group_api
from mailgun import api as mailgun_api
def send_email( email_uri ):
""" Send the email to the intended target audience """
email = mail_api.get_email(email_uri)
if email['audience'] == 'groups':
... | <commit_before>from django.conf import settings
from mail import models as mail_api
from groups import models as group_api
from mailgun import api as mailgun_api
def send_email( email_uri ):
""" Send the email to the intended target audience """
email = mail_api.get_email(email_uri)
if email['audience'] ... |
48ff585da5f499abeedb73d1e131a6d488644a05 | file_transfer/datamover/__init__.py | file_transfer/datamover/__init__.py |
from .connectors import (GithubConnector, S3Connector,
BaltradFTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_cs... |
from .connectors import (GithubConnector, S3Connector,
FTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_csv)
| Fix namespace bug of FTPconnector | Fix namespace bug of FTPconnector
| Python | mit | enram/infrastructure,enram/data-repository,enram/data-repository,enram/data-repository,enram/data-repository,enram/infrastructure |
from .connectors import (GithubConnector, S3Connector,
BaltradFTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_cs... |
from .connectors import (GithubConnector, S3Connector,
FTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_csv)
| <commit_before>
from .connectors import (GithubConnector, S3Connector,
BaltradFTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month,... |
from .connectors import (GithubConnector, S3Connector,
FTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_csv)
|
from .connectors import (GithubConnector, S3Connector,
BaltradFTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month, coverage_to_cs... | <commit_before>
from .connectors import (GithubConnector, S3Connector,
BaltradFTPConnector, LocalConnector)
from .transporters import (BaltradToS3, LocalToS3)
from .s3enram import S3EnramHandler
from .utils import (parse_filename, extract_month_updates,
parse_coverage_month,... |
8be701cabf05e62385f5cc2eaf008b0d0da93d9c | pww/inputs.py | pww/inputs.py | # coding: utf-8
from getpass import getpass
class CLIInput():
def get_user_name(self):
return input('user name: ')
def get_password(self):
return getpass()
def entry_selector(self, entries):
if not entries:
return None, None
titles = list(entries.keys())
... | # coding: utf-8
from getpass import getpass
class CLIInput():
def get_user_name(self):
return input('user name: ')
def get_password(self):
return getpass()
def entry_selector(self, entries):
if not entries:
return None, None
titles = list(entries.keys())
... | Modify that using default value when input value is None. | Modify that using default value when input value is None.
| Python | mit | meganehouser/pww | # coding: utf-8
from getpass import getpass
class CLIInput():
def get_user_name(self):
return input('user name: ')
def get_password(self):
return getpass()
def entry_selector(self, entries):
if not entries:
return None, None
titles = list(entries.keys())
... | # coding: utf-8
from getpass import getpass
class CLIInput():
def get_user_name(self):
return input('user name: ')
def get_password(self):
return getpass()
def entry_selector(self, entries):
if not entries:
return None, None
titles = list(entries.keys())
... | <commit_before># coding: utf-8
from getpass import getpass
class CLIInput():
def get_user_name(self):
return input('user name: ')
def get_password(self):
return getpass()
def entry_selector(self, entries):
if not entries:
return None, None
titles = list(entr... | # coding: utf-8
from getpass import getpass
class CLIInput():
def get_user_name(self):
return input('user name: ')
def get_password(self):
return getpass()
def entry_selector(self, entries):
if not entries:
return None, None
titles = list(entries.keys())
... | # coding: utf-8
from getpass import getpass
class CLIInput():
def get_user_name(self):
return input('user name: ')
def get_password(self):
return getpass()
def entry_selector(self, entries):
if not entries:
return None, None
titles = list(entries.keys())
... | <commit_before># coding: utf-8
from getpass import getpass
class CLIInput():
def get_user_name(self):
return input('user name: ')
def get_password(self):
return getpass()
def entry_selector(self, entries):
if not entries:
return None, None
titles = list(entr... |
043b5e7026663c8fdae8df4f27d3887ef881d405 | src/viewsapp/views.py | src/viewsapp/views.py | from django.shortcuts import (
get_object_or_404, redirect, render)
from django.views.generic import View
from .forms import ExampleForm
from .models import ExampleModel
class ModelDetail(View):
def get(self, request, *args, **kwargs):
request_slug = kwargs.get('slug')
example_obj = get_obje... | from django.shortcuts import redirect, render
from django.views.generic import DetailView, View
from .forms import ExampleForm
from .models import ExampleModel
class ModelDetail(DetailView):
model = ExampleModel
template_name = 'viewsapp/detail.html'
class ModelCreate(View):
context_object_name = 'form... | Refactor ModelDetail to inherit DetailView GCBV. | Refactor ModelDetail to inherit DetailView GCBV.
| Python | bsd-2-clause | jambonrose/djangocon2015-views,jambonrose/djangocon2015-views | from django.shortcuts import (
get_object_or_404, redirect, render)
from django.views.generic import View
from .forms import ExampleForm
from .models import ExampleModel
class ModelDetail(View):
def get(self, request, *args, **kwargs):
request_slug = kwargs.get('slug')
example_obj = get_obje... | from django.shortcuts import redirect, render
from django.views.generic import DetailView, View
from .forms import ExampleForm
from .models import ExampleModel
class ModelDetail(DetailView):
model = ExampleModel
template_name = 'viewsapp/detail.html'
class ModelCreate(View):
context_object_name = 'form... | <commit_before>from django.shortcuts import (
get_object_or_404, redirect, render)
from django.views.generic import View
from .forms import ExampleForm
from .models import ExampleModel
class ModelDetail(View):
def get(self, request, *args, **kwargs):
request_slug = kwargs.get('slug')
example... | from django.shortcuts import redirect, render
from django.views.generic import DetailView, View
from .forms import ExampleForm
from .models import ExampleModel
class ModelDetail(DetailView):
model = ExampleModel
template_name = 'viewsapp/detail.html'
class ModelCreate(View):
context_object_name = 'form... | from django.shortcuts import (
get_object_or_404, redirect, render)
from django.views.generic import View
from .forms import ExampleForm
from .models import ExampleModel
class ModelDetail(View):
def get(self, request, *args, **kwargs):
request_slug = kwargs.get('slug')
example_obj = get_obje... | <commit_before>from django.shortcuts import (
get_object_or_404, redirect, render)
from django.views.generic import View
from .forms import ExampleForm
from .models import ExampleModel
class ModelDetail(View):
def get(self, request, *args, **kwargs):
request_slug = kwargs.get('slug')
example... |
59426d66a252a5f53fab2d56d1f88883b743f097 | gears/processors/hexdigest_paths.py | gears/processors/hexdigest_paths.py | import os
import re
from ..assets import build_asset
from ..exceptions import FileNotFound
from .base import BaseProcessor
URL_RE = re.compile(r"""url\((['"]?)\s*(.*?)\s*\1\)""")
def rewrite_paths(source, func):
repl = lambda match: 'url({quote}{path}{quote})'.format(
quote=match.group(1),
path=... | import os
import re
from ..assets import build_asset
from ..exceptions import FileNotFound
from .base import BaseProcessor
URL_RE = re.compile(r"""url\((['"]?)\s*(.*?)\s*\1\)""")
def rewrite_paths(source, func):
repl = lambda match: 'url({quote}{path}{quote})'.format(
quote=match.group(1),
path=... | Convert string to raw string, in order to print "\\" in css. Otherwise the browse cannot reach the file. | Convert string to raw string, in order to print "\\" in css. Otherwise the browse cannot reach the file.
| Python | isc | gears/gears,gears/gears,gears/gears | import os
import re
from ..assets import build_asset
from ..exceptions import FileNotFound
from .base import BaseProcessor
URL_RE = re.compile(r"""url\((['"]?)\s*(.*?)\s*\1\)""")
def rewrite_paths(source, func):
repl = lambda match: 'url({quote}{path}{quote})'.format(
quote=match.group(1),
path=... | import os
import re
from ..assets import build_asset
from ..exceptions import FileNotFound
from .base import BaseProcessor
URL_RE = re.compile(r"""url\((['"]?)\s*(.*?)\s*\1\)""")
def rewrite_paths(source, func):
repl = lambda match: 'url({quote}{path}{quote})'.format(
quote=match.group(1),
path=... | <commit_before>import os
import re
from ..assets import build_asset
from ..exceptions import FileNotFound
from .base import BaseProcessor
URL_RE = re.compile(r"""url\((['"]?)\s*(.*?)\s*\1\)""")
def rewrite_paths(source, func):
repl = lambda match: 'url({quote}{path}{quote})'.format(
quote=match.group(1)... | import os
import re
from ..assets import build_asset
from ..exceptions import FileNotFound
from .base import BaseProcessor
URL_RE = re.compile(r"""url\((['"]?)\s*(.*?)\s*\1\)""")
def rewrite_paths(source, func):
repl = lambda match: 'url({quote}{path}{quote})'.format(
quote=match.group(1),
path=... | import os
import re
from ..assets import build_asset
from ..exceptions import FileNotFound
from .base import BaseProcessor
URL_RE = re.compile(r"""url\((['"]?)\s*(.*?)\s*\1\)""")
def rewrite_paths(source, func):
repl = lambda match: 'url({quote}{path}{quote})'.format(
quote=match.group(1),
path=... | <commit_before>import os
import re
from ..assets import build_asset
from ..exceptions import FileNotFound
from .base import BaseProcessor
URL_RE = re.compile(r"""url\((['"]?)\s*(.*?)\s*\1\)""")
def rewrite_paths(source, func):
repl = lambda match: 'url({quote}{path}{quote})'.format(
quote=match.group(1)... |
0eb1b641f55a43e83ccc098a0ee33ec2620a86ce | glue/utils/qt/qmessagebox_widget.py | glue/utils/qt/qmessagebox_widget.py | # A patched version of QMessageBox that allows copying the error
from ...external.qt import QtGui
__all__ = ['QMessageBoxPatched']
class QMessageBoxPatched(QtGui.QMessageBox):
def __init__(self, *args, **kwargs):
super(QMessageBoxPatched, self).__init__(*args, **kwargs)
copy_action = QtGui.QA... | # A patched version of QMessageBox that allows copying the error
import os
from ...external.qt import QtGui
__all__ = ['QMessageBoxPatched']
class QMessageBoxPatched(QtGui.QMessageBox):
def __init__(self, *args, **kwargs):
super(QMessageBoxPatched, self).__init__(*args, **kwargs)
copy_action ... | Fix newlines in copying of errors | Fix newlines in copying of errors | Python | bsd-3-clause | JudoWill/glue,stscieisenhamer/glue,stscieisenhamer/glue,saimn/glue,saimn/glue,JudoWill/glue | # A patched version of QMessageBox that allows copying the error
from ...external.qt import QtGui
__all__ = ['QMessageBoxPatched']
class QMessageBoxPatched(QtGui.QMessageBox):
def __init__(self, *args, **kwargs):
super(QMessageBoxPatched, self).__init__(*args, **kwargs)
copy_action = QtGui.QA... | # A patched version of QMessageBox that allows copying the error
import os
from ...external.qt import QtGui
__all__ = ['QMessageBoxPatched']
class QMessageBoxPatched(QtGui.QMessageBox):
def __init__(self, *args, **kwargs):
super(QMessageBoxPatched, self).__init__(*args, **kwargs)
copy_action ... | <commit_before># A patched version of QMessageBox that allows copying the error
from ...external.qt import QtGui
__all__ = ['QMessageBoxPatched']
class QMessageBoxPatched(QtGui.QMessageBox):
def __init__(self, *args, **kwargs):
super(QMessageBoxPatched, self).__init__(*args, **kwargs)
copy_ac... | # A patched version of QMessageBox that allows copying the error
import os
from ...external.qt import QtGui
__all__ = ['QMessageBoxPatched']
class QMessageBoxPatched(QtGui.QMessageBox):
def __init__(self, *args, **kwargs):
super(QMessageBoxPatched, self).__init__(*args, **kwargs)
copy_action ... | # A patched version of QMessageBox that allows copying the error
from ...external.qt import QtGui
__all__ = ['QMessageBoxPatched']
class QMessageBoxPatched(QtGui.QMessageBox):
def __init__(self, *args, **kwargs):
super(QMessageBoxPatched, self).__init__(*args, **kwargs)
copy_action = QtGui.QA... | <commit_before># A patched version of QMessageBox that allows copying the error
from ...external.qt import QtGui
__all__ = ['QMessageBoxPatched']
class QMessageBoxPatched(QtGui.QMessageBox):
def __init__(self, *args, **kwargs):
super(QMessageBoxPatched, self).__init__(*args, **kwargs)
copy_ac... |
8aed9b9402446a311f1f3f93c9bac4416ea114d9 | server/response.py | server/response.py | class HttpResponse(object):
def __init__(self):
self.body = ''
self.headers = {}
self.status_code = 200
self.status_string = 'OK'
self.version = 'HTTP/1.1'
def to_string(self):
h = '%s %d %s\r\n' % (
self.version, self.status_code, self.status_st... | class HttpResponse(object):
def __init__(self):
self.body = ''
self.headers = {}
self.status_code = 200
self.status_string = 'OK'
self.version = 'HTTP/1.1'
def to_string(self):
h = '%s %d %s\r\n' % (
self.version, self.status_code, self.status_st... | Set Content-Length to 0 when no body is set | Set Content-Length to 0 when no body is set
| Python | apache-2.0 | USMediaConsulting/pywebev | class HttpResponse(object):
def __init__(self):
self.body = ''
self.headers = {}
self.status_code = 200
self.status_string = 'OK'
self.version = 'HTTP/1.1'
def to_string(self):
h = '%s %d %s\r\n' % (
self.version, self.status_code, self.status_st... | class HttpResponse(object):
def __init__(self):
self.body = ''
self.headers = {}
self.status_code = 200
self.status_string = 'OK'
self.version = 'HTTP/1.1'
def to_string(self):
h = '%s %d %s\r\n' % (
self.version, self.status_code, self.status_st... | <commit_before>class HttpResponse(object):
def __init__(self):
self.body = ''
self.headers = {}
self.status_code = 200
self.status_string = 'OK'
self.version = 'HTTP/1.1'
def to_string(self):
h = '%s %d %s\r\n' % (
self.version, self.status_code,... | class HttpResponse(object):
def __init__(self):
self.body = ''
self.headers = {}
self.status_code = 200
self.status_string = 'OK'
self.version = 'HTTP/1.1'
def to_string(self):
h = '%s %d %s\r\n' % (
self.version, self.status_code, self.status_st... | class HttpResponse(object):
def __init__(self):
self.body = ''
self.headers = {}
self.status_code = 200
self.status_string = 'OK'
self.version = 'HTTP/1.1'
def to_string(self):
h = '%s %d %s\r\n' % (
self.version, self.status_code, self.status_st... | <commit_before>class HttpResponse(object):
def __init__(self):
self.body = ''
self.headers = {}
self.status_code = 200
self.status_string = 'OK'
self.version = 'HTTP/1.1'
def to_string(self):
h = '%s %d %s\r\n' % (
self.version, self.status_code,... |
12d5915c8ee3503770c387b0b6d623e53aef4915 | catalyst/constants.py | catalyst/constants.py | # -*- coding: utf-8 -*-
import logbook
LOG_LEVEL = logbook.DEBUG
DATE_TIME_FORMAT = '%Y-%m-%d %H:%M'
AUTO_INGEST = False | # -*- coding: utf-8 -*-
import os
import logbook
''' You can override the LOG level from your environment.
For example, if you want to see the DEBUG messages, run:
$ export CATALYST_LOG_LEVEL=10
'''
LOG_LEVEL = int(os.environ.get('CATALYST_LOG_LEVEL', logbook.INFO))
DATE_TIME_FORMAT = '%Y-%m-%d %H:%M'
AUTO_... | DEBUG level can be easily overriden from the local environment | ENH: DEBUG level can be easily overriden from the local environment
| Python | apache-2.0 | enigmampc/catalyst,enigmampc/catalyst | # -*- coding: utf-8 -*-
import logbook
LOG_LEVEL = logbook.DEBUG
DATE_TIME_FORMAT = '%Y-%m-%d %H:%M'
AUTO_INGEST = FalseENH: DEBUG level can be easily overriden from the local environment | # -*- coding: utf-8 -*-
import os
import logbook
''' You can override the LOG level from your environment.
For example, if you want to see the DEBUG messages, run:
$ export CATALYST_LOG_LEVEL=10
'''
LOG_LEVEL = int(os.environ.get('CATALYST_LOG_LEVEL', logbook.INFO))
DATE_TIME_FORMAT = '%Y-%m-%d %H:%M'
AUTO_... | <commit_before># -*- coding: utf-8 -*-
import logbook
LOG_LEVEL = logbook.DEBUG
DATE_TIME_FORMAT = '%Y-%m-%d %H:%M'
AUTO_INGEST = False<commit_msg>ENH: DEBUG level can be easily overriden from the local environment<commit_after> | # -*- coding: utf-8 -*-
import os
import logbook
''' You can override the LOG level from your environment.
For example, if you want to see the DEBUG messages, run:
$ export CATALYST_LOG_LEVEL=10
'''
LOG_LEVEL = int(os.environ.get('CATALYST_LOG_LEVEL', logbook.INFO))
DATE_TIME_FORMAT = '%Y-%m-%d %H:%M'
AUTO_... | # -*- coding: utf-8 -*-
import logbook
LOG_LEVEL = logbook.DEBUG
DATE_TIME_FORMAT = '%Y-%m-%d %H:%M'
AUTO_INGEST = FalseENH: DEBUG level can be easily overriden from the local environment# -*- coding: utf-8 -*-
import os
import logbook
''' You can override the LOG level from your environment.
For example, if ... | <commit_before># -*- coding: utf-8 -*-
import logbook
LOG_LEVEL = logbook.DEBUG
DATE_TIME_FORMAT = '%Y-%m-%d %H:%M'
AUTO_INGEST = False<commit_msg>ENH: DEBUG level can be easily overriden from the local environment<commit_after># -*- coding: utf-8 -*-
import os
import logbook
''' You can override the LOG level fr... |
7af01726bbfe1474efdb0fdca58ce83975e6918e | submit_mpi.py | submit_mpi.py | import subprocess
def read_node_status():
process = subprocess.Popen('pestat -f', shell=True,
stdout=subprocess.PIPE)
process.wait()
return process.stdout
if __name__ == '__main__':
stdout = read_node_status()
| import subprocess
def read_node_status():
process = subprocess.Popen('pestat -f', shell=True,
stdout=subprocess.PIPE)
process.wait()
return process.stdout
if __name__ == '__main__':
stdout = read_node_status()
for line in stdout:
print line
| Print stdout, forgot about that. | Print stdout, forgot about that.
| Python | mit | Johanu/submit_mpi | import subprocess
def read_node_status():
process = subprocess.Popen('pestat -f', shell=True,
stdout=subprocess.PIPE)
process.wait()
return process.stdout
if __name__ == '__main__':
stdout = read_node_status()
Print stdout, forgot about that. | import subprocess
def read_node_status():
process = subprocess.Popen('pestat -f', shell=True,
stdout=subprocess.PIPE)
process.wait()
return process.stdout
if __name__ == '__main__':
stdout = read_node_status()
for line in stdout:
print line
| <commit_before>import subprocess
def read_node_status():
process = subprocess.Popen('pestat -f', shell=True,
stdout=subprocess.PIPE)
process.wait()
return process.stdout
if __name__ == '__main__':
stdout = read_node_status()
<commit_msg>Print stdout, forgot about that.<... | import subprocess
def read_node_status():
process = subprocess.Popen('pestat -f', shell=True,
stdout=subprocess.PIPE)
process.wait()
return process.stdout
if __name__ == '__main__':
stdout = read_node_status()
for line in stdout:
print line
| import subprocess
def read_node_status():
process = subprocess.Popen('pestat -f', shell=True,
stdout=subprocess.PIPE)
process.wait()
return process.stdout
if __name__ == '__main__':
stdout = read_node_status()
Print stdout, forgot about that.import subprocess
def read... | <commit_before>import subprocess
def read_node_status():
process = subprocess.Popen('pestat -f', shell=True,
stdout=subprocess.PIPE)
process.wait()
return process.stdout
if __name__ == '__main__':
stdout = read_node_status()
<commit_msg>Print stdout, forgot about that.<... |
e7a6c4f669c31bc25ac0eb738e9b6584793db5dc | indra/reach/reach_reader.py | indra/reach/reach_reader.py | from indra.java_vm import autoclass, JavaException
class ReachReader(object):
"""The ReachReaader wraps a singleton instance of the REACH reader.
This allows calling the reader many times without having to wait for it to
start up each time.
Attributes
----------
api_ruler : edu.arizona.sista.... | from indra.java_vm import autoclass, JavaException
class ReachReader(object):
"""The ReachReaader wraps a singleton instance of the REACH reader.
This allows calling the reader many times without having to wait for it to
start up each time.
Attributes
----------
api_ruler : org.clulab.reach.a... | Update REACH reader to new API class path | Update REACH reader to new API class path
| Python | bsd-2-clause | johnbachman/belpy,bgyori/indra,pvtodorov/indra,johnbachman/belpy,pvtodorov/indra,sorgerlab/belpy,pvtodorov/indra,jmuhlich/indra,pvtodorov/indra,johnbachman/belpy,johnbachman/indra,johnbachman/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/belpy,jmuhlich/indra,bgyori/indra,sorgerlab/indra,jmuhlich/indra,sorgerlab/indra,jo... | from indra.java_vm import autoclass, JavaException
class ReachReader(object):
"""The ReachReaader wraps a singleton instance of the REACH reader.
This allows calling the reader many times without having to wait for it to
start up each time.
Attributes
----------
api_ruler : edu.arizona.sista.... | from indra.java_vm import autoclass, JavaException
class ReachReader(object):
"""The ReachReaader wraps a singleton instance of the REACH reader.
This allows calling the reader many times without having to wait for it to
start up each time.
Attributes
----------
api_ruler : org.clulab.reach.a... | <commit_before>from indra.java_vm import autoclass, JavaException
class ReachReader(object):
"""The ReachReaader wraps a singleton instance of the REACH reader.
This allows calling the reader many times without having to wait for it to
start up each time.
Attributes
----------
api_ruler : edu... | from indra.java_vm import autoclass, JavaException
class ReachReader(object):
"""The ReachReaader wraps a singleton instance of the REACH reader.
This allows calling the reader many times without having to wait for it to
start up each time.
Attributes
----------
api_ruler : org.clulab.reach.a... | from indra.java_vm import autoclass, JavaException
class ReachReader(object):
"""The ReachReaader wraps a singleton instance of the REACH reader.
This allows calling the reader many times without having to wait for it to
start up each time.
Attributes
----------
api_ruler : edu.arizona.sista.... | <commit_before>from indra.java_vm import autoclass, JavaException
class ReachReader(object):
"""The ReachReaader wraps a singleton instance of the REACH reader.
This allows calling the reader many times without having to wait for it to
start up each time.
Attributes
----------
api_ruler : edu... |
1937d8ad8a98058b00d48af4a56f8dd4c6a2176d | tests/__init__.py | tests/__init__.py | """Unit and functional test suite for SkyLines."""
import os
import shutil
from skylines.model import db
from tests.data.bootstrap import bootstrap
__all__ = ['setup_db', 'setup_app', 'teardown_db']
def setup_db():
"""Method used to build a database"""
db.create_all()
def setup_dirs(app):
filesdir = a... | """Unit and functional test suite for SkyLines."""
import os
import shutil
from skylines.model import db
from tests.data.bootstrap import bootstrap
__all__ = ['setup_db', 'setup_app', 'teardown_db']
def setup_db():
"""Method used to build a database"""
db.create_all()
def setup_dirs(app):
filesdir = a... | Fix database connection leak in tests | Fix database connection leak in tests
Without this, each flask app created in tests will hold
one database connection until all tests are finished. This may result
in test failure if database limits number of concurrent connections.
| Python | agpl-3.0 | snip/skylines,Turbo87/skylines,RBE-Avionik/skylines,Turbo87/skylines,shadowoneau/skylines,TobiasLohner/SkyLines,TobiasLohner/SkyLines,Turbo87/skylines,snip/skylines,Harry-R/skylines,shadowoneau/skylines,TobiasLohner/SkyLines,Turbo87/skylines,skylines-project/skylines,RBE-Avionik/skylines,kerel-fs/skylines,shadowoneau/s... | """Unit and functional test suite for SkyLines."""
import os
import shutil
from skylines.model import db
from tests.data.bootstrap import bootstrap
__all__ = ['setup_db', 'setup_app', 'teardown_db']
def setup_db():
"""Method used to build a database"""
db.create_all()
def setup_dirs(app):
filesdir = a... | """Unit and functional test suite for SkyLines."""
import os
import shutil
from skylines.model import db
from tests.data.bootstrap import bootstrap
__all__ = ['setup_db', 'setup_app', 'teardown_db']
def setup_db():
"""Method used to build a database"""
db.create_all()
def setup_dirs(app):
filesdir = a... | <commit_before>"""Unit and functional test suite for SkyLines."""
import os
import shutil
from skylines.model import db
from tests.data.bootstrap import bootstrap
__all__ = ['setup_db', 'setup_app', 'teardown_db']
def setup_db():
"""Method used to build a database"""
db.create_all()
def setup_dirs(app):
... | """Unit and functional test suite for SkyLines."""
import os
import shutil
from skylines.model import db
from tests.data.bootstrap import bootstrap
__all__ = ['setup_db', 'setup_app', 'teardown_db']
def setup_db():
"""Method used to build a database"""
db.create_all()
def setup_dirs(app):
filesdir = a... | """Unit and functional test suite for SkyLines."""
import os
import shutil
from skylines.model import db
from tests.data.bootstrap import bootstrap
__all__ = ['setup_db', 'setup_app', 'teardown_db']
def setup_db():
"""Method used to build a database"""
db.create_all()
def setup_dirs(app):
filesdir = a... | <commit_before>"""Unit and functional test suite for SkyLines."""
import os
import shutil
from skylines.model import db
from tests.data.bootstrap import bootstrap
__all__ = ['setup_db', 'setup_app', 'teardown_db']
def setup_db():
"""Method used to build a database"""
db.create_all()
def setup_dirs(app):
... |
f1a5b1b9c5d56c12292ac2cdd42c2b7eff2dc1fc | tests/__init__.py | tests/__init__.py | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Tests for the library and tools."""
import abc
class Matcher(metaclass=abc.ABCMeta):
"""A base class of all matchers."""
@abc.abstractmethod
... | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Tests for the library and tools."""
import abc
class Matcher(metaclass=abc.ABCMeta):
"""A base class of all matchers."""
@abc.abstractmethod
... | Rename a variable in Matcher.__repr__() to make the code less confusing. | Rename a variable in Matcher.__repr__() to make the code less confusing.
Even though there is technically no name clash, the code is now less confusing.
| Python | mit | s3rvac/retdec-python | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Tests for the library and tools."""
import abc
class Matcher(metaclass=abc.ABCMeta):
"""A base class of all matchers."""
@abc.abstractmethod
... | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Tests for the library and tools."""
import abc
class Matcher(metaclass=abc.ABCMeta):
"""A base class of all matchers."""
@abc.abstractmethod
... | <commit_before>#
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Tests for the library and tools."""
import abc
class Matcher(metaclass=abc.ABCMeta):
"""A base class of all matchers."""
@abc.abst... | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Tests for the library and tools."""
import abc
class Matcher(metaclass=abc.ABCMeta):
"""A base class of all matchers."""
@abc.abstractmethod
... | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Tests for the library and tools."""
import abc
class Matcher(metaclass=abc.ABCMeta):
"""A base class of all matchers."""
@abc.abstractmethod
... | <commit_before>#
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Tests for the library and tools."""
import abc
class Matcher(metaclass=abc.ABCMeta):
"""A base class of all matchers."""
@abc.abst... |
4d547ffa4112412e340abd6231cd406d14b8ff35 | l10n_lu_ecdf/__openerp__.py | l10n_lu_ecdf/__openerp__.py | {
"name": "eCDF annual reports",
"version": "8.0.1.0.0",
"author": "ACSONE SA/NV",
"license": "AGPL-3",
"category": "Accounting & Finance",
"website": "http://acsone.eu",
"depends": ["l10n_lu_mis_reports",
"mis_builder"],
"module": "",
"summary": "Generates XML eCDF a... | {
"name": "eCDF annual reports",
"version": "8.0.1.0.0",
"author": "ACSONE SA/NV",
"license": "AGPL-3",
"category": "Accounting & Finance",
"website": "http://acsone.eu",
"depends": ["l10n_lu_ext",
"l10n_lu_mis_reports",
"mis_builder"],
"module": "",
"... | Add dependency on l10n_lu_ext, for the field l10n_lu_matricule | [FIX] Add dependency on l10n_lu_ext, for the field l10n_lu_matricule
| Python | agpl-3.0 | acsone/l10n-luxemburg | {
"name": "eCDF annual reports",
"version": "8.0.1.0.0",
"author": "ACSONE SA/NV",
"license": "AGPL-3",
"category": "Accounting & Finance",
"website": "http://acsone.eu",
"depends": ["l10n_lu_mis_reports",
"mis_builder"],
"module": "",
"summary": "Generates XML eCDF a... | {
"name": "eCDF annual reports",
"version": "8.0.1.0.0",
"author": "ACSONE SA/NV",
"license": "AGPL-3",
"category": "Accounting & Finance",
"website": "http://acsone.eu",
"depends": ["l10n_lu_ext",
"l10n_lu_mis_reports",
"mis_builder"],
"module": "",
"... | <commit_before>{
"name": "eCDF annual reports",
"version": "8.0.1.0.0",
"author": "ACSONE SA/NV",
"license": "AGPL-3",
"category": "Accounting & Finance",
"website": "http://acsone.eu",
"depends": ["l10n_lu_mis_reports",
"mis_builder"],
"module": "",
"summary": "Gener... | {
"name": "eCDF annual reports",
"version": "8.0.1.0.0",
"author": "ACSONE SA/NV",
"license": "AGPL-3",
"category": "Accounting & Finance",
"website": "http://acsone.eu",
"depends": ["l10n_lu_ext",
"l10n_lu_mis_reports",
"mis_builder"],
"module": "",
"... | {
"name": "eCDF annual reports",
"version": "8.0.1.0.0",
"author": "ACSONE SA/NV",
"license": "AGPL-3",
"category": "Accounting & Finance",
"website": "http://acsone.eu",
"depends": ["l10n_lu_mis_reports",
"mis_builder"],
"module": "",
"summary": "Generates XML eCDF a... | <commit_before>{
"name": "eCDF annual reports",
"version": "8.0.1.0.0",
"author": "ACSONE SA/NV",
"license": "AGPL-3",
"category": "Accounting & Finance",
"website": "http://acsone.eu",
"depends": ["l10n_lu_mis_reports",
"mis_builder"],
"module": "",
"summary": "Gener... |
d93628d8cc63301148a139a6c1c354620e5e57d1 | tests/settings.py | tests/settings.py | SECRET_KEY = 'SEKRIT'
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.admin',
'tests',
)
ROOT_URLCONF = 'tests.urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'enumfields.db',
... | SECRET_KEY = 'SEKRIT'
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.admin',
'tests',
)
ROOT_URLCONF = 'tests.urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'enumfields.db',
... | Add new required middleware to make tests pass on Django 1.7 | Add new required middleware to make tests pass on Django 1.7
| Python | mit | suutari-ai/django-enumfields,jackyyf/django-enumfields,bxm156/django-enumfields,jessamynsmith/django-enumfields | SECRET_KEY = 'SEKRIT'
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.admin',
'tests',
)
ROOT_URLCONF = 'tests.urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'enumfields.db',
... | SECRET_KEY = 'SEKRIT'
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.admin',
'tests',
)
ROOT_URLCONF = 'tests.urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'enumfields.db',
... | <commit_before>SECRET_KEY = 'SEKRIT'
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.admin',
'tests',
)
ROOT_URLCONF = 'tests.urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'en... | SECRET_KEY = 'SEKRIT'
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.admin',
'tests',
)
ROOT_URLCONF = 'tests.urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'enumfields.db',
... | SECRET_KEY = 'SEKRIT'
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.admin',
'tests',
)
ROOT_URLCONF = 'tests.urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'enumfields.db',
... | <commit_before>SECRET_KEY = 'SEKRIT'
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.admin',
'tests',
)
ROOT_URLCONF = 'tests.urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'en... |
e6d7181ababaa9f08602c48e03d6557ddb6a4deb | tests/test_gio.py | tests/test_gio.py | # -*- Mode: Python -*-
import os
import unittest
from common import gio, gobject
class TestInputStream(unittest.TestCase):
def setUp(self):
f = open("inputstream.txt", "w")
f.write("testing")
self._f = open("inputstream.txt", "r")
self.stream = gio.unix.InputStream(self._f.filen... | # -*- Mode: Python -*-
import os
import unittest
from common import gio, gobject
class TestInputStream(unittest.TestCase):
def setUp(self):
f = open("inputstream.txt", "w")
f.write("testing")
self._f = open("inputstream.txt", "r")
self.stream = gio.unix.InputStream(self._f.filen... | Reorganize tests and make them test more useful things | Reorganize tests and make them test more useful things
svn path=/trunk/; revision=738
| Python | lgpl-2.1 | pexip/pygobject,GNOME/pygobject,davibe/pygobject,alexef/pygobject,davidmalcolm/pygobject,MathieuDuponchelle/pygobject,davidmalcolm/pygobject,Distrotech/pygobject,choeger/pygobject-cmake,sfeltman/pygobject,Distrotech/pygobject,MathieuDuponchelle/pygobject,GNOME/pygobject,thiblahute/pygobject,jdahlin/pygobject,atizo/pygo... | # -*- Mode: Python -*-
import os
import unittest
from common import gio, gobject
class TestInputStream(unittest.TestCase):
def setUp(self):
f = open("inputstream.txt", "w")
f.write("testing")
self._f = open("inputstream.txt", "r")
self.stream = gio.unix.InputStream(self._f.filen... | # -*- Mode: Python -*-
import os
import unittest
from common import gio, gobject
class TestInputStream(unittest.TestCase):
def setUp(self):
f = open("inputstream.txt", "w")
f.write("testing")
self._f = open("inputstream.txt", "r")
self.stream = gio.unix.InputStream(self._f.filen... | <commit_before># -*- Mode: Python -*-
import os
import unittest
from common import gio, gobject
class TestInputStream(unittest.TestCase):
def setUp(self):
f = open("inputstream.txt", "w")
f.write("testing")
self._f = open("inputstream.txt", "r")
self.stream = gio.unix.InputStrea... | # -*- Mode: Python -*-
import os
import unittest
from common import gio, gobject
class TestInputStream(unittest.TestCase):
def setUp(self):
f = open("inputstream.txt", "w")
f.write("testing")
self._f = open("inputstream.txt", "r")
self.stream = gio.unix.InputStream(self._f.filen... | # -*- Mode: Python -*-
import os
import unittest
from common import gio, gobject
class TestInputStream(unittest.TestCase):
def setUp(self):
f = open("inputstream.txt", "w")
f.write("testing")
self._f = open("inputstream.txt", "r")
self.stream = gio.unix.InputStream(self._f.filen... | <commit_before># -*- Mode: Python -*-
import os
import unittest
from common import gio, gobject
class TestInputStream(unittest.TestCase):
def setUp(self):
f = open("inputstream.txt", "w")
f.write("testing")
self._f = open("inputstream.txt", "r")
self.stream = gio.unix.InputStrea... |
4db16ece582e8f0a81e032ea1a37c9cbf344a261 | couchdb/tests/testutil.py | couchdb/tests/testutil.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import uuid
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs = None
_d... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import random
import sys
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs ... | Use a random number instead of uuid for temp database name. | Use a random number instead of uuid for temp database name. | Python | bsd-3-clause | zielmicha/couchdb-python,ajmirsky/couchdb-python | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import uuid
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs = None
_d... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import random
import sys
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs ... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import uuid
from couchdb import client
class TempDatabaseMixin(object):
temp_db... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import random
import sys
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs ... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import uuid
from couchdb import client
class TempDatabaseMixin(object):
temp_dbs = None
_d... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import uuid
from couchdb import client
class TempDatabaseMixin(object):
temp_db... |
66a6d66ccdc14ca5ad8c2870b18318c5c94524c6 | src/romaine/core.py | src/romaine/core.py | import os
class Core(object):
"""
The core of the Romaine, provides BDD test API.
"""
# All located features
feature_file_paths = []
instance = None
def __init__(self):
"""
Initialise Romaine core.
"""
self.steps = {}
Core.instance = self
... | import os
class Core(object):
"""
The core of the Romaine, provides BDD test API.
"""
# All located features
feature_file_paths = set()
instance = None
def __init__(self):
"""
Initialise Romaine core.
"""
self.steps = {}
Core.instance = self... | Make feature_file_paths have no duplicates | Make feature_file_paths have no duplicates
| Python | mit | trojjer/romaine,london-python-project-nights/romaine,london-python-project-nights/romaine | import os
class Core(object):
"""
The core of the Romaine, provides BDD test API.
"""
# All located features
feature_file_paths = []
instance = None
def __init__(self):
"""
Initialise Romaine core.
"""
self.steps = {}
Core.instance = self
... | import os
class Core(object):
"""
The core of the Romaine, provides BDD test API.
"""
# All located features
feature_file_paths = set()
instance = None
def __init__(self):
"""
Initialise Romaine core.
"""
self.steps = {}
Core.instance = self... | <commit_before>import os
class Core(object):
"""
The core of the Romaine, provides BDD test API.
"""
# All located features
feature_file_paths = []
instance = None
def __init__(self):
"""
Initialise Romaine core.
"""
self.steps = {}
Core.ins... | import os
class Core(object):
"""
The core of the Romaine, provides BDD test API.
"""
# All located features
feature_file_paths = set()
instance = None
def __init__(self):
"""
Initialise Romaine core.
"""
self.steps = {}
Core.instance = self... | import os
class Core(object):
"""
The core of the Romaine, provides BDD test API.
"""
# All located features
feature_file_paths = []
instance = None
def __init__(self):
"""
Initialise Romaine core.
"""
self.steps = {}
Core.instance = self
... | <commit_before>import os
class Core(object):
"""
The core of the Romaine, provides BDD test API.
"""
# All located features
feature_file_paths = []
instance = None
def __init__(self):
"""
Initialise Romaine core.
"""
self.steps = {}
Core.ins... |
38bb089a4885053c2058ba65ea9380fcc7c99f62 | ulp/urlextract.py | ulp/urlextract.py | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.getenv('HOM... | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.path.expand... | Use expanduser instead of env | Use expanduser instead of env
| Python | mit | victal/ulp,victal/ulp | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.getenv('HOM... | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.path.expand... | <commit_before># coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join... | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.path.expand... | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.getenv('HOM... | <commit_before># coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join... |
32c7baf89057741a898b10a01a7535c4af3f41b3 | maestro/exceptions.py | maestro/exceptions.py | # Copyright (C) 2013 SignalFuse, Inc.
#
# Docker container orchestration utility.
class MaestroException(Exception):
"""Base class for Maestro exceptions."""
pass
class DependencyException(MaestroException):
"""Dependency resolution error."""
pass
class ParameterException(MaestroException):
""... | # Copyright (C) 2013 SignalFuse, Inc.
#
# Docker container orchestration utility.
class MaestroException(Exception):
"""Base class for Maestro exceptions."""
pass
class DependencyException(MaestroException):
"""Dependency resolution error."""
pass
class ParameterException(MaestroException):
""... | Add exception to denote YAML environment configuration issues | Add exception to denote YAML environment configuration issues
Signed-off-by: Maxime Petazzoni <0706025b2bbcec1ed8d64822f4eccd96314938d0@signalfuse.com>
| Python | apache-2.0 | jorge-marques/maestro-ng,jorge-marques/maestro-ng,signalfuse/maestro-ng,signalfx/maestro-ng,Anvil/maestro-ng,Anvil/maestro-ng,ivotron/maestro-ng,signalfuse/maestro-ng,ivotron/maestro-ng,signalfx/maestro-ng,zsuzhengdu/maestro-ng,zsuzhengdu/maestro-ng | # Copyright (C) 2013 SignalFuse, Inc.
#
# Docker container orchestration utility.
class MaestroException(Exception):
"""Base class for Maestro exceptions."""
pass
class DependencyException(MaestroException):
"""Dependency resolution error."""
pass
class ParameterException(MaestroException):
""... | # Copyright (C) 2013 SignalFuse, Inc.
#
# Docker container orchestration utility.
class MaestroException(Exception):
"""Base class for Maestro exceptions."""
pass
class DependencyException(MaestroException):
"""Dependency resolution error."""
pass
class ParameterException(MaestroException):
""... | <commit_before># Copyright (C) 2013 SignalFuse, Inc.
#
# Docker container orchestration utility.
class MaestroException(Exception):
"""Base class for Maestro exceptions."""
pass
class DependencyException(MaestroException):
"""Dependency resolution error."""
pass
class ParameterException(MaestroExc... | # Copyright (C) 2013 SignalFuse, Inc.
#
# Docker container orchestration utility.
class MaestroException(Exception):
"""Base class for Maestro exceptions."""
pass
class DependencyException(MaestroException):
"""Dependency resolution error."""
pass
class ParameterException(MaestroException):
""... | # Copyright (C) 2013 SignalFuse, Inc.
#
# Docker container orchestration utility.
class MaestroException(Exception):
"""Base class for Maestro exceptions."""
pass
class DependencyException(MaestroException):
"""Dependency resolution error."""
pass
class ParameterException(MaestroException):
""... | <commit_before># Copyright (C) 2013 SignalFuse, Inc.
#
# Docker container orchestration utility.
class MaestroException(Exception):
"""Base class for Maestro exceptions."""
pass
class DependencyException(MaestroException):
"""Dependency resolution error."""
pass
class ParameterException(MaestroExc... |
9120cfa9bb31e1cca5adba77ac7a872ed3b8dc99 | tweets/models.py | tweets/models.py | from django.conf import settings
from django.db import models
class HashTag(models.Model):
# The hash tag length can't be more than the body length minus the `#`
text = models.CharField(max_length=139)
def __str__(self):
return self.text
class Message(models.Model):
user = models.ForeignKey... | from django.conf import settings
from django.db import models
class HashTag(models.Model):
# The hash tag length can't be more than the body length minus the `#`
text = models.CharField(max_length=139)
def __str__(self):
return self.text
class Message(models.Model):
user = models.ForeignKey... | Add blank to allow no stars/tags in admin | Add blank to allow no stars/tags in admin
| Python | mit | pennomi/openwest2015-twitter-clone,pennomi/openwest2015-twitter-clone,pennomi/openwest2015-twitter-clone | from django.conf import settings
from django.db import models
class HashTag(models.Model):
# The hash tag length can't be more than the body length minus the `#`
text = models.CharField(max_length=139)
def __str__(self):
return self.text
class Message(models.Model):
user = models.ForeignKey... | from django.conf import settings
from django.db import models
class HashTag(models.Model):
# The hash tag length can't be more than the body length minus the `#`
text = models.CharField(max_length=139)
def __str__(self):
return self.text
class Message(models.Model):
user = models.ForeignKey... | <commit_before>from django.conf import settings
from django.db import models
class HashTag(models.Model):
# The hash tag length can't be more than the body length minus the `#`
text = models.CharField(max_length=139)
def __str__(self):
return self.text
class Message(models.Model):
user = mo... | from django.conf import settings
from django.db import models
class HashTag(models.Model):
# The hash tag length can't be more than the body length minus the `#`
text = models.CharField(max_length=139)
def __str__(self):
return self.text
class Message(models.Model):
user = models.ForeignKey... | from django.conf import settings
from django.db import models
class HashTag(models.Model):
# The hash tag length can't be more than the body length minus the `#`
text = models.CharField(max_length=139)
def __str__(self):
return self.text
class Message(models.Model):
user = models.ForeignKey... | <commit_before>from django.conf import settings
from django.db import models
class HashTag(models.Model):
# The hash tag length can't be more than the body length minus the `#`
text = models.CharField(max_length=139)
def __str__(self):
return self.text
class Message(models.Model):
user = mo... |
fd4dc4bdd32283b67577630c38624d3df705efd3 | mathphys/functions.py | mathphys/functions.py | """Useful functions."""
import numpy as _np
def polyfit(x, y, monomials, algorithm='lstsq'):
"""Implement Custom polyfit."""
X = _np.zeros((len(x), len(monomials)))
N = _np.zeros((len(x), len(monomials)))
for i in range(X.shape[1]):
X[:, i] = x
N[:, i] = monomials[i]
XN = X ** N
... | """Useful functions."""
import numpy as _np
def polyfit(x, y, monomials):
"""Implement Custom polyfit."""
coef = _np.polynomial.polynomial.polyfit(x, y, deg=monomials)
# finds maximum diff and its base value
y_fitted = _np.polynomial.polynomial.polyval(x, coef)
y_diff = abs(y_fitted - y)
idx... | Change implementaton of polyfit method. | API: Change implementaton of polyfit method.
Use new numpy.polynomial.polynomial.polyfit instead of implementing leastsquares by hand. This method is supposed to be more robust to numerical errors.
With this change, the keyword argument algorithm was removed.
| Python | mit | lnls-fac/mathphys | """Useful functions."""
import numpy as _np
def polyfit(x, y, monomials, algorithm='lstsq'):
"""Implement Custom polyfit."""
X = _np.zeros((len(x), len(monomials)))
N = _np.zeros((len(x), len(monomials)))
for i in range(X.shape[1]):
X[:, i] = x
N[:, i] = monomials[i]
XN = X ** N
... | """Useful functions."""
import numpy as _np
def polyfit(x, y, monomials):
"""Implement Custom polyfit."""
coef = _np.polynomial.polynomial.polyfit(x, y, deg=monomials)
# finds maximum diff and its base value
y_fitted = _np.polynomial.polynomial.polyval(x, coef)
y_diff = abs(y_fitted - y)
idx... | <commit_before>"""Useful functions."""
import numpy as _np
def polyfit(x, y, monomials, algorithm='lstsq'):
"""Implement Custom polyfit."""
X = _np.zeros((len(x), len(monomials)))
N = _np.zeros((len(x), len(monomials)))
for i in range(X.shape[1]):
X[:, i] = x
N[:, i] = monomials[i]
... | """Useful functions."""
import numpy as _np
def polyfit(x, y, monomials):
"""Implement Custom polyfit."""
coef = _np.polynomial.polynomial.polyfit(x, y, deg=monomials)
# finds maximum diff and its base value
y_fitted = _np.polynomial.polynomial.polyval(x, coef)
y_diff = abs(y_fitted - y)
idx... | """Useful functions."""
import numpy as _np
def polyfit(x, y, monomials, algorithm='lstsq'):
"""Implement Custom polyfit."""
X = _np.zeros((len(x), len(monomials)))
N = _np.zeros((len(x), len(monomials)))
for i in range(X.shape[1]):
X[:, i] = x
N[:, i] = monomials[i]
XN = X ** N
... | <commit_before>"""Useful functions."""
import numpy as _np
def polyfit(x, y, monomials, algorithm='lstsq'):
"""Implement Custom polyfit."""
X = _np.zeros((len(x), len(monomials)))
N = _np.zeros((len(x), len(monomials)))
for i in range(X.shape[1]):
X[:, i] = x
N[:, i] = monomials[i]
... |
0fb6842a85056b16b4bc4f4d48edcc4b0d749b94 | src/pi/wemo_proxy.py | src/pi/wemo_proxy.py | """Wemo proxy code."""
import logging
import sys
import threading
from wemo import upnp
class Wemo(object):
"""Hue proxy object."""
def __init__(self, refresh_period, callback):
self._refresh_period = refresh_period
self._callback = callback
def _wemo_callback(self, address, headers):
logging.inf... | """Wemo proxy code."""
import logging
import sys
import threading
#from wemo import upnp
class Wemo(object):
"""Hue proxy object."""
def __init__(self, refresh_period, callback):
self._refresh_period = refresh_period
self._callback = callback
def _wemo_callback(self, address, headers):
logging.in... | Comment out wemo stuff for now. | Comment out wemo stuff for now.
| Python | mit | tomwilkie/awesomation,tomwilkie/awesomation,tomwilkie/awesomation,tomwilkie/awesomation,tomwilkie/awesomation | """Wemo proxy code."""
import logging
import sys
import threading
from wemo import upnp
class Wemo(object):
"""Hue proxy object."""
def __init__(self, refresh_period, callback):
self._refresh_period = refresh_period
self._callback = callback
def _wemo_callback(self, address, headers):
logging.inf... | """Wemo proxy code."""
import logging
import sys
import threading
#from wemo import upnp
class Wemo(object):
"""Hue proxy object."""
def __init__(self, refresh_period, callback):
self._refresh_period = refresh_period
self._callback = callback
def _wemo_callback(self, address, headers):
logging.in... | <commit_before>"""Wemo proxy code."""
import logging
import sys
import threading
from wemo import upnp
class Wemo(object):
"""Hue proxy object."""
def __init__(self, refresh_period, callback):
self._refresh_period = refresh_period
self._callback = callback
def _wemo_callback(self, address, headers):
... | """Wemo proxy code."""
import logging
import sys
import threading
#from wemo import upnp
class Wemo(object):
"""Hue proxy object."""
def __init__(self, refresh_period, callback):
self._refresh_period = refresh_period
self._callback = callback
def _wemo_callback(self, address, headers):
logging.in... | """Wemo proxy code."""
import logging
import sys
import threading
from wemo import upnp
class Wemo(object):
"""Hue proxy object."""
def __init__(self, refresh_period, callback):
self._refresh_period = refresh_period
self._callback = callback
def _wemo_callback(self, address, headers):
logging.inf... | <commit_before>"""Wemo proxy code."""
import logging
import sys
import threading
from wemo import upnp
class Wemo(object):
"""Hue proxy object."""
def __init__(self, refresh_period, callback):
self._refresh_period = refresh_period
self._callback = callback
def _wemo_callback(self, address, headers):
... |
4a0516e6f7abee9378a5c46b7a262848a76d7f49 | employees/serializers.py | employees/serializers.py | from .models import Employee
from rest_framework import serializers
class EmployeeSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
depth = 1
fields = ('pk',
'username',
'email',
'first_name',
'last... | from .models import Employee
from rest_framework import serializers
class EmployeeSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
depth = 1
fields = ('pk',
'username',
'email',
'first_name',
'last... | Remove categories from employee serializer | Remove categories from employee serializer
| Python | apache-2.0 | belatrix/BackendAllStars | from .models import Employee
from rest_framework import serializers
class EmployeeSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
depth = 1
fields = ('pk',
'username',
'email',
'first_name',
'last... | from .models import Employee
from rest_framework import serializers
class EmployeeSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
depth = 1
fields = ('pk',
'username',
'email',
'first_name',
'last... | <commit_before>from .models import Employee
from rest_framework import serializers
class EmployeeSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
depth = 1
fields = ('pk',
'username',
'email',
'first_name',
... | from .models import Employee
from rest_framework import serializers
class EmployeeSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
depth = 1
fields = ('pk',
'username',
'email',
'first_name',
'last... | from .models import Employee
from rest_framework import serializers
class EmployeeSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
depth = 1
fields = ('pk',
'username',
'email',
'first_name',
'last... | <commit_before>from .models import Employee
from rest_framework import serializers
class EmployeeSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
depth = 1
fields = ('pk',
'username',
'email',
'first_name',
... |
5ee949626b2d5b132f8ec1ce7d597a7ad401cfa5 | epydemiology/__init__.py | epydemiology/__init__.py | # These are the functions that can be accessed from epydemiology.
# Other functions that are used internally cannot be accessed
# directly by end-users.
from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from .phjCleanData ... | # These are the functions that can be accessed from epydemiology.
# Other functions that are used internally cannot be accessed
# directly by end-users.
from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from .phjCleanData ... | Add phjCollapseOnPatientID and remove phjGetCollapsedPatientDataframeColumns | Add phjCollapseOnPatientID and remove phjGetCollapsedPatientDataframeColumns
| Python | mit | lvphj/epydemiology | # These are the functions that can be accessed from epydemiology.
# Other functions that are used internally cannot be accessed
# directly by end-users.
from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from .phjCleanData ... | # These are the functions that can be accessed from epydemiology.
# Other functions that are used internally cannot be accessed
# directly by end-users.
from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from .phjCleanData ... | <commit_before># These are the functions that can be accessed from epydemiology.
# Other functions that are used internally cannot be accessed
# directly by end-users.
from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from... | # These are the functions that can be accessed from epydemiology.
# Other functions that are used internally cannot be accessed
# directly by end-users.
from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from .phjCleanData ... | # These are the functions that can be accessed from epydemiology.
# Other functions that are used internally cannot be accessed
# directly by end-users.
from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from .phjCleanData ... | <commit_before># These are the functions that can be accessed from epydemiology.
# Other functions that are used internally cannot be accessed
# directly by end-users.
from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from... |
c147751066d8fb4e36a30f26d0acc614f0b2275f | transfers/models.py | transfers/models.py | import os
from sqlalchemy import create_engine
from sqlalchemy import Sequence
from sqlalchemy import Column, Boolean, Integer, String, Text
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
db_path = os.path.join(os.path.dirname(__file__), 'transfers.db')
engine = create... | import os
from sqlalchemy import create_engine
from sqlalchemy import Sequence
from sqlalchemy import Column, Binary, Boolean, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
db_path = os.path.join(os.path.dirname(__file__), 'transfers.db')
engine = crea... | Automate Transfers: Paths stored as binary to handle encodings | Automate Transfers: Paths stored as binary to handle encodings
| Python | agpl-3.0 | artefactual/automation-tools,finoradin/automation-tools,artefactual/automation-tools | import os
from sqlalchemy import create_engine
from sqlalchemy import Sequence
from sqlalchemy import Column, Boolean, Integer, String, Text
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
db_path = os.path.join(os.path.dirname(__file__), 'transfers.db')
engine = create... | import os
from sqlalchemy import create_engine
from sqlalchemy import Sequence
from sqlalchemy import Column, Binary, Boolean, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
db_path = os.path.join(os.path.dirname(__file__), 'transfers.db')
engine = crea... | <commit_before>import os
from sqlalchemy import create_engine
from sqlalchemy import Sequence
from sqlalchemy import Column, Boolean, Integer, String, Text
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
db_path = os.path.join(os.path.dirname(__file__), 'transfers.db')
... | import os
from sqlalchemy import create_engine
from sqlalchemy import Sequence
from sqlalchemy import Column, Binary, Boolean, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
db_path = os.path.join(os.path.dirname(__file__), 'transfers.db')
engine = crea... | import os
from sqlalchemy import create_engine
from sqlalchemy import Sequence
from sqlalchemy import Column, Boolean, Integer, String, Text
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
db_path = os.path.join(os.path.dirname(__file__), 'transfers.db')
engine = create... | <commit_before>import os
from sqlalchemy import create_engine
from sqlalchemy import Sequence
from sqlalchemy import Column, Boolean, Integer, String, Text
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
db_path = os.path.join(os.path.dirname(__file__), 'transfers.db')
... |
22173c249ea0ee8eeceb9238f8f7418b7c3b29d8 | misp_modules/modules/expansion/hashdd.py | misp_modules/modules/expansion/hashdd.py | import json
import requests
misperrors = {'error': 'Error'}
mispattributes = {'input': ['md5'], 'output': ['text']}
moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion module to check hashes against hashdd.com including NSLR dataset.', 'module-type': ['hover']}
moduleconfig = [... | import json
import requests
misperrors = {'error': 'Error'}
mispattributes = {'input': ['md5', 'sha1', 'sha256'], 'output': ['text']}
moduleinfo = {'version': '0.2', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion module to check hashes against hashdd.com including NSLR dataset.', 'module-type': ['hover']... | Update to support sha1 & sha256 attributes | add: Update to support sha1 & sha256 attributes
| Python | agpl-3.0 | VirusTotal/misp-modules,amuehlem/misp-modules,MISP/misp-modules,amuehlem/misp-modules,MISP/misp-modules,MISP/misp-modules,VirusTotal/misp-modules,VirusTotal/misp-modules,amuehlem/misp-modules | import json
import requests
misperrors = {'error': 'Error'}
mispattributes = {'input': ['md5'], 'output': ['text']}
moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion module to check hashes against hashdd.com including NSLR dataset.', 'module-type': ['hover']}
moduleconfig = [... | import json
import requests
misperrors = {'error': 'Error'}
mispattributes = {'input': ['md5', 'sha1', 'sha256'], 'output': ['text']}
moduleinfo = {'version': '0.2', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion module to check hashes against hashdd.com including NSLR dataset.', 'module-type': ['hover']... | <commit_before>import json
import requests
misperrors = {'error': 'Error'}
mispattributes = {'input': ['md5'], 'output': ['text']}
moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion module to check hashes against hashdd.com including NSLR dataset.', 'module-type': ['hover']}
m... | import json
import requests
misperrors = {'error': 'Error'}
mispattributes = {'input': ['md5', 'sha1', 'sha256'], 'output': ['text']}
moduleinfo = {'version': '0.2', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion module to check hashes against hashdd.com including NSLR dataset.', 'module-type': ['hover']... | import json
import requests
misperrors = {'error': 'Error'}
mispattributes = {'input': ['md5'], 'output': ['text']}
moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion module to check hashes against hashdd.com including NSLR dataset.', 'module-type': ['hover']}
moduleconfig = [... | <commit_before>import json
import requests
misperrors = {'error': 'Error'}
mispattributes = {'input': ['md5'], 'output': ['text']}
moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'An expansion module to check hashes against hashdd.com including NSLR dataset.', 'module-type': ['hover']}
m... |
abf48b4c3ab7c78e44bc2d28ef6f3271c00abc42 | ylio/__init__.py | ylio/__init__.py | from flask import Flask
from flask.ext.assets import Environment, Bundle
app = Flask(__name__, static_folder=None)
app.config.from_pyfile('config.py')
# Route static folder to /static in dev
# and a subdomain in production
app.static_folder = 'static'
static_path = '/<path:filename>'
static_subdomain = 'static'
if ap... | from flask import Flask
from flask.ext.assets import Environment, Bundle
app = Flask(__name__, static_folder=None)
app.config.from_pyfile('config.py')
# Route static folder to /static in dev
# and a subdomain in production
app.static_folder = 'static'
static_path = '/<path:filename>'
static_subdomain = 'static'
if ap... | Put static folder on a subdomain if SERVER_NAME isn't None, not if debug is False | Put static folder on a subdomain if SERVER_NAME isn't None, not if debug is False
| Python | mit | joealcorn/yl.io,joealcorn/yl.io | from flask import Flask
from flask.ext.assets import Environment, Bundle
app = Flask(__name__, static_folder=None)
app.config.from_pyfile('config.py')
# Route static folder to /static in dev
# and a subdomain in production
app.static_folder = 'static'
static_path = '/<path:filename>'
static_subdomain = 'static'
if ap... | from flask import Flask
from flask.ext.assets import Environment, Bundle
app = Flask(__name__, static_folder=None)
app.config.from_pyfile('config.py')
# Route static folder to /static in dev
# and a subdomain in production
app.static_folder = 'static'
static_path = '/<path:filename>'
static_subdomain = 'static'
if ap... | <commit_before>from flask import Flask
from flask.ext.assets import Environment, Bundle
app = Flask(__name__, static_folder=None)
app.config.from_pyfile('config.py')
# Route static folder to /static in dev
# and a subdomain in production
app.static_folder = 'static'
static_path = '/<path:filename>'
static_subdomain =... | from flask import Flask
from flask.ext.assets import Environment, Bundle
app = Flask(__name__, static_folder=None)
app.config.from_pyfile('config.py')
# Route static folder to /static in dev
# and a subdomain in production
app.static_folder = 'static'
static_path = '/<path:filename>'
static_subdomain = 'static'
if ap... | from flask import Flask
from flask.ext.assets import Environment, Bundle
app = Flask(__name__, static_folder=None)
app.config.from_pyfile('config.py')
# Route static folder to /static in dev
# and a subdomain in production
app.static_folder = 'static'
static_path = '/<path:filename>'
static_subdomain = 'static'
if ap... | <commit_before>from flask import Flask
from flask.ext.assets import Environment, Bundle
app = Flask(__name__, static_folder=None)
app.config.from_pyfile('config.py')
# Route static folder to /static in dev
# and a subdomain in production
app.static_folder = 'static'
static_path = '/<path:filename>'
static_subdomain =... |
d002011c68032dc2255f83f39c03da61c3f72525 | yolk/__init__.py | yolk/__init__.py | """yolk.
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.8.5'
| """yolk.
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.8.6'
| Increment patch version to 0.8.6 | Increment patch version to 0.8.6
| Python | bsd-3-clause | myint/yolk,myint/yolk | """yolk.
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.8.5'
Increment patch version to 0.8.6 | """yolk.
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.8.6'
| <commit_before>"""yolk.
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.8.5'
<commit_msg>Increment patch version to 0.8.6<commit_after> | """yolk.
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.8.6'
| """yolk.
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.8.5'
Increment patch version to 0.8.6"""yolk.
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.8.6'
| <commit_before>"""yolk.
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.8.5'
<commit_msg>Increment patch version to 0.8.6<commit_after>"""yolk.
Author: Rob Cakebread <cakebread at gmail>
License : BSD
"""
__version__ = '0.8.6'
|
c3c1234fb566ad20d7e67e55f8d8d908dbda55ad | post/urls.py | post/urls.py | from django.conf.urls import patterns, include, url
from jmbo.urls import v1_api
from jmbo.views import ObjectDetail
from post.api import PostResource
v1_api.register(PostResource())
# xxx: may need to include ckeditor urls here. check!
urlpatterns = patterns(
'',
url(
r'^(?P<slug>[\w-]+)/$',
... | from django.conf.urls import patterns, include, url
from jmbo.urls import v1_api
from jmbo.views import ObjectDetail
from post.api import PostResource
v1_api.register(PostResource())
# xxx: may need to include ckeditor urls here. check!
urlpatterns = patterns(
'',
url(
r'^(?P<category_slug>[\w-]+)... | Add post categorized view urlconf | Add post categorized view urlconf
| Python | bsd-3-clause | praekelt/jmbo-post,praekelt/jmbo-post | from django.conf.urls import patterns, include, url
from jmbo.urls import v1_api
from jmbo.views import ObjectDetail
from post.api import PostResource
v1_api.register(PostResource())
# xxx: may need to include ckeditor urls here. check!
urlpatterns = patterns(
'',
url(
r'^(?P<slug>[\w-]+)/$',
... | from django.conf.urls import patterns, include, url
from jmbo.urls import v1_api
from jmbo.views import ObjectDetail
from post.api import PostResource
v1_api.register(PostResource())
# xxx: may need to include ckeditor urls here. check!
urlpatterns = patterns(
'',
url(
r'^(?P<category_slug>[\w-]+)... | <commit_before>from django.conf.urls import patterns, include, url
from jmbo.urls import v1_api
from jmbo.views import ObjectDetail
from post.api import PostResource
v1_api.register(PostResource())
# xxx: may need to include ckeditor urls here. check!
urlpatterns = patterns(
'',
url(
r'^(?P<slug>[... | from django.conf.urls import patterns, include, url
from jmbo.urls import v1_api
from jmbo.views import ObjectDetail
from post.api import PostResource
v1_api.register(PostResource())
# xxx: may need to include ckeditor urls here. check!
urlpatterns = patterns(
'',
url(
r'^(?P<category_slug>[\w-]+)... | from django.conf.urls import patterns, include, url
from jmbo.urls import v1_api
from jmbo.views import ObjectDetail
from post.api import PostResource
v1_api.register(PostResource())
# xxx: may need to include ckeditor urls here. check!
urlpatterns = patterns(
'',
url(
r'^(?P<slug>[\w-]+)/$',
... | <commit_before>from django.conf.urls import patterns, include, url
from jmbo.urls import v1_api
from jmbo.views import ObjectDetail
from post.api import PostResource
v1_api.register(PostResource())
# xxx: may need to include ckeditor urls here. check!
urlpatterns = patterns(
'',
url(
r'^(?P<slug>[... |
63109e4d91f66c135c634752d3feb0e6dd4b9b97 | nn/models/char2doc.py | nn/models/char2doc.py | import tensorflow as tf
from ..embedding import embeddings_to_embedding, ids_to_embeddings, embeddings
from ..linear import linear
from ..dropout import dropout
def char2doc(forward_document,
backward_document,
*,
char_space_size,
char_embedding_size,
... | import tensorflow as tf
from ..embedding import id_sequence_to_embedding, embeddings
from ..linear import linear
from ..dropout import dropout
def char2doc(document,
*,
char_space_size,
char_embedding_size,
document_embedding_size,
dropout_prob,
... | Use id_sequence_to_embedding and only forward document | Use id_sequence_to_embedding and only forward document
| Python | unlicense | raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten | import tensorflow as tf
from ..embedding import embeddings_to_embedding, ids_to_embeddings, embeddings
from ..linear import linear
from ..dropout import dropout
def char2doc(forward_document,
backward_document,
*,
char_space_size,
char_embedding_size,
... | import tensorflow as tf
from ..embedding import id_sequence_to_embedding, embeddings
from ..linear import linear
from ..dropout import dropout
def char2doc(document,
*,
char_space_size,
char_embedding_size,
document_embedding_size,
dropout_prob,
... | <commit_before>import tensorflow as tf
from ..embedding import embeddings_to_embedding, ids_to_embeddings, embeddings
from ..linear import linear
from ..dropout import dropout
def char2doc(forward_document,
backward_document,
*,
char_space_size,
char_embedding_siz... | import tensorflow as tf
from ..embedding import id_sequence_to_embedding, embeddings
from ..linear import linear
from ..dropout import dropout
def char2doc(document,
*,
char_space_size,
char_embedding_size,
document_embedding_size,
dropout_prob,
... | import tensorflow as tf
from ..embedding import embeddings_to_embedding, ids_to_embeddings, embeddings
from ..linear import linear
from ..dropout import dropout
def char2doc(forward_document,
backward_document,
*,
char_space_size,
char_embedding_size,
... | <commit_before>import tensorflow as tf
from ..embedding import embeddings_to_embedding, ids_to_embeddings, embeddings
from ..linear import linear
from ..dropout import dropout
def char2doc(forward_document,
backward_document,
*,
char_space_size,
char_embedding_siz... |
76bc58d577e6d529dff3fc770667897bc48f6bfc | mainPage.py | mainPage.py | import sys
from Tkinter import *
mainWindow = Tk()
windowWidth = 700
windowHeight = 600
screenXpos = (mainWindow.winfo_screenwidth() / 2) - (windowWidth / 2)
screenYpos = (mainWindow.winfo_screenheight() / 2) - (windowHeight / 2)
mainWindow.geometry(str(windowWidth) + 'x' + str(windowHeight) +\
'... | import sys
from Tkinter import *
# Define click functions
def clickHome():
topLabelText.set("Home Screen")
return
def clickConstraint():
topLabelText.set("Constraint Screen")
return
def clickView():
topLabelText.set("View Screen")
return
def clickMisc():
topLabelText.set("Misc Screen")
... | Add side buttons, changing header label on click | Add side buttons, changing header label on click
| Python | mit | donnell74/CSC-450-Scheduler | import sys
from Tkinter import *
mainWindow = Tk()
windowWidth = 700
windowHeight = 600
screenXpos = (mainWindow.winfo_screenwidth() / 2) - (windowWidth / 2)
screenYpos = (mainWindow.winfo_screenheight() / 2) - (windowHeight / 2)
mainWindow.geometry(str(windowWidth) + 'x' + str(windowHeight) +\
'... | import sys
from Tkinter import *
# Define click functions
def clickHome():
topLabelText.set("Home Screen")
return
def clickConstraint():
topLabelText.set("Constraint Screen")
return
def clickView():
topLabelText.set("View Screen")
return
def clickMisc():
topLabelText.set("Misc Screen")
... | <commit_before>import sys
from Tkinter import *
mainWindow = Tk()
windowWidth = 700
windowHeight = 600
screenXpos = (mainWindow.winfo_screenwidth() / 2) - (windowWidth / 2)
screenYpos = (mainWindow.winfo_screenheight() / 2) - (windowHeight / 2)
mainWindow.geometry(str(windowWidth) + 'x' + str(windowHeight) +\
... | import sys
from Tkinter import *
# Define click functions
def clickHome():
topLabelText.set("Home Screen")
return
def clickConstraint():
topLabelText.set("Constraint Screen")
return
def clickView():
topLabelText.set("View Screen")
return
def clickMisc():
topLabelText.set("Misc Screen")
... | import sys
from Tkinter import *
mainWindow = Tk()
windowWidth = 700
windowHeight = 600
screenXpos = (mainWindow.winfo_screenwidth() / 2) - (windowWidth / 2)
screenYpos = (mainWindow.winfo_screenheight() / 2) - (windowHeight / 2)
mainWindow.geometry(str(windowWidth) + 'x' + str(windowHeight) +\
'... | <commit_before>import sys
from Tkinter import *
mainWindow = Tk()
windowWidth = 700
windowHeight = 600
screenXpos = (mainWindow.winfo_screenwidth() / 2) - (windowWidth / 2)
screenYpos = (mainWindow.winfo_screenheight() / 2) - (windowHeight / 2)
mainWindow.geometry(str(windowWidth) + 'x' + str(windowHeight) +\
... |
9bc3b7b24e185b1dd8bf8f979c8341fb332a401f | mm1_main.py | mm1_main.py | #!/usr/bin/env python
# encoding: utf-8
import argparse
import mm1
import sim
import time
### Parse command line arguments
parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Main script")
parser.add_argument('sim_duration', metavar='simulation_duration',
type=int, help='simul... | #!/usr/bin/env python
# encoding: utf-8
import argparse
import mm1
import sim
import time
### Parse command line arguments
parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Main script")
parser.add_argument('sim_duration', metavar='simulation_duration',
type=int, help='simul... | Add arguments for interarrival and service rates. | Add arguments for interarrival and service rates.
| Python | mit | kubkon/des-in-python | #!/usr/bin/env python
# encoding: utf-8
import argparse
import mm1
import sim
import time
### Parse command line arguments
parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Main script")
parser.add_argument('sim_duration', metavar='simulation_duration',
type=int, help='simul... | #!/usr/bin/env python
# encoding: utf-8
import argparse
import mm1
import sim
import time
### Parse command line arguments
parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Main script")
parser.add_argument('sim_duration', metavar='simulation_duration',
type=int, help='simul... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
import argparse
import mm1
import sim
import time
### Parse command line arguments
parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Main script")
parser.add_argument('sim_duration', metavar='simulation_duration',
type=i... | #!/usr/bin/env python
# encoding: utf-8
import argparse
import mm1
import sim
import time
### Parse command line arguments
parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Main script")
parser.add_argument('sim_duration', metavar='simulation_duration',
type=int, help='simul... | #!/usr/bin/env python
# encoding: utf-8
import argparse
import mm1
import sim
import time
### Parse command line arguments
parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Main script")
parser.add_argument('sim_duration', metavar='simulation_duration',
type=int, help='simul... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
import argparse
import mm1
import sim
import time
### Parse command line arguments
parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Main script")
parser.add_argument('sim_duration', metavar='simulation_duration',
type=i... |
1eb20f6d1a946acbf05be003c597e40aa1782b4d | engine/plugins/https.py | engine/plugins/https.py | from .. import config
import requests
from requests.exceptions import *
import hashlib, random
def run(options):
ip = options['ip']
port = options['port']
test = random.choice(config.HTTPS_PAGES)
try:
r = requests.get('https://{}:{}/{}'.format(ip, port, test['url']), verify=False, timeout=2)... | from .. import config
import logging
logger=logging.getLogger(__name__)
import requests
from requests.exceptions import *
import hashlib, random
def run(options):
ip = options['ip']
port = options['port']
test = random.choice(config.HTTPS_PAGES)
try:
r = requests.get('https://{}:{}/{}'.forma... | Use logger rather than raw print | Use logger rather than raw print | Python | mit | ainterr/scoring_engine,ainterr/scoring_engine,ainterr/scoring_engine,ainterr/scoring_engine | from .. import config
import requests
from requests.exceptions import *
import hashlib, random
def run(options):
ip = options['ip']
port = options['port']
test = random.choice(config.HTTPS_PAGES)
try:
r = requests.get('https://{}:{}/{}'.format(ip, port, test['url']), verify=False, timeout=2)... | from .. import config
import logging
logger=logging.getLogger(__name__)
import requests
from requests.exceptions import *
import hashlib, random
def run(options):
ip = options['ip']
port = options['port']
test = random.choice(config.HTTPS_PAGES)
try:
r = requests.get('https://{}:{}/{}'.forma... | <commit_before>from .. import config
import requests
from requests.exceptions import *
import hashlib, random
def run(options):
ip = options['ip']
port = options['port']
test = random.choice(config.HTTPS_PAGES)
try:
r = requests.get('https://{}:{}/{}'.format(ip, port, test['url']), verify=Fa... | from .. import config
import logging
logger=logging.getLogger(__name__)
import requests
from requests.exceptions import *
import hashlib, random
def run(options):
ip = options['ip']
port = options['port']
test = random.choice(config.HTTPS_PAGES)
try:
r = requests.get('https://{}:{}/{}'.forma... | from .. import config
import requests
from requests.exceptions import *
import hashlib, random
def run(options):
ip = options['ip']
port = options['port']
test = random.choice(config.HTTPS_PAGES)
try:
r = requests.get('https://{}:{}/{}'.format(ip, port, test['url']), verify=False, timeout=2)... | <commit_before>from .. import config
import requests
from requests.exceptions import *
import hashlib, random
def run(options):
ip = options['ip']
port = options['port']
test = random.choice(config.HTTPS_PAGES)
try:
r = requests.get('https://{}:{}/{}'.format(ip, port, test['url']), verify=Fa... |
051695d90b241323e650cd4931187de1750d924b | dataportal/tests/test_broker.py | dataportal/tests/test_broker.py | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
from ..broker.simple_broker import POPULAR_CHANNELS
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=False, metadatasto... | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=False, metadatastore=False, filestore=False)
start, end = '201... | Update tests after major broker refactor. | FIX: Update tests after major broker refactor.
| Python | bsd-3-clause | NSLS-II/dataportal,ericdill/datamuxer,ericdill/datamuxer,danielballan/datamuxer,danielballan/datamuxer,NSLS-II/datamuxer,danielballan/dataportal,tacaswell/dataportal,tacaswell/dataportal,ericdill/databroker,ericdill/databroker,danielballan/dataportal,NSLS-II/dataportal | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
from ..broker.simple_broker import POPULAR_CHANNELS
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=False, metadatasto... | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=False, metadatastore=False, filestore=False)
start, end = '201... | <commit_before>import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
from ..broker.simple_broker import POPULAR_CHANNELS
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=Fal... | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=False, metadatastore=False, filestore=False)
start, end = '201... | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
from ..broker.simple_broker import POPULAR_CHANNELS
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=False, metadatasto... | <commit_before>import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
from ..broker.simple_broker import POPULAR_CHANNELS
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=Fal... |
eed413229978523b41a637c68c34100a31270643 | scripts/TestHarness/testers/RavenUtils.py | scripts/TestHarness/testers/RavenUtils.py | import os
import subprocess
def inPython3():
return os.environ.get("CHECK_PYTHON3","0") == "1"
def checkForMissingModules():
missing = []
too_old = []
to_try = [("numpy",'numpy.version.version',"1.7"),
("h5py",'',''),
("scipy",'scipy.__version__',"0.12"),
("sklearn",'sklear... | import os
import subprocess
def inPython3():
return os.environ.get("CHECK_PYTHON3","0") == "1"
def checkForMissingModules():
missing = []
too_old = []
to_try = [("numpy",'numpy.version.version',"1.7"),
("h5py",'',''),
("scipy",'scipy.__version__',"0.12"),
("sklearn",'sklear... | Decrease the needed matplotlib to 1.3, to make it easier to get installed. | Decrease the needed matplotlib to 1.3, to make it easier to get installed.
| Python | apache-2.0 | joshua-cogliati-inl/raven,idaholab/raven,idaholab/raven,joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,idaholab/raven,idaholab/raven,idaholab/raven,idaholab/raven,joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,joshua-cogliati-inl/raven,idaholab/raven | import os
import subprocess
def inPython3():
return os.environ.get("CHECK_PYTHON3","0") == "1"
def checkForMissingModules():
missing = []
too_old = []
to_try = [("numpy",'numpy.version.version',"1.7"),
("h5py",'',''),
("scipy",'scipy.__version__',"0.12"),
("sklearn",'sklear... | import os
import subprocess
def inPython3():
return os.environ.get("CHECK_PYTHON3","0") == "1"
def checkForMissingModules():
missing = []
too_old = []
to_try = [("numpy",'numpy.version.version',"1.7"),
("h5py",'',''),
("scipy",'scipy.__version__',"0.12"),
("sklearn",'sklear... | <commit_before>import os
import subprocess
def inPython3():
return os.environ.get("CHECK_PYTHON3","0") == "1"
def checkForMissingModules():
missing = []
too_old = []
to_try = [("numpy",'numpy.version.version',"1.7"),
("h5py",'',''),
("scipy",'scipy.__version__',"0.12"),
("s... | import os
import subprocess
def inPython3():
return os.environ.get("CHECK_PYTHON3","0") == "1"
def checkForMissingModules():
missing = []
too_old = []
to_try = [("numpy",'numpy.version.version',"1.7"),
("h5py",'',''),
("scipy",'scipy.__version__',"0.12"),
("sklearn",'sklear... | import os
import subprocess
def inPython3():
return os.environ.get("CHECK_PYTHON3","0") == "1"
def checkForMissingModules():
missing = []
too_old = []
to_try = [("numpy",'numpy.version.version',"1.7"),
("h5py",'',''),
("scipy",'scipy.__version__',"0.12"),
("sklearn",'sklear... | <commit_before>import os
import subprocess
def inPython3():
return os.environ.get("CHECK_PYTHON3","0") == "1"
def checkForMissingModules():
missing = []
too_old = []
to_try = [("numpy",'numpy.version.version',"1.7"),
("h5py",'',''),
("scipy",'scipy.__version__',"0.12"),
("s... |
453abc420db1a9daf3b8d92d7f8ee8a8ace5bf9f | 07/test_address.py | 07/test_address.py | import unittest
from address import has_reflection, is_compatible
class TestAddress(unittest.TestCase):
def test_has_reflection(self):
assert has_reflection(['mnop']) == False
assert has_reflection(['abba', 'qrst']) == True
def test_is_compatible(self):
assert is_compatible('abba[mno... | import unittest
from address import has_reflection, is_compatible, load_addresses
class TestAddress(unittest.TestCase):
def test_has_reflection(self):
assert has_reflection(['mnop']) == False
assert has_reflection(['abba', 'qrst']) == True
def test_is_compatible(self):
assert is_comp... | Add tests for second protocol. | Add tests for second protocol.
| Python | mit | machinelearningdeveloper/aoc_2016 | import unittest
from address import has_reflection, is_compatible
class TestAddress(unittest.TestCase):
def test_has_reflection(self):
assert has_reflection(['mnop']) == False
assert has_reflection(['abba', 'qrst']) == True
def test_is_compatible(self):
assert is_compatible('abba[mno... | import unittest
from address import has_reflection, is_compatible, load_addresses
class TestAddress(unittest.TestCase):
def test_has_reflection(self):
assert has_reflection(['mnop']) == False
assert has_reflection(['abba', 'qrst']) == True
def test_is_compatible(self):
assert is_comp... | <commit_before>import unittest
from address import has_reflection, is_compatible
class TestAddress(unittest.TestCase):
def test_has_reflection(self):
assert has_reflection(['mnop']) == False
assert has_reflection(['abba', 'qrst']) == True
def test_is_compatible(self):
assert is_compa... | import unittest
from address import has_reflection, is_compatible, load_addresses
class TestAddress(unittest.TestCase):
def test_has_reflection(self):
assert has_reflection(['mnop']) == False
assert has_reflection(['abba', 'qrst']) == True
def test_is_compatible(self):
assert is_comp... | import unittest
from address import has_reflection, is_compatible
class TestAddress(unittest.TestCase):
def test_has_reflection(self):
assert has_reflection(['mnop']) == False
assert has_reflection(['abba', 'qrst']) == True
def test_is_compatible(self):
assert is_compatible('abba[mno... | <commit_before>import unittest
from address import has_reflection, is_compatible
class TestAddress(unittest.TestCase):
def test_has_reflection(self):
assert has_reflection(['mnop']) == False
assert has_reflection(['abba', 'qrst']) == True
def test_is_compatible(self):
assert is_compa... |
e152213012c95dd820b341d11d940a172ca467d0 | ethereum/tests/test_tester.py | ethereum/tests/test_tester.py | # -*- coding: utf8 -*-
import json
from os import path
import pytest
from ethereum.tester import state, ABIContract
from ethereum._solidity import get_solidity, compile_file
SOLIDITY_AVAILABLE = get_solidity() is not None
CONTRACTS_DIR = path.join(path.dirname(__file__), 'contracts')
@pytest.mark.skipif(not SOLIDI... | # -*- coding: utf8 -*-
import json
from os import path
import pytest
from ethereum.tester import state, ABIContract
from ethereum._solidity import (
get_solidity,
compile_file,
solidity_get_contract_data,
)
SOLIDITY_AVAILABLE = get_solidity() is not None
CONTRACTS_DIR = path.join(path... | Adjust test to new compiler versions | Adjust test to new compiler versions
| Python | mit | ethereum/pyethereum,ethereum/pyethereum,karlfloersch/pyethereum,karlfloersch/pyethereum | # -*- coding: utf8 -*-
import json
from os import path
import pytest
from ethereum.tester import state, ABIContract
from ethereum._solidity import get_solidity, compile_file
SOLIDITY_AVAILABLE = get_solidity() is not None
CONTRACTS_DIR = path.join(path.dirname(__file__), 'contracts')
@pytest.mark.skipif(not SOLIDI... | # -*- coding: utf8 -*-
import json
from os import path
import pytest
from ethereum.tester import state, ABIContract
from ethereum._solidity import (
get_solidity,
compile_file,
solidity_get_contract_data,
)
SOLIDITY_AVAILABLE = get_solidity() is not None
CONTRACTS_DIR = path.join(path... | <commit_before># -*- coding: utf8 -*-
import json
from os import path
import pytest
from ethereum.tester import state, ABIContract
from ethereum._solidity import get_solidity, compile_file
SOLIDITY_AVAILABLE = get_solidity() is not None
CONTRACTS_DIR = path.join(path.dirname(__file__), 'contracts')
@pytest.mark.sk... | # -*- coding: utf8 -*-
import json
from os import path
import pytest
from ethereum.tester import state, ABIContract
from ethereum._solidity import (
get_solidity,
compile_file,
solidity_get_contract_data,
)
SOLIDITY_AVAILABLE = get_solidity() is not None
CONTRACTS_DIR = path.join(path... | # -*- coding: utf8 -*-
import json
from os import path
import pytest
from ethereum.tester import state, ABIContract
from ethereum._solidity import get_solidity, compile_file
SOLIDITY_AVAILABLE = get_solidity() is not None
CONTRACTS_DIR = path.join(path.dirname(__file__), 'contracts')
@pytest.mark.skipif(not SOLIDI... | <commit_before># -*- coding: utf8 -*-
import json
from os import path
import pytest
from ethereum.tester import state, ABIContract
from ethereum._solidity import get_solidity, compile_file
SOLIDITY_AVAILABLE = get_solidity() is not None
CONTRACTS_DIR = path.join(path.dirname(__file__), 'contracts')
@pytest.mark.sk... |
c297b219c7ae4f3e6ad3428425950c66f2832ff7 | xgds_video/tests.py | xgds_video/tests.py | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
from django.test import TestCase
class xgds_videoTest(TestCase):
"""
Tests for xgds_video
"""
def... | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
from django.test import TestCase
class xgds_videoTest(TestCase):
"""
Tests for xgds_video
"""
def... | Change assert(False) to assert(True) to avoid having test fail no matter what | Change assert(False) to assert(True) to avoid having test fail no matter what
| Python | apache-2.0 | xgds/xgds_video,xgds/xgds_video,xgds/xgds_video | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
from django.test import TestCase
class xgds_videoTest(TestCase):
"""
Tests for xgds_video
"""
def... | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
from django.test import TestCase
class xgds_videoTest(TestCase):
"""
Tests for xgds_video
"""
def... | <commit_before># __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
from django.test import TestCase
class xgds_videoTest(TestCase):
"""
Tests for xgds_video
... | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
from django.test import TestCase
class xgds_videoTest(TestCase):
"""
Tests for xgds_video
"""
def... | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
from django.test import TestCase
class xgds_videoTest(TestCase):
"""
Tests for xgds_video
"""
def... | <commit_before># __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
from django.test import TestCase
class xgds_videoTest(TestCase):
"""
Tests for xgds_video
... |
11d25c3f4391d3e9eb95c5b8fb1a2b73cbf123a0 | cli/commands/cmd_stripe.py | cli/commands/cmd_stripe.py | import logging
import click
import stripe
from config import settings
from catwatch.blueprints.billing.services import StripePlan
from catwatch.app import create_app
app = create_app()
@click.group()
def cli():
""" Perform various tasks with Stripe's API. """
stripe.api_key = app.config.get('STRIPE_SECRET... | import logging
import click
import stripe
from config import settings as settings_
from catwatch.blueprints.billing.services import StripePlan
try:
from instance import settings
except ImportError:
logging.error('Your instance/ folder must contain an __init__.py file')
exit(1)
@click.group()
def cli():... | Remove the need to create an app in the stripe CLI | Remove the need to create an app in the stripe CLI
| Python | mit | nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask | import logging
import click
import stripe
from config import settings
from catwatch.blueprints.billing.services import StripePlan
from catwatch.app import create_app
app = create_app()
@click.group()
def cli():
""" Perform various tasks with Stripe's API. """
stripe.api_key = app.config.get('STRIPE_SECRET... | import logging
import click
import stripe
from config import settings as settings_
from catwatch.blueprints.billing.services import StripePlan
try:
from instance import settings
except ImportError:
logging.error('Your instance/ folder must contain an __init__.py file')
exit(1)
@click.group()
def cli():... | <commit_before>import logging
import click
import stripe
from config import settings
from catwatch.blueprints.billing.services import StripePlan
from catwatch.app import create_app
app = create_app()
@click.group()
def cli():
""" Perform various tasks with Stripe's API. """
stripe.api_key = app.config.get... | import logging
import click
import stripe
from config import settings as settings_
from catwatch.blueprints.billing.services import StripePlan
try:
from instance import settings
except ImportError:
logging.error('Your instance/ folder must contain an __init__.py file')
exit(1)
@click.group()
def cli():... | import logging
import click
import stripe
from config import settings
from catwatch.blueprints.billing.services import StripePlan
from catwatch.app import create_app
app = create_app()
@click.group()
def cli():
""" Perform various tasks with Stripe's API. """
stripe.api_key = app.config.get('STRIPE_SECRET... | <commit_before>import logging
import click
import stripe
from config import settings
from catwatch.blueprints.billing.services import StripePlan
from catwatch.app import create_app
app = create_app()
@click.group()
def cli():
""" Perform various tasks with Stripe's API. """
stripe.api_key = app.config.get... |
bb23c2bfa31913658b526b9dbaf812c749e9523c | pentai/gui/goodbye_screen.py | pentai/gui/goodbye_screen.py | import kivy.core.window
import pentai.db.zodb_dict as z_m
from pentai.gui.screen import Screen
class GoodByeScreen(Screen):
def __init__(self, *args, **kwargs):
super(GoodByeScreen, self).__init__(*args, **kwargs)
print "init goodbye screen"
def on_enter(self, *args, **kwargs):
app = ... | import kivy.core.window
from kivy.clock import Clock
import pentai.db.zodb_dict as z_m
from pentai.gui.screen import Screen
class GoodByeScreen(Screen):
def __init__(self, *args, **kwargs):
super(GoodByeScreen, self).__init__(*args, **kwargs)
print "init goodbye screen"
def on_enter(self, *ar... | Fix prob with wooden board leftover. | Fix prob with wooden board leftover.
| Python | mit | cropleyb/pentai,cropleyb/pentai,cropleyb/pentai | import kivy.core.window
import pentai.db.zodb_dict as z_m
from pentai.gui.screen import Screen
class GoodByeScreen(Screen):
def __init__(self, *args, **kwargs):
super(GoodByeScreen, self).__init__(*args, **kwargs)
print "init goodbye screen"
def on_enter(self, *args, **kwargs):
app = ... | import kivy.core.window
from kivy.clock import Clock
import pentai.db.zodb_dict as z_m
from pentai.gui.screen import Screen
class GoodByeScreen(Screen):
def __init__(self, *args, **kwargs):
super(GoodByeScreen, self).__init__(*args, **kwargs)
print "init goodbye screen"
def on_enter(self, *ar... | <commit_before>import kivy.core.window
import pentai.db.zodb_dict as z_m
from pentai.gui.screen import Screen
class GoodByeScreen(Screen):
def __init__(self, *args, **kwargs):
super(GoodByeScreen, self).__init__(*args, **kwargs)
print "init goodbye screen"
def on_enter(self, *args, **kwargs):... | import kivy.core.window
from kivy.clock import Clock
import pentai.db.zodb_dict as z_m
from pentai.gui.screen import Screen
class GoodByeScreen(Screen):
def __init__(self, *args, **kwargs):
super(GoodByeScreen, self).__init__(*args, **kwargs)
print "init goodbye screen"
def on_enter(self, *ar... | import kivy.core.window
import pentai.db.zodb_dict as z_m
from pentai.gui.screen import Screen
class GoodByeScreen(Screen):
def __init__(self, *args, **kwargs):
super(GoodByeScreen, self).__init__(*args, **kwargs)
print "init goodbye screen"
def on_enter(self, *args, **kwargs):
app = ... | <commit_before>import kivy.core.window
import pentai.db.zodb_dict as z_m
from pentai.gui.screen import Screen
class GoodByeScreen(Screen):
def __init__(self, *args, **kwargs):
super(GoodByeScreen, self).__init__(*args, **kwargs)
print "init goodbye screen"
def on_enter(self, *args, **kwargs):... |
6203b25a2d8d742f066917dd7e5f2c8dc0ee9e7c | pavement.py | pavement.py | import subprocess
from paver.easy import *
def call(*args, **kwargs):
return subprocess.call(args, **kwargs)
@task
def push():
"""Install the app and start it."""
call('palm-package', '.')
call('palm-install', '--device=emulator', '-r', 'org.markpasc.paperplain')
call('palm-install', '--device=... | import subprocess
from paver.easy import *
def call(*args, **kwargs):
return subprocess.call(args, **kwargs)
@task
def push():
"""Install the app and start it."""
call('palm-package', '.')
call('palm-install', '--device=emulator', '-r', 'org.markpasc.paperplain')
call('palm-install', '--device=... | Add a task for tailing the app's log on the emulator | Add a task for tailing the app's log on the emulator
| Python | mit | markpasc/paperplain,markpasc/paperplain | import subprocess
from paver.easy import *
def call(*args, **kwargs):
return subprocess.call(args, **kwargs)
@task
def push():
"""Install the app and start it."""
call('palm-package', '.')
call('palm-install', '--device=emulator', '-r', 'org.markpasc.paperplain')
call('palm-install', '--device=... | import subprocess
from paver.easy import *
def call(*args, **kwargs):
return subprocess.call(args, **kwargs)
@task
def push():
"""Install the app and start it."""
call('palm-package', '.')
call('palm-install', '--device=emulator', '-r', 'org.markpasc.paperplain')
call('palm-install', '--device=... | <commit_before>import subprocess
from paver.easy import *
def call(*args, **kwargs):
return subprocess.call(args, **kwargs)
@task
def push():
"""Install the app and start it."""
call('palm-package', '.')
call('palm-install', '--device=emulator', '-r', 'org.markpasc.paperplain')
call('palm-insta... | import subprocess
from paver.easy import *
def call(*args, **kwargs):
return subprocess.call(args, **kwargs)
@task
def push():
"""Install the app and start it."""
call('palm-package', '.')
call('palm-install', '--device=emulator', '-r', 'org.markpasc.paperplain')
call('palm-install', '--device=... | import subprocess
from paver.easy import *
def call(*args, **kwargs):
return subprocess.call(args, **kwargs)
@task
def push():
"""Install the app and start it."""
call('palm-package', '.')
call('palm-install', '--device=emulator', '-r', 'org.markpasc.paperplain')
call('palm-install', '--device=... | <commit_before>import subprocess
from paver.easy import *
def call(*args, **kwargs):
return subprocess.call(args, **kwargs)
@task
def push():
"""Install the app and start it."""
call('palm-package', '.')
call('palm-install', '--device=emulator', '-r', 'org.markpasc.paperplain')
call('palm-insta... |
0925c1f2ab3332ddfaeefed81f379dc72dd41644 | openid/test/test_urinorm.py | openid/test/test_urinorm.py | import os
import unittest
import openid.urinorm
class UrinormTest(unittest.TestCase):
def __init__(self, desc, case, expected):
unittest.TestCase.__init__(self)
self.desc = desc
self.case = case
self.expected = expected
def shortDescription(self):
return self.desc
... | import os
import unittest
import openid.urinorm
class UrinormTest(unittest.TestCase):
def __init__(self, desc, case, expected):
unittest.TestCase.__init__(self)
self.desc = desc
self.case = case
self.expected = expected
def shortDescription(self):
return self.desc
... | Make urinorm tests runnable on their own | Make urinorm tests runnable on their own
| Python | apache-2.0 | misli/python3-openid,misli/python3-openid,moreati/python3-openid,misli/python3-openid,necaris/python3-openid,isagalaev/sm-openid,moreati/python3-openid,moreati/python3-openid,necaris/python3-openid | import os
import unittest
import openid.urinorm
class UrinormTest(unittest.TestCase):
def __init__(self, desc, case, expected):
unittest.TestCase.__init__(self)
self.desc = desc
self.case = case
self.expected = expected
def shortDescription(self):
return self.desc
... | import os
import unittest
import openid.urinorm
class UrinormTest(unittest.TestCase):
def __init__(self, desc, case, expected):
unittest.TestCase.__init__(self)
self.desc = desc
self.case = case
self.expected = expected
def shortDescription(self):
return self.desc
... | <commit_before>import os
import unittest
import openid.urinorm
class UrinormTest(unittest.TestCase):
def __init__(self, desc, case, expected):
unittest.TestCase.__init__(self)
self.desc = desc
self.case = case
self.expected = expected
def shortDescription(self):
return ... | import os
import unittest
import openid.urinorm
class UrinormTest(unittest.TestCase):
def __init__(self, desc, case, expected):
unittest.TestCase.__init__(self)
self.desc = desc
self.case = case
self.expected = expected
def shortDescription(self):
return self.desc
... | import os
import unittest
import openid.urinorm
class UrinormTest(unittest.TestCase):
def __init__(self, desc, case, expected):
unittest.TestCase.__init__(self)
self.desc = desc
self.case = case
self.expected = expected
def shortDescription(self):
return self.desc
... | <commit_before>import os
import unittest
import openid.urinorm
class UrinormTest(unittest.TestCase):
def __init__(self, desc, case, expected):
unittest.TestCase.__init__(self)
self.desc = desc
self.case = case
self.expected = expected
def shortDescription(self):
return ... |
bb602407a176813cc1727423e1b344f0a1b0bea7 | tests/test_Science.py | tests/test_Science.py | """
Scientific tests for SLCosmo package
"""
import matplotlib
matplotlib.use('Agg')
import unittest
import desc.slcosmo
class SLCosmoScienceTestCase(unittest.TestCase):
def setUp(self):
self.message = 'Testing SLCosmo - For Science!'
def tearDown(self):
pass
def test_round_trip(self):
... | """
Scientific tests for SLCosmo package
"""
import matplotlib
matplotlib.use('Agg')
import os
import unittest
import desc.slcosmo
class SLCosmoScienceTestCase(unittest.TestCase):
def setUp(self):
self.message = 'Testing SLCosmo - For Science!'
self.Lets = desc.slcosmo.SLCosmo()
def tearDown(... | Clean up after science test | Clean up after science test
| Python | bsd-3-clause | DarkEnergyScienceCollaboration/SLCosmo,DarkEnergyScienceCollaboration/SLCosmo | """
Scientific tests for SLCosmo package
"""
import matplotlib
matplotlib.use('Agg')
import unittest
import desc.slcosmo
class SLCosmoScienceTestCase(unittest.TestCase):
def setUp(self):
self.message = 'Testing SLCosmo - For Science!'
def tearDown(self):
pass
def test_round_trip(self):
... | """
Scientific tests for SLCosmo package
"""
import matplotlib
matplotlib.use('Agg')
import os
import unittest
import desc.slcosmo
class SLCosmoScienceTestCase(unittest.TestCase):
def setUp(self):
self.message = 'Testing SLCosmo - For Science!'
self.Lets = desc.slcosmo.SLCosmo()
def tearDown(... | <commit_before>"""
Scientific tests for SLCosmo package
"""
import matplotlib
matplotlib.use('Agg')
import unittest
import desc.slcosmo
class SLCosmoScienceTestCase(unittest.TestCase):
def setUp(self):
self.message = 'Testing SLCosmo - For Science!'
def tearDown(self):
pass
def test_roun... | """
Scientific tests for SLCosmo package
"""
import matplotlib
matplotlib.use('Agg')
import os
import unittest
import desc.slcosmo
class SLCosmoScienceTestCase(unittest.TestCase):
def setUp(self):
self.message = 'Testing SLCosmo - For Science!'
self.Lets = desc.slcosmo.SLCosmo()
def tearDown(... | """
Scientific tests for SLCosmo package
"""
import matplotlib
matplotlib.use('Agg')
import unittest
import desc.slcosmo
class SLCosmoScienceTestCase(unittest.TestCase):
def setUp(self):
self.message = 'Testing SLCosmo - For Science!'
def tearDown(self):
pass
def test_round_trip(self):
... | <commit_before>"""
Scientific tests for SLCosmo package
"""
import matplotlib
matplotlib.use('Agg')
import unittest
import desc.slcosmo
class SLCosmoScienceTestCase(unittest.TestCase):
def setUp(self):
self.message = 'Testing SLCosmo - For Science!'
def tearDown(self):
pass
def test_roun... |
ade960c76de6773a176d2cd982ac9a26a2d072ae | tests/unit/network/CubicTemplateTest.py | tests/unit/network/CubicTemplateTest.py | import openpnm as op
from skimage.morphology import ball, disk
class CubicTemplateTest:
def setup_class(self):
pass
def teardown_class(self):
pass
def test_2D_template(self):
net = op.network.CubicTemplate(template=disk(10), spacing=1)
assert net.Np == 317
assert ... | import numpy as np
import openpnm as op
from skimage.morphology import ball, disk
class CubicTemplateTest:
def setup_class(self):
pass
def teardown_class(self):
pass
def test_2D_template(self):
net = op.network.CubicTemplate(template=disk(10), spacing=1)
assert net.Np == ... | Add test for CubicTemplate to ensure proper labeling | Add test for CubicTemplate to ensure proper labeling
| Python | mit | TomTranter/OpenPNM,PMEAL/OpenPNM | import openpnm as op
from skimage.morphology import ball, disk
class CubicTemplateTest:
def setup_class(self):
pass
def teardown_class(self):
pass
def test_2D_template(self):
net = op.network.CubicTemplate(template=disk(10), spacing=1)
assert net.Np == 317
assert ... | import numpy as np
import openpnm as op
from skimage.morphology import ball, disk
class CubicTemplateTest:
def setup_class(self):
pass
def teardown_class(self):
pass
def test_2D_template(self):
net = op.network.CubicTemplate(template=disk(10), spacing=1)
assert net.Np == ... | <commit_before>import openpnm as op
from skimage.morphology import ball, disk
class CubicTemplateTest:
def setup_class(self):
pass
def teardown_class(self):
pass
def test_2D_template(self):
net = op.network.CubicTemplate(template=disk(10), spacing=1)
assert net.Np == 317
... | import numpy as np
import openpnm as op
from skimage.morphology import ball, disk
class CubicTemplateTest:
def setup_class(self):
pass
def teardown_class(self):
pass
def test_2D_template(self):
net = op.network.CubicTemplate(template=disk(10), spacing=1)
assert net.Np == ... | import openpnm as op
from skimage.morphology import ball, disk
class CubicTemplateTest:
def setup_class(self):
pass
def teardown_class(self):
pass
def test_2D_template(self):
net = op.network.CubicTemplate(template=disk(10), spacing=1)
assert net.Np == 317
assert ... | <commit_before>import openpnm as op
from skimage.morphology import ball, disk
class CubicTemplateTest:
def setup_class(self):
pass
def teardown_class(self):
pass
def test_2D_template(self):
net = op.network.CubicTemplate(template=disk(10), spacing=1)
assert net.Np == 317
... |
a4d0bc42cf28351e24d6239f42b51c4cc77961ff | tests/test_helpers.py | tests/test_helpers.py | import os
from frigg_settings.helpers import FileSystemWrapper
def path(*args):
return os.path.join(os.path.dirname(os.path.dirname(__file__)), *args)
def test_filesystemwrapper_list_files():
wrapper = FileSystemWrapper()
files = wrapper.list_files(path())
# This check cannot check the exact files... | import os
from frigg_settings.helpers import FileSystemWrapper
def path(*args):
return os.path.join(os.path.dirname(os.path.dirname(__file__)), *args)
def test_filesystemwrapper_list_files():
wrapper = FileSystemWrapper()
files = wrapper.list_files(path())
# This check cannot check the exact files... | Fix an old flake8 error | style: Fix an old flake8 error
| Python | mit | frigg/frigg-settings | import os
from frigg_settings.helpers import FileSystemWrapper
def path(*args):
return os.path.join(os.path.dirname(os.path.dirname(__file__)), *args)
def test_filesystemwrapper_list_files():
wrapper = FileSystemWrapper()
files = wrapper.list_files(path())
# This check cannot check the exact files... | import os
from frigg_settings.helpers import FileSystemWrapper
def path(*args):
return os.path.join(os.path.dirname(os.path.dirname(__file__)), *args)
def test_filesystemwrapper_list_files():
wrapper = FileSystemWrapper()
files = wrapper.list_files(path())
# This check cannot check the exact files... | <commit_before>import os
from frigg_settings.helpers import FileSystemWrapper
def path(*args):
return os.path.join(os.path.dirname(os.path.dirname(__file__)), *args)
def test_filesystemwrapper_list_files():
wrapper = FileSystemWrapper()
files = wrapper.list_files(path())
# This check cannot check ... | import os
from frigg_settings.helpers import FileSystemWrapper
def path(*args):
return os.path.join(os.path.dirname(os.path.dirname(__file__)), *args)
def test_filesystemwrapper_list_files():
wrapper = FileSystemWrapper()
files = wrapper.list_files(path())
# This check cannot check the exact files... | import os
from frigg_settings.helpers import FileSystemWrapper
def path(*args):
return os.path.join(os.path.dirname(os.path.dirname(__file__)), *args)
def test_filesystemwrapper_list_files():
wrapper = FileSystemWrapper()
files = wrapper.list_files(path())
# This check cannot check the exact files... | <commit_before>import os
from frigg_settings.helpers import FileSystemWrapper
def path(*args):
return os.path.join(os.path.dirname(os.path.dirname(__file__)), *args)
def test_filesystemwrapper_list_files():
wrapper = FileSystemWrapper()
files = wrapper.list_files(path())
# This check cannot check ... |
44f232e179a2fe152ef6a7aa9e6e5cd52a4f201e | plasmapy/physics/__init__.py | plasmapy/physics/__init__.py | from .parameters import (Alfven_speed,
ion_sound_speed,
electron_thermal_speed,
ion_thermal_speed,
electron_gyrofrequency,
ion_gyrofrequency,
electron_gyroradius,
... | # 'physics' is a tentative name for this subpackage. Another
# possibility is 'plasma'. The organization is to be decided by v0.1.
from .parameters import (Alfven_speed,
ion_sound_speed,
electron_thermal_speed,
ion_thermal_speed,
... | Comment that physics is a tentative subpackage name | Comment that physics is a tentative subpackage name
| Python | bsd-3-clause | StanczakDominik/PlasmaPy | from .parameters import (Alfven_speed,
ion_sound_speed,
electron_thermal_speed,
ion_thermal_speed,
electron_gyrofrequency,
ion_gyrofrequency,
electron_gyroradius,
... | # 'physics' is a tentative name for this subpackage. Another
# possibility is 'plasma'. The organization is to be decided by v0.1.
from .parameters import (Alfven_speed,
ion_sound_speed,
electron_thermal_speed,
ion_thermal_speed,
... | <commit_before>from .parameters import (Alfven_speed,
ion_sound_speed,
electron_thermal_speed,
ion_thermal_speed,
electron_gyrofrequency,
ion_gyrofrequency,
electron_gyro... | # 'physics' is a tentative name for this subpackage. Another
# possibility is 'plasma'. The organization is to be decided by v0.1.
from .parameters import (Alfven_speed,
ion_sound_speed,
electron_thermal_speed,
ion_thermal_speed,
... | from .parameters import (Alfven_speed,
ion_sound_speed,
electron_thermal_speed,
ion_thermal_speed,
electron_gyrofrequency,
ion_gyrofrequency,
electron_gyroradius,
... | <commit_before>from .parameters import (Alfven_speed,
ion_sound_speed,
electron_thermal_speed,
ion_thermal_speed,
electron_gyrofrequency,
ion_gyrofrequency,
electron_gyro... |
10ae930f6f14c2840d0b87cbec17054b4cc318d2 | facebook_auth/models.py | facebook_auth/models.py | from django.contrib.auth import models as auth_models
from django.db import models
import facepy
import simplejson
from facebook_auth import utils
class FacebookUser(auth_models.User):
user_id = models.BigIntegerField(unique=True)
access_token = models.TextField(blank=True, null=True)
app_friends = models... | from uuid import uuid1
from django.conf import settings
from django.contrib.auth import models as auth_models
from django.db import models
import facepy
import simplejson
from facebook_auth import utils
class FacebookUser(auth_models.User):
user_id = models.BigIntegerField(unique=True)
access_token = models.... | Add support for server side authentication. | Add support for server side authentication.
Change-Id: Iff45fa00b5a5b389f998570827e33d9d232f5d1e
Reviewed-on: http://review.pozytywnie.pl:8080/5087
Reviewed-by: Tomasz Wysocki <f17c2dc043305c950a029074ababd304e0373387@gmail.com>
Tested-by: Tomasz Wysocki <f17c2dc043305c950a029074ababd304e0373387@gmail.com>
| Python | mit | pozytywnie/django-facebook-auth,pozytywnie/django-facebook-auth,jgoclawski/django-facebook-auth,jgoclawski/django-facebook-auth | from django.contrib.auth import models as auth_models
from django.db import models
import facepy
import simplejson
from facebook_auth import utils
class FacebookUser(auth_models.User):
user_id = models.BigIntegerField(unique=True)
access_token = models.TextField(blank=True, null=True)
app_friends = models... | from uuid import uuid1
from django.conf import settings
from django.contrib.auth import models as auth_models
from django.db import models
import facepy
import simplejson
from facebook_auth import utils
class FacebookUser(auth_models.User):
user_id = models.BigIntegerField(unique=True)
access_token = models.... | <commit_before>from django.contrib.auth import models as auth_models
from django.db import models
import facepy
import simplejson
from facebook_auth import utils
class FacebookUser(auth_models.User):
user_id = models.BigIntegerField(unique=True)
access_token = models.TextField(blank=True, null=True)
app_f... | from uuid import uuid1
from django.conf import settings
from django.contrib.auth import models as auth_models
from django.db import models
import facepy
import simplejson
from facebook_auth import utils
class FacebookUser(auth_models.User):
user_id = models.BigIntegerField(unique=True)
access_token = models.... | from django.contrib.auth import models as auth_models
from django.db import models
import facepy
import simplejson
from facebook_auth import utils
class FacebookUser(auth_models.User):
user_id = models.BigIntegerField(unique=True)
access_token = models.TextField(blank=True, null=True)
app_friends = models... | <commit_before>from django.contrib.auth import models as auth_models
from django.db import models
import facepy
import simplejson
from facebook_auth import utils
class FacebookUser(auth_models.User):
user_id = models.BigIntegerField(unique=True)
access_token = models.TextField(blank=True, null=True)
app_f... |
c182e5c8cef76c852d7ae41c2fc8b8266f17c728 | extensions/ExtGameController.py | extensions/ExtGameController.py | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
# GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
# GameMode(mode="hexTough", priority=5, digits=3, guesses_... | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
# GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
# GameMode(mode="hexTough", priority=5, digits=3, guesses_... | Remove ability to instantiate with game. | Remove ability to instantiate with game.
| Python | apache-2.0 | dsandersAzure/python_cowbull_server,dsandersAzure/python_cowbull_server | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
# GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
# GameMode(mode="hexTough", priority=5, digits=3, guesses_... | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
# GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
# GameMode(mode="hexTough", priority=5, digits=3, guesses_... | <commit_before>from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
# GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
# GameMode(mode="hexTough", priority=5, dig... | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
# GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
# GameMode(mode="hexTough", priority=5, digits=3, guesses_... | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
# GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
# GameMode(mode="hexTough", priority=5, digits=3, guesses_... | <commit_before>from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
# GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
# GameMode(mode="hexTough", priority=5, dig... |
dc88dca696d25a5ea5793aa48fae390469f0d829 | phi/flow.py | phi/flow.py | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | Add Tensor to standard imports | [Φ] Add Tensor to standard imports
| Python | mit | tum-pbs/PhiFlow,tum-pbs/PhiFlow | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | <commit_before># pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.fl... | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | <commit_before># pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.fl... |
887149522b4cbce5e84fe25897358600e88be29d | inbox/notify/__init__.py | inbox/notify/__init__.py | from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
import json
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDIS_DB'))
MAX_CONNECTIONS = 40
redis_pool = BlockingConnectionPool(
max_connections=MAX_CONNECTIONS,
host=REDI... | import json
from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
from nylas.logging import get_logger
log = get_logger()
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_PORT = int(config.get('NOTIFY_QUEUE_REDIS_PORT', 6379))
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDI... | Add logger an try/except logic | Add logger an try/except logic
| Python | agpl-3.0 | jobscore/sync-engine,jobscore/sync-engine,jobscore/sync-engine,jobscore/sync-engine | from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
import json
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDIS_DB'))
MAX_CONNECTIONS = 40
redis_pool = BlockingConnectionPool(
max_connections=MAX_CONNECTIONS,
host=REDI... | import json
from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
from nylas.logging import get_logger
log = get_logger()
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_PORT = int(config.get('NOTIFY_QUEUE_REDIS_PORT', 6379))
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDI... | <commit_before>from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
import json
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDIS_DB'))
MAX_CONNECTIONS = 40
redis_pool = BlockingConnectionPool(
max_connections=MAX_CONNECTIONS... | import json
from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
from nylas.logging import get_logger
log = get_logger()
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_PORT = int(config.get('NOTIFY_QUEUE_REDIS_PORT', 6379))
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDI... | from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
import json
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDIS_DB'))
MAX_CONNECTIONS = 40
redis_pool = BlockingConnectionPool(
max_connections=MAX_CONNECTIONS,
host=REDI... | <commit_before>from redis import StrictRedis, BlockingConnectionPool
from inbox.config import config
import json
REDIS_HOSTNAME = config.get('NOTIFY_QUEUE_REDIS_HOSTNAME')
REDIS_DB = int(config.get('NOTIFY_QUEUE_REDIS_DB'))
MAX_CONNECTIONS = 40
redis_pool = BlockingConnectionPool(
max_connections=MAX_CONNECTIONS... |
d09379bbc6898b696e762d1bb06404eb613c59f3 | tests/main.py | tests/main.py | """
Tests concerned with the ``fab`` tool & how it overrides Invoke defaults.
"""
import re
import sys
from spec import Spec, trap, assert_contains
from fabric.main import program
class Fab_(Spec):
@trap
def version_output_contains_our_name_plus_deps(self):
program.run("fab --version", exit=False)
... | """
Tests concerned with the ``fab`` tool & how it overrides Invoke defaults.
"""
import re
import sys
from spec import Spec, trap, assert_contains
from fabric.main import program as fab_program
# TODO: figure out a non shite way to share Invoke's more beefy copy of same.
def expect(invocation, out, program=None, ... | Use stripped-down version of invoke test expect() | Use stripped-down version of invoke test expect()
| Python | bsd-2-clause | fabric/fabric | """
Tests concerned with the ``fab`` tool & how it overrides Invoke defaults.
"""
import re
import sys
from spec import Spec, trap, assert_contains
from fabric.main import program
class Fab_(Spec):
@trap
def version_output_contains_our_name_plus_deps(self):
program.run("fab --version", exit=False)
... | """
Tests concerned with the ``fab`` tool & how it overrides Invoke defaults.
"""
import re
import sys
from spec import Spec, trap, assert_contains
from fabric.main import program as fab_program
# TODO: figure out a non shite way to share Invoke's more beefy copy of same.
def expect(invocation, out, program=None, ... | <commit_before>"""
Tests concerned with the ``fab`` tool & how it overrides Invoke defaults.
"""
import re
import sys
from spec import Spec, trap, assert_contains
from fabric.main import program
class Fab_(Spec):
@trap
def version_output_contains_our_name_plus_deps(self):
program.run("fab --version... | """
Tests concerned with the ``fab`` tool & how it overrides Invoke defaults.
"""
import re
import sys
from spec import Spec, trap, assert_contains
from fabric.main import program as fab_program
# TODO: figure out a non shite way to share Invoke's more beefy copy of same.
def expect(invocation, out, program=None, ... | """
Tests concerned with the ``fab`` tool & how it overrides Invoke defaults.
"""
import re
import sys
from spec import Spec, trap, assert_contains
from fabric.main import program
class Fab_(Spec):
@trap
def version_output_contains_our_name_plus_deps(self):
program.run("fab --version", exit=False)
... | <commit_before>"""
Tests concerned with the ``fab`` tool & how it overrides Invoke defaults.
"""
import re
import sys
from spec import Spec, trap, assert_contains
from fabric.main import program
class Fab_(Spec):
@trap
def version_output_contains_our_name_plus_deps(self):
program.run("fab --version... |
6a410b9079cffec380ac44cf390be381be929e5d | autoencoder/api.py | autoencoder/api.py | from .io import preprocess
from .train import train
from .network import autoencoder
from .encode import encode
def autoencode(count_matrix, kfold=None, dimreduce=True, reconstruct=True,
mask=None, type='normal', activation='relu',
learning_rate=1e-2, hidden_size=(256,64,256), l2_coef=0.... | from .io import preprocess
from .train import train
from .network import autoencoder
from .encode import encode
def autoencode(count_matrix, kfold=None, dimreduce=True, reconstruct=True,
mask=None, type='normal', activation='relu', testset=False,
learning_rate=1e-2, hidden_size=(256,64,2... | Make preprocess testset argument accessible through API | Make preprocess testset argument accessible through API
| Python | apache-2.0 | theislab/dca,theislab/dca,theislab/dca | from .io import preprocess
from .train import train
from .network import autoencoder
from .encode import encode
def autoencode(count_matrix, kfold=None, dimreduce=True, reconstruct=True,
mask=None, type='normal', activation='relu',
learning_rate=1e-2, hidden_size=(256,64,256), l2_coef=0.... | from .io import preprocess
from .train import train
from .network import autoencoder
from .encode import encode
def autoencode(count_matrix, kfold=None, dimreduce=True, reconstruct=True,
mask=None, type='normal', activation='relu', testset=False,
learning_rate=1e-2, hidden_size=(256,64,2... | <commit_before>from .io import preprocess
from .train import train
from .network import autoencoder
from .encode import encode
def autoencode(count_matrix, kfold=None, dimreduce=True, reconstruct=True,
mask=None, type='normal', activation='relu',
learning_rate=1e-2, hidden_size=(256,64,2... | from .io import preprocess
from .train import train
from .network import autoencoder
from .encode import encode
def autoencode(count_matrix, kfold=None, dimreduce=True, reconstruct=True,
mask=None, type='normal', activation='relu', testset=False,
learning_rate=1e-2, hidden_size=(256,64,2... | from .io import preprocess
from .train import train
from .network import autoencoder
from .encode import encode
def autoencode(count_matrix, kfold=None, dimreduce=True, reconstruct=True,
mask=None, type='normal', activation='relu',
learning_rate=1e-2, hidden_size=(256,64,256), l2_coef=0.... | <commit_before>from .io import preprocess
from .train import train
from .network import autoencoder
from .encode import encode
def autoencode(count_matrix, kfold=None, dimreduce=True, reconstruct=True,
mask=None, type='normal', activation='relu',
learning_rate=1e-2, hidden_size=(256,64,2... |
aaa74513f8b947cf542b59408816be9ed1867644 | atc/atcd/setup.py | atc/atcd/setup.py | #!/usr/bin/env python
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
#
... | #!/usr/bin/env python
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
#
... | Make atcd depends on atc_thrift package implicitely | Make atcd depends on atc_thrift package implicitely
| Python | bsd-3-clause | jamesblunt/augmented-traffic-control,linearregression/augmented-traffic-control,biddyweb/augmented-traffic-control,beni55/augmented-traffic-control,linearregression/augmented-traffic-control,duydb2/ZTC,shinyvince/augmented-traffic-control,Endika/augmented-traffic-control,drptbl/augmented-traffic-control,shinyvince/augm... | #!/usr/bin/env python
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
#
... | #!/usr/bin/env python
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
#
... | <commit_before>#!/usr/bin/env python
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same ... | #!/usr/bin/env python
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
#
... | #!/usr/bin/env python
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
#
... | <commit_before>#!/usr/bin/env python
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same ... |
c87be7a48d496cffe24f31ca46db0a7629a0b2a8 | utilkit/stringutil.py | utilkit/stringutil.py | """
String/unicode helper functions
"""
def safe_unicode(obj, *args):
""" return the unicode representation of obj """
try:
return unicode(obj, *args)
except UnicodeDecodeError:
# obj is byte string
ascii_text = str(obj).encode('string_escape')
return unicode(ascii_text)
de... | """
String/unicode helper functions
"""
def safe_unicode(obj, *args):
""" return the unicode representation of obj """
try:
return unicode(obj, *args) # pylint:disable=undefined-variable
except UnicodeDecodeError:
# obj is byte string
ascii_text = str(obj).encode('string_escape')
... | Disable error-checking that assumes Python 3 for these Python 2 helpers | Disable error-checking that assumes Python 3 for these Python 2 helpers
| Python | mit | aquatix/python-utilkit | """
String/unicode helper functions
"""
def safe_unicode(obj, *args):
""" return the unicode representation of obj """
try:
return unicode(obj, *args)
except UnicodeDecodeError:
# obj is byte string
ascii_text = str(obj).encode('string_escape')
return unicode(ascii_text)
de... | """
String/unicode helper functions
"""
def safe_unicode(obj, *args):
""" return the unicode representation of obj """
try:
return unicode(obj, *args) # pylint:disable=undefined-variable
except UnicodeDecodeError:
# obj is byte string
ascii_text = str(obj).encode('string_escape')
... | <commit_before>"""
String/unicode helper functions
"""
def safe_unicode(obj, *args):
""" return the unicode representation of obj """
try:
return unicode(obj, *args)
except UnicodeDecodeError:
# obj is byte string
ascii_text = str(obj).encode('string_escape')
return unicode(... | """
String/unicode helper functions
"""
def safe_unicode(obj, *args):
""" return the unicode representation of obj """
try:
return unicode(obj, *args) # pylint:disable=undefined-variable
except UnicodeDecodeError:
# obj is byte string
ascii_text = str(obj).encode('string_escape')
... | """
String/unicode helper functions
"""
def safe_unicode(obj, *args):
""" return the unicode representation of obj """
try:
return unicode(obj, *args)
except UnicodeDecodeError:
# obj is byte string
ascii_text = str(obj).encode('string_escape')
return unicode(ascii_text)
de... | <commit_before>"""
String/unicode helper functions
"""
def safe_unicode(obj, *args):
""" return the unicode representation of obj """
try:
return unicode(obj, *args)
except UnicodeDecodeError:
# obj is byte string
ascii_text = str(obj).encode('string_escape')
return unicode(... |
66289d6620758de0da80e91c6a492e39626c9029 | tests/integration.py | tests/integration.py | #!/usr/bin/env python
import unittest
import subprocess
class TestSimpleMapping(unittest.TestCase):
def test_map_1_read(self):
subprocess.run(['python', 'bin/sillymap', 'index', 'tests/test_data/reference.fa'])
result = subprocess.run(['python', 'bin/sillymap', 'map', 'tests/test_data/reference.fa'... | #!/usr/bin/env python
import unittest
import subprocess
class TestSimpleMapping(unittest.TestCase):
def test_map_1_read(self):
subprocess.run(['python', 'bin/sillymap', 'index', 'tests/test_data/reference.fa'])
result = subprocess.run(['python', 'bin/sillymap', 'map', 'tests/test_data/reference.fa'... | Remove index file created in test | Remove index file created in test
| Python | mit | alneberg/sillymap | #!/usr/bin/env python
import unittest
import subprocess
class TestSimpleMapping(unittest.TestCase):
def test_map_1_read(self):
subprocess.run(['python', 'bin/sillymap', 'index', 'tests/test_data/reference.fa'])
result = subprocess.run(['python', 'bin/sillymap', 'map', 'tests/test_data/reference.fa'... | #!/usr/bin/env python
import unittest
import subprocess
class TestSimpleMapping(unittest.TestCase):
def test_map_1_read(self):
subprocess.run(['python', 'bin/sillymap', 'index', 'tests/test_data/reference.fa'])
result = subprocess.run(['python', 'bin/sillymap', 'map', 'tests/test_data/reference.fa'... | <commit_before>#!/usr/bin/env python
import unittest
import subprocess
class TestSimpleMapping(unittest.TestCase):
def test_map_1_read(self):
subprocess.run(['python', 'bin/sillymap', 'index', 'tests/test_data/reference.fa'])
result = subprocess.run(['python', 'bin/sillymap', 'map', 'tests/test_dat... | #!/usr/bin/env python
import unittest
import subprocess
class TestSimpleMapping(unittest.TestCase):
def test_map_1_read(self):
subprocess.run(['python', 'bin/sillymap', 'index', 'tests/test_data/reference.fa'])
result = subprocess.run(['python', 'bin/sillymap', 'map', 'tests/test_data/reference.fa'... | #!/usr/bin/env python
import unittest
import subprocess
class TestSimpleMapping(unittest.TestCase):
def test_map_1_read(self):
subprocess.run(['python', 'bin/sillymap', 'index', 'tests/test_data/reference.fa'])
result = subprocess.run(['python', 'bin/sillymap', 'map', 'tests/test_data/reference.fa'... | <commit_before>#!/usr/bin/env python
import unittest
import subprocess
class TestSimpleMapping(unittest.TestCase):
def test_map_1_read(self):
subprocess.run(['python', 'bin/sillymap', 'index', 'tests/test_data/reference.fa'])
result = subprocess.run(['python', 'bin/sillymap', 'map', 'tests/test_dat... |
21d940192fa390b1a2de3183e099194bceaeeafe | tests/test_arrays.py | tests/test_arrays.py | from thinglang.thinglang import run
def test_simple_arrays():
assert run("""
thing Program
does start
array names = ["yotam", "andrew", "john"]
Output.write(names)
""").output == """['yotam', 'andrew', 'john']"""
| from thinglang.thinglang import run
def test_simple_arrays():
assert run("""
thing Program
does start
array names = ["yotam", "andrew", "john"]
Output.write(names)
""").output == """['yotam', 'andrew', 'john']"""
def test_array_initialization_over_function_calls():
assert run("""
th... | Add test for more complex array initization case | Add test for more complex array initization case
| Python | mit | ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang | from thinglang.thinglang import run
def test_simple_arrays():
assert run("""
thing Program
does start
array names = ["yotam", "andrew", "john"]
Output.write(names)
""").output == """['yotam', 'andrew', 'john']"""
Add test for more complex array initization case | from thinglang.thinglang import run
def test_simple_arrays():
assert run("""
thing Program
does start
array names = ["yotam", "andrew", "john"]
Output.write(names)
""").output == """['yotam', 'andrew', 'john']"""
def test_array_initialization_over_function_calls():
assert run("""
th... | <commit_before>from thinglang.thinglang import run
def test_simple_arrays():
assert run("""
thing Program
does start
array names = ["yotam", "andrew", "john"]
Output.write(names)
""").output == """['yotam', 'andrew', 'john']"""
<commit_msg>Add test for more complex array initization case... | from thinglang.thinglang import run
def test_simple_arrays():
assert run("""
thing Program
does start
array names = ["yotam", "andrew", "john"]
Output.write(names)
""").output == """['yotam', 'andrew', 'john']"""
def test_array_initialization_over_function_calls():
assert run("""
th... | from thinglang.thinglang import run
def test_simple_arrays():
assert run("""
thing Program
does start
array names = ["yotam", "andrew", "john"]
Output.write(names)
""").output == """['yotam', 'andrew', 'john']"""
Add test for more complex array initization casefrom thinglang.thinglang im... | <commit_before>from thinglang.thinglang import run
def test_simple_arrays():
assert run("""
thing Program
does start
array names = ["yotam", "andrew", "john"]
Output.write(names)
""").output == """['yotam', 'andrew', 'john']"""
<commit_msg>Add test for more complex array initization case... |
25fc6df856aa77dca6660eab7c1ce9d9e01fc2c4 | eultheme/__init__.py | eultheme/__init__.py | __version_info__ = (1, 3, 0, None)
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join(str(i) for i in __version_info__[:-1])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
| __version_info__ = (1, 4, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join(str(i) for i in __version_info__[:-1])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
| Set develop version to 1.4-dev after tagging 1.3 | Set develop version to 1.4-dev after tagging 1.3
| Python | apache-2.0 | emory-libraries/django-eultheme,emory-libraries/django-eultheme,emory-libraries/django-eultheme | __version_info__ = (1, 3, 0, None)
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join(str(i) for i in __version_info__[:-1])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
Set develop version to 1.4-dev after tagging 1.3 | __version_info__ = (1, 4, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join(str(i) for i in __version_info__[:-1])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
| <commit_before>__version_info__ = (1, 3, 0, None)
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join(str(i) for i in __version_info__[:-1])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
<commit_msg>Set develop version to 1.4-dev after ... | __version_info__ = (1, 4, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join(str(i) for i in __version_info__[:-1])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
| __version_info__ = (1, 3, 0, None)
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join(str(i) for i in __version_info__[:-1])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
Set develop version to 1.4-dev after tagging 1.3__version_info__... | <commit_before>__version_info__ = (1, 3, 0, None)
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join(str(i) for i in __version_info__[:-1])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
<commit_msg>Set develop version to 1.4-dev after ... |
497be50549e9c7b3a886a1d0753386d8f93cea2b | tests/test_blocks.py | tests/test_blocks.py | from .utils import TemplateTestCase, Mock
class BlockTagTest(TemplateTestCase):
def test_block_parse(self):
self.assertRendered('{% block name %}%{% endblock %}', '%')
class ForTagTest(TemplateTestCase):
def test_simple_for(self):
self.assertRendered(
'{% for _in=seq %}{{ item }... | from .utils import TemplateTestCase, Mock
class BlockTagTest(TemplateTestCase):
def test_block_parse(self):
self.assertRendered('{% block name %}%{% endblock %}', '%')
class ForTagTest(TemplateTestCase):
def test_simple_for(self):
self.assertRendered(
'{% for item in seq %}{{ it... | Update tags for new syntax | Update tags for new syntax
| Python | mit | funkybob/knights-templater,funkybob/knights-templater | from .utils import TemplateTestCase, Mock
class BlockTagTest(TemplateTestCase):
def test_block_parse(self):
self.assertRendered('{% block name %}%{% endblock %}', '%')
class ForTagTest(TemplateTestCase):
def test_simple_for(self):
self.assertRendered(
'{% for _in=seq %}{{ item }... | from .utils import TemplateTestCase, Mock
class BlockTagTest(TemplateTestCase):
def test_block_parse(self):
self.assertRendered('{% block name %}%{% endblock %}', '%')
class ForTagTest(TemplateTestCase):
def test_simple_for(self):
self.assertRendered(
'{% for item in seq %}{{ it... | <commit_before>from .utils import TemplateTestCase, Mock
class BlockTagTest(TemplateTestCase):
def test_block_parse(self):
self.assertRendered('{% block name %}%{% endblock %}', '%')
class ForTagTest(TemplateTestCase):
def test_simple_for(self):
self.assertRendered(
'{% for _in=... | from .utils import TemplateTestCase, Mock
class BlockTagTest(TemplateTestCase):
def test_block_parse(self):
self.assertRendered('{% block name %}%{% endblock %}', '%')
class ForTagTest(TemplateTestCase):
def test_simple_for(self):
self.assertRendered(
'{% for item in seq %}{{ it... | from .utils import TemplateTestCase, Mock
class BlockTagTest(TemplateTestCase):
def test_block_parse(self):
self.assertRendered('{% block name %}%{% endblock %}', '%')
class ForTagTest(TemplateTestCase):
def test_simple_for(self):
self.assertRendered(
'{% for _in=seq %}{{ item }... | <commit_before>from .utils import TemplateTestCase, Mock
class BlockTagTest(TemplateTestCase):
def test_block_parse(self):
self.assertRendered('{% block name %}%{% endblock %}', '%')
class ForTagTest(TemplateTestCase):
def test_simple_for(self):
self.assertRendered(
'{% for _in=... |
f682e0bc4b8506a45846a74fe537917ba0ffd5bb | tests/test_format.py | tests/test_format.py | from unittest.mock import MagicMock, patch
import pytest
from hypothesis_auto import auto_pytest_magic
import isort.format
auto_pytest_magic(isort.format.show_unified_diff)
def test_ask_whether_to_apply_changes_to_file():
with patch("isort.format.input", MagicMock(return_value="y")):
assert isort.forma... | from unittest.mock import MagicMock, patch
import pytest
from hypothesis_auto import auto_pytest_magic
import isort.format
auto_pytest_magic(isort.format.show_unified_diff, auto_allow_exceptions_=(UnicodeEncodeError,))
def test_ask_whether_to_apply_changes_to_file():
with patch("isort.format.input", MagicMock(... | Fix test case to be more explicit | Fix test case to be more explicit
| Python | mit | PyCQA/isort,PyCQA/isort | from unittest.mock import MagicMock, patch
import pytest
from hypothesis_auto import auto_pytest_magic
import isort.format
auto_pytest_magic(isort.format.show_unified_diff)
def test_ask_whether_to_apply_changes_to_file():
with patch("isort.format.input", MagicMock(return_value="y")):
assert isort.forma... | from unittest.mock import MagicMock, patch
import pytest
from hypothesis_auto import auto_pytest_magic
import isort.format
auto_pytest_magic(isort.format.show_unified_diff, auto_allow_exceptions_=(UnicodeEncodeError,))
def test_ask_whether_to_apply_changes_to_file():
with patch("isort.format.input", MagicMock(... | <commit_before>from unittest.mock import MagicMock, patch
import pytest
from hypothesis_auto import auto_pytest_magic
import isort.format
auto_pytest_magic(isort.format.show_unified_diff)
def test_ask_whether_to_apply_changes_to_file():
with patch("isort.format.input", MagicMock(return_value="y")):
ass... | from unittest.mock import MagicMock, patch
import pytest
from hypothesis_auto import auto_pytest_magic
import isort.format
auto_pytest_magic(isort.format.show_unified_diff, auto_allow_exceptions_=(UnicodeEncodeError,))
def test_ask_whether_to_apply_changes_to_file():
with patch("isort.format.input", MagicMock(... | from unittest.mock import MagicMock, patch
import pytest
from hypothesis_auto import auto_pytest_magic
import isort.format
auto_pytest_magic(isort.format.show_unified_diff)
def test_ask_whether_to_apply_changes_to_file():
with patch("isort.format.input", MagicMock(return_value="y")):
assert isort.forma... | <commit_before>from unittest.mock import MagicMock, patch
import pytest
from hypothesis_auto import auto_pytest_magic
import isort.format
auto_pytest_magic(isort.format.show_unified_diff)
def test_ask_whether_to_apply_changes_to_file():
with patch("isort.format.input", MagicMock(return_value="y")):
ass... |
1e3109f154ab86273996e4b598cea706c766cb8b | spec/settings_spec.py | spec/settings_spec.py | # -*- coding: utf-8 -*-
from mamba import describe, context, before
from sure import expect
from mamba.settings import Settings
IRRELEVANT_SLOW_TEST_THRESHOLD = '0.1'
with describe('Settings') as _:
@before.each
def create_settings():
_.settings = Settings()
with context('when loading defaults... | # -*- coding: utf-8 -*-
from mamba import describe, context
from sure import expect
from mamba.settings import Settings
IRRELEVANT_SLOW_TEST_THRESHOLD = '0.1'
with describe(Settings) as _:
with context('when loading defaults'):
def it_should_have_75_millis_as_slow_test_threshold():
expect(_... | Use subject for test settings | Use subject for test settings
| Python | mit | jaimegildesagredo/mamba,nestorsalceda/mamba,alejandrodob/mamba,angelsanz/mamba,eferro/mamba,markng/mamba,dex4er/mamba | # -*- coding: utf-8 -*-
from mamba import describe, context, before
from sure import expect
from mamba.settings import Settings
IRRELEVANT_SLOW_TEST_THRESHOLD = '0.1'
with describe('Settings') as _:
@before.each
def create_settings():
_.settings = Settings()
with context('when loading defaults... | # -*- coding: utf-8 -*-
from mamba import describe, context
from sure import expect
from mamba.settings import Settings
IRRELEVANT_SLOW_TEST_THRESHOLD = '0.1'
with describe(Settings) as _:
with context('when loading defaults'):
def it_should_have_75_millis_as_slow_test_threshold():
expect(_... | <commit_before># -*- coding: utf-8 -*-
from mamba import describe, context, before
from sure import expect
from mamba.settings import Settings
IRRELEVANT_SLOW_TEST_THRESHOLD = '0.1'
with describe('Settings') as _:
@before.each
def create_settings():
_.settings = Settings()
with context('when l... | # -*- coding: utf-8 -*-
from mamba import describe, context
from sure import expect
from mamba.settings import Settings
IRRELEVANT_SLOW_TEST_THRESHOLD = '0.1'
with describe(Settings) as _:
with context('when loading defaults'):
def it_should_have_75_millis_as_slow_test_threshold():
expect(_... | # -*- coding: utf-8 -*-
from mamba import describe, context, before
from sure import expect
from mamba.settings import Settings
IRRELEVANT_SLOW_TEST_THRESHOLD = '0.1'
with describe('Settings') as _:
@before.each
def create_settings():
_.settings = Settings()
with context('when loading defaults... | <commit_before># -*- coding: utf-8 -*-
from mamba import describe, context, before
from sure import expect
from mamba.settings import Settings
IRRELEVANT_SLOW_TEST_THRESHOLD = '0.1'
with describe('Settings') as _:
@before.each
def create_settings():
_.settings = Settings()
with context('when l... |
6e04a5c4953ef3fde5f2f5b3ef4f7fd8b7e8437e | tests/test_server.py | tests/test_server.py | def test_info(logged_rocket):
info = logged_rocket.info().json()
assert "info" in info
assert info.get("success")
def test_statistics(logged_rocket):
statistics = logged_rocket.statistics().json()
assert statistics.get("success")
def test_statistics_list(logged_rocket):
statistics_list = log... | from rocketchat_API.rocketchat import RocketChat
def test_info(logged_rocket):
info = logged_rocket.info().json()
assert "info" in info
assert info.get("success")
def test_statistics(logged_rocket):
statistics = logged_rocket.statistics().json()
assert statistics.get("success")
def test_statis... | Add a test to check that authentication using the token directly works | Add a test to check that authentication using the token directly works
| Python | mit | jadolg/rocketchat_API | def test_info(logged_rocket):
info = logged_rocket.info().json()
assert "info" in info
assert info.get("success")
def test_statistics(logged_rocket):
statistics = logged_rocket.statistics().json()
assert statistics.get("success")
def test_statistics_list(logged_rocket):
statistics_list = log... | from rocketchat_API.rocketchat import RocketChat
def test_info(logged_rocket):
info = logged_rocket.info().json()
assert "info" in info
assert info.get("success")
def test_statistics(logged_rocket):
statistics = logged_rocket.statistics().json()
assert statistics.get("success")
def test_statis... | <commit_before>def test_info(logged_rocket):
info = logged_rocket.info().json()
assert "info" in info
assert info.get("success")
def test_statistics(logged_rocket):
statistics = logged_rocket.statistics().json()
assert statistics.get("success")
def test_statistics_list(logged_rocket):
statis... | from rocketchat_API.rocketchat import RocketChat
def test_info(logged_rocket):
info = logged_rocket.info().json()
assert "info" in info
assert info.get("success")
def test_statistics(logged_rocket):
statistics = logged_rocket.statistics().json()
assert statistics.get("success")
def test_statis... | def test_info(logged_rocket):
info = logged_rocket.info().json()
assert "info" in info
assert info.get("success")
def test_statistics(logged_rocket):
statistics = logged_rocket.statistics().json()
assert statistics.get("success")
def test_statistics_list(logged_rocket):
statistics_list = log... | <commit_before>def test_info(logged_rocket):
info = logged_rocket.info().json()
assert "info" in info
assert info.get("success")
def test_statistics(logged_rocket):
statistics = logged_rocket.statistics().json()
assert statistics.get("success")
def test_statistics_list(logged_rocket):
statis... |
0f08eb828091204c6131ee868a43f2a8f3ed73f4 | tests/test_widget.py | tests/test_widget.py | from django.conf import settings
from django.test import TestCase
from localized_fields.value import LocalizedValue
from localized_fields.widgets import LocalizedFieldWidget
class LocalizedFieldWidgetTestCase(TestCase):
"""Tests the workings of the :see:LocalizedFieldWidget class."""
@staticmethod
def t... | import re
from django.conf import settings
from django.test import TestCase
from localized_fields.value import LocalizedValue
from localized_fields.widgets import LocalizedFieldWidget
class LocalizedFieldWidgetTestCase(TestCase):
"""Tests the workings of the :see:LocalizedFieldWidget class."""
@staticmethod... | Add test on render method | Add test on render method
| Python | mit | SectorLabs/django-localized-fields,SectorLabs/django-localized-fields,SectorLabs/django-localized-fields | from django.conf import settings
from django.test import TestCase
from localized_fields.value import LocalizedValue
from localized_fields.widgets import LocalizedFieldWidget
class LocalizedFieldWidgetTestCase(TestCase):
"""Tests the workings of the :see:LocalizedFieldWidget class."""
@staticmethod
def t... | import re
from django.conf import settings
from django.test import TestCase
from localized_fields.value import LocalizedValue
from localized_fields.widgets import LocalizedFieldWidget
class LocalizedFieldWidgetTestCase(TestCase):
"""Tests the workings of the :see:LocalizedFieldWidget class."""
@staticmethod... | <commit_before>from django.conf import settings
from django.test import TestCase
from localized_fields.value import LocalizedValue
from localized_fields.widgets import LocalizedFieldWidget
class LocalizedFieldWidgetTestCase(TestCase):
"""Tests the workings of the :see:LocalizedFieldWidget class."""
@staticm... | import re
from django.conf import settings
from django.test import TestCase
from localized_fields.value import LocalizedValue
from localized_fields.widgets import LocalizedFieldWidget
class LocalizedFieldWidgetTestCase(TestCase):
"""Tests the workings of the :see:LocalizedFieldWidget class."""
@staticmethod... | from django.conf import settings
from django.test import TestCase
from localized_fields.value import LocalizedValue
from localized_fields.widgets import LocalizedFieldWidget
class LocalizedFieldWidgetTestCase(TestCase):
"""Tests the workings of the :see:LocalizedFieldWidget class."""
@staticmethod
def t... | <commit_before>from django.conf import settings
from django.test import TestCase
from localized_fields.value import LocalizedValue
from localized_fields.widgets import LocalizedFieldWidget
class LocalizedFieldWidgetTestCase(TestCase):
"""Tests the workings of the :see:LocalizedFieldWidget class."""
@staticm... |
96513ab379341d6db0aa7ce16aa20b8d1a93dc69 | runtests.py | runtests.py | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
DEFAULT_SETTINGS = dict(
INSTALLED_APPS=[
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"account",
"forums",
"forums.tests"
],
DATABAS... | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
DEFAULT_SETTINGS = dict(
INSTALLED_APPS=[
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"account",
"pinax.forums",
"pinax.forums.tests"
],... | Fix two left over renames | Fix two left over renames
| Python | mit | pinax/pinax-forums | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
DEFAULT_SETTINGS = dict(
INSTALLED_APPS=[
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"account",
"forums",
"forums.tests"
],
DATABAS... | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
DEFAULT_SETTINGS = dict(
INSTALLED_APPS=[
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"account",
"pinax.forums",
"pinax.forums.tests"
],... | <commit_before>#!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
DEFAULT_SETTINGS = dict(
INSTALLED_APPS=[
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"account",
"forums",
"forums.tests"
... | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
DEFAULT_SETTINGS = dict(
INSTALLED_APPS=[
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"account",
"pinax.forums",
"pinax.forums.tests"
],... | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
DEFAULT_SETTINGS = dict(
INSTALLED_APPS=[
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"account",
"forums",
"forums.tests"
],
DATABAS... | <commit_before>#!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
DEFAULT_SETTINGS = dict(
INSTALLED_APPS=[
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"account",
"forums",
"forums.tests"
... |
0398c7539c1bebcaa6622576f4acef970394d6a7 | runtests.py | runtests.py | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | Fix test runner for trunk | Fix test runner for trunk
| Python | mit | treyhunner/django-email-log,treyhunner/django-email-log | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | <commit_before>#!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'dja... | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | <commit_before>#!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'dja... |
ae8b0d5eab43a349f33d3eb907565cb2931e15cd | jedi/api/replstartup.py | jedi/api/replstartup.py | """
To use Jedi completion in Python interpreter, add the following in your shell
setup (e.g., ``.bashrc``)::
export PYTHONSTARTUP="$(python -m jedi repl)"
Then you will be able to use Jedi completer in your Python interpreter::
$ python
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on l... | """
To use Jedi completion in Python interpreter, add the following in your shell
setup (e.g., ``.bashrc``)::
export PYTHONSTARTUP="$(python -m jedi repl)"
Then you will be able to use Jedi completer in your Python interpreter::
$ python
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on l... | Print the Jedi version when REPL completion is used | Print the Jedi version when REPL completion is used
This also makes debugging easier, because people see which completion
they're actually using.
| Python | mit | tjwei/jedi,mfussenegger/jedi,WoLpH/jedi,mfussenegger/jedi,jonashaag/jedi,flurischt/jedi,WoLpH/jedi,flurischt/jedi,jonashaag/jedi,dwillmer/jedi,dwillmer/jedi,tjwei/jedi | """
To use Jedi completion in Python interpreter, add the following in your shell
setup (e.g., ``.bashrc``)::
export PYTHONSTARTUP="$(python -m jedi repl)"
Then you will be able to use Jedi completer in your Python interpreter::
$ python
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on l... | """
To use Jedi completion in Python interpreter, add the following in your shell
setup (e.g., ``.bashrc``)::
export PYTHONSTARTUP="$(python -m jedi repl)"
Then you will be able to use Jedi completer in your Python interpreter::
$ python
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on l... | <commit_before>"""
To use Jedi completion in Python interpreter, add the following in your shell
setup (e.g., ``.bashrc``)::
export PYTHONSTARTUP="$(python -m jedi repl)"
Then you will be able to use Jedi completer in your Python interpreter::
$ python
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[... | """
To use Jedi completion in Python interpreter, add the following in your shell
setup (e.g., ``.bashrc``)::
export PYTHONSTARTUP="$(python -m jedi repl)"
Then you will be able to use Jedi completer in your Python interpreter::
$ python
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on l... | """
To use Jedi completion in Python interpreter, add the following in your shell
setup (e.g., ``.bashrc``)::
export PYTHONSTARTUP="$(python -m jedi repl)"
Then you will be able to use Jedi completer in your Python interpreter::
$ python
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on l... | <commit_before>"""
To use Jedi completion in Python interpreter, add the following in your shell
setup (e.g., ``.bashrc``)::
export PYTHONSTARTUP="$(python -m jedi repl)"
Then you will be able to use Jedi completer in your Python interpreter::
$ python
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[... |
e50333baa8390ae3bedb77f1442c9d90cf6ea4b0 | mint/userlisting.py | mint/userlisting.py | #
# Copyright (c) 2005 rpath, Inc.
#
# All Rights Reserved
#
(
USERNAME_ASC,
USERNAME_DES,
FULLNAME_ASC,
FULLNAME_DES,
CREATED_ASC,
CREATED_DES,
ACCESSED_ASC,
ACCESSED_DES
) = range(0, 8)
blurbindex = 5
blurbtrunclength = 300
sqlbase = """SELECT userid, username, fullname, timeCreated,... | #
# Copyright (c) 2005 rpath, Inc.
#
# All Rights Reserved
#
(
USERNAME_ASC,
USERNAME_DES,
FULLNAME_ASC,
FULLNAME_DES,
CREATED_ASC,
CREATED_DES,
ACCESSED_ASC,
ACCESSED_DES
) = range(0, 8)
blurbindex = 5
blurbtrunclength = 300
sqlbase = """SELECT userid, username, fullname, timeCreated,... | Hide yet-to-be-activated usernames from listings | Hide yet-to-be-activated usernames from listings
| Python | apache-2.0 | sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint | #
# Copyright (c) 2005 rpath, Inc.
#
# All Rights Reserved
#
(
USERNAME_ASC,
USERNAME_DES,
FULLNAME_ASC,
FULLNAME_DES,
CREATED_ASC,
CREATED_DES,
ACCESSED_ASC,
ACCESSED_DES
) = range(0, 8)
blurbindex = 5
blurbtrunclength = 300
sqlbase = """SELECT userid, username, fullname, timeCreated,... | #
# Copyright (c) 2005 rpath, Inc.
#
# All Rights Reserved
#
(
USERNAME_ASC,
USERNAME_DES,
FULLNAME_ASC,
FULLNAME_DES,
CREATED_ASC,
CREATED_DES,
ACCESSED_ASC,
ACCESSED_DES
) = range(0, 8)
blurbindex = 5
blurbtrunclength = 300
sqlbase = """SELECT userid, username, fullname, timeCreated,... | <commit_before>#
# Copyright (c) 2005 rpath, Inc.
#
# All Rights Reserved
#
(
USERNAME_ASC,
USERNAME_DES,
FULLNAME_ASC,
FULLNAME_DES,
CREATED_ASC,
CREATED_DES,
ACCESSED_ASC,
ACCESSED_DES
) = range(0, 8)
blurbindex = 5
blurbtrunclength = 300
sqlbase = """SELECT userid, username, fullnam... | #
# Copyright (c) 2005 rpath, Inc.
#
# All Rights Reserved
#
(
USERNAME_ASC,
USERNAME_DES,
FULLNAME_ASC,
FULLNAME_DES,
CREATED_ASC,
CREATED_DES,
ACCESSED_ASC,
ACCESSED_DES
) = range(0, 8)
blurbindex = 5
blurbtrunclength = 300
sqlbase = """SELECT userid, username, fullname, timeCreated,... | #
# Copyright (c) 2005 rpath, Inc.
#
# All Rights Reserved
#
(
USERNAME_ASC,
USERNAME_DES,
FULLNAME_ASC,
FULLNAME_DES,
CREATED_ASC,
CREATED_DES,
ACCESSED_ASC,
ACCESSED_DES
) = range(0, 8)
blurbindex = 5
blurbtrunclength = 300
sqlbase = """SELECT userid, username, fullname, timeCreated,... | <commit_before>#
# Copyright (c) 2005 rpath, Inc.
#
# All Rights Reserved
#
(
USERNAME_ASC,
USERNAME_DES,
FULLNAME_ASC,
FULLNAME_DES,
CREATED_ASC,
CREATED_DES,
ACCESSED_ASC,
ACCESSED_DES
) = range(0, 8)
blurbindex = 5
blurbtrunclength = 300
sqlbase = """SELECT userid, username, fullnam... |
d45df810c6ae9482f935ccfddef6c96438d893a3 | OpenPNM/Geometry/models/pore_centroid.py | OpenPNM/Geometry/models/pore_centroid.py | r"""
===============================================================================
pore_centroid
===============================================================================
"""
import scipy as _sp
def voronoi(network, geometry, vertices='throat.centroid', **kwargs):
r"""
Calculate the centroid from the... | r"""
===============================================================================
pore_centroid
===============================================================================
"""
import scipy as _sp
def voronoi(network, geometry, vertices='throat.centroid', **kwargs):
r"""
Calculate the centroid from the... | Fix bug in pore centroid | Fix bug in pore centroid
| Python | mit | amdouglas/OpenPNM,PMEAL/OpenPNM,TomTranter/OpenPNM,stadelmanma/OpenPNM,amdouglas/OpenPNM | r"""
===============================================================================
pore_centroid
===============================================================================
"""
import scipy as _sp
def voronoi(network, geometry, vertices='throat.centroid', **kwargs):
r"""
Calculate the centroid from the... | r"""
===============================================================================
pore_centroid
===============================================================================
"""
import scipy as _sp
def voronoi(network, geometry, vertices='throat.centroid', **kwargs):
r"""
Calculate the centroid from the... | <commit_before>r"""
===============================================================================
pore_centroid
===============================================================================
"""
import scipy as _sp
def voronoi(network, geometry, vertices='throat.centroid', **kwargs):
r"""
Calculate the ce... | r"""
===============================================================================
pore_centroid
===============================================================================
"""
import scipy as _sp
def voronoi(network, geometry, vertices='throat.centroid', **kwargs):
r"""
Calculate the centroid from the... | r"""
===============================================================================
pore_centroid
===============================================================================
"""
import scipy as _sp
def voronoi(network, geometry, vertices='throat.centroid', **kwargs):
r"""
Calculate the centroid from the... | <commit_before>r"""
===============================================================================
pore_centroid
===============================================================================
"""
import scipy as _sp
def voronoi(network, geometry, vertices='throat.centroid', **kwargs):
r"""
Calculate the ce... |
4d4279cf97d6b925e687423a0681793c9ab3ef56 | runtests.py | runtests.py | #!/usr/bin/env python
from os.path import dirname, abspath
import sys
from django.conf import settings
if not settings.configured:
from django import VERSION
settings_dict = dict(
INSTALLED_APPS=(
'localeurl',
'localeurl.tests',
'django.contrib.sites', # for sitema... | #!/usr/bin/env python
from os.path import dirname, abspath
import sys
from django.conf import settings
if not settings.configured:
from django import VERSION
settings_dict = dict(
INSTALLED_APPS=(
'localeurl',
'localeurl.tests',
'django.contrib.sites', # for sitema... | Add SITE_ID to test settings since contrib.sites is in INSTALLED_APPS. | Add SITE_ID to test settings since contrib.sites is in INSTALLED_APPS.
| Python | mit | eugena/django-localeurl | #!/usr/bin/env python
from os.path import dirname, abspath
import sys
from django.conf import settings
if not settings.configured:
from django import VERSION
settings_dict = dict(
INSTALLED_APPS=(
'localeurl',
'localeurl.tests',
'django.contrib.sites', # for sitema... | #!/usr/bin/env python
from os.path import dirname, abspath
import sys
from django.conf import settings
if not settings.configured:
from django import VERSION
settings_dict = dict(
INSTALLED_APPS=(
'localeurl',
'localeurl.tests',
'django.contrib.sites', # for sitema... | <commit_before>#!/usr/bin/env python
from os.path import dirname, abspath
import sys
from django.conf import settings
if not settings.configured:
from django import VERSION
settings_dict = dict(
INSTALLED_APPS=(
'localeurl',
'localeurl.tests',
'django.contrib.sites... | #!/usr/bin/env python
from os.path import dirname, abspath
import sys
from django.conf import settings
if not settings.configured:
from django import VERSION
settings_dict = dict(
INSTALLED_APPS=(
'localeurl',
'localeurl.tests',
'django.contrib.sites', # for sitema... | #!/usr/bin/env python
from os.path import dirname, abspath
import sys
from django.conf import settings
if not settings.configured:
from django import VERSION
settings_dict = dict(
INSTALLED_APPS=(
'localeurl',
'localeurl.tests',
'django.contrib.sites', # for sitema... | <commit_before>#!/usr/bin/env python
from os.path import dirname, abspath
import sys
from django.conf import settings
if not settings.configured:
from django import VERSION
settings_dict = dict(
INSTALLED_APPS=(
'localeurl',
'localeurl.tests',
'django.contrib.sites... |
60ed71891d628989fa813f2f750e8cb9d1f19f9d | runtests.py | runtests.py | #!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS=(
... | #!/usr/bin/env python
import sys
import django
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS... | Call django.setup() for Django >= 1.7.0 | Call django.setup() for Django >= 1.7.0 | Python | bsd-3-clause | rochapps/django-secure-input,rochapps/django-secure-input,rochapps/django-secure-input | #!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS=(
... | #!/usr/bin/env python
import sys
import django
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS... | <commit_before>#!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS... | #!/usr/bin/env python
import sys
import django
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS... | #!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS=(
... | <commit_before>#!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS... |
1cccb432d0f7abc468a36a22ee5c9d3845fbd636 | runtests.py | runtests.py | #!/usr/bin/env python
import sys
import unittest
from os.path import dirname, abspath
import tests
def runtests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittest.TextTestRunner(verbosity=2).run(suite)
sys.exit()
if __name__ == '__main__':
runtests(*sys.argv[1:])... | #!/usr/bin/env python
import sys
import unittest
from os.path import dirname, abspath
import tests
def runtests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittest.TextTestRunner(verbosity=2).run(suite)
sys.exit(bool(result.failures))
if __name__ == '__main__':
ru... | Return exit code indicating failure | Return exit code indicating failure
| Python | mit | giserh/peewee,coleifer/peewee,Dipsomaniac/peewee,coreos/peewee,d1hotpep/peewee,jarrahwu/peewee,mackjoner/peewee,d1hotpep/peewee,bopo/peewee,bopo/peewee,coleifer/peewee,jarrahwu/peewee,jnovinger/peewee,wenxer/peewee,coleifer/peewee,fuzeman/peewee,fuzeman/peewee,new-xiaji/peewee,wenxer/peewee,zhang625272514/peewee,Sunzhi... | #!/usr/bin/env python
import sys
import unittest
from os.path import dirname, abspath
import tests
def runtests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittest.TextTestRunner(verbosity=2).run(suite)
sys.exit()
if __name__ == '__main__':
runtests(*sys.argv[1:])... | #!/usr/bin/env python
import sys
import unittest
from os.path import dirname, abspath
import tests
def runtests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittest.TextTestRunner(verbosity=2).run(suite)
sys.exit(bool(result.failures))
if __name__ == '__main__':
ru... | <commit_before>#!/usr/bin/env python
import sys
import unittest
from os.path import dirname, abspath
import tests
def runtests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittest.TextTestRunner(verbosity=2).run(suite)
sys.exit()
if __name__ == '__main__':
runtests... | #!/usr/bin/env python
import sys
import unittest
from os.path import dirname, abspath
import tests
def runtests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittest.TextTestRunner(verbosity=2).run(suite)
sys.exit(bool(result.failures))
if __name__ == '__main__':
ru... | #!/usr/bin/env python
import sys
import unittest
from os.path import dirname, abspath
import tests
def runtests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittest.TextTestRunner(verbosity=2).run(suite)
sys.exit()
if __name__ == '__main__':
runtests(*sys.argv[1:])... | <commit_before>#!/usr/bin/env python
import sys
import unittest
from os.path import dirname, abspath
import tests
def runtests(*test_args):
suite = unittest.TestLoader().loadTestsFromModule(tests)
result = unittest.TextTestRunner(verbosity=2).run(suite)
sys.exit()
if __name__ == '__main__':
runtests... |
7648ac7ae01ee6cde8871128e162e8a4d5322b87 | s3upload.py | s3upload.py | #!/usr/bin/python
import sys
import boto3
s3 = boto3.resource('s3')
object = s3.Bucket('ictrp-data').upload_file(sys.argv[1], sys.argv[1])
object.Acl().put(ACL='public-read')
| #!/usr/bin/python
import sys
import boto3
s3 = boto3.resource('s3')
with open(sys.argv[1], 'rb') as f:
object = s3.Bucket('ictrp-data').put_object(Key=sys.argv[1], Body=f)
object.Acl().put(ACL='public-read')
| Fix failing attempt to set ACL | Fix failing attempt to set ACL
| Python | mit | gertvv/ictrp-retrieval,gertvv/ictrp-retrieval | #!/usr/bin/python
import sys
import boto3
s3 = boto3.resource('s3')
object = s3.Bucket('ictrp-data').upload_file(sys.argv[1], sys.argv[1])
object.Acl().put(ACL='public-read')
Fix failing attempt to set ACL | #!/usr/bin/python
import sys
import boto3
s3 = boto3.resource('s3')
with open(sys.argv[1], 'rb') as f:
object = s3.Bucket('ictrp-data').put_object(Key=sys.argv[1], Body=f)
object.Acl().put(ACL='public-read')
| <commit_before>#!/usr/bin/python
import sys
import boto3
s3 = boto3.resource('s3')
object = s3.Bucket('ictrp-data').upload_file(sys.argv[1], sys.argv[1])
object.Acl().put(ACL='public-read')
<commit_msg>Fix failing attempt to set ACL<commit_after> | #!/usr/bin/python
import sys
import boto3
s3 = boto3.resource('s3')
with open(sys.argv[1], 'rb') as f:
object = s3.Bucket('ictrp-data').put_object(Key=sys.argv[1], Body=f)
object.Acl().put(ACL='public-read')
| #!/usr/bin/python
import sys
import boto3
s3 = boto3.resource('s3')
object = s3.Bucket('ictrp-data').upload_file(sys.argv[1], sys.argv[1])
object.Acl().put(ACL='public-read')
Fix failing attempt to set ACL#!/usr/bin/python
import sys
import boto3
s3 = boto3.resource('s3')
with open(sys.argv[1], 'rb') as f:
object... | <commit_before>#!/usr/bin/python
import sys
import boto3
s3 = boto3.resource('s3')
object = s3.Bucket('ictrp-data').upload_file(sys.argv[1], sys.argv[1])
object.Acl().put(ACL='public-read')
<commit_msg>Fix failing attempt to set ACL<commit_after>#!/usr/bin/python
import sys
import boto3
s3 = boto3.resource('s3')
with... |
5cbc6b6f6191d69879d9ab077b57bf2b4da04586 | sessions/__about__.py | sessions/__about__.py | # Copyright 2014 Donald Stufft
#
# 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, so... | # Copyright 2014 Donald Stufft
#
# 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, so... | Rename the library sessions instead of Sessions | Rename the library sessions instead of Sessions
| Python | apache-2.0 | dstufft/sessions | # Copyright 2014 Donald Stufft
#
# 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, so... | # Copyright 2014 Donald Stufft
#
# 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, so... | <commit_before># Copyright 2014 Donald Stufft
#
# 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... | # Copyright 2014 Donald Stufft
#
# 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, so... | # Copyright 2014 Donald Stufft
#
# 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, so... | <commit_before># Copyright 2014 Donald Stufft
#
# 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... |
80aa4574da8754db544d66167b61823de1cbf281 | source/globals/fieldtests.py | source/globals/fieldtests.py | # -*- coding: utf-8 -*-
## \package globals.fieldtests
# MIT licensing
# See: LICENSE.txt
import wx
## Tests if a wx control/instance is enabled/disabled
#
# Function for compatibility between wx versions
# \param field
# \b \e wx.Window : the wx control to check
# \param enabled
# \b \e bool : Check i... | # -*- coding: utf-8 -*-
## \package globals.fieldtests
# MIT licensing
# See: LICENSE.txt
import wx
## Tests if a wx control/instance is enabled/disabled
#
# Function for compatibility between wx versions
# \param field
# \b \e wx.Window : the wx control to check
# \param enabled
# \b \e bool : Check i... | Fix FieldsEnabled function & add 'enabled' argument | Fix FieldsEnabled function & add 'enabled' argument | Python | mit | AntumDeluge/desktop_recorder,AntumDeluge/desktop_recorder | # -*- coding: utf-8 -*-
## \package globals.fieldtests
# MIT licensing
# See: LICENSE.txt
import wx
## Tests if a wx control/instance is enabled/disabled
#
# Function for compatibility between wx versions
# \param field
# \b \e wx.Window : the wx control to check
# \param enabled
# \b \e bool : Check i... | # -*- coding: utf-8 -*-
## \package globals.fieldtests
# MIT licensing
# See: LICENSE.txt
import wx
## Tests if a wx control/instance is enabled/disabled
#
# Function for compatibility between wx versions
# \param field
# \b \e wx.Window : the wx control to check
# \param enabled
# \b \e bool : Check i... | <commit_before># -*- coding: utf-8 -*-
## \package globals.fieldtests
# MIT licensing
# See: LICENSE.txt
import wx
## Tests if a wx control/instance is enabled/disabled
#
# Function for compatibility between wx versions
# \param field
# \b \e wx.Window : the wx control to check
# \param enabled
# \b \e... | # -*- coding: utf-8 -*-
## \package globals.fieldtests
# MIT licensing
# See: LICENSE.txt
import wx
## Tests if a wx control/instance is enabled/disabled
#
# Function for compatibility between wx versions
# \param field
# \b \e wx.Window : the wx control to check
# \param enabled
# \b \e bool : Check i... | # -*- coding: utf-8 -*-
## \package globals.fieldtests
# MIT licensing
# See: LICENSE.txt
import wx
## Tests if a wx control/instance is enabled/disabled
#
# Function for compatibility between wx versions
# \param field
# \b \e wx.Window : the wx control to check
# \param enabled
# \b \e bool : Check i... | <commit_before># -*- coding: utf-8 -*-
## \package globals.fieldtests
# MIT licensing
# See: LICENSE.txt
import wx
## Tests if a wx control/instance is enabled/disabled
#
# Function for compatibility between wx versions
# \param field
# \b \e wx.Window : the wx control to check
# \param enabled
# \b \e... |
7060e3f1b1e8bda4c96cdc4b0c84ae344ac81c76 | Sketches/MPS/test/test_Selector.py | Sketches/MPS/test/test_Selector.py | #!/usr/bin/python
import unittest
import sys; sys.path.append("../")
from Selector import Selector
if __name__=="__main__":
unittest.main()
| #!/usr/bin/python
import unittest
import sys; sys.path.append("../")
from Selector import Selector
class SmokeTests_Selector(unittest.TestCase):
def test_SmokeTest(self):
"""__init__ - Called with no arguments succeeds"""
S = Selector()
self.assert_(isinstance(S, Axon.Component.component)... | Add the most basic smoke test. We make a check that the resulting object is a minimal component at least. | Add the most basic smoke test. We make a check that the resulting object is a minimal component at least.
| Python | apache-2.0 | sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia | #!/usr/bin/python
import unittest
import sys; sys.path.append("../")
from Selector import Selector
if __name__=="__main__":
unittest.main()
Add the most basic smoke test. We make a check that the resulting object is a minimal component at least. | #!/usr/bin/python
import unittest
import sys; sys.path.append("../")
from Selector import Selector
class SmokeTests_Selector(unittest.TestCase):
def test_SmokeTest(self):
"""__init__ - Called with no arguments succeeds"""
S = Selector()
self.assert_(isinstance(S, Axon.Component.component)... | <commit_before>#!/usr/bin/python
import unittest
import sys; sys.path.append("../")
from Selector import Selector
if __name__=="__main__":
unittest.main()
<commit_msg>Add the most basic smoke test. We make a check that the resulting object is a minimal component at least.<commit_after> | #!/usr/bin/python
import unittest
import sys; sys.path.append("../")
from Selector import Selector
class SmokeTests_Selector(unittest.TestCase):
def test_SmokeTest(self):
"""__init__ - Called with no arguments succeeds"""
S = Selector()
self.assert_(isinstance(S, Axon.Component.component)... | #!/usr/bin/python
import unittest
import sys; sys.path.append("../")
from Selector import Selector
if __name__=="__main__":
unittest.main()
Add the most basic smoke test. We make a check that the resulting object is a minimal component at least.#!/usr/bin/python
import unittest
import sys; sys.path.append("../... | <commit_before>#!/usr/bin/python
import unittest
import sys; sys.path.append("../")
from Selector import Selector
if __name__=="__main__":
unittest.main()
<commit_msg>Add the most basic smoke test. We make a check that the resulting object is a minimal component at least.<commit_after>#!/usr/bin/python
import u... |
2b5e33bf178cd1fdd8e320051d0c99a45d7613a1 | models/product_bundle.py | models/product_bundle.py | # -*- encoding: utf-8 -*-
from openerp import fields, models, _
import openerp.addons.decimal_precision as dp
class product_bundle(models.Model):
_name = 'product.bundle'
_description = 'Product bundle'
name = fields.Char(_('Name'), help=_('Product bundle name'), required=True)
bundle_line_ids = fie... | # -*- encoding: utf-8 -*-
from openerp import fields, models, _
import openerp.addons.decimal_precision as dp
class product_bundle(models.Model):
_name = 'product.bundle'
_description = 'Product bundle'
name = fields.Char(_('Name'), help=_('Product bundle name'), required=True)
bundle_line_ids = fie... | Use of product.template instead of product.product in bundle line | Use of product.template instead of product.product in bundle line
| Python | agpl-3.0 | akretion/sale-workflow,richard-willowit/sale-workflow,ddico/sale-workflow,Eficent/sale-workflow,anas-taji/sale-workflow,BT-cserra/sale-workflow,BT-fgarbely/sale-workflow,fevxie/sale-workflow,diagramsoftware/sale-workflow,adhoc-dev/sale-workflow,thomaspaulb/sale-workflow,kittiu/sale-workflow,factorlibre/sale-workflow,nu... | # -*- encoding: utf-8 -*-
from openerp import fields, models, _
import openerp.addons.decimal_precision as dp
class product_bundle(models.Model):
_name = 'product.bundle'
_description = 'Product bundle'
name = fields.Char(_('Name'), help=_('Product bundle name'), required=True)
bundle_line_ids = fie... | # -*- encoding: utf-8 -*-
from openerp import fields, models, _
import openerp.addons.decimal_precision as dp
class product_bundle(models.Model):
_name = 'product.bundle'
_description = 'Product bundle'
name = fields.Char(_('Name'), help=_('Product bundle name'), required=True)
bundle_line_ids = fie... | <commit_before># -*- encoding: utf-8 -*-
from openerp import fields, models, _
import openerp.addons.decimal_precision as dp
class product_bundle(models.Model):
_name = 'product.bundle'
_description = 'Product bundle'
name = fields.Char(_('Name'), help=_('Product bundle name'), required=True)
bundle... | # -*- encoding: utf-8 -*-
from openerp import fields, models, _
import openerp.addons.decimal_precision as dp
class product_bundle(models.Model):
_name = 'product.bundle'
_description = 'Product bundle'
name = fields.Char(_('Name'), help=_('Product bundle name'), required=True)
bundle_line_ids = fie... | # -*- encoding: utf-8 -*-
from openerp import fields, models, _
import openerp.addons.decimal_precision as dp
class product_bundle(models.Model):
_name = 'product.bundle'
_description = 'Product bundle'
name = fields.Char(_('Name'), help=_('Product bundle name'), required=True)
bundle_line_ids = fie... | <commit_before># -*- encoding: utf-8 -*-
from openerp import fields, models, _
import openerp.addons.decimal_precision as dp
class product_bundle(models.Model):
_name = 'product.bundle'
_description = 'Product bundle'
name = fields.Char(_('Name'), help=_('Product bundle name'), required=True)
bundle... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.