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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
968c73805e5beff502955ad3dbb8aa86ee8bc0b7 | freelancefinder/jobs/forms.py | freelancefinder/jobs/forms.py | """Forms for dealing with jobs/posts."""
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from taggit.models import Tag
class PostFilterForm(forms.Form):
"""Form for filtering the PostListView."""
title = forms.CharField(required=False)
is_job_p... | """Forms for dealing with jobs/posts."""
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from taggit.models import Tag
class PostFilterForm(forms.Form):
"""Form for filtering the PostListView."""
title = forms.CharField(required=False)
is_job_p... | Tag is not required, of course | Tag is not required, of course
| Python | bsd-3-clause | ScorpionResponse/freelancefinder,ScorpionResponse/freelancefinder,ScorpionResponse/freelancefinder | """Forms for dealing with jobs/posts."""
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from taggit.models import Tag
class PostFilterForm(forms.Form):
"""Form for filtering the PostListView."""
title = forms.CharField(required=False)
is_job_p... | """Forms for dealing with jobs/posts."""
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from taggit.models import Tag
class PostFilterForm(forms.Form):
"""Form for filtering the PostListView."""
title = forms.CharField(required=False)
is_job_p... | <commit_before>"""Forms for dealing with jobs/posts."""
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from taggit.models import Tag
class PostFilterForm(forms.Form):
"""Form for filtering the PostListView."""
title = forms.CharField(required=Fals... | """Forms for dealing with jobs/posts."""
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from taggit.models import Tag
class PostFilterForm(forms.Form):
"""Form for filtering the PostListView."""
title = forms.CharField(required=False)
is_job_p... | """Forms for dealing with jobs/posts."""
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from taggit.models import Tag
class PostFilterForm(forms.Form):
"""Form for filtering the PostListView."""
title = forms.CharField(required=False)
is_job_p... | <commit_before>"""Forms for dealing with jobs/posts."""
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from taggit.models import Tag
class PostFilterForm(forms.Form):
"""Form for filtering the PostListView."""
title = forms.CharField(required=Fals... |
99b96d2c0b82e186b9eaa13d2efe8b617c9cf3aa | registration/__init__.py | registration/__init__.py | VERSION = (0, 9, 0, 'beta', 1)
def get_version():
from django.utils.version import get_version as django_get_version
return django_get_version(VERSION) # pragma: no cover
| VERSION = (1, 0, 0, 'final', 0)
def get_version():
"Returns a PEP 386-compliant version number from VERSION."
assert len(VERSION) == 5
assert VERSION[3] in ('alpha', 'beta', 'rc', 'final')
# Now build the two parts of the version number:
# main = X.Y[.Z]
# sub = .devN - for pre-alpha releases... | Fix version number reporting so we can be installed before Django. | Fix version number reporting so we can be installed before Django.
| Python | bsd-3-clause | dinie/django-registration,dinie/django-registration,FundedByMe/django-registration,FundedByMe/django-registration,Avenza/django-registration | VERSION = (0, 9, 0, 'beta', 1)
def get_version():
from django.utils.version import get_version as django_get_version
return django_get_version(VERSION) # pragma: no cover
Fix version number reporting so we can be installed before Django. | VERSION = (1, 0, 0, 'final', 0)
def get_version():
"Returns a PEP 386-compliant version number from VERSION."
assert len(VERSION) == 5
assert VERSION[3] in ('alpha', 'beta', 'rc', 'final')
# Now build the two parts of the version number:
# main = X.Y[.Z]
# sub = .devN - for pre-alpha releases... | <commit_before>VERSION = (0, 9, 0, 'beta', 1)
def get_version():
from django.utils.version import get_version as django_get_version
return django_get_version(VERSION) # pragma: no cover
<commit_msg>Fix version number reporting so we can be installed before Django.<commit_after> | VERSION = (1, 0, 0, 'final', 0)
def get_version():
"Returns a PEP 386-compliant version number from VERSION."
assert len(VERSION) == 5
assert VERSION[3] in ('alpha', 'beta', 'rc', 'final')
# Now build the two parts of the version number:
# main = X.Y[.Z]
# sub = .devN - for pre-alpha releases... | VERSION = (0, 9, 0, 'beta', 1)
def get_version():
from django.utils.version import get_version as django_get_version
return django_get_version(VERSION) # pragma: no cover
Fix version number reporting so we can be installed before Django.VERSION = (1, 0, 0, 'final', 0)
def get_version():
"Returns a PEP 3... | <commit_before>VERSION = (0, 9, 0, 'beta', 1)
def get_version():
from django.utils.version import get_version as django_get_version
return django_get_version(VERSION) # pragma: no cover
<commit_msg>Fix version number reporting so we can be installed before Django.<commit_after>VERSION = (1, 0, 0, 'final', 0)
... |
7d88c98fcf6984b07a8b085f8272868b1c23b29e | app/status/views.py | app/status/views.py | from flask import jsonify, current_app
from . import status
from . import utils
from ..main.services.search_service import status_for_all_indexes
@status.route('/_status')
def status():
db_status = status_for_all_indexes()
if db_status['status_code'] == 200:
return jsonify(
status="ok",... | from flask import jsonify, current_app
from . import status
from . import utils
from ..main.services.search_service import status_for_all_indexes
@status.route('/_status')
def status():
db_status = status_for_all_indexes()
if db_status['status_code'] == 200:
return jsonify(
status="ok",... | Return correct message if elasticsearch fails to connect. | Return correct message if elasticsearch fails to connect.
| Python | mit | alphagov/digitalmarketplace-search-api,alphagov/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api | from flask import jsonify, current_app
from . import status
from . import utils
from ..main.services.search_service import status_for_all_indexes
@status.route('/_status')
def status():
db_status = status_for_all_indexes()
if db_status['status_code'] == 200:
return jsonify(
status="ok",... | from flask import jsonify, current_app
from . import status
from . import utils
from ..main.services.search_service import status_for_all_indexes
@status.route('/_status')
def status():
db_status = status_for_all_indexes()
if db_status['status_code'] == 200:
return jsonify(
status="ok",... | <commit_before>from flask import jsonify, current_app
from . import status
from . import utils
from ..main.services.search_service import status_for_all_indexes
@status.route('/_status')
def status():
db_status = status_for_all_indexes()
if db_status['status_code'] == 200:
return jsonify(
... | from flask import jsonify, current_app
from . import status
from . import utils
from ..main.services.search_service import status_for_all_indexes
@status.route('/_status')
def status():
db_status = status_for_all_indexes()
if db_status['status_code'] == 200:
return jsonify(
status="ok",... | from flask import jsonify, current_app
from . import status
from . import utils
from ..main.services.search_service import status_for_all_indexes
@status.route('/_status')
def status():
db_status = status_for_all_indexes()
if db_status['status_code'] == 200:
return jsonify(
status="ok",... | <commit_before>from flask import jsonify, current_app
from . import status
from . import utils
from ..main.services.search_service import status_for_all_indexes
@status.route('/_status')
def status():
db_status = status_for_all_indexes()
if db_status['status_code'] == 200:
return jsonify(
... |
155476e8feb584fb802b2aed4266aec32d617f2a | app/status/views.py | app/status/views.py | from flask import jsonify, current_app
from . import status
from . import utils
from .. import api_client
@status.route('/_status')
def status():
api_response = utils.return_response_from_api_status_call(
api_client.status
)
apis_wot_got_errors = []
if api_response is None or api_response.... | from flask import jsonify, current_app
from . import status
from . import utils
from .. import api_client
@status.route('/_status')
def status():
api_response = utils.return_response_from_api_status_call(
api_client.status
)
apis_with_errors = []
if api_response is None or api_response.sta... | Change variable name & int comparison. | Change variable name & int comparison.
| Python | mit | alphagov/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,alphag... | from flask import jsonify, current_app
from . import status
from . import utils
from .. import api_client
@status.route('/_status')
def status():
api_response = utils.return_response_from_api_status_call(
api_client.status
)
apis_wot_got_errors = []
if api_response is None or api_response.... | from flask import jsonify, current_app
from . import status
from . import utils
from .. import api_client
@status.route('/_status')
def status():
api_response = utils.return_response_from_api_status_call(
api_client.status
)
apis_with_errors = []
if api_response is None or api_response.sta... | <commit_before>from flask import jsonify, current_app
from . import status
from . import utils
from .. import api_client
@status.route('/_status')
def status():
api_response = utils.return_response_from_api_status_call(
api_client.status
)
apis_wot_got_errors = []
if api_response is None o... | from flask import jsonify, current_app
from . import status
from . import utils
from .. import api_client
@status.route('/_status')
def status():
api_response = utils.return_response_from_api_status_call(
api_client.status
)
apis_with_errors = []
if api_response is None or api_response.sta... | from flask import jsonify, current_app
from . import status
from . import utils
from .. import api_client
@status.route('/_status')
def status():
api_response = utils.return_response_from_api_status_call(
api_client.status
)
apis_wot_got_errors = []
if api_response is None or api_response.... | <commit_before>from flask import jsonify, current_app
from . import status
from . import utils
from .. import api_client
@status.route('/_status')
def status():
api_response = utils.return_response_from_api_status_call(
api_client.status
)
apis_wot_got_errors = []
if api_response is None o... |
829cccc630c26f2e9d89007c669308c6b1bb63cf | frigg/worker/fetcher.py | frigg/worker/fetcher.py | # -*- coding: utf8 -*-
import json
import threading
import time
import logging
from frigg.worker import config
from frigg.worker.jobs import Build
logger = logging.getLogger(__name__)
def fetcher():
redis = config.redis_client()
while redis:
task = redis.rpop('frigg:queue')
if task:
... | # -*- coding: utf8 -*-
import json
import threading
import time
import logging
from frigg.worker import config
from frigg.worker.jobs import Build
logger = logging.getLogger(__name__)
def fetcher():
redis = config.redis_client()
while redis:
task = redis.rpop('frigg:queue')
if task:
... | Add deletion of result after build | Add deletion of result after build
| Python | mit | frigg/frigg-worker | # -*- coding: utf8 -*-
import json
import threading
import time
import logging
from frigg.worker import config
from frigg.worker.jobs import Build
logger = logging.getLogger(__name__)
def fetcher():
redis = config.redis_client()
while redis:
task = redis.rpop('frigg:queue')
if task:
... | # -*- coding: utf8 -*-
import json
import threading
import time
import logging
from frigg.worker import config
from frigg.worker.jobs import Build
logger = logging.getLogger(__name__)
def fetcher():
redis = config.redis_client()
while redis:
task = redis.rpop('frigg:queue')
if task:
... | <commit_before># -*- coding: utf8 -*-
import json
import threading
import time
import logging
from frigg.worker import config
from frigg.worker.jobs import Build
logger = logging.getLogger(__name__)
def fetcher():
redis = config.redis_client()
while redis:
task = redis.rpop('frigg:queue')
if... | # -*- coding: utf8 -*-
import json
import threading
import time
import logging
from frigg.worker import config
from frigg.worker.jobs import Build
logger = logging.getLogger(__name__)
def fetcher():
redis = config.redis_client()
while redis:
task = redis.rpop('frigg:queue')
if task:
... | # -*- coding: utf8 -*-
import json
import threading
import time
import logging
from frigg.worker import config
from frigg.worker.jobs import Build
logger = logging.getLogger(__name__)
def fetcher():
redis = config.redis_client()
while redis:
task = redis.rpop('frigg:queue')
if task:
... | <commit_before># -*- coding: utf8 -*-
import json
import threading
import time
import logging
from frigg.worker import config
from frigg.worker.jobs import Build
logger = logging.getLogger(__name__)
def fetcher():
redis = config.redis_client()
while redis:
task = redis.rpop('frigg:queue')
if... |
cce8c4b40038a8b8ddccc76f7d13c7f5d0e5e566 | txircd/modules/rfc/cmd_links.py | txircd/modules/rfc/cmd_links.py | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class LinksCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "LinksCommand"
core = True
d... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class LinksCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "LinksCommand"
core = True
d... | Make the order of LINKS output consistent | Make the order of LINKS output consistent
| Python | bsd-3-clause | ElementalAlchemist/txircd,Heufneutje/txircd | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class LinksCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "LinksCommand"
core = True
d... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class LinksCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "LinksCommand"
core = True
d... | <commit_before>from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class LinksCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "LinksCommand"
c... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class LinksCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "LinksCommand"
core = True
d... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class LinksCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "LinksCommand"
core = True
d... | <commit_before>from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class LinksCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "LinksCommand"
c... |
f0e11b0743c2779f61970917da6eef859149f600 | taar/recommenders/utils.py | taar/recommenders/utils.py | import json
import os
from tempfile import gettempdir
import boto3
from botocore.exceptions import ClientError
import requests
def fetch_json(uri):
""" Perform an HTTP GET on the given uri, return the results as json.
Args:
uri: the string URI to fetch.
Returns:
A JSON object with the r... | import json
import os
from tempfile import gettempdir
import boto3
from botocore.exceptions import ClientError
import requests
def fetch_json(uri):
""" Perform an HTTP GET on the given uri, return the results as json.
Args:
uri: the string URI to fetch.
Returns:
A JSON object with the r... | Make sure to load the S3 cache file when available | Make sure to load the S3 cache file when available
| Python | mpl-2.0 | maurodoglio/taar | import json
import os
from tempfile import gettempdir
import boto3
from botocore.exceptions import ClientError
import requests
def fetch_json(uri):
""" Perform an HTTP GET on the given uri, return the results as json.
Args:
uri: the string URI to fetch.
Returns:
A JSON object with the r... | import json
import os
from tempfile import gettempdir
import boto3
from botocore.exceptions import ClientError
import requests
def fetch_json(uri):
""" Perform an HTTP GET on the given uri, return the results as json.
Args:
uri: the string URI to fetch.
Returns:
A JSON object with the r... | <commit_before>import json
import os
from tempfile import gettempdir
import boto3
from botocore.exceptions import ClientError
import requests
def fetch_json(uri):
""" Perform an HTTP GET on the given uri, return the results as json.
Args:
uri: the string URI to fetch.
Returns:
A JSON ob... | import json
import os
from tempfile import gettempdir
import boto3
from botocore.exceptions import ClientError
import requests
def fetch_json(uri):
""" Perform an HTTP GET on the given uri, return the results as json.
Args:
uri: the string URI to fetch.
Returns:
A JSON object with the r... | import json
import os
from tempfile import gettempdir
import boto3
from botocore.exceptions import ClientError
import requests
def fetch_json(uri):
""" Perform an HTTP GET on the given uri, return the results as json.
Args:
uri: the string URI to fetch.
Returns:
A JSON object with the r... | <commit_before>import json
import os
from tempfile import gettempdir
import boto3
from botocore.exceptions import ClientError
import requests
def fetch_json(uri):
""" Perform an HTTP GET on the given uri, return the results as json.
Args:
uri: the string URI to fetch.
Returns:
A JSON ob... |
60c62cea5d0775ce443280c0973ce323d26eaa28 | app/main/errors.py | app/main/errors.py | # coding=utf-8
from flask import render_template
from . import main
from dmapiclient import APIError
@main.app_errorhandler(APIError)
def api_error_handler(e):
return _render_error_page(e.status_code)
@main.app_errorhandler(404)
def page_not_found(e):
return _render_error_page(404)
@main.app_errorhandler... | # coding=utf-8
from flask import render_template
from . import main
from ..api_client.error import APIError
@main.app_errorhandler(APIError)
def api_error_handler(e):
return _render_error_page(e.status_code)
@main.app_errorhandler(404)
def page_not_found(e):
return _render_error_page(404)
@main.app_error... | Change app-level error handler to use api_client.error exceptions | Change app-level error handler to use api_client.error exceptions
| Python | mit | AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend | # coding=utf-8
from flask import render_template
from . import main
from dmapiclient import APIError
@main.app_errorhandler(APIError)
def api_error_handler(e):
return _render_error_page(e.status_code)
@main.app_errorhandler(404)
def page_not_found(e):
return _render_error_page(404)
@main.app_errorhandler... | # coding=utf-8
from flask import render_template
from . import main
from ..api_client.error import APIError
@main.app_errorhandler(APIError)
def api_error_handler(e):
return _render_error_page(e.status_code)
@main.app_errorhandler(404)
def page_not_found(e):
return _render_error_page(404)
@main.app_error... | <commit_before># coding=utf-8
from flask import render_template
from . import main
from dmapiclient import APIError
@main.app_errorhandler(APIError)
def api_error_handler(e):
return _render_error_page(e.status_code)
@main.app_errorhandler(404)
def page_not_found(e):
return _render_error_page(404)
@main.a... | # coding=utf-8
from flask import render_template
from . import main
from ..api_client.error import APIError
@main.app_errorhandler(APIError)
def api_error_handler(e):
return _render_error_page(e.status_code)
@main.app_errorhandler(404)
def page_not_found(e):
return _render_error_page(404)
@main.app_error... | # coding=utf-8
from flask import render_template
from . import main
from dmapiclient import APIError
@main.app_errorhandler(APIError)
def api_error_handler(e):
return _render_error_page(e.status_code)
@main.app_errorhandler(404)
def page_not_found(e):
return _render_error_page(404)
@main.app_errorhandler... | <commit_before># coding=utf-8
from flask import render_template
from . import main
from dmapiclient import APIError
@main.app_errorhandler(APIError)
def api_error_handler(e):
return _render_error_page(e.status_code)
@main.app_errorhandler(404)
def page_not_found(e):
return _render_error_page(404)
@main.a... |
0b2cf0a651d27af90a229d85f77ac9ebd2502905 | run_test_BMI_ku_model.py | run_test_BMI_ku_model.py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 10 10:56:16 2017
@author: kangwang
"""
import os
import sys
from permamodel.components import bmi_Ku_component
from permamodel.tests import examples_directory
cfg_file = os.path.join(examples_directory, 'Ku_method.cfg')
x = bmi_Ku_component.BmiKu... | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 10 10:56:16 2017
@author: kangwang
"""
import os
import sys
from permamodel.components import bmi_Ku_component
from permamodel.tests import examples_directory
cfg_file = os.path.join(examples_directory, 'Ku_method.cfg')
x = bmi_Ku_component.BmiKu... | Use BMI method to get ALT value | Use BMI method to get ALT value
It looks like it may not give the correct answer, though.
| Python | mit | permamodel/permamodel,permamodel/permamodel | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 10 10:56:16 2017
@author: kangwang
"""
import os
import sys
from permamodel.components import bmi_Ku_component
from permamodel.tests import examples_directory
cfg_file = os.path.join(examples_directory, 'Ku_method.cfg')
x = bmi_Ku_component.BmiKu... | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 10 10:56:16 2017
@author: kangwang
"""
import os
import sys
from permamodel.components import bmi_Ku_component
from permamodel.tests import examples_directory
cfg_file = os.path.join(examples_directory, 'Ku_method.cfg')
x = bmi_Ku_component.BmiKu... | <commit_before>#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 10 10:56:16 2017
@author: kangwang
"""
import os
import sys
from permamodel.components import bmi_Ku_component
from permamodel.tests import examples_directory
cfg_file = os.path.join(examples_directory, 'Ku_method.cfg')
x = bmi_Ku_... | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 10 10:56:16 2017
@author: kangwang
"""
import os
import sys
from permamodel.components import bmi_Ku_component
from permamodel.tests import examples_directory
cfg_file = os.path.join(examples_directory, 'Ku_method.cfg')
x = bmi_Ku_component.BmiKu... | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 10 10:56:16 2017
@author: kangwang
"""
import os
import sys
from permamodel.components import bmi_Ku_component
from permamodel.tests import examples_directory
cfg_file = os.path.join(examples_directory, 'Ku_method.cfg')
x = bmi_Ku_component.BmiKu... | <commit_before>#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 10 10:56:16 2017
@author: kangwang
"""
import os
import sys
from permamodel.components import bmi_Ku_component
from permamodel.tests import examples_directory
cfg_file = os.path.join(examples_directory, 'Ku_method.cfg')
x = bmi_Ku_... |
7f4876b1b220b8c3c26ce1490a76adf9721da4da | sample/pandas-example.py | sample/pandas-example.py | #!/usr/bin/env python
import pandas as pd
import numpy as np
import gtabview
c_arr = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]
columns = pd.MultiIndex.from_tuples(list(zip(*c_arr)), names=['V1', 'V2'])
i_arr = [['bar', 'bar', 'bar', ... | #!/usr/bin/env python3
import pandas as pd
import numpy as np
import gtabview
c_arr = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]
columns = pd.MultiIndex.from_tuples(list(zip(*c_arr)), names=['V1', 'V2'])
i_arr = [['bar', 'bar', 'bar',... | Make python3 default also for the samples | Make python3 default also for the samples
| Python | mit | wavexx/gtabview | #!/usr/bin/env python
import pandas as pd
import numpy as np
import gtabview
c_arr = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]
columns = pd.MultiIndex.from_tuples(list(zip(*c_arr)), names=['V1', 'V2'])
i_arr = [['bar', 'bar', 'bar', ... | #!/usr/bin/env python3
import pandas as pd
import numpy as np
import gtabview
c_arr = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]
columns = pd.MultiIndex.from_tuples(list(zip(*c_arr)), names=['V1', 'V2'])
i_arr = [['bar', 'bar', 'bar',... | <commit_before>#!/usr/bin/env python
import pandas as pd
import numpy as np
import gtabview
c_arr = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]
columns = pd.MultiIndex.from_tuples(list(zip(*c_arr)), names=['V1', 'V2'])
i_arr = [['bar',... | #!/usr/bin/env python3
import pandas as pd
import numpy as np
import gtabview
c_arr = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]
columns = pd.MultiIndex.from_tuples(list(zip(*c_arr)), names=['V1', 'V2'])
i_arr = [['bar', 'bar', 'bar',... | #!/usr/bin/env python
import pandas as pd
import numpy as np
import gtabview
c_arr = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]
columns = pd.MultiIndex.from_tuples(list(zip(*c_arr)), names=['V1', 'V2'])
i_arr = [['bar', 'bar', 'bar', ... | <commit_before>#!/usr/bin/env python
import pandas as pd
import numpy as np
import gtabview
c_arr = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]
columns = pd.MultiIndex.from_tuples(list(zip(*c_arr)), names=['V1', 'V2'])
i_arr = [['bar',... |
c21318fa5c125e54160f67d410cf4572a2f9a47e | addons/web_calendar/contacts.py | addons/web_calendar/contacts.py | from openerp.osv import fields, osv
class web_calendar_contacts(osv.osv):
_name = 'web_calendar.contacts'
_columns = {
'user_id': fields.many2one('res.users','Me'),
'partner_id': fields.many2one('res.partner','Contact'),
'active':fields.boolean('active'),
}
_defaul... | from openerp.osv import fields, osv
class web_calendar_contacts(osv.osv):
_name = 'web_calendar.contacts'
_columns = {
'user_id': fields.many2one('res.users','Me'),
'partner_id': fields.many2one('res.partner','Contact',required=True),
'active':fields.boolean('active'),
... | Add required on field res.partner from model Contacts to avoid the creation of empty coworkers | [FIX] Add required on field res.partner from model Contacts to avoid the creation of empty coworkers
| Python | agpl-3.0 | havt/openerp-web,havt/openerp-web,havt/openerp-web,havt/openerp-web,havt/openerp-web | from openerp.osv import fields, osv
class web_calendar_contacts(osv.osv):
_name = 'web_calendar.contacts'
_columns = {
'user_id': fields.many2one('res.users','Me'),
'partner_id': fields.many2one('res.partner','Contact'),
'active':fields.boolean('active'),
}
_defaul... | from openerp.osv import fields, osv
class web_calendar_contacts(osv.osv):
_name = 'web_calendar.contacts'
_columns = {
'user_id': fields.many2one('res.users','Me'),
'partner_id': fields.many2one('res.partner','Contact',required=True),
'active':fields.boolean('active'),
... | <commit_before>from openerp.osv import fields, osv
class web_calendar_contacts(osv.osv):
_name = 'web_calendar.contacts'
_columns = {
'user_id': fields.many2one('res.users','Me'),
'partner_id': fields.many2one('res.partner','Contact'),
'active':fields.boolean('active'),
... | from openerp.osv import fields, osv
class web_calendar_contacts(osv.osv):
_name = 'web_calendar.contacts'
_columns = {
'user_id': fields.many2one('res.users','Me'),
'partner_id': fields.many2one('res.partner','Contact',required=True),
'active':fields.boolean('active'),
... | from openerp.osv import fields, osv
class web_calendar_contacts(osv.osv):
_name = 'web_calendar.contacts'
_columns = {
'user_id': fields.many2one('res.users','Me'),
'partner_id': fields.many2one('res.partner','Contact'),
'active':fields.boolean('active'),
}
_defaul... | <commit_before>from openerp.osv import fields, osv
class web_calendar_contacts(osv.osv):
_name = 'web_calendar.contacts'
_columns = {
'user_id': fields.many2one('res.users','Me'),
'partner_id': fields.many2one('res.partner','Contact'),
'active':fields.boolean('active'),
... |
31986c4c7d5781f0924289308d99754c81d29710 | pml/units.py | pml/units.py | import numpy as np
from scipy.interpolate import PchipInterpolator
class UcPoly(object):
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - phy... | import numpy as np
from scipy.interpolate import PchipInterpolator
class UcPoly(object):
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - phy... | Raise error when creating PChip object with not monotonely increasing y list | Raise error when creating PChip object with not monotonely increasing y list
| Python | apache-2.0 | willrogers/pml,willrogers/pml | import numpy as np
from scipy.interpolate import PchipInterpolator
class UcPoly(object):
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - phy... | import numpy as np
from scipy.interpolate import PchipInterpolator
class UcPoly(object):
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - phy... | <commit_before>import numpy as np
from scipy.interpolate import PchipInterpolator
class UcPoly(object):
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots ... | import numpy as np
from scipy.interpolate import PchipInterpolator
class UcPoly(object):
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - phy... | import numpy as np
from scipy.interpolate import PchipInterpolator
class UcPoly(object):
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots = (self.p - phy... | <commit_before>import numpy as np
from scipy.interpolate import PchipInterpolator
class UcPoly(object):
def __init__(self, coef):
self.p = np.poly1d(coef)
def machine_to_physics(self, machine_value):
return self.p(machine_value)
def physics_to_machine(self, physics_value):
roots ... |
95d2036aab2e3d154f4f292ef8624d6d02d48ac0 | cleanpyc.py | cleanpyc.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'xilei'
import os
from os.path import join
import stat
def chmod(targetdir):
"""
remove *.pyc files
"""
for root, dirs, files in os.walk(targetdir):
for file in files:
prefix,ext = os.path.splitext(file)
if e... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'xilei'
import os
from os.path import join
import stat
def rmpyc(targetdir):
"""
remove *.pyc files
"""
for root, dirs, files in os.walk(targetdir):
for file in files:
prefix,ext = os.path.splitext(file)
if e... | Change function name chmod to rmpyc | Change function name chmod to rmpyc
| Python | apache-2.0 | xiilei/pytools,xiilei/pytools | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'xilei'
import os
from os.path import join
import stat
def chmod(targetdir):
"""
remove *.pyc files
"""
for root, dirs, files in os.walk(targetdir):
for file in files:
prefix,ext = os.path.splitext(file)
if e... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'xilei'
import os
from os.path import join
import stat
def rmpyc(targetdir):
"""
remove *.pyc files
"""
for root, dirs, files in os.walk(targetdir):
for file in files:
prefix,ext = os.path.splitext(file)
if e... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'xilei'
import os
from os.path import join
import stat
def chmod(targetdir):
"""
remove *.pyc files
"""
for root, dirs, files in os.walk(targetdir):
for file in files:
prefix,ext = os.path.splitext(file)
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'xilei'
import os
from os.path import join
import stat
def rmpyc(targetdir):
"""
remove *.pyc files
"""
for root, dirs, files in os.walk(targetdir):
for file in files:
prefix,ext = os.path.splitext(file)
if e... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'xilei'
import os
from os.path import join
import stat
def chmod(targetdir):
"""
remove *.pyc files
"""
for root, dirs, files in os.walk(targetdir):
for file in files:
prefix,ext = os.path.splitext(file)
if e... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'xilei'
import os
from os.path import join
import stat
def chmod(targetdir):
"""
remove *.pyc files
"""
for root, dirs, files in os.walk(targetdir):
for file in files:
prefix,ext = os.path.splitext(file)
... |
92d7058347da755ff90621c56b36959521dfc99a | scripts/commandsocket.py | scripts/commandsocket.py | import RPi.GPIO as GPIO
import time
from socketIO_client import SocketIO, LoggingNamespace
socketIO = SocketIO('localhost:3000')
def onCommand(*args):
print("hello")
while (True):
socketIO.on("commands", onCommand)
socketIO.wait(seconds=1)
socketIO.off("sequencePi") | import RPi.GPIO as GPIO
import time
from socketIO_client import SocketIO, LoggingNamespace
socketIO = SocketIO('localhost:3000')
def onCommand(*args):
print(args)
while (True):
socketIO.on("commands", onCommand)
socketIO.wait(seconds=1)
socketIO.off("sequencePi") | Make sockets print actual output | Make sockets print actual output
Make sockets print actual output
| Python | mit | willdavidc/piel,willdavidc/piel,willdavidc/piel,willdavidc/piel,willdavidc/piel | import RPi.GPIO as GPIO
import time
from socketIO_client import SocketIO, LoggingNamespace
socketIO = SocketIO('localhost:3000')
def onCommand(*args):
print("hello")
while (True):
socketIO.on("commands", onCommand)
socketIO.wait(seconds=1)
socketIO.off("sequencePi")Make sockets print actual output
M... | import RPi.GPIO as GPIO
import time
from socketIO_client import SocketIO, LoggingNamespace
socketIO = SocketIO('localhost:3000')
def onCommand(*args):
print(args)
while (True):
socketIO.on("commands", onCommand)
socketIO.wait(seconds=1)
socketIO.off("sequencePi") | <commit_before>import RPi.GPIO as GPIO
import time
from socketIO_client import SocketIO, LoggingNamespace
socketIO = SocketIO('localhost:3000')
def onCommand(*args):
print("hello")
while (True):
socketIO.on("commands", onCommand)
socketIO.wait(seconds=1)
socketIO.off("sequencePi")<commit_msg>Make soc... | import RPi.GPIO as GPIO
import time
from socketIO_client import SocketIO, LoggingNamespace
socketIO = SocketIO('localhost:3000')
def onCommand(*args):
print(args)
while (True):
socketIO.on("commands", onCommand)
socketIO.wait(seconds=1)
socketIO.off("sequencePi") | import RPi.GPIO as GPIO
import time
from socketIO_client import SocketIO, LoggingNamespace
socketIO = SocketIO('localhost:3000')
def onCommand(*args):
print("hello")
while (True):
socketIO.on("commands", onCommand)
socketIO.wait(seconds=1)
socketIO.off("sequencePi")Make sockets print actual output
M... | <commit_before>import RPi.GPIO as GPIO
import time
from socketIO_client import SocketIO, LoggingNamespace
socketIO = SocketIO('localhost:3000')
def onCommand(*args):
print("hello")
while (True):
socketIO.on("commands", onCommand)
socketIO.wait(seconds=1)
socketIO.off("sequencePi")<commit_msg>Make soc... |
3a44dbeec871aa057c4d5b42c9089a8d2b649063 | django_agpl/urls.py | django_agpl/urls.py | # -*- coding: utf-8 -*-
#
# django-agpl -- tools to aid releasing Django projects under the AGPL
# Copyright (C) 2008, 2009, 2016 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by t... | # -*- coding: utf-8 -*-
#
# django-agpl -- tools to aid releasing Django projects under the AGPL
# Copyright (C) 2008, 2009, 2016 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by t... | Drop patterns import for Django 1.0 compatibility. | Drop patterns import for Django 1.0 compatibility.
| Python | agpl-3.0 | lamby/django-agpl,lamby/django-agpl | # -*- coding: utf-8 -*-
#
# django-agpl -- tools to aid releasing Django projects under the AGPL
# Copyright (C) 2008, 2009, 2016 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by t... | # -*- coding: utf-8 -*-
#
# django-agpl -- tools to aid releasing Django projects under the AGPL
# Copyright (C) 2008, 2009, 2016 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by t... | <commit_before># -*- coding: utf-8 -*-
#
# django-agpl -- tools to aid releasing Django projects under the AGPL
# Copyright (C) 2008, 2009, 2016 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
#... | # -*- coding: utf-8 -*-
#
# django-agpl -- tools to aid releasing Django projects under the AGPL
# Copyright (C) 2008, 2009, 2016 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by t... | # -*- coding: utf-8 -*-
#
# django-agpl -- tools to aid releasing Django projects under the AGPL
# Copyright (C) 2008, 2009, 2016 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by t... | <commit_before># -*- coding: utf-8 -*-
#
# django-agpl -- tools to aid releasing Django projects under the AGPL
# Copyright (C) 2008, 2009, 2016 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
#... |
99d1357c379b2df5219891da7f64e4584060f069 | app/celery/reporting_tasks.py | app/celery/reporting_tasks.py | from datetime import datetime, timedelta
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from app import notify_celery
from app.dao.fact_billing_dao import (
fetch_billing_data_for_day,
update_fact_billing
)
@notify_celery.task(name="create-nightly-billing")
@statsd(na... | from datetime import datetime, timedelta
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from app import notify_celery
from app.dao.fact_billing_dao import (
fetch_billing_data_for_day,
update_fact_billing
)
@notify_celery.task(name="create-nightly-billing")
@statsd(na... | Fix the logging message in the nightly task | Fix the logging message in the nightly task
| Python | mit | alphagov/notifications-api,alphagov/notifications-api | from datetime import datetime, timedelta
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from app import notify_celery
from app.dao.fact_billing_dao import (
fetch_billing_data_for_day,
update_fact_billing
)
@notify_celery.task(name="create-nightly-billing")
@statsd(na... | from datetime import datetime, timedelta
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from app import notify_celery
from app.dao.fact_billing_dao import (
fetch_billing_data_for_day,
update_fact_billing
)
@notify_celery.task(name="create-nightly-billing")
@statsd(na... | <commit_before>from datetime import datetime, timedelta
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from app import notify_celery
from app.dao.fact_billing_dao import (
fetch_billing_data_for_day,
update_fact_billing
)
@notify_celery.task(name="create-nightly-billi... | from datetime import datetime, timedelta
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from app import notify_celery
from app.dao.fact_billing_dao import (
fetch_billing_data_for_day,
update_fact_billing
)
@notify_celery.task(name="create-nightly-billing")
@statsd(na... | from datetime import datetime, timedelta
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from app import notify_celery
from app.dao.fact_billing_dao import (
fetch_billing_data_for_day,
update_fact_billing
)
@notify_celery.task(name="create-nightly-billing")
@statsd(na... | <commit_before>from datetime import datetime, timedelta
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from app import notify_celery
from app.dao.fact_billing_dao import (
fetch_billing_data_for_day,
update_fact_billing
)
@notify_celery.task(name="create-nightly-billi... |
987c54559cb52370fc459a30cdbdfd0e38c5ef62 | plata/context_processors.py | plata/context_processors.py | import plata
def plata_context(request):
"""
Adds a few variables from Plata to the context if they are available:
* ``plata.shop``: The current :class:`plata.shop.views.Shop` instance
* ``plata.order``: The current order
* ``plata.contact``: The current contact instance
"""
shop = plata.... | import plata
def plata_context(request):
"""
Adds a few variables from Plata to the context if they are available:
* ``plata.shop``: The current :class:`plata.shop.views.Shop` instance
* ``plata.order``: The current order
* ``plata.contact``: The current contact instance
* ``plata.price_includ... | Add the variable `plata.price_includes_tax` to the template context | Add the variable `plata.price_includes_tax` to the template context
| Python | bsd-3-clause | armicron/plata,armicron/plata,stefanklug/plata,armicron/plata | import plata
def plata_context(request):
"""
Adds a few variables from Plata to the context if they are available:
* ``plata.shop``: The current :class:`plata.shop.views.Shop` instance
* ``plata.order``: The current order
* ``plata.contact``: The current contact instance
"""
shop = plata.... | import plata
def plata_context(request):
"""
Adds a few variables from Plata to the context if they are available:
* ``plata.shop``: The current :class:`plata.shop.views.Shop` instance
* ``plata.order``: The current order
* ``plata.contact``: The current contact instance
* ``plata.price_includ... | <commit_before>import plata
def plata_context(request):
"""
Adds a few variables from Plata to the context if they are available:
* ``plata.shop``: The current :class:`plata.shop.views.Shop` instance
* ``plata.order``: The current order
* ``plata.contact``: The current contact instance
"""
... | import plata
def plata_context(request):
"""
Adds a few variables from Plata to the context if they are available:
* ``plata.shop``: The current :class:`plata.shop.views.Shop` instance
* ``plata.order``: The current order
* ``plata.contact``: The current contact instance
* ``plata.price_includ... | import plata
def plata_context(request):
"""
Adds a few variables from Plata to the context if they are available:
* ``plata.shop``: The current :class:`plata.shop.views.Shop` instance
* ``plata.order``: The current order
* ``plata.contact``: The current contact instance
"""
shop = plata.... | <commit_before>import plata
def plata_context(request):
"""
Adds a few variables from Plata to the context if they are available:
* ``plata.shop``: The current :class:`plata.shop.views.Shop` instance
* ``plata.order``: The current order
* ``plata.contact``: The current contact instance
"""
... |
ae4b4fe5fb5c5774720dd3a14549aa88bde91043 | tests/Epsilon_tests/ImportTest.py | tests/Epsilon_tests/ImportTest.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy import EPS
from grammpy import EPSILON
class ImportTest(TestCase):
def test_idSame(self):
self.assertEqual(id(EPS),id(EPSILON)... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy import EPS
from grammpy import EPSILON
class ImportTest(TestCase):
def test_idSame(self):
self.assertEqual(id(EPS), id(EPSILON))... | Add tests to compare epsilon with another objects | Add tests to compare epsilon with another objects
| Python | mit | PatrikValkovic/grammpy | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy import EPS
from grammpy import EPSILON
class ImportTest(TestCase):
def test_idSame(self):
self.assertEqual(id(EPS),id(EPSILON)... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy import EPS
from grammpy import EPSILON
class ImportTest(TestCase):
def test_idSame(self):
self.assertEqual(id(EPS), id(EPSILON))... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy import EPS
from grammpy import EPSILON
class ImportTest(TestCase):
def test_idSame(self):
self.assertEqual(id(E... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy import EPS
from grammpy import EPSILON
class ImportTest(TestCase):
def test_idSame(self):
self.assertEqual(id(EPS), id(EPSILON))... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy import EPS
from grammpy import EPSILON
class ImportTest(TestCase):
def test_idSame(self):
self.assertEqual(id(EPS),id(EPSILON)... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase, main
from grammpy import EPS
from grammpy import EPSILON
class ImportTest(TestCase):
def test_idSame(self):
self.assertEqual(id(E... |
86692e6fbbbc6a8db9e4c323eb0688865b81f717 | slot/main.py | slot/main.py | import logging
from flask import Flask
from flask_cache import Cache
from flask_login import LoginManager
# Set up logging
log = logging.getLogger('slot')
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
log.addHandler(ch)
app = Flask(__name__)
app.config.from_object('config')
cach... | import logging
from flask import Flask
from flask_cache import Cache
from flask_login import LoginManager
from flask_sslify import SSLify
# Set up logging
log = logging.getLogger('slot')
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
log.addHandler(ch)
app = Flask(__name__)
app.c... | Add SSLify to force SSL | Add SSLify to force SSL
| Python | mit | nhshd-slot/SLOT,nhshd-slot/SLOT,nhshd-slot/SLOT | import logging
from flask import Flask
from flask_cache import Cache
from flask_login import LoginManager
# Set up logging
log = logging.getLogger('slot')
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
log.addHandler(ch)
app = Flask(__name__)
app.config.from_object('config')
cach... | import logging
from flask import Flask
from flask_cache import Cache
from flask_login import LoginManager
from flask_sslify import SSLify
# Set up logging
log = logging.getLogger('slot')
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
log.addHandler(ch)
app = Flask(__name__)
app.c... | <commit_before>import logging
from flask import Flask
from flask_cache import Cache
from flask_login import LoginManager
# Set up logging
log = logging.getLogger('slot')
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
log.addHandler(ch)
app = Flask(__name__)
app.config.from_object... | import logging
from flask import Flask
from flask_cache import Cache
from flask_login import LoginManager
from flask_sslify import SSLify
# Set up logging
log = logging.getLogger('slot')
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
log.addHandler(ch)
app = Flask(__name__)
app.c... | import logging
from flask import Flask
from flask_cache import Cache
from flask_login import LoginManager
# Set up logging
log = logging.getLogger('slot')
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
log.addHandler(ch)
app = Flask(__name__)
app.config.from_object('config')
cach... | <commit_before>import logging
from flask import Flask
from flask_cache import Cache
from flask_login import LoginManager
# Set up logging
log = logging.getLogger('slot')
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
log.addHandler(ch)
app = Flask(__name__)
app.config.from_object... |
6f8ef313bcf90b7e96d05186eb606ff53d0cea90 | buchner/settings.py | buchner/settings.py | import os
from buchner.helpers import truthiness
def abspath(path):
return os.path.abspath(os.path.relpath(path, os.path.dirname(__file__)))
DEBUG = truthiness(os.environ.get('DEBUG', False))
DATABASE_URL = os.environ.get('DATABASE_URL', 'sqlite:///buchner_app.db')
BLUEPRINTS = []
# Flask-Funnel
JAVA_BIN = os... | import os
from buchner.helpers import truthiness
def abspath(path):
return os.path.abspath(os.path.relpath(path, os.path.dirname(__file__)))
DEBUG = truthiness(os.environ.get('DEBUG', False))
DATABASE_URL = os.environ.get('DATABASE_URL', 'sqlite:///buchner_app.db')
INSTALLED_APPS = []
# Flask-Funnel
JAVA_BIN ... | Remove last trace of BLUEPRINTS | Remove last trace of BLUEPRINTS
| Python | bsd-3-clause | rehandalal/buchner | import os
from buchner.helpers import truthiness
def abspath(path):
return os.path.abspath(os.path.relpath(path, os.path.dirname(__file__)))
DEBUG = truthiness(os.environ.get('DEBUG', False))
DATABASE_URL = os.environ.get('DATABASE_URL', 'sqlite:///buchner_app.db')
BLUEPRINTS = []
# Flask-Funnel
JAVA_BIN = os... | import os
from buchner.helpers import truthiness
def abspath(path):
return os.path.abspath(os.path.relpath(path, os.path.dirname(__file__)))
DEBUG = truthiness(os.environ.get('DEBUG', False))
DATABASE_URL = os.environ.get('DATABASE_URL', 'sqlite:///buchner_app.db')
INSTALLED_APPS = []
# Flask-Funnel
JAVA_BIN ... | <commit_before>import os
from buchner.helpers import truthiness
def abspath(path):
return os.path.abspath(os.path.relpath(path, os.path.dirname(__file__)))
DEBUG = truthiness(os.environ.get('DEBUG', False))
DATABASE_URL = os.environ.get('DATABASE_URL', 'sqlite:///buchner_app.db')
BLUEPRINTS = []
# Flask-Funne... | import os
from buchner.helpers import truthiness
def abspath(path):
return os.path.abspath(os.path.relpath(path, os.path.dirname(__file__)))
DEBUG = truthiness(os.environ.get('DEBUG', False))
DATABASE_URL = os.environ.get('DATABASE_URL', 'sqlite:///buchner_app.db')
INSTALLED_APPS = []
# Flask-Funnel
JAVA_BIN ... | import os
from buchner.helpers import truthiness
def abspath(path):
return os.path.abspath(os.path.relpath(path, os.path.dirname(__file__)))
DEBUG = truthiness(os.environ.get('DEBUG', False))
DATABASE_URL = os.environ.get('DATABASE_URL', 'sqlite:///buchner_app.db')
BLUEPRINTS = []
# Flask-Funnel
JAVA_BIN = os... | <commit_before>import os
from buchner.helpers import truthiness
def abspath(path):
return os.path.abspath(os.path.relpath(path, os.path.dirname(__file__)))
DEBUG = truthiness(os.environ.get('DEBUG', False))
DATABASE_URL = os.environ.get('DATABASE_URL', 'sqlite:///buchner_app.db')
BLUEPRINTS = []
# Flask-Funne... |
fc608d8ab5d463c72d5e2e267c14e0c304e39acd | Cauldron/bundled/GUI/__init__.py | Cauldron/bundled/GUI/__init__.py | import version
version.append ('$Revision: 83265 $')
del version
import os, pkg_resources
# Enumerate all the available attributes and functions within this
# module, for the benefit of those that insist upon doing
# 'from module import *'.
__all__ = ('Box', 'Button', 'Color', 'Event', 'Font', 'Icon',
'Image', '... | import version
version.append ('$Revision: 83265 $')
del version
import os, pkg_resources
# Enumerate all the available attributes and functions within this
# module, for the benefit of those that insist upon doing
# 'from module import *'.
__all__ = ('Box', 'Button', 'Color', 'Event', 'Font', 'Icon',
'Image', '... | Fix bug in bundled GUI | Fix bug in bundled GUI
| Python | bsd-3-clause | alexrudy/Cauldron | import version
version.append ('$Revision: 83265 $')
del version
import os, pkg_resources
# Enumerate all the available attributes and functions within this
# module, for the benefit of those that insist upon doing
# 'from module import *'.
__all__ = ('Box', 'Button', 'Color', 'Event', 'Font', 'Icon',
'Image', '... | import version
version.append ('$Revision: 83265 $')
del version
import os, pkg_resources
# Enumerate all the available attributes and functions within this
# module, for the benefit of those that insist upon doing
# 'from module import *'.
__all__ = ('Box', 'Button', 'Color', 'Event', 'Font', 'Icon',
'Image', '... | <commit_before>import version
version.append ('$Revision: 83265 $')
del version
import os, pkg_resources
# Enumerate all the available attributes and functions within this
# module, for the benefit of those that insist upon doing
# 'from module import *'.
__all__ = ('Box', 'Button', 'Color', 'Event', 'Font', 'Icon',... | import version
version.append ('$Revision: 83265 $')
del version
import os, pkg_resources
# Enumerate all the available attributes and functions within this
# module, for the benefit of those that insist upon doing
# 'from module import *'.
__all__ = ('Box', 'Button', 'Color', 'Event', 'Font', 'Icon',
'Image', '... | import version
version.append ('$Revision: 83265 $')
del version
import os, pkg_resources
# Enumerate all the available attributes and functions within this
# module, for the benefit of those that insist upon doing
# 'from module import *'.
__all__ = ('Box', 'Button', 'Color', 'Event', 'Font', 'Icon',
'Image', '... | <commit_before>import version
version.append ('$Revision: 83265 $')
del version
import os, pkg_resources
# Enumerate all the available attributes and functions within this
# module, for the benefit of those that insist upon doing
# 'from module import *'.
__all__ = ('Box', 'Button', 'Color', 'Event', 'Font', 'Icon',... |
d45fb029dc4bf0119062a07b962dbc7fff1f300a | skimage/measure/__init__.py | skimage/measure/__init__.py | from .find_contours import find_contours
from ._regionprops import regionprops, perimeter
from ._structural_similarity import structural_similarity
from ._polygon import approximate_polygon, subdivide_polygon
__all__ = ['find_contours',
'regionprops',
'perimeter',
'structural_similarit... | from .find_contours import find_contours
from ._regionprops import regionprops, perimeter
from ._structural_similarity import structural_similarity
from ._polygon import approximate_polygon, subdivide_polygon
from .fit import LineModel, CircleModel, EllipseModel, ransac
__all__ = ['find_contours',
'regionp... | Add imports of fit to subpackage | Add imports of fit to subpackage
| Python | bsd-3-clause | ajaybhat/scikit-image,vighneshbirodkar/scikit-image,almarklein/scikit-image,GaZ3ll3/scikit-image,keflavich/scikit-image,ofgulban/scikit-image,paalge/scikit-image,keflavich/scikit-image,chintak/scikit-image,chintak/scikit-image,chintak/scikit-image,Britefury/scikit-image,youprofit/scikit-image,dpshelio/scikit-image,Hiyo... | from .find_contours import find_contours
from ._regionprops import regionprops, perimeter
from ._structural_similarity import structural_similarity
from ._polygon import approximate_polygon, subdivide_polygon
__all__ = ['find_contours',
'regionprops',
'perimeter',
'structural_similarit... | from .find_contours import find_contours
from ._regionprops import regionprops, perimeter
from ._structural_similarity import structural_similarity
from ._polygon import approximate_polygon, subdivide_polygon
from .fit import LineModel, CircleModel, EllipseModel, ransac
__all__ = ['find_contours',
'regionp... | <commit_before>from .find_contours import find_contours
from ._regionprops import regionprops, perimeter
from ._structural_similarity import structural_similarity
from ._polygon import approximate_polygon, subdivide_polygon
__all__ = ['find_contours',
'regionprops',
'perimeter',
'struc... | from .find_contours import find_contours
from ._regionprops import regionprops, perimeter
from ._structural_similarity import structural_similarity
from ._polygon import approximate_polygon, subdivide_polygon
from .fit import LineModel, CircleModel, EllipseModel, ransac
__all__ = ['find_contours',
'regionp... | from .find_contours import find_contours
from ._regionprops import regionprops, perimeter
from ._structural_similarity import structural_similarity
from ._polygon import approximate_polygon, subdivide_polygon
__all__ = ['find_contours',
'regionprops',
'perimeter',
'structural_similarit... | <commit_before>from .find_contours import find_contours
from ._regionprops import regionprops, perimeter
from ._structural_similarity import structural_similarity
from ._polygon import approximate_polygon, subdivide_polygon
__all__ = ['find_contours',
'regionprops',
'perimeter',
'struc... |
3a6d76201104b928c1b9053317c9e61804814ff5 | pyresticd.py | pyresticd.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import getpass
import time
from twisted.internet import task
from twisted.internet import reactor
# Configuration
timeout = 3600*24*3 # Period
restic_command = "/home/mebus/restic" # your restic command here
# Program
def do_restic_backup():
print "\nStarti... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import getpass
import time
from twisted.internet import task
from twisted.internet import reactor
# Configuration
timeout = 3600*24*3 # Period
restic_command = "/home/mebus/restic" # your restic command here
# Program
def do_restic_backup():
print('Starting... | Use py3-style print and string-formatting | Use py3-style print and string-formatting
| Python | mit | Mebus/pyresticd,Mebus/pyresticd | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import getpass
import time
from twisted.internet import task
from twisted.internet import reactor
# Configuration
timeout = 3600*24*3 # Period
restic_command = "/home/mebus/restic" # your restic command here
# Program
def do_restic_backup():
print "\nStarti... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import getpass
import time
from twisted.internet import task
from twisted.internet import reactor
# Configuration
timeout = 3600*24*3 # Period
restic_command = "/home/mebus/restic" # your restic command here
# Program
def do_restic_backup():
print('Starting... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import getpass
import time
from twisted.internet import task
from twisted.internet import reactor
# Configuration
timeout = 3600*24*3 # Period
restic_command = "/home/mebus/restic" # your restic command here
# Program
def do_restic_backup():
... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import getpass
import time
from twisted.internet import task
from twisted.internet import reactor
# Configuration
timeout = 3600*24*3 # Period
restic_command = "/home/mebus/restic" # your restic command here
# Program
def do_restic_backup():
print('Starting... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import getpass
import time
from twisted.internet import task
from twisted.internet import reactor
# Configuration
timeout = 3600*24*3 # Period
restic_command = "/home/mebus/restic" # your restic command here
# Program
def do_restic_backup():
print "\nStarti... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import getpass
import time
from twisted.internet import task
from twisted.internet import reactor
# Configuration
timeout = 3600*24*3 # Period
restic_command = "/home/mebus/restic" # your restic command here
# Program
def do_restic_backup():
... |
2c9d5a8b167f77a69995d55e2b2ef52c90807124 | pytest_vw.py | pytest_vw.py | # -*- coding: utf-8 -*-
import os
import pytest
# You didn't see that.
#
# I hope you don't understand this code.
_config = None
EXAMINATORS = [
'CI',
'CONTINUOUS_INTEGRATION',
'BUILD_ID',
'BUILD_NUMBER',
'TEAMCITY_VERSION',
'TRAVIS',
'CIRCLECI',
'JENKINS_URL',
'HUDSON_URL',
... | # -*- coding: utf-8 -*-
import os
import pytest
# You didn't see that.
#
# I hope you don't understand this code.
EXAMINATORS = [
'CI',
'CONTINUOUS_INTEGRATION',
'BUILD_ID',
'BUILD_NUMBER',
'TEAMCITY_VERSION',
'TRAVIS',
'CIRCLECI',
'JENKINS_URL',
'HUDSON_URL',
'bamboo.build... | Use item.config to access config. | Use item.config to access config.
Fixes #1.
| Python | mit | The-Compiler/pytest-vw | # -*- coding: utf-8 -*-
import os
import pytest
# You didn't see that.
#
# I hope you don't understand this code.
_config = None
EXAMINATORS = [
'CI',
'CONTINUOUS_INTEGRATION',
'BUILD_ID',
'BUILD_NUMBER',
'TEAMCITY_VERSION',
'TRAVIS',
'CIRCLECI',
'JENKINS_URL',
'HUDSON_URL',
... | # -*- coding: utf-8 -*-
import os
import pytest
# You didn't see that.
#
# I hope you don't understand this code.
EXAMINATORS = [
'CI',
'CONTINUOUS_INTEGRATION',
'BUILD_ID',
'BUILD_NUMBER',
'TEAMCITY_VERSION',
'TRAVIS',
'CIRCLECI',
'JENKINS_URL',
'HUDSON_URL',
'bamboo.build... | <commit_before># -*- coding: utf-8 -*-
import os
import pytest
# You didn't see that.
#
# I hope you don't understand this code.
_config = None
EXAMINATORS = [
'CI',
'CONTINUOUS_INTEGRATION',
'BUILD_ID',
'BUILD_NUMBER',
'TEAMCITY_VERSION',
'TRAVIS',
'CIRCLECI',
'JENKINS_URL',
... | # -*- coding: utf-8 -*-
import os
import pytest
# You didn't see that.
#
# I hope you don't understand this code.
EXAMINATORS = [
'CI',
'CONTINUOUS_INTEGRATION',
'BUILD_ID',
'BUILD_NUMBER',
'TEAMCITY_VERSION',
'TRAVIS',
'CIRCLECI',
'JENKINS_URL',
'HUDSON_URL',
'bamboo.build... | # -*- coding: utf-8 -*-
import os
import pytest
# You didn't see that.
#
# I hope you don't understand this code.
_config = None
EXAMINATORS = [
'CI',
'CONTINUOUS_INTEGRATION',
'BUILD_ID',
'BUILD_NUMBER',
'TEAMCITY_VERSION',
'TRAVIS',
'CIRCLECI',
'JENKINS_URL',
'HUDSON_URL',
... | <commit_before># -*- coding: utf-8 -*-
import os
import pytest
# You didn't see that.
#
# I hope you don't understand this code.
_config = None
EXAMINATORS = [
'CI',
'CONTINUOUS_INTEGRATION',
'BUILD_ID',
'BUILD_NUMBER',
'TEAMCITY_VERSION',
'TRAVIS',
'CIRCLECI',
'JENKINS_URL',
... |
e87490ea157f4882f644329e4b447f51c0a2acb3 | benchmarks/bench_vectorize.py | benchmarks/bench_vectorize.py | """
Benchmarks for ``@vectorize`` ufuncs.
"""
import numpy as np
from numba import vectorize
@vectorize(["float32(float32, float32)",
"float64(float64, float64)",
"complex64(complex64, complex64)",
"complex128(complex128, complex128)"])
def mul(x, y):
return x * y
class Tim... | """
Benchmarks for ``@vectorize`` ufuncs.
"""
import numpy as np
from numba import vectorize
@vectorize(["float32(float32, float32)",
"float64(float64, float64)",
"complex64(complex64, complex64)",
"complex128(complex128, complex128)"])
def mul(x, y):
return x * y
@vectoriz... | Add a relative difference vectorization benchmark | Add a relative difference vectorization benchmark
| Python | bsd-2-clause | gmarkall/numba-benchmark,numba/numba-benchmark | """
Benchmarks for ``@vectorize`` ufuncs.
"""
import numpy as np
from numba import vectorize
@vectorize(["float32(float32, float32)",
"float64(float64, float64)",
"complex64(complex64, complex64)",
"complex128(complex128, complex128)"])
def mul(x, y):
return x * y
class Tim... | """
Benchmarks for ``@vectorize`` ufuncs.
"""
import numpy as np
from numba import vectorize
@vectorize(["float32(float32, float32)",
"float64(float64, float64)",
"complex64(complex64, complex64)",
"complex128(complex128, complex128)"])
def mul(x, y):
return x * y
@vectoriz... | <commit_before>"""
Benchmarks for ``@vectorize`` ufuncs.
"""
import numpy as np
from numba import vectorize
@vectorize(["float32(float32, float32)",
"float64(float64, float64)",
"complex64(complex64, complex64)",
"complex128(complex128, complex128)"])
def mul(x, y):
return x ... | """
Benchmarks for ``@vectorize`` ufuncs.
"""
import numpy as np
from numba import vectorize
@vectorize(["float32(float32, float32)",
"float64(float64, float64)",
"complex64(complex64, complex64)",
"complex128(complex128, complex128)"])
def mul(x, y):
return x * y
@vectoriz... | """
Benchmarks for ``@vectorize`` ufuncs.
"""
import numpy as np
from numba import vectorize
@vectorize(["float32(float32, float32)",
"float64(float64, float64)",
"complex64(complex64, complex64)",
"complex128(complex128, complex128)"])
def mul(x, y):
return x * y
class Tim... | <commit_before>"""
Benchmarks for ``@vectorize`` ufuncs.
"""
import numpy as np
from numba import vectorize
@vectorize(["float32(float32, float32)",
"float64(float64, float64)",
"complex64(complex64, complex64)",
"complex128(complex128, complex128)"])
def mul(x, y):
return x ... |
f94c946d135aed30f4d9068844b563fa94e39ff1 | test.py | test.py | from unittest import TestCase
import lazydict
class TestLazyDictionary(TestCase):
def test_circular_reference_error(self):
d = lazydict.LazyDictionary()
d['foo'] = lambda s: s['foo']
self.assertRaises(lazydict.CircularReferenceError, d.__getitem__, 'foo')
def test_constant_redefinitio... | from unittest import TestCase
import lazydict
class TestLazyDictionary(TestCase):
def test_circular_reference_error(self):
d = lazydict.LazyDictionary()
d['foo'] = lambda s: s['foo']
self.assertRaises(lazydict.CircularReferenceError, d.__getitem__, 'foo')
def test_constant_redefinitio... | Check recursion in str() and repr() | Check recursion in str() and repr()
| Python | mit | janrain/lazydict | from unittest import TestCase
import lazydict
class TestLazyDictionary(TestCase):
def test_circular_reference_error(self):
d = lazydict.LazyDictionary()
d['foo'] = lambda s: s['foo']
self.assertRaises(lazydict.CircularReferenceError, d.__getitem__, 'foo')
def test_constant_redefinitio... | from unittest import TestCase
import lazydict
class TestLazyDictionary(TestCase):
def test_circular_reference_error(self):
d = lazydict.LazyDictionary()
d['foo'] = lambda s: s['foo']
self.assertRaises(lazydict.CircularReferenceError, d.__getitem__, 'foo')
def test_constant_redefinitio... | <commit_before>from unittest import TestCase
import lazydict
class TestLazyDictionary(TestCase):
def test_circular_reference_error(self):
d = lazydict.LazyDictionary()
d['foo'] = lambda s: s['foo']
self.assertRaises(lazydict.CircularReferenceError, d.__getitem__, 'foo')
def test_const... | from unittest import TestCase
import lazydict
class TestLazyDictionary(TestCase):
def test_circular_reference_error(self):
d = lazydict.LazyDictionary()
d['foo'] = lambda s: s['foo']
self.assertRaises(lazydict.CircularReferenceError, d.__getitem__, 'foo')
def test_constant_redefinitio... | from unittest import TestCase
import lazydict
class TestLazyDictionary(TestCase):
def test_circular_reference_error(self):
d = lazydict.LazyDictionary()
d['foo'] = lambda s: s['foo']
self.assertRaises(lazydict.CircularReferenceError, d.__getitem__, 'foo')
def test_constant_redefinitio... | <commit_before>from unittest import TestCase
import lazydict
class TestLazyDictionary(TestCase):
def test_circular_reference_error(self):
d = lazydict.LazyDictionary()
d['foo'] = lambda s: s['foo']
self.assertRaises(lazydict.CircularReferenceError, d.__getitem__, 'foo')
def test_const... |
1469da25fec3e3e966d5a0b5fab11dd279bbe05a | blogsite/models.py | blogsite/models.py | """Collection of Models used in blogsite."""
from . import db
class Post(db.Model):
"""Model representing a blog post.
Attributes
----------
id : db.Column
Autogenerated primary key
title : db.Column
body : db.Column
"""
# Columns
id = db.Column(db.Integer, primary_key=Tr... | """Collection of Models used in blogsite."""
from . import db
class Post(db.Model):
"""Model representing a blog post.
Attributes
----------
id : SQLAlchemy.Column
Autogenerated primary key
title : SQLAlchemy.Column
body : SQLAlchemy.Column
"""
# Columns
id = db.Column(db... | Correct type comment for table columns | Correct type comment for table columns
| Python | mit | paulaylingdev/blogsite,paulaylingdev/blogsite | """Collection of Models used in blogsite."""
from . import db
class Post(db.Model):
"""Model representing a blog post.
Attributes
----------
id : db.Column
Autogenerated primary key
title : db.Column
body : db.Column
"""
# Columns
id = db.Column(db.Integer, primary_key=Tr... | """Collection of Models used in blogsite."""
from . import db
class Post(db.Model):
"""Model representing a blog post.
Attributes
----------
id : SQLAlchemy.Column
Autogenerated primary key
title : SQLAlchemy.Column
body : SQLAlchemy.Column
"""
# Columns
id = db.Column(db... | <commit_before>"""Collection of Models used in blogsite."""
from . import db
class Post(db.Model):
"""Model representing a blog post.
Attributes
----------
id : db.Column
Autogenerated primary key
title : db.Column
body : db.Column
"""
# Columns
id = db.Column(db.Integer,... | """Collection of Models used in blogsite."""
from . import db
class Post(db.Model):
"""Model representing a blog post.
Attributes
----------
id : SQLAlchemy.Column
Autogenerated primary key
title : SQLAlchemy.Column
body : SQLAlchemy.Column
"""
# Columns
id = db.Column(db... | """Collection of Models used in blogsite."""
from . import db
class Post(db.Model):
"""Model representing a blog post.
Attributes
----------
id : db.Column
Autogenerated primary key
title : db.Column
body : db.Column
"""
# Columns
id = db.Column(db.Integer, primary_key=Tr... | <commit_before>"""Collection of Models used in blogsite."""
from . import db
class Post(db.Model):
"""Model representing a blog post.
Attributes
----------
id : db.Column
Autogenerated primary key
title : db.Column
body : db.Column
"""
# Columns
id = db.Column(db.Integer,... |
0cda764617dcbf52c36d4a63e240b6f849b06640 | tests/app/test_application.py | tests/app/test_application.py | from .helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def test_index(self):
response = self.client.get('/')
assert 200 == response.status_code
| from .helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def test_index(self):
response = self.client.get('/')
assert 200 == response.status_code
def test_404(self):
response = self.client.get('/not-found')
assert 404 == response.status_code
| Add test for not found URLs | Add test for not found URLs
| Python | mit | alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,mtekel/digitalmarketplace-admin-frontend,mtekel/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,mtekel/digitalmarketplace-admin-frontend,mtekel/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace... | from .helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def test_index(self):
response = self.client.get('/')
assert 200 == response.status_code
Add test for not found URLs | from .helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def test_index(self):
response = self.client.get('/')
assert 200 == response.status_code
def test_404(self):
response = self.client.get('/not-found')
assert 404 == response.status_code
| <commit_before>from .helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def test_index(self):
response = self.client.get('/')
assert 200 == response.status_code
<commit_msg>Add test for not found URLs<commit_after> | from .helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def test_index(self):
response = self.client.get('/')
assert 200 == response.status_code
def test_404(self):
response = self.client.get('/not-found')
assert 404 == response.status_code
| from .helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def test_index(self):
response = self.client.get('/')
assert 200 == response.status_code
Add test for not found URLsfrom .helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def te... | <commit_before>from .helpers import BaseApplicationTest
class TestApplication(BaseApplicationTest):
def test_index(self):
response = self.client.get('/')
assert 200 == response.status_code
<commit_msg>Add test for not found URLs<commit_after>from .helpers import BaseApplicationTest
class TestApp... |
18cd9a1db083db1ce0822bab2f502357eeec97b5 | blog/tests/test_templatetags.py | blog/tests/test_templatetags.py | from django.test import TestCase
from django.template import Context, Template
class BlogTemplatetagsTestCase(TestCase):
def test_md_as_html5(self):
body = """# H1 heading
**Paragraph** text
## H2 heading
~~~~{.python}
if True:
print("Some Python code in markdown")
~~~~
1 First
2. Second
* sub
3.... | from django.test import TestCase
from django.template import Context, Template
class BlogTemplatetagsTestCase(TestCase):
def test_md_as_html5(self):
body = """# H1 heading
**Paragraph** text
<strong>html markup works</strong>
## H2 heading
~~~~{.python}
if True:
print("Some <b>Python</b> code in mark... | Test HTML handling in markdown | Test HTML handling in markdown
| Python | agpl-3.0 | node13h/droll,node13h/droll | from django.test import TestCase
from django.template import Context, Template
class BlogTemplatetagsTestCase(TestCase):
def test_md_as_html5(self):
body = """# H1 heading
**Paragraph** text
## H2 heading
~~~~{.python}
if True:
print("Some Python code in markdown")
~~~~
1 First
2. Second
* sub
3.... | from django.test import TestCase
from django.template import Context, Template
class BlogTemplatetagsTestCase(TestCase):
def test_md_as_html5(self):
body = """# H1 heading
**Paragraph** text
<strong>html markup works</strong>
## H2 heading
~~~~{.python}
if True:
print("Some <b>Python</b> code in mark... | <commit_before>from django.test import TestCase
from django.template import Context, Template
class BlogTemplatetagsTestCase(TestCase):
def test_md_as_html5(self):
body = """# H1 heading
**Paragraph** text
## H2 heading
~~~~{.python}
if True:
print("Some Python code in markdown")
~~~~
1 First
2. Se... | from django.test import TestCase
from django.template import Context, Template
class BlogTemplatetagsTestCase(TestCase):
def test_md_as_html5(self):
body = """# H1 heading
**Paragraph** text
<strong>html markup works</strong>
## H2 heading
~~~~{.python}
if True:
print("Some <b>Python</b> code in mark... | from django.test import TestCase
from django.template import Context, Template
class BlogTemplatetagsTestCase(TestCase):
def test_md_as_html5(self):
body = """# H1 heading
**Paragraph** text
## H2 heading
~~~~{.python}
if True:
print("Some Python code in markdown")
~~~~
1 First
2. Second
* sub
3.... | <commit_before>from django.test import TestCase
from django.template import Context, Template
class BlogTemplatetagsTestCase(TestCase):
def test_md_as_html5(self):
body = """# H1 heading
**Paragraph** text
## H2 heading
~~~~{.python}
if True:
print("Some Python code in markdown")
~~~~
1 First
2. Se... |
726370913332fd5e27bb04446b75ef59fb711a9c | broadgauge/main.py | broadgauge/main.py | import os
import sys
import web
import yaml
from . import default_settings
def load_default_config():
# take all vars defined in default_config
config = dict((k, v) for k, v in default_settings.__dict__.items()
if not k.startswith("_"))
web.config.update(config)
def load_config_from_en... | import os
import sys
import web
import yaml
from . import default_settings
def load_default_config():
# take all vars defined in default_config
config = dict((k, v) for k, v in default_settings.__dict__.items()
if not k.startswith("_"))
web.config.update(config)
def load_config_from_en... | Read mail settings from config. | Read mail settings from config.
| Python | bsd-3-clause | fsmk/fsmkschool,anandology/broadgauge | import os
import sys
import web
import yaml
from . import default_settings
def load_default_config():
# take all vars defined in default_config
config = dict((k, v) for k, v in default_settings.__dict__.items()
if not k.startswith("_"))
web.config.update(config)
def load_config_from_en... | import os
import sys
import web
import yaml
from . import default_settings
def load_default_config():
# take all vars defined in default_config
config = dict((k, v) for k, v in default_settings.__dict__.items()
if not k.startswith("_"))
web.config.update(config)
def load_config_from_en... | <commit_before>import os
import sys
import web
import yaml
from . import default_settings
def load_default_config():
# take all vars defined in default_config
config = dict((k, v) for k, v in default_settings.__dict__.items()
if not k.startswith("_"))
web.config.update(config)
def load... | import os
import sys
import web
import yaml
from . import default_settings
def load_default_config():
# take all vars defined in default_config
config = dict((k, v) for k, v in default_settings.__dict__.items()
if not k.startswith("_"))
web.config.update(config)
def load_config_from_en... | import os
import sys
import web
import yaml
from . import default_settings
def load_default_config():
# take all vars defined in default_config
config = dict((k, v) for k, v in default_settings.__dict__.items()
if not k.startswith("_"))
web.config.update(config)
def load_config_from_en... | <commit_before>import os
import sys
import web
import yaml
from . import default_settings
def load_default_config():
# take all vars defined in default_config
config = dict((k, v) for k, v in default_settings.__dict__.items()
if not k.startswith("_"))
web.config.update(config)
def load... |
4a32838db7cbfa1962f3cd61f46caa308e4ea645 | src/rgrep.py | src/rgrep.py | def display_usage():
return 'Usage: python rgrep [options] pattern files\nThe options are the '\
'same as grep\n'
def rgrep(pattern='', text='', case='', count=False, version=False):
if pattern == '' or text == '':
return display_usage()
elif not count:
if case == 'i':
... | def display_usage():
return 'Usage: python rgrep [options] pattern files\nThe options are the '\
'same as grep\n'
class RGrep(object):
def __init__(self):
self.version = 'RGrep (BSD) 0.0.1'
self.count = False
self.pattern = ''
self.text = ''
self.case = ''
... | Add match and case insensitive methods | Add match and case insensitive methods
| Python | bsd-2-clause | ambidextrousTx/RGrep-Python | def display_usage():
return 'Usage: python rgrep [options] pattern files\nThe options are the '\
'same as grep\n'
def rgrep(pattern='', text='', case='', count=False, version=False):
if pattern == '' or text == '':
return display_usage()
elif not count:
if case == 'i':
... | def display_usage():
return 'Usage: python rgrep [options] pattern files\nThe options are the '\
'same as grep\n'
class RGrep(object):
def __init__(self):
self.version = 'RGrep (BSD) 0.0.1'
self.count = False
self.pattern = ''
self.text = ''
self.case = ''
... | <commit_before>def display_usage():
return 'Usage: python rgrep [options] pattern files\nThe options are the '\
'same as grep\n'
def rgrep(pattern='', text='', case='', count=False, version=False):
if pattern == '' or text == '':
return display_usage()
elif not count:
if case ==... | def display_usage():
return 'Usage: python rgrep [options] pattern files\nThe options are the '\
'same as grep\n'
class RGrep(object):
def __init__(self):
self.version = 'RGrep (BSD) 0.0.1'
self.count = False
self.pattern = ''
self.text = ''
self.case = ''
... | def display_usage():
return 'Usage: python rgrep [options] pattern files\nThe options are the '\
'same as grep\n'
def rgrep(pattern='', text='', case='', count=False, version=False):
if pattern == '' or text == '':
return display_usage()
elif not count:
if case == 'i':
... | <commit_before>def display_usage():
return 'Usage: python rgrep [options] pattern files\nThe options are the '\
'same as grep\n'
def rgrep(pattern='', text='', case='', count=False, version=False):
if pattern == '' or text == '':
return display_usage()
elif not count:
if case ==... |
bd8c5628a6af96a68f1ed6022a983af7a5495529 | tartpy/rt.py | tartpy/rt.py | import os
import multiprocessing
import threading
class Sponsor(object):
def __init__(self):
print('Sponsor pid: {}'.format(os.getpid()))
def create(self, behavior):
return Actor(behavior, self)
class Actor(object):
def __init__(self, behavior, sponsor):
self.behavior = behavior... | import os
import multiprocessing
import threading
class Sponsor(object):
def __init__(self):
print('Sponsor pid: {}'.format(os.getpid()))
def create(self, behavior):
return Actor(behavior, self)
class Actor(object):
def __init__(self, behavior, sponsor):
self.behavior = behavior... | Allow arg to specify spawning type | Allow arg to specify spawning type | Python | mit | waltermoreira/tartpy | import os
import multiprocessing
import threading
class Sponsor(object):
def __init__(self):
print('Sponsor pid: {}'.format(os.getpid()))
def create(self, behavior):
return Actor(behavior, self)
class Actor(object):
def __init__(self, behavior, sponsor):
self.behavior = behavior... | import os
import multiprocessing
import threading
class Sponsor(object):
def __init__(self):
print('Sponsor pid: {}'.format(os.getpid()))
def create(self, behavior):
return Actor(behavior, self)
class Actor(object):
def __init__(self, behavior, sponsor):
self.behavior = behavior... | <commit_before>import os
import multiprocessing
import threading
class Sponsor(object):
def __init__(self):
print('Sponsor pid: {}'.format(os.getpid()))
def create(self, behavior):
return Actor(behavior, self)
class Actor(object):
def __init__(self, behavior, sponsor):
self.beha... | import os
import multiprocessing
import threading
class Sponsor(object):
def __init__(self):
print('Sponsor pid: {}'.format(os.getpid()))
def create(self, behavior):
return Actor(behavior, self)
class Actor(object):
def __init__(self, behavior, sponsor):
self.behavior = behavior... | import os
import multiprocessing
import threading
class Sponsor(object):
def __init__(self):
print('Sponsor pid: {}'.format(os.getpid()))
def create(self, behavior):
return Actor(behavior, self)
class Actor(object):
def __init__(self, behavior, sponsor):
self.behavior = behavior... | <commit_before>import os
import multiprocessing
import threading
class Sponsor(object):
def __init__(self):
print('Sponsor pid: {}'.format(os.getpid()))
def create(self, behavior):
return Actor(behavior, self)
class Actor(object):
def __init__(self, behavior, sponsor):
self.beha... |
9f600d66f76d023926d1c1a6c974bd1abba40cfb | breakers/__init__.py | breakers/__init__.py | # -*- coding: utf-8 -*-
"""
breakers
~~~~~
Breakers is a simple python package that implements the circuit breaker
pattern.
:copyright: (c) 2015 by Marcus Martins.
:license: Apache License, Version 2.0, see LICENSE for more details.
"""
from .breaker import Breaker
__all__ = [Breaker, ]
__vers... | # -*- coding: utf-8 -*-
"""
breakers
~~~~~
Breakers is a simple python package that implements the circuit breaker
pattern.
:copyright: (c) 2015 by Marcus Martins.
:license: Apache License, Version 2.0, see LICENSE for more details.
"""
from .breaker import Breaker
__all__ = ['Breaker', ]
__ve... | Fix __all__ on module entry point | Fix __all__ on module entry point
| Python | apache-2.0 | marcusmartins/breakers | # -*- coding: utf-8 -*-
"""
breakers
~~~~~
Breakers is a simple python package that implements the circuit breaker
pattern.
:copyright: (c) 2015 by Marcus Martins.
:license: Apache License, Version 2.0, see LICENSE for more details.
"""
from .breaker import Breaker
__all__ = [Breaker, ]
__vers... | # -*- coding: utf-8 -*-
"""
breakers
~~~~~
Breakers is a simple python package that implements the circuit breaker
pattern.
:copyright: (c) 2015 by Marcus Martins.
:license: Apache License, Version 2.0, see LICENSE for more details.
"""
from .breaker import Breaker
__all__ = ['Breaker', ]
__ve... | <commit_before># -*- coding: utf-8 -*-
"""
breakers
~~~~~
Breakers is a simple python package that implements the circuit breaker
pattern.
:copyright: (c) 2015 by Marcus Martins.
:license: Apache License, Version 2.0, see LICENSE for more details.
"""
from .breaker import Breaker
__all__ = [Bre... | # -*- coding: utf-8 -*-
"""
breakers
~~~~~
Breakers is a simple python package that implements the circuit breaker
pattern.
:copyright: (c) 2015 by Marcus Martins.
:license: Apache License, Version 2.0, see LICENSE for more details.
"""
from .breaker import Breaker
__all__ = ['Breaker', ]
__ve... | # -*- coding: utf-8 -*-
"""
breakers
~~~~~
Breakers is a simple python package that implements the circuit breaker
pattern.
:copyright: (c) 2015 by Marcus Martins.
:license: Apache License, Version 2.0, see LICENSE for more details.
"""
from .breaker import Breaker
__all__ = [Breaker, ]
__vers... | <commit_before># -*- coding: utf-8 -*-
"""
breakers
~~~~~
Breakers is a simple python package that implements the circuit breaker
pattern.
:copyright: (c) 2015 by Marcus Martins.
:license: Apache License, Version 2.0, see LICENSE for more details.
"""
from .breaker import Breaker
__all__ = [Bre... |
926a7e3f8bc3808160bcab439e62b5848345d6f5 | tests/settings.py | tests/settings.py | # -*- coding: utf-8 -*-
import django
DEBUG = False
USE_TZ = True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
}
}
INSTALLED_APPS = [
"easy_pjax",
"tests"
]
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = "tests.urls"
SECRET_KEY = "secret"
if django.VERSION[:2] >= (1, 8):
TE... | # -*- coding: utf-8 -*-
import django
DEBUG = False
USE_TZ = True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
}
}
INSTALLED_APPS = [
"easy_pjax",
"tests"
]
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = "tests.urls"
SECRET_KEY = "secret"
if django.VERSION[:2] >= (1, 8):
TE... | Use double quotes for strings | Use double quotes for strings
| Python | bsd-3-clause | nigma/django-easy-pjax,nigma/django-easy-pjax,nigma/django-easy-pjax | # -*- coding: utf-8 -*-
import django
DEBUG = False
USE_TZ = True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
}
}
INSTALLED_APPS = [
"easy_pjax",
"tests"
]
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = "tests.urls"
SECRET_KEY = "secret"
if django.VERSION[:2] >= (1, 8):
TE... | # -*- coding: utf-8 -*-
import django
DEBUG = False
USE_TZ = True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
}
}
INSTALLED_APPS = [
"easy_pjax",
"tests"
]
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = "tests.urls"
SECRET_KEY = "secret"
if django.VERSION[:2] >= (1, 8):
TE... | <commit_before># -*- coding: utf-8 -*-
import django
DEBUG = False
USE_TZ = True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
}
}
INSTALLED_APPS = [
"easy_pjax",
"tests"
]
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = "tests.urls"
SECRET_KEY = "secret"
if django.VERSION[:2] >=... | # -*- coding: utf-8 -*-
import django
DEBUG = False
USE_TZ = True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
}
}
INSTALLED_APPS = [
"easy_pjax",
"tests"
]
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = "tests.urls"
SECRET_KEY = "secret"
if django.VERSION[:2] >= (1, 8):
TE... | # -*- coding: utf-8 -*-
import django
DEBUG = False
USE_TZ = True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
}
}
INSTALLED_APPS = [
"easy_pjax",
"tests"
]
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = "tests.urls"
SECRET_KEY = "secret"
if django.VERSION[:2] >= (1, 8):
TE... | <commit_before># -*- coding: utf-8 -*-
import django
DEBUG = False
USE_TZ = True
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
}
}
INSTALLED_APPS = [
"easy_pjax",
"tests"
]
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = "tests.urls"
SECRET_KEY = "secret"
if django.VERSION[:2] >=... |
4df20c02934e431568105467ee44374bedddf4a5 | fabfile/dbengine.py | fabfile/dbengine.py | ###################################################################
#
# Copyright (c) 2013 Miing.org <samuel.miing@gmail.com>
#
# This software is licensed under the GNU Affero General Public
# License version 3 (AGPLv3), as published by the Free Software
# Foundation, and may be copied, distributed, and modified un... | ###################################################################
#
# Copyright (c) 2013 Miing.org <samuel.miing@gmail.com>
#
# This software is licensed under the GNU Affero General Public
# License version 3 (AGPLv3), as published by the Free Software
# Foundation, and may be copied, distributed, and modified un... | Fix 'cant import from .postgresql' | Fix 'cant import from .postgresql'
| Python | agpl-3.0 | miing/mci_migo,miing/mci_migo,miing/mci_migo | ###################################################################
#
# Copyright (c) 2013 Miing.org <samuel.miing@gmail.com>
#
# This software is licensed under the GNU Affero General Public
# License version 3 (AGPLv3), as published by the Free Software
# Foundation, and may be copied, distributed, and modified un... | ###################################################################
#
# Copyright (c) 2013 Miing.org <samuel.miing@gmail.com>
#
# This software is licensed under the GNU Affero General Public
# License version 3 (AGPLv3), as published by the Free Software
# Foundation, and may be copied, distributed, and modified un... | <commit_before>###################################################################
#
# Copyright (c) 2013 Miing.org <samuel.miing@gmail.com>
#
# This software is licensed under the GNU Affero General Public
# License version 3 (AGPLv3), as published by the Free Software
# Foundation, and may be copied, distributed, ... | ###################################################################
#
# Copyright (c) 2013 Miing.org <samuel.miing@gmail.com>
#
# This software is licensed under the GNU Affero General Public
# License version 3 (AGPLv3), as published by the Free Software
# Foundation, and may be copied, distributed, and modified un... | ###################################################################
#
# Copyright (c) 2013 Miing.org <samuel.miing@gmail.com>
#
# This software is licensed under the GNU Affero General Public
# License version 3 (AGPLv3), as published by the Free Software
# Foundation, and may be copied, distributed, and modified un... | <commit_before>###################################################################
#
# Copyright (c) 2013 Miing.org <samuel.miing@gmail.com>
#
# This software is licensed under the GNU Affero General Public
# License version 3 (AGPLv3), as published by the Free Software
# Foundation, and may be copied, distributed, ... |
2201aaeffb93713adcdf20f5868b5a90b562efda | pages/models.py | pages/models.py | from django.db import models
class Page(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=64, blank=False)
name.help_text='Internal name of page'
title = models.CharField(max_length=64, blank=True)
title.help_text='Page title to display in titlebar of browser/tab'
body = ... | from django.db import models
class Page(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=64, blank=False)
name.help_text='Internal name of page'
title = models.CharField(max_length=64, blank=True)
title.help_text='Page title to display in titlebar of browser/tab'
body = ... | Increase character limit for pages | Increase character limit for pages
Closes #70. | Python | isc | ashbc/tgrsite,ashbc/tgrsite,ashbc/tgrsite | from django.db import models
class Page(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=64, blank=False)
name.help_text='Internal name of page'
title = models.CharField(max_length=64, blank=True)
title.help_text='Page title to display in titlebar of browser/tab'
body = ... | from django.db import models
class Page(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=64, blank=False)
name.help_text='Internal name of page'
title = models.CharField(max_length=64, blank=True)
title.help_text='Page title to display in titlebar of browser/tab'
body = ... | <commit_before>from django.db import models
class Page(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=64, blank=False)
name.help_text='Internal name of page'
title = models.CharField(max_length=64, blank=True)
title.help_text='Page title to display in titlebar of browser... | from django.db import models
class Page(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=64, blank=False)
name.help_text='Internal name of page'
title = models.CharField(max_length=64, blank=True)
title.help_text='Page title to display in titlebar of browser/tab'
body = ... | from django.db import models
class Page(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=64, blank=False)
name.help_text='Internal name of page'
title = models.CharField(max_length=64, blank=True)
title.help_text='Page title to display in titlebar of browser/tab'
body = ... | <commit_before>from django.db import models
class Page(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=64, blank=False)
name.help_text='Internal name of page'
title = models.CharField(max_length=64, blank=True)
title.help_text='Page title to display in titlebar of browser... |
42918ef774625643220c182ca0eb5601841db595 | dvox/app.py | dvox/app.py | config = {
"CREATE_RETRIES": 5,
"CHUNK_LOCK_TIMEOUT_SECONDS": 10,
"WORKER_TIMEOUT_SECONDS": 15
}
| config = {
"CREATE_RETRIES": 5,
"CHUNK_LOCK_TIMEOUT_SECONDS": 10,
"WORKER_TIMEOUT_SECONDS": 15,
"CHUNK_SIZE": 25,
"BLOCK_BYTE_SIZE": 8
}
| Add controls for storage size | Add controls for storage size
| Python | mit | numberoverzero/dvox | config = {
"CREATE_RETRIES": 5,
"CHUNK_LOCK_TIMEOUT_SECONDS": 10,
"WORKER_TIMEOUT_SECONDS": 15
}
Add controls for storage size | config = {
"CREATE_RETRIES": 5,
"CHUNK_LOCK_TIMEOUT_SECONDS": 10,
"WORKER_TIMEOUT_SECONDS": 15,
"CHUNK_SIZE": 25,
"BLOCK_BYTE_SIZE": 8
}
| <commit_before>config = {
"CREATE_RETRIES": 5,
"CHUNK_LOCK_TIMEOUT_SECONDS": 10,
"WORKER_TIMEOUT_SECONDS": 15
}
<commit_msg>Add controls for storage size<commit_after> | config = {
"CREATE_RETRIES": 5,
"CHUNK_LOCK_TIMEOUT_SECONDS": 10,
"WORKER_TIMEOUT_SECONDS": 15,
"CHUNK_SIZE": 25,
"BLOCK_BYTE_SIZE": 8
}
| config = {
"CREATE_RETRIES": 5,
"CHUNK_LOCK_TIMEOUT_SECONDS": 10,
"WORKER_TIMEOUT_SECONDS": 15
}
Add controls for storage sizeconfig = {
"CREATE_RETRIES": 5,
"CHUNK_LOCK_TIMEOUT_SECONDS": 10,
"WORKER_TIMEOUT_SECONDS": 15,
"CHUNK_SIZE": 25,
"BLOCK_BYTE_SIZE": 8
}
| <commit_before>config = {
"CREATE_RETRIES": 5,
"CHUNK_LOCK_TIMEOUT_SECONDS": 10,
"WORKER_TIMEOUT_SECONDS": 15
}
<commit_msg>Add controls for storage size<commit_after>config = {
"CREATE_RETRIES": 5,
"CHUNK_LOCK_TIMEOUT_SECONDS": 10,
"WORKER_TIMEOUT_SECONDS": 15,
"CHUNK_SIZE": 25,
"BLOCK_... |
510063159145cd3fdc7bdd0c8b93dc46d98a88c8 | obj_sys/models.py | obj_sys/models.py | # Create your models here.
from models_obj_rel import *
from models_ufs_obj import *
try:
# apps.py
from django.apps import AppConfig
try:
import tagging
tagging.register(UfsObj)
except ImportError:
pass
except ImportError:
try:
import tagging
tagging.regi... | # Create your models here.
from models_obj_rel import *
from models_ufs_obj import *
try:
import tagging
tagging.register(UfsObj)
except ImportError:
pass
| Remove not used app config. | Remove not used app config.
| Python | bsd-3-clause | weijia/obj_sys,weijia/obj_sys | # Create your models here.
from models_obj_rel import *
from models_ufs_obj import *
try:
# apps.py
from django.apps import AppConfig
try:
import tagging
tagging.register(UfsObj)
except ImportError:
pass
except ImportError:
try:
import tagging
tagging.regi... | # Create your models here.
from models_obj_rel import *
from models_ufs_obj import *
try:
import tagging
tagging.register(UfsObj)
except ImportError:
pass
| <commit_before># Create your models here.
from models_obj_rel import *
from models_ufs_obj import *
try:
# apps.py
from django.apps import AppConfig
try:
import tagging
tagging.register(UfsObj)
except ImportError:
pass
except ImportError:
try:
import tagging
... | # Create your models here.
from models_obj_rel import *
from models_ufs_obj import *
try:
import tagging
tagging.register(UfsObj)
except ImportError:
pass
| # Create your models here.
from models_obj_rel import *
from models_ufs_obj import *
try:
# apps.py
from django.apps import AppConfig
try:
import tagging
tagging.register(UfsObj)
except ImportError:
pass
except ImportError:
try:
import tagging
tagging.regi... | <commit_before># Create your models here.
from models_obj_rel import *
from models_ufs_obj import *
try:
# apps.py
from django.apps import AppConfig
try:
import tagging
tagging.register(UfsObj)
except ImportError:
pass
except ImportError:
try:
import tagging
... |
33a9bd5cf465a56c2eb156dcbc0d4e61a0f590a4 | osmABTS/places.py | osmABTS/places.py | """
Places of interest generation
=============================
"""
| """
Places of interest generation
=============================
This module defines a class for places of interest and the functions for
generating the data structure for all of them from the OSM raw data.
Each place of interest will basically just carry the information about its
location in the **network** as the id... | Implement place class and homes generation | Implement place class and homes generation
The Place class for places of interest has been implemented, as well as
the generation of homes, which is different from the generation of other
places of interest.
| Python | mit | tschijnmo/osmABTS | """
Places of interest generation
=============================
"""
Implement place class and homes generation
The Place class for places of interest has been implemented, as well as
the generation of homes, which is different from the generation of other
places of interest. | """
Places of interest generation
=============================
This module defines a class for places of interest and the functions for
generating the data structure for all of them from the OSM raw data.
Each place of interest will basically just carry the information about its
location in the **network** as the id... | <commit_before>"""
Places of interest generation
=============================
"""
<commit_msg>Implement place class and homes generation
The Place class for places of interest has been implemented, as well as
the generation of homes, which is different from the generation of other
places of interest.<commit_after> | """
Places of interest generation
=============================
This module defines a class for places of interest and the functions for
generating the data structure for all of them from the OSM raw data.
Each place of interest will basically just carry the information about its
location in the **network** as the id... | """
Places of interest generation
=============================
"""
Implement place class and homes generation
The Place class for places of interest has been implemented, as well as
the generation of homes, which is different from the generation of other
places of interest."""
Places of interest generation
=========... | <commit_before>"""
Places of interest generation
=============================
"""
<commit_msg>Implement place class and homes generation
The Place class for places of interest has been implemented, as well as
the generation of homes, which is different from the generation of other
places of interest.<commit_after>""... |
306cf5987c90d54d72037c19dd02f07be37cbb6f | make_mozilla/base/tests/decorators.py | make_mozilla/base/tests/decorators.py | from functools import wraps
from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest
__all__ = ['wip']
def fail(message):
raise AssertionError(message)
def wip(f):
@wraps(f)
def run_test(*args, **kwargs):
try:
f(*args, **kwargs)
except Exception as e:
... | from functools import wraps
from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest
import os
__all__ = ['wip']
def fail(message):
raise AssertionError(message)
def wip(f):
@wraps(f)
def run_test(*args, **kwargs):
try:
f(*args, **kwargs)
except Exception as... | Add integration test decorator to prevent certain tests running unless we really want them to. | Add integration test decorator to prevent certain tests running unless we really want them to.
| Python | bsd-3-clause | mozilla/make.mozilla.org,mozilla/make.mozilla.org,mozilla/make.mozilla.org,mozilla/make.mozilla.org | from functools import wraps
from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest
__all__ = ['wip']
def fail(message):
raise AssertionError(message)
def wip(f):
@wraps(f)
def run_test(*args, **kwargs):
try:
f(*args, **kwargs)
except Exception as e:
... | from functools import wraps
from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest
import os
__all__ = ['wip']
def fail(message):
raise AssertionError(message)
def wip(f):
@wraps(f)
def run_test(*args, **kwargs):
try:
f(*args, **kwargs)
except Exception as... | <commit_before>from functools import wraps
from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest
__all__ = ['wip']
def fail(message):
raise AssertionError(message)
def wip(f):
@wraps(f)
def run_test(*args, **kwargs):
try:
f(*args, **kwargs)
except Excepti... | from functools import wraps
from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest
import os
__all__ = ['wip']
def fail(message):
raise AssertionError(message)
def wip(f):
@wraps(f)
def run_test(*args, **kwargs):
try:
f(*args, **kwargs)
except Exception as... | from functools import wraps
from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest
__all__ = ['wip']
def fail(message):
raise AssertionError(message)
def wip(f):
@wraps(f)
def run_test(*args, **kwargs):
try:
f(*args, **kwargs)
except Exception as e:
... | <commit_before>from functools import wraps
from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest
__all__ = ['wip']
def fail(message):
raise AssertionError(message)
def wip(f):
@wraps(f)
def run_test(*args, **kwargs):
try:
f(*args, **kwargs)
except Excepti... |
aeae640c34b7f68870304fb2a6a163d852440b7a | test/buildbot/buildbot_config/master/schedulers.py | test/buildbot/buildbot_config/master/schedulers.py | """
This module contains the logic which returns the set of
schedulers to use for the build master.
"""
def get_schedulers():
return []
| """
This module contains the logic which returns the set of
schedulers to use for the build master.
"""
from buildbot.changes.filter import ChangeFilter
from buildbot.schedulers.basic import SingleBranchScheduler
def get_schedulers():
full = SingleBranchScheduler(name="full",
chan... | Add a scheduler for the master branch to run | Buildbot: Add a scheduler for the master branch to run
| Python | mit | mkuzmin/vagrant,zsjohny/vagrant,ferventcoder/vagrant,sni/vagrant,patrys/vagrant,ArloL/vagrant,tomfanning/vagrant,channui/vagrant,wangfakang/vagrant,muhanadra/vagrant,jkburges/vagrant,rivy/vagrant,muhanadra/vagrant,krig/vagrant,Ninir/vagrant,tbarrongh/vagrant,johntron/vagrant,petems/vagrant,signed8bit/vagrant,carlosefr/... | """
This module contains the logic which returns the set of
schedulers to use for the build master.
"""
def get_schedulers():
return []
Buildbot: Add a scheduler for the master branch to run | """
This module contains the logic which returns the set of
schedulers to use for the build master.
"""
from buildbot.changes.filter import ChangeFilter
from buildbot.schedulers.basic import SingleBranchScheduler
def get_schedulers():
full = SingleBranchScheduler(name="full",
chan... | <commit_before>"""
This module contains the logic which returns the set of
schedulers to use for the build master.
"""
def get_schedulers():
return []
<commit_msg>Buildbot: Add a scheduler for the master branch to run<commit_after> | """
This module contains the logic which returns the set of
schedulers to use for the build master.
"""
from buildbot.changes.filter import ChangeFilter
from buildbot.schedulers.basic import SingleBranchScheduler
def get_schedulers():
full = SingleBranchScheduler(name="full",
chan... | """
This module contains the logic which returns the set of
schedulers to use for the build master.
"""
def get_schedulers():
return []
Buildbot: Add a scheduler for the master branch to run"""
This module contains the logic which returns the set of
schedulers to use for the build master.
"""
from buildbot.change... | <commit_before>"""
This module contains the logic which returns the set of
schedulers to use for the build master.
"""
def get_schedulers():
return []
<commit_msg>Buildbot: Add a scheduler for the master branch to run<commit_after>"""
This module contains the logic which returns the set of
schedulers to use for th... |
9e6621ac7e4f07b9272ddb144aebbb75826d2405 | src/flock.py | src/flock.py | #!/usr/bin/env python
import cherrypy
from jinja2 import Environment, FileSystemLoader
j2_env = Environment(loader = FileSystemLoader('templates'))
class Root(object):
@cherrypy.expose
def index(self):
template = j2_env.get_template('base.html')
return template.render()
cherrypy.config.update('app.config')
ch... | #!/usr/bin/env python
from flask import Flask, redirect, render_template, request, session, url_for
from flask_oauthlib.client import OAuth, OAuthException
app = Flask(__name__)
app.config['FACEBOKK_APP_ID'] = ''
app.config['FACEBOOK_APP_SECRET'] = ''
app.config['GOOGLE_APP_ID'] = ''
app.config['GOOGLE_APP_SECRET'] =... | Switch to Flask, add oauth | Switch to Flask, add oauth
| Python | agpl-3.0 | DavidJFelix/hatchit,DavidJFelix/hatchit,DavidJFelix/hatchit | #!/usr/bin/env python
import cherrypy
from jinja2 import Environment, FileSystemLoader
j2_env = Environment(loader = FileSystemLoader('templates'))
class Root(object):
@cherrypy.expose
def index(self):
template = j2_env.get_template('base.html')
return template.render()
cherrypy.config.update('app.config')
ch... | #!/usr/bin/env python
from flask import Flask, redirect, render_template, request, session, url_for
from flask_oauthlib.client import OAuth, OAuthException
app = Flask(__name__)
app.config['FACEBOKK_APP_ID'] = ''
app.config['FACEBOOK_APP_SECRET'] = ''
app.config['GOOGLE_APP_ID'] = ''
app.config['GOOGLE_APP_SECRET'] =... | <commit_before>#!/usr/bin/env python
import cherrypy
from jinja2 import Environment, FileSystemLoader
j2_env = Environment(loader = FileSystemLoader('templates'))
class Root(object):
@cherrypy.expose
def index(self):
template = j2_env.get_template('base.html')
return template.render()
cherrypy.config.update('... | #!/usr/bin/env python
from flask import Flask, redirect, render_template, request, session, url_for
from flask_oauthlib.client import OAuth, OAuthException
app = Flask(__name__)
app.config['FACEBOKK_APP_ID'] = ''
app.config['FACEBOOK_APP_SECRET'] = ''
app.config['GOOGLE_APP_ID'] = ''
app.config['GOOGLE_APP_SECRET'] =... | #!/usr/bin/env python
import cherrypy
from jinja2 import Environment, FileSystemLoader
j2_env = Environment(loader = FileSystemLoader('templates'))
class Root(object):
@cherrypy.expose
def index(self):
template = j2_env.get_template('base.html')
return template.render()
cherrypy.config.update('app.config')
ch... | <commit_before>#!/usr/bin/env python
import cherrypy
from jinja2 import Environment, FileSystemLoader
j2_env = Environment(loader = FileSystemLoader('templates'))
class Root(object):
@cherrypy.expose
def index(self):
template = j2_env.get_template('base.html')
return template.render()
cherrypy.config.update('... |
5f63a4cddc1157e1b0cb085562ee16e55f1c88b5 | cesium/celery_app.py | cesium/celery_app.py | from celery import Celery
from cesium import _patch_celery
celery_config = {
'CELERY_ACCEPT_CONTENT': ['pickle'],
'CELERY_IMPORTS': ['cesium', 'cesium._patch_celery', 'cesium.celery_tasks'],
'CELERY_RESULT_BACKEND': 'amqp',
'CELERY_RESULT_SERIALIZER': 'pickle',
'CELERY_TASK_SERIALIZER': 'pickle',
... | from celery import Celery
from cesium import _patch_celery
import os
celery_config = {
'CELERY_ACCEPT_CONTENT': ['pickle'],
'CELERY_IMPORTS': ['cesium', 'cesium._patch_celery', 'cesium.celery_tasks'],
'CELERY_RESULT_BACKEND': 'amqp',
'CELERY_RESULT_SERIALIZER': 'pickle',
'CELERY_TASK_SERIALIZER':... | Allow broker to be overridden | Allow broker to be overridden
| Python | bsd-3-clause | mltsp/mltsp,acrellin/mltsp,bnaul/mltsp,bnaul/mltsp,bnaul/mltsp,acrellin/mltsp,mltsp/mltsp,mltsp/mltsp,acrellin/mltsp,acrellin/mltsp,mltsp/mltsp,bnaul/mltsp,mltsp/mltsp,bnaul/mltsp,bnaul/mltsp,acrellin/mltsp,acrellin/mltsp,mltsp/mltsp | from celery import Celery
from cesium import _patch_celery
celery_config = {
'CELERY_ACCEPT_CONTENT': ['pickle'],
'CELERY_IMPORTS': ['cesium', 'cesium._patch_celery', 'cesium.celery_tasks'],
'CELERY_RESULT_BACKEND': 'amqp',
'CELERY_RESULT_SERIALIZER': 'pickle',
'CELERY_TASK_SERIALIZER': 'pickle',
... | from celery import Celery
from cesium import _patch_celery
import os
celery_config = {
'CELERY_ACCEPT_CONTENT': ['pickle'],
'CELERY_IMPORTS': ['cesium', 'cesium._patch_celery', 'cesium.celery_tasks'],
'CELERY_RESULT_BACKEND': 'amqp',
'CELERY_RESULT_SERIALIZER': 'pickle',
'CELERY_TASK_SERIALIZER':... | <commit_before>from celery import Celery
from cesium import _patch_celery
celery_config = {
'CELERY_ACCEPT_CONTENT': ['pickle'],
'CELERY_IMPORTS': ['cesium', 'cesium._patch_celery', 'cesium.celery_tasks'],
'CELERY_RESULT_BACKEND': 'amqp',
'CELERY_RESULT_SERIALIZER': 'pickle',
'CELERY_TASK_SERIALIZE... | from celery import Celery
from cesium import _patch_celery
import os
celery_config = {
'CELERY_ACCEPT_CONTENT': ['pickle'],
'CELERY_IMPORTS': ['cesium', 'cesium._patch_celery', 'cesium.celery_tasks'],
'CELERY_RESULT_BACKEND': 'amqp',
'CELERY_RESULT_SERIALIZER': 'pickle',
'CELERY_TASK_SERIALIZER':... | from celery import Celery
from cesium import _patch_celery
celery_config = {
'CELERY_ACCEPT_CONTENT': ['pickle'],
'CELERY_IMPORTS': ['cesium', 'cesium._patch_celery', 'cesium.celery_tasks'],
'CELERY_RESULT_BACKEND': 'amqp',
'CELERY_RESULT_SERIALIZER': 'pickle',
'CELERY_TASK_SERIALIZER': 'pickle',
... | <commit_before>from celery import Celery
from cesium import _patch_celery
celery_config = {
'CELERY_ACCEPT_CONTENT': ['pickle'],
'CELERY_IMPORTS': ['cesium', 'cesium._patch_celery', 'cesium.celery_tasks'],
'CELERY_RESULT_BACKEND': 'amqp',
'CELERY_RESULT_SERIALIZER': 'pickle',
'CELERY_TASK_SERIALIZE... |
a17aade30c5925ba40eacfa2ab2a067a9141aa84 | tests/__init__.py | tests/__init__.py | #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests" )
| #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests", "lexer_tests", "glk_tests" )
| Make run_tests run all tests if no arguments are provided. | Make run_tests run all tests if no arguments are provided.
| Python | bsd-3-clause | BGCX262/zvm-hg-to-git,BGCX262/zvm-hg-to-git | #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests" )
Make run_tests run all tests if no arguments are provided. | #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests", "lexer_tests", "glk_tests" )
| <commit_before>#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests" )
<commit_msg>Make run_tests run all tests if no arguments are provided.<commit_after> | #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests", "lexer_tests", "glk_tests" )
| #
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests" )
Make run_tests run all tests if no arguments are provided.#
# For the license of this file, please consult the LICENSE file in t... | <commit_before>#
# For the license of this file, please consult the LICENSE file in the
# root directory of this distribution.
#
# All tests in the test suite.
__all__ = ( "bitfield_tests", "zscii_tests" )
<commit_msg>Make run_tests run all tests if no arguments are provided.<commit_after>#
# For the license of this f... |
84af834a348097f493b1e63034c8d0487354d737 | qanta/reporting/report_generator.py | qanta/reporting/report_generator.py | from jinja2 import Environment, PackageLoader
from qanta import qlogging
log = qlogging.get(__name__)
class ReportGenerator:
def __init__(self, template):
self.template = template
def create(self, variables, md_output, pdf_output):
env = Environment(loader=PackageLoader('qanta', 'reporting/... | from jinja2 import Environment, PackageLoader
from qanta import qlogging
log = qlogging.get(__name__)
class ReportGenerator:
def __init__(self, template):
self.template = template
def create(self, variables, md_output, pdf_output):
env = Environment(loader=PackageLoader('qanta', 'reporting/... | Fix bug where there was an empty report | Fix bug where there was an empty report
| Python | mit | miyyer/qb,miyyer/qb,Pinafore/qb,miyyer/qb,miyyer/qb,Pinafore/qb | from jinja2 import Environment, PackageLoader
from qanta import qlogging
log = qlogging.get(__name__)
class ReportGenerator:
def __init__(self, template):
self.template = template
def create(self, variables, md_output, pdf_output):
env = Environment(loader=PackageLoader('qanta', 'reporting/... | from jinja2 import Environment, PackageLoader
from qanta import qlogging
log = qlogging.get(__name__)
class ReportGenerator:
def __init__(self, template):
self.template = template
def create(self, variables, md_output, pdf_output):
env = Environment(loader=PackageLoader('qanta', 'reporting/... | <commit_before>from jinja2 import Environment, PackageLoader
from qanta import qlogging
log = qlogging.get(__name__)
class ReportGenerator:
def __init__(self, template):
self.template = template
def create(self, variables, md_output, pdf_output):
env = Environment(loader=PackageLoader('qant... | from jinja2 import Environment, PackageLoader
from qanta import qlogging
log = qlogging.get(__name__)
class ReportGenerator:
def __init__(self, template):
self.template = template
def create(self, variables, md_output, pdf_output):
env = Environment(loader=PackageLoader('qanta', 'reporting/... | from jinja2 import Environment, PackageLoader
from qanta import qlogging
log = qlogging.get(__name__)
class ReportGenerator:
def __init__(self, template):
self.template = template
def create(self, variables, md_output, pdf_output):
env = Environment(loader=PackageLoader('qanta', 'reporting/... | <commit_before>from jinja2 import Environment, PackageLoader
from qanta import qlogging
log = qlogging.get(__name__)
class ReportGenerator:
def __init__(self, template):
self.template = template
def create(self, variables, md_output, pdf_output):
env = Environment(loader=PackageLoader('qant... |
5ee94e9a74bc4128ed8e7e10a2106ea422f22757 | sandbox/sandbox/polls/serialiser.py | sandbox/sandbox/polls/serialiser.py |
from nap import models, fields, api, serialiser, publisher
from .models import Choice, Poll
class ChoiceSerialiser(models.ModelSerialiser):
class Meta:
model = Choice
exclude = ('poll,')
class PollSerialiser(serialiser.Serialiser):
api_name = 'poll'
question = fields.Field()
publ... |
from nap import models, fields, api, serialiser, publisher
from .models import Choice, Poll
class ChoiceSerialiser(models.ModelSerialiser):
class Meta:
model = Choice
exclude = ('poll,')
class PollSerialiser(serialiser.Serialiser):
api_name = 'poll'
question = fields.Field()
publ... | Add attribute to choices field declaration | Add attribute to choices field declaration
| Python | bsd-3-clause | MarkusH/django-nap,limbera/django-nap |
from nap import models, fields, api, serialiser, publisher
from .models import Choice, Poll
class ChoiceSerialiser(models.ModelSerialiser):
class Meta:
model = Choice
exclude = ('poll,')
class PollSerialiser(serialiser.Serialiser):
api_name = 'poll'
question = fields.Field()
publ... |
from nap import models, fields, api, serialiser, publisher
from .models import Choice, Poll
class ChoiceSerialiser(models.ModelSerialiser):
class Meta:
model = Choice
exclude = ('poll,')
class PollSerialiser(serialiser.Serialiser):
api_name = 'poll'
question = fields.Field()
publ... | <commit_before>
from nap import models, fields, api, serialiser, publisher
from .models import Choice, Poll
class ChoiceSerialiser(models.ModelSerialiser):
class Meta:
model = Choice
exclude = ('poll,')
class PollSerialiser(serialiser.Serialiser):
api_name = 'poll'
question = fields.F... |
from nap import models, fields, api, serialiser, publisher
from .models import Choice, Poll
class ChoiceSerialiser(models.ModelSerialiser):
class Meta:
model = Choice
exclude = ('poll,')
class PollSerialiser(serialiser.Serialiser):
api_name = 'poll'
question = fields.Field()
publ... |
from nap import models, fields, api, serialiser, publisher
from .models import Choice, Poll
class ChoiceSerialiser(models.ModelSerialiser):
class Meta:
model = Choice
exclude = ('poll,')
class PollSerialiser(serialiser.Serialiser):
api_name = 'poll'
question = fields.Field()
publ... | <commit_before>
from nap import models, fields, api, serialiser, publisher
from .models import Choice, Poll
class ChoiceSerialiser(models.ModelSerialiser):
class Meta:
model = Choice
exclude = ('poll,')
class PollSerialiser(serialiser.Serialiser):
api_name = 'poll'
question = fields.F... |
a3c49c490ffe103f759b935bae31c37c05d26e81 | tests/settings.py | tests/settings.py | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'formtools',
'tests.wizard.wizardtests',
]
SECRET_KEY = 'sp... | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '/tmp/django-formtools-tests.db',
}
}
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'formtools',
... | Use a filesystem db and add the sites app to fix a test failure. | Use a filesystem db and add the sites app to fix a test failure.
| Python | bsd-3-clause | gchp/django-formtools,thenewguy/django-formtools,lastfm/django-formtools,barseghyanartur/django-formtools,thenewguy/django-formtools,barseghyanartur/django-formtools,gchp/django-formtools,lastfm/django-formtools | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'formtools',
'tests.wizard.wizardtests',
]
SECRET_KEY = 'sp... | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '/tmp/django-formtools-tests.db',
}
}
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'formtools',
... | <commit_before># -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'formtools',
'tests.wizard.wizardtests',
]
S... | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '/tmp/django-formtools-tests.db',
}
}
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'formtools',
... | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'formtools',
'tests.wizard.wizardtests',
]
SECRET_KEY = 'sp... | <commit_before># -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'formtools',
'tests.wizard.wizardtests',
]
S... |
36b10d57a812b393c73fe3b4117cc133d0f9d110 | templatemailer/mailer.py | templatemailer/mailer.py | import logging
from django.core import mail
from .tasks import task_email_user
logger = logging.getLogger(__name__)
def send_email(user, template, context, attachments=None, delete_attachments_after_send=False,
language_code=None):
'''
Send email to user
:param user: User instance or re... | import logging
from django.core import mail
from .tasks import task_email_user
logger = logging.getLogger(__name__)
def send_email(user, template, context, attachments=None, delete_attachments_after_send=False,
language_code=None):
'''
Send email to user
:param user: User instance or re... | Fix AttributeError when supplying email address as user | Fix AttributeError when supplying email address as user
| Python | mit | tuomasjaanu/django-templatemailer | import logging
from django.core import mail
from .tasks import task_email_user
logger = logging.getLogger(__name__)
def send_email(user, template, context, attachments=None, delete_attachments_after_send=False,
language_code=None):
'''
Send email to user
:param user: User instance or re... | import logging
from django.core import mail
from .tasks import task_email_user
logger = logging.getLogger(__name__)
def send_email(user, template, context, attachments=None, delete_attachments_after_send=False,
language_code=None):
'''
Send email to user
:param user: User instance or re... | <commit_before>import logging
from django.core import mail
from .tasks import task_email_user
logger = logging.getLogger(__name__)
def send_email(user, template, context, attachments=None, delete_attachments_after_send=False,
language_code=None):
'''
Send email to user
:param user: User... | import logging
from django.core import mail
from .tasks import task_email_user
logger = logging.getLogger(__name__)
def send_email(user, template, context, attachments=None, delete_attachments_after_send=False,
language_code=None):
'''
Send email to user
:param user: User instance or re... | import logging
from django.core import mail
from .tasks import task_email_user
logger = logging.getLogger(__name__)
def send_email(user, template, context, attachments=None, delete_attachments_after_send=False,
language_code=None):
'''
Send email to user
:param user: User instance or re... | <commit_before>import logging
from django.core import mail
from .tasks import task_email_user
logger = logging.getLogger(__name__)
def send_email(user, template, context, attachments=None, delete_attachments_after_send=False,
language_code=None):
'''
Send email to user
:param user: User... |
359cab09d0cf7de375b43f82f9a9507f3c84cd34 | distutilazy/__init__.py | distutilazy/__init__.py | """
distutilazy
-----------
Extra distutils command classes.
:license: MIT, see LICENSE for more details.
"""
__version__ = "0.4.0"
__all__ = ("clean", "pyinstaller", "command")
| """
distutilazy
-----------
Extra distutils command classes.
:license: MIT, see LICENSE for more details.
"""
__version__ = "0.4.1"
__all__ = ("clean", "command", "pyinstaller", "test")
| Add test to __all__ in package, bump version to 0.4.1 | Add test to __all__ in package, bump version to 0.4.1
| Python | mit | farzadghanei/distutilazy | """
distutilazy
-----------
Extra distutils command classes.
:license: MIT, see LICENSE for more details.
"""
__version__ = "0.4.0"
__all__ = ("clean", "pyinstaller", "command")
Add test to __all__ in package, bump version to 0.4.1 | """
distutilazy
-----------
Extra distutils command classes.
:license: MIT, see LICENSE for more details.
"""
__version__ = "0.4.1"
__all__ = ("clean", "command", "pyinstaller", "test")
| <commit_before>"""
distutilazy
-----------
Extra distutils command classes.
:license: MIT, see LICENSE for more details.
"""
__version__ = "0.4.0"
__all__ = ("clean", "pyinstaller", "command")
<commit_msg>Add test to __all__ in package, bump version to 0.4.1<commit_after> | """
distutilazy
-----------
Extra distutils command classes.
:license: MIT, see LICENSE for more details.
"""
__version__ = "0.4.1"
__all__ = ("clean", "command", "pyinstaller", "test")
| """
distutilazy
-----------
Extra distutils command classes.
:license: MIT, see LICENSE for more details.
"""
__version__ = "0.4.0"
__all__ = ("clean", "pyinstaller", "command")
Add test to __all__ in package, bump version to 0.4.1"""
distutilazy
-----------
Extra distutils command classes.
:license: MIT, see LICE... | <commit_before>"""
distutilazy
-----------
Extra distutils command classes.
:license: MIT, see LICENSE for more details.
"""
__version__ = "0.4.0"
__all__ = ("clean", "pyinstaller", "command")
<commit_msg>Add test to __all__ in package, bump version to 0.4.1<commit_after>"""
distutilazy
-----------
Extra distutils ... |
698ab729f60bdb1a4b280bf6f93e9faa0e1b63f9 | run-hooks.py | run-hooks.py | # -*- coding: utf-8 -*-
"""
Eve Demo
~~~~~~~~
A demostration of a simple API powered by Eve REST API.
The live demo is available at eve-demo.herokuapp.com. Please keep in mind
that the it is running on Heroku's free tier using a free MongoHQ
sandbox, which means that the first request to the ... | # -*- coding: utf-8 -*-
"""
Eve Demo
~~~~~~~~
A demostration of a simple API powered by Eve REST API.
The live demo is available at eve-demo.herokuapp.com. Please keep in mind
that the it is running on Heroku's free tier using a free MongoHQ
sandbox, which means that the first request to the ... | Prepare for PyCon Belarus 2018 | Prepare for PyCon Belarus 2018
| Python | bsd-3-clause | nicolaiarocci/eve-demo | # -*- coding: utf-8 -*-
"""
Eve Demo
~~~~~~~~
A demostration of a simple API powered by Eve REST API.
The live demo is available at eve-demo.herokuapp.com. Please keep in mind
that the it is running on Heroku's free tier using a free MongoHQ
sandbox, which means that the first request to the ... | # -*- coding: utf-8 -*-
"""
Eve Demo
~~~~~~~~
A demostration of a simple API powered by Eve REST API.
The live demo is available at eve-demo.herokuapp.com. Please keep in mind
that the it is running on Heroku's free tier using a free MongoHQ
sandbox, which means that the first request to the ... | <commit_before># -*- coding: utf-8 -*-
"""
Eve Demo
~~~~~~~~
A demostration of a simple API powered by Eve REST API.
The live demo is available at eve-demo.herokuapp.com. Please keep in mind
that the it is running on Heroku's free tier using a free MongoHQ
sandbox, which means that the first ... | # -*- coding: utf-8 -*-
"""
Eve Demo
~~~~~~~~
A demostration of a simple API powered by Eve REST API.
The live demo is available at eve-demo.herokuapp.com. Please keep in mind
that the it is running on Heroku's free tier using a free MongoHQ
sandbox, which means that the first request to the ... | # -*- coding: utf-8 -*-
"""
Eve Demo
~~~~~~~~
A demostration of a simple API powered by Eve REST API.
The live demo is available at eve-demo.herokuapp.com. Please keep in mind
that the it is running on Heroku's free tier using a free MongoHQ
sandbox, which means that the first request to the ... | <commit_before># -*- coding: utf-8 -*-
"""
Eve Demo
~~~~~~~~
A demostration of a simple API powered by Eve REST API.
The live demo is available at eve-demo.herokuapp.com. Please keep in mind
that the it is running on Heroku's free tier using a free MongoHQ
sandbox, which means that the first ... |
8d56fe74b373efe2dd3bbaffbde9eddd6fae6da7 | piot/sensor/sumppump.py | piot/sensor/sumppump.py | import time
from periphery import GPIO
from piot.sensor.base import BaseAnalogSensor
class SumpPump(BaseAnalogSensor):
def __init__(self):
self.min_normal=30
self.max_normal=200
self.unit='cm'
self.error_sentinel=None
def read_analog_sensor(self):
trig=GPIO(23, 'out... | import time
from periphery import GPIO
from piot.sensor.base import BaseAnalogSensor
class SumpPump(BaseAnalogSensor):
def __init__(self):
self.min_normal=30
self.max_normal=200
self.unit='cm'
self.error_sentinel=None
def read_analog_sensor(self):
trig=GPIO(23, 'out... | Return distance from sump pump sensor | Return distance from sump pump sensor
| Python | mit | tnewman/PIoT,tnewman/PIoT,tnewman/PIoT | import time
from periphery import GPIO
from piot.sensor.base import BaseAnalogSensor
class SumpPump(BaseAnalogSensor):
def __init__(self):
self.min_normal=30
self.max_normal=200
self.unit='cm'
self.error_sentinel=None
def read_analog_sensor(self):
trig=GPIO(23, 'out... | import time
from periphery import GPIO
from piot.sensor.base import BaseAnalogSensor
class SumpPump(BaseAnalogSensor):
def __init__(self):
self.min_normal=30
self.max_normal=200
self.unit='cm'
self.error_sentinel=None
def read_analog_sensor(self):
trig=GPIO(23, 'out... | <commit_before>import time
from periphery import GPIO
from piot.sensor.base import BaseAnalogSensor
class SumpPump(BaseAnalogSensor):
def __init__(self):
self.min_normal=30
self.max_normal=200
self.unit='cm'
self.error_sentinel=None
def read_analog_sensor(self):
tri... | import time
from periphery import GPIO
from piot.sensor.base import BaseAnalogSensor
class SumpPump(BaseAnalogSensor):
def __init__(self):
self.min_normal=30
self.max_normal=200
self.unit='cm'
self.error_sentinel=None
def read_analog_sensor(self):
trig=GPIO(23, 'out... | import time
from periphery import GPIO
from piot.sensor.base import BaseAnalogSensor
class SumpPump(BaseAnalogSensor):
def __init__(self):
self.min_normal=30
self.max_normal=200
self.unit='cm'
self.error_sentinel=None
def read_analog_sensor(self):
trig=GPIO(23, 'out... | <commit_before>import time
from periphery import GPIO
from piot.sensor.base import BaseAnalogSensor
class SumpPump(BaseAnalogSensor):
def __init__(self):
self.min_normal=30
self.max_normal=200
self.unit='cm'
self.error_sentinel=None
def read_analog_sensor(self):
tri... |
3d439d81766f354de9ab257d5ed690efd4aeb508 | nap/extras/actions.py | nap/extras/actions.py |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import Writer
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... | Adjust for renamed CSV class | Adjust for renamed CSV class
| Python | bsd-3-clause | limbera/django-nap,MarkusH/django-nap |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import Writer
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... | <commit_before>
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opt... |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import Writer
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... | <commit_before>
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opt... |
dc47a724525186fe99d79e62447efc3dbc9d95b0 | app/groups/utils.py | app/groups/utils.py | from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
from django.contrib.sites.models import Site
def send_group_email(request, to_email, subject, email_text_template, email_html_template):
"""Sends ... | from django.conf import settings
from django.core.mail import EmailMultiAlternatives, get_connection
from django.template.loader import get_template
from django.template import Context
from django.contrib.sites.models import Site
def send_group_email(request, to_email, subject, email_text_template, email_html_template... | Send individual mails, to avoid showing the whole to list, BCC and spamholing from Google | Send individual mails, to avoid showing the whole to list, BCC and spamholing from Google
| Python | bsd-3-clause | nikdoof/test-auth | from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
from django.contrib.sites.models import Site
def send_group_email(request, to_email, subject, email_text_template, email_html_template):
"""Sends ... | from django.conf import settings
from django.core.mail import EmailMultiAlternatives, get_connection
from django.template.loader import get_template
from django.template import Context
from django.contrib.sites.models import Site
def send_group_email(request, to_email, subject, email_text_template, email_html_template... | <commit_before>from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
from django.contrib.sites.models import Site
def send_group_email(request, to_email, subject, email_text_template, email_html_template)... | from django.conf import settings
from django.core.mail import EmailMultiAlternatives, get_connection
from django.template.loader import get_template
from django.template import Context
from django.contrib.sites.models import Site
def send_group_email(request, to_email, subject, email_text_template, email_html_template... | from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
from django.contrib.sites.models import Site
def send_group_email(request, to_email, subject, email_text_template, email_html_template):
"""Sends ... | <commit_before>from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context
from django.contrib.sites.models import Site
def send_group_email(request, to_email, subject, email_text_template, email_html_template)... |
cfcce6d4002657f72afdd780af06b3bfa4d9e10d | neo/test/iotest/test_axonaio.py | neo/test/iotest/test_axonaio.py | """
Tests of neo.io.axonaio
"""
import unittest
from neo.io.axonaio import AxonaIO
from neo.test.iotest.common_io_test import BaseTestIO
from neo.io.proxyobjects import (AnalogSignalProxy,
SpikeTrainProxy, EventProxy, EpochProxy)
from neo import (AnalogSignal, SpikeTrain)
import quantities as pq
impo... | """
Tests of neo.io.axonaio
"""
import unittest
from neo.io.axonaio import AxonaIO
from neo.test.iotest.common_io_test import BaseTestIO
from neo.io.proxyobjects import (AnalogSignalProxy,
SpikeTrainProxy, EventProxy, EpochProxy)
from neo import (AnalogSignal, SpikeTrain)
import quantities as pq
impo... | Add new files to common io tests | Add new files to common io tests
| Python | bsd-3-clause | apdavison/python-neo,NeuralEnsemble/python-neo,JuliaSprenger/python-neo,samuelgarcia/python-neo,INM-6/python-neo | """
Tests of neo.io.axonaio
"""
import unittest
from neo.io.axonaio import AxonaIO
from neo.test.iotest.common_io_test import BaseTestIO
from neo.io.proxyobjects import (AnalogSignalProxy,
SpikeTrainProxy, EventProxy, EpochProxy)
from neo import (AnalogSignal, SpikeTrain)
import quantities as pq
impo... | """
Tests of neo.io.axonaio
"""
import unittest
from neo.io.axonaio import AxonaIO
from neo.test.iotest.common_io_test import BaseTestIO
from neo.io.proxyobjects import (AnalogSignalProxy,
SpikeTrainProxy, EventProxy, EpochProxy)
from neo import (AnalogSignal, SpikeTrain)
import quantities as pq
impo... | <commit_before>"""
Tests of neo.io.axonaio
"""
import unittest
from neo.io.axonaio import AxonaIO
from neo.test.iotest.common_io_test import BaseTestIO
from neo.io.proxyobjects import (AnalogSignalProxy,
SpikeTrainProxy, EventProxy, EpochProxy)
from neo import (AnalogSignal, SpikeTrain)
import quanti... | """
Tests of neo.io.axonaio
"""
import unittest
from neo.io.axonaio import AxonaIO
from neo.test.iotest.common_io_test import BaseTestIO
from neo.io.proxyobjects import (AnalogSignalProxy,
SpikeTrainProxy, EventProxy, EpochProxy)
from neo import (AnalogSignal, SpikeTrain)
import quantities as pq
impo... | """
Tests of neo.io.axonaio
"""
import unittest
from neo.io.axonaio import AxonaIO
from neo.test.iotest.common_io_test import BaseTestIO
from neo.io.proxyobjects import (AnalogSignalProxy,
SpikeTrainProxy, EventProxy, EpochProxy)
from neo import (AnalogSignal, SpikeTrain)
import quantities as pq
impo... | <commit_before>"""
Tests of neo.io.axonaio
"""
import unittest
from neo.io.axonaio import AxonaIO
from neo.test.iotest.common_io_test import BaseTestIO
from neo.io.proxyobjects import (AnalogSignalProxy,
SpikeTrainProxy, EventProxy, EpochProxy)
from neo import (AnalogSignal, SpikeTrain)
import quanti... |
474f213cf2cc4851f9cfcd17652a29ad74ab1f0d | write_csv.py | write_csv.py | import sqlite3
import csv
from datetime import datetime
current_date = datetime.now().strftime('%Y-%m-%d')
destination_file = 'srvy' + current_date + '.csv'
sqlite_file = 'srvy.db'
table_name = 'responses'
date_column = 'date'
time_column = 'time'
score_column = 'score'
question_column = 'question'
conn = sqlite3... | import sqlite3
import csv
from datetime import datetime
current_date = str(datetime.now().strftime('%Y-%m-%d'))
destination_file = 'srvy' + current_date + '.csv'
sqlite_file = 'srvy.db'
table_name = 'responses'
date_column = 'date'
time_column = 'time'
score_column = 'score'
question_column = 'question'
conn = sq... | Change current date in SQLite query to tuple | Change current date in SQLite query to tuple
| Python | mit | andrewlrogers/srvy | import sqlite3
import csv
from datetime import datetime
current_date = datetime.now().strftime('%Y-%m-%d')
destination_file = 'srvy' + current_date + '.csv'
sqlite_file = 'srvy.db'
table_name = 'responses'
date_column = 'date'
time_column = 'time'
score_column = 'score'
question_column = 'question'
conn = sqlite3... | import sqlite3
import csv
from datetime import datetime
current_date = str(datetime.now().strftime('%Y-%m-%d'))
destination_file = 'srvy' + current_date + '.csv'
sqlite_file = 'srvy.db'
table_name = 'responses'
date_column = 'date'
time_column = 'time'
score_column = 'score'
question_column = 'question'
conn = sq... | <commit_before>import sqlite3
import csv
from datetime import datetime
current_date = datetime.now().strftime('%Y-%m-%d')
destination_file = 'srvy' + current_date + '.csv'
sqlite_file = 'srvy.db'
table_name = 'responses'
date_column = 'date'
time_column = 'time'
score_column = 'score'
question_column = 'question'
... | import sqlite3
import csv
from datetime import datetime
current_date = str(datetime.now().strftime('%Y-%m-%d'))
destination_file = 'srvy' + current_date + '.csv'
sqlite_file = 'srvy.db'
table_name = 'responses'
date_column = 'date'
time_column = 'time'
score_column = 'score'
question_column = 'question'
conn = sq... | import sqlite3
import csv
from datetime import datetime
current_date = datetime.now().strftime('%Y-%m-%d')
destination_file = 'srvy' + current_date + '.csv'
sqlite_file = 'srvy.db'
table_name = 'responses'
date_column = 'date'
time_column = 'time'
score_column = 'score'
question_column = 'question'
conn = sqlite3... | <commit_before>import sqlite3
import csv
from datetime import datetime
current_date = datetime.now().strftime('%Y-%m-%d')
destination_file = 'srvy' + current_date + '.csv'
sqlite_file = 'srvy.db'
table_name = 'responses'
date_column = 'date'
time_column = 'time'
score_column = 'score'
question_column = 'question'
... |
1c9540879d8761d9252c3fb3f749ae0b6d5be2b9 | wqflask/utility/elasticsearch_tools.py | wqflask/utility/elasticsearch_tools.py | es = None
try:
from elasticsearch import Elasticsearch, TransportError
from utility.tools import ELASTICSEARCH_HOST, ELASTICSEARCH_PORT
es = Elasticsearch([{
"host": ELASTICSEARCH_HOST
, "port": ELASTICSEARCH_PORT
}]) if (ELASTICSEARCH_HOST and ELASTICSEARCH_PORT) else None
except:
... | es = None
try:
from elasticsearch import Elasticsearch, TransportError
from utility.tools import ELASTICSEARCH_HOST, ELASTICSEARCH_PORT
es = Elasticsearch([{
"host": ELASTICSEARCH_HOST
, "port": ELASTICSEARCH_PORT
}]) if (ELASTICSEARCH_HOST and ELASTICSEARCH_PORT) else None
except:
... | Refactor common items to more generic methods. | Refactor common items to more generic methods.
* Refactor code that can be used in more than one place to a more
generic method/function that's called by other methods
| Python | agpl-3.0 | pjotrp/genenetwork2,zsloan/genenetwork2,DannyArends/genenetwork2,genenetwork/genenetwork2,DannyArends/genenetwork2,zsloan/genenetwork2,pjotrp/genenetwork2,DannyArends/genenetwork2,pjotrp/genenetwork2,zsloan/genenetwork2,DannyArends/genenetwork2,DannyArends/genenetwork2,zsloan/genenetwork2,pjotrp/genenetwork2,DannyArend... | es = None
try:
from elasticsearch import Elasticsearch, TransportError
from utility.tools import ELASTICSEARCH_HOST, ELASTICSEARCH_PORT
es = Elasticsearch([{
"host": ELASTICSEARCH_HOST
, "port": ELASTICSEARCH_PORT
}]) if (ELASTICSEARCH_HOST and ELASTICSEARCH_PORT) else None
except:
... | es = None
try:
from elasticsearch import Elasticsearch, TransportError
from utility.tools import ELASTICSEARCH_HOST, ELASTICSEARCH_PORT
es = Elasticsearch([{
"host": ELASTICSEARCH_HOST
, "port": ELASTICSEARCH_PORT
}]) if (ELASTICSEARCH_HOST and ELASTICSEARCH_PORT) else None
except:
... | <commit_before>es = None
try:
from elasticsearch import Elasticsearch, TransportError
from utility.tools import ELASTICSEARCH_HOST, ELASTICSEARCH_PORT
es = Elasticsearch([{
"host": ELASTICSEARCH_HOST
, "port": ELASTICSEARCH_PORT
}]) if (ELASTICSEARCH_HOST and ELASTICSEARCH_PORT) else No... | es = None
try:
from elasticsearch import Elasticsearch, TransportError
from utility.tools import ELASTICSEARCH_HOST, ELASTICSEARCH_PORT
es = Elasticsearch([{
"host": ELASTICSEARCH_HOST
, "port": ELASTICSEARCH_PORT
}]) if (ELASTICSEARCH_HOST and ELASTICSEARCH_PORT) else None
except:
... | es = None
try:
from elasticsearch import Elasticsearch, TransportError
from utility.tools import ELASTICSEARCH_HOST, ELASTICSEARCH_PORT
es = Elasticsearch([{
"host": ELASTICSEARCH_HOST
, "port": ELASTICSEARCH_PORT
}]) if (ELASTICSEARCH_HOST and ELASTICSEARCH_PORT) else None
except:
... | <commit_before>es = None
try:
from elasticsearch import Elasticsearch, TransportError
from utility.tools import ELASTICSEARCH_HOST, ELASTICSEARCH_PORT
es = Elasticsearch([{
"host": ELASTICSEARCH_HOST
, "port": ELASTICSEARCH_PORT
}]) if (ELASTICSEARCH_HOST and ELASTICSEARCH_PORT) else No... |
2438efb99b85fbc76cd285792c1511e7e2813a05 | zeus/api/resources/repository_tests.py | zeus/api/resources/repository_tests.py | from datetime import timedelta
from sqlalchemy.sql import func
from zeus.config import db
from zeus.constants import Result, Status
from zeus.models import Repository, TestCase, Job
from zeus.utils import timezone
from .base_repository import BaseRepositoryResource
from ..schemas import TestCaseStatisticsSchema
test... | from datetime import timedelta
from sqlalchemy.sql import func
from zeus.config import db
from zeus.constants import Result, Status
from zeus.models import Repository, TestCase, Job
from zeus.utils import timezone
from .base_repository import BaseRepositoryResource
from ..schemas import TestCaseStatisticsSchema
test... | Simplify query plan for repo tests | ref: Simplify query plan for repo tests
| Python | apache-2.0 | getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus | from datetime import timedelta
from sqlalchemy.sql import func
from zeus.config import db
from zeus.constants import Result, Status
from zeus.models import Repository, TestCase, Job
from zeus.utils import timezone
from .base_repository import BaseRepositoryResource
from ..schemas import TestCaseStatisticsSchema
test... | from datetime import timedelta
from sqlalchemy.sql import func
from zeus.config import db
from zeus.constants import Result, Status
from zeus.models import Repository, TestCase, Job
from zeus.utils import timezone
from .base_repository import BaseRepositoryResource
from ..schemas import TestCaseStatisticsSchema
test... | <commit_before>from datetime import timedelta
from sqlalchemy.sql import func
from zeus.config import db
from zeus.constants import Result, Status
from zeus.models import Repository, TestCase, Job
from zeus.utils import timezone
from .base_repository import BaseRepositoryResource
from ..schemas import TestCaseStatist... | from datetime import timedelta
from sqlalchemy.sql import func
from zeus.config import db
from zeus.constants import Result, Status
from zeus.models import Repository, TestCase, Job
from zeus.utils import timezone
from .base_repository import BaseRepositoryResource
from ..schemas import TestCaseStatisticsSchema
test... | from datetime import timedelta
from sqlalchemy.sql import func
from zeus.config import db
from zeus.constants import Result, Status
from zeus.models import Repository, TestCase, Job
from zeus.utils import timezone
from .base_repository import BaseRepositoryResource
from ..schemas import TestCaseStatisticsSchema
test... | <commit_before>from datetime import timedelta
from sqlalchemy.sql import func
from zeus.config import db
from zeus.constants import Result, Status
from zeus.models import Repository, TestCase, Job
from zeus.utils import timezone
from .base_repository import BaseRepositoryResource
from ..schemas import TestCaseStatist... |
08c2e38f9c87926476e7ad346001bf2a8271ab47 | wikichatter/TalkPageParser.py | wikichatter/TalkPageParser.py | import mwparserfromhell as mwp
from . import IndentTree
from . import WikiComments as wc
class Page:
def __init__(self):
self.indent = -2
def __str__(self):
return "Talk_Page"
class Section:
def __init__(self, heading):
self.heading = heading
self.indent = -1
def __st... | import mwparserfromhell as mwp
from . import IndentTree
from . import WikiComments as wc
class Page:
def __init__(self):
self.indent = -2
def __str__(self):
return "Talk_Page"
class Section:
def __init__(self, heading):
self.heading = heading
self.indent = -1
def __... | Switch to flat sections to avoid double including subsections | Switch to flat sections to avoid double including subsections
| Python | mit | kjschiroo/WikiChatter | import mwparserfromhell as mwp
from . import IndentTree
from . import WikiComments as wc
class Page:
def __init__(self):
self.indent = -2
def __str__(self):
return "Talk_Page"
class Section:
def __init__(self, heading):
self.heading = heading
self.indent = -1
def __st... | import mwparserfromhell as mwp
from . import IndentTree
from . import WikiComments as wc
class Page:
def __init__(self):
self.indent = -2
def __str__(self):
return "Talk_Page"
class Section:
def __init__(self, heading):
self.heading = heading
self.indent = -1
def __... | <commit_before>import mwparserfromhell as mwp
from . import IndentTree
from . import WikiComments as wc
class Page:
def __init__(self):
self.indent = -2
def __str__(self):
return "Talk_Page"
class Section:
def __init__(self, heading):
self.heading = heading
self.indent = -... | import mwparserfromhell as mwp
from . import IndentTree
from . import WikiComments as wc
class Page:
def __init__(self):
self.indent = -2
def __str__(self):
return "Talk_Page"
class Section:
def __init__(self, heading):
self.heading = heading
self.indent = -1
def __... | import mwparserfromhell as mwp
from . import IndentTree
from . import WikiComments as wc
class Page:
def __init__(self):
self.indent = -2
def __str__(self):
return "Talk_Page"
class Section:
def __init__(self, heading):
self.heading = heading
self.indent = -1
def __st... | <commit_before>import mwparserfromhell as mwp
from . import IndentTree
from . import WikiComments as wc
class Page:
def __init__(self):
self.indent = -2
def __str__(self):
return "Talk_Page"
class Section:
def __init__(self, heading):
self.heading = heading
self.indent = -... |
f35c6f989129d6298eb2f419ccb6fe8d4c734fd6 | taskq/run.py | taskq/run.py | import time
import transaction
from taskq import models
from daemon import runner
class TaskRunner():
def __init__(self):
self.stdin_path = '/dev/null'
self.stdout_path = '/dev/tty'
self.stderr_path = '/dev/tty'
self.pidfile_path = '/tmp/task-runner.pid'
self.pidfile_timeo... | import time
import transaction
from daemon import runner
from taskq import models
class TaskDaemonRunner(runner.DaemonRunner):
def _status(self):
pid = self.pidfile.read_pid()
message = []
if pid:
message += ['Daemon started with pid %s' % pid]
else:
messag... | Add status to the daemon | Add status to the daemon
| Python | mit | LeResKP/sqla-taskq | import time
import transaction
from taskq import models
from daemon import runner
class TaskRunner():
def __init__(self):
self.stdin_path = '/dev/null'
self.stdout_path = '/dev/tty'
self.stderr_path = '/dev/tty'
self.pidfile_path = '/tmp/task-runner.pid'
self.pidfile_timeo... | import time
import transaction
from daemon import runner
from taskq import models
class TaskDaemonRunner(runner.DaemonRunner):
def _status(self):
pid = self.pidfile.read_pid()
message = []
if pid:
message += ['Daemon started with pid %s' % pid]
else:
messag... | <commit_before>import time
import transaction
from taskq import models
from daemon import runner
class TaskRunner():
def __init__(self):
self.stdin_path = '/dev/null'
self.stdout_path = '/dev/tty'
self.stderr_path = '/dev/tty'
self.pidfile_path = '/tmp/task-runner.pid'
sel... | import time
import transaction
from daemon import runner
from taskq import models
class TaskDaemonRunner(runner.DaemonRunner):
def _status(self):
pid = self.pidfile.read_pid()
message = []
if pid:
message += ['Daemon started with pid %s' % pid]
else:
messag... | import time
import transaction
from taskq import models
from daemon import runner
class TaskRunner():
def __init__(self):
self.stdin_path = '/dev/null'
self.stdout_path = '/dev/tty'
self.stderr_path = '/dev/tty'
self.pidfile_path = '/tmp/task-runner.pid'
self.pidfile_timeo... | <commit_before>import time
import transaction
from taskq import models
from daemon import runner
class TaskRunner():
def __init__(self):
self.stdin_path = '/dev/null'
self.stdout_path = '/dev/tty'
self.stderr_path = '/dev/tty'
self.pidfile_path = '/tmp/task-runner.pid'
sel... |
91d6503ebf3188a6e27058efcb10c0855df3542a | falafel/tests/test_api_generator.py | falafel/tests/test_api_generator.py | import unittest
from tools import generate_api_config
class TestAPIGen(unittest.TestCase):
@classmethod
def setUpClass(cls):
from falafel.mappers import * # noqa
pass
def setUp(self):
self.latest = generate_api_config.APIConfigGenerator(plugin_package="falafel").serialize_data_s... | import unittest
from falafel.tools import generate_api_config
class TestAPIGen(unittest.TestCase):
@classmethod
def setUpClass(cls):
from falafel.mappers import * # noqa
pass
def setUp(self):
self.latest = generate_api_config.APIConfigGenerator(plugin_package="falafel").serializ... | Fix failing API gen test | Fix failing API gen test
| Python | apache-2.0 | RedHatInsights/insights-core,RedHatInsights/insights-core | import unittest
from tools import generate_api_config
class TestAPIGen(unittest.TestCase):
@classmethod
def setUpClass(cls):
from falafel.mappers import * # noqa
pass
def setUp(self):
self.latest = generate_api_config.APIConfigGenerator(plugin_package="falafel").serialize_data_s... | import unittest
from falafel.tools import generate_api_config
class TestAPIGen(unittest.TestCase):
@classmethod
def setUpClass(cls):
from falafel.mappers import * # noqa
pass
def setUp(self):
self.latest = generate_api_config.APIConfigGenerator(plugin_package="falafel").serializ... | <commit_before>import unittest
from tools import generate_api_config
class TestAPIGen(unittest.TestCase):
@classmethod
def setUpClass(cls):
from falafel.mappers import * # noqa
pass
def setUp(self):
self.latest = generate_api_config.APIConfigGenerator(plugin_package="falafel").s... | import unittest
from falafel.tools import generate_api_config
class TestAPIGen(unittest.TestCase):
@classmethod
def setUpClass(cls):
from falafel.mappers import * # noqa
pass
def setUp(self):
self.latest = generate_api_config.APIConfigGenerator(plugin_package="falafel").serializ... | import unittest
from tools import generate_api_config
class TestAPIGen(unittest.TestCase):
@classmethod
def setUpClass(cls):
from falafel.mappers import * # noqa
pass
def setUp(self):
self.latest = generate_api_config.APIConfigGenerator(plugin_package="falafel").serialize_data_s... | <commit_before>import unittest
from tools import generate_api_config
class TestAPIGen(unittest.TestCase):
@classmethod
def setUpClass(cls):
from falafel.mappers import * # noqa
pass
def setUp(self):
self.latest = generate_api_config.APIConfigGenerator(plugin_package="falafel").s... |
5ed0474407669ebbca1e2a3f5a74ea3260bd3f2b | TimeSeriesTools/__init__.py | TimeSeriesTools/__init__.py |
__author__ = 'To\xc3\xb1o G. Quintela (tgq.spm@gmail.com)'
__version__ = '0.0.0'
#from pyCausality.TimeSeries.TS import *
#from pyCausality.TimeSeries.automatic_thresholding import *
#from pyCausality.TimeSeries.distances import *
#from pyCausality.TimeSeries.measures import *
#from pyCausality.TimeSeries.smoothing... |
__author__ = 'To\xc3\xb1o G. Quintela (tgq.spm@gmail.com)'
__version__ = '0.0.0'
#from pyCausality.TimeSeries.TS import *
#from pyCausality.TimeSeries.automatic_thresholding import *
#from pyCausality.TimeSeries.distances import *
#from pyCausality.TimeSeries.measures import *
#from pyCausality.TimeSeries.smoothing... | Add ts statistics to the tests module. | Add ts statistics to the tests module.
| Python | mit | tgquintela/TimeSeriesTools,tgquintela/TimeSeriesTools |
__author__ = 'To\xc3\xb1o G. Quintela (tgq.spm@gmail.com)'
__version__ = '0.0.0'
#from pyCausality.TimeSeries.TS import *
#from pyCausality.TimeSeries.automatic_thresholding import *
#from pyCausality.TimeSeries.distances import *
#from pyCausality.TimeSeries.measures import *
#from pyCausality.TimeSeries.smoothing... |
__author__ = 'To\xc3\xb1o G. Quintela (tgq.spm@gmail.com)'
__version__ = '0.0.0'
#from pyCausality.TimeSeries.TS import *
#from pyCausality.TimeSeries.automatic_thresholding import *
#from pyCausality.TimeSeries.distances import *
#from pyCausality.TimeSeries.measures import *
#from pyCausality.TimeSeries.smoothing... | <commit_before>
__author__ = 'To\xc3\xb1o G. Quintela (tgq.spm@gmail.com)'
__version__ = '0.0.0'
#from pyCausality.TimeSeries.TS import *
#from pyCausality.TimeSeries.automatic_thresholding import *
#from pyCausality.TimeSeries.distances import *
#from pyCausality.TimeSeries.measures import *
#from pyCausality.TimeS... |
__author__ = 'To\xc3\xb1o G. Quintela (tgq.spm@gmail.com)'
__version__ = '0.0.0'
#from pyCausality.TimeSeries.TS import *
#from pyCausality.TimeSeries.automatic_thresholding import *
#from pyCausality.TimeSeries.distances import *
#from pyCausality.TimeSeries.measures import *
#from pyCausality.TimeSeries.smoothing... |
__author__ = 'To\xc3\xb1o G. Quintela (tgq.spm@gmail.com)'
__version__ = '0.0.0'
#from pyCausality.TimeSeries.TS import *
#from pyCausality.TimeSeries.automatic_thresholding import *
#from pyCausality.TimeSeries.distances import *
#from pyCausality.TimeSeries.measures import *
#from pyCausality.TimeSeries.smoothing... | <commit_before>
__author__ = 'To\xc3\xb1o G. Quintela (tgq.spm@gmail.com)'
__version__ = '0.0.0'
#from pyCausality.TimeSeries.TS import *
#from pyCausality.TimeSeries.automatic_thresholding import *
#from pyCausality.TimeSeries.distances import *
#from pyCausality.TimeSeries.measures import *
#from pyCausality.TimeS... |
76abc1d6043a509418027c618d16c5a38502f2f2 | findaconf/tests/test_site_routes.py | findaconf/tests/test_site_routes.py | # coding: utf-8
from findaconf import app, db
from findaconf.tests.config import set_app, unset_app
from unittest import TestCase
class TestSiteRoutes(TestCase):
def setUp(self):
self.app = set_app(app, db)
def tearDown(self):
unset_app(db)
# test routes from blueprint/site.py
def ... | # coding: utf-8
from findaconf import app, db
from findaconf.tests.config import set_app, unset_app
from unittest import TestCase
class TestSiteRoutes(TestCase):
def setUp(self):
self.app = set_app(app, db)
def tearDown(self):
unset_app(db)
# test routes from blueprint/site.py
def ... | Add tests for login oauth links | Add tests for login oauth links
| Python | mit | cuducos/findaconf,cuducos/findaconf,koorukuroo/findaconf,koorukuroo/findaconf,koorukuroo/findaconf,cuducos/findaconf | # coding: utf-8
from findaconf import app, db
from findaconf.tests.config import set_app, unset_app
from unittest import TestCase
class TestSiteRoutes(TestCase):
def setUp(self):
self.app = set_app(app, db)
def tearDown(self):
unset_app(db)
# test routes from blueprint/site.py
def ... | # coding: utf-8
from findaconf import app, db
from findaconf.tests.config import set_app, unset_app
from unittest import TestCase
class TestSiteRoutes(TestCase):
def setUp(self):
self.app = set_app(app, db)
def tearDown(self):
unset_app(db)
# test routes from blueprint/site.py
def ... | <commit_before># coding: utf-8
from findaconf import app, db
from findaconf.tests.config import set_app, unset_app
from unittest import TestCase
class TestSiteRoutes(TestCase):
def setUp(self):
self.app = set_app(app, db)
def tearDown(self):
unset_app(db)
# test routes from blueprint/s... | # coding: utf-8
from findaconf import app, db
from findaconf.tests.config import set_app, unset_app
from unittest import TestCase
class TestSiteRoutes(TestCase):
def setUp(self):
self.app = set_app(app, db)
def tearDown(self):
unset_app(db)
# test routes from blueprint/site.py
def ... | # coding: utf-8
from findaconf import app, db
from findaconf.tests.config import set_app, unset_app
from unittest import TestCase
class TestSiteRoutes(TestCase):
def setUp(self):
self.app = set_app(app, db)
def tearDown(self):
unset_app(db)
# test routes from blueprint/site.py
def ... | <commit_before># coding: utf-8
from findaconf import app, db
from findaconf.tests.config import set_app, unset_app
from unittest import TestCase
class TestSiteRoutes(TestCase):
def setUp(self):
self.app = set_app(app, db)
def tearDown(self):
unset_app(db)
# test routes from blueprint/s... |
0663793adc99b83d76578f5266e07e2ecbb4bd71 | test/run_tests.py | test/run_tests.py | """This module uses unittest TestLoader to run tests"""
import sys
import unittest
if __name__ == '__main__':
sys.dont_write_bytecode = True
SUITE = unittest.TestLoader().discover(".")
unittest.TextTestRunner(verbosity=2, buffer=True).run(SUITE)
| """This module uses unittest TestLoader to run tests"""
import sys
import unittest
if __name__ == '__main__':
sys.dont_write_bytecode = True
SUITE = unittest.TestLoader().discover(".")
unittest.TextTestRunner(verbosity=1, buffer=True).run(SUITE)
| Make run_test output less verbose | Make run_test output less verbose
| Python | mit | blairck/chess_notation | """This module uses unittest TestLoader to run tests"""
import sys
import unittest
if __name__ == '__main__':
sys.dont_write_bytecode = True
SUITE = unittest.TestLoader().discover(".")
unittest.TextTestRunner(verbosity=2, buffer=True).run(SUITE)
Make run_test output less verbose | """This module uses unittest TestLoader to run tests"""
import sys
import unittest
if __name__ == '__main__':
sys.dont_write_bytecode = True
SUITE = unittest.TestLoader().discover(".")
unittest.TextTestRunner(verbosity=1, buffer=True).run(SUITE)
| <commit_before>"""This module uses unittest TestLoader to run tests"""
import sys
import unittest
if __name__ == '__main__':
sys.dont_write_bytecode = True
SUITE = unittest.TestLoader().discover(".")
unittest.TextTestRunner(verbosity=2, buffer=True).run(SUITE)
<commit_msg>Make run_test output less verbose<... | """This module uses unittest TestLoader to run tests"""
import sys
import unittest
if __name__ == '__main__':
sys.dont_write_bytecode = True
SUITE = unittest.TestLoader().discover(".")
unittest.TextTestRunner(verbosity=1, buffer=True).run(SUITE)
| """This module uses unittest TestLoader to run tests"""
import sys
import unittest
if __name__ == '__main__':
sys.dont_write_bytecode = True
SUITE = unittest.TestLoader().discover(".")
unittest.TextTestRunner(verbosity=2, buffer=True).run(SUITE)
Make run_test output less verbose"""This module uses unittest... | <commit_before>"""This module uses unittest TestLoader to run tests"""
import sys
import unittest
if __name__ == '__main__':
sys.dont_write_bytecode = True
SUITE = unittest.TestLoader().discover(".")
unittest.TextTestRunner(verbosity=2, buffer=True).run(SUITE)
<commit_msg>Make run_test output less verbose<... |
2080c35b6708718a4014fcbb23e1de3c82d42245 | opps/core/__init__.py | opps/core/__init__.py | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
trans_app_label = _('Core')
| # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
trans_app_label = _('Opps')
| Change trans app label core models to CMS name | Change trans app label core models to CMS name
| Python | mit | opps/opps,opps/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,williamroot/opps,opps/opps | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
trans_app_label = _('Core')
Change trans app label core models to CMS name | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
trans_app_label = _('Opps')
| <commit_before># -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
trans_app_label = _('Core')
<commit_msg>Change trans app label core models to CMS name<commit_after> | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
trans_app_label = _('Opps')
| # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
trans_app_label = _('Core')
Change trans app label core models to CMS name# -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
trans_app_label = _('Opps')
| <commit_before># -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
trans_app_label = _('Core')
<commit_msg>Change trans app label core models to CMS name<commit_after># -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
trans_app_label = _('Opps')
|
3e2746de9aae541880fe4cf643520a2577a3a0d5 | tof_server/views.py | tof_server/views.py | """This module provides views for application."""
from tof_server import app, versioning, mysql
from flask import jsonify, make_response
import string, random
@app.route('/')
def index():
"""Server information"""
return jsonify({
'server-version' : versioning.SERVER_VERSION,
'client-versions' :... | """This module provides views for application."""
from tof_server import app, versioning, mysql
from flask import jsonify, make_response
import string, random
@app.route('/')
def index():
"""Server information"""
return jsonify({
'server-version' : versioning.SERVER_VERSION,
'client-versions' :... | Add stub methods for map handling | Add stub methods for map handling
| Python | mit | P1X-in/Tanks-of-Freedom-Server | """This module provides views for application."""
from tof_server import app, versioning, mysql
from flask import jsonify, make_response
import string, random
@app.route('/')
def index():
"""Server information"""
return jsonify({
'server-version' : versioning.SERVER_VERSION,
'client-versions' :... | """This module provides views for application."""
from tof_server import app, versioning, mysql
from flask import jsonify, make_response
import string, random
@app.route('/')
def index():
"""Server information"""
return jsonify({
'server-version' : versioning.SERVER_VERSION,
'client-versions' :... | <commit_before>"""This module provides views for application."""
from tof_server import app, versioning, mysql
from flask import jsonify, make_response
import string, random
@app.route('/')
def index():
"""Server information"""
return jsonify({
'server-version' : versioning.SERVER_VERSION,
'cli... | """This module provides views for application."""
from tof_server import app, versioning, mysql
from flask import jsonify, make_response
import string, random
@app.route('/')
def index():
"""Server information"""
return jsonify({
'server-version' : versioning.SERVER_VERSION,
'client-versions' :... | """This module provides views for application."""
from tof_server import app, versioning, mysql
from flask import jsonify, make_response
import string, random
@app.route('/')
def index():
"""Server information"""
return jsonify({
'server-version' : versioning.SERVER_VERSION,
'client-versions' :... | <commit_before>"""This module provides views for application."""
from tof_server import app, versioning, mysql
from flask import jsonify, make_response
import string, random
@app.route('/')
def index():
"""Server information"""
return jsonify({
'server-version' : versioning.SERVER_VERSION,
'cli... |
757f984f37d6b3f989c7d9109a09834c2834197f | pipeline/compute_rpp/compute_rpp.py | pipeline/compute_rpp/compute_rpp.py | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path = sys.argv[2]
# We can create a list of ... | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.restoration import denoise
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path... | Update the pipeline to take into account the outlier rejection method to compute the RPP | Update the pipeline to take into account the outlier rejection method to compute the RPP
| Python | mit | clemaitre58/power-profile,clemaitre58/power-profile,glemaitre/power-profile,glemaitre/power-profile | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path = sys.argv[2]
# We can create a list of ... | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.restoration import denoise
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path... | <commit_before>import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path = sys.argv[2]
# We can cr... | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.restoration import denoise
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path... | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path = sys.argv[2]
# We can create a list of ... | <commit_before>import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path = sys.argv[2]
# We can cr... |
d6536696f322beba321384ec58c1576b56d3eec2 | clio/utils.py | clio/utils.py |
import json
from bson import json_util
from flask.wrappers import Request, cached_property
def getBoolean(string):
if string is None:
return False
return {
'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False, '': False, None: False
... |
import json
from bson import json_util, BSON
from flask.wrappers import Request, cached_property
def getBoolean(string):
if string is None:
return False
return {
'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False, '': False, None: F... | Add support for decoding data serialized as BSON. | Add support for decoding data serialized as BSON.
| Python | apache-2.0 | geodelic/clio,geodelic/clio |
import json
from bson import json_util
from flask.wrappers import Request, cached_property
def getBoolean(string):
if string is None:
return False
return {
'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False, '': False, None: False
... |
import json
from bson import json_util, BSON
from flask.wrappers import Request, cached_property
def getBoolean(string):
if string is None:
return False
return {
'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False, '': False, None: F... | <commit_before>
import json
from bson import json_util
from flask.wrappers import Request, cached_property
def getBoolean(string):
if string is None:
return False
return {
'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False, '': False... |
import json
from bson import json_util, BSON
from flask.wrappers import Request, cached_property
def getBoolean(string):
if string is None:
return False
return {
'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False, '': False, None: F... |
import json
from bson import json_util
from flask.wrappers import Request, cached_property
def getBoolean(string):
if string is None:
return False
return {
'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False, '': False, None: False
... | <commit_before>
import json
from bson import json_util
from flask.wrappers import Request, cached_property
def getBoolean(string):
if string is None:
return False
return {
'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False, '': False... |
aa359661c31df53885e19f5acb2e0171b6f87398 | recipe_scrapers/innit.py | recipe_scrapers/innit.py | from ._abstract import AbstractScraper
"""
Note that innit hosts recipes for several companies. I found it while looking at centralmarket.com
"""
class Innit(AbstractScraper):
@classmethod
def host(self, domain="com"):
return f"innit.{domain}"
| from ._abstract import AbstractScraper
"""
Note that innit hosts recipes for several companies. I found it while looking at centralmarket.com
"""
class Innit(AbstractScraper):
@classmethod
def host(self, domain="com"):
return f"innit.{domain}"
def title(self):
return self.schema.tit... | Add wrapper methods for clarity. | Add wrapper methods for clarity.
| Python | mit | hhursev/recipe-scraper | from ._abstract import AbstractScraper
"""
Note that innit hosts recipes for several companies. I found it while looking at centralmarket.com
"""
class Innit(AbstractScraper):
@classmethod
def host(self, domain="com"):
return f"innit.{domain}"
Add wrapper methods for clarity. | from ._abstract import AbstractScraper
"""
Note that innit hosts recipes for several companies. I found it while looking at centralmarket.com
"""
class Innit(AbstractScraper):
@classmethod
def host(self, domain="com"):
return f"innit.{domain}"
def title(self):
return self.schema.tit... | <commit_before>from ._abstract import AbstractScraper
"""
Note that innit hosts recipes for several companies. I found it while looking at centralmarket.com
"""
class Innit(AbstractScraper):
@classmethod
def host(self, domain="com"):
return f"innit.{domain}"
<commit_msg>Add wrapper methods for c... | from ._abstract import AbstractScraper
"""
Note that innit hosts recipes for several companies. I found it while looking at centralmarket.com
"""
class Innit(AbstractScraper):
@classmethod
def host(self, domain="com"):
return f"innit.{domain}"
def title(self):
return self.schema.tit... | from ._abstract import AbstractScraper
"""
Note that innit hosts recipes for several companies. I found it while looking at centralmarket.com
"""
class Innit(AbstractScraper):
@classmethod
def host(self, domain="com"):
return f"innit.{domain}"
Add wrapper methods for clarity.from ._abstract impo... | <commit_before>from ._abstract import AbstractScraper
"""
Note that innit hosts recipes for several companies. I found it while looking at centralmarket.com
"""
class Innit(AbstractScraper):
@classmethod
def host(self, domain="com"):
return f"innit.{domain}"
<commit_msg>Add wrapper methods for c... |
d06ff3fede08430146a03efb7964363fa950b1c9 | pyon/util/int_test.py | pyon/util/int_test.py | #!/usr/bin/env python
"""Integration test base class and utils"""
from contextlib import contextmanager
import unittest
from pyon.container.cc import Container
from pyon.core.bootstrap import bootstrap_pyon
# Make this call more deterministic in time.
bootstrap_pyon()
class IonIntegrationTestCase(unittest.TestCase... | #!/usr/bin/env python
"""Integration test base class and utils"""
from contextlib import contextmanager
import unittest
from pyon.container.cc import Container
from pyon.core.bootstrap import bootstrap_pyon
from mock import patch
# Make this call more deterministic in time.
bootstrap_pyon()
class IonIntegrationTes... | Add option to turn on queue auto delete | Add option to turn on queue auto delete
| Python | bsd-2-clause | mkl-/scioncc,crchemist/scioncc,scionrep/scioncc,mkl-/scioncc,scionrep/scioncc,crchemist/scioncc,scionrep/scioncc,mkl-/scioncc,crchemist/scioncc,ooici/pyon,ooici/pyon | #!/usr/bin/env python
"""Integration test base class and utils"""
from contextlib import contextmanager
import unittest
from pyon.container.cc import Container
from pyon.core.bootstrap import bootstrap_pyon
# Make this call more deterministic in time.
bootstrap_pyon()
class IonIntegrationTestCase(unittest.TestCase... | #!/usr/bin/env python
"""Integration test base class and utils"""
from contextlib import contextmanager
import unittest
from pyon.container.cc import Container
from pyon.core.bootstrap import bootstrap_pyon
from mock import patch
# Make this call more deterministic in time.
bootstrap_pyon()
class IonIntegrationTes... | <commit_before>#!/usr/bin/env python
"""Integration test base class and utils"""
from contextlib import contextmanager
import unittest
from pyon.container.cc import Container
from pyon.core.bootstrap import bootstrap_pyon
# Make this call more deterministic in time.
bootstrap_pyon()
class IonIntegrationTestCase(un... | #!/usr/bin/env python
"""Integration test base class and utils"""
from contextlib import contextmanager
import unittest
from pyon.container.cc import Container
from pyon.core.bootstrap import bootstrap_pyon
from mock import patch
# Make this call more deterministic in time.
bootstrap_pyon()
class IonIntegrationTes... | #!/usr/bin/env python
"""Integration test base class and utils"""
from contextlib import contextmanager
import unittest
from pyon.container.cc import Container
from pyon.core.bootstrap import bootstrap_pyon
# Make this call more deterministic in time.
bootstrap_pyon()
class IonIntegrationTestCase(unittest.TestCase... | <commit_before>#!/usr/bin/env python
"""Integration test base class and utils"""
from contextlib import contextmanager
import unittest
from pyon.container.cc import Container
from pyon.core.bootstrap import bootstrap_pyon
# Make this call more deterministic in time.
bootstrap_pyon()
class IonIntegrationTestCase(un... |
af42088008ec2592885005e1a6e2b0ae52fd15a8 | File.py | File.py | import scipy.io.wavfile as wav
import numpy
import warnings
def wavread(filename):
with warnings.catch_warnings():
warnings.simplefilter("ignore")
fs,x = wav.read(filename)
maxv = numpy.iinfo(x.dtype).max
x = x.astype('float')
x = x / maxv
return (fs,x)
def wavwrite(filename, fs, x):
maxv = numpy.iinfo(nump... | import scipy.io.wavfile as wav
import numpy
import warnings
def wavread(filename):
with warnings.catch_warnings():
warnings.simplefilter("ignore")
fs,x = wav.read(filename)
maxv = numpy.iinfo(x.dtype).max
return (fs,x.astype('float') / maxv)
def wavwrite(filename, fs, x):
maxv = numpy.iinfo(numpy.int16).max
... | Test fuer WAV write und read gleichheit | Test fuer WAV write und read gleichheit
| Python | mit | antiface/dspy,nils-werner/dspy | import scipy.io.wavfile as wav
import numpy
import warnings
def wavread(filename):
with warnings.catch_warnings():
warnings.simplefilter("ignore")
fs,x = wav.read(filename)
maxv = numpy.iinfo(x.dtype).max
x = x.astype('float')
x = x / maxv
return (fs,x)
def wavwrite(filename, fs, x):
maxv = numpy.iinfo(nump... | import scipy.io.wavfile as wav
import numpy
import warnings
def wavread(filename):
with warnings.catch_warnings():
warnings.simplefilter("ignore")
fs,x = wav.read(filename)
maxv = numpy.iinfo(x.dtype).max
return (fs,x.astype('float') / maxv)
def wavwrite(filename, fs, x):
maxv = numpy.iinfo(numpy.int16).max
... | <commit_before>import scipy.io.wavfile as wav
import numpy
import warnings
def wavread(filename):
with warnings.catch_warnings():
warnings.simplefilter("ignore")
fs,x = wav.read(filename)
maxv = numpy.iinfo(x.dtype).max
x = x.astype('float')
x = x / maxv
return (fs,x)
def wavwrite(filename, fs, x):
maxv = n... | import scipy.io.wavfile as wav
import numpy
import warnings
def wavread(filename):
with warnings.catch_warnings():
warnings.simplefilter("ignore")
fs,x = wav.read(filename)
maxv = numpy.iinfo(x.dtype).max
return (fs,x.astype('float') / maxv)
def wavwrite(filename, fs, x):
maxv = numpy.iinfo(numpy.int16).max
... | import scipy.io.wavfile as wav
import numpy
import warnings
def wavread(filename):
with warnings.catch_warnings():
warnings.simplefilter("ignore")
fs,x = wav.read(filename)
maxv = numpy.iinfo(x.dtype).max
x = x.astype('float')
x = x / maxv
return (fs,x)
def wavwrite(filename, fs, x):
maxv = numpy.iinfo(nump... | <commit_before>import scipy.io.wavfile as wav
import numpy
import warnings
def wavread(filename):
with warnings.catch_warnings():
warnings.simplefilter("ignore")
fs,x = wav.read(filename)
maxv = numpy.iinfo(x.dtype).max
x = x.astype('float')
x = x / maxv
return (fs,x)
def wavwrite(filename, fs, x):
maxv = n... |
93d066f464a048881010a9d468a727a48e78c69d | books/CrackingCodesWithPython/Chapter20/vigenereDictionaryHacker.py | books/CrackingCodesWithPython/Chapter20/vigenereDictionaryHacker.py | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
from books.CrackingCodesWithPython.pyperclip import copy
from books.CrackingCodesWithPython.Chapter11.detectEnglish import isEnglish
from books.CrackingCodesWithPython.Chapter18.vigenereCipher import decryptMessage
def main(... | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
from books.CrackingCodesWithPython.pyperclip import copy
from books.CrackingCodesWithPython.Chapter11.detectEnglish import isEnglish
from books.CrackingCodesWithPython.Chapter18.vigenereCipher import decryptMessage
DICTIONARY... | Update vigenereDicitonaryHacker: added full path to dictionary file | Update vigenereDicitonaryHacker: added full path to dictionary file
| Python | mit | JoseALermaIII/python-tutorials,JoseALermaIII/python-tutorials | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
from books.CrackingCodesWithPython.pyperclip import copy
from books.CrackingCodesWithPython.Chapter11.detectEnglish import isEnglish
from books.CrackingCodesWithPython.Chapter18.vigenereCipher import decryptMessage
def main(... | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
from books.CrackingCodesWithPython.pyperclip import copy
from books.CrackingCodesWithPython.Chapter11.detectEnglish import isEnglish
from books.CrackingCodesWithPython.Chapter18.vigenereCipher import decryptMessage
DICTIONARY... | <commit_before># Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
from books.CrackingCodesWithPython.pyperclip import copy
from books.CrackingCodesWithPython.Chapter11.detectEnglish import isEnglish
from books.CrackingCodesWithPython.Chapter18.vigenereCipher import decryptMess... | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
from books.CrackingCodesWithPython.pyperclip import copy
from books.CrackingCodesWithPython.Chapter11.detectEnglish import isEnglish
from books.CrackingCodesWithPython.Chapter18.vigenereCipher import decryptMessage
DICTIONARY... | # Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
from books.CrackingCodesWithPython.pyperclip import copy
from books.CrackingCodesWithPython.Chapter11.detectEnglish import isEnglish
from books.CrackingCodesWithPython.Chapter18.vigenereCipher import decryptMessage
def main(... | <commit_before># Vigenère Cipher Dictionary Hacker
# https://www.nostarch.com/crackingcodes/ (BSD Licensed)
from books.CrackingCodesWithPython.pyperclip import copy
from books.CrackingCodesWithPython.Chapter11.detectEnglish import isEnglish
from books.CrackingCodesWithPython.Chapter18.vigenereCipher import decryptMess... |
4b54a8a038d5f9f2ead224b030f87f393d57d40b | tests/__init__.py | tests/__init__.py | """Test suite for distutils.
This test suite consists of a collection of test modules in the
distutils.tests package. Each test module has a name starting with
'test' and contains a function test_suite(). The function is expected
to return an initialized unittest.TestSuite instance.
Tests for the command classes in... | """Test suite for distutils.
This test suite consists of a collection of test modules in the
distutils.tests package. Each test module has a name starting with
'test' and contains a function test_suite(). The function is expected
to return an initialized unittest.TestSuite instance.
Tests for the command classes in... | Fix test_copyreg when numpy is installed (GH-20935) | bpo-41003: Fix test_copyreg when numpy is installed (GH-20935)
Fix test_copyreg when numpy is installed: test.pickletester now
saves/restores warnings.filters when importing numpy, to ignore
filters installed by numpy.
Add the save_restore_warnings_filters() function to the
test.support.warnings_helper module. | Python | mit | pypa/setuptools,pypa/setuptools,pypa/setuptools | """Test suite for distutils.
This test suite consists of a collection of test modules in the
distutils.tests package. Each test module has a name starting with
'test' and contains a function test_suite(). The function is expected
to return an initialized unittest.TestSuite instance.
Tests for the command classes in... | """Test suite for distutils.
This test suite consists of a collection of test modules in the
distutils.tests package. Each test module has a name starting with
'test' and contains a function test_suite(). The function is expected
to return an initialized unittest.TestSuite instance.
Tests for the command classes in... | <commit_before>"""Test suite for distutils.
This test suite consists of a collection of test modules in the
distutils.tests package. Each test module has a name starting with
'test' and contains a function test_suite(). The function is expected
to return an initialized unittest.TestSuite instance.
Tests for the com... | """Test suite for distutils.
This test suite consists of a collection of test modules in the
distutils.tests package. Each test module has a name starting with
'test' and contains a function test_suite(). The function is expected
to return an initialized unittest.TestSuite instance.
Tests for the command classes in... | """Test suite for distutils.
This test suite consists of a collection of test modules in the
distutils.tests package. Each test module has a name starting with
'test' and contains a function test_suite(). The function is expected
to return an initialized unittest.TestSuite instance.
Tests for the command classes in... | <commit_before>"""Test suite for distutils.
This test suite consists of a collection of test modules in the
distutils.tests package. Each test module has a name starting with
'test' and contains a function test_suite(). The function is expected
to return an initialized unittest.TestSuite instance.
Tests for the com... |
19656decb756db364d012cbfb13d0ddf30e15bae | py/tests/test_runner.py | py/tests/test_runner.py | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | Fix running python tests by changing the env directly | [SW-1610][FollowUp] Fix running python tests by changing the env directly
(cherry picked from commit 0d808a100cd14fce9d4fba4f9cde6ad5315fbc12)
| Python | apache-2.0 | h2oai/sparkling-water,h2oai/sparkling-water,h2oai/sparkling-water,h2oai/sparkling-water | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | <commit_before>#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License");... | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | <commit_before>#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License");... |
bc6999e5e587a5e4dfd8b65f168de8ebce8bc93b | webnotes/website/doctype/blog_category/blog_category.py | webnotes/website/doctype/blog_category/blog_category.py | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache
class DocType(WebsiteGenerator):
def __init__(self, d, dl):
self.doc, self.do... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache
class DocType(WebsiteGenerator):
def __init__(self, d, dl):
self.doc, self.do... | Fix in Blog Category Naming | Fix in Blog Category Naming
| Python | mit | aboganas/frappe,RicardoJohann/frappe,gangadharkadam/letzfrappe,mbauskar/omnitech-demo-frappe,mhbu50/frappe,BhupeshGupta/frappe,gangadhar-kadam/laganfrappe,mbauskar/omnitech-frappe,shitolepriya/test-frappe,shitolepriya/test-frappe,mbauskar/tele-frappe,gangadharkadam/letzfrappe,gangadharkadam/frappecontribution,sbktechno... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache
class DocType(WebsiteGenerator):
def __init__(self, d, dl):
self.doc, self.do... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache
class DocType(WebsiteGenerator):
def __init__(self, d, dl):
self.doc, self.do... | <commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache
class DocType(WebsiteGenerator):
def __init__(self, d, dl):
se... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache
class DocType(WebsiteGenerator):
def __init__(self, d, dl):
self.doc, self.do... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache
class DocType(WebsiteGenerator):
def __init__(self, d, dl):
self.doc, self.do... | <commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache
class DocType(WebsiteGenerator):
def __init__(self, d, dl):
se... |
3ec2cc49a68894572f2eafc9172f4140791b6fc5 | sremailer.py | sremailer.py | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
import bottle
import stoneridge
@bottle.post('/email')
def email():
r = bottle.request.form... | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
import bottle
import logging
import stoneridge
@bottle.post('/email')
def email():
logging.... | Add logging to email daemon | Add logging to email daemon
| Python | mpl-2.0 | mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
import bottle
import stoneridge
@bottle.post('/email')
def email():
r = bottle.request.form... | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
import bottle
import logging
import stoneridge
@bottle.post('/email')
def email():
logging.... | <commit_before>#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
import bottle
import stoneridge
@bottle.post('/email')
def email():
r = bott... | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
import bottle
import logging
import stoneridge
@bottle.post('/email')
def email():
logging.... | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
import bottle
import stoneridge
@bottle.post('/email')
def email():
r = bottle.request.form... | <commit_before>#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
import bottle
import stoneridge
@bottle.post('/email')
def email():
r = bott... |
37bedf8495834f0773f8a082c3f358321ebb8f77 | src/utils.py | src/utils.py | import os
vowels = ['a e i o u']
constanents = ['b c d f g h j k l m n p q r s t v w x y z 1 2 3 4 \
5 6 7 8 9 0']
def inInventory(itemClass, player):
for item in player.inventory:
if isinstance(item, itemClass):
return True
break
return False
def getItemFrom... | import os
vowels = ['a e i o u'].split(' ')
consonants = ['b c d f g h j k l m n p q r s t v w x y z 1 2 3 4 \
5 6 7 8 9 0'].split(' ')
def inInventory(itemClass, player):
for item in player.inventory:
if isinstance(item, itemClass):
return True
break
return Fa... | Fix @DaVinci789's crappy spelling >:) | Fix @DaVinci789's crappy spelling >:)
| Python | mit | allanburleson/python-adventure-game,disorientedperson/python-adventure-game | import os
vowels = ['a e i o u']
constanents = ['b c d f g h j k l m n p q r s t v w x y z 1 2 3 4 \
5 6 7 8 9 0']
def inInventory(itemClass, player):
for item in player.inventory:
if isinstance(item, itemClass):
return True
break
return False
def getItemFrom... | import os
vowels = ['a e i o u'].split(' ')
consonants = ['b c d f g h j k l m n p q r s t v w x y z 1 2 3 4 \
5 6 7 8 9 0'].split(' ')
def inInventory(itemClass, player):
for item in player.inventory:
if isinstance(item, itemClass):
return True
break
return Fa... | <commit_before>import os
vowels = ['a e i o u']
constanents = ['b c d f g h j k l m n p q r s t v w x y z 1 2 3 4 \
5 6 7 8 9 0']
def inInventory(itemClass, player):
for item in player.inventory:
if isinstance(item, itemClass):
return True
break
return False
... | import os
vowels = ['a e i o u'].split(' ')
consonants = ['b c d f g h j k l m n p q r s t v w x y z 1 2 3 4 \
5 6 7 8 9 0'].split(' ')
def inInventory(itemClass, player):
for item in player.inventory:
if isinstance(item, itemClass):
return True
break
return Fa... | import os
vowels = ['a e i o u']
constanents = ['b c d f g h j k l m n p q r s t v w x y z 1 2 3 4 \
5 6 7 8 9 0']
def inInventory(itemClass, player):
for item in player.inventory:
if isinstance(item, itemClass):
return True
break
return False
def getItemFrom... | <commit_before>import os
vowels = ['a e i o u']
constanents = ['b c d f g h j k l m n p q r s t v w x y z 1 2 3 4 \
5 6 7 8 9 0']
def inInventory(itemClass, player):
for item in player.inventory:
if isinstance(item, itemClass):
return True
break
return False
... |
5f73fd983caa758a77f0fd823425057bd8b36204 | devproject/devproject/urls.py | devproject/devproject/urls.py | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')),
url(r'^pinboard/', include('ditto.pinboard.urls', namespace='pinboard')),
url(r'^twitter/', include... | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')),
url(r'^pinboard/', include('ditto.pinboard.urls', namespace='pinboard')),
url(r'^twitter/', include... | Fix deprecation re url patterns | Fix deprecation re url patterns
| Python | mit | philgyford/django-ditto,philgyford/django-ditto,philgyford/django-ditto | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')),
url(r'^pinboard/', include('ditto.pinboard.urls', namespace='pinboard')),
url(r'^twitter/', include... | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')),
url(r'^pinboard/', include('ditto.pinboard.urls', namespace='pinboard')),
url(r'^twitter/', include... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')),
url(r'^pinboard/', include('ditto.pinboard.urls', namespace='pinboard')),
url(r'^twi... | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')),
url(r'^pinboard/', include('ditto.pinboard.urls', namespace='pinboard')),
url(r'^twitter/', include... | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')),
url(r'^pinboard/', include('ditto.pinboard.urls', namespace='pinboard')),
url(r'^twitter/', include... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')),
url(r'^pinboard/', include('ditto.pinboard.urls', namespace='pinboard')),
url(r'^twi... |
b57a2e184e3861617c12801529295b0095257cd9 | petition/resources.py | petition/resources.py | from import_export import resources
from .models import Signature
class SignatureResource(resources.ModelResource):
class Meta:
exclude = ('created_on', 'modified_on')
model = Signature
| from import_export import resources
import swapper
Signature = swapper.load_model("petition", "Signature")
class SignatureResource(resources.ModelResource):
class Meta:
model = Signature
| Fix swappable model in signature export | Fix swappable model in signature export
| Python | mit | watchdogpolska/django-one-petition,watchdogpolska/django-one-petition,watchdogpolska/django-one-petition | from import_export import resources
from .models import Signature
class SignatureResource(resources.ModelResource):
class Meta:
exclude = ('created_on', 'modified_on')
model = Signature
Fix swappable model in signature export | from import_export import resources
import swapper
Signature = swapper.load_model("petition", "Signature")
class SignatureResource(resources.ModelResource):
class Meta:
model = Signature
| <commit_before>from import_export import resources
from .models import Signature
class SignatureResource(resources.ModelResource):
class Meta:
exclude = ('created_on', 'modified_on')
model = Signature
<commit_msg>Fix swappable model in signature export<commit_after> | from import_export import resources
import swapper
Signature = swapper.load_model("petition", "Signature")
class SignatureResource(resources.ModelResource):
class Meta:
model = Signature
| from import_export import resources
from .models import Signature
class SignatureResource(resources.ModelResource):
class Meta:
exclude = ('created_on', 'modified_on')
model = Signature
Fix swappable model in signature exportfrom import_export import resources
import swapper
Signature = swapper.l... | <commit_before>from import_export import resources
from .models import Signature
class SignatureResource(resources.ModelResource):
class Meta:
exclude = ('created_on', 'modified_on')
model = Signature
<commit_msg>Fix swappable model in signature export<commit_after>from import_export import resour... |
8851223a1576a4e164449b589f68c0420966d622 | PythonScript/GenerateBook.py | PythonScript/GenerateBook.py | #Set Cover=Cover
#Set BookCover=%BookName%%Cover%
#Set BookCoverHTML=%BookCover%%HTMLExt%
#Call pandoc ..\source\%BookCover%%BookExt% -o %BookCoverHTML% --standalone %CSS_%%Cover%%CSSExt% --verbose
def GenerateCover():
pass
if __name__ == '__main__':
GenerateCover()
| import subprocess
def GenerateCover():
Cover = "Cover"
BookName = "BookName"
BookCover = BookName + Cover
BookExt = "BookExt"
HTMLExt = "HTMLExt"
BookCoverHTML = BookCover + HTMLExt
CSS = "CSS_"
CSSExt = "CSSExt"
pandocCommand = "pandoc ..\\source\\" + BookCover + BookExt + " -o "
+ BookCoverHTML + " -standa... | Implement GenerateCover using fake vars | Implement GenerateCover using fake vars
| Python | mit | fan-jiang/Dujing | #Set Cover=Cover
#Set BookCover=%BookName%%Cover%
#Set BookCoverHTML=%BookCover%%HTMLExt%
#Call pandoc ..\source\%BookCover%%BookExt% -o %BookCoverHTML% --standalone %CSS_%%Cover%%CSSExt% --verbose
def GenerateCover():
pass
if __name__ == '__main__':
GenerateCover()
Implement GenerateCover using fake vars | import subprocess
def GenerateCover():
Cover = "Cover"
BookName = "BookName"
BookCover = BookName + Cover
BookExt = "BookExt"
HTMLExt = "HTMLExt"
BookCoverHTML = BookCover + HTMLExt
CSS = "CSS_"
CSSExt = "CSSExt"
pandocCommand = "pandoc ..\\source\\" + BookCover + BookExt + " -o "
+ BookCoverHTML + " -standa... | <commit_before>#Set Cover=Cover
#Set BookCover=%BookName%%Cover%
#Set BookCoverHTML=%BookCover%%HTMLExt%
#Call pandoc ..\source\%BookCover%%BookExt% -o %BookCoverHTML% --standalone %CSS_%%Cover%%CSSExt% --verbose
def GenerateCover():
pass
if __name__ == '__main__':
GenerateCover()
<commit_msg>Implement GenerateCove... | import subprocess
def GenerateCover():
Cover = "Cover"
BookName = "BookName"
BookCover = BookName + Cover
BookExt = "BookExt"
HTMLExt = "HTMLExt"
BookCoverHTML = BookCover + HTMLExt
CSS = "CSS_"
CSSExt = "CSSExt"
pandocCommand = "pandoc ..\\source\\" + BookCover + BookExt + " -o "
+ BookCoverHTML + " -standa... | #Set Cover=Cover
#Set BookCover=%BookName%%Cover%
#Set BookCoverHTML=%BookCover%%HTMLExt%
#Call pandoc ..\source\%BookCover%%BookExt% -o %BookCoverHTML% --standalone %CSS_%%Cover%%CSSExt% --verbose
def GenerateCover():
pass
if __name__ == '__main__':
GenerateCover()
Implement GenerateCover using fake varsimport sub... | <commit_before>#Set Cover=Cover
#Set BookCover=%BookName%%Cover%
#Set BookCoverHTML=%BookCover%%HTMLExt%
#Call pandoc ..\source\%BookCover%%BookExt% -o %BookCoverHTML% --standalone %CSS_%%Cover%%CSSExt% --verbose
def GenerateCover():
pass
if __name__ == '__main__':
GenerateCover()
<commit_msg>Implement GenerateCove... |
795d76074b0d8336ebe29b3816186732d29c0cd2 | deployer/__init__.py | deployer/__init__.py | from __future__ import absolute_import
import deployer.logger
from celery.signals import setup_logging
__version__ = '0.5.0'
__author__ = 'sukrit'
deployer.logger.init_logging()
setup_logging.connect(deployer.logger.init_celery_logging)
| from __future__ import absolute_import
import deployer.logger
from celery.signals import setup_logging
__version__ = '0.5.1'
__author__ = 'sukrit'
deployer.logger.init_logging()
setup_logging.connect(deployer.logger.init_celery_logging)
| Update to next dev version | Update to next dev version | Python | mit | totem/cluster-deployer,totem/cluster-deployer,totem/cluster-deployer | from __future__ import absolute_import
import deployer.logger
from celery.signals import setup_logging
__version__ = '0.5.0'
__author__ = 'sukrit'
deployer.logger.init_logging()
setup_logging.connect(deployer.logger.init_celery_logging)
Update to next dev version | from __future__ import absolute_import
import deployer.logger
from celery.signals import setup_logging
__version__ = '0.5.1'
__author__ = 'sukrit'
deployer.logger.init_logging()
setup_logging.connect(deployer.logger.init_celery_logging)
| <commit_before>from __future__ import absolute_import
import deployer.logger
from celery.signals import setup_logging
__version__ = '0.5.0'
__author__ = 'sukrit'
deployer.logger.init_logging()
setup_logging.connect(deployer.logger.init_celery_logging)
<commit_msg>Update to next dev version<commit_after> | from __future__ import absolute_import
import deployer.logger
from celery.signals import setup_logging
__version__ = '0.5.1'
__author__ = 'sukrit'
deployer.logger.init_logging()
setup_logging.connect(deployer.logger.init_celery_logging)
| from __future__ import absolute_import
import deployer.logger
from celery.signals import setup_logging
__version__ = '0.5.0'
__author__ = 'sukrit'
deployer.logger.init_logging()
setup_logging.connect(deployer.logger.init_celery_logging)
Update to next dev versionfrom __future__ import absolute_import
import deployer... | <commit_before>from __future__ import absolute_import
import deployer.logger
from celery.signals import setup_logging
__version__ = '0.5.0'
__author__ = 'sukrit'
deployer.logger.init_logging()
setup_logging.connect(deployer.logger.init_celery_logging)
<commit_msg>Update to next dev version<commit_after>from __future... |
2b7a703aab3e07cee82a0b1cc494dab71d7c22df | bin/build-scripts/write_build_time.py | bin/build-scripts/write_build_time.py | #!/usr/bin/env python
import time
now = time.time()
formatted = time.strftime("%B %d, %Y %H:%M:%S UTC", time.gmtime())
print 'exports.string = %r' % formatted
# Note Javascript uses milliseconds:
print 'exports.timestamp = %i' % int(now * 1000)
import subprocess
print 'exports.gitrevision = %r' % subprocess.check_ou... | #!/usr/bin/env python
import time
now = time.time()
formatted = time.strftime("%B %d, %Y %H:%M:%S UTC", time.gmtime())
print 'exports.string = %r' % formatted
# Note Javascript uses milliseconds:
print 'exports.timestamp = %i' % int(now * 1000)
import subprocess
print 'exports.gitrevision = %r' % subprocess.check_ou... | Use correct latest commit in __version__ endpoint | Use correct latest commit in __version__ endpoint
| Python | mpl-2.0 | mozilla-services/pageshot,mozilla-services/screenshots,mozilla-services/pageshot,mozilla-services/pageshot,mozilla-services/screenshots,mozilla-services/screenshots,mozilla-services/screenshots,mozilla-services/pageshot | #!/usr/bin/env python
import time
now = time.time()
formatted = time.strftime("%B %d, %Y %H:%M:%S UTC", time.gmtime())
print 'exports.string = %r' % formatted
# Note Javascript uses milliseconds:
print 'exports.timestamp = %i' % int(now * 1000)
import subprocess
print 'exports.gitrevision = %r' % subprocess.check_ou... | #!/usr/bin/env python
import time
now = time.time()
formatted = time.strftime("%B %d, %Y %H:%M:%S UTC", time.gmtime())
print 'exports.string = %r' % formatted
# Note Javascript uses milliseconds:
print 'exports.timestamp = %i' % int(now * 1000)
import subprocess
print 'exports.gitrevision = %r' % subprocess.check_ou... | <commit_before>#!/usr/bin/env python
import time
now = time.time()
formatted = time.strftime("%B %d, %Y %H:%M:%S UTC", time.gmtime())
print 'exports.string = %r' % formatted
# Note Javascript uses milliseconds:
print 'exports.timestamp = %i' % int(now * 1000)
import subprocess
print 'exports.gitrevision = %r' % subp... | #!/usr/bin/env python
import time
now = time.time()
formatted = time.strftime("%B %d, %Y %H:%M:%S UTC", time.gmtime())
print 'exports.string = %r' % formatted
# Note Javascript uses milliseconds:
print 'exports.timestamp = %i' % int(now * 1000)
import subprocess
print 'exports.gitrevision = %r' % subprocess.check_ou... | #!/usr/bin/env python
import time
now = time.time()
formatted = time.strftime("%B %d, %Y %H:%M:%S UTC", time.gmtime())
print 'exports.string = %r' % formatted
# Note Javascript uses milliseconds:
print 'exports.timestamp = %i' % int(now * 1000)
import subprocess
print 'exports.gitrevision = %r' % subprocess.check_ou... | <commit_before>#!/usr/bin/env python
import time
now = time.time()
formatted = time.strftime("%B %d, %Y %H:%M:%S UTC", time.gmtime())
print 'exports.string = %r' % formatted
# Note Javascript uses milliseconds:
print 'exports.timestamp = %i' % int(now * 1000)
import subprocess
print 'exports.gitrevision = %r' % subp... |
3a57d826a957b864753895d8769dcf747d489e1b | administrator/serializers.py | administrator/serializers.py | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | Remove category serializer from subcategory serializer | Remove category serializer from subcategory serializer
| Python | apache-2.0 | belatrix/BackendAllStars | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | <commit_before>from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subc... | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | <commit_before>from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subc... |
0960ca60effa80ca52a715d30f9651741c3b9800 | python/sparknlp/annotation.py | python/sparknlp/annotation.py | from pyspark.sql.types import *
class Annotation:
def __init__(self, annotator_type, begin, end, result, metadata, embeddings):
self.annotator_type = annotator_type
self.begin = begin
self.end = end
self.result = result
self.metadata = metadata
self.embeddings = em... | from pyspark.sql.types import *
class Annotation:
def __init__(self, annotator_type, begin, end, result, metadata, embeddings):
self.annotator_type = annotator_type
self.begin = begin
self.end = end
self.result = result
self.metadata = metadata
self.embeddings = em... | Fix Python dataType Annotation [skip travis] | Fix Python dataType Annotation [skip travis]
Fix in python dataType for Annotation [skip travis] | Python | apache-2.0 | JohnSnowLabs/spark-nlp,JohnSnowLabs/spark-nlp,JohnSnowLabs/spark-nlp,JohnSnowLabs/spark-nlp | from pyspark.sql.types import *
class Annotation:
def __init__(self, annotator_type, begin, end, result, metadata, embeddings):
self.annotator_type = annotator_type
self.begin = begin
self.end = end
self.result = result
self.metadata = metadata
self.embeddings = em... | from pyspark.sql.types import *
class Annotation:
def __init__(self, annotator_type, begin, end, result, metadata, embeddings):
self.annotator_type = annotator_type
self.begin = begin
self.end = end
self.result = result
self.metadata = metadata
self.embeddings = em... | <commit_before>from pyspark.sql.types import *
class Annotation:
def __init__(self, annotator_type, begin, end, result, metadata, embeddings):
self.annotator_type = annotator_type
self.begin = begin
self.end = end
self.result = result
self.metadata = metadata
self.... | from pyspark.sql.types import *
class Annotation:
def __init__(self, annotator_type, begin, end, result, metadata, embeddings):
self.annotator_type = annotator_type
self.begin = begin
self.end = end
self.result = result
self.metadata = metadata
self.embeddings = em... | from pyspark.sql.types import *
class Annotation:
def __init__(self, annotator_type, begin, end, result, metadata, embeddings):
self.annotator_type = annotator_type
self.begin = begin
self.end = end
self.result = result
self.metadata = metadata
self.embeddings = em... | <commit_before>from pyspark.sql.types import *
class Annotation:
def __init__(self, annotator_type, begin, end, result, metadata, embeddings):
self.annotator_type = annotator_type
self.begin = begin
self.end = end
self.result = result
self.metadata = metadata
self.... |
30cf33413086f558a07638aadf8b38f6e887a7fc | openedx/core/djangoapps/appsembler/settings/settings/devstack_lms.py | openedx/core/djangoapps/appsembler/settings/settings/devstack_lms.py | """
Settings for Appsembler on devstack/LMS.
"""
from os import path
from openedx.core.djangoapps.appsembler.settings.settings import devstack_common
def plugin_settings(settings):
"""
Appsembler LMS overrides for devstack.
"""
devstack_common.plugin_settings(settings)
settings.DEBUG_TOOLBAR_PAT... | """
Settings for Appsembler on devstack/LMS.
"""
from os import path
from openedx.core.djangoapps.appsembler.settings.settings import devstack_common
def plugin_settings(settings):
"""
Appsembler LMS overrides for devstack.
"""
devstack_common.plugin_settings(settings)
settings.DEBUG_TOOLBAR_PAT... | Fix /media/ redirects on devstack | Fix /media/ redirects on devstack
| Python | agpl-3.0 | appsembler/edx-platform,appsembler/edx-platform,appsembler/edx-platform,appsembler/edx-platform | """
Settings for Appsembler on devstack/LMS.
"""
from os import path
from openedx.core.djangoapps.appsembler.settings.settings import devstack_common
def plugin_settings(settings):
"""
Appsembler LMS overrides for devstack.
"""
devstack_common.plugin_settings(settings)
settings.DEBUG_TOOLBAR_PAT... | """
Settings for Appsembler on devstack/LMS.
"""
from os import path
from openedx.core.djangoapps.appsembler.settings.settings import devstack_common
def plugin_settings(settings):
"""
Appsembler LMS overrides for devstack.
"""
devstack_common.plugin_settings(settings)
settings.DEBUG_TOOLBAR_PAT... | <commit_before>"""
Settings for Appsembler on devstack/LMS.
"""
from os import path
from openedx.core.djangoapps.appsembler.settings.settings import devstack_common
def plugin_settings(settings):
"""
Appsembler LMS overrides for devstack.
"""
devstack_common.plugin_settings(settings)
settings.DE... | """
Settings for Appsembler on devstack/LMS.
"""
from os import path
from openedx.core.djangoapps.appsembler.settings.settings import devstack_common
def plugin_settings(settings):
"""
Appsembler LMS overrides for devstack.
"""
devstack_common.plugin_settings(settings)
settings.DEBUG_TOOLBAR_PAT... | """
Settings for Appsembler on devstack/LMS.
"""
from os import path
from openedx.core.djangoapps.appsembler.settings.settings import devstack_common
def plugin_settings(settings):
"""
Appsembler LMS overrides for devstack.
"""
devstack_common.plugin_settings(settings)
settings.DEBUG_TOOLBAR_PAT... | <commit_before>"""
Settings for Appsembler on devstack/LMS.
"""
from os import path
from openedx.core.djangoapps.appsembler.settings.settings import devstack_common
def plugin_settings(settings):
"""
Appsembler LMS overrides for devstack.
"""
devstack_common.plugin_settings(settings)
settings.DE... |
2ce08224bc87ae34f546211c80d2b89a38acd0ec | chromepass.py | chromepass.py | from os import getenv
import sqlite3
import win32crypt
csv_file = open("chromepass.csv",'wb')
csv_file.write("link,username,password\n".encode('utf-8'))
appdata = getenv("APPDATA")
if appdata[-7:] == "Roaming": #Some WINDOWS Installations point to Roaming.
appdata = appdata[:-8]
connection = sqlite3.connect(appdata +... | from os import getenv
import sqlite3
import win32crypt
import argparse
def args_parser():
parser = argparse.ArgumentParser(description="Retrieve Google Chrome Passwords")
parser.add_argument("--output", help="Output to csv file", action="store_true")
args = parser.parse_args()
if args.output:
... | Complete Overhaul. Argeparse used. Outputs to csv | Complete Overhaul. Argeparse used. Outputs to csv
| Python | mit | hassaanaliw/chromepass | from os import getenv
import sqlite3
import win32crypt
csv_file = open("chromepass.csv",'wb')
csv_file.write("link,username,password\n".encode('utf-8'))
appdata = getenv("APPDATA")
if appdata[-7:] == "Roaming": #Some WINDOWS Installations point to Roaming.
appdata = appdata[:-8]
connection = sqlite3.connect(appdata +... | from os import getenv
import sqlite3
import win32crypt
import argparse
def args_parser():
parser = argparse.ArgumentParser(description="Retrieve Google Chrome Passwords")
parser.add_argument("--output", help="Output to csv file", action="store_true")
args = parser.parse_args()
if args.output:
... | <commit_before>from os import getenv
import sqlite3
import win32crypt
csv_file = open("chromepass.csv",'wb')
csv_file.write("link,username,password\n".encode('utf-8'))
appdata = getenv("APPDATA")
if appdata[-7:] == "Roaming": #Some WINDOWS Installations point to Roaming.
appdata = appdata[:-8]
connection = sqlite3.co... | from os import getenv
import sqlite3
import win32crypt
import argparse
def args_parser():
parser = argparse.ArgumentParser(description="Retrieve Google Chrome Passwords")
parser.add_argument("--output", help="Output to csv file", action="store_true")
args = parser.parse_args()
if args.output:
... | from os import getenv
import sqlite3
import win32crypt
csv_file = open("chromepass.csv",'wb')
csv_file.write("link,username,password\n".encode('utf-8'))
appdata = getenv("APPDATA")
if appdata[-7:] == "Roaming": #Some WINDOWS Installations point to Roaming.
appdata = appdata[:-8]
connection = sqlite3.connect(appdata +... | <commit_before>from os import getenv
import sqlite3
import win32crypt
csv_file = open("chromepass.csv",'wb')
csv_file.write("link,username,password\n".encode('utf-8'))
appdata = getenv("APPDATA")
if appdata[-7:] == "Roaming": #Some WINDOWS Installations point to Roaming.
appdata = appdata[:-8]
connection = sqlite3.co... |
7a2e6723a925626b1d8ee6f70c656a9fd5befd5d | airflow/utils/__init__.py | airflow/utils/__init__.py | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | Fix airflow.utils deprecation warning code being Python 3 incompatible | Fix airflow.utils deprecation warning code being Python 3 incompatible
See https://docs.python.org/3.0/whatsnew/3.0.html#operators-and-special-methods
| Python | apache-2.0 | wooga/airflow,AllisonWang/incubator-airflow,sid88in/incubator-airflow,nathanielvarona/airflow,gritlogic/incubator-airflow,hgrif/incubator-airflow,gilt/incubator-airflow,sdiazb/airflow,andyxhadji/incubator-airflow,vijaysbhat/incubator-airflow,dmitry-r/incubator-airflow,mtagle/airflow,gritlogic/incubator-airflow,mrares/i... | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | <commit_before># -*- coding: utf-8 -*-
#
# 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 wri... | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | <commit_before># -*- coding: utf-8 -*-
#
# 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 wri... |
b0b57fd69378c3ed6ee35abd0c45c952a1c52dd1 | planet_alignment/test/config/bunch_parser.py | planet_alignment/test/config/bunch_parser.py | """
.. module:: config_parser
:platform: linux
:synopsis: Module to test the bunch YAML configuration parser.
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/26/15
"""
from bunch import Bunch
import pytest
from planet_alignment.config.bunch_parser import BunchParser
from planet_ali... | """
.. module:: config_parser
:platform: linux
:synopsis: Module to test the bunch YAML configuration parser.
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/26/15
"""
from bunch import Bunch
import pytest
from planet_alignment.config.bunch_parser import BunchParser
from planet_ali... | Remove superfluous 'is True' from the assert. | Remove superfluous 'is True' from the assert.
| Python | mit | paulfanelli/planet_alignment | """
.. module:: config_parser
:platform: linux
:synopsis: Module to test the bunch YAML configuration parser.
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/26/15
"""
from bunch import Bunch
import pytest
from planet_alignment.config.bunch_parser import BunchParser
from planet_ali... | """
.. module:: config_parser
:platform: linux
:synopsis: Module to test the bunch YAML configuration parser.
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/26/15
"""
from bunch import Bunch
import pytest
from planet_alignment.config.bunch_parser import BunchParser
from planet_ali... | <commit_before>"""
.. module:: config_parser
:platform: linux
:synopsis: Module to test the bunch YAML configuration parser.
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/26/15
"""
from bunch import Bunch
import pytest
from planet_alignment.config.bunch_parser import BunchParser
... | """
.. module:: config_parser
:platform: linux
:synopsis: Module to test the bunch YAML configuration parser.
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/26/15
"""
from bunch import Bunch
import pytest
from planet_alignment.config.bunch_parser import BunchParser
from planet_ali... | """
.. module:: config_parser
:platform: linux
:synopsis: Module to test the bunch YAML configuration parser.
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/26/15
"""
from bunch import Bunch
import pytest
from planet_alignment.config.bunch_parser import BunchParser
from planet_ali... | <commit_before>"""
.. module:: config_parser
:platform: linux
:synopsis: Module to test the bunch YAML configuration parser.
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/26/15
"""
from bunch import Bunch
import pytest
from planet_alignment.config.bunch_parser import BunchParser
... |
fd03c80eb7b705f6f3e9e6c554950ed15a7ecdd4 | face_it/settings/dev.py | face_it/settings/dev.py | from .base import *
DEBUG = True
try:
from .local import *
except ImportError:
pass
SOCIAL_AUTH_YAMMER_KEY = 'OCnfR7VJNBbcSS8GXMCi3A'
SOCIAL_AUTH_YAMMER_SECRET = 'y1MZSoo0MuX8RJPEjMbZWJDvafR9mZmFWWUfHOcZgxM'
| from .base import *
DEBUG = True
try:
from .local import *
except ImportError:
pass
| Remove yammer api key that was accidentally committed | Remove yammer api key that was accidentally committed
| Python | cc0-1.0 | m3brown/face_it,m3brown/face_it,excellalabs/face-off,m3brown/face_it,kave/Face-Off,m3brown/face_it,madridsoccer5/face-off,excellalabs/face-off,kave/Face-Off,excellalabs/face-off,madridsoccer5/face-off,kave/Face-Off,excellalabs/face-off,kave/Face-Off,madridsoccer5/face-off,madridsoccer5/face-off | from .base import *
DEBUG = True
try:
from .local import *
except ImportError:
pass
SOCIAL_AUTH_YAMMER_KEY = 'OCnfR7VJNBbcSS8GXMCi3A'
SOCIAL_AUTH_YAMMER_SECRET = 'y1MZSoo0MuX8RJPEjMbZWJDvafR9mZmFWWUfHOcZgxM'
Remove yammer api key that was accidentally committed | from .base import *
DEBUG = True
try:
from .local import *
except ImportError:
pass
| <commit_before>from .base import *
DEBUG = True
try:
from .local import *
except ImportError:
pass
SOCIAL_AUTH_YAMMER_KEY = 'OCnfR7VJNBbcSS8GXMCi3A'
SOCIAL_AUTH_YAMMER_SECRET = 'y1MZSoo0MuX8RJPEjMbZWJDvafR9mZmFWWUfHOcZgxM'
<commit_msg>Remove yammer api key that was accidentally committed<commit_after> | from .base import *
DEBUG = True
try:
from .local import *
except ImportError:
pass
| from .base import *
DEBUG = True
try:
from .local import *
except ImportError:
pass
SOCIAL_AUTH_YAMMER_KEY = 'OCnfR7VJNBbcSS8GXMCi3A'
SOCIAL_AUTH_YAMMER_SECRET = 'y1MZSoo0MuX8RJPEjMbZWJDvafR9mZmFWWUfHOcZgxM'
Remove yammer api key that was accidentally committedfrom .base import *
DEBUG = True
try:
from .local i... | <commit_before>from .base import *
DEBUG = True
try:
from .local import *
except ImportError:
pass
SOCIAL_AUTH_YAMMER_KEY = 'OCnfR7VJNBbcSS8GXMCi3A'
SOCIAL_AUTH_YAMMER_SECRET = 'y1MZSoo0MuX8RJPEjMbZWJDvafR9mZmFWWUfHOcZgxM'
<commit_msg>Remove yammer api key that was accidentally committed<commit_after>from .base im... |
8121924b8d056752a31255646b116e9eb6fbbaa6 | plugins/reversedns.py | plugins/reversedns.py | import logging, interfaces, os, IPy
from StringIO import StringIO
class Shorewall(interfaces.IOpenMesherPlugin):
def __init__(self):
self._files = {}
def process(self, mesh):
logging.debug('Generating DNS config...')
self._files = {}
rdns = StringIO()
for r... | import logging, interfaces, os, IPy
from StringIO import StringIO
class Shorewall(interfaces.IOpenMesherPlugin):
def __init__(self):
self._files = {}
def process(self, mesh):
logging.debug('Generating DNS config...')
self._files = {}
rdns = StringIO()
for r... | Fix bad path for mesh-reverse.db | Fix bad path for mesh-reverse.db
| Python | bsd-3-clause | heyaaron/openmesher,heyaaron/openmesher,darkpixel/openmesher,darkpixel/openmesher | import logging, interfaces, os, IPy
from StringIO import StringIO
class Shorewall(interfaces.IOpenMesherPlugin):
def __init__(self):
self._files = {}
def process(self, mesh):
logging.debug('Generating DNS config...')
self._files = {}
rdns = StringIO()
for r... | import logging, interfaces, os, IPy
from StringIO import StringIO
class Shorewall(interfaces.IOpenMesherPlugin):
def __init__(self):
self._files = {}
def process(self, mesh):
logging.debug('Generating DNS config...')
self._files = {}
rdns = StringIO()
for r... | <commit_before>import logging, interfaces, os, IPy
from StringIO import StringIO
class Shorewall(interfaces.IOpenMesherPlugin):
def __init__(self):
self._files = {}
def process(self, mesh):
logging.debug('Generating DNS config...')
self._files = {}
rdns = StringIO(... | import logging, interfaces, os, IPy
from StringIO import StringIO
class Shorewall(interfaces.IOpenMesherPlugin):
def __init__(self):
self._files = {}
def process(self, mesh):
logging.debug('Generating DNS config...')
self._files = {}
rdns = StringIO()
for r... | import logging, interfaces, os, IPy
from StringIO import StringIO
class Shorewall(interfaces.IOpenMesherPlugin):
def __init__(self):
self._files = {}
def process(self, mesh):
logging.debug('Generating DNS config...')
self._files = {}
rdns = StringIO()
for r... | <commit_before>import logging, interfaces, os, IPy
from StringIO import StringIO
class Shorewall(interfaces.IOpenMesherPlugin):
def __init__(self):
self._files = {}
def process(self, mesh):
logging.debug('Generating DNS config...')
self._files = {}
rdns = StringIO(... |
fb03522237afdd56059fb0146e1609b85606286f | l10n_ch_import_cresus/__openerp__.py | l10n_ch_import_cresus/__openerp__.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Vincent Renaville
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Vincent Renaville
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | Add Odoo Community Association (OCA) as author | Add Odoo Community Association (OCA) as author | Python | agpl-3.0 | open-net-sarl/l10n-switzerland,BT-ojossen/l10n-switzerland,cgaspoz/l10n-switzerland,CompassionCH/l10n-switzerland,BT-fgarbely/l10n-switzerland,BT-csanchez/l10n-switzerland,cyp-opennet/ons_cyp_github,BT-fgarbely/l10n-switzerland,ndtran/l10n-switzerland,CompassionCH/l10n-switzerland,cyp-opennet/ons_cyp_github,open-net-sa... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Vincent Renaville
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Vincent Renaville
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Author Vincent Renaville
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Lic... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Vincent Renaville
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Vincent Renaville
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Author Vincent Renaville
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Lic... |
53ff13fa0822dbabf554360bf000f8b3bfe41f40 | imagersite/imager_profile/models.py | imagersite/imager_profile/models.py | from django.db import models
# Create your models here.
| """Establish models for the imager site's User Profile."""
from django.db import models
from django.contrib.auth.models import User
class ImagerProfile(models.Model):
"""Profile attached to User models by one-to-one relationship."""
user = models.OneToOneField(User, related_name='profile')
is_active = mo... | Set up basic imagerprofile and made first migration | Set up basic imagerprofile and made first migration
| Python | mpl-2.0 | WillWeatherford/django-imager,WillWeatherford/django-imager | from django.db import models
# Create your models here.
Set up basic imagerprofile and made first migration | """Establish models for the imager site's User Profile."""
from django.db import models
from django.contrib.auth.models import User
class ImagerProfile(models.Model):
"""Profile attached to User models by one-to-one relationship."""
user = models.OneToOneField(User, related_name='profile')
is_active = mo... | <commit_before>from django.db import models
# Create your models here.
<commit_msg>Set up basic imagerprofile and made first migration<commit_after> | """Establish models for the imager site's User Profile."""
from django.db import models
from django.contrib.auth.models import User
class ImagerProfile(models.Model):
"""Profile attached to User models by one-to-one relationship."""
user = models.OneToOneField(User, related_name='profile')
is_active = mo... | from django.db import models
# Create your models here.
Set up basic imagerprofile and made first migration"""Establish models for the imager site's User Profile."""
from django.db import models
from django.contrib.auth.models import User
class ImagerProfile(models.Model):
"""Profile attached to User models by o... | <commit_before>from django.db import models
# Create your models here.
<commit_msg>Set up basic imagerprofile and made first migration<commit_after>"""Establish models for the imager site's User Profile."""
from django.db import models
from django.contrib.auth.models import User
class ImagerProfile(models.Model):
... |
48d0dc98fd859ea1d8cf25370fe0be9ac1350448 | selftest/subdir/proc.py | selftest/subdir/proc.py | # Copyright 2012 Dietrich Epp <depp@zdome.net>
# See LICENSE.txt for details.
@test
def nostdin_1():
check_output(['./nostdin'], 'Test', '')
@test(fail=True)
def nostdin_2_fail():
check_output(['./nostdin'], 'Test', 'Bogus')
@test
def nostdout_1():
check_output(['./nostdout'], 'Test', '')
@test(fail=Tru... | # Copyright 2012 Dietrich Epp <depp@zdome.net>
# See LICENSE.txt for details.
@test(fail=True)
def nostdin_1():
check_output(['./nostdin'], 'Test', '')
fail("The pipe didn't break, but that's okay")
@test(fail=True)
def nostdin_2_fail():
check_output(['./nostdin'], 'Test', 'Bogus')
@test
def nostdout_1()... | Mark broken pipe test with expected failure | Mark broken pipe test with expected failure
| Python | bsd-2-clause | depp/idiotest,depp/idiotest | # Copyright 2012 Dietrich Epp <depp@zdome.net>
# See LICENSE.txt for details.
@test
def nostdin_1():
check_output(['./nostdin'], 'Test', '')
@test(fail=True)
def nostdin_2_fail():
check_output(['./nostdin'], 'Test', 'Bogus')
@test
def nostdout_1():
check_output(['./nostdout'], 'Test', '')
@test(fail=Tru... | # Copyright 2012 Dietrich Epp <depp@zdome.net>
# See LICENSE.txt for details.
@test(fail=True)
def nostdin_1():
check_output(['./nostdin'], 'Test', '')
fail("The pipe didn't break, but that's okay")
@test(fail=True)
def nostdin_2_fail():
check_output(['./nostdin'], 'Test', 'Bogus')
@test
def nostdout_1()... | <commit_before># Copyright 2012 Dietrich Epp <depp@zdome.net>
# See LICENSE.txt for details.
@test
def nostdin_1():
check_output(['./nostdin'], 'Test', '')
@test(fail=True)
def nostdin_2_fail():
check_output(['./nostdin'], 'Test', 'Bogus')
@test
def nostdout_1():
check_output(['./nostdout'], 'Test', '')
... | # Copyright 2012 Dietrich Epp <depp@zdome.net>
# See LICENSE.txt for details.
@test(fail=True)
def nostdin_1():
check_output(['./nostdin'], 'Test', '')
fail("The pipe didn't break, but that's okay")
@test(fail=True)
def nostdin_2_fail():
check_output(['./nostdin'], 'Test', 'Bogus')
@test
def nostdout_1()... | # Copyright 2012 Dietrich Epp <depp@zdome.net>
# See LICENSE.txt for details.
@test
def nostdin_1():
check_output(['./nostdin'], 'Test', '')
@test(fail=True)
def nostdin_2_fail():
check_output(['./nostdin'], 'Test', 'Bogus')
@test
def nostdout_1():
check_output(['./nostdout'], 'Test', '')
@test(fail=Tru... | <commit_before># Copyright 2012 Dietrich Epp <depp@zdome.net>
# See LICENSE.txt for details.
@test
def nostdin_1():
check_output(['./nostdin'], 'Test', '')
@test(fail=True)
def nostdin_2_fail():
check_output(['./nostdin'], 'Test', 'Bogus')
@test
def nostdout_1():
check_output(['./nostdout'], 'Test', '')
... |
39708edfad5698b34771eba941ac822cbf84baa7 | readthedocs/oauth/migrations/0004_drop_github_and_bitbucket_models.py | readthedocs/oauth/migrations/0004_drop_github_and_bitbucket_models.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('oauth', '0003_move_github'),
]
operations = [
migrations.RemoveField(
model_name='bitbucketproject',
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def forwards_remove_content_types(apps, schema_editor):
db = schema_editor.connection.alias
ContentType = apps.get_model('contenttypes', 'ContentType')
ContentType.objects.using(db).filter(
ap... | Drop content type in migration as well | Drop content type in migration as well
| Python | mit | stevepiercy/readthedocs.org,techtonik/readthedocs.org,pombredanne/readthedocs.org,rtfd/readthedocs.org,stevepiercy/readthedocs.org,istresearch/readthedocs.org,techtonik/readthedocs.org,pombredanne/readthedocs.org,tddv/readthedocs.org,espdev/readthedocs.org,istresearch/readthedocs.org,rtfd/readthedocs.org,davidfischer/r... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('oauth', '0003_move_github'),
]
operations = [
migrations.RemoveField(
model_name='bitbucketproject',
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def forwards_remove_content_types(apps, schema_editor):
db = schema_editor.connection.alias
ContentType = apps.get_model('contenttypes', 'ContentType')
ContentType.objects.using(db).filter(
ap... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('oauth', '0003_move_github'),
]
operations = [
migrations.RemoveField(
model_name='bitbucketprojec... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def forwards_remove_content_types(apps, schema_editor):
db = schema_editor.connection.alias
ContentType = apps.get_model('contenttypes', 'ContentType')
ContentType.objects.using(db).filter(
ap... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('oauth', '0003_move_github'),
]
operations = [
migrations.RemoveField(
model_name='bitbucketproject',
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('oauth', '0003_move_github'),
]
operations = [
migrations.RemoveField(
model_name='bitbucketprojec... |
056b4ae938ab1aacf5e3f48a1e17919a79ff29b7 | scripts/sbatch_cancel.py | scripts/sbatch_cancel.py | import subprocess
import sys
import getpass
### Kill a job and its chain of dependents (as created by sbatch_submit).
### Usage: python sbatch_cancel.py [Name of first running job in chain] ... | import subprocess
import sys
import getpass
### Kill a job and its chain of dependents (as created by sbatch_submit).
### Usage: python sbatch_cancel.py [Name of first running job in chain] [Name of fi... | Kill multiple chains at once. | Kill multiple chains at once.
| Python | mit | nyu-mll/spinn,nyu-mll/spinn,nyu-mll/spinn | import subprocess
import sys
import getpass
### Kill a job and its chain of dependents (as created by sbatch_submit).
### Usage: python sbatch_cancel.py [Name of first running job in chain] ... | import subprocess
import sys
import getpass
### Kill a job and its chain of dependents (as created by sbatch_submit).
### Usage: python sbatch_cancel.py [Name of first running job in chain] [Name of fi... | <commit_before>import subprocess
import sys
import getpass
### Kill a job and its chain of dependents (as created by sbatch_submit).
### Usage: python sbatch_cancel.py [Name of first running job in cha... | import subprocess
import sys
import getpass
### Kill a job and its chain of dependents (as created by sbatch_submit).
### Usage: python sbatch_cancel.py [Name of first running job in chain] [Name of fi... | import subprocess
import sys
import getpass
### Kill a job and its chain of dependents (as created by sbatch_submit).
### Usage: python sbatch_cancel.py [Name of first running job in chain] ... | <commit_before>import subprocess
import sys
import getpass
### Kill a job and its chain of dependents (as created by sbatch_submit).
### Usage: python sbatch_cancel.py [Name of first running job in cha... |
994ef988e966499dbc5c7298a201105517692fc7 | source/views/views.py | source/views/views.py | import json
from django.shortcuts import render
from django.http import HttpResponse
from source.forms.search_form import SearchForm
from source.controllers.cater_controller import CaterController
def index(request):
if request.method == 'GET':
form = SearchForm(request.GET)
if form.is_valid():
... | import json
from django.shortcuts import render
from django.http import HttpResponse
from source.forms.search_form import SearchForm
from source.controllers.cater_controller import CaterController
def index(request):
if request.method == 'GET':
form = SearchForm(request.GET)
if form.is_valid():
... | Add extra line to separate functions | Add extra line to separate functions
| Python | mit | jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu | import json
from django.shortcuts import render
from django.http import HttpResponse
from source.forms.search_form import SearchForm
from source.controllers.cater_controller import CaterController
def index(request):
if request.method == 'GET':
form = SearchForm(request.GET)
if form.is_valid():
... | import json
from django.shortcuts import render
from django.http import HttpResponse
from source.forms.search_form import SearchForm
from source.controllers.cater_controller import CaterController
def index(request):
if request.method == 'GET':
form = SearchForm(request.GET)
if form.is_valid():
... | <commit_before>import json
from django.shortcuts import render
from django.http import HttpResponse
from source.forms.search_form import SearchForm
from source.controllers.cater_controller import CaterController
def index(request):
if request.method == 'GET':
form = SearchForm(request.GET)
if fo... | import json
from django.shortcuts import render
from django.http import HttpResponse
from source.forms.search_form import SearchForm
from source.controllers.cater_controller import CaterController
def index(request):
if request.method == 'GET':
form = SearchForm(request.GET)
if form.is_valid():
... | import json
from django.shortcuts import render
from django.http import HttpResponse
from source.forms.search_form import SearchForm
from source.controllers.cater_controller import CaterController
def index(request):
if request.method == 'GET':
form = SearchForm(request.GET)
if form.is_valid():
... | <commit_before>import json
from django.shortcuts import render
from django.http import HttpResponse
from source.forms.search_form import SearchForm
from source.controllers.cater_controller import CaterController
def index(request):
if request.method == 'GET':
form = SearchForm(request.GET)
if fo... |
cef6f3cce4a942bea53d6bae639dcd48d680d05a | gpytorch/means/linear_mean.py | gpytorch/means/linear_mean.py | #!/usr/bin/env python3
import torch
from .mean import Mean
class LinearMean(Mean):
def __init__(self, input_size, batch_shape=torch.Size(), bias=True):
super().__init__()
self.register_parameter(name='weights',
parameter=torch.nn.Parameter(torch.randn(*batch_shape,... | #!/usr/bin/env python3
import torch
from .mean import Mean
class LinearMean(Mean):
def __init__(self, input_size, batch_shape=torch.Size(), bias=True):
super().__init__()
self.register_parameter(name='weights',
parameter=torch.nn.Parameter(torch.randn(*batch_shape,... | Fix LinearMean bias when bias=False | Fix LinearMean bias when bias=False
| Python | mit | jrg365/gpytorch,jrg365/gpytorch,jrg365/gpytorch | #!/usr/bin/env python3
import torch
from .mean import Mean
class LinearMean(Mean):
def __init__(self, input_size, batch_shape=torch.Size(), bias=True):
super().__init__()
self.register_parameter(name='weights',
parameter=torch.nn.Parameter(torch.randn(*batch_shape,... | #!/usr/bin/env python3
import torch
from .mean import Mean
class LinearMean(Mean):
def __init__(self, input_size, batch_shape=torch.Size(), bias=True):
super().__init__()
self.register_parameter(name='weights',
parameter=torch.nn.Parameter(torch.randn(*batch_shape,... | <commit_before>#!/usr/bin/env python3
import torch
from .mean import Mean
class LinearMean(Mean):
def __init__(self, input_size, batch_shape=torch.Size(), bias=True):
super().__init__()
self.register_parameter(name='weights',
parameter=torch.nn.Parameter(torch.rand... | #!/usr/bin/env python3
import torch
from .mean import Mean
class LinearMean(Mean):
def __init__(self, input_size, batch_shape=torch.Size(), bias=True):
super().__init__()
self.register_parameter(name='weights',
parameter=torch.nn.Parameter(torch.randn(*batch_shape,... | #!/usr/bin/env python3
import torch
from .mean import Mean
class LinearMean(Mean):
def __init__(self, input_size, batch_shape=torch.Size(), bias=True):
super().__init__()
self.register_parameter(name='weights',
parameter=torch.nn.Parameter(torch.randn(*batch_shape,... | <commit_before>#!/usr/bin/env python3
import torch
from .mean import Mean
class LinearMean(Mean):
def __init__(self, input_size, batch_shape=torch.Size(), bias=True):
super().__init__()
self.register_parameter(name='weights',
parameter=torch.nn.Parameter(torch.rand... |
f00fd0fde81a340cf00030bbe2562b8c878edd41 | src/yawf/signals.py | src/yawf/signals.py | from django.dispatch import Signal
message_handled = Signal(providing_args=['message', 'instance', 'new_revision'])
| from django.dispatch import Signal
message_handled = Signal(
providing_args=['message', 'instance', 'new_revision', 'transition_result']
)
| Add new arg in message_handled signal definition | Add new arg in message_handled signal definition
| Python | mit | freevoid/yawf | from django.dispatch import Signal
message_handled = Signal(providing_args=['message', 'instance', 'new_revision'])
Add new arg in message_handled signal definition | from django.dispatch import Signal
message_handled = Signal(
providing_args=['message', 'instance', 'new_revision', 'transition_result']
)
| <commit_before>from django.dispatch import Signal
message_handled = Signal(providing_args=['message', 'instance', 'new_revision'])
<commit_msg>Add new arg in message_handled signal definition<commit_after> | from django.dispatch import Signal
message_handled = Signal(
providing_args=['message', 'instance', 'new_revision', 'transition_result']
)
| from django.dispatch import Signal
message_handled = Signal(providing_args=['message', 'instance', 'new_revision'])
Add new arg in message_handled signal definitionfrom django.dispatch import Signal
message_handled = Signal(
providing_args=['message', 'instance', 'new_revision', 'transition_result']
)
| <commit_before>from django.dispatch import Signal
message_handled = Signal(providing_args=['message', 'instance', 'new_revision'])
<commit_msg>Add new arg in message_handled signal definition<commit_after>from django.dispatch import Signal
message_handled = Signal(
providing_args=['message', 'instance', 'new_revi... |
e1529a2071779dc7f657c3bbb370f3c2c5fb240e | HTTPCloser.py | HTTPCloser.py | import time, gevent
seen = None
def used(url, http_pool):
__patch()
seen[(url, http_pool)] = time.time()
def __patch():
global seen
if seen is None:
seen = {}
gevent.spawn(clean)
def clean():
while True:
for k, last_seen in seen.items:
if time.time... | import time, gevent
seen = None
def used(url, http_pool):
__patch()
seen[(url, http_pool)] = time.time()
def __patch():
global seen
if seen is None:
seen = {}
gevent.spawn(clean)
def clean():
while True:
for k, last_seen in seen.items():
if time.ti... | Fix typoe items vs items() | Fix typoe items vs items()
| Python | mit | c00w/bitHopper,c00w/bitHopper | import time, gevent
seen = None
def used(url, http_pool):
__patch()
seen[(url, http_pool)] = time.time()
def __patch():
global seen
if seen is None:
seen = {}
gevent.spawn(clean)
def clean():
while True:
for k, last_seen in seen.items:
if time.time... | import time, gevent
seen = None
def used(url, http_pool):
__patch()
seen[(url, http_pool)] = time.time()
def __patch():
global seen
if seen is None:
seen = {}
gevent.spawn(clean)
def clean():
while True:
for k, last_seen in seen.items():
if time.ti... | <commit_before>import time, gevent
seen = None
def used(url, http_pool):
__patch()
seen[(url, http_pool)] = time.time()
def __patch():
global seen
if seen is None:
seen = {}
gevent.spawn(clean)
def clean():
while True:
for k, last_seen in seen.items:
... | import time, gevent
seen = None
def used(url, http_pool):
__patch()
seen[(url, http_pool)] = time.time()
def __patch():
global seen
if seen is None:
seen = {}
gevent.spawn(clean)
def clean():
while True:
for k, last_seen in seen.items():
if time.ti... | import time, gevent
seen = None
def used(url, http_pool):
__patch()
seen[(url, http_pool)] = time.time()
def __patch():
global seen
if seen is None:
seen = {}
gevent.spawn(clean)
def clean():
while True:
for k, last_seen in seen.items:
if time.time... | <commit_before>import time, gevent
seen = None
def used(url, http_pool):
__patch()
seen[(url, http_pool)] = time.time()
def __patch():
global seen
if seen is None:
seen = {}
gevent.spawn(clean)
def clean():
while True:
for k, last_seen in seen.items:
... |
5a76457e2b9596ad3497b0145410a2f4090a5c54 | tests/mixins.py | tests/mixins.py | class RedisCleanupMixin(object):
client = None
prefix = None
def setUp(self):
super(RedisCleanupMixin, self).setUp()
self.assertIsNotNone(self.client, "Need a redis client to be provided")
def tearDown(self):
root = '*'
if self.prefix is not None:
root = '{}... | class RedisCleanupMixin(object):
client = None
prefix = NotImplemented # type: str
def setUp(self):
super(RedisCleanupMixin, self).setUp()
self.assertIsNotNone(self.client, "Need a redis client to be provided")
def tearDown(self):
root = '*'
if self.prefix is not None:... | Add annotation required for mypy | Add annotation required for mypy
| Python | bsd-3-clause | thread/django-lightweight-queue,thread/django-lightweight-queue | class RedisCleanupMixin(object):
client = None
prefix = None
def setUp(self):
super(RedisCleanupMixin, self).setUp()
self.assertIsNotNone(self.client, "Need a redis client to be provided")
def tearDown(self):
root = '*'
if self.prefix is not None:
root = '{}... | class RedisCleanupMixin(object):
client = None
prefix = NotImplemented # type: str
def setUp(self):
super(RedisCleanupMixin, self).setUp()
self.assertIsNotNone(self.client, "Need a redis client to be provided")
def tearDown(self):
root = '*'
if self.prefix is not None:... | <commit_before>class RedisCleanupMixin(object):
client = None
prefix = None
def setUp(self):
super(RedisCleanupMixin, self).setUp()
self.assertIsNotNone(self.client, "Need a redis client to be provided")
def tearDown(self):
root = '*'
if self.prefix is not None:
... | class RedisCleanupMixin(object):
client = None
prefix = NotImplemented # type: str
def setUp(self):
super(RedisCleanupMixin, self).setUp()
self.assertIsNotNone(self.client, "Need a redis client to be provided")
def tearDown(self):
root = '*'
if self.prefix is not None:... | class RedisCleanupMixin(object):
client = None
prefix = None
def setUp(self):
super(RedisCleanupMixin, self).setUp()
self.assertIsNotNone(self.client, "Need a redis client to be provided")
def tearDown(self):
root = '*'
if self.prefix is not None:
root = '{}... | <commit_before>class RedisCleanupMixin(object):
client = None
prefix = None
def setUp(self):
super(RedisCleanupMixin, self).setUp()
self.assertIsNotNone(self.client, "Need a redis client to be provided")
def tearDown(self):
root = '*'
if self.prefix is not None:
... |
e281c9ab30acdbc60439a143557efdeaf4757e1b | tests/integration/test_kcm_install.py | tests/integration/test_kcm_install.py | from . import integration
import os
import tempfile
def test_kcm_install():
# Install kcm to a temporary directory.
install_dir = tempfile.mkdtemp()
integration.execute(integration.kcm(),
["install",
"--install-dir={}".format(install_dir)])
installed_kc... | from . import integration
import os
import tempfile
def test_kcm_install():
# Install kcm to a temporary directory.
install_dir = tempfile.mkdtemp()
integration.execute(integration.kcm(),
["install",
"--install-dir={}".format(install_dir)])
installed_kc... | Remove the installed kcm binary after int tests. | Remove the installed kcm binary after int tests.
| Python | apache-2.0 | Intel-Corp/CPU-Manager-for-Kubernetes,Intel-Corp/CPU-Manager-for-Kubernetes,Intel-Corp/CPU-Manager-for-Kubernetes | from . import integration
import os
import tempfile
def test_kcm_install():
# Install kcm to a temporary directory.
install_dir = tempfile.mkdtemp()
integration.execute(integration.kcm(),
["install",
"--install-dir={}".format(install_dir)])
installed_kc... | from . import integration
import os
import tempfile
def test_kcm_install():
# Install kcm to a temporary directory.
install_dir = tempfile.mkdtemp()
integration.execute(integration.kcm(),
["install",
"--install-dir={}".format(install_dir)])
installed_kc... | <commit_before>from . import integration
import os
import tempfile
def test_kcm_install():
# Install kcm to a temporary directory.
install_dir = tempfile.mkdtemp()
integration.execute(integration.kcm(),
["install",
"--install-dir={}".format(install_dir)])
... | from . import integration
import os
import tempfile
def test_kcm_install():
# Install kcm to a temporary directory.
install_dir = tempfile.mkdtemp()
integration.execute(integration.kcm(),
["install",
"--install-dir={}".format(install_dir)])
installed_kc... | from . import integration
import os
import tempfile
def test_kcm_install():
# Install kcm to a temporary directory.
install_dir = tempfile.mkdtemp()
integration.execute(integration.kcm(),
["install",
"--install-dir={}".format(install_dir)])
installed_kc... | <commit_before>from . import integration
import os
import tempfile
def test_kcm_install():
# Install kcm to a temporary directory.
install_dir = tempfile.mkdtemp()
integration.execute(integration.kcm(),
["install",
"--install-dir={}".format(install_dir)])
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.