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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
788e6c081ba21fb75bc00195a82cb212542f7135 | django/contrib/comments/feeds.py | django/contrib/comments/feeds.py | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | Use correct m2m join table name in LatestCommentsFeed | Use correct m2m join table name in LatestCommentsFeed
git-svn-id: 4f9f921b081c523744c7bf24d959a0db39629563@9089 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| Python | bsd-3-clause | jhoos/django,mttr/django,Leila20/django,GaussDing/django,h4r5h1t/django-hauthy,schinckel/django,ASCrookes/django,django-nonrel/django-nonrel,asser/django,whs/django,ckirby/django,whs/django,scorphus/django,nealtodd/django,beni55/django,leeon/annotated-django,andrewsmedina/django,nju520/django,taaviteska/django,marceloc... | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | <commit_before>from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_s... | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_site'):
... | <commit_before>from django.conf import settings
from django.contrib.syndication.feeds import Feed
from django.contrib.sites.models import Site
from django.contrib import comments
class LatestCommentFeed(Feed):
"""Feed of latest comments on the current site."""
def title(self):
if not hasattr(self, '_s... |
0fe9fdce0ed5f0200450fd7e0e2bc9842ea4375d | settings.py | settings.py | from datetime import datetime, timedelta
RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
DATE_FORMAT = '%Y-%m-%d %H:%M:%S GMT'
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'occurre... | from datetime import datetime, timedelta
RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
DATE_FORMAT = '%Y-%m-%d %H:%M:%S GMT'
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'occurre... | Change default value to use UTC time | Change default value to use UTC time
| Python | mit | waoliveros/historia | from datetime import datetime, timedelta
RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
DATE_FORMAT = '%Y-%m-%d %H:%M:%S GMT'
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'occurre... | from datetime import datetime, timedelta
RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
DATE_FORMAT = '%Y-%m-%d %H:%M:%S GMT'
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'occurre... | <commit_before>from datetime import datetime, timedelta
RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
DATE_FORMAT = '%Y-%m-%d %H:%M:%S GMT'
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
... | from datetime import datetime, timedelta
RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
DATE_FORMAT = '%Y-%m-%d %H:%M:%S GMT'
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'occurre... | from datetime import datetime, timedelta
RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
DATE_FORMAT = '%Y-%m-%d %H:%M:%S GMT'
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
},
'occurre... | <commit_before>from datetime import datetime, timedelta
RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
DATE_FORMAT = '%Y-%m-%d %H:%M:%S GMT'
schema = {
'name': {
'type': 'string',
'minlength': 3,
'maxlength': 50,
'required': True,
... |
80e84d2970114bcf7362c7d280dc12131e55871a | main.py | main.py | from multiprocessing import freeze_support
from ELiDE.app import ELiDEApp
import sys
import os
wd = os.getcwd()
sys.path.extend([wd + '/LiSE', wd + '/ELiDE', wd + '/allegedb'])
def get_application_config(*args):
return wd + '/ELiDE.ini'
if __name__ == '__main__':
freeze_support()
app = ELiDEApp()
a... | from multiprocessing import freeze_support
import sys
import os
wd = os.getcwd()
sys.path.extend([wd + '/LiSE', wd + '/ELiDE', wd + '/allegedb'])
def get_application_config(*args):
return wd + '/ELiDE.ini'
if __name__ == '__main__':
freeze_support()
from ELiDE.app import ELiDEApp
app = ELiDEApp()
... | Fix extra blank window on Windows via PyInstaller | Fix extra blank window on Windows via PyInstaller
| Python | agpl-3.0 | LogicalDash/LiSE,LogicalDash/LiSE | from multiprocessing import freeze_support
from ELiDE.app import ELiDEApp
import sys
import os
wd = os.getcwd()
sys.path.extend([wd + '/LiSE', wd + '/ELiDE', wd + '/allegedb'])
def get_application_config(*args):
return wd + '/ELiDE.ini'
if __name__ == '__main__':
freeze_support()
app = ELiDEApp()
a... | from multiprocessing import freeze_support
import sys
import os
wd = os.getcwd()
sys.path.extend([wd + '/LiSE', wd + '/ELiDE', wd + '/allegedb'])
def get_application_config(*args):
return wd + '/ELiDE.ini'
if __name__ == '__main__':
freeze_support()
from ELiDE.app import ELiDEApp
app = ELiDEApp()
... | <commit_before>from multiprocessing import freeze_support
from ELiDE.app import ELiDEApp
import sys
import os
wd = os.getcwd()
sys.path.extend([wd + '/LiSE', wd + '/ELiDE', wd + '/allegedb'])
def get_application_config(*args):
return wd + '/ELiDE.ini'
if __name__ == '__main__':
freeze_support()
app = E... | from multiprocessing import freeze_support
import sys
import os
wd = os.getcwd()
sys.path.extend([wd + '/LiSE', wd + '/ELiDE', wd + '/allegedb'])
def get_application_config(*args):
return wd + '/ELiDE.ini'
if __name__ == '__main__':
freeze_support()
from ELiDE.app import ELiDEApp
app = ELiDEApp()
... | from multiprocessing import freeze_support
from ELiDE.app import ELiDEApp
import sys
import os
wd = os.getcwd()
sys.path.extend([wd + '/LiSE', wd + '/ELiDE', wd + '/allegedb'])
def get_application_config(*args):
return wd + '/ELiDE.ini'
if __name__ == '__main__':
freeze_support()
app = ELiDEApp()
a... | <commit_before>from multiprocessing import freeze_support
from ELiDE.app import ELiDEApp
import sys
import os
wd = os.getcwd()
sys.path.extend([wd + '/LiSE', wd + '/ELiDE', wd + '/allegedb'])
def get_application_config(*args):
return wd + '/ELiDE.ini'
if __name__ == '__main__':
freeze_support()
app = E... |
bb522a33096d7db252c02fda02e6419548094813 | runtests.py | runtests.py | #!/usr/bin/env python
# Adapted from https://raw.githubusercontent.com/hzy/django-polarize/master/runtests.py
import sys
from django.conf import settings
from django.core.management import execute_from_command_line
if not settings.configured:
settings.configure(
DATABASES={
'default': {
... | #!/usr/bin/env python
# Adapted from https://raw.githubusercontent.com/hzy/django-polarize/master/runtests.py
import sys
from django.conf import settings
from django.core.management import execute_from_command_line
import django
if django.VERSION < (1, 6):
extra_settings = {
'TEST_RUNNER': 'discover_ru... | Use discover runner on older djangos | Use discover runner on older djangos
| Python | bsd-3-clause | limbera/django-nap,MarkusH/django-nap | #!/usr/bin/env python
# Adapted from https://raw.githubusercontent.com/hzy/django-polarize/master/runtests.py
import sys
from django.conf import settings
from django.core.management import execute_from_command_line
if not settings.configured:
settings.configure(
DATABASES={
'default': {
... | #!/usr/bin/env python
# Adapted from https://raw.githubusercontent.com/hzy/django-polarize/master/runtests.py
import sys
from django.conf import settings
from django.core.management import execute_from_command_line
import django
if django.VERSION < (1, 6):
extra_settings = {
'TEST_RUNNER': 'discover_ru... | <commit_before>#!/usr/bin/env python
# Adapted from https://raw.githubusercontent.com/hzy/django-polarize/master/runtests.py
import sys
from django.conf import settings
from django.core.management import execute_from_command_line
if not settings.configured:
settings.configure(
DATABASES={
'... | #!/usr/bin/env python
# Adapted from https://raw.githubusercontent.com/hzy/django-polarize/master/runtests.py
import sys
from django.conf import settings
from django.core.management import execute_from_command_line
import django
if django.VERSION < (1, 6):
extra_settings = {
'TEST_RUNNER': 'discover_ru... | #!/usr/bin/env python
# Adapted from https://raw.githubusercontent.com/hzy/django-polarize/master/runtests.py
import sys
from django.conf import settings
from django.core.management import execute_from_command_line
if not settings.configured:
settings.configure(
DATABASES={
'default': {
... | <commit_before>#!/usr/bin/env python
# Adapted from https://raw.githubusercontent.com/hzy/django-polarize/master/runtests.py
import sys
from django.conf import settings
from django.core.management import execute_from_command_line
if not settings.configured:
settings.configure(
DATABASES={
'... |
f155668bb622e442daffef86a2efddc89b48239a | climate_data/migrations/0026_auto_20170627_1914.py | climate_data/migrations/0026_auto_20170627_1914.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-27 19:14
from __future__ import unicode_literals
import django.contrib.postgres.fields.ranges
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('climate_data', '0025_auto_20170627_1850'),
]
o... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-27 19:14
from __future__ import unicode_literals
import django.contrib.postgres.fields.ranges
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('climate_data', '0025_auto_20170627_1850'),
]
o... | Fix an integer out of range error with a migration to the transient integer bounds field (superseded by a float bounds field). | Fix an integer out of range error with a migration to the transient integer bounds field (superseded by a float bounds field).
| Python | apache-2.0 | qubs/data-centre,qubs/climate-data-api,qubs/climate-data-api,qubs/data-centre | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-27 19:14
from __future__ import unicode_literals
import django.contrib.postgres.fields.ranges
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('climate_data', '0025_auto_20170627_1850'),
]
o... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-27 19:14
from __future__ import unicode_literals
import django.contrib.postgres.fields.ranges
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('climate_data', '0025_auto_20170627_1850'),
]
o... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-27 19:14
from __future__ import unicode_literals
import django.contrib.postgres.fields.ranges
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('climate_data', '0025_auto_20170627_1850'... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-27 19:14
from __future__ import unicode_literals
import django.contrib.postgres.fields.ranges
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('climate_data', '0025_auto_20170627_1850'),
]
o... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-27 19:14
from __future__ import unicode_literals
import django.contrib.postgres.fields.ranges
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('climate_data', '0025_auto_20170627_1850'),
]
o... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-27 19:14
from __future__ import unicode_literals
import django.contrib.postgres.fields.ranges
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('climate_data', '0025_auto_20170627_1850'... |
cd14ff6463d12c1e97be014766094ef90945e783 | django_extensions/management/technical_response.py | django_extensions/management/technical_response.py | # -*- coding: utf-8 -*-
import six
from django.core.handlers.wsgi import WSGIHandler
wsgi_tb = None
def null_technical_500_response(request, exc_type, exc_value, tb, status_code=500):
"""Function to override django.views.debug.technical_500_response.
Django's convert_exception_to_response wrapper is called ... | # -*- coding: utf-8 -*-
import threading
import six
from django.core.handlers.wsgi import WSGIHandler
tld = threading.local()
def null_technical_500_response(request, exc_type, exc_value, tb, status_code=500):
"""Function to override django.views.debug.technical_500_response.
Django's convert_exception_to_... | Replace global var with threading.local | Replace global var with threading.local
| Python | mit | django-extensions/django-extensions,django-extensions/django-extensions,django-extensions/django-extensions | # -*- coding: utf-8 -*-
import six
from django.core.handlers.wsgi import WSGIHandler
wsgi_tb = None
def null_technical_500_response(request, exc_type, exc_value, tb, status_code=500):
"""Function to override django.views.debug.technical_500_response.
Django's convert_exception_to_response wrapper is called ... | # -*- coding: utf-8 -*-
import threading
import six
from django.core.handlers.wsgi import WSGIHandler
tld = threading.local()
def null_technical_500_response(request, exc_type, exc_value, tb, status_code=500):
"""Function to override django.views.debug.technical_500_response.
Django's convert_exception_to_... | <commit_before># -*- coding: utf-8 -*-
import six
from django.core.handlers.wsgi import WSGIHandler
wsgi_tb = None
def null_technical_500_response(request, exc_type, exc_value, tb, status_code=500):
"""Function to override django.views.debug.technical_500_response.
Django's convert_exception_to_response wra... | # -*- coding: utf-8 -*-
import threading
import six
from django.core.handlers.wsgi import WSGIHandler
tld = threading.local()
def null_technical_500_response(request, exc_type, exc_value, tb, status_code=500):
"""Function to override django.views.debug.technical_500_response.
Django's convert_exception_to_... | # -*- coding: utf-8 -*-
import six
from django.core.handlers.wsgi import WSGIHandler
wsgi_tb = None
def null_technical_500_response(request, exc_type, exc_value, tb, status_code=500):
"""Function to override django.views.debug.technical_500_response.
Django's convert_exception_to_response wrapper is called ... | <commit_before># -*- coding: utf-8 -*-
import six
from django.core.handlers.wsgi import WSGIHandler
wsgi_tb = None
def null_technical_500_response(request, exc_type, exc_value, tb, status_code=500):
"""Function to override django.views.debug.technical_500_response.
Django's convert_exception_to_response wra... |
4ea6a11341c2bbd978d5e0e416c398a442158da6 | whip/web.py | whip/web.py | """
Whip's REST API
"""
# pylint: disable=missing-docstring
from socket import inet_aton
from flask import Flask, abort, make_response, request
from .db import Database
app = Flask(__name__)
app.config.from_envvar('WHIP_SETTINGS', silent=True)
db = None
@app.before_first_request
def _open_db():
global db ... | """
Whip's REST API
"""
# pylint: disable=missing-docstring
from flask import Flask, make_response, request
from .db import Database
app = Flask(__name__)
app.config.from_envvar('WHIP_SETTINGS', silent=True)
db = None
@app.before_first_request
def _open_db():
global db # pylint: disable=global-statement
... | Handle IPv6 in REST API | Handle IPv6 in REST API
| Python | bsd-3-clause | wbolster/whip | """
Whip's REST API
"""
# pylint: disable=missing-docstring
from socket import inet_aton
from flask import Flask, abort, make_response, request
from .db import Database
app = Flask(__name__)
app.config.from_envvar('WHIP_SETTINGS', silent=True)
db = None
@app.before_first_request
def _open_db():
global db ... | """
Whip's REST API
"""
# pylint: disable=missing-docstring
from flask import Flask, make_response, request
from .db import Database
app = Flask(__name__)
app.config.from_envvar('WHIP_SETTINGS', silent=True)
db = None
@app.before_first_request
def _open_db():
global db # pylint: disable=global-statement
... | <commit_before>"""
Whip's REST API
"""
# pylint: disable=missing-docstring
from socket import inet_aton
from flask import Flask, abort, make_response, request
from .db import Database
app = Flask(__name__)
app.config.from_envvar('WHIP_SETTINGS', silent=True)
db = None
@app.before_first_request
def _open_db():
... | """
Whip's REST API
"""
# pylint: disable=missing-docstring
from flask import Flask, make_response, request
from .db import Database
app = Flask(__name__)
app.config.from_envvar('WHIP_SETTINGS', silent=True)
db = None
@app.before_first_request
def _open_db():
global db # pylint: disable=global-statement
... | """
Whip's REST API
"""
# pylint: disable=missing-docstring
from socket import inet_aton
from flask import Flask, abort, make_response, request
from .db import Database
app = Flask(__name__)
app.config.from_envvar('WHIP_SETTINGS', silent=True)
db = None
@app.before_first_request
def _open_db():
global db ... | <commit_before>"""
Whip's REST API
"""
# pylint: disable=missing-docstring
from socket import inet_aton
from flask import Flask, abort, make_response, request
from .db import Database
app = Flask(__name__)
app.config.from_envvar('WHIP_SETTINGS', silent=True)
db = None
@app.before_first_request
def _open_db():
... |
43004cfd537c801475bf7e3b3c80dee4da18712f | backend/hook_manager.py | backend/hook_manager.py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Université Catholique de Louvain.
#
# This file is part of INGInious.
#
# INGInious is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Université Catholique de Louvain.
#
# This file is part of INGInious.
#
# INGInious is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the... | Allow hooks to return values (and simplify the code) | Allow hooks to return values (and simplify the code)
| Python | agpl-3.0 | layus/INGInious,layus/INGInious,layus/INGInious,GuillaumeDerval/INGInious,GuillaumeDerval/INGInious,layus/INGInious,GuillaumeDerval/INGInious,GuillaumeDerval/INGInious | # -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Université Catholique de Louvain.
#
# This file is part of INGInious.
#
# INGInious is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Université Catholique de Louvain.
#
# This file is part of INGInious.
#
# INGInious is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Université Catholique de Louvain.
#
# This file is part of INGInious.
#
# INGInious is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either v... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Université Catholique de Louvain.
#
# This file is part of INGInious.
#
# INGInious is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Université Catholique de Louvain.
#
# This file is part of INGInious.
#
# INGInious is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Université Catholique de Louvain.
#
# This file is part of INGInious.
#
# INGInious is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either v... |
bb77b9554108c6a9739dd058a12484d15f10d3a2 | candidates/views/helpers.py | candidates/views/helpers.py | from django.core.urlresolvers import reverse
from django.conf import settings
from django.http import HttpResponseRedirect
from slugify import slugify
from ..election_specific import AREA_POST_DATA
from ..models import (
PopItPerson, membership_covers_date
)
def get_redirect_to_post(election, post_data):
sho... | from django.core.urlresolvers import reverse
from django.conf import settings
from django.http import HttpResponseRedirect
from slugify import slugify
from ..election_specific import AREA_POST_DATA
from ..models import (
PopItPerson, membership_covers_date
)
def get_redirect_to_post(election, post_data):
sho... | Fix a stupid bug in get_people_from_memberships | Fix a stupid bug in get_people_from_memberships
The rebinding of the function's election_data parameter was breaking
the listing of candidates for a post.
| Python | agpl-3.0 | openstate/yournextrepresentative,mysociety/yournextrepresentative,neavouli/yournextrepresentative,neavouli/yournextrepresentative,neavouli/yournextrepresentative,YoQuieroSaber/yournextrepresentative,mysociety/yournextmp-popit,DemocracyClub/yournextrepresentative,openstate/yournextrepresentative,YoQuieroSaber/yournextre... | from django.core.urlresolvers import reverse
from django.conf import settings
from django.http import HttpResponseRedirect
from slugify import slugify
from ..election_specific import AREA_POST_DATA
from ..models import (
PopItPerson, membership_covers_date
)
def get_redirect_to_post(election, post_data):
sho... | from django.core.urlresolvers import reverse
from django.conf import settings
from django.http import HttpResponseRedirect
from slugify import slugify
from ..election_specific import AREA_POST_DATA
from ..models import (
PopItPerson, membership_covers_date
)
def get_redirect_to_post(election, post_data):
sho... | <commit_before>from django.core.urlresolvers import reverse
from django.conf import settings
from django.http import HttpResponseRedirect
from slugify import slugify
from ..election_specific import AREA_POST_DATA
from ..models import (
PopItPerson, membership_covers_date
)
def get_redirect_to_post(election, post... | from django.core.urlresolvers import reverse
from django.conf import settings
from django.http import HttpResponseRedirect
from slugify import slugify
from ..election_specific import AREA_POST_DATA
from ..models import (
PopItPerson, membership_covers_date
)
def get_redirect_to_post(election, post_data):
sho... | from django.core.urlresolvers import reverse
from django.conf import settings
from django.http import HttpResponseRedirect
from slugify import slugify
from ..election_specific import AREA_POST_DATA
from ..models import (
PopItPerson, membership_covers_date
)
def get_redirect_to_post(election, post_data):
sho... | <commit_before>from django.core.urlresolvers import reverse
from django.conf import settings
from django.http import HttpResponseRedirect
from slugify import slugify
from ..election_specific import AREA_POST_DATA
from ..models import (
PopItPerson, membership_covers_date
)
def get_redirect_to_post(election, post... |
b2268ae4ecad477c46a4b99ec17511e2e535b9d0 | globus_cli/commands/task/generate_submission_id.py | globus_cli/commands/task/generate_submission_id.py | import click
from globus_cli.parsing import common_options
from globus_cli.safeio import FORMAT_TEXT_RAW, formatted_print
from globus_cli.services.transfer import get_client
@click.command(
"generate-submission-id",
short_help="Get a submission ID",
help=(
"Generate a new task submission ID for u... | import click
from globus_cli.parsing import common_options
from globus_cli.safeio import FORMAT_TEXT_RAW, formatted_print
from globus_cli.services.transfer import get_client
@click.command(
"generate-submission-id",
short_help="Get a submission ID",
help=(
"""\
Generate a new task submission ... | Clarify that submission ID != task ID | Clarify that submission ID != task ID
Calling this out in the helptext will hopefully help avoid people
conflating these two quite as easily. (An imperfect solution for an
imperfect world.)
| Python | apache-2.0 | globus/globus-cli,globus/globus-cli | import click
from globus_cli.parsing import common_options
from globus_cli.safeio import FORMAT_TEXT_RAW, formatted_print
from globus_cli.services.transfer import get_client
@click.command(
"generate-submission-id",
short_help="Get a submission ID",
help=(
"Generate a new task submission ID for u... | import click
from globus_cli.parsing import common_options
from globus_cli.safeio import FORMAT_TEXT_RAW, formatted_print
from globus_cli.services.transfer import get_client
@click.command(
"generate-submission-id",
short_help="Get a submission ID",
help=(
"""\
Generate a new task submission ... | <commit_before>import click
from globus_cli.parsing import common_options
from globus_cli.safeio import FORMAT_TEXT_RAW, formatted_print
from globus_cli.services.transfer import get_client
@click.command(
"generate-submission-id",
short_help="Get a submission ID",
help=(
"Generate a new task subm... | import click
from globus_cli.parsing import common_options
from globus_cli.safeio import FORMAT_TEXT_RAW, formatted_print
from globus_cli.services.transfer import get_client
@click.command(
"generate-submission-id",
short_help="Get a submission ID",
help=(
"""\
Generate a new task submission ... | import click
from globus_cli.parsing import common_options
from globus_cli.safeio import FORMAT_TEXT_RAW, formatted_print
from globus_cli.services.transfer import get_client
@click.command(
"generate-submission-id",
short_help="Get a submission ID",
help=(
"Generate a new task submission ID for u... | <commit_before>import click
from globus_cli.parsing import common_options
from globus_cli.safeio import FORMAT_TEXT_RAW, formatted_print
from globus_cli.services.transfer import get_client
@click.command(
"generate-submission-id",
short_help="Get a submission ID",
help=(
"Generate a new task subm... |
2cb8db4ba908fe0e28dc95287d57fcb013d3a6cd | pmg/tasks.py | pmg/tasks.py | import logging
import newrelic.agent
log = logging.getLogger(__name__)
def send_saved_search_alerts():
from pmg import app
from pmg.models import SavedSearch
application = newrelic.agent.application()
with newrelic.agent.BackgroundTask(application, name='send_saved_search_alerts', group='Task'):
... | import logging
import newrelic.agent
log = logging.getLogger(__name__)
def send_saved_search_alerts():
from pmg import app
from pmg.models import SavedSearch
application = newrelic.agent.application()
with newrelic.agent.BackgroundTask(application, name='send_saved_search_alerts', group='Task'):
... | Change soundcloud sync to happen every 20 minutes | Change soundcloud sync to happen every 20 minutes
| Python | apache-2.0 | Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2 | import logging
import newrelic.agent
log = logging.getLogger(__name__)
def send_saved_search_alerts():
from pmg import app
from pmg.models import SavedSearch
application = newrelic.agent.application()
with newrelic.agent.BackgroundTask(application, name='send_saved_search_alerts', group='Task'):
... | import logging
import newrelic.agent
log = logging.getLogger(__name__)
def send_saved_search_alerts():
from pmg import app
from pmg.models import SavedSearch
application = newrelic.agent.application()
with newrelic.agent.BackgroundTask(application, name='send_saved_search_alerts', group='Task'):
... | <commit_before>import logging
import newrelic.agent
log = logging.getLogger(__name__)
def send_saved_search_alerts():
from pmg import app
from pmg.models import SavedSearch
application = newrelic.agent.application()
with newrelic.agent.BackgroundTask(application, name='send_saved_search_alerts', gro... | import logging
import newrelic.agent
log = logging.getLogger(__name__)
def send_saved_search_alerts():
from pmg import app
from pmg.models import SavedSearch
application = newrelic.agent.application()
with newrelic.agent.BackgroundTask(application, name='send_saved_search_alerts', group='Task'):
... | import logging
import newrelic.agent
log = logging.getLogger(__name__)
def send_saved_search_alerts():
from pmg import app
from pmg.models import SavedSearch
application = newrelic.agent.application()
with newrelic.agent.BackgroundTask(application, name='send_saved_search_alerts', group='Task'):
... | <commit_before>import logging
import newrelic.agent
log = logging.getLogger(__name__)
def send_saved_search_alerts():
from pmg import app
from pmg.models import SavedSearch
application = newrelic.agent.application()
with newrelic.agent.BackgroundTask(application, name='send_saved_search_alerts', gro... |
8f6672d9a92014c95deb687e53c146e17b66c880 | purchase_stock_picking_return_invoicing/__manifest__.py | purchase_stock_picking_return_invoicing/__manifest__.py | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Stock Picking Return Invoicing",
"summary": "Add an option to refund returned pickings",
"version": "14.0.1.0.0",
... | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Stock Picking Return Invoicing",
"summary": "Add an option to refund returned pickings",
"version": "14.0.1.1.0",
... | Hide button on proper counter | [FIX] purchase_stock_picking_return_invoicing: Hide button on proper counter
We should hide the view refunds button when there are no refunds, not
when there aren't invoices.
It hasn't been detected till now, because you usually have an invoice
before doing a refund, but in case you include this purchase order
in a v... | Python | agpl-3.0 | OCA/account-invoicing,OCA/account-invoicing | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Stock Picking Return Invoicing",
"summary": "Add an option to refund returned pickings",
"version": "14.0.1.0.0",
... | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Stock Picking Return Invoicing",
"summary": "Add an option to refund returned pickings",
"version": "14.0.1.1.0",
... | <commit_before># Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Stock Picking Return Invoicing",
"summary": "Add an option to refund returned pickings",
"version":... | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Stock Picking Return Invoicing",
"summary": "Add an option to refund returned pickings",
"version": "14.0.1.1.0",
... | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Stock Picking Return Invoicing",
"summary": "Add an option to refund returned pickings",
"version": "14.0.1.0.0",
... | <commit_before># Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Stock Picking Return Invoicing",
"summary": "Add an option to refund returned pickings",
"version":... |
5d50ab9457ef52d3b0a4d75966143245ed5ca305 | sdks/python/apache_beam/runners/worker/channel_factory.py | sdks/python/apache_beam/runners/worker/channel_factory.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... | Increase keepalive timeout to 5 minutes. | Increase keepalive timeout to 5 minutes.
| Python | apache-2.0 | chamikaramj/beam,chamikaramj/beam,apache/beam,robertwb/incubator-beam,lukecwik/incubator-beam,robertwb/incubator-beam,robertwb/incubator-beam,chamikaramj/beam,apache/beam,lukecwik/incubator-beam,apache/beam,chamikaramj/beam,chamikaramj/beam,lukecwik/incubator-beam,robertwb/incubator-beam,robertwb/incubator-beam,chamika... | #
# 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");... |
a5b3e991d128693e0d1f1ed6892c9c1c4a507a3d | src/apps/processing/ala/management/commands/ala_import.py | src/apps/processing/ala/management/commands/ala_import.py | import logging
from django.core.management.base import BaseCommand
from apps.processing.ala.util import util
from dateutil.parser import parse
from datetime import date, timedelta
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'Import data from ALA stations, optionally you can pass date.... | import logging
from django.core.management.base import BaseCommand
from apps.processing.ala.util import util
from dateutil.parser import parse
from datetime import date, timedelta
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'Import data from ALA stations, optionally you can pass date.... | Make default ALA's date the day before yesterday | Make default ALA's date the day before yesterday
| Python | bsd-3-clause | gis4dis/poster,gis4dis/poster,gis4dis/poster | import logging
from django.core.management.base import BaseCommand
from apps.processing.ala.util import util
from dateutil.parser import parse
from datetime import date, timedelta
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'Import data from ALA stations, optionally you can pass date.... | import logging
from django.core.management.base import BaseCommand
from apps.processing.ala.util import util
from dateutil.parser import parse
from datetime import date, timedelta
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'Import data from ALA stations, optionally you can pass date.... | <commit_before>import logging
from django.core.management.base import BaseCommand
from apps.processing.ala.util import util
from dateutil.parser import parse
from datetime import date, timedelta
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'Import data from ALA stations, optionally you... | import logging
from django.core.management.base import BaseCommand
from apps.processing.ala.util import util
from dateutil.parser import parse
from datetime import date, timedelta
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'Import data from ALA stations, optionally you can pass date.... | import logging
from django.core.management.base import BaseCommand
from apps.processing.ala.util import util
from dateutil.parser import parse
from datetime import date, timedelta
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'Import data from ALA stations, optionally you can pass date.... | <commit_before>import logging
from django.core.management.base import BaseCommand
from apps.processing.ala.util import util
from dateutil.parser import parse
from datetime import date, timedelta
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'Import data from ALA stations, optionally you... |
1540d76aff3d01ea4d94eacab362a82458e65dd7 | AFQ/tests/test_dki.py | AFQ/tests/test_dki.py | from AFQ import dki
import numpy.testing as npt
def test_fit_dki_inputs():
data_files = ["String in a list"]
bval_files = "just a string"
bvec_files = "just another string"
npt.assert_raises(ValueError, dki.fit_dki, data_files, bval_files,
bvec_files)
| import tempfile
import numpy.testing as npt
import nibabel.tmpdirs as nbtmp
import dipy.data as dpd
from AFQ import dki
def test_fit_dki_inputs():
data_files = ["String in a list"]
bval_files = "just a string"
bvec_files = "just another string"
npt.assert_raises(ValueError, dki.fit_dki, data_files, ... | Add smoke-testing of the DKI fit. | TST: Add smoke-testing of the DKI fit.
| Python | bsd-2-clause | yeatmanlab/pyAFQ,arokem/pyAFQ,yeatmanlab/pyAFQ,arokem/pyAFQ | from AFQ import dki
import numpy.testing as npt
def test_fit_dki_inputs():
data_files = ["String in a list"]
bval_files = "just a string"
bvec_files = "just another string"
npt.assert_raises(ValueError, dki.fit_dki, data_files, bval_files,
bvec_files)
TST: Add smoke-testing of th... | import tempfile
import numpy.testing as npt
import nibabel.tmpdirs as nbtmp
import dipy.data as dpd
from AFQ import dki
def test_fit_dki_inputs():
data_files = ["String in a list"]
bval_files = "just a string"
bvec_files = "just another string"
npt.assert_raises(ValueError, dki.fit_dki, data_files, ... | <commit_before>from AFQ import dki
import numpy.testing as npt
def test_fit_dki_inputs():
data_files = ["String in a list"]
bval_files = "just a string"
bvec_files = "just another string"
npt.assert_raises(ValueError, dki.fit_dki, data_files, bval_files,
bvec_files)
<commit_msg>T... | import tempfile
import numpy.testing as npt
import nibabel.tmpdirs as nbtmp
import dipy.data as dpd
from AFQ import dki
def test_fit_dki_inputs():
data_files = ["String in a list"]
bval_files = "just a string"
bvec_files = "just another string"
npt.assert_raises(ValueError, dki.fit_dki, data_files, ... | from AFQ import dki
import numpy.testing as npt
def test_fit_dki_inputs():
data_files = ["String in a list"]
bval_files = "just a string"
bvec_files = "just another string"
npt.assert_raises(ValueError, dki.fit_dki, data_files, bval_files,
bvec_files)
TST: Add smoke-testing of th... | <commit_before>from AFQ import dki
import numpy.testing as npt
def test_fit_dki_inputs():
data_files = ["String in a list"]
bval_files = "just a string"
bvec_files = "just another string"
npt.assert_raises(ValueError, dki.fit_dki, data_files, bval_files,
bvec_files)
<commit_msg>T... |
522e5e04b2a75a1c4c863116d8ada8c04e122c1a | scheduler.py | scheduler.py | import logging
import os
from apscheduler.schedulers.blocking import BlockingScheduler
from raven.base import Client as RavenClient
import warner
import archiver
import announcer
import flagger
raven_client = RavenClient()
logger = logging.getLogger(__name__)
# When testing changes, set the "TEST_SCHEDULE" envvar... | import logging
import os
from apscheduler.schedulers.blocking import BlockingScheduler
from raven.base import Client as RavenClient
import warner
import archiver
import announcer
import flagger
raven_client = RavenClient()
# When testing changes, set the "TEST_SCHEDULE" envvar to run more often
if os.getenv("TEST_... | Use logging directly in main | Use logging directly in main
| Python | apache-2.0 | royrapoport/destalinator,TheConnMan/destalinator,randsleadershipslack/destalinator,royrapoport/destalinator,TheConnMan/destalinator,randsleadershipslack/destalinator | import logging
import os
from apscheduler.schedulers.blocking import BlockingScheduler
from raven.base import Client as RavenClient
import warner
import archiver
import announcer
import flagger
raven_client = RavenClient()
logger = logging.getLogger(__name__)
# When testing changes, set the "TEST_SCHEDULE" envvar... | import logging
import os
from apscheduler.schedulers.blocking import BlockingScheduler
from raven.base import Client as RavenClient
import warner
import archiver
import announcer
import flagger
raven_client = RavenClient()
# When testing changes, set the "TEST_SCHEDULE" envvar to run more often
if os.getenv("TEST_... | <commit_before>import logging
import os
from apscheduler.schedulers.blocking import BlockingScheduler
from raven.base import Client as RavenClient
import warner
import archiver
import announcer
import flagger
raven_client = RavenClient()
logger = logging.getLogger(__name__)
# When testing changes, set the "TEST_S... | import logging
import os
from apscheduler.schedulers.blocking import BlockingScheduler
from raven.base import Client as RavenClient
import warner
import archiver
import announcer
import flagger
raven_client = RavenClient()
# When testing changes, set the "TEST_SCHEDULE" envvar to run more often
if os.getenv("TEST_... | import logging
import os
from apscheduler.schedulers.blocking import BlockingScheduler
from raven.base import Client as RavenClient
import warner
import archiver
import announcer
import flagger
raven_client = RavenClient()
logger = logging.getLogger(__name__)
# When testing changes, set the "TEST_SCHEDULE" envvar... | <commit_before>import logging
import os
from apscheduler.schedulers.blocking import BlockingScheduler
from raven.base import Client as RavenClient
import warner
import archiver
import announcer
import flagger
raven_client = RavenClient()
logger = logging.getLogger(__name__)
# When testing changes, set the "TEST_S... |
98bf53dd350869e31c89f14cb0ebfa6a467dd0ec | events/migrations/0017_auto_20160208_1729.py | events/migrations/0017_auto_20160208_1729.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-08 15:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0016_auto_20160205_1754'),
]
operations = [
migrations.AlterField(
... | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-08 15:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0016_auto_20160205_1754'),
]
operations = [
migrations.AlterField(
... | Revert "Remove redundant migration operation." | Revert "Remove redundant migration operation."
This reverts commit 9d34264d275acd32122de3567e60b24a417d6098.
| Python | mit | City-of-Helsinki/linkedevents,aapris/linkedevents,tuomas777/linkedevents,City-of-Helsinki/linkedevents,tuomas777/linkedevents,City-of-Helsinki/linkedevents,aapris/linkedevents,tuomas777/linkedevents,aapris/linkedevents | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-08 15:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0016_auto_20160205_1754'),
]
operations = [
migrations.AlterField(
... | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-08 15:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0016_auto_20160205_1754'),
]
operations = [
migrations.AlterField(
... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-08 15:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0016_auto_20160205_1754'),
]
operations = [
migration... | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-08 15:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0016_auto_20160205_1754'),
]
operations = [
migrations.AlterField(
... | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-08 15:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0016_auto_20160205_1754'),
]
operations = [
migrations.AlterField(
... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-08 15:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0016_auto_20160205_1754'),
]
operations = [
migration... |
4562f84191cde7b43ffb7e028eb33996789b1ea4 | foomodules/link_harvester/common_handlers.py | foomodules/link_harvester/common_handlers.py | import logging
import re
import socket
import urllib
from bs4 import BeautifulSoup
logger = logging.getLogger(__name__)
WURSTBALL_RE = re.compile("^http[s]://wurstball.de/[0-9]+/")
def default_handler(metadata):
return {key: getattr(metadata, key) for key in
["original_url", "url", "title", "descript... | import logging
import re
import socket
import urllib
from bs4 import BeautifulSoup
logger = logging.getLogger(__name__)
WURSTBALL_RE = re.compile("^http[s]://wurstball.de/[0-9]+/")
def default_handler(metadata):
return {key: getattr(metadata, key) for key in
["original_url", "url", "title", "descript... | Discard title and description from wurstball | Discard title and description from wurstball
| Python | mit | horazont/xmpp-crowd | import logging
import re
import socket
import urllib
from bs4 import BeautifulSoup
logger = logging.getLogger(__name__)
WURSTBALL_RE = re.compile("^http[s]://wurstball.de/[0-9]+/")
def default_handler(metadata):
return {key: getattr(metadata, key) for key in
["original_url", "url", "title", "descript... | import logging
import re
import socket
import urllib
from bs4 import BeautifulSoup
logger = logging.getLogger(__name__)
WURSTBALL_RE = re.compile("^http[s]://wurstball.de/[0-9]+/")
def default_handler(metadata):
return {key: getattr(metadata, key) for key in
["original_url", "url", "title", "descript... | <commit_before>import logging
import re
import socket
import urllib
from bs4 import BeautifulSoup
logger = logging.getLogger(__name__)
WURSTBALL_RE = re.compile("^http[s]://wurstball.de/[0-9]+/")
def default_handler(metadata):
return {key: getattr(metadata, key) for key in
["original_url", "url", "ti... | import logging
import re
import socket
import urllib
from bs4 import BeautifulSoup
logger = logging.getLogger(__name__)
WURSTBALL_RE = re.compile("^http[s]://wurstball.de/[0-9]+/")
def default_handler(metadata):
return {key: getattr(metadata, key) for key in
["original_url", "url", "title", "descript... | import logging
import re
import socket
import urllib
from bs4 import BeautifulSoup
logger = logging.getLogger(__name__)
WURSTBALL_RE = re.compile("^http[s]://wurstball.de/[0-9]+/")
def default_handler(metadata):
return {key: getattr(metadata, key) for key in
["original_url", "url", "title", "descript... | <commit_before>import logging
import re
import socket
import urllib
from bs4 import BeautifulSoup
logger = logging.getLogger(__name__)
WURSTBALL_RE = re.compile("^http[s]://wurstball.de/[0-9]+/")
def default_handler(metadata):
return {key: getattr(metadata, key) for key in
["original_url", "url", "ti... |
487382ab2aafe1c92aa64192432379b4f3809732 | pywkeeper.py | pywkeeper.py | from Crypto.Cipher import AES
import json
import os
KEY_LENGTH = 256
BLOCK_LENGTH = 16
KEY_FILE = 'key'
ENCRYPTED_FILE = 'data'
DECRYPTED_FILE = 'tmp'
EOT_CHAR = '\x04'
def get_cipher(iv):
try:
key = open(KEY_FILE, 'rb').read()
except IOError:
key = input("Please enter the decryption key: ")... | #!/usr/bin/env python
from Crypto.Cipher import AES
import json
import os
import optparse
KEY_LENGTH = 256
BLOCK_LENGTH = 16
KEY_FILE = 'key'
ENCRYPTED_FILE = 'data'
DECRYPTED_FILE = 'tmp'
EOT_CHAR = '\x04'
def main(options, arguments):
pass
def get_cipher(iv):
try:
key = open(KEY_FILE, 'rb').read(... | Add option parser and main method | Add option parser and main method
| Python | unlicense | kvikshaug/pwkeeper | from Crypto.Cipher import AES
import json
import os
KEY_LENGTH = 256
BLOCK_LENGTH = 16
KEY_FILE = 'key'
ENCRYPTED_FILE = 'data'
DECRYPTED_FILE = 'tmp'
EOT_CHAR = '\x04'
def get_cipher(iv):
try:
key = open(KEY_FILE, 'rb').read()
except IOError:
key = input("Please enter the decryption key: ")... | #!/usr/bin/env python
from Crypto.Cipher import AES
import json
import os
import optparse
KEY_LENGTH = 256
BLOCK_LENGTH = 16
KEY_FILE = 'key'
ENCRYPTED_FILE = 'data'
DECRYPTED_FILE = 'tmp'
EOT_CHAR = '\x04'
def main(options, arguments):
pass
def get_cipher(iv):
try:
key = open(KEY_FILE, 'rb').read(... | <commit_before>from Crypto.Cipher import AES
import json
import os
KEY_LENGTH = 256
BLOCK_LENGTH = 16
KEY_FILE = 'key'
ENCRYPTED_FILE = 'data'
DECRYPTED_FILE = 'tmp'
EOT_CHAR = '\x04'
def get_cipher(iv):
try:
key = open(KEY_FILE, 'rb').read()
except IOError:
key = input("Please enter the dec... | #!/usr/bin/env python
from Crypto.Cipher import AES
import json
import os
import optparse
KEY_LENGTH = 256
BLOCK_LENGTH = 16
KEY_FILE = 'key'
ENCRYPTED_FILE = 'data'
DECRYPTED_FILE = 'tmp'
EOT_CHAR = '\x04'
def main(options, arguments):
pass
def get_cipher(iv):
try:
key = open(KEY_FILE, 'rb').read(... | from Crypto.Cipher import AES
import json
import os
KEY_LENGTH = 256
BLOCK_LENGTH = 16
KEY_FILE = 'key'
ENCRYPTED_FILE = 'data'
DECRYPTED_FILE = 'tmp'
EOT_CHAR = '\x04'
def get_cipher(iv):
try:
key = open(KEY_FILE, 'rb').read()
except IOError:
key = input("Please enter the decryption key: ")... | <commit_before>from Crypto.Cipher import AES
import json
import os
KEY_LENGTH = 256
BLOCK_LENGTH = 16
KEY_FILE = 'key'
ENCRYPTED_FILE = 'data'
DECRYPTED_FILE = 'tmp'
EOT_CHAR = '\x04'
def get_cipher(iv):
try:
key = open(KEY_FILE, 'rb').read()
except IOError:
key = input("Please enter the dec... |
8548befae1c2fa2f0e607a39917f789c0a078235 | Misc/Vim/syntax_test.py | Misc/Vim/syntax_test.py | """Test file for syntax highlighting of editors.
Meant to cover a wide range of different types of statements and expressions.
Not necessarily sensical.
"""
assert True
def foo(): pass
foo() # Uncoloured
while False: pass
1 and 2
if False: pass
from sys import path
# Comment
# XXX catch your attention
'single-quote'... | """Test file for syntax highlighting of editors.
Meant to cover a wide range of different types of statements and expressions.
Not necessarily sensical or comprehensive (assume that if one exception is
highlighted that all are, for instance).
Highlighting extraneous whitespace at the end of the line is not represente... | Remove line meant to test trailing whitespace since that kind of whitespace is automatically removed. | Remove line meant to test trailing whitespace since that kind of whitespace is
automatically removed.
Also annotate what each line is meant to test.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | """Test file for syntax highlighting of editors.
Meant to cover a wide range of different types of statements and expressions.
Not necessarily sensical.
"""
assert True
def foo(): pass
foo() # Uncoloured
while False: pass
1 and 2
if False: pass
from sys import path
# Comment
# XXX catch your attention
'single-quote'... | """Test file for syntax highlighting of editors.
Meant to cover a wide range of different types of statements and expressions.
Not necessarily sensical or comprehensive (assume that if one exception is
highlighted that all are, for instance).
Highlighting extraneous whitespace at the end of the line is not represente... | <commit_before>"""Test file for syntax highlighting of editors.
Meant to cover a wide range of different types of statements and expressions.
Not necessarily sensical.
"""
assert True
def foo(): pass
foo() # Uncoloured
while False: pass
1 and 2
if False: pass
from sys import path
# Comment
# XXX catch your attention... | """Test file for syntax highlighting of editors.
Meant to cover a wide range of different types of statements and expressions.
Not necessarily sensical or comprehensive (assume that if one exception is
highlighted that all are, for instance).
Highlighting extraneous whitespace at the end of the line is not represente... | """Test file for syntax highlighting of editors.
Meant to cover a wide range of different types of statements and expressions.
Not necessarily sensical.
"""
assert True
def foo(): pass
foo() # Uncoloured
while False: pass
1 and 2
if False: pass
from sys import path
# Comment
# XXX catch your attention
'single-quote'... | <commit_before>"""Test file for syntax highlighting of editors.
Meant to cover a wide range of different types of statements and expressions.
Not necessarily sensical.
"""
assert True
def foo(): pass
foo() # Uncoloured
while False: pass
1 and 2
if False: pass
from sys import path
# Comment
# XXX catch your attention... |
fdf0d3240f7c2ccdfdd65d223f7949c98c9dc527 | multi_import/exporter.py | multi_import/exporter.py | import tablib
from multi_import.fields import FieldHelper
__all__ = [
'Exporter',
]
class Exporter(FieldHelper):
def __init__(self, queryset, serializer):
self.queryset = queryset
self.serializer = serializer()
def export_dataset(self, template=False):
dataset = tablib.Dataset(... | import tablib
from multi_import.fields import FieldHelper
__all__ = [
'Exporter',
]
class Exporter(FieldHelper):
def __init__(self, queryset, serializer):
self.queryset = queryset
self.serializer = serializer()
def export_dataset(self, template=False):
dataset = tablib.Dataset(... | Fix for formula interpretation triggering in Excel | Fix for formula interpretation triggering in Excel
| Python | mit | sdelements/django-multi-import | import tablib
from multi_import.fields import FieldHelper
__all__ = [
'Exporter',
]
class Exporter(FieldHelper):
def __init__(self, queryset, serializer):
self.queryset = queryset
self.serializer = serializer()
def export_dataset(self, template=False):
dataset = tablib.Dataset(... | import tablib
from multi_import.fields import FieldHelper
__all__ = [
'Exporter',
]
class Exporter(FieldHelper):
def __init__(self, queryset, serializer):
self.queryset = queryset
self.serializer = serializer()
def export_dataset(self, template=False):
dataset = tablib.Dataset(... | <commit_before>import tablib
from multi_import.fields import FieldHelper
__all__ = [
'Exporter',
]
class Exporter(FieldHelper):
def __init__(self, queryset, serializer):
self.queryset = queryset
self.serializer = serializer()
def export_dataset(self, template=False):
dataset = ... | import tablib
from multi_import.fields import FieldHelper
__all__ = [
'Exporter',
]
class Exporter(FieldHelper):
def __init__(self, queryset, serializer):
self.queryset = queryset
self.serializer = serializer()
def export_dataset(self, template=False):
dataset = tablib.Dataset(... | import tablib
from multi_import.fields import FieldHelper
__all__ = [
'Exporter',
]
class Exporter(FieldHelper):
def __init__(self, queryset, serializer):
self.queryset = queryset
self.serializer = serializer()
def export_dataset(self, template=False):
dataset = tablib.Dataset(... | <commit_before>import tablib
from multi_import.fields import FieldHelper
__all__ = [
'Exporter',
]
class Exporter(FieldHelper):
def __init__(self, queryset, serializer):
self.queryset = queryset
self.serializer = serializer()
def export_dataset(self, template=False):
dataset = ... |
09ebeb873c83d51053ef6aa2d7c6ce47b4be5070 | ckanext/archiver/helpers.py | ckanext/archiver/helpers.py | from ckan.plugins import toolkit as tk
def archiver_resource_show(resource_id):
data_dict = {'id': resource_id}
return tk.get_action('archiver_resource_show')(data_dict)
def archiver_is_resource_broken_html(resource):
archival = resource.get('archiver')
if not archival:
return '<!-- No archi... | from ckan.plugins import toolkit as tk
def archiver_resource_show(resource_id):
data_dict = {'id': resource_id}
return tk.get_action('archiver_resource_show')(data_dict)
def archiver_is_resource_broken_html(resource):
archival = resource.get('archiver')
if not archival:
return tk.literal('<!... | Hide comments meant as unseen | Hide comments meant as unseen
| Python | mit | ckan/ckanext-archiver,datagovuk/ckanext-archiver,datagovuk/ckanext-archiver,ckan/ckanext-archiver,datagovuk/ckanext-archiver,ckan/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver | from ckan.plugins import toolkit as tk
def archiver_resource_show(resource_id):
data_dict = {'id': resource_id}
return tk.get_action('archiver_resource_show')(data_dict)
def archiver_is_resource_broken_html(resource):
archival = resource.get('archiver')
if not archival:
return '<!-- No archi... | from ckan.plugins import toolkit as tk
def archiver_resource_show(resource_id):
data_dict = {'id': resource_id}
return tk.get_action('archiver_resource_show')(data_dict)
def archiver_is_resource_broken_html(resource):
archival = resource.get('archiver')
if not archival:
return tk.literal('<!... | <commit_before>from ckan.plugins import toolkit as tk
def archiver_resource_show(resource_id):
data_dict = {'id': resource_id}
return tk.get_action('archiver_resource_show')(data_dict)
def archiver_is_resource_broken_html(resource):
archival = resource.get('archiver')
if not archival:
return... | from ckan.plugins import toolkit as tk
def archiver_resource_show(resource_id):
data_dict = {'id': resource_id}
return tk.get_action('archiver_resource_show')(data_dict)
def archiver_is_resource_broken_html(resource):
archival = resource.get('archiver')
if not archival:
return tk.literal('<!... | from ckan.plugins import toolkit as tk
def archiver_resource_show(resource_id):
data_dict = {'id': resource_id}
return tk.get_action('archiver_resource_show')(data_dict)
def archiver_is_resource_broken_html(resource):
archival = resource.get('archiver')
if not archival:
return '<!-- No archi... | <commit_before>from ckan.plugins import toolkit as tk
def archiver_resource_show(resource_id):
data_dict = {'id': resource_id}
return tk.get_action('archiver_resource_show')(data_dict)
def archiver_is_resource_broken_html(resource):
archival = resource.get('archiver')
if not archival:
return... |
4ebc13ac1913dfe3fcd7bdb7c7235b7b88718574 | fastdraw/api/commands.py | fastdraw/api/commands.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2014 PolyBeacon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2014 PolyBeacon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | Add documentation for goto command | Add documentation for goto command
Change-Id: I94e280eef509abe65f552b6e78f21eabfe4192e3
Signed-off-by: Sarah Liske <e262b8a15d521183e33ead305fd79e90e1942cdd@polybeacon.com>
| Python | apache-2.0 | kickstandproject/fastdraw | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2014 PolyBeacon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2014 PolyBeacon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2014 PolyBeacon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2014 PolyBeacon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2014 PolyBeacon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2014 PolyBeacon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... |
d587cc4f87276be1a95966a82293c4bc7bb02e26 | experiments/tf_trainer/common/base_model.py | experiments/tf_trainer/common/base_model.py | """Interface for Models."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
import tensorflow as tf
from keras import models
from tf_trainer.common import text_preprocessor
from tf_trainer.common import types
from typing import Callable
class ... | """Interface for Models."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
import tensorflow as tf
from keras import models
from tf_trainer.common import text_preprocessor
from tf_trainer.common import types
from typing import Callable
class ... | Correct method signature for BaseModel create | Correct method signature for BaseModel create
| Python | apache-2.0 | conversationai/conversationai-models,conversationai/conversationai-models | """Interface for Models."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
import tensorflow as tf
from keras import models
from tf_trainer.common import text_preprocessor
from tf_trainer.common import types
from typing import Callable
class ... | """Interface for Models."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
import tensorflow as tf
from keras import models
from tf_trainer.common import text_preprocessor
from tf_trainer.common import types
from typing import Callable
class ... | <commit_before>"""Interface for Models."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
import tensorflow as tf
from keras import models
from tf_trainer.common import text_preprocessor
from tf_trainer.common import types
from typing import Ca... | """Interface for Models."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
import tensorflow as tf
from keras import models
from tf_trainer.common import text_preprocessor
from tf_trainer.common import types
from typing import Callable
class ... | """Interface for Models."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
import tensorflow as tf
from keras import models
from tf_trainer.common import text_preprocessor
from tf_trainer.common import types
from typing import Callable
class ... | <commit_before>"""Interface for Models."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
import tensorflow as tf
from keras import models
from tf_trainer.common import text_preprocessor
from tf_trainer.common import types
from typing import Ca... |
f0cf3234880007c548bad894be8a0df797387da7 | common/lib/xmodule/setup.py | common/lib/xmodule/setup.py | from setuptools import setup, find_packages
setup(
name="XModule",
version="0.1",
packages=find_packages(),
install_requires=['distribute'],
package_data={
'': ['js/*']
},
# See http://guide.python-distribute.org/creation.html#entry-points
# for a description of entry_points
... | from setuptools import setup, find_packages
setup(
name="XModule",
version="0.1",
packages=find_packages(),
install_requires=['distribute'],
package_data={
'': ['js/*']
},
# See http://guide.python-distribute.org/creation.html#entry-points
# for a description of entry_points
... | Handle chapters as sequence modules | Handle chapters as sequence modules
| Python | agpl-3.0 | cselis86/edx-platform,leansoft/edx-platform,dsajkl/reqiop,jazkarta/edx-platform-for-isc,Unow/edx-platform,jazkarta/edx-platform,appliedx/edx-platform,ferabra/edx-platform,a-parhom/edx-platform,romain-li/edx-platform,mjg2203/edx-platform-seas,antoviaque/edx-platform,fintech-circle/edx-platform,ampax/edx-platform-backup,... | from setuptools import setup, find_packages
setup(
name="XModule",
version="0.1",
packages=find_packages(),
install_requires=['distribute'],
package_data={
'': ['js/*']
},
# See http://guide.python-distribute.org/creation.html#entry-points
# for a description of entry_points
... | from setuptools import setup, find_packages
setup(
name="XModule",
version="0.1",
packages=find_packages(),
install_requires=['distribute'],
package_data={
'': ['js/*']
},
# See http://guide.python-distribute.org/creation.html#entry-points
# for a description of entry_points
... | <commit_before>from setuptools import setup, find_packages
setup(
name="XModule",
version="0.1",
packages=find_packages(),
install_requires=['distribute'],
package_data={
'': ['js/*']
},
# See http://guide.python-distribute.org/creation.html#entry-points
# for a description of ... | from setuptools import setup, find_packages
setup(
name="XModule",
version="0.1",
packages=find_packages(),
install_requires=['distribute'],
package_data={
'': ['js/*']
},
# See http://guide.python-distribute.org/creation.html#entry-points
# for a description of entry_points
... | from setuptools import setup, find_packages
setup(
name="XModule",
version="0.1",
packages=find_packages(),
install_requires=['distribute'],
package_data={
'': ['js/*']
},
# See http://guide.python-distribute.org/creation.html#entry-points
# for a description of entry_points
... | <commit_before>from setuptools import setup, find_packages
setup(
name="XModule",
version="0.1",
packages=find_packages(),
install_requires=['distribute'],
package_data={
'': ['js/*']
},
# See http://guide.python-distribute.org/creation.html#entry-points
# for a description of ... |
cb5591228408ccd22cfb3df9106d4ecdeac295a9 | nose2/plugins/collect.py | nose2/plugins/collect.py | """
This plugin implements :func:`startTestRun`, setting a test executor
(``event.executeTests``) that just collects tests without executing
them. To do so it calls result.startTest, result.addSuccess and
result.stopTest for ech test, without calling the test itself.
"""
from nose2.events import Plugin
from nose2.compa... | """
This plugin implements :func:`startTestRun`, setting a test executor
(``event.executeTests``) that just collects tests without executing
them. To do so it calls result.startTest, result.addSuccess and
result.stopTest for each test, without calling the test itself.
"""
from nose2.events import Plugin
from nose2.comp... | Fix typo "ech" -> "each" | Fix typo "ech" -> "each"
| Python | bsd-2-clause | ptthiem/nose2,ptthiem/nose2 | """
This plugin implements :func:`startTestRun`, setting a test executor
(``event.executeTests``) that just collects tests without executing
them. To do so it calls result.startTest, result.addSuccess and
result.stopTest for ech test, without calling the test itself.
"""
from nose2.events import Plugin
from nose2.compa... | """
This plugin implements :func:`startTestRun`, setting a test executor
(``event.executeTests``) that just collects tests without executing
them. To do so it calls result.startTest, result.addSuccess and
result.stopTest for each test, without calling the test itself.
"""
from nose2.events import Plugin
from nose2.comp... | <commit_before>"""
This plugin implements :func:`startTestRun`, setting a test executor
(``event.executeTests``) that just collects tests without executing
them. To do so it calls result.startTest, result.addSuccess and
result.stopTest for ech test, without calling the test itself.
"""
from nose2.events import Plugin
f... | """
This plugin implements :func:`startTestRun`, setting a test executor
(``event.executeTests``) that just collects tests without executing
them. To do so it calls result.startTest, result.addSuccess and
result.stopTest for each test, without calling the test itself.
"""
from nose2.events import Plugin
from nose2.comp... | """
This plugin implements :func:`startTestRun`, setting a test executor
(``event.executeTests``) that just collects tests without executing
them. To do so it calls result.startTest, result.addSuccess and
result.stopTest for ech test, without calling the test itself.
"""
from nose2.events import Plugin
from nose2.compa... | <commit_before>"""
This plugin implements :func:`startTestRun`, setting a test executor
(``event.executeTests``) that just collects tests without executing
them. To do so it calls result.startTest, result.addSuccess and
result.stopTest for ech test, without calling the test itself.
"""
from nose2.events import Plugin
f... |
9b5202ef3c27b44e70567b72a0657ae40557c041 | tests/test_cobrapy_compatibility.py | tests/test_cobrapy_compatibility.py | # Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU.
#
# 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 requi... | # Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU.
#
# 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 requi... | Remove test_single_gene_deletion (renamed in cobra=0.4.0b1) | Remove test_single_gene_deletion (renamed in cobra=0.4.0b1)
| Python | apache-2.0 | KristianJensen/cameo,biosustain/cameo,biosustain/cameo | # Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU.
#
# 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 requi... | # Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU.
#
# 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 requi... | <commit_before># Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU.
#
# 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
#... | # Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU.
#
# 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 requi... | # Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU.
#
# 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 requi... | <commit_before># Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU.
#
# 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
#... |
16d99a20088e81045e34999b6045e9222d510cd5 | app.py | app.py | # -*- coding: UTF-8 -*-
"""
trytond_async.celery
Implementation of the celery app
This module is named celery because of the way celery workers lookup
the app when `--proj` argument is passed to the worker. For more details
see the celery documentation at:
http://docs.celeryproject.org/en/late... | # -*- coding: UTF-8 -*-
"""
trytond_async.celery
Implementation of the celery app
This module is named celery because of the way celery workers lookup
the app when `--proj` argument is passed to the worker. For more details
see the celery documentation at:
http://docs.celeryproject.org/en/late... | Use raven for logging if available | Use raven for logging if available
| Python | bsd-3-clause | fulfilio/trytond-async,tarunbhardwaj/trytond-async | # -*- coding: UTF-8 -*-
"""
trytond_async.celery
Implementation of the celery app
This module is named celery because of the way celery workers lookup
the app when `--proj` argument is passed to the worker. For more details
see the celery documentation at:
http://docs.celeryproject.org/en/late... | # -*- coding: UTF-8 -*-
"""
trytond_async.celery
Implementation of the celery app
This module is named celery because of the way celery workers lookup
the app when `--proj` argument is passed to the worker. For more details
see the celery documentation at:
http://docs.celeryproject.org/en/late... | <commit_before># -*- coding: UTF-8 -*-
"""
trytond_async.celery
Implementation of the celery app
This module is named celery because of the way celery workers lookup
the app when `--proj` argument is passed to the worker. For more details
see the celery documentation at:
http://docs.celeryproj... | # -*- coding: UTF-8 -*-
"""
trytond_async.celery
Implementation of the celery app
This module is named celery because of the way celery workers lookup
the app when `--proj` argument is passed to the worker. For more details
see the celery documentation at:
http://docs.celeryproject.org/en/late... | # -*- coding: UTF-8 -*-
"""
trytond_async.celery
Implementation of the celery app
This module is named celery because of the way celery workers lookup
the app when `--proj` argument is passed to the worker. For more details
see the celery documentation at:
http://docs.celeryproject.org/en/late... | <commit_before># -*- coding: UTF-8 -*-
"""
trytond_async.celery
Implementation of the celery app
This module is named celery because of the way celery workers lookup
the app when `--proj` argument is passed to the worker. For more details
see the celery documentation at:
http://docs.celeryproj... |
9121c8c074a31fd3668f8281c7f093360ed72988 | salad/cli.py | salad/cli.py | import sys
import argparse
from lettuce.bin import main as lettuce_main
from lettuce import world
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
BROWSER_CHOICES = [browser.lower()
for browser in DesiredCapabilities.__dict__.keys()
if not browser.st... | import sys
import argparse
from lettuce.bin import main as lettuce_main
from lettuce import world
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
BROWSER_CHOICES = [browser.lower()
for browser in DesiredCapabilities.__dict__.keys()
if not browser.st... | Use parse_known_args and pass leftovers to lettuce | Use parse_known_args and pass leftovers to lettuce
Seems to be more reliable at handling weird argument ordering than
REMAINDER was
| Python | bsd-3-clause | salad/salad,salad/salad,beanqueen/salad,beanqueen/salad | import sys
import argparse
from lettuce.bin import main as lettuce_main
from lettuce import world
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
BROWSER_CHOICES = [browser.lower()
for browser in DesiredCapabilities.__dict__.keys()
if not browser.st... | import sys
import argparse
from lettuce.bin import main as lettuce_main
from lettuce import world
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
BROWSER_CHOICES = [browser.lower()
for browser in DesiredCapabilities.__dict__.keys()
if not browser.st... | <commit_before>import sys
import argparse
from lettuce.bin import main as lettuce_main
from lettuce import world
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
BROWSER_CHOICES = [browser.lower()
for browser in DesiredCapabilities.__dict__.keys()
if... | import sys
import argparse
from lettuce.bin import main as lettuce_main
from lettuce import world
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
BROWSER_CHOICES = [browser.lower()
for browser in DesiredCapabilities.__dict__.keys()
if not browser.st... | import sys
import argparse
from lettuce.bin import main as lettuce_main
from lettuce import world
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
BROWSER_CHOICES = [browser.lower()
for browser in DesiredCapabilities.__dict__.keys()
if not browser.st... | <commit_before>import sys
import argparse
from lettuce.bin import main as lettuce_main
from lettuce import world
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
BROWSER_CHOICES = [browser.lower()
for browser in DesiredCapabilities.__dict__.keys()
if... |
c79944c39cb109430839cd92a366ab734aee0f64 | ievv_opensource/ievv_sms/apps.py | ievv_opensource/ievv_sms/apps.py | from django.apps import AppConfig
class ModelSmsAppConfig(AppConfig):
name = 'ievv_opensource.ievv_sms'
verbose_name = "IEVV SMS"
def ready(self):
from ievv_opensource.ievv_sms import sms_registry
from ievv_opensource.ievv_sms.backends import debugprint
registry = sms_registry.Reg... | from django.apps import AppConfig
class ModelSmsAppConfig(AppConfig):
name = 'ievv_opensource.ievv_sms'
verbose_name = "IEVV SMS"
def ready(self):
from ievv_opensource.ievv_sms import sms_registry
from ievv_opensource.ievv_sms.backends import debugprint
from ievv_opensource.ievv_s... | Add pswin backend to registry. | ievv_sms: Add pswin backend to registry.
| Python | bsd-3-clause | appressoas/ievv_opensource,appressoas/ievv_opensource,appressoas/ievv_opensource,appressoas/ievv_opensource,appressoas/ievv_opensource | from django.apps import AppConfig
class ModelSmsAppConfig(AppConfig):
name = 'ievv_opensource.ievv_sms'
verbose_name = "IEVV SMS"
def ready(self):
from ievv_opensource.ievv_sms import sms_registry
from ievv_opensource.ievv_sms.backends import debugprint
registry = sms_registry.Reg... | from django.apps import AppConfig
class ModelSmsAppConfig(AppConfig):
name = 'ievv_opensource.ievv_sms'
verbose_name = "IEVV SMS"
def ready(self):
from ievv_opensource.ievv_sms import sms_registry
from ievv_opensource.ievv_sms.backends import debugprint
from ievv_opensource.ievv_s... | <commit_before>from django.apps import AppConfig
class ModelSmsAppConfig(AppConfig):
name = 'ievv_opensource.ievv_sms'
verbose_name = "IEVV SMS"
def ready(self):
from ievv_opensource.ievv_sms import sms_registry
from ievv_opensource.ievv_sms.backends import debugprint
registry = s... | from django.apps import AppConfig
class ModelSmsAppConfig(AppConfig):
name = 'ievv_opensource.ievv_sms'
verbose_name = "IEVV SMS"
def ready(self):
from ievv_opensource.ievv_sms import sms_registry
from ievv_opensource.ievv_sms.backends import debugprint
from ievv_opensource.ievv_s... | from django.apps import AppConfig
class ModelSmsAppConfig(AppConfig):
name = 'ievv_opensource.ievv_sms'
verbose_name = "IEVV SMS"
def ready(self):
from ievv_opensource.ievv_sms import sms_registry
from ievv_opensource.ievv_sms.backends import debugprint
registry = sms_registry.Reg... | <commit_before>from django.apps import AppConfig
class ModelSmsAppConfig(AppConfig):
name = 'ievv_opensource.ievv_sms'
verbose_name = "IEVV SMS"
def ready(self):
from ievv_opensource.ievv_sms import sms_registry
from ievv_opensource.ievv_sms.backends import debugprint
registry = s... |
a9b1d08e2e248b606ef269ebc7e3fb44698d3efc | a_john_shots/__init__.py | a_john_shots/__init__.py | #!/bin/env python
# A-John-Shots - Python module/library for saving Security Hash Algorithms into JSON format.
# Copyright (C) 2017 Funilrys - Nissar Chababy <contact at funilrys dot com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publi... | #!/bin/env python
# A-John-Shots - Python module/library for saving Security Hash Algorithms into JSON format.
# Copyright (C) 2017 Funilrys - Nissar Chababy <contact at funilrys dot com>
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO... | Update licence header + Introduction of docstrings | Update licence header + Introduction of docstrings
| Python | mit | funilrys/A-John-Shots | #!/bin/env python
# A-John-Shots - Python module/library for saving Security Hash Algorithms into JSON format.
# Copyright (C) 2017 Funilrys - Nissar Chababy <contact at funilrys dot com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publi... | #!/bin/env python
# A-John-Shots - Python module/library for saving Security Hash Algorithms into JSON format.
# Copyright (C) 2017 Funilrys - Nissar Chababy <contact at funilrys dot com>
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO... | <commit_before>#!/bin/env python
# A-John-Shots - Python module/library for saving Security Hash Algorithms into JSON format.
# Copyright (C) 2017 Funilrys - Nissar Chababy <contact at funilrys dot com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | #!/bin/env python
# A-John-Shots - Python module/library for saving Security Hash Algorithms into JSON format.
# Copyright (C) 2017 Funilrys - Nissar Chababy <contact at funilrys dot com>
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO... | #!/bin/env python
# A-John-Shots - Python module/library for saving Security Hash Algorithms into JSON format.
# Copyright (C) 2017 Funilrys - Nissar Chababy <contact at funilrys dot com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publi... | <commit_before>#!/bin/env python
# A-John-Shots - Python module/library for saving Security Hash Algorithms into JSON format.
# Copyright (C) 2017 Funilrys - Nissar Chababy <contact at funilrys dot com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... |
21ac10919e4c63e8bb8760e186438e335a8f188c | setup_git.py | setup_git.py | #!/usr/bin/env python
"""Call the main setup_git.py. This should be
copied to the main directory of your project and named setup_git.py."""
import os
import os.path
os.system(os.path.join("tools", "dev_tools", "git", "setup_git.py"))
| #!/usr/bin/env python3
"""Call the main setup_git.py. This should be
copied to the main directory of your project and named setup_git.py."""
import os
import os.path
os.system(os.path.join("tools", "dev_tools", "git", "setup_git.py"))
| Use Python 3 by default | Use Python 3 by default
| Python | apache-2.0 | salilab/rmf,salilab/rmf,salilab/rmf,salilab/rmf | #!/usr/bin/env python
"""Call the main setup_git.py. This should be
copied to the main directory of your project and named setup_git.py."""
import os
import os.path
os.system(os.path.join("tools", "dev_tools", "git", "setup_git.py"))
Use Python 3 by default | #!/usr/bin/env python3
"""Call the main setup_git.py. This should be
copied to the main directory of your project and named setup_git.py."""
import os
import os.path
os.system(os.path.join("tools", "dev_tools", "git", "setup_git.py"))
| <commit_before>#!/usr/bin/env python
"""Call the main setup_git.py. This should be
copied to the main directory of your project and named setup_git.py."""
import os
import os.path
os.system(os.path.join("tools", "dev_tools", "git", "setup_git.py"))
<commit_msg>Use Python 3 by default<commit_after> | #!/usr/bin/env python3
"""Call the main setup_git.py. This should be
copied to the main directory of your project and named setup_git.py."""
import os
import os.path
os.system(os.path.join("tools", "dev_tools", "git", "setup_git.py"))
| #!/usr/bin/env python
"""Call the main setup_git.py. This should be
copied to the main directory of your project and named setup_git.py."""
import os
import os.path
os.system(os.path.join("tools", "dev_tools", "git", "setup_git.py"))
Use Python 3 by default#!/usr/bin/env python3
"""Call the main setup_git.py. This s... | <commit_before>#!/usr/bin/env python
"""Call the main setup_git.py. This should be
copied to the main directory of your project and named setup_git.py."""
import os
import os.path
os.system(os.path.join("tools", "dev_tools", "git", "setup_git.py"))
<commit_msg>Use Python 3 by default<commit_after>#!/usr/bin/env pytho... |
fc740373b772d46c8a0a3bf2cacef503df7e69ad | bokeh/models/mappers.py | bokeh/models/mappers.py | from __future__ import absolute_import
import numpy as np
from six import string_types
from ..plot_object import PlotObject
from ..properties import Any, Float, Color
from .. import palettes
class ColorMapper(PlotObject):
''' Base class for color mapper objects. '''
pass
class LinearColorMapper(ColorMapper)... | from __future__ import absolute_import
import numpy as np
from six import string_types
from ..plot_object import PlotObject
from ..properties import Any, Float, Color
from .. import palettes
class ColorMapper(PlotObject):
''' Base class for color mapper objects. '''
pass
class LinearColorMapper(ColorMapper)... | Remove useless code from LinearColorMapper | Remove useless code from LinearColorMapper
| Python | bsd-3-clause | timsnyder/bokeh,khkaminska/bokeh,KasperPRasmussen/bokeh,almarklein/bokeh,rhiever/bokeh,matbra/bokeh,schoolie/bokeh,aavanian/bokeh,draperjames/bokeh,srinathv/bokeh,rs2/bokeh,rothnic/bokeh,CrazyGuo/bokeh,evidation-health/bokeh,ericmjl/bokeh,philippjfr/bokeh,stuart-knock/bokeh,DuCorey/bokeh,gpfreitas/bokeh,ptitjano/bokeh,... | from __future__ import absolute_import
import numpy as np
from six import string_types
from ..plot_object import PlotObject
from ..properties import Any, Float, Color
from .. import palettes
class ColorMapper(PlotObject):
''' Base class for color mapper objects. '''
pass
class LinearColorMapper(ColorMapper)... | from __future__ import absolute_import
import numpy as np
from six import string_types
from ..plot_object import PlotObject
from ..properties import Any, Float, Color
from .. import palettes
class ColorMapper(PlotObject):
''' Base class for color mapper objects. '''
pass
class LinearColorMapper(ColorMapper)... | <commit_before>from __future__ import absolute_import
import numpy as np
from six import string_types
from ..plot_object import PlotObject
from ..properties import Any, Float, Color
from .. import palettes
class ColorMapper(PlotObject):
''' Base class for color mapper objects. '''
pass
class LinearColorMapp... | from __future__ import absolute_import
import numpy as np
from six import string_types
from ..plot_object import PlotObject
from ..properties import Any, Float, Color
from .. import palettes
class ColorMapper(PlotObject):
''' Base class for color mapper objects. '''
pass
class LinearColorMapper(ColorMapper)... | from __future__ import absolute_import
import numpy as np
from six import string_types
from ..plot_object import PlotObject
from ..properties import Any, Float, Color
from .. import palettes
class ColorMapper(PlotObject):
''' Base class for color mapper objects. '''
pass
class LinearColorMapper(ColorMapper)... | <commit_before>from __future__ import absolute_import
import numpy as np
from six import string_types
from ..plot_object import PlotObject
from ..properties import Any, Float, Color
from .. import palettes
class ColorMapper(PlotObject):
''' Base class for color mapper objects. '''
pass
class LinearColorMapp... |
af73cf9c453f975e6287b2e4fd53aab27978f7a8 | app/handlers/__init__.py | app/handlers/__init__.py | __version__ = "2020.11.2"
__versionfull__ = __version__
| __version__ = "2021.3.0"
__versionfull__ = __version__
| Bump app version to 2021.3.0 | Bump app version to 2021.3.0
Signed-off-by: Guillaume Tucker <e7e20b7c30f19d4ca6b81319ef81bf200369d137@collabora.com>
| Python | lgpl-2.1 | kernelci/kernelci-backend,kernelci/kernelci-backend | __version__ = "2020.11.2"
__versionfull__ = __version__
Bump app version to 2021.3.0
Signed-off-by: Guillaume Tucker <e7e20b7c30f19d4ca6b81319ef81bf200369d137@collabora.com> | __version__ = "2021.3.0"
__versionfull__ = __version__
| <commit_before>__version__ = "2020.11.2"
__versionfull__ = __version__
<commit_msg>Bump app version to 2021.3.0
Signed-off-by: Guillaume Tucker <e7e20b7c30f19d4ca6b81319ef81bf200369d137@collabora.com><commit_after> | __version__ = "2021.3.0"
__versionfull__ = __version__
| __version__ = "2020.11.2"
__versionfull__ = __version__
Bump app version to 2021.3.0
Signed-off-by: Guillaume Tucker <e7e20b7c30f19d4ca6b81319ef81bf200369d137@collabora.com>__version__ = "2021.3.0"
__versionfull__ = __version__
| <commit_before>__version__ = "2020.11.2"
__versionfull__ = __version__
<commit_msg>Bump app version to 2021.3.0
Signed-off-by: Guillaume Tucker <e7e20b7c30f19d4ca6b81319ef81bf200369d137@collabora.com><commit_after>__version__ = "2021.3.0"
__versionfull__ = __version__
|
3ca03031599e2a1673c6349710489938f60f6a4d | rwt/tests/test_launch.py | rwt/tests/test_launch.py | from rwt import launch
def test_with_path(tmpdir, capfd):
params = ['-c', 'import sys; print(sys.path)' ]
launch.with_path(str(tmpdir), params)
out, err = capfd.readouterr()
assert str(tmpdir) in out
| import sys
import subprocess
import textwrap
from rwt import launch
def test_with_path(tmpdir, capfd):
params = ['-c', 'import sys; print(sys.path)']
launch.with_path(str(tmpdir), params)
out, err = capfd.readouterr()
assert str(tmpdir) in out
def test_with_path_overlay(tmpdir, capfd):
params = ['-c', 'import... | Add test for with_path_overlay also. | Add test for with_path_overlay also.
| Python | mit | jaraco/rwt | from rwt import launch
def test_with_path(tmpdir, capfd):
params = ['-c', 'import sys; print(sys.path)' ]
launch.with_path(str(tmpdir), params)
out, err = capfd.readouterr()
assert str(tmpdir) in out
Add test for with_path_overlay also. | import sys
import subprocess
import textwrap
from rwt import launch
def test_with_path(tmpdir, capfd):
params = ['-c', 'import sys; print(sys.path)']
launch.with_path(str(tmpdir), params)
out, err = capfd.readouterr()
assert str(tmpdir) in out
def test_with_path_overlay(tmpdir, capfd):
params = ['-c', 'import... | <commit_before>from rwt import launch
def test_with_path(tmpdir, capfd):
params = ['-c', 'import sys; print(sys.path)' ]
launch.with_path(str(tmpdir), params)
out, err = capfd.readouterr()
assert str(tmpdir) in out
<commit_msg>Add test for with_path_overlay also.<commit_after> | import sys
import subprocess
import textwrap
from rwt import launch
def test_with_path(tmpdir, capfd):
params = ['-c', 'import sys; print(sys.path)']
launch.with_path(str(tmpdir), params)
out, err = capfd.readouterr()
assert str(tmpdir) in out
def test_with_path_overlay(tmpdir, capfd):
params = ['-c', 'import... | from rwt import launch
def test_with_path(tmpdir, capfd):
params = ['-c', 'import sys; print(sys.path)' ]
launch.with_path(str(tmpdir), params)
out, err = capfd.readouterr()
assert str(tmpdir) in out
Add test for with_path_overlay also.import sys
import subprocess
import textwrap
from rwt import launch
def tes... | <commit_before>from rwt import launch
def test_with_path(tmpdir, capfd):
params = ['-c', 'import sys; print(sys.path)' ]
launch.with_path(str(tmpdir), params)
out, err = capfd.readouterr()
assert str(tmpdir) in out
<commit_msg>Add test for with_path_overlay also.<commit_after>import sys
import subprocess
import t... |
954dd1a5ebafbe32c092265f5f508158f8b2742d | straight/plugin/loader.py | straight/plugin/loader.py | """Facility to load plugins."""
import sys
import os
from importlib import import_module
class StraightPluginLoader(object):
"""Performs the work of locating and loading straight plugins.
This looks for plugins in every location in the import path.
"""
def _findPluginFilePaths(self, namespace)... | """Facility to load plugins."""
import sys
import os
from importlib import import_module
class StraightPluginLoader(object):
"""Performs the work of locating and loading straight plugins.
This looks for plugins in every location in the import path.
"""
def _findPluginFilePaths(self, namespace)... | Add docstring to load() method | Add docstring to load() method
| Python | mit | ironfroggy/straight.plugin,pombredanne/straight.plugin | """Facility to load plugins."""
import sys
import os
from importlib import import_module
class StraightPluginLoader(object):
"""Performs the work of locating and loading straight plugins.
This looks for plugins in every location in the import path.
"""
def _findPluginFilePaths(self, namespace)... | """Facility to load plugins."""
import sys
import os
from importlib import import_module
class StraightPluginLoader(object):
"""Performs the work of locating and loading straight plugins.
This looks for plugins in every location in the import path.
"""
def _findPluginFilePaths(self, namespace)... | <commit_before>"""Facility to load plugins."""
import sys
import os
from importlib import import_module
class StraightPluginLoader(object):
"""Performs the work of locating and loading straight plugins.
This looks for plugins in every location in the import path.
"""
def _findPluginFilePaths(s... | """Facility to load plugins."""
import sys
import os
from importlib import import_module
class StraightPluginLoader(object):
"""Performs the work of locating and loading straight plugins.
This looks for plugins in every location in the import path.
"""
def _findPluginFilePaths(self, namespace)... | """Facility to load plugins."""
import sys
import os
from importlib import import_module
class StraightPluginLoader(object):
"""Performs the work of locating and loading straight plugins.
This looks for plugins in every location in the import path.
"""
def _findPluginFilePaths(self, namespace)... | <commit_before>"""Facility to load plugins."""
import sys
import os
from importlib import import_module
class StraightPluginLoader(object):
"""Performs the work of locating and loading straight plugins.
This looks for plugins in every location in the import path.
"""
def _findPluginFilePaths(s... |
be52bd5e578c54a816f8b786da5d8cf22fcc3ca8 | paver_ext/python_requirements.py | paver_ext/python_requirements.py | # ============================================================================
# PAVER EXTENSION/UTILITY: Read PIP requirements files
# ============================================================================
# REQUIRES: paver >= 1.0
# DESCRIPTION:
# Provides some utility functions for paver.
#
# SEE ALSO:
# * h... | # ============================================================================
# PAVER EXTENSION/UTILITY: Read PIP requirements files
# ============================================================================
# REQUIRES: paver >= 1.0
# REQUIRES: pkg_resources, fulfilled when setuptools or distribute is installed
# ... | Use pkg_resources.parse_requirements() to simplify parsing. | Use pkg_resources.parse_requirements() to simplify parsing.
| Python | bsd-2-clause | jenisys/behave,jenisys/behave | # ============================================================================
# PAVER EXTENSION/UTILITY: Read PIP requirements files
# ============================================================================
# REQUIRES: paver >= 1.0
# DESCRIPTION:
# Provides some utility functions for paver.
#
# SEE ALSO:
# * h... | # ============================================================================
# PAVER EXTENSION/UTILITY: Read PIP requirements files
# ============================================================================
# REQUIRES: paver >= 1.0
# REQUIRES: pkg_resources, fulfilled when setuptools or distribute is installed
# ... | <commit_before># ============================================================================
# PAVER EXTENSION/UTILITY: Read PIP requirements files
# ============================================================================
# REQUIRES: paver >= 1.0
# DESCRIPTION:
# Provides some utility functions for paver.
#
# S... | # ============================================================================
# PAVER EXTENSION/UTILITY: Read PIP requirements files
# ============================================================================
# REQUIRES: paver >= 1.0
# REQUIRES: pkg_resources, fulfilled when setuptools or distribute is installed
# ... | # ============================================================================
# PAVER EXTENSION/UTILITY: Read PIP requirements files
# ============================================================================
# REQUIRES: paver >= 1.0
# DESCRIPTION:
# Provides some utility functions for paver.
#
# SEE ALSO:
# * h... | <commit_before># ============================================================================
# PAVER EXTENSION/UTILITY: Read PIP requirements files
# ============================================================================
# REQUIRES: paver >= 1.0
# DESCRIPTION:
# Provides some utility functions for paver.
#
# S... |
1a0eaa4aaab42fbdc26a4e5ab460d0042fa19509 | frappe/website/doctype/blog_post/test_blog_post.py | frappe/website/doctype/blog_post/test_blog_post.py | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.tests.test_website import set_request
from frappe.website.render import render
class TestBlogPost(unittest.TestCase):
def test_generato... | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.tests.test_website import set_request
from frappe.website.render import render
class TestBlogPost(unittest.TestCase):
def test_generato... | Convert rendered html to unicode before substring matching | Convert rendered html to unicode before substring matching
| Python | mit | tmimori/frappe,paurosello/frappe,ESS-LLP/frappe,RicardoJohann/frappe,bohlian/frappe,bohlian/frappe,saurabh6790/frappe,mbauskar/frappe,adityahase/frappe,mbauskar/frappe,tundebabzy/frappe,yashodhank/frappe,bohlian/frappe,maxtorete/frappe,StrellaGroup/frappe,adityahase/frappe,frappe/frappe,ESS-LLP/frappe,maxtorete/frappe,... | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.tests.test_website import set_request
from frappe.website.render import render
class TestBlogPost(unittest.TestCase):
def test_generato... | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.tests.test_website import set_request
from frappe.website.render import render
class TestBlogPost(unittest.TestCase):
def test_generato... | <commit_before># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.tests.test_website import set_request
from frappe.website.render import render
class TestBlogPost(unittest.TestCase):
de... | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.tests.test_website import set_request
from frappe.website.render import render
class TestBlogPost(unittest.TestCase):
def test_generato... | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.tests.test_website import set_request
from frappe.website.render import render
class TestBlogPost(unittest.TestCase):
def test_generato... | <commit_before># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.tests.test_website import set_request
from frappe.website.render import render
class TestBlogPost(unittest.TestCase):
de... |
c2ab12f64ba1660c86b205fb15cf222261ac6f6d | gaphor/SysML/requirements/tests/test_connectors.py | gaphor/SysML/requirements/tests/test_connectors.py | import pytest
from gaphor.diagram.tests.fixtures import allow, connect, disconnect
from gaphor.SysML import sysml
from gaphor.SysML.requirements.relationships import (
DeriveReqtItem,
RefineItem,
SatisfyItem,
TraceItem,
VerifyItem,
)
from gaphor.SysML.requirements.requirement import RequirementItem... | import pytest
from gaphor.diagram.tests.fixtures import allow, connect, disconnect
from gaphor.SysML import sysml
from gaphor.SysML.requirements.relationships import (
DeriveReqtItem,
RefineItem,
SatisfyItem,
TraceItem,
VerifyItem,
)
from gaphor.SysML.requirements.requirement import RequirementItem... | Fix flake8 error for missing whitespace | Fix flake8 error for missing whitespace
Signed-off-by: Dan Yeaw <2591e5f46f28d303f9dc027d475a5c60d8dea17a@yeaw.me>
| Python | lgpl-2.1 | amolenaar/gaphor,amolenaar/gaphor | import pytest
from gaphor.diagram.tests.fixtures import allow, connect, disconnect
from gaphor.SysML import sysml
from gaphor.SysML.requirements.relationships import (
DeriveReqtItem,
RefineItem,
SatisfyItem,
TraceItem,
VerifyItem,
)
from gaphor.SysML.requirements.requirement import RequirementItem... | import pytest
from gaphor.diagram.tests.fixtures import allow, connect, disconnect
from gaphor.SysML import sysml
from gaphor.SysML.requirements.relationships import (
DeriveReqtItem,
RefineItem,
SatisfyItem,
TraceItem,
VerifyItem,
)
from gaphor.SysML.requirements.requirement import RequirementItem... | <commit_before>import pytest
from gaphor.diagram.tests.fixtures import allow, connect, disconnect
from gaphor.SysML import sysml
from gaphor.SysML.requirements.relationships import (
DeriveReqtItem,
RefineItem,
SatisfyItem,
TraceItem,
VerifyItem,
)
from gaphor.SysML.requirements.requirement import ... | import pytest
from gaphor.diagram.tests.fixtures import allow, connect, disconnect
from gaphor.SysML import sysml
from gaphor.SysML.requirements.relationships import (
DeriveReqtItem,
RefineItem,
SatisfyItem,
TraceItem,
VerifyItem,
)
from gaphor.SysML.requirements.requirement import RequirementItem... | import pytest
from gaphor.diagram.tests.fixtures import allow, connect, disconnect
from gaphor.SysML import sysml
from gaphor.SysML.requirements.relationships import (
DeriveReqtItem,
RefineItem,
SatisfyItem,
TraceItem,
VerifyItem,
)
from gaphor.SysML.requirements.requirement import RequirementItem... | <commit_before>import pytest
from gaphor.diagram.tests.fixtures import allow, connect, disconnect
from gaphor.SysML import sysml
from gaphor.SysML.requirements.relationships import (
DeriveReqtItem,
RefineItem,
SatisfyItem,
TraceItem,
VerifyItem,
)
from gaphor.SysML.requirements.requirement import ... |
dcf11d2d26519cdea10813530d2bde85f8fe8180 | Python/Tests/TestData/DjangoProject/Oar/views.py | Python/Tests/TestData/DjangoProject/Oar/views.py | from django.template import Context, loader
# Create your views here.
from django.http import HttpResponse
from Oar.models import Poll
from django.http import HttpResponse
def main(request):
return HttpResponse('<html><body>Hello world!</body></html>')
def index(request):
latest_poll_list = Poll.objects.all(... | from django.template import Context, loader
# Create your views here.
from django.http import HttpResponse
from Oar.models import Poll
from django.http import HttpResponse
def main(request):
return HttpResponse('<html><body>Hello world!</body></html>')
def index(request):
latest_poll_list = Poll.objects.all(... | Use a dict instead of Context instance in DjangoDebuggerTests test project, to avoid a TypeError in latest version of Django. | Use a dict instead of Context instance in DjangoDebuggerTests test project, to avoid a TypeError in latest version of Django.
| Python | apache-2.0 | int19h/PTVS,huguesv/PTVS,zooba/PTVS,Microsoft/PTVS,Microsoft/PTVS,zooba/PTVS,Microsoft/PTVS,zooba/PTVS,zooba/PTVS,int19h/PTVS,int19h/PTVS,Microsoft/PTVS,Microsoft/PTVS,Microsoft/PTVS,int19h/PTVS,zooba/PTVS,zooba/PTVS,huguesv/PTVS,huguesv/PTVS,int19h/PTVS,huguesv/PTVS,int19h/PTVS,huguesv/PTVS,huguesv/PTVS | from django.template import Context, loader
# Create your views here.
from django.http import HttpResponse
from Oar.models import Poll
from django.http import HttpResponse
def main(request):
return HttpResponse('<html><body>Hello world!</body></html>')
def index(request):
latest_poll_list = Poll.objects.all(... | from django.template import Context, loader
# Create your views here.
from django.http import HttpResponse
from Oar.models import Poll
from django.http import HttpResponse
def main(request):
return HttpResponse('<html><body>Hello world!</body></html>')
def index(request):
latest_poll_list = Poll.objects.all(... | <commit_before>from django.template import Context, loader
# Create your views here.
from django.http import HttpResponse
from Oar.models import Poll
from django.http import HttpResponse
def main(request):
return HttpResponse('<html><body>Hello world!</body></html>')
def index(request):
latest_poll_list = Po... | from django.template import Context, loader
# Create your views here.
from django.http import HttpResponse
from Oar.models import Poll
from django.http import HttpResponse
def main(request):
return HttpResponse('<html><body>Hello world!</body></html>')
def index(request):
latest_poll_list = Poll.objects.all(... | from django.template import Context, loader
# Create your views here.
from django.http import HttpResponse
from Oar.models import Poll
from django.http import HttpResponse
def main(request):
return HttpResponse('<html><body>Hello world!</body></html>')
def index(request):
latest_poll_list = Poll.objects.all(... | <commit_before>from django.template import Context, loader
# Create your views here.
from django.http import HttpResponse
from Oar.models import Poll
from django.http import HttpResponse
def main(request):
return HttpResponse('<html><body>Hello world!</body></html>')
def index(request):
latest_poll_list = Po... |
bb3dfe39075876107fa992a66c16a5566a442d23 | polymorphic_auth/tests.py | polymorphic_auth/tests.py | from django.test import TestCase
# Create your tests here.
| import re
from django.contrib.admin.sites import AdminSite
from django_webtest import WebTest
from django.core.urlresolvers import reverse
from .usertypes.email.models import EmailUser
class TestUserAdminBaseFieldsets(WebTest):
"""
Tests a fix applied to ensure `base_fieldsets` are not
lost in `UserChildA... | Add regression test for base_fieldsets fix. | Add regression test for base_fieldsets fix.
| Python | mit | ixc/django-polymorphic-auth | from django.test import TestCase
# Create your tests here.
Add regression test for base_fieldsets fix. | import re
from django.contrib.admin.sites import AdminSite
from django_webtest import WebTest
from django.core.urlresolvers import reverse
from .usertypes.email.models import EmailUser
class TestUserAdminBaseFieldsets(WebTest):
"""
Tests a fix applied to ensure `base_fieldsets` are not
lost in `UserChildA... | <commit_before>from django.test import TestCase
# Create your tests here.
<commit_msg>Add regression test for base_fieldsets fix.<commit_after> | import re
from django.contrib.admin.sites import AdminSite
from django_webtest import WebTest
from django.core.urlresolvers import reverse
from .usertypes.email.models import EmailUser
class TestUserAdminBaseFieldsets(WebTest):
"""
Tests a fix applied to ensure `base_fieldsets` are not
lost in `UserChildA... | from django.test import TestCase
# Create your tests here.
Add regression test for base_fieldsets fix.import re
from django.contrib.admin.sites import AdminSite
from django_webtest import WebTest
from django.core.urlresolvers import reverse
from .usertypes.email.models import EmailUser
class TestUserAdminBaseFieldse... | <commit_before>from django.test import TestCase
# Create your tests here.
<commit_msg>Add regression test for base_fieldsets fix.<commit_after>import re
from django.contrib.admin.sites import AdminSite
from django_webtest import WebTest
from django.core.urlresolvers import reverse
from .usertypes.email.models import E... |
e46b974de8dee93b9bee08c752b5bf3fc5194ec9 | msmbuilder/project_templates/1-gather-metadata-plot.py | msmbuilder/project_templates/1-gather-metadata-plot.py | """Plot metadata info
{{header}}
"""
from subprocess import run
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
from msmbuilder.io import load_meta, render_meta
sns.set_style('ticks')
colors = sns.color_palette()
## Load
meta = load_meta()
## Plot logic
def plot_lengths(ax):
len... | """Plot metadata info
{{header}}
"""
from subprocess import run
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
from msmbuilder.io import load_meta, render_meta
sns.set_style('ticks')
colors = sns.color_palette()
## Load
meta = load_meta()
## Plot logic
def plot_lengths(ax):
len... | Fix bug in gather-metadata-plot script | Fix bug in gather-metadata-plot script
| Python | lgpl-2.1 | brookehus/msmbuilder,brookehus/msmbuilder,peastman/msmbuilder,msultan/msmbuilder,msultan/msmbuilder,Eigenstate/msmbuilder,brookehus/msmbuilder,mpharrigan/mixtape,cxhernandez/msmbuilder,cxhernandez/msmbuilder,peastman/msmbuilder,cxhernandez/msmbuilder,msmbuilder/msmbuilder,peastman/msmbuilder,Eigenstate/msmbuilder,Eigen... | """Plot metadata info
{{header}}
"""
from subprocess import run
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
from msmbuilder.io import load_meta, render_meta
sns.set_style('ticks')
colors = sns.color_palette()
## Load
meta = load_meta()
## Plot logic
def plot_lengths(ax):
len... | """Plot metadata info
{{header}}
"""
from subprocess import run
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
from msmbuilder.io import load_meta, render_meta
sns.set_style('ticks')
colors = sns.color_palette()
## Load
meta = load_meta()
## Plot logic
def plot_lengths(ax):
len... | <commit_before>"""Plot metadata info
{{header}}
"""
from subprocess import run
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
from msmbuilder.io import load_meta, render_meta
sns.set_style('ticks')
colors = sns.color_palette()
## Load
meta = load_meta()
## Plot logic
def plot_lengt... | """Plot metadata info
{{header}}
"""
from subprocess import run
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
from msmbuilder.io import load_meta, render_meta
sns.set_style('ticks')
colors = sns.color_palette()
## Load
meta = load_meta()
## Plot logic
def plot_lengths(ax):
len... | """Plot metadata info
{{header}}
"""
from subprocess import run
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
from msmbuilder.io import load_meta, render_meta
sns.set_style('ticks')
colors = sns.color_palette()
## Load
meta = load_meta()
## Plot logic
def plot_lengths(ax):
len... | <commit_before>"""Plot metadata info
{{header}}
"""
from subprocess import run
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
from msmbuilder.io import load_meta, render_meta
sns.set_style('ticks')
colors = sns.color_palette()
## Load
meta = load_meta()
## Plot logic
def plot_lengt... |
de7e29622d6b8f18c25e483bc8bdac629e07964c | trex/urls.py | trex/urls.py | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>
#
# See LICENSE comming with the source of 'trex' for details.
#
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from trex.views import project
urlpatterns = patterns(
'',
url(r"^$",
Te... | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>
#
# See LICENSE comming with the source of 'trex' for details.
#
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from trex.views import project
urlpatterns = patterns(
'',
url(r"^$",
Te... | Update name of url mapping for ProjectEntriesListAPIView | Update name of url mapping for ProjectEntriesListAPIView
| Python | mit | bjoernricks/trex,bjoernricks/trex | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>
#
# See LICENSE comming with the source of 'trex' for details.
#
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from trex.views import project
urlpatterns = patterns(
'',
url(r"^$",
Te... | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>
#
# See LICENSE comming with the source of 'trex' for details.
#
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from trex.views import project
urlpatterns = patterns(
'',
url(r"^$",
Te... | <commit_before># -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>
#
# See LICENSE comming with the source of 'trex' for details.
#
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from trex.views import project
urlpatterns = patterns(
'',
url(r"... | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>
#
# See LICENSE comming with the source of 'trex' for details.
#
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from trex.views import project
urlpatterns = patterns(
'',
url(r"^$",
Te... | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>
#
# See LICENSE comming with the source of 'trex' for details.
#
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from trex.views import project
urlpatterns = patterns(
'',
url(r"^$",
Te... | <commit_before># -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>
#
# See LICENSE comming with the source of 'trex' for details.
#
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from trex.views import project
urlpatterns = patterns(
'',
url(r"... |
7d81de637288ca694c139b3a7830f6e8ca00aa01 | gargoyle/__init__.py | gargoyle/__init__.py | """
gargoyle
~~~~~~~~
:copyright: (c) 2010 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from gargoyle.manager import gargoyle
try:
VERSION = __import__('pkg_resources').get_distribution('gargoyle-yplan').version
except Exception, e:
VERSION = 'unknown'
__all__ = ('gargoyle', 'auto... | """
gargoyle
~~~~~~~~
:copyright: (c) 2010 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from gargoyle.manager import gargoyle
try:
VERSION = __import__('pkg_resources').get_distribution('gargoyle-yplan').version
except Exception, e:
VERSION = 'unknown'
__all__ = ('gargoyle', 'auto... | Switch to using python standard library importlib | Switch to using python standard library importlib
Available in Python 2.7+, which is all that Gargoyle now supports. The Django version is removed in 1.9.
| Python | apache-2.0 | nkovshov/gargoyle,YPlan/gargoyle,nkovshov/gargoyle,YPlan/gargoyle,roverdotcom/gargoyle,nkovshov/gargoyle,YPlan/gargoyle,roverdotcom/gargoyle,roverdotcom/gargoyle | """
gargoyle
~~~~~~~~
:copyright: (c) 2010 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from gargoyle.manager import gargoyle
try:
VERSION = __import__('pkg_resources').get_distribution('gargoyle-yplan').version
except Exception, e:
VERSION = 'unknown'
__all__ = ('gargoyle', 'auto... | """
gargoyle
~~~~~~~~
:copyright: (c) 2010 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from gargoyle.manager import gargoyle
try:
VERSION = __import__('pkg_resources').get_distribution('gargoyle-yplan').version
except Exception, e:
VERSION = 'unknown'
__all__ = ('gargoyle', 'auto... | <commit_before>"""
gargoyle
~~~~~~~~
:copyright: (c) 2010 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from gargoyle.manager import gargoyle
try:
VERSION = __import__('pkg_resources').get_distribution('gargoyle-yplan').version
except Exception, e:
VERSION = 'unknown'
__all__ = ('g... | """
gargoyle
~~~~~~~~
:copyright: (c) 2010 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from gargoyle.manager import gargoyle
try:
VERSION = __import__('pkg_resources').get_distribution('gargoyle-yplan').version
except Exception, e:
VERSION = 'unknown'
__all__ = ('gargoyle', 'auto... | """
gargoyle
~~~~~~~~
:copyright: (c) 2010 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from gargoyle.manager import gargoyle
try:
VERSION = __import__('pkg_resources').get_distribution('gargoyle-yplan').version
except Exception, e:
VERSION = 'unknown'
__all__ = ('gargoyle', 'auto... | <commit_before>"""
gargoyle
~~~~~~~~
:copyright: (c) 2010 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from gargoyle.manager import gargoyle
try:
VERSION = __import__('pkg_resources').get_distribution('gargoyle-yplan').version
except Exception, e:
VERSION = 'unknown'
__all__ = ('g... |
9baae7a5c633399fe25ca6961e992b50adcd72b4 | jacquard/service/base.py | jacquard/service/base.py | import abc
import copy
import werkzeug.routing
class Endpoint(metaclass=abc.ABCMeta):
@abc.abstractproperty
def url(self):
pass
@abc.abstractclassmethod
def handle(self, **kwargs):
pass
def __call__(self, **kwargs):
return self.handle(**kwargs)
@property
def defa... | import abc
import copy
import werkzeug.routing
class Endpoint(metaclass=abc.ABCMeta):
@abc.abstractproperty
def url(self):
pass
@abc.abstractclassmethod
def handle(self, **kwargs):
pass
def __call__(self, **kwargs):
return self.handle(**kwargs)
@property
def defa... | Use a level of indirection for helpful error messages | Use a level of indirection for helpful error messages
| Python | mit | prophile/jacquard,prophile/jacquard | import abc
import copy
import werkzeug.routing
class Endpoint(metaclass=abc.ABCMeta):
@abc.abstractproperty
def url(self):
pass
@abc.abstractclassmethod
def handle(self, **kwargs):
pass
def __call__(self, **kwargs):
return self.handle(**kwargs)
@property
def defa... | import abc
import copy
import werkzeug.routing
class Endpoint(metaclass=abc.ABCMeta):
@abc.abstractproperty
def url(self):
pass
@abc.abstractclassmethod
def handle(self, **kwargs):
pass
def __call__(self, **kwargs):
return self.handle(**kwargs)
@property
def defa... | <commit_before>import abc
import copy
import werkzeug.routing
class Endpoint(metaclass=abc.ABCMeta):
@abc.abstractproperty
def url(self):
pass
@abc.abstractclassmethod
def handle(self, **kwargs):
pass
def __call__(self, **kwargs):
return self.handle(**kwargs)
@proper... | import abc
import copy
import werkzeug.routing
class Endpoint(metaclass=abc.ABCMeta):
@abc.abstractproperty
def url(self):
pass
@abc.abstractclassmethod
def handle(self, **kwargs):
pass
def __call__(self, **kwargs):
return self.handle(**kwargs)
@property
def defa... | import abc
import copy
import werkzeug.routing
class Endpoint(metaclass=abc.ABCMeta):
@abc.abstractproperty
def url(self):
pass
@abc.abstractclassmethod
def handle(self, **kwargs):
pass
def __call__(self, **kwargs):
return self.handle(**kwargs)
@property
def defa... | <commit_before>import abc
import copy
import werkzeug.routing
class Endpoint(metaclass=abc.ABCMeta):
@abc.abstractproperty
def url(self):
pass
@abc.abstractclassmethod
def handle(self, **kwargs):
pass
def __call__(self, **kwargs):
return self.handle(**kwargs)
@proper... |
bd56d5fb8e7c312e65e0fb9ea686b6fe2500e724 | registration/__init__.py | registration/__init__.py | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
def get_backend():
"""
Return an instance of the registration backend for use on this
site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise
``django.cor... | Add utility function for retrieving the active registration backend. | Add utility function for retrieving the active registration backend.
| Python | bsd-3-clause | remarkablerocket/django-mailinglist-registration,remarkablerocket/django-mailinglist-registration | Add utility function for retrieving the active registration backend. | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
def get_backend():
"""
Return an instance of the registration backend for use on this
site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise
``django.cor... | <commit_before><commit_msg>Add utility function for retrieving the active registration backend.<commit_after> | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
def get_backend():
"""
Return an instance of the registration backend for use on this
site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise
``django.cor... | Add utility function for retrieving the active registration backend.from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
def get_backend():
"""
Return an instance of the registration backend for use on this
site, as determ... | <commit_before><commit_msg>Add utility function for retrieving the active registration backend.<commit_after>from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
def get_backend():
"""
Return an instance of the registration ba... | |
9c40c070b6c55d6eda2cabf4c1ebe062cebcfe8f | flask_controllers/GameModes.py | flask_controllers/GameModes.py | from flask import request
from flask.views import MethodView
from flask_helpers.build_response import build_response
from flask_helpers.ErrorHandler import ErrorHandler
from python_cowbull_game.GameObject import GameObject
class GameModes(MethodView):
def get(self):
textonly = request.args.get('textmode',... | from flask import request
from flask.views import MethodView
from flask_helpers.build_response import build_response
from flask_helpers.ErrorHandler import ErrorHandler
from Game.GameObject import GameObject
class GameModes(MethodView):
def get(self):
textonly = request.args.get('textmode', None)
... | Update to use inheritance for GameObject | Update to use inheritance for GameObject
| Python | apache-2.0 | dsandersAzure/python_cowbull_server,dsandersAzure/python_cowbull_server | from flask import request
from flask.views import MethodView
from flask_helpers.build_response import build_response
from flask_helpers.ErrorHandler import ErrorHandler
from python_cowbull_game.GameObject import GameObject
class GameModes(MethodView):
def get(self):
textonly = request.args.get('textmode',... | from flask import request
from flask.views import MethodView
from flask_helpers.build_response import build_response
from flask_helpers.ErrorHandler import ErrorHandler
from Game.GameObject import GameObject
class GameModes(MethodView):
def get(self):
textonly = request.args.get('textmode', None)
... | <commit_before>from flask import request
from flask.views import MethodView
from flask_helpers.build_response import build_response
from flask_helpers.ErrorHandler import ErrorHandler
from python_cowbull_game.GameObject import GameObject
class GameModes(MethodView):
def get(self):
textonly = request.args.... | from flask import request
from flask.views import MethodView
from flask_helpers.build_response import build_response
from flask_helpers.ErrorHandler import ErrorHandler
from Game.GameObject import GameObject
class GameModes(MethodView):
def get(self):
textonly = request.args.get('textmode', None)
... | from flask import request
from flask.views import MethodView
from flask_helpers.build_response import build_response
from flask_helpers.ErrorHandler import ErrorHandler
from python_cowbull_game.GameObject import GameObject
class GameModes(MethodView):
def get(self):
textonly = request.args.get('textmode',... | <commit_before>from flask import request
from flask.views import MethodView
from flask_helpers.build_response import build_response
from flask_helpers.ErrorHandler import ErrorHandler
from python_cowbull_game.GameObject import GameObject
class GameModes(MethodView):
def get(self):
textonly = request.args.... |
a1d9e1ed4ac8b7542b6430f84b2ed9197d45d577 | fireplace/cards/wog/priest.py | fireplace/cards/wog/priest.py | from ..utils import *
##
# Minions
| from ..utils import *
##
# Minions
class OG_234:
"Darkshire Alchemist"
play = Heal(TARGET, 5)
class OG_335:
"Shifting Shade"
deathrattle = Give(CONTROLLER, Copy(RANDOM(ENEMY_DECK)))
##
# Spells
class OG_094:
"Power Word: Tentacles"
play = Buff(TARGET, "OG_094e")
OG_094e = buff(+2, +6)
| Implement Darkshire Alchemist, Shifting Shade, Power Word: Tentacles | Implement Darkshire Alchemist, Shifting Shade, Power Word: Tentacles
| Python | agpl-3.0 | jleclanche/fireplace,NightKev/fireplace,beheh/fireplace | from ..utils import *
##
# Minions
Implement Darkshire Alchemist, Shifting Shade, Power Word: Tentacles | from ..utils import *
##
# Minions
class OG_234:
"Darkshire Alchemist"
play = Heal(TARGET, 5)
class OG_335:
"Shifting Shade"
deathrattle = Give(CONTROLLER, Copy(RANDOM(ENEMY_DECK)))
##
# Spells
class OG_094:
"Power Word: Tentacles"
play = Buff(TARGET, "OG_094e")
OG_094e = buff(+2, +6)
| <commit_before>from ..utils import *
##
# Minions
<commit_msg>Implement Darkshire Alchemist, Shifting Shade, Power Word: Tentacles<commit_after> | from ..utils import *
##
# Minions
class OG_234:
"Darkshire Alchemist"
play = Heal(TARGET, 5)
class OG_335:
"Shifting Shade"
deathrattle = Give(CONTROLLER, Copy(RANDOM(ENEMY_DECK)))
##
# Spells
class OG_094:
"Power Word: Tentacles"
play = Buff(TARGET, "OG_094e")
OG_094e = buff(+2, +6)
| from ..utils import *
##
# Minions
Implement Darkshire Alchemist, Shifting Shade, Power Word: Tentaclesfrom ..utils import *
##
# Minions
class OG_234:
"Darkshire Alchemist"
play = Heal(TARGET, 5)
class OG_335:
"Shifting Shade"
deathrattle = Give(CONTROLLER, Copy(RANDOM(ENEMY_DECK)))
##
# Spells
class O... | <commit_before>from ..utils import *
##
# Minions
<commit_msg>Implement Darkshire Alchemist, Shifting Shade, Power Word: Tentacles<commit_after>from ..utils import *
##
# Minions
class OG_234:
"Darkshire Alchemist"
play = Heal(TARGET, 5)
class OG_335:
"Shifting Shade"
deathrattle = Give(CONTROLLER, Copy(RA... |
e3d00e6c3e62e5cfa457529fc2dddfb814382db6 | packages/dcos-integration-test/extra/test_metronome.py | packages/dcos-integration-test/extra/test_metronome.py | def test_metronome(dcos_api_session):
job = {
'description': 'Test Metronome API regressions',
'id': 'test.metronome',
'run': {
'cmd': 'ls',
'docker': {'image': 'busybox:latest'},
'cpus': 1,
'mem': 512,
'user': 'nobody',
... | def test_metronome(dcos_api_session):
job = {
'description': 'Test Metronome API regressions',
'id': 'test.metronome',
'run': {
'cmd': 'ls',
'docker': {'image': 'busybox:latest'},
'cpus': 1,
'mem': 512,
'disk' 0,
'user':... | Fix the Metronome integration test | Fix the Metronome integration test
| Python | apache-2.0 | dcos/dcos,amitaekbote/dcos,branden/dcos,mesosphere-mergebot/mergebot-test-dcos,surdy/dcos,mesosphere-mergebot/mergebot-test-dcos,surdy/dcos,kensipe/dcos,mellenburg/dcos,mellenburg/dcos,GoelDeepak/dcos,dcos/dcos,mellenburg/dcos,mesosphere-mergebot/dcos,kensipe/dcos,amitaekbote/dcos,kensipe/dcos,GoelDeepak/dcos,mesospher... | def test_metronome(dcos_api_session):
job = {
'description': 'Test Metronome API regressions',
'id': 'test.metronome',
'run': {
'cmd': 'ls',
'docker': {'image': 'busybox:latest'},
'cpus': 1,
'mem': 512,
'user': 'nobody',
... | def test_metronome(dcos_api_session):
job = {
'description': 'Test Metronome API regressions',
'id': 'test.metronome',
'run': {
'cmd': 'ls',
'docker': {'image': 'busybox:latest'},
'cpus': 1,
'mem': 512,
'disk' 0,
'user':... | <commit_before>def test_metronome(dcos_api_session):
job = {
'description': 'Test Metronome API regressions',
'id': 'test.metronome',
'run': {
'cmd': 'ls',
'docker': {'image': 'busybox:latest'},
'cpus': 1,
'mem': 512,
'user': 'nobod... | def test_metronome(dcos_api_session):
job = {
'description': 'Test Metronome API regressions',
'id': 'test.metronome',
'run': {
'cmd': 'ls',
'docker': {'image': 'busybox:latest'},
'cpus': 1,
'mem': 512,
'disk' 0,
'user':... | def test_metronome(dcos_api_session):
job = {
'description': 'Test Metronome API regressions',
'id': 'test.metronome',
'run': {
'cmd': 'ls',
'docker': {'image': 'busybox:latest'},
'cpus': 1,
'mem': 512,
'user': 'nobody',
... | <commit_before>def test_metronome(dcos_api_session):
job = {
'description': 'Test Metronome API regressions',
'id': 'test.metronome',
'run': {
'cmd': 'ls',
'docker': {'image': 'busybox:latest'},
'cpus': 1,
'mem': 512,
'user': 'nobod... |
f57c9643a32cca012fdccac40899c6de38e35af9 | ass/ets/__init__.py | ass/ets/__init__.py |
from bundles import Environment, Assets, Bundle, Manifest
import filters as f
from options import Option, Options, Undefined, dict_getter
|
from bundles import Environment, Assets, Bundle, Manifest
import filters as f
from options import Option, Options, Undefined, dict_getter
from pipeable import worker
| Make @worker available for import on ass.ets. | Make @worker available for import on ass.ets.
| Python | bsd-2-clause | kaste/ass.ets,kaste/ass.ets |
from bundles import Environment, Assets, Bundle, Manifest
import filters as f
from options import Option, Options, Undefined, dict_getter
Make @worker available for import on ass.ets. |
from bundles import Environment, Assets, Bundle, Manifest
import filters as f
from options import Option, Options, Undefined, dict_getter
from pipeable import worker
| <commit_before>
from bundles import Environment, Assets, Bundle, Manifest
import filters as f
from options import Option, Options, Undefined, dict_getter
<commit_msg>Make @worker available for import on ass.ets.<commit_after> |
from bundles import Environment, Assets, Bundle, Manifest
import filters as f
from options import Option, Options, Undefined, dict_getter
from pipeable import worker
|
from bundles import Environment, Assets, Bundle, Manifest
import filters as f
from options import Option, Options, Undefined, dict_getter
Make @worker available for import on ass.ets.
from bundles import Environment, Assets, Bundle, Manifest
import filters as f
from options import Option, Options, Undefined, dict_get... | <commit_before>
from bundles import Environment, Assets, Bundle, Manifest
import filters as f
from options import Option, Options, Undefined, dict_getter
<commit_msg>Make @worker available for import on ass.ets.<commit_after>
from bundles import Environment, Assets, Bundle, Manifest
import filters as f
from options im... |
c1dff6850a0d39c39b0c337f4f5473efb77fc075 | tests/utils/test_forms.py | tests/utils/test_forms.py | import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class TestRedirectForm(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.redirect_form = RedirectForm()
self.app_ctx.push()
... | import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class FormTestCase(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_all()
def tearDown(self):
... | Move setUp and tearDown methods into general FormTestCase class | Move setUp and tearDown methods into general FormTestCase class
| Python | mit | Encrylize/flask-blogger,Encrylize/flask-blogger,Encrylize/flask-blogger | import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class TestRedirectForm(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.redirect_form = RedirectForm()
self.app_ctx.push()
... | import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class FormTestCase(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_all()
def tearDown(self):
... | <commit_before>import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class TestRedirectForm(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.redirect_form = RedirectForm()
self.app_ct... | import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class FormTestCase(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_all()
def tearDown(self):
... | import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class TestRedirectForm(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.redirect_form = RedirectForm()
self.app_ctx.push()
... | <commit_before>import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class TestRedirectForm(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.redirect_form = RedirectForm()
self.app_ct... |
fdd1604ae64d72dc2391abe137adba07da830bcd | imagersite/imager_profile/models.py | imagersite/imager_profile/models.py | """Models."""
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class ImagerProfile(models.Model):
"""Imager Profile Model."""
camera_model = models.CharField(max_length=200)
photography_type = models.TextField()
# friends = models.ManyToManyField('... | """Models."""
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class ActiveUserManager(models.Manager):
"""Manager to grab active users."""
def get_query_set(self):
"""Return only active users."""
re... | Add ability to access all 'objects' and only 'active' users | Add ability to access all 'objects' and only 'active' users
| Python | mit | DZwell/django-imager | """Models."""
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class ImagerProfile(models.Model):
"""Imager Profile Model."""
camera_model = models.CharField(max_length=200)
photography_type = models.TextField()
# friends = models.ManyToManyField('... | """Models."""
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class ActiveUserManager(models.Manager):
"""Manager to grab active users."""
def get_query_set(self):
"""Return only active users."""
re... | <commit_before>"""Models."""
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class ImagerProfile(models.Model):
"""Imager Profile Model."""
camera_model = models.CharField(max_length=200)
photography_type = models.TextField()
# friends = models.Ma... | """Models."""
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class ActiveUserManager(models.Manager):
"""Manager to grab active users."""
def get_query_set(self):
"""Return only active users."""
re... | """Models."""
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class ImagerProfile(models.Model):
"""Imager Profile Model."""
camera_model = models.CharField(max_length=200)
photography_type = models.TextField()
# friends = models.ManyToManyField('... | <commit_before>"""Models."""
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class ImagerProfile(models.Model):
"""Imager Profile Model."""
camera_model = models.CharField(max_length=200)
photography_type = models.TextField()
# friends = models.Ma... |
16e9987e680a6a44acdb14bd7554414dfe261056 | sale_automatic_workflow/models/stock_move.py | sale_automatic_workflow/models/stock_move.py | # -*- coding: utf-8 -*-
# © 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# © 2013 Camptocamp SA (author: Guewen Baconnier)
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class StockMove(models.Model):
_inherit = 'stock.move'
@api.m... | # -*- coding: utf-8 -*-
# © 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# © 2013 Camptocamp SA (author: Guewen Baconnier)
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class StockMove(models.Model):
_inherit = 'stock.move'
@api.m... | Fix API type & method name for picking values | Fix API type & method name for picking values
| Python | agpl-3.0 | kittiu/sale-workflow,kittiu/sale-workflow | # -*- coding: utf-8 -*-
# © 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# © 2013 Camptocamp SA (author: Guewen Baconnier)
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class StockMove(models.Model):
_inherit = 'stock.move'
@api.m... | # -*- coding: utf-8 -*-
# © 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# © 2013 Camptocamp SA (author: Guewen Baconnier)
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class StockMove(models.Model):
_inherit = 'stock.move'
@api.m... | <commit_before># -*- coding: utf-8 -*-
# © 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# © 2013 Camptocamp SA (author: Guewen Baconnier)
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class StockMove(models.Model):
_inherit = 'stock.mo... | # -*- coding: utf-8 -*-
# © 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# © 2013 Camptocamp SA (author: Guewen Baconnier)
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class StockMove(models.Model):
_inherit = 'stock.move'
@api.m... | # -*- coding: utf-8 -*-
# © 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# © 2013 Camptocamp SA (author: Guewen Baconnier)
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class StockMove(models.Model):
_inherit = 'stock.move'
@api.m... | <commit_before># -*- coding: utf-8 -*-
# © 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# © 2013 Camptocamp SA (author: Guewen Baconnier)
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class StockMove(models.Model):
_inherit = 'stock.mo... |
5d83c039391b83ce16f7499f463554b89168a55f | cumulusci/cli/logger.py | cumulusci/cli/logger.py | """ CLI logger """
from __future__ import unicode_literals
import logging
import coloredlogs
import requests
def init_logger(log_requests=False):
""" Initialize the logger """
logger = logging.getLogger(__name__.split(".")[0])
for handler in logger.handlers: # pragma: nocover
logger.removeHand... | """ CLI logger """
from __future__ import unicode_literals
import logging
import os
import sys
import requests
import coloredlogs
try:
import colorama
except ImportError:
# coloredlogs only installs colorama on Windows
pass
def init_logger(log_requests=False):
""" Initialize the logger """
lo... | Fix color escapes on Windows | Fix color escapes on Windows
Fixes #813
| Python | bsd-3-clause | SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI | """ CLI logger """
from __future__ import unicode_literals
import logging
import coloredlogs
import requests
def init_logger(log_requests=False):
""" Initialize the logger """
logger = logging.getLogger(__name__.split(".")[0])
for handler in logger.handlers: # pragma: nocover
logger.removeHand... | """ CLI logger """
from __future__ import unicode_literals
import logging
import os
import sys
import requests
import coloredlogs
try:
import colorama
except ImportError:
# coloredlogs only installs colorama on Windows
pass
def init_logger(log_requests=False):
""" Initialize the logger """
lo... | <commit_before>""" CLI logger """
from __future__ import unicode_literals
import logging
import coloredlogs
import requests
def init_logger(log_requests=False):
""" Initialize the logger """
logger = logging.getLogger(__name__.split(".")[0])
for handler in logger.handlers: # pragma: nocover
lo... | """ CLI logger """
from __future__ import unicode_literals
import logging
import os
import sys
import requests
import coloredlogs
try:
import colorama
except ImportError:
# coloredlogs only installs colorama on Windows
pass
def init_logger(log_requests=False):
""" Initialize the logger """
lo... | """ CLI logger """
from __future__ import unicode_literals
import logging
import coloredlogs
import requests
def init_logger(log_requests=False):
""" Initialize the logger """
logger = logging.getLogger(__name__.split(".")[0])
for handler in logger.handlers: # pragma: nocover
logger.removeHand... | <commit_before>""" CLI logger """
from __future__ import unicode_literals
import logging
import coloredlogs
import requests
def init_logger(log_requests=False):
""" Initialize the logger """
logger = logging.getLogger(__name__.split(".")[0])
for handler in logger.handlers: # pragma: nocover
lo... |
c83a680603b83edafe61f6d41b34989c70a4e4ae | clowder/clowder/cli/save_controller.py | clowder/clowder/cli/save_controller.py | from cement.ext.ext_argparse import expose
from clowder.cli.abstract_base_controller import AbstractBaseController
class SaveController(AbstractBaseController):
class Meta:
label = 'save'
stacked_on = 'base'
stacked_type = 'nested'
description = 'Create version of clowder.yaml for... | import os
import sys
from cement.ext.ext_argparse import expose
import clowder.util.formatting as fmt
from clowder.cli.abstract_base_controller import AbstractBaseController
from clowder.util.decorators import valid_clowder_yaml_required
from clowder.commands.util import (
validate_groups,
validate_projects_e... | Add `clowder save` logic to Cement controller | Add `clowder save` logic to Cement controller
| Python | mit | JrGoodle/clowder,JrGoodle/clowder,JrGoodle/clowder | from cement.ext.ext_argparse import expose
from clowder.cli.abstract_base_controller import AbstractBaseController
class SaveController(AbstractBaseController):
class Meta:
label = 'save'
stacked_on = 'base'
stacked_type = 'nested'
description = 'Create version of clowder.yaml for... | import os
import sys
from cement.ext.ext_argparse import expose
import clowder.util.formatting as fmt
from clowder.cli.abstract_base_controller import AbstractBaseController
from clowder.util.decorators import valid_clowder_yaml_required
from clowder.commands.util import (
validate_groups,
validate_projects_e... | <commit_before>from cement.ext.ext_argparse import expose
from clowder.cli.abstract_base_controller import AbstractBaseController
class SaveController(AbstractBaseController):
class Meta:
label = 'save'
stacked_on = 'base'
stacked_type = 'nested'
description = 'Create version of c... | import os
import sys
from cement.ext.ext_argparse import expose
import clowder.util.formatting as fmt
from clowder.cli.abstract_base_controller import AbstractBaseController
from clowder.util.decorators import valid_clowder_yaml_required
from clowder.commands.util import (
validate_groups,
validate_projects_e... | from cement.ext.ext_argparse import expose
from clowder.cli.abstract_base_controller import AbstractBaseController
class SaveController(AbstractBaseController):
class Meta:
label = 'save'
stacked_on = 'base'
stacked_type = 'nested'
description = 'Create version of clowder.yaml for... | <commit_before>from cement.ext.ext_argparse import expose
from clowder.cli.abstract_base_controller import AbstractBaseController
class SaveController(AbstractBaseController):
class Meta:
label = 'save'
stacked_on = 'base'
stacked_type = 'nested'
description = 'Create version of c... |
b6ee793158d549f3d04d42ecbeb1c63605d6258f | src/setup.py | src/setup.py | import distutils.core
import distutils.extension
import Cython.Distutils
import numpy as np
compile_args = ['-O3', '-march=native', '-ffast-math', '-std=c++14', '-fopenmp']
ext_module = distutils.extension.Extension('spectrum_match', ['spectrum_match.pyx', 'SpectrumMatch.cpp'],
... | import distutils.core
import distutils.extension
import Cython.Distutils
import numpy as np
compile_args = ['-O3', '-march=native', '-ffast-math', '-fno-associative-math', '-std=c++14', '-fopenmp']
ext_module = distutils.extension.Extension('spectrum_match', ['spectrum_match.pyx', 'SpectrumMatch.cpp'],
... | Add C++ compilation flag to ensure deterministic behavior | Add C++ compilation flag to ensure deterministic behavior
More information: https://github.com/spotify/annoy/pull/205
| Python | apache-2.0 | bittremieux/ANN-SoLo,bittremieux/ANN-SoLo | import distutils.core
import distutils.extension
import Cython.Distutils
import numpy as np
compile_args = ['-O3', '-march=native', '-ffast-math', '-std=c++14', '-fopenmp']
ext_module = distutils.extension.Extension('spectrum_match', ['spectrum_match.pyx', 'SpectrumMatch.cpp'],
... | import distutils.core
import distutils.extension
import Cython.Distutils
import numpy as np
compile_args = ['-O3', '-march=native', '-ffast-math', '-fno-associative-math', '-std=c++14', '-fopenmp']
ext_module = distutils.extension.Extension('spectrum_match', ['spectrum_match.pyx', 'SpectrumMatch.cpp'],
... | <commit_before>import distutils.core
import distutils.extension
import Cython.Distutils
import numpy as np
compile_args = ['-O3', '-march=native', '-ffast-math', '-std=c++14', '-fopenmp']
ext_module = distutils.extension.Extension('spectrum_match', ['spectrum_match.pyx', 'SpectrumMatch.cpp'],
... | import distutils.core
import distutils.extension
import Cython.Distutils
import numpy as np
compile_args = ['-O3', '-march=native', '-ffast-math', '-fno-associative-math', '-std=c++14', '-fopenmp']
ext_module = distutils.extension.Extension('spectrum_match', ['spectrum_match.pyx', 'SpectrumMatch.cpp'],
... | import distutils.core
import distutils.extension
import Cython.Distutils
import numpy as np
compile_args = ['-O3', '-march=native', '-ffast-math', '-std=c++14', '-fopenmp']
ext_module = distutils.extension.Extension('spectrum_match', ['spectrum_match.pyx', 'SpectrumMatch.cpp'],
... | <commit_before>import distutils.core
import distutils.extension
import Cython.Distutils
import numpy as np
compile_args = ['-O3', '-march=native', '-ffast-math', '-std=c++14', '-fopenmp']
ext_module = distutils.extension.Extension('spectrum_match', ['spectrum_match.pyx', 'SpectrumMatch.cpp'],
... |
ad54fa1eae6ea255f8fc57f3bb7c36d410dab705 | ratemyflight/settings.py | ratemyflight/settings.py |
# Maximum airports to return as JSON.
MAX_AIRPORTS = 100
# Maximum flights to return as JSON.
MAX_FLIGHTS = 100
# Pixel size of gravatar icons.
GRAVATAR_SIZE = 32
|
# Maximum airports to return as JSON.
MAX_AIRPORTS = 100
# Maximum flights to return as JSON.
MAX_FLIGHTS = 10
# Pixel size of gravatar icons.
GRAVATAR_SIZE = 32
| Reduce MAX_FLIGHTS on screen to 10. | Reduce MAX_FLIGHTS on screen to 10.
| Python | bsd-2-clause | stephenmcd/ratemyflight,stephenmcd/ratemyflight |
# Maximum airports to return as JSON.
MAX_AIRPORTS = 100
# Maximum flights to return as JSON.
MAX_FLIGHTS = 100
# Pixel size of gravatar icons.
GRAVATAR_SIZE = 32
Reduce MAX_FLIGHTS on screen to 10. |
# Maximum airports to return as JSON.
MAX_AIRPORTS = 100
# Maximum flights to return as JSON.
MAX_FLIGHTS = 10
# Pixel size of gravatar icons.
GRAVATAR_SIZE = 32
| <commit_before>
# Maximum airports to return as JSON.
MAX_AIRPORTS = 100
# Maximum flights to return as JSON.
MAX_FLIGHTS = 100
# Pixel size of gravatar icons.
GRAVATAR_SIZE = 32
<commit_msg>Reduce MAX_FLIGHTS on screen to 10.<commit_after> |
# Maximum airports to return as JSON.
MAX_AIRPORTS = 100
# Maximum flights to return as JSON.
MAX_FLIGHTS = 10
# Pixel size of gravatar icons.
GRAVATAR_SIZE = 32
|
# Maximum airports to return as JSON.
MAX_AIRPORTS = 100
# Maximum flights to return as JSON.
MAX_FLIGHTS = 100
# Pixel size of gravatar icons.
GRAVATAR_SIZE = 32
Reduce MAX_FLIGHTS on screen to 10.
# Maximum airports to return as JSON.
MAX_AIRPORTS = 100
# Maximum flights to return as JSON.
MAX_FLIGHTS = 10 ... | <commit_before>
# Maximum airports to return as JSON.
MAX_AIRPORTS = 100
# Maximum flights to return as JSON.
MAX_FLIGHTS = 100
# Pixel size of gravatar icons.
GRAVATAR_SIZE = 32
<commit_msg>Reduce MAX_FLIGHTS on screen to 10.<commit_after>
# Maximum airports to return as JSON.
MAX_AIRPORTS = 100
# Maximum fli... |
7bece2c307cb05504c4b778446a4867ab8b6c196 | indra/tests/test_ontmapper.py | indra/tests/test_ontmapper.py | from indra.statements import Influence, Concept
from indra.preassembler.ontology_mapper import OntologyMapper, wm_ontomap
def test_map():
c1 = Concept('x', db_refs={'UN': [('entities/x', 1.0)]})
c2 = Concept('y', db_refs={'BBN': 'entities/y'})
c3 = Concept('z')
stmts = [Influence(c1, c3), Influence(c2... | from indra.statements import Influence, Concept
from indra.preassembler.ontology_mapper import OntologyMapper, wm_ontomap
def test_map():
c1 = Concept('x', db_refs={'UN': [('entities/x', 1.0)]})
c2 = Concept('y', db_refs={'BBN': 'entities/y'})
c3 = Concept('z')
stmts = [Influence(c1, c3), Influence(c2... | Add simple test for WM ontology mapping | Add simple test for WM ontology mapping
| Python | bsd-2-clause | pvtodorov/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,sorgerlab/belpy,johnbachman/belpy,bgyori/indra,johnbachman/belpy,sorgerlab/indra,bgyori/indra,pvtodorov/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,pvtodorov/indra,sorgerlab/indra,johnbachman/belpy,johnbachman/indra | from indra.statements import Influence, Concept
from indra.preassembler.ontology_mapper import OntologyMapper, wm_ontomap
def test_map():
c1 = Concept('x', db_refs={'UN': [('entities/x', 1.0)]})
c2 = Concept('y', db_refs={'BBN': 'entities/y'})
c3 = Concept('z')
stmts = [Influence(c1, c3), Influence(c2... | from indra.statements import Influence, Concept
from indra.preassembler.ontology_mapper import OntologyMapper, wm_ontomap
def test_map():
c1 = Concept('x', db_refs={'UN': [('entities/x', 1.0)]})
c2 = Concept('y', db_refs={'BBN': 'entities/y'})
c3 = Concept('z')
stmts = [Influence(c1, c3), Influence(c2... | <commit_before>from indra.statements import Influence, Concept
from indra.preassembler.ontology_mapper import OntologyMapper, wm_ontomap
def test_map():
c1 = Concept('x', db_refs={'UN': [('entities/x', 1.0)]})
c2 = Concept('y', db_refs={'BBN': 'entities/y'})
c3 = Concept('z')
stmts = [Influence(c1, c3... | from indra.statements import Influence, Concept
from indra.preassembler.ontology_mapper import OntologyMapper, wm_ontomap
def test_map():
c1 = Concept('x', db_refs={'UN': [('entities/x', 1.0)]})
c2 = Concept('y', db_refs={'BBN': 'entities/y'})
c3 = Concept('z')
stmts = [Influence(c1, c3), Influence(c2... | from indra.statements import Influence, Concept
from indra.preassembler.ontology_mapper import OntologyMapper, wm_ontomap
def test_map():
c1 = Concept('x', db_refs={'UN': [('entities/x', 1.0)]})
c2 = Concept('y', db_refs={'BBN': 'entities/y'})
c3 = Concept('z')
stmts = [Influence(c1, c3), Influence(c2... | <commit_before>from indra.statements import Influence, Concept
from indra.preassembler.ontology_mapper import OntologyMapper, wm_ontomap
def test_map():
c1 = Concept('x', db_refs={'UN': [('entities/x', 1.0)]})
c2 = Concept('y', db_refs={'BBN': 'entities/y'})
c3 = Concept('z')
stmts = [Influence(c1, c3... |
b8ac4107535910e257de903d89f4879869035710 | ddsc_incron/settings.py | ddsc_incron/settings.py | from __future__ import absolute_import
from ddsc_incron.celery import celery
# Note that logging to a single file from multiple processes is NOT supported.
# See: http://docs.python.org/2/howto/logging-cookbook.html
# #logging-to-a-single-file-from-multiple-processes
# This very much applies to ddsc-incron!
# TODO: ... | from __future__ import absolute_import
from ddsc_incron.celery import celery
# Note that logging to a single file from multiple processes is NOT supported.
# See: http://docs.python.org/2/howto/logging-cookbook.html
# #logging-to-a-single-file-from-multiple-processes
# This very much applies to ddsc-incron!
# TODO: ... | Set default log level to INFO | Set default log level to INFO
| Python | mit | ddsc/ddsc-incron | from __future__ import absolute_import
from ddsc_incron.celery import celery
# Note that logging to a single file from multiple processes is NOT supported.
# See: http://docs.python.org/2/howto/logging-cookbook.html
# #logging-to-a-single-file-from-multiple-processes
# This very much applies to ddsc-incron!
# TODO: ... | from __future__ import absolute_import
from ddsc_incron.celery import celery
# Note that logging to a single file from multiple processes is NOT supported.
# See: http://docs.python.org/2/howto/logging-cookbook.html
# #logging-to-a-single-file-from-multiple-processes
# This very much applies to ddsc-incron!
# TODO: ... | <commit_before>from __future__ import absolute_import
from ddsc_incron.celery import celery
# Note that logging to a single file from multiple processes is NOT supported.
# See: http://docs.python.org/2/howto/logging-cookbook.html
# #logging-to-a-single-file-from-multiple-processes
# This very much applies to ddsc-in... | from __future__ import absolute_import
from ddsc_incron.celery import celery
# Note that logging to a single file from multiple processes is NOT supported.
# See: http://docs.python.org/2/howto/logging-cookbook.html
# #logging-to-a-single-file-from-multiple-processes
# This very much applies to ddsc-incron!
# TODO: ... | from __future__ import absolute_import
from ddsc_incron.celery import celery
# Note that logging to a single file from multiple processes is NOT supported.
# See: http://docs.python.org/2/howto/logging-cookbook.html
# #logging-to-a-single-file-from-multiple-processes
# This very much applies to ddsc-incron!
# TODO: ... | <commit_before>from __future__ import absolute_import
from ddsc_incron.celery import celery
# Note that logging to a single file from multiple processes is NOT supported.
# See: http://docs.python.org/2/howto/logging-cookbook.html
# #logging-to-a-single-file-from-multiple-processes
# This very much applies to ddsc-in... |
1f3164f95f0ce40bac38ac384bf5fdd181ab5fa1 | importlib_metadata/__init__.py | importlib_metadata/__init__.py | from .api import (
Distribution, PackageNotFoundError, distribution, distributions,
entry_points, files, metadata, requires, version)
# Import for installation side-effects.
from . import _hooks # noqa: F401
__all__ = [
'Distribution',
'PackageNotFoundError',
'distribution',
'distributions',... | from .api import (
Distribution, PackageNotFoundError, distribution, distributions,
entry_points, files, metadata, requires, version)
# Import for installation side-effects.
__import__('importlib_metadata._hooks')
__all__ = [
'Distribution',
'PackageNotFoundError',
'distribution',
'distributi... | Use imperative import to avoid lint (import order) and as a good convention when side-effects is the intention. | Use imperative import to avoid lint (import order) and as a good convention when side-effects is the intention.
| Python | apache-2.0 | python/importlib_metadata | from .api import (
Distribution, PackageNotFoundError, distribution, distributions,
entry_points, files, metadata, requires, version)
# Import for installation side-effects.
from . import _hooks # noqa: F401
__all__ = [
'Distribution',
'PackageNotFoundError',
'distribution',
'distributions',... | from .api import (
Distribution, PackageNotFoundError, distribution, distributions,
entry_points, files, metadata, requires, version)
# Import for installation side-effects.
__import__('importlib_metadata._hooks')
__all__ = [
'Distribution',
'PackageNotFoundError',
'distribution',
'distributi... | <commit_before>from .api import (
Distribution, PackageNotFoundError, distribution, distributions,
entry_points, files, metadata, requires, version)
# Import for installation side-effects.
from . import _hooks # noqa: F401
__all__ = [
'Distribution',
'PackageNotFoundError',
'distribution',
'... | from .api import (
Distribution, PackageNotFoundError, distribution, distributions,
entry_points, files, metadata, requires, version)
# Import for installation side-effects.
__import__('importlib_metadata._hooks')
__all__ = [
'Distribution',
'PackageNotFoundError',
'distribution',
'distributi... | from .api import (
Distribution, PackageNotFoundError, distribution, distributions,
entry_points, files, metadata, requires, version)
# Import for installation side-effects.
from . import _hooks # noqa: F401
__all__ = [
'Distribution',
'PackageNotFoundError',
'distribution',
'distributions',... | <commit_before>from .api import (
Distribution, PackageNotFoundError, distribution, distributions,
entry_points, files, metadata, requires, version)
# Import for installation side-effects.
from . import _hooks # noqa: F401
__all__ = [
'Distribution',
'PackageNotFoundError',
'distribution',
'... |
0f966f1622b5b61fc0a385eb13a7d270013104f9 | orchestrator/jinja/filters.py | orchestrator/jinja/filters.py | from future.builtins import ( # noqa
bytes, dict, int, list, object, range, str,
ascii, chr, hex, input, next, oct, open,
pow, round, filter, map, zip)
import re
__author__ = 'sukrit'
"""
Package that includes custom filters required for totem config processing
"""
USE_FILTERS = ('replace_regex', )
d... | from future.builtins import ( # noqa
bytes, dict, int, list, object, range, str,
ascii, chr, hex, input, next, oct, open,
pow, round, filter, map, zip)
import re
__author__ = 'sukrit'
"""
Package that includes custom filters required for totem config processing
"""
USE_FILTERS = ('replace_regex', )
d... | Fix variable for input string | Fix variable for input string
| Python | mit | totem/cluster-orchestrator,totem/cluster-orchestrator,totem/cluster-orchestrator | from future.builtins import ( # noqa
bytes, dict, int, list, object, range, str,
ascii, chr, hex, input, next, oct, open,
pow, round, filter, map, zip)
import re
__author__ = 'sukrit'
"""
Package that includes custom filters required for totem config processing
"""
USE_FILTERS = ('replace_regex', )
d... | from future.builtins import ( # noqa
bytes, dict, int, list, object, range, str,
ascii, chr, hex, input, next, oct, open,
pow, round, filter, map, zip)
import re
__author__ = 'sukrit'
"""
Package that includes custom filters required for totem config processing
"""
USE_FILTERS = ('replace_regex', )
d... | <commit_before>from future.builtins import ( # noqa
bytes, dict, int, list, object, range, str,
ascii, chr, hex, input, next, oct, open,
pow, round, filter, map, zip)
import re
__author__ = 'sukrit'
"""
Package that includes custom filters required for totem config processing
"""
USE_FILTERS = ('replac... | from future.builtins import ( # noqa
bytes, dict, int, list, object, range, str,
ascii, chr, hex, input, next, oct, open,
pow, round, filter, map, zip)
import re
__author__ = 'sukrit'
"""
Package that includes custom filters required for totem config processing
"""
USE_FILTERS = ('replace_regex', )
d... | from future.builtins import ( # noqa
bytes, dict, int, list, object, range, str,
ascii, chr, hex, input, next, oct, open,
pow, round, filter, map, zip)
import re
__author__ = 'sukrit'
"""
Package that includes custom filters required for totem config processing
"""
USE_FILTERS = ('replace_regex', )
d... | <commit_before>from future.builtins import ( # noqa
bytes, dict, int, list, object, range, str,
ascii, chr, hex, input, next, oct, open,
pow, round, filter, map, zip)
import re
__author__ = 'sukrit'
"""
Package that includes custom filters required for totem config processing
"""
USE_FILTERS = ('replac... |
fe92323dfa1067d552abefa60910e758500f0920 | virtool/handlers/files.py | virtool/handlers/files.py | import virtool.file
from virtool.handlers.utils import json_response
async def find(req):
db = req.app["db"]
cursor = db.files.find({"eof": True}, virtool.file.LIST_PROJECTION)
found_count = await cursor.count()
documents = [virtool.file.processor(d) for d in await cursor.to_list(15)]
return j... | import os
import virtool.file
import virtool.utils
from virtool.handlers.utils import json_response, not_found
async def find(req):
db = req.app["db"]
cursor = db.files.find({"ready": True}, virtool.file.LIST_PROJECTION)
found_count = await cursor.count()
documents = [virtool.file.processor(d) for... | Add uploaded file removal endpoint | Add uploaded file removal endpoint
| Python | mit | igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool | import virtool.file
from virtool.handlers.utils import json_response
async def find(req):
db = req.app["db"]
cursor = db.files.find({"eof": True}, virtool.file.LIST_PROJECTION)
found_count = await cursor.count()
documents = [virtool.file.processor(d) for d in await cursor.to_list(15)]
return j... | import os
import virtool.file
import virtool.utils
from virtool.handlers.utils import json_response, not_found
async def find(req):
db = req.app["db"]
cursor = db.files.find({"ready": True}, virtool.file.LIST_PROJECTION)
found_count = await cursor.count()
documents = [virtool.file.processor(d) for... | <commit_before>import virtool.file
from virtool.handlers.utils import json_response
async def find(req):
db = req.app["db"]
cursor = db.files.find({"eof": True}, virtool.file.LIST_PROJECTION)
found_count = await cursor.count()
documents = [virtool.file.processor(d) for d in await cursor.to_list(15)... | import os
import virtool.file
import virtool.utils
from virtool.handlers.utils import json_response, not_found
async def find(req):
db = req.app["db"]
cursor = db.files.find({"ready": True}, virtool.file.LIST_PROJECTION)
found_count = await cursor.count()
documents = [virtool.file.processor(d) for... | import virtool.file
from virtool.handlers.utils import json_response
async def find(req):
db = req.app["db"]
cursor = db.files.find({"eof": True}, virtool.file.LIST_PROJECTION)
found_count = await cursor.count()
documents = [virtool.file.processor(d) for d in await cursor.to_list(15)]
return j... | <commit_before>import virtool.file
from virtool.handlers.utils import json_response
async def find(req):
db = req.app["db"]
cursor = db.files.find({"eof": True}, virtool.file.LIST_PROJECTION)
found_count = await cursor.count()
documents = [virtool.file.processor(d) for d in await cursor.to_list(15)... |
be23c953f8f27a8d178022d3ecb44f461100bbc5 | tests/__init__.py | tests/__init__.py | """Tests for running TopoFlow components in CMI."""
import os
def locate_topoflow(cache_dir):
for x in os.listdir(cache_dir):
if x.startswith('topoflow'):
return x
root_dir = '/home/csdms/wmt/topoflow.0'
cache_dir = os.path.join(root_dir, 'cache')
topoflow_dir = locate_topoflow(cache_dir)
ex... | """Tests for running TopoFlow components in CMI."""
import os
def locate_topoflow(cache_dir):
for x in os.listdir(cache_dir):
if x.startswith('topoflow'):
return x
root_dir = '/home/csdms/wmt/topoflow.0'
cache_dir = os.path.join(root_dir, 'cache')
topoflow_dir = locate_topoflow(cache_dir)
ex... | Add path to data directory | Add path to data directory
| Python | mit | mdpiper/topoflow-cmi-testing | """Tests for running TopoFlow components in CMI."""
import os
def locate_topoflow(cache_dir):
for x in os.listdir(cache_dir):
if x.startswith('topoflow'):
return x
root_dir = '/home/csdms/wmt/topoflow.0'
cache_dir = os.path.join(root_dir, 'cache')
topoflow_dir = locate_topoflow(cache_dir)
ex... | """Tests for running TopoFlow components in CMI."""
import os
def locate_topoflow(cache_dir):
for x in os.listdir(cache_dir):
if x.startswith('topoflow'):
return x
root_dir = '/home/csdms/wmt/topoflow.0'
cache_dir = os.path.join(root_dir, 'cache')
topoflow_dir = locate_topoflow(cache_dir)
ex... | <commit_before>"""Tests for running TopoFlow components in CMI."""
import os
def locate_topoflow(cache_dir):
for x in os.listdir(cache_dir):
if x.startswith('topoflow'):
return x
root_dir = '/home/csdms/wmt/topoflow.0'
cache_dir = os.path.join(root_dir, 'cache')
topoflow_dir = locate_topoflo... | """Tests for running TopoFlow components in CMI."""
import os
def locate_topoflow(cache_dir):
for x in os.listdir(cache_dir):
if x.startswith('topoflow'):
return x
root_dir = '/home/csdms/wmt/topoflow.0'
cache_dir = os.path.join(root_dir, 'cache')
topoflow_dir = locate_topoflow(cache_dir)
ex... | """Tests for running TopoFlow components in CMI."""
import os
def locate_topoflow(cache_dir):
for x in os.listdir(cache_dir):
if x.startswith('topoflow'):
return x
root_dir = '/home/csdms/wmt/topoflow.0'
cache_dir = os.path.join(root_dir, 'cache')
topoflow_dir = locate_topoflow(cache_dir)
ex... | <commit_before>"""Tests for running TopoFlow components in CMI."""
import os
def locate_topoflow(cache_dir):
for x in os.listdir(cache_dir):
if x.startswith('topoflow'):
return x
root_dir = '/home/csdms/wmt/topoflow.0'
cache_dir = os.path.join(root_dir, 'cache')
topoflow_dir = locate_topoflo... |
96c90af1e3e2c6a35a261db5a67bdfc236983a06 | tests/conftest.py | tests/conftest.py | # -*- coding: utf-8 -*-
'''
General-purpose fixtures for vdirsyncer's testsuite.
'''
import logging
import os
import click_log
from hypothesis import HealthCheck, Verbosity, settings
import pytest
@pytest.fixture(autouse=True)
def setup_logging():
click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG)
... | # -*- coding: utf-8 -*-
'''
General-purpose fixtures for vdirsyncer's testsuite.
'''
import logging
import os
import click_log
from hypothesis import HealthCheck, Verbosity, settings
import pytest
@pytest.fixture(autouse=True)
def setup_logging():
click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG)
... | Add flag about Py2 monkeypatch for tests | Add flag about Py2 monkeypatch for tests
| Python | mit | untitaker/vdirsyncer,hobarrera/vdirsyncer,untitaker/vdirsyncer,hobarrera/vdirsyncer,untitaker/vdirsyncer | # -*- coding: utf-8 -*-
'''
General-purpose fixtures for vdirsyncer's testsuite.
'''
import logging
import os
import click_log
from hypothesis import HealthCheck, Verbosity, settings
import pytest
@pytest.fixture(autouse=True)
def setup_logging():
click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG)
... | # -*- coding: utf-8 -*-
'''
General-purpose fixtures for vdirsyncer's testsuite.
'''
import logging
import os
import click_log
from hypothesis import HealthCheck, Verbosity, settings
import pytest
@pytest.fixture(autouse=True)
def setup_logging():
click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG)
... | <commit_before># -*- coding: utf-8 -*-
'''
General-purpose fixtures for vdirsyncer's testsuite.
'''
import logging
import os
import click_log
from hypothesis import HealthCheck, Verbosity, settings
import pytest
@pytest.fixture(autouse=True)
def setup_logging():
click_log.basic_config('vdirsyncer').setLevel(lo... | # -*- coding: utf-8 -*-
'''
General-purpose fixtures for vdirsyncer's testsuite.
'''
import logging
import os
import click_log
from hypothesis import HealthCheck, Verbosity, settings
import pytest
@pytest.fixture(autouse=True)
def setup_logging():
click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG)
... | # -*- coding: utf-8 -*-
'''
General-purpose fixtures for vdirsyncer's testsuite.
'''
import logging
import os
import click_log
from hypothesis import HealthCheck, Verbosity, settings
import pytest
@pytest.fixture(autouse=True)
def setup_logging():
click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG)
... | <commit_before># -*- coding: utf-8 -*-
'''
General-purpose fixtures for vdirsyncer's testsuite.
'''
import logging
import os
import click_log
from hypothesis import HealthCheck, Verbosity, settings
import pytest
@pytest.fixture(autouse=True)
def setup_logging():
click_log.basic_config('vdirsyncer').setLevel(lo... |
ef82619995ce71b5877228988bce2830eb25baff | download_and_unzip_files.py | download_and_unzip_files.py | import os
import datetime
current_year = datetime.datetime.now().year
years_with_data = range(2011, current_year + 1)
remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/"
for year in years_with_data:
print "Downloading " + str(year) + " data..."
filename_for_year = "efile_newest_COAK_" + str(year) + ... | import os
import datetime
current_year = datetime.datetime.now().year
years_with_data = range(2011, current_year + 1)
remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/"
for year in years_with_data:
print "Downloading " + str(year) + " data..."
filename_for_year = "efile_newest_COAK_" + str(year) + ... | Replace wget with curl to avoid Heroku buildpack sadness | Replace wget with curl to avoid Heroku buildpack sadness
| Python | bsd-3-clause | daguar/netfile-etl,daguar/netfile-etl | import os
import datetime
current_year = datetime.datetime.now().year
years_with_data = range(2011, current_year + 1)
remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/"
for year in years_with_data:
print "Downloading " + str(year) + " data..."
filename_for_year = "efile_newest_COAK_" + str(year) + ... | import os
import datetime
current_year = datetime.datetime.now().year
years_with_data = range(2011, current_year + 1)
remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/"
for year in years_with_data:
print "Downloading " + str(year) + " data..."
filename_for_year = "efile_newest_COAK_" + str(year) + ... | <commit_before>import os
import datetime
current_year = datetime.datetime.now().year
years_with_data = range(2011, current_year + 1)
remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/"
for year in years_with_data:
print "Downloading " + str(year) + " data..."
filename_for_year = "efile_newest_COAK_"... | import os
import datetime
current_year = datetime.datetime.now().year
years_with_data = range(2011, current_year + 1)
remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/"
for year in years_with_data:
print "Downloading " + str(year) + " data..."
filename_for_year = "efile_newest_COAK_" + str(year) + ... | import os
import datetime
current_year = datetime.datetime.now().year
years_with_data = range(2011, current_year + 1)
remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/"
for year in years_with_data:
print "Downloading " + str(year) + " data..."
filename_for_year = "efile_newest_COAK_" + str(year) + ... | <commit_before>import os
import datetime
current_year = datetime.datetime.now().year
years_with_data = range(2011, current_year + 1)
remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/"
for year in years_with_data:
print "Downloading " + str(year) + " data..."
filename_for_year = "efile_newest_COAK_"... |
0c9bf270a7a2d8a4184f644bbe8a50995e155b0a | buddy/error.py | buddy/error.py | from functools import wraps
import botocore.exceptions
from click import ClickException
EXC_TO_ECHO = [
botocore.exceptions.NoRegionError,
]
def handle_exception(func):
@wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except Exception as exc:
... | from functools import wraps
import botocore.exceptions
from click import ClickException
EXC_TO_ECHO = [
botocore.exceptions.NoRegionError,
botocore.exceptions.ParamValidationError,
]
def handle_exception(func):
@wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, ... | Add boto ParamValidationError to exc list | Add boto ParamValidationError to exc list
| Python | mit | pior/buddy | from functools import wraps
import botocore.exceptions
from click import ClickException
EXC_TO_ECHO = [
botocore.exceptions.NoRegionError,
]
def handle_exception(func):
@wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except Exception as exc:
... | from functools import wraps
import botocore.exceptions
from click import ClickException
EXC_TO_ECHO = [
botocore.exceptions.NoRegionError,
botocore.exceptions.ParamValidationError,
]
def handle_exception(func):
@wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, ... | <commit_before>from functools import wraps
import botocore.exceptions
from click import ClickException
EXC_TO_ECHO = [
botocore.exceptions.NoRegionError,
]
def handle_exception(func):
@wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except Except... | from functools import wraps
import botocore.exceptions
from click import ClickException
EXC_TO_ECHO = [
botocore.exceptions.NoRegionError,
botocore.exceptions.ParamValidationError,
]
def handle_exception(func):
@wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, ... | from functools import wraps
import botocore.exceptions
from click import ClickException
EXC_TO_ECHO = [
botocore.exceptions.NoRegionError,
]
def handle_exception(func):
@wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except Exception as exc:
... | <commit_before>from functools import wraps
import botocore.exceptions
from click import ClickException
EXC_TO_ECHO = [
botocore.exceptions.NoRegionError,
]
def handle_exception(func):
@wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except Except... |
f1e516e8002425f5f4f9904096848798b2bc97fa | jesusmtnez/python/kata/game.py | jesusmtnez/python/kata/game.py | class Game():
def __init__(self):
self._rolls = [0] * 21
self._current_roll = 0
def roll(self, pins):
self._rolls[self._current_roll] += pins
self._current_roll += 1
def score(self):
score = 0
for frame in range(0, 20, 2):
if self._is_spare(frame... | class Game():
def __init__(self):
self._rolls = [0] * 21
self._current_roll = 0
def roll(self, pins):
self._rolls[self._current_roll] += pins
self._current_roll += 1 if pins < 10 else 2
def score(self):
score = 0
for frame in range(0, 20, 2):
if ... | Add strikes support when rolling | [Python] Add strikes support when rolling
| Python | mit | JesusMtnez/devexperto-challenge,JesusMtnez/devexperto-challenge | class Game():
def __init__(self):
self._rolls = [0] * 21
self._current_roll = 0
def roll(self, pins):
self._rolls[self._current_roll] += pins
self._current_roll += 1
def score(self):
score = 0
for frame in range(0, 20, 2):
if self._is_spare(frame... | class Game():
def __init__(self):
self._rolls = [0] * 21
self._current_roll = 0
def roll(self, pins):
self._rolls[self._current_roll] += pins
self._current_roll += 1 if pins < 10 else 2
def score(self):
score = 0
for frame in range(0, 20, 2):
if ... | <commit_before>class Game():
def __init__(self):
self._rolls = [0] * 21
self._current_roll = 0
def roll(self, pins):
self._rolls[self._current_roll] += pins
self._current_roll += 1
def score(self):
score = 0
for frame in range(0, 20, 2):
if self.... | class Game():
def __init__(self):
self._rolls = [0] * 21
self._current_roll = 0
def roll(self, pins):
self._rolls[self._current_roll] += pins
self._current_roll += 1 if pins < 10 else 2
def score(self):
score = 0
for frame in range(0, 20, 2):
if ... | class Game():
def __init__(self):
self._rolls = [0] * 21
self._current_roll = 0
def roll(self, pins):
self._rolls[self._current_roll] += pins
self._current_roll += 1
def score(self):
score = 0
for frame in range(0, 20, 2):
if self._is_spare(frame... | <commit_before>class Game():
def __init__(self):
self._rolls = [0] * 21
self._current_roll = 0
def roll(self, pins):
self._rolls[self._current_roll] += pins
self._current_roll += 1
def score(self):
score = 0
for frame in range(0, 20, 2):
if self.... |
d957301018fa47ce61fcb004880ecd5acd18f2a9 | features/events/utils.py | features/events/utils.py | from django.utils import timezone
def get_requested_time(request):
query = request.GET
month, year = query.get('month', None), query.get('year', None)
if month and year:
return timezone.datetime(year=int(year), month=int(month), day=1)
else:
return None
| from django.utils import timezone
def get_requested_time(request):
query = request.GET
month, year = query.get('month', None), query.get('year', None)
if month and year:
try:
return timezone.datetime(year=int(year), month=int(month), day=1)
except ValueError:
pass
... | Fix handling of invalid parameters | Fix handling of invalid parameters
| Python | agpl-3.0 | stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten | from django.utils import timezone
def get_requested_time(request):
query = request.GET
month, year = query.get('month', None), query.get('year', None)
if month and year:
return timezone.datetime(year=int(year), month=int(month), day=1)
else:
return None
Fix handling of invalid paramet... | from django.utils import timezone
def get_requested_time(request):
query = request.GET
month, year = query.get('month', None), query.get('year', None)
if month and year:
try:
return timezone.datetime(year=int(year), month=int(month), day=1)
except ValueError:
pass
... | <commit_before>from django.utils import timezone
def get_requested_time(request):
query = request.GET
month, year = query.get('month', None), query.get('year', None)
if month and year:
return timezone.datetime(year=int(year), month=int(month), day=1)
else:
return None
<commit_msg>Fix ... | from django.utils import timezone
def get_requested_time(request):
query = request.GET
month, year = query.get('month', None), query.get('year', None)
if month and year:
try:
return timezone.datetime(year=int(year), month=int(month), day=1)
except ValueError:
pass
... | from django.utils import timezone
def get_requested_time(request):
query = request.GET
month, year = query.get('month', None), query.get('year', None)
if month and year:
return timezone.datetime(year=int(year), month=int(month), day=1)
else:
return None
Fix handling of invalid paramet... | <commit_before>from django.utils import timezone
def get_requested_time(request):
query = request.GET
month, year = query.get('month', None), query.get('year', None)
if month and year:
return timezone.datetime(year=int(year), month=int(month), day=1)
else:
return None
<commit_msg>Fix ... |
d6929fa152bb8149fa9b4033135441030dd71260 | authentic2/idp/idp_openid/context_processors.py | authentic2/idp/idp_openid/context_processors.py | def get_url():
return reverse('openid-provider-xrds')
def openid_meta(request):
context = {
'openid_server': context['request'].build_absolute_uri(get_url())
}
content = '''<meta http-equiv="X-XRDS-Location" content="%(openid_server)s"/>
<meta http-equiv="X-YADIS-Location" content="%(openid... | from django.core.urlresolvers import reverse
def get_url():
return reverse('openid-provider-xrds')
def openid_meta(request):
context = {
'openid_server': request.build_absolute_uri(get_url())
}
content = '''<meta http-equiv="X-XRDS-Location" content="%(openid_server)s"/>
<meta http-equiv="... | Remove dependency on openid in the base template (bis) | Remove dependency on openid in the base template (bis)
Fixes #1357
| Python | agpl-3.0 | BryceLohr/authentic,BryceLohr/authentic,incuna/authentic,incuna/authentic,adieu/authentic2,incuna/authentic,adieu/authentic2,adieu/authentic2,BryceLohr/authentic,pu239ppy/authentic2,adieu/authentic2,pu239ppy/authentic2,BryceLohr/authentic,pu239ppy/authentic2,incuna/authentic,pu239ppy/authentic2,incuna/authentic | def get_url():
return reverse('openid-provider-xrds')
def openid_meta(request):
context = {
'openid_server': context['request'].build_absolute_uri(get_url())
}
content = '''<meta http-equiv="X-XRDS-Location" content="%(openid_server)s"/>
<meta http-equiv="X-YADIS-Location" content="%(openid... | from django.core.urlresolvers import reverse
def get_url():
return reverse('openid-provider-xrds')
def openid_meta(request):
context = {
'openid_server': request.build_absolute_uri(get_url())
}
content = '''<meta http-equiv="X-XRDS-Location" content="%(openid_server)s"/>
<meta http-equiv="... | <commit_before>def get_url():
return reverse('openid-provider-xrds')
def openid_meta(request):
context = {
'openid_server': context['request'].build_absolute_uri(get_url())
}
content = '''<meta http-equiv="X-XRDS-Location" content="%(openid_server)s"/>
<meta http-equiv="X-YADIS-Location" co... | from django.core.urlresolvers import reverse
def get_url():
return reverse('openid-provider-xrds')
def openid_meta(request):
context = {
'openid_server': request.build_absolute_uri(get_url())
}
content = '''<meta http-equiv="X-XRDS-Location" content="%(openid_server)s"/>
<meta http-equiv="... | def get_url():
return reverse('openid-provider-xrds')
def openid_meta(request):
context = {
'openid_server': context['request'].build_absolute_uri(get_url())
}
content = '''<meta http-equiv="X-XRDS-Location" content="%(openid_server)s"/>
<meta http-equiv="X-YADIS-Location" content="%(openid... | <commit_before>def get_url():
return reverse('openid-provider-xrds')
def openid_meta(request):
context = {
'openid_server': context['request'].build_absolute_uri(get_url())
}
content = '''<meta http-equiv="X-XRDS-Location" content="%(openid_server)s"/>
<meta http-equiv="X-YADIS-Location" co... |
e62469c3572cf9bfa02cd153becc1b36ecf8b3df | 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 Codemotion Rome 2017 demo | Prepare for Codemotion Rome 2017 demo
| 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 ... |
8f1e094d8abc8317d8e802c556e695d117f0fac1 | globus_cli/commands/task/event_list.py | globus_cli/commands/task/event_list.py | import click
from globus_cli.parsing import common_options, task_id_arg
from globus_cli.safeio import formatted_print
from globus_cli.services.transfer import iterable_response_to_dict, get_client
@click.command('event-list', help='List Events for a given task')
@common_options
@task_id_arg
@click.option(
"--li... | import click
from globus_cli.parsing import common_options, task_id_arg
from globus_cli.safeio import formatted_print
from globus_cli.services.transfer import iterable_response_to_dict, get_client
@click.command('event-list', help='List Events for a given task')
@common_options
@task_id_arg
@click.option(
"--li... | Make task event-list filters mutually exclusive | Make task event-list filters mutually exclusive
| Python | apache-2.0 | globus/globus-cli,globus/globus-cli | import click
from globus_cli.parsing import common_options, task_id_arg
from globus_cli.safeio import formatted_print
from globus_cli.services.transfer import iterable_response_to_dict, get_client
@click.command('event-list', help='List Events for a given task')
@common_options
@task_id_arg
@click.option(
"--li... | import click
from globus_cli.parsing import common_options, task_id_arg
from globus_cli.safeio import formatted_print
from globus_cli.services.transfer import iterable_response_to_dict, get_client
@click.command('event-list', help='List Events for a given task')
@common_options
@task_id_arg
@click.option(
"--li... | <commit_before>import click
from globus_cli.parsing import common_options, task_id_arg
from globus_cli.safeio import formatted_print
from globus_cli.services.transfer import iterable_response_to_dict, get_client
@click.command('event-list', help='List Events for a given task')
@common_options
@task_id_arg
@click.op... | import click
from globus_cli.parsing import common_options, task_id_arg
from globus_cli.safeio import formatted_print
from globus_cli.services.transfer import iterable_response_to_dict, get_client
@click.command('event-list', help='List Events for a given task')
@common_options
@task_id_arg
@click.option(
"--li... | import click
from globus_cli.parsing import common_options, task_id_arg
from globus_cli.safeio import formatted_print
from globus_cli.services.transfer import iterable_response_to_dict, get_client
@click.command('event-list', help='List Events for a given task')
@common_options
@task_id_arg
@click.option(
"--li... | <commit_before>import click
from globus_cli.parsing import common_options, task_id_arg
from globus_cli.safeio import formatted_print
from globus_cli.services.transfer import iterable_response_to_dict, get_client
@click.command('event-list', help='List Events for a given task')
@common_options
@task_id_arg
@click.op... |
3b9a86bdb85aa04c2f2a0e40387f56d65fb54d46 | bin/trigger_upload.py | bin/trigger_upload.py | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | Fix the script to send proper format of compose id | scripts: Fix the script to send proper format of compose id
Signed-off-by: Sayan Chowdhury <5f0367a2b3b757615b57f51d912cf16f2c0ad827@gmail.com>
| Python | agpl-3.0 | fedora-infra/fedimg,fedora-infra/fedimg | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | <commit_before>#!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log ... | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | <commit_before>#!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log ... |
b03bc28da7476ca27e64b8cc01b685e11eb6d505 | menpodetect/pico/conversion.py | menpodetect/pico/conversion.py | from menpo.shape import PointDirectedGraph
import numpy as np
def pointgraph_from_circle(fitting):
y, x = fitting.center
radius = fitting.diameter / 2.0
return PointDirectedGraph(np.array(((y, x),
(y + radius, x),
(y + radius,... | from menpo.shape import PointDirectedGraph
import numpy as np
def pointgraph_from_circle(fitting):
diameter = fitting.diameter
radius = diameter / 2.0
y, x = fitting.center
y -= radius
x -= radius
return PointDirectedGraph(np.array(((y, x),
(y + diameter... | Fix the circle to rectangle code | Fix the circle to rectangle code
Was totally incorrect previously
| Python | bsd-3-clause | jabooth/menpodetect,yuxiang-zhou/menpodetect,yuxiang-zhou/menpodetect,jabooth/menpodetect | from menpo.shape import PointDirectedGraph
import numpy as np
def pointgraph_from_circle(fitting):
y, x = fitting.center
radius = fitting.diameter / 2.0
return PointDirectedGraph(np.array(((y, x),
(y + radius, x),
(y + radius,... | from menpo.shape import PointDirectedGraph
import numpy as np
def pointgraph_from_circle(fitting):
diameter = fitting.diameter
radius = diameter / 2.0
y, x = fitting.center
y -= radius
x -= radius
return PointDirectedGraph(np.array(((y, x),
(y + diameter... | <commit_before>from menpo.shape import PointDirectedGraph
import numpy as np
def pointgraph_from_circle(fitting):
y, x = fitting.center
radius = fitting.diameter / 2.0
return PointDirectedGraph(np.array(((y, x),
(y + radius, x),
... | from menpo.shape import PointDirectedGraph
import numpy as np
def pointgraph_from_circle(fitting):
diameter = fitting.diameter
radius = diameter / 2.0
y, x = fitting.center
y -= radius
x -= radius
return PointDirectedGraph(np.array(((y, x),
(y + diameter... | from menpo.shape import PointDirectedGraph
import numpy as np
def pointgraph_from_circle(fitting):
y, x = fitting.center
radius = fitting.diameter / 2.0
return PointDirectedGraph(np.array(((y, x),
(y + radius, x),
(y + radius,... | <commit_before>from menpo.shape import PointDirectedGraph
import numpy as np
def pointgraph_from_circle(fitting):
y, x = fitting.center
radius = fitting.diameter / 2.0
return PointDirectedGraph(np.array(((y, x),
(y + radius, x),
... |
bec268ef554e6f30c2cecd52ecddcafc34c5b0db | tutorials/cmake_python_wrapper/v1/python/foo/__init__.py | tutorials/cmake_python_wrapper/v1/python/foo/__init__.py | import ctypes
import numpy as np
import os
__all__ = ['square']
lib = ctypes.cdll.LoadLibrary("libfoo.so")
lib.square.restype = ctypes.c_int
lib.square.argtypes = [ctypes.c_int]
def square(value):
"""
Parameters
----------
value: int
Returns
--------
value square
"""
return lib.... | import ctypes
import numpy as np
import os
import sys
__all__ = ['square']
_path = os.path.dirname(__file__)
libname = None
if sys.platform.startswith('linux'):
libname = 'libfoo.so'
elif sys.platform == 'darwin':
libname = 'libfoo.dylib'
elif sys.platform.startswith('win'):
libname = 'foo.dll'
if libname ==None:... | Change to cmake to 3.4 and test sys.platform to choose lib extension to resolve import error on MacOSX | Change to cmake to 3.4 and test sys.platform to choose lib extension to resolve import error on MacOSX
| Python | bsd-3-clause | gammapy/PyGamma15,gammapy/2015-MPIK-Workshop,gammapy/2015-MPIK-Workshop,gammapy/PyGamma15,gammapy/PyGamma15,gammapy/2015-MPIK-Workshop | import ctypes
import numpy as np
import os
__all__ = ['square']
lib = ctypes.cdll.LoadLibrary("libfoo.so")
lib.square.restype = ctypes.c_int
lib.square.argtypes = [ctypes.c_int]
def square(value):
"""
Parameters
----------
value: int
Returns
--------
value square
"""
return lib.... | import ctypes
import numpy as np
import os
import sys
__all__ = ['square']
_path = os.path.dirname(__file__)
libname = None
if sys.platform.startswith('linux'):
libname = 'libfoo.so'
elif sys.platform == 'darwin':
libname = 'libfoo.dylib'
elif sys.platform.startswith('win'):
libname = 'foo.dll'
if libname ==None:... | <commit_before>import ctypes
import numpy as np
import os
__all__ = ['square']
lib = ctypes.cdll.LoadLibrary("libfoo.so")
lib.square.restype = ctypes.c_int
lib.square.argtypes = [ctypes.c_int]
def square(value):
"""
Parameters
----------
value: int
Returns
--------
value square
"""
... | import ctypes
import numpy as np
import os
import sys
__all__ = ['square']
_path = os.path.dirname(__file__)
libname = None
if sys.platform.startswith('linux'):
libname = 'libfoo.so'
elif sys.platform == 'darwin':
libname = 'libfoo.dylib'
elif sys.platform.startswith('win'):
libname = 'foo.dll'
if libname ==None:... | import ctypes
import numpy as np
import os
__all__ = ['square']
lib = ctypes.cdll.LoadLibrary("libfoo.so")
lib.square.restype = ctypes.c_int
lib.square.argtypes = [ctypes.c_int]
def square(value):
"""
Parameters
----------
value: int
Returns
--------
value square
"""
return lib.... | <commit_before>import ctypes
import numpy as np
import os
__all__ = ['square']
lib = ctypes.cdll.LoadLibrary("libfoo.so")
lib.square.restype = ctypes.c_int
lib.square.argtypes = [ctypes.c_int]
def square(value):
"""
Parameters
----------
value: int
Returns
--------
value square
"""
... |
def92e47ce05497e6a83cd8b8a569113956c6dc2 | events/serializers.py | events/serializers.py | from .models import Event, EventActivity
from rest_framework import serializers
class EventSerializer(serializers.ModelSerializer):
class Meta(object):
model = Event
depth = 1
class EventSimpleSerializer(serializers.Serializer):
pk = serializers.IntegerField()
name = serializers.CharFiel... | from .models import Event, EventActivity
from rest_framework import serializers
class EventSerializer(serializers.ModelSerializer):
class Meta(object):
model = Event
depth = 1
fields = ("pk", "name", "image", "datetime", "address", "description", "is_active", "is_upcoming", "location")
c... | Add explicit fields on EventSerializer | Add explicit fields on EventSerializer
| Python | apache-2.0 | belatrix/BackendAllStars | from .models import Event, EventActivity
from rest_framework import serializers
class EventSerializer(serializers.ModelSerializer):
class Meta(object):
model = Event
depth = 1
class EventSimpleSerializer(serializers.Serializer):
pk = serializers.IntegerField()
name = serializers.CharFiel... | from .models import Event, EventActivity
from rest_framework import serializers
class EventSerializer(serializers.ModelSerializer):
class Meta(object):
model = Event
depth = 1
fields = ("pk", "name", "image", "datetime", "address", "description", "is_active", "is_upcoming", "location")
c... | <commit_before>from .models import Event, EventActivity
from rest_framework import serializers
class EventSerializer(serializers.ModelSerializer):
class Meta(object):
model = Event
depth = 1
class EventSimpleSerializer(serializers.Serializer):
pk = serializers.IntegerField()
name = seria... | from .models import Event, EventActivity
from rest_framework import serializers
class EventSerializer(serializers.ModelSerializer):
class Meta(object):
model = Event
depth = 1
fields = ("pk", "name", "image", "datetime", "address", "description", "is_active", "is_upcoming", "location")
c... | from .models import Event, EventActivity
from rest_framework import serializers
class EventSerializer(serializers.ModelSerializer):
class Meta(object):
model = Event
depth = 1
class EventSimpleSerializer(serializers.Serializer):
pk = serializers.IntegerField()
name = serializers.CharFiel... | <commit_before>from .models import Event, EventActivity
from rest_framework import serializers
class EventSerializer(serializers.ModelSerializer):
class Meta(object):
model = Event
depth = 1
class EventSimpleSerializer(serializers.Serializer):
pk = serializers.IntegerField()
name = seria... |
512ab0b23963a3876b1747a1e5995cac9ce18c5d | tests/core/test_timers.py | tests/core/test_timers.py | # Module: test_timers
# Date: 10th February 2010
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Timers Tests"""
import pytest
from datetime import datetime, timedelta
from circuits import Event, Component, Timer
def pytest_funcarg__app(request):
return request.cached_setup(
... | # Module: test_timers
# Date: 10th February 2010
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Timers Tests"""
import pytest
from datetime import datetime, timedelta
from circuits import Event, Component, Timer
def pytest_funcarg__app(request):
return request.cached_setup(
... | Test fails on shining panda py32 only. May be a race condition (wait_for using same loop interval as timer interval). Checking in for testing. | Test fails on shining panda py32 only. May be a race condition (wait_for using same loop interval as timer interval). Checking in for testing.
| Python | mit | treemo/circuits,nizox/circuits,eriol/circuits,treemo/circuits,eriol/circuits,treemo/circuits,eriol/circuits | # Module: test_timers
# Date: 10th February 2010
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Timers Tests"""
import pytest
from datetime import datetime, timedelta
from circuits import Event, Component, Timer
def pytest_funcarg__app(request):
return request.cached_setup(
... | # Module: test_timers
# Date: 10th February 2010
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Timers Tests"""
import pytest
from datetime import datetime, timedelta
from circuits import Event, Component, Timer
def pytest_funcarg__app(request):
return request.cached_setup(
... | <commit_before># Module: test_timers
# Date: 10th February 2010
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Timers Tests"""
import pytest
from datetime import datetime, timedelta
from circuits import Event, Component, Timer
def pytest_funcarg__app(request):
return request.cached_... | # Module: test_timers
# Date: 10th February 2010
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Timers Tests"""
import pytest
from datetime import datetime, timedelta
from circuits import Event, Component, Timer
def pytest_funcarg__app(request):
return request.cached_setup(
... | # Module: test_timers
# Date: 10th February 2010
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Timers Tests"""
import pytest
from datetime import datetime, timedelta
from circuits import Event, Component, Timer
def pytest_funcarg__app(request):
return request.cached_setup(
... | <commit_before># Module: test_timers
# Date: 10th February 2010
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Timers Tests"""
import pytest
from datetime import datetime, timedelta
from circuits import Event, Component, Timer
def pytest_funcarg__app(request):
return request.cached_... |
16b663441c0d994b02e68b8c785ec6c7a2805f03 | onepercentclub/settings/payments.py | onepercentclub/settings/payments.py | from bluebottle.payments_docdata.settings import DOCDATA_SETTINGS, DOCDATA_PAYMENT_METHODS
PAYMENT_METHODS = DOCDATA_PAYMENT_METHODS
VAT_RATE = 0.21
| from bluebottle.payments_docdata.settings import DOCDATA_SETTINGS
PAYMENT_METHODS = (
{
'provider': 'docdata',
'id': 'docdata-ideal',
'profile': 'ideal',
'name': 'iDEAL',
'restricted_countries': ('NL', 'Netherlands'),
'supports_recurring': False,
},
{
... | Disable Paypal, up Direct debit | Disable Paypal, up Direct debit
| Python | bsd-3-clause | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | from bluebottle.payments_docdata.settings import DOCDATA_SETTINGS, DOCDATA_PAYMENT_METHODS
PAYMENT_METHODS = DOCDATA_PAYMENT_METHODS
VAT_RATE = 0.21
Disable Paypal, up Direct debit | from bluebottle.payments_docdata.settings import DOCDATA_SETTINGS
PAYMENT_METHODS = (
{
'provider': 'docdata',
'id': 'docdata-ideal',
'profile': 'ideal',
'name': 'iDEAL',
'restricted_countries': ('NL', 'Netherlands'),
'supports_recurring': False,
},
{
... | <commit_before>from bluebottle.payments_docdata.settings import DOCDATA_SETTINGS, DOCDATA_PAYMENT_METHODS
PAYMENT_METHODS = DOCDATA_PAYMENT_METHODS
VAT_RATE = 0.21
<commit_msg>Disable Paypal, up Direct debit<commit_after> | from bluebottle.payments_docdata.settings import DOCDATA_SETTINGS
PAYMENT_METHODS = (
{
'provider': 'docdata',
'id': 'docdata-ideal',
'profile': 'ideal',
'name': 'iDEAL',
'restricted_countries': ('NL', 'Netherlands'),
'supports_recurring': False,
},
{
... | from bluebottle.payments_docdata.settings import DOCDATA_SETTINGS, DOCDATA_PAYMENT_METHODS
PAYMENT_METHODS = DOCDATA_PAYMENT_METHODS
VAT_RATE = 0.21
Disable Paypal, up Direct debitfrom bluebottle.payments_docdata.settings import DOCDATA_SETTINGS
PAYMENT_METHODS = (
{
'provider': 'docdata',
'id': '... | <commit_before>from bluebottle.payments_docdata.settings import DOCDATA_SETTINGS, DOCDATA_PAYMENT_METHODS
PAYMENT_METHODS = DOCDATA_PAYMENT_METHODS
VAT_RATE = 0.21
<commit_msg>Disable Paypal, up Direct debit<commit_after>from bluebottle.payments_docdata.settings import DOCDATA_SETTINGS
PAYMENT_METHODS = (
{
... |
460460cb95906a71f66a969ab0f2e9d5285b4d21 | kokki/cookbooks/aws/recipes/default.py | kokki/cookbooks/aws/recipes/default.py |
import os
from kokki import *
# Package("python-boto")
Execute("pip install git+http://github.com/boto/boto.git#egg=boto",
not_if = 'python -c "import boto"')
Execute("mv /usr/lib/pymodules/python2.6/boto /tmp/boto.orig",
only_if = lambda:os.path.exists("/usr/lib/pymodules/python2.6/boto"))
# Mount volumes a... |
import os
from kokki import *
# Package("python-boto")
Execute("mv /usr/lib/pymodules/python2.6/boto /tmp/boto.orig",
only_if = lambda:os.path.exists("/usr/lib/pymodules/python2.6/boto"))
Execute("pip install git+http://github.com/boto/boto.git#egg=boto",
not_if = 'python -c "import boto"')
# Mount volumes a... | Update boto on the server | Update boto on the server
| Python | bsd-3-clause | samuel/kokki |
import os
from kokki import *
# Package("python-boto")
Execute("pip install git+http://github.com/boto/boto.git#egg=boto",
not_if = 'python -c "import boto"')
Execute("mv /usr/lib/pymodules/python2.6/boto /tmp/boto.orig",
only_if = lambda:os.path.exists("/usr/lib/pymodules/python2.6/boto"))
# Mount volumes a... |
import os
from kokki import *
# Package("python-boto")
Execute("mv /usr/lib/pymodules/python2.6/boto /tmp/boto.orig",
only_if = lambda:os.path.exists("/usr/lib/pymodules/python2.6/boto"))
Execute("pip install git+http://github.com/boto/boto.git#egg=boto",
not_if = 'python -c "import boto"')
# Mount volumes a... | <commit_before>
import os
from kokki import *
# Package("python-boto")
Execute("pip install git+http://github.com/boto/boto.git#egg=boto",
not_if = 'python -c "import boto"')
Execute("mv /usr/lib/pymodules/python2.6/boto /tmp/boto.orig",
only_if = lambda:os.path.exists("/usr/lib/pymodules/python2.6/boto"))
# ... |
import os
from kokki import *
# Package("python-boto")
Execute("mv /usr/lib/pymodules/python2.6/boto /tmp/boto.orig",
only_if = lambda:os.path.exists("/usr/lib/pymodules/python2.6/boto"))
Execute("pip install git+http://github.com/boto/boto.git#egg=boto",
not_if = 'python -c "import boto"')
# Mount volumes a... |
import os
from kokki import *
# Package("python-boto")
Execute("pip install git+http://github.com/boto/boto.git#egg=boto",
not_if = 'python -c "import boto"')
Execute("mv /usr/lib/pymodules/python2.6/boto /tmp/boto.orig",
only_if = lambda:os.path.exists("/usr/lib/pymodules/python2.6/boto"))
# Mount volumes a... | <commit_before>
import os
from kokki import *
# Package("python-boto")
Execute("pip install git+http://github.com/boto/boto.git#egg=boto",
not_if = 'python -c "import boto"')
Execute("mv /usr/lib/pymodules/python2.6/boto /tmp/boto.orig",
only_if = lambda:os.path.exists("/usr/lib/pymodules/python2.6/boto"))
# ... |
8e513a0d690bbd6db72d6745cc0f423355648cd4 | mysite/profile/management/commands/profile_hourly_tasks.py | mysite/profile/management/commands/profile_hourly_tasks.py | import datetime
import logging
from django.core.management.base import BaseCommand
import mysite.profile.tasks
import mysite.search.models
import mysite.search.tasks
## FIXME: Move to a search management command?
def periodically_check_if_bug_epoch_eclipsed_the_cached_search_epoch():
logging.info("Checking if bu... | import datetime
import logging
from django.core.management.base import BaseCommand
import mysite.profile.tasks
import mysite.search.models
import mysite.search.tasks
## FIXME: Move to a search management command?
def periodically_check_if_bug_epoch_eclipsed_the_cached_search_epoch():
logging.info("Checking if bu... | Revert "Remove apparently superfluous call to fill_recommended_bugs_cache." | Revert "Remove apparently superfluous call to fill_recommended_bugs_cache."
This reverts commit 83ca8575e68fe9b2b59431e73e94b3247e3485d4.
| Python | agpl-3.0 | onceuponatimeforever/oh-mainline,sudheesh001/oh-mainline,ehashman/oh-mainline,mzdaniel/oh-mainline,campbe13/openhatch,eeshangarg/oh-mainline,openhatch/oh-mainline,waseem18/oh-mainline,campbe13/openhatch,vipul-sharma20/oh-mainline,jledbetter/openhatch,mzdaniel/oh-mainline,willingc/oh-mainline,mzdaniel/oh-mainline,eeshan... | import datetime
import logging
from django.core.management.base import BaseCommand
import mysite.profile.tasks
import mysite.search.models
import mysite.search.tasks
## FIXME: Move to a search management command?
def periodically_check_if_bug_epoch_eclipsed_the_cached_search_epoch():
logging.info("Checking if bu... | import datetime
import logging
from django.core.management.base import BaseCommand
import mysite.profile.tasks
import mysite.search.models
import mysite.search.tasks
## FIXME: Move to a search management command?
def periodically_check_if_bug_epoch_eclipsed_the_cached_search_epoch():
logging.info("Checking if bu... | <commit_before>import datetime
import logging
from django.core.management.base import BaseCommand
import mysite.profile.tasks
import mysite.search.models
import mysite.search.tasks
## FIXME: Move to a search management command?
def periodically_check_if_bug_epoch_eclipsed_the_cached_search_epoch():
logging.info(... | import datetime
import logging
from django.core.management.base import BaseCommand
import mysite.profile.tasks
import mysite.search.models
import mysite.search.tasks
## FIXME: Move to a search management command?
def periodically_check_if_bug_epoch_eclipsed_the_cached_search_epoch():
logging.info("Checking if bu... | import datetime
import logging
from django.core.management.base import BaseCommand
import mysite.profile.tasks
import mysite.search.models
import mysite.search.tasks
## FIXME: Move to a search management command?
def periodically_check_if_bug_epoch_eclipsed_the_cached_search_epoch():
logging.info("Checking if bu... | <commit_before>import datetime
import logging
from django.core.management.base import BaseCommand
import mysite.profile.tasks
import mysite.search.models
import mysite.search.tasks
## FIXME: Move to a search management command?
def periodically_check_if_bug_epoch_eclipsed_the_cached_search_epoch():
logging.info(... |
b92c8145ac8073d2fd0c91446f8011ca2265708a | Winium/TestApp.Test/py-functional/config_silverlight.py | Winium/TestApp.Test/py-functional/config_silverlight.py | # coding: utf-8
import os
BUILD_CONFIG = os.environ.get('BUILD_CONFIG', 'Debug')
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
AUT_PATH = r"..\TestApp.Silverlight\Bin\x86\{0}\TestApp_{0}_x86.xap".format(BUILD_CONFIG)
DESIRED_CAPABILITIES = {
"deviceName": "Emulator 8.1",
"app": os.path.abspath(os.pat... | # coding: utf-8
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
CONFIG_IDENTIFIER = 'Release' if os.getenv('REMOTE_RUN') else 'Debug'
AUT_PATH = r"..\TestApp.Silverlight\Bin\{0}\TestApp_{0}_AnyCPU.xap".format(CONFIG_IDENTIFIER)
DESIRED_CAPABILITIES = {
"deviceName": "Emulator 8.1",
"app": os.p... | Fix app path for functional tests for silverlight | Fix app path for functional tests for silverlight
| Python | mpl-2.0 | 2gis/Winium.StoreApps,2gis/Winium.StoreApps | # coding: utf-8
import os
BUILD_CONFIG = os.environ.get('BUILD_CONFIG', 'Debug')
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
AUT_PATH = r"..\TestApp.Silverlight\Bin\x86\{0}\TestApp_{0}_x86.xap".format(BUILD_CONFIG)
DESIRED_CAPABILITIES = {
"deviceName": "Emulator 8.1",
"app": os.path.abspath(os.pat... | # coding: utf-8
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
CONFIG_IDENTIFIER = 'Release' if os.getenv('REMOTE_RUN') else 'Debug'
AUT_PATH = r"..\TestApp.Silverlight\Bin\{0}\TestApp_{0}_AnyCPU.xap".format(CONFIG_IDENTIFIER)
DESIRED_CAPABILITIES = {
"deviceName": "Emulator 8.1",
"app": os.p... | <commit_before># coding: utf-8
import os
BUILD_CONFIG = os.environ.get('BUILD_CONFIG', 'Debug')
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
AUT_PATH = r"..\TestApp.Silverlight\Bin\x86\{0}\TestApp_{0}_x86.xap".format(BUILD_CONFIG)
DESIRED_CAPABILITIES = {
"deviceName": "Emulator 8.1",
"app": os.path... | # coding: utf-8
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
CONFIG_IDENTIFIER = 'Release' if os.getenv('REMOTE_RUN') else 'Debug'
AUT_PATH = r"..\TestApp.Silverlight\Bin\{0}\TestApp_{0}_AnyCPU.xap".format(CONFIG_IDENTIFIER)
DESIRED_CAPABILITIES = {
"deviceName": "Emulator 8.1",
"app": os.p... | # coding: utf-8
import os
BUILD_CONFIG = os.environ.get('BUILD_CONFIG', 'Debug')
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
AUT_PATH = r"..\TestApp.Silverlight\Bin\x86\{0}\TestApp_{0}_x86.xap".format(BUILD_CONFIG)
DESIRED_CAPABILITIES = {
"deviceName": "Emulator 8.1",
"app": os.path.abspath(os.pat... | <commit_before># coding: utf-8
import os
BUILD_CONFIG = os.environ.get('BUILD_CONFIG', 'Debug')
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
AUT_PATH = r"..\TestApp.Silverlight\Bin\x86\{0}\TestApp_{0}_x86.xap".format(BUILD_CONFIG)
DESIRED_CAPABILITIES = {
"deviceName": "Emulator 8.1",
"app": os.path... |
f12b6383f5e18c8e76760f535c630bf256ec0f8a | incunafein/module/page/extensions/prepared_date.py | incunafein/module/page/extensions/prepared_date.py | from django.db import models
def register(cls, admin_cls):
cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True))
def getter():
if not cls._prepared_date:
try:
return cls.get_ancestors(ascending=True).filter(_prepared_date__isnull... | from django.db import models
def register(cls, admin_cls):
cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True))
def getter(obj):
if not obj._prepared_date:
try:
return obj.get_ancestors(ascending=True).filter(_prepared_date__isn... | Use the object instead of the class | Use the object instead of the class
| Python | bsd-2-clause | incuna/incuna-feincms,incuna/incuna-feincms,incuna/incuna-feincms | from django.db import models
def register(cls, admin_cls):
cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True))
def getter():
if not cls._prepared_date:
try:
return cls.get_ancestors(ascending=True).filter(_prepared_date__isnull... | from django.db import models
def register(cls, admin_cls):
cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True))
def getter(obj):
if not obj._prepared_date:
try:
return obj.get_ancestors(ascending=True).filter(_prepared_date__isn... | <commit_before>from django.db import models
def register(cls, admin_cls):
cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True))
def getter():
if not cls._prepared_date:
try:
return cls.get_ancestors(ascending=True).filter(_prepar... | from django.db import models
def register(cls, admin_cls):
cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True))
def getter(obj):
if not obj._prepared_date:
try:
return obj.get_ancestors(ascending=True).filter(_prepared_date__isn... | from django.db import models
def register(cls, admin_cls):
cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True))
def getter():
if not cls._prepared_date:
try:
return cls.get_ancestors(ascending=True).filter(_prepared_date__isnull... | <commit_before>from django.db import models
def register(cls, admin_cls):
cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True))
def getter():
if not cls._prepared_date:
try:
return cls.get_ancestors(ascending=True).filter(_prepar... |
f01f09cc9a6ba5afb6e4d59ad73dc5645693b672 | filepreviews/__init__.py | filepreviews/__init__.py | # -*- coding: utf-8 -*-
# flake8: noqa
"""
A Python library for FilePreview's API.
"""
__title__ = "filepreviews"
__version__ = "3.0.0"
__author__ = "José Padilla"
__license__ = "MIT"
__copyright__ = "Copyright 2015 Blimp LLC"
VERSION = __version__
API_URL = "https://api.filepreviews.io/v2"
from .api import FilePre... | # -*- coding: utf-8 -*-
# flake8: noqa
"""
A Python library for FilePreview's API.
"""
__title__ = "filepreviews"
__version__ = "3.0.0rc1"
__author__ = "José Padilla"
__license__ = "MIT"
__copyright__ = "Copyright 2015 Blimp LLC"
VERSION = __version__
API_URL = "https://api.filepreviews.io/v2"
from .api import File... | Bump up version to 3.0.0rc1 | Bump up version to 3.0.0rc1
| Python | mit | GetBlimp/filepreviews-python | # -*- coding: utf-8 -*-
# flake8: noqa
"""
A Python library for FilePreview's API.
"""
__title__ = "filepreviews"
__version__ = "3.0.0"
__author__ = "José Padilla"
__license__ = "MIT"
__copyright__ = "Copyright 2015 Blimp LLC"
VERSION = __version__
API_URL = "https://api.filepreviews.io/v2"
from .api import FilePre... | # -*- coding: utf-8 -*-
# flake8: noqa
"""
A Python library for FilePreview's API.
"""
__title__ = "filepreviews"
__version__ = "3.0.0rc1"
__author__ = "José Padilla"
__license__ = "MIT"
__copyright__ = "Copyright 2015 Blimp LLC"
VERSION = __version__
API_URL = "https://api.filepreviews.io/v2"
from .api import File... | <commit_before># -*- coding: utf-8 -*-
# flake8: noqa
"""
A Python library for FilePreview's API.
"""
__title__ = "filepreviews"
__version__ = "3.0.0"
__author__ = "José Padilla"
__license__ = "MIT"
__copyright__ = "Copyright 2015 Blimp LLC"
VERSION = __version__
API_URL = "https://api.filepreviews.io/v2"
from .api... | # -*- coding: utf-8 -*-
# flake8: noqa
"""
A Python library for FilePreview's API.
"""
__title__ = "filepreviews"
__version__ = "3.0.0rc1"
__author__ = "José Padilla"
__license__ = "MIT"
__copyright__ = "Copyright 2015 Blimp LLC"
VERSION = __version__
API_URL = "https://api.filepreviews.io/v2"
from .api import File... | # -*- coding: utf-8 -*-
# flake8: noqa
"""
A Python library for FilePreview's API.
"""
__title__ = "filepreviews"
__version__ = "3.0.0"
__author__ = "José Padilla"
__license__ = "MIT"
__copyright__ = "Copyright 2015 Blimp LLC"
VERSION = __version__
API_URL = "https://api.filepreviews.io/v2"
from .api import FilePre... | <commit_before># -*- coding: utf-8 -*-
# flake8: noqa
"""
A Python library for FilePreview's API.
"""
__title__ = "filepreviews"
__version__ = "3.0.0"
__author__ = "José Padilla"
__license__ = "MIT"
__copyright__ = "Copyright 2015 Blimp LLC"
VERSION = __version__
API_URL = "https://api.filepreviews.io/v2"
from .api... |
5ac176fafd35bfa675e1718b74a8c6ef4dc74629 | skoleintra/pgWeekplans.py | skoleintra/pgWeekplans.py | #
# -*- encoding: utf-8 -*-
#
import re
import config
import surllib
import semail
import datetime
import urllib
URL_PREFIX = 'http://%s/Infoweb/Fi/' % config.HOSTNAME
URL_MAIN = URL_PREFIX + 'Ugeplaner.asp'
def docFindWeekplans(bs):
trs = bs.findAll('tr')
for line in trs:
if not line.has_key('clas... | #
# -*- encoding: utf-8 -*-
#
import re
import config
import surllib
import semail
import datetime
import urllib
URL_PREFIX = 'http://%s/Infoweb/Fi/' % config.HOSTNAME
URL_MAIN = URL_PREFIX + 'Ugeplaner.asp'
def docFindWeekplans(bs):
trs = bs.findAll('tr')
for line in trs:
if not line.has_key('cla... | Make code comply to PEP8 | Make code comply to PEP8
| Python | bsd-2-clause | bennyslbs/fskintra | #
# -*- encoding: utf-8 -*-
#
import re
import config
import surllib
import semail
import datetime
import urllib
URL_PREFIX = 'http://%s/Infoweb/Fi/' % config.HOSTNAME
URL_MAIN = URL_PREFIX + 'Ugeplaner.asp'
def docFindWeekplans(bs):
trs = bs.findAll('tr')
for line in trs:
if not line.has_key('clas... | #
# -*- encoding: utf-8 -*-
#
import re
import config
import surllib
import semail
import datetime
import urllib
URL_PREFIX = 'http://%s/Infoweb/Fi/' % config.HOSTNAME
URL_MAIN = URL_PREFIX + 'Ugeplaner.asp'
def docFindWeekplans(bs):
trs = bs.findAll('tr')
for line in trs:
if not line.has_key('cla... | <commit_before>#
# -*- encoding: utf-8 -*-
#
import re
import config
import surllib
import semail
import datetime
import urllib
URL_PREFIX = 'http://%s/Infoweb/Fi/' % config.HOSTNAME
URL_MAIN = URL_PREFIX + 'Ugeplaner.asp'
def docFindWeekplans(bs):
trs = bs.findAll('tr')
for line in trs:
if not lin... | #
# -*- encoding: utf-8 -*-
#
import re
import config
import surllib
import semail
import datetime
import urllib
URL_PREFIX = 'http://%s/Infoweb/Fi/' % config.HOSTNAME
URL_MAIN = URL_PREFIX + 'Ugeplaner.asp'
def docFindWeekplans(bs):
trs = bs.findAll('tr')
for line in trs:
if not line.has_key('cla... | #
# -*- encoding: utf-8 -*-
#
import re
import config
import surllib
import semail
import datetime
import urllib
URL_PREFIX = 'http://%s/Infoweb/Fi/' % config.HOSTNAME
URL_MAIN = URL_PREFIX + 'Ugeplaner.asp'
def docFindWeekplans(bs):
trs = bs.findAll('tr')
for line in trs:
if not line.has_key('clas... | <commit_before>#
# -*- encoding: utf-8 -*-
#
import re
import config
import surllib
import semail
import datetime
import urllib
URL_PREFIX = 'http://%s/Infoweb/Fi/' % config.HOSTNAME
URL_MAIN = URL_PREFIX + 'Ugeplaner.asp'
def docFindWeekplans(bs):
trs = bs.findAll('tr')
for line in trs:
if not lin... |
e3a3e729eb60f5a7e134da5b58bb52d672e1d8b2 | sitenco/config/sphinx.py | sitenco/config/sphinx.py | """
Docs with Sphinx.
"""
import sys
import abc
import os.path
import subprocess
from . import vcs
from .. import DOCS_PATH
class Sphinx(vcs.VCS):
"""Abstract class for project folder tools."""
__metaclass__ = abc.ABCMeta
def __init__(self, path, branch='master', url=None):
path = os.path.join... | """
Docs with Sphinx.
"""
import sys
import abc
import os.path
import subprocess
from . import vcs
from .. import DOCS_PATH
class Sphinx(vcs.VCS):
"""Abstract class for project folder tools."""
__metaclass__ = abc.ABCMeta
def __init__(self, path, branch='master', url=None):
path = os.path.join... | Use python interpreter instead of sys.executable | Use python interpreter instead of sys.executable
| Python | bsd-3-clause | Kozea/sitenco | """
Docs with Sphinx.
"""
import sys
import abc
import os.path
import subprocess
from . import vcs
from .. import DOCS_PATH
class Sphinx(vcs.VCS):
"""Abstract class for project folder tools."""
__metaclass__ = abc.ABCMeta
def __init__(self, path, branch='master', url=None):
path = os.path.join... | """
Docs with Sphinx.
"""
import sys
import abc
import os.path
import subprocess
from . import vcs
from .. import DOCS_PATH
class Sphinx(vcs.VCS):
"""Abstract class for project folder tools."""
__metaclass__ = abc.ABCMeta
def __init__(self, path, branch='master', url=None):
path = os.path.join... | <commit_before>"""
Docs with Sphinx.
"""
import sys
import abc
import os.path
import subprocess
from . import vcs
from .. import DOCS_PATH
class Sphinx(vcs.VCS):
"""Abstract class for project folder tools."""
__metaclass__ = abc.ABCMeta
def __init__(self, path, branch='master', url=None):
path... | """
Docs with Sphinx.
"""
import sys
import abc
import os.path
import subprocess
from . import vcs
from .. import DOCS_PATH
class Sphinx(vcs.VCS):
"""Abstract class for project folder tools."""
__metaclass__ = abc.ABCMeta
def __init__(self, path, branch='master', url=None):
path = os.path.join... | """
Docs with Sphinx.
"""
import sys
import abc
import os.path
import subprocess
from . import vcs
from .. import DOCS_PATH
class Sphinx(vcs.VCS):
"""Abstract class for project folder tools."""
__metaclass__ = abc.ABCMeta
def __init__(self, path, branch='master', url=None):
path = os.path.join... | <commit_before>"""
Docs with Sphinx.
"""
import sys
import abc
import os.path
import subprocess
from . import vcs
from .. import DOCS_PATH
class Sphinx(vcs.VCS):
"""Abstract class for project folder tools."""
__metaclass__ = abc.ABCMeta
def __init__(self, path, branch='master', url=None):
path... |
3ed6e31cecab4166220a9fb20fe603b71946ab9c | every_election/apps/election_snooper/views.py | every_election/apps/election_snooper/views.py | from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from election_snooper.models import SnoopedElection
from election_snooper.forms import ReviewElectionForm
class SnoopedElectionView(TemplateView):
template_name = "election_snoo... | from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from election_snooper.models import SnoopedElection
from election_snooper.forms import ReviewElectionForm
class SnoopedElectionView(TemplateView):
template_name = "election_snoo... | Order radar view more sensibly | Order radar view more sensibly
1. Sort with by date_seen DESC so new stuff is at the top
and old stuff is at the bottom
2. Sort by id as secondary criteria so order is consistent
otherwise the order changes a bit every time we make an edit
| Python | bsd-3-clause | DemocracyClub/EveryElection,DemocracyClub/EveryElection,DemocracyClub/EveryElection | from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from election_snooper.models import SnoopedElection
from election_snooper.forms import ReviewElectionForm
class SnoopedElectionView(TemplateView):
template_name = "election_snoo... | from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from election_snooper.models import SnoopedElection
from election_snooper.forms import ReviewElectionForm
class SnoopedElectionView(TemplateView):
template_name = "election_snoo... | <commit_before>from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from election_snooper.models import SnoopedElection
from election_snooper.forms import ReviewElectionForm
class SnoopedElectionView(TemplateView):
template_name =... | from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from election_snooper.models import SnoopedElection
from election_snooper.forms import ReviewElectionForm
class SnoopedElectionView(TemplateView):
template_name = "election_snoo... | from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from election_snooper.models import SnoopedElection
from election_snooper.forms import ReviewElectionForm
class SnoopedElectionView(TemplateView):
template_name = "election_snoo... | <commit_before>from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from election_snooper.models import SnoopedElection
from election_snooper.forms import ReviewElectionForm
class SnoopedElectionView(TemplateView):
template_name =... |
73c904fffaa5e123b8e5dffcb93321defc684709 | tests/testapp/home/templatetags/pretty_tags.py | tests/testapp/home/templatetags/pretty_tags.py | import json
from bs4 import BeautifulSoup
from django import template
register = template.Library()
@register.filter
def pretty_json(data):
if isinstance(data, str):
data = json.loads(data)
return json.dumps(data, indent=4)
@register.filter
def pretty_html(data):
soup = BeautifulSoup(data, 'h... | from __future__ import absolute_import, unicode_literals
import json
from bs4 import BeautifulSoup
from django import template
register = template.Library()
@register.filter
def pretty_json(data):
if isinstance(data, str):
data = json.loads(data)
return json.dumps(data, indent=4)
@register.filte... | Add missing import path failing linting | Add missing import path failing linting
| Python | mit | springload/wagtaildraftail,gasman/wagtaildraftail,gasman/wagtaildraftail,gasman/wagtaildraftail,springload/wagtaildraftail,gasman/wagtaildraftail,springload/wagtaildraftail,springload/wagtaildraftail | import json
from bs4 import BeautifulSoup
from django import template
register = template.Library()
@register.filter
def pretty_json(data):
if isinstance(data, str):
data = json.loads(data)
return json.dumps(data, indent=4)
@register.filter
def pretty_html(data):
soup = BeautifulSoup(data, 'h... | from __future__ import absolute_import, unicode_literals
import json
from bs4 import BeautifulSoup
from django import template
register = template.Library()
@register.filter
def pretty_json(data):
if isinstance(data, str):
data = json.loads(data)
return json.dumps(data, indent=4)
@register.filte... | <commit_before>import json
from bs4 import BeautifulSoup
from django import template
register = template.Library()
@register.filter
def pretty_json(data):
if isinstance(data, str):
data = json.loads(data)
return json.dumps(data, indent=4)
@register.filter
def pretty_html(data):
soup = Beautif... | from __future__ import absolute_import, unicode_literals
import json
from bs4 import BeautifulSoup
from django import template
register = template.Library()
@register.filter
def pretty_json(data):
if isinstance(data, str):
data = json.loads(data)
return json.dumps(data, indent=4)
@register.filte... | import json
from bs4 import BeautifulSoup
from django import template
register = template.Library()
@register.filter
def pretty_json(data):
if isinstance(data, str):
data = json.loads(data)
return json.dumps(data, indent=4)
@register.filter
def pretty_html(data):
soup = BeautifulSoup(data, 'h... | <commit_before>import json
from bs4 import BeautifulSoup
from django import template
register = template.Library()
@register.filter
def pretty_json(data):
if isinstance(data, str):
data = json.loads(data)
return json.dumps(data, indent=4)
@register.filter
def pretty_html(data):
soup = Beautif... |
9cb56923ba57fec79a8efd4919315910f82f5da1 | angr/engines/soot/expressions/phi.py | angr/engines/soot/expressions/phi.py |
import logging
from .base import SimSootExpr
l = logging.getLogger('angr.engines.soot.expressions.phi')
class SimSootExpr_Phi(SimSootExpr):
def _execute(self):
local = [self._translate_value(v) for v, idx in self.expr.values if idx == self.state.scratch.source.block_idx][0]
value = self.state.m... |
import logging
from .base import SimSootExpr
l = logging.getLogger('angr.engines.soot.expressions.phi')
class SimSootExpr_Phi(SimSootExpr):
def _execute(self):
try:
local = [self._translate_value(v) for v, idx in self.expr.values if idx == self.state.scratch.source.block_idx][0]
... | Add heuristic when Phi expr fails | Add heuristic when Phi expr fails
| Python | bsd-2-clause | iamahuman/angr,schieb/angr,iamahuman/angr,angr/angr,iamahuman/angr,schieb/angr,angr/angr,angr/angr,schieb/angr |
import logging
from .base import SimSootExpr
l = logging.getLogger('angr.engines.soot.expressions.phi')
class SimSootExpr_Phi(SimSootExpr):
def _execute(self):
local = [self._translate_value(v) for v, idx in self.expr.values if idx == self.state.scratch.source.block_idx][0]
value = self.state.m... |
import logging
from .base import SimSootExpr
l = logging.getLogger('angr.engines.soot.expressions.phi')
class SimSootExpr_Phi(SimSootExpr):
def _execute(self):
try:
local = [self._translate_value(v) for v, idx in self.expr.values if idx == self.state.scratch.source.block_idx][0]
... | <commit_before>
import logging
from .base import SimSootExpr
l = logging.getLogger('angr.engines.soot.expressions.phi')
class SimSootExpr_Phi(SimSootExpr):
def _execute(self):
local = [self._translate_value(v) for v, idx in self.expr.values if idx == self.state.scratch.source.block_idx][0]
value... |
import logging
from .base import SimSootExpr
l = logging.getLogger('angr.engines.soot.expressions.phi')
class SimSootExpr_Phi(SimSootExpr):
def _execute(self):
try:
local = [self._translate_value(v) for v, idx in self.expr.values if idx == self.state.scratch.source.block_idx][0]
... |
import logging
from .base import SimSootExpr
l = logging.getLogger('angr.engines.soot.expressions.phi')
class SimSootExpr_Phi(SimSootExpr):
def _execute(self):
local = [self._translate_value(v) for v, idx in self.expr.values if idx == self.state.scratch.source.block_idx][0]
value = self.state.m... | <commit_before>
import logging
from .base import SimSootExpr
l = logging.getLogger('angr.engines.soot.expressions.phi')
class SimSootExpr_Phi(SimSootExpr):
def _execute(self):
local = [self._translate_value(v) for v, idx in self.expr.values if idx == self.state.scratch.source.block_idx][0]
value... |
cb69adc8727048ac9e1f7a1205a0f1b5ed269dad | Native/Scripts/finalize.py | Native/Scripts/finalize.py |
# This script just copies the generated .pyd file to the current directory.
import platform
from shutil import copyfile
from os.path import isfile
source_file = None
if platform.system() == "Windows":
possible_files = [
"Windows/Release/RSNative.pyd",
"Windows/x64/Release/RSNative.pyd",
]
... |
# This script just copies the generated .pyd file to the current directory.
import platform
from shutil import copyfile
from os.path import isfile
source_file = None
if platform.system() == "Windows":
possible_files = [
"Windows/Release/RSNative.pyd",
"Windows/x64/Release/RSNative.pyd",
]
... | Fix typo in build system | Fix typo in build system
| Python | mit | croxis/SpaceDrive,eswartz/RenderPipeline,eswartz/RenderPipeline,croxis/SpaceDrive,croxis/SpaceDrive,eswartz/RenderPipeline |
# This script just copies the generated .pyd file to the current directory.
import platform
from shutil import copyfile
from os.path import isfile
source_file = None
if platform.system() == "Windows":
possible_files = [
"Windows/Release/RSNative.pyd",
"Windows/x64/Release/RSNative.pyd",
]
... |
# This script just copies the generated .pyd file to the current directory.
import platform
from shutil import copyfile
from os.path import isfile
source_file = None
if platform.system() == "Windows":
possible_files = [
"Windows/Release/RSNative.pyd",
"Windows/x64/Release/RSNative.pyd",
]
... | <commit_before>
# This script just copies the generated .pyd file to the current directory.
import platform
from shutil import copyfile
from os.path import isfile
source_file = None
if platform.system() == "Windows":
possible_files = [
"Windows/Release/RSNative.pyd",
"Windows/x64/Release/RSNativ... |
# This script just copies the generated .pyd file to the current directory.
import platform
from shutil import copyfile
from os.path import isfile
source_file = None
if platform.system() == "Windows":
possible_files = [
"Windows/Release/RSNative.pyd",
"Windows/x64/Release/RSNative.pyd",
]
... |
# This script just copies the generated .pyd file to the current directory.
import platform
from shutil import copyfile
from os.path import isfile
source_file = None
if platform.system() == "Windows":
possible_files = [
"Windows/Release/RSNative.pyd",
"Windows/x64/Release/RSNative.pyd",
]
... | <commit_before>
# This script just copies the generated .pyd file to the current directory.
import platform
from shutil import copyfile
from os.path import isfile
source_file = None
if platform.system() == "Windows":
possible_files = [
"Windows/Release/RSNative.pyd",
"Windows/x64/Release/RSNativ... |
33cf4e996d1ff230ae7e8a55e57f0bd5a046ea0f | dlstats/configuration.py | dlstats/configuration.py | import configobj
import validate
import os
def _get_filename():
"""Return the configuration file path."""
appname = 'dlstats'
if os.name == 'posix':
if os.path.isfile(os.environ["HOME"]+'/.'+appname):
return os.environ["HOME"]+'/.'+appname
elif os.path.isfile('/etc/'+appname):
... | import configobj
import validate
import os
def _get_filename():
"""Return the configuration file path."""
appname = 'dlstats'
if os.name == 'posix':
if os.path.isfile(os.environ["HOME"]+'/.'+appname):
return os.environ["HOME"]+'/.'+appname
elif os.path.isfile('/etc/'+appname):
... | Remove copy from the validator | Remove copy from the validator
We are not providing default values to the configuration object. Those
are distributed with the package; the expected behavior is to throw an
exception if the options are not explicitly passed.
| Python | agpl-3.0 | MichelJuillard/dlstats,Widukind/dlstats,mmalter/dlstats,Widukind/dlstats,MichelJuillard/dlstats,mmalter/dlstats,mmalter/dlstats,MichelJuillard/dlstats | import configobj
import validate
import os
def _get_filename():
"""Return the configuration file path."""
appname = 'dlstats'
if os.name == 'posix':
if os.path.isfile(os.environ["HOME"]+'/.'+appname):
return os.environ["HOME"]+'/.'+appname
elif os.path.isfile('/etc/'+appname):
... | import configobj
import validate
import os
def _get_filename():
"""Return the configuration file path."""
appname = 'dlstats'
if os.name == 'posix':
if os.path.isfile(os.environ["HOME"]+'/.'+appname):
return os.environ["HOME"]+'/.'+appname
elif os.path.isfile('/etc/'+appname):
... | <commit_before>import configobj
import validate
import os
def _get_filename():
"""Return the configuration file path."""
appname = 'dlstats'
if os.name == 'posix':
if os.path.isfile(os.environ["HOME"]+'/.'+appname):
return os.environ["HOME"]+'/.'+appname
elif os.path.isfile('/et... | import configobj
import validate
import os
def _get_filename():
"""Return the configuration file path."""
appname = 'dlstats'
if os.name == 'posix':
if os.path.isfile(os.environ["HOME"]+'/.'+appname):
return os.environ["HOME"]+'/.'+appname
elif os.path.isfile('/etc/'+appname):
... | import configobj
import validate
import os
def _get_filename():
"""Return the configuration file path."""
appname = 'dlstats'
if os.name == 'posix':
if os.path.isfile(os.environ["HOME"]+'/.'+appname):
return os.environ["HOME"]+'/.'+appname
elif os.path.isfile('/etc/'+appname):
... | <commit_before>import configobj
import validate
import os
def _get_filename():
"""Return the configuration file path."""
appname = 'dlstats'
if os.name == 'posix':
if os.path.isfile(os.environ["HOME"]+'/.'+appname):
return os.environ["HOME"]+'/.'+appname
elif os.path.isfile('/et... |
f0c53900a62159249240dedc486678d451932cb1 | opps/articles/tests/models.py | opps/articles/tests/models.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
from django.core.files import File
from opps.articles.models import Post
from opps.channels.models import Channel
from opps.images.models import Ima... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from opps.articles.models import Post
class PostModelTest(TestCase):
fixtures = ['tests/initial_data.json']
def test_basic_post_exist(self):
post = Post.objects.all()
self.assertTrue(post)
self.assertEqu... | Fix articles test, used test initial_data | Fix articles test, used test initial_data
| Python | mit | williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,williamroot/opps,opps/opps,opps/opps,opps/opps,YACOWS/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
from django.core.files import File
from opps.articles.models import Post
from opps.channels.models import Channel
from opps.images.models import Ima... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from opps.articles.models import Post
class PostModelTest(TestCase):
fixtures = ['tests/initial_data.json']
def test_basic_post_exist(self):
post = Post.objects.all()
self.assertTrue(post)
self.assertEqu... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
from django.core.files import File
from opps.articles.models import Post
from opps.channels.models import Channel
from opps.images.mo... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from opps.articles.models import Post
class PostModelTest(TestCase):
fixtures = ['tests/initial_data.json']
def test_basic_post_exist(self):
post = Post.objects.all()
self.assertTrue(post)
self.assertEqu... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
from django.core.files import File
from opps.articles.models import Post
from opps.channels.models import Channel
from opps.images.models import Ima... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.test import TestCase
from django.contrib.sites.models import Site
from django.contrib.auth import get_user_model
from django.core.files import File
from opps.articles.models import Post
from opps.channels.models import Channel
from opps.images.mo... |
daf6468079e7ff3e00550db0f3a16bc109184027 | osgtest/tests/test_49_jobs.py | osgtest/tests/test_49_jobs.py | #pylint: disable=C0301
#pylint: disable=C0111
#pylint: disable=R0201
#pylint: disable=R0904
import osgtest.library.core as core
import osgtest.library.files as files
import osgtest.library.osgunittest as osgunittest
class TestCleanupJobs(osgunittest.OSGTestCase):
"""Clean any configuration we touched for running ... | #pylint: disable=C0301
#pylint: disable=C0111
#pylint: disable=R0201
#pylint: disable=R0904
import osgtest.library.core as core
import osgtest.library.files as files
import osgtest.library.osgunittest as osgunittest
class TestCleanupJobs(osgunittest.OSGTestCase):
"""Clean any configuration we touched for running ... | Drop job env backup cleanup dependence on osg-configure | Drop job env backup cleanup dependence on osg-configure
We already dropped the creation of the job env files in 840ea8
| Python | apache-2.0 | efajardo/osg-test,efajardo/osg-test | #pylint: disable=C0301
#pylint: disable=C0111
#pylint: disable=R0201
#pylint: disable=R0904
import osgtest.library.core as core
import osgtest.library.files as files
import osgtest.library.osgunittest as osgunittest
class TestCleanupJobs(osgunittest.OSGTestCase):
"""Clean any configuration we touched for running ... | #pylint: disable=C0301
#pylint: disable=C0111
#pylint: disable=R0201
#pylint: disable=R0904
import osgtest.library.core as core
import osgtest.library.files as files
import osgtest.library.osgunittest as osgunittest
class TestCleanupJobs(osgunittest.OSGTestCase):
"""Clean any configuration we touched for running ... | <commit_before>#pylint: disable=C0301
#pylint: disable=C0111
#pylint: disable=R0201
#pylint: disable=R0904
import osgtest.library.core as core
import osgtest.library.files as files
import osgtest.library.osgunittest as osgunittest
class TestCleanupJobs(osgunittest.OSGTestCase):
"""Clean any configuration we touch... | #pylint: disable=C0301
#pylint: disable=C0111
#pylint: disable=R0201
#pylint: disable=R0904
import osgtest.library.core as core
import osgtest.library.files as files
import osgtest.library.osgunittest as osgunittest
class TestCleanupJobs(osgunittest.OSGTestCase):
"""Clean any configuration we touched for running ... | #pylint: disable=C0301
#pylint: disable=C0111
#pylint: disable=R0201
#pylint: disable=R0904
import osgtest.library.core as core
import osgtest.library.files as files
import osgtest.library.osgunittest as osgunittest
class TestCleanupJobs(osgunittest.OSGTestCase):
"""Clean any configuration we touched for running ... | <commit_before>#pylint: disable=C0301
#pylint: disable=C0111
#pylint: disable=R0201
#pylint: disable=R0904
import osgtest.library.core as core
import osgtest.library.files as files
import osgtest.library.osgunittest as osgunittest
class TestCleanupJobs(osgunittest.OSGTestCase):
"""Clean any configuration we touch... |
97e60ffa741bafbd34bcee18d0dce9f323b0132a | project/settings/prod.py | project/settings/prod.py | # Local
from .base import *
# Heroku Settings
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True
ALLOWED_HOSTS = [
'.barberscore.com',
'.herokuapp.com',
]
DATABASES['default']['TEST'] = {
'NAME': DATABASES['default']['NAME'],
}
# Email
EMAIL_HOST = 'smtp.sendgrid.ne... | # Local
from .base import *
# Heroku Settings
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True
ALLOWED_HOSTS = [
'testserver',
'.barberscore.com',
'.herokuapp.com',
]
DATABASES['default']['TEST'] = {
'NAME': DATABASES['default']['NAME'],
}
# Email
EMAIL_HOST =... | TEst adding test server to allowed hosts | TEst adding test server to allowed hosts
| Python | bsd-2-clause | dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore-django | # Local
from .base import *
# Heroku Settings
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True
ALLOWED_HOSTS = [
'.barberscore.com',
'.herokuapp.com',
]
DATABASES['default']['TEST'] = {
'NAME': DATABASES['default']['NAME'],
}
# Email
EMAIL_HOST = 'smtp.sendgrid.ne... | # Local
from .base import *
# Heroku Settings
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True
ALLOWED_HOSTS = [
'testserver',
'.barberscore.com',
'.herokuapp.com',
]
DATABASES['default']['TEST'] = {
'NAME': DATABASES['default']['NAME'],
}
# Email
EMAIL_HOST =... | <commit_before># Local
from .base import *
# Heroku Settings
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True
ALLOWED_HOSTS = [
'.barberscore.com',
'.herokuapp.com',
]
DATABASES['default']['TEST'] = {
'NAME': DATABASES['default']['NAME'],
}
# Email
EMAIL_HOST = 's... | # Local
from .base import *
# Heroku Settings
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True
ALLOWED_HOSTS = [
'testserver',
'.barberscore.com',
'.herokuapp.com',
]
DATABASES['default']['TEST'] = {
'NAME': DATABASES['default']['NAME'],
}
# Email
EMAIL_HOST =... | # Local
from .base import *
# Heroku Settings
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True
ALLOWED_HOSTS = [
'.barberscore.com',
'.herokuapp.com',
]
DATABASES['default']['TEST'] = {
'NAME': DATABASES['default']['NAME'],
}
# Email
EMAIL_HOST = 'smtp.sendgrid.ne... | <commit_before># Local
from .base import *
# Heroku Settings
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True
ALLOWED_HOSTS = [
'.barberscore.com',
'.herokuapp.com',
]
DATABASES['default']['TEST'] = {
'NAME': DATABASES['default']['NAME'],
}
# Email
EMAIL_HOST = 's... |
23d3bd38fc9ee94a4f9a9e829473007354a534ed | auditlog/__manifest__.py | auditlog/__manifest__.py | # -*- coding: utf-8 -*-
# © 2015 ABF OSIELL <http://osiell.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': "Audit Log",
'version': "9.0.1.0.0",
'author': "ABF OSIELL,Odoo Community Association (OCA)",
'license': "AGPL-3",
'website': "http://www.osiell.com",
'categ... | # -*- coding: utf-8 -*-
# © 2015 ABF OSIELL <http://osiell.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': "Audit Log",
'version': "9.0.1.0.0",
'author': "ABF OSIELL,Odoo Community Association (OCA)",
'license': "AGPL-3",
'website': "http://www.osiell.com",
'categ... | Remove pre_init_hook reference from openerp, no pre_init hook exists any more | auditlog: Remove pre_init_hook reference from openerp, no pre_init hook exists any more
| Python | agpl-3.0 | YannickB/server-tools,YannickB/server-tools,OCA/server-tools,OCA/server-tools,YannickB/server-tools,OCA/server-tools | # -*- coding: utf-8 -*-
# © 2015 ABF OSIELL <http://osiell.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': "Audit Log",
'version': "9.0.1.0.0",
'author': "ABF OSIELL,Odoo Community Association (OCA)",
'license': "AGPL-3",
'website': "http://www.osiell.com",
'categ... | # -*- coding: utf-8 -*-
# © 2015 ABF OSIELL <http://osiell.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': "Audit Log",
'version': "9.0.1.0.0",
'author': "ABF OSIELL,Odoo Community Association (OCA)",
'license': "AGPL-3",
'website': "http://www.osiell.com",
'categ... | <commit_before># -*- coding: utf-8 -*-
# © 2015 ABF OSIELL <http://osiell.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': "Audit Log",
'version': "9.0.1.0.0",
'author': "ABF OSIELL,Odoo Community Association (OCA)",
'license': "AGPL-3",
'website': "http://www.osiell.c... | # -*- coding: utf-8 -*-
# © 2015 ABF OSIELL <http://osiell.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': "Audit Log",
'version': "9.0.1.0.0",
'author': "ABF OSIELL,Odoo Community Association (OCA)",
'license': "AGPL-3",
'website': "http://www.osiell.com",
'categ... | # -*- coding: utf-8 -*-
# © 2015 ABF OSIELL <http://osiell.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': "Audit Log",
'version': "9.0.1.0.0",
'author': "ABF OSIELL,Odoo Community Association (OCA)",
'license': "AGPL-3",
'website': "http://www.osiell.com",
'categ... | <commit_before># -*- coding: utf-8 -*-
# © 2015 ABF OSIELL <http://osiell.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': "Audit Log",
'version': "9.0.1.0.0",
'author': "ABF OSIELL,Odoo Community Association (OCA)",
'license': "AGPL-3",
'website': "http://www.osiell.c... |
1ba0d9a4f445b68d19105f405be223e44eb524af | webant/webserver_utils.py | webant/webserver_utils.py | '''
This module provides some function to make running a webserver a little easier
'''
def gevent_run(app):
from gevent.wsgi import WSGIServer
import gevent.monkey
from werkzeug.debug import DebuggedApplication
gevent.monkey.patch_socket()
run_app = app
if app.config['DEBUG']:
run_app ... | '''
This module provides some function to make running a webserver a little easier
'''
def gevent_run(app):
from gevent.wsgi import WSGIServer
import gevent.monkey
from werkzeug.debug import DebuggedApplication
gevent.monkey.patch_socket()
run_app = app
if app.config['DEBUG']:
run_app ... | Use custom logger on gevent>=1.1 | Use custom logger on gevent>=1.1
| Python | agpl-3.0 | leophys/libreant,insomnia-lab/libreant,leophys/libreant,insomnia-lab/libreant,insomnia-lab/libreant,insomnia-lab/libreant,leophys/libreant,leophys/libreant | '''
This module provides some function to make running a webserver a little easier
'''
def gevent_run(app):
from gevent.wsgi import WSGIServer
import gevent.monkey
from werkzeug.debug import DebuggedApplication
gevent.monkey.patch_socket()
run_app = app
if app.config['DEBUG']:
run_app ... | '''
This module provides some function to make running a webserver a little easier
'''
def gevent_run(app):
from gevent.wsgi import WSGIServer
import gevent.monkey
from werkzeug.debug import DebuggedApplication
gevent.monkey.patch_socket()
run_app = app
if app.config['DEBUG']:
run_app ... | <commit_before>'''
This module provides some function to make running a webserver a little easier
'''
def gevent_run(app):
from gevent.wsgi import WSGIServer
import gevent.monkey
from werkzeug.debug import DebuggedApplication
gevent.monkey.patch_socket()
run_app = app
if app.config['DEBUG']:
... | '''
This module provides some function to make running a webserver a little easier
'''
def gevent_run(app):
from gevent.wsgi import WSGIServer
import gevent.monkey
from werkzeug.debug import DebuggedApplication
gevent.monkey.patch_socket()
run_app = app
if app.config['DEBUG']:
run_app ... | '''
This module provides some function to make running a webserver a little easier
'''
def gevent_run(app):
from gevent.wsgi import WSGIServer
import gevent.monkey
from werkzeug.debug import DebuggedApplication
gevent.monkey.patch_socket()
run_app = app
if app.config['DEBUG']:
run_app ... | <commit_before>'''
This module provides some function to make running a webserver a little easier
'''
def gevent_run(app):
from gevent.wsgi import WSGIServer
import gevent.monkey
from werkzeug.debug import DebuggedApplication
gevent.monkey.patch_socket()
run_app = app
if app.config['DEBUG']:
... |
cc741215fa5ff6a2a64d7bee3ff6108a4d85a16f | bootstrap3/components.py | bootstrap3/components.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms.widgets import flatatt
from django.utils.safestring import mark_safe
from bootstrap3.utils import render_tag
from .text import text_value
def render_icon(icon, title=''):
"""
Render a Bootstrap glyphicon icon
"""
attrs... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms.widgets import flatatt
from django.utils.safestring import mark_safe
from bootstrap3.utils import render_tag
from .text import text_value
def render_icon(icon, **kwargs):
"""
Render a Bootstrap glyphicon icon
"""
class... | Allow passing extra classes into render_icon, for example to set text-success | Allow passing extra classes into render_icon, for example to set text-success
| Python | bsd-3-clause | dyve/django-bootstrap3,zostera/django-bootstrap4,dyve/django-bootstrap3,zostera/django-bootstrap4 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms.widgets import flatatt
from django.utils.safestring import mark_safe
from bootstrap3.utils import render_tag
from .text import text_value
def render_icon(icon, title=''):
"""
Render a Bootstrap glyphicon icon
"""
attrs... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms.widgets import flatatt
from django.utils.safestring import mark_safe
from bootstrap3.utils import render_tag
from .text import text_value
def render_icon(icon, **kwargs):
"""
Render a Bootstrap glyphicon icon
"""
class... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms.widgets import flatatt
from django.utils.safestring import mark_safe
from bootstrap3.utils import render_tag
from .text import text_value
def render_icon(icon, title=''):
"""
Render a Bootstrap glyphicon icon
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms.widgets import flatatt
from django.utils.safestring import mark_safe
from bootstrap3.utils import render_tag
from .text import text_value
def render_icon(icon, **kwargs):
"""
Render a Bootstrap glyphicon icon
"""
class... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms.widgets import flatatt
from django.utils.safestring import mark_safe
from bootstrap3.utils import render_tag
from .text import text_value
def render_icon(icon, title=''):
"""
Render a Bootstrap glyphicon icon
"""
attrs... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms.widgets import flatatt
from django.utils.safestring import mark_safe
from bootstrap3.utils import render_tag
from .text import text_value
def render_icon(icon, title=''):
"""
Render a Bootstrap glyphicon icon
... |
ebc203958db534cdfd29dd53acae791e632cc30b | masters/master.chromium.git/master_source_cfg.py | masters/master.chromium.git/master_source_cfg.py | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master.chromium_git_poller_bb8 import ChromiumGitPoller
def Update(config, active_master, c):
poller = ChromiumGitPoller(
repourl='https://... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master.chromium_git_poller_bb8 import ChromiumGitPoller
def Update(config, active_master, c):
poller = ChromiumGitPoller(
repourl='https://... | Fix format string for revlinktmpl. | Fix format string for revlinktmpl.
TBR=iannucci@chromium.org
Review URL: https://codereview.chromium.org/12181028
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@180592 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master.chromium_git_poller_bb8 import ChromiumGitPoller
def Update(config, active_master, c):
poller = ChromiumGitPoller(
repourl='https://... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master.chromium_git_poller_bb8 import ChromiumGitPoller
def Update(config, active_master, c):
poller = ChromiumGitPoller(
repourl='https://... | <commit_before># Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master.chromium_git_poller_bb8 import ChromiumGitPoller
def Update(config, active_master, c):
poller = ChromiumGitPoller(
re... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master.chromium_git_poller_bb8 import ChromiumGitPoller
def Update(config, active_master, c):
poller = ChromiumGitPoller(
repourl='https://... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master.chromium_git_poller_bb8 import ChromiumGitPoller
def Update(config, active_master, c):
poller = ChromiumGitPoller(
repourl='https://... | <commit_before># Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master.chromium_git_poller_bb8 import ChromiumGitPoller
def Update(config, active_master, c):
poller = ChromiumGitPoller(
re... |
a600d75133f01aa9cc30767634f3d77379e6ba56 | keyring/py27compat.py | keyring/py27compat.py | """
Compatibility support for Python 2.7. Remove when Python 2.7 support is
no longer required.
"""
try:
import configparser
except ImportError:
import ConfigParser as configparser
try:
input = raw_input
except NameError:
input = input
try:
text_type = unicode
except NameError:
text_type = str... | """
Compatibility support for Python 2.7. Remove when Python 2.7 support is
no longer required.
"""
try:
import configparser
except ImportError:
import ConfigParser as configparser
try:
input = raw_input
except NameError:
input = input
try:
text_type = unicode
except NameError:
text_type = str... | Add 'string_types' as found in six. | Add 'string_types' as found in six.
| Python | mit | jaraco/keyring | """
Compatibility support for Python 2.7. Remove when Python 2.7 support is
no longer required.
"""
try:
import configparser
except ImportError:
import ConfigParser as configparser
try:
input = raw_input
except NameError:
input = input
try:
text_type = unicode
except NameError:
text_type = str... | """
Compatibility support for Python 2.7. Remove when Python 2.7 support is
no longer required.
"""
try:
import configparser
except ImportError:
import ConfigParser as configparser
try:
input = raw_input
except NameError:
input = input
try:
text_type = unicode
except NameError:
text_type = str... | <commit_before>"""
Compatibility support for Python 2.7. Remove when Python 2.7 support is
no longer required.
"""
try:
import configparser
except ImportError:
import ConfigParser as configparser
try:
input = raw_input
except NameError:
input = input
try:
text_type = unicode
except NameError:
... | """
Compatibility support for Python 2.7. Remove when Python 2.7 support is
no longer required.
"""
try:
import configparser
except ImportError:
import ConfigParser as configparser
try:
input = raw_input
except NameError:
input = input
try:
text_type = unicode
except NameError:
text_type = str... | """
Compatibility support for Python 2.7. Remove when Python 2.7 support is
no longer required.
"""
try:
import configparser
except ImportError:
import ConfigParser as configparser
try:
input = raw_input
except NameError:
input = input
try:
text_type = unicode
except NameError:
text_type = str... | <commit_before>"""
Compatibility support for Python 2.7. Remove when Python 2.7 support is
no longer required.
"""
try:
import configparser
except ImportError:
import ConfigParser as configparser
try:
input = raw_input
except NameError:
input = input
try:
text_type = unicode
except NameError:
... |
3386a32d0bae3433fad9f7c4960bdcb6a14a3835 | kobo/apps/__init__.py | kobo/apps/__init__.py | # coding: utf-8
import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
# Once it'... | # coding: utf-8
import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
# Once it'... | Add explanatory comment for odd use of `delay()` | Add explanatory comment for odd use of `delay()`
| Python | agpl-3.0 | kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi | # coding: utf-8
import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
# Once it'... | # coding: utf-8
import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
# Once it'... | <commit_before># coding: utf-8
import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
... | # coding: utf-8
import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
# Once it'... | # coding: utf-8
import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
# Once it'... | <commit_before># coding: utf-8
import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
... |
fb33fa9fef21bbe1e8d2d82dd986b69f8c3bdb64 | jp-holidays.py | jp-holidays.py | import requests
u = 'http://www.google.com/calendar/feeds/ja.japanese%23holiday@group.v.calendar.google.com/public/full?alt=json&max-results=100&futureevents=true'
data = requests.get(u).json()
print data.get('feed').get('title').get('$t')
for item in data.get('feed').get('entry'):
# gd$when
# 'title']['$t']... | import requests
import sys
u = 'http://www.google.com/calendar/feeds/ja.japanese%23holiday@group.v.calendar.google.com/public/full'
params = {
'alt': 'json',
'max-results': 100,
'futureevents': 'true'
}
res = requests.get(u, params=params)
res.raise_for_status()
data = res.json()
print data.get('feed').... | Use dict for uri params. | Use dict for uri params.
| Python | mit | shoma/python.tools | import requests
u = 'http://www.google.com/calendar/feeds/ja.japanese%23holiday@group.v.calendar.google.com/public/full?alt=json&max-results=100&futureevents=true'
data = requests.get(u).json()
print data.get('feed').get('title').get('$t')
for item in data.get('feed').get('entry'):
# gd$when
# 'title']['$t']... | import requests
import sys
u = 'http://www.google.com/calendar/feeds/ja.japanese%23holiday@group.v.calendar.google.com/public/full'
params = {
'alt': 'json',
'max-results': 100,
'futureevents': 'true'
}
res = requests.get(u, params=params)
res.raise_for_status()
data = res.json()
print data.get('feed').... | <commit_before>import requests
u = 'http://www.google.com/calendar/feeds/ja.japanese%23holiday@group.v.calendar.google.com/public/full?alt=json&max-results=100&futureevents=true'
data = requests.get(u).json()
print data.get('feed').get('title').get('$t')
for item in data.get('feed').get('entry'):
# gd$when
#... | import requests
import sys
u = 'http://www.google.com/calendar/feeds/ja.japanese%23holiday@group.v.calendar.google.com/public/full'
params = {
'alt': 'json',
'max-results': 100,
'futureevents': 'true'
}
res = requests.get(u, params=params)
res.raise_for_status()
data = res.json()
print data.get('feed').... | import requests
u = 'http://www.google.com/calendar/feeds/ja.japanese%23holiday@group.v.calendar.google.com/public/full?alt=json&max-results=100&futureevents=true'
data = requests.get(u).json()
print data.get('feed').get('title').get('$t')
for item in data.get('feed').get('entry'):
# gd$when
# 'title']['$t']... | <commit_before>import requests
u = 'http://www.google.com/calendar/feeds/ja.japanese%23holiday@group.v.calendar.google.com/public/full?alt=json&max-results=100&futureevents=true'
data = requests.get(u).json()
print data.get('feed').get('title').get('$t')
for item in data.get('feed').get('entry'):
# gd$when
#... |
a8b2f1ad738709fb49c5e3f9175822cc1bafa11d | dataset/__init__.py | dataset/__init__.py | import os
# shut up useless SA warning:
import warnings
warnings.filterwarnings(
'ignore', 'Unicode type received non-unicode bind param value.')
from dataset.persistence.util import sqlite_datetime_fix
from dataset.persistence.database import Database
from dataset.persistence.table import Table
from dataset.freez... | import os
# shut up useless SA warning:
import warnings
warnings.filterwarnings(
'ignore', 'Unicode type received non-unicode bind param value.')
from dataset.persistence.util import sqlite_datetime_fix
from dataset.persistence.database import Database
from dataset.persistence.table import Table
from dataset.freez... | Add more instructions for engine_kwargs, to avoid DB connection timeout issues | Add more instructions for engine_kwargs, to avoid DB connection timeout issues
| Python | mit | askebos/dataset,twds/dataset,stefanw/dataset,vguzmanp/dataset,reubano/dataset,pudo/dataset,saimn/dataset | import os
# shut up useless SA warning:
import warnings
warnings.filterwarnings(
'ignore', 'Unicode type received non-unicode bind param value.')
from dataset.persistence.util import sqlite_datetime_fix
from dataset.persistence.database import Database
from dataset.persistence.table import Table
from dataset.freez... | import os
# shut up useless SA warning:
import warnings
warnings.filterwarnings(
'ignore', 'Unicode type received non-unicode bind param value.')
from dataset.persistence.util import sqlite_datetime_fix
from dataset.persistence.database import Database
from dataset.persistence.table import Table
from dataset.freez... | <commit_before>import os
# shut up useless SA warning:
import warnings
warnings.filterwarnings(
'ignore', 'Unicode type received non-unicode bind param value.')
from dataset.persistence.util import sqlite_datetime_fix
from dataset.persistence.database import Database
from dataset.persistence.table import Table
fro... | import os
# shut up useless SA warning:
import warnings
warnings.filterwarnings(
'ignore', 'Unicode type received non-unicode bind param value.')
from dataset.persistence.util import sqlite_datetime_fix
from dataset.persistence.database import Database
from dataset.persistence.table import Table
from dataset.freez... | import os
# shut up useless SA warning:
import warnings
warnings.filterwarnings(
'ignore', 'Unicode type received non-unicode bind param value.')
from dataset.persistence.util import sqlite_datetime_fix
from dataset.persistence.database import Database
from dataset.persistence.table import Table
from dataset.freez... | <commit_before>import os
# shut up useless SA warning:
import warnings
warnings.filterwarnings(
'ignore', 'Unicode type received non-unicode bind param value.')
from dataset.persistence.util import sqlite_datetime_fix
from dataset.persistence.database import Database
from dataset.persistence.table import Table
fro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.