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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a6dfc5c5f256acd78d806cc8d4ddac9bd1ac34b5 | barbicanclient/osc_plugin.py | barbicanclient/osc_plugin.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distrib... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distrib... | Add plug-in summary for osc doc | Add plug-in summary for osc doc
Stevedore Sphinx extension handles this comment.
http://docs.openstack.org/developer/python-openstackclient/plugin-commands.html
Change-Id: Id6339d11b900a644647c8c25bbd630ef52a60aab
| Python | apache-2.0 | openstack/python-barbicanclient | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distrib... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distrib... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distrib... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distrib... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... |
086e54f0b89670027272e5485d9eb832adecc7b9 | constants/base.py | constants/base.py | from collections import namedtuple
class Constants(object):
Constant = namedtuple('Constant', ['codename', 'value', 'description'])
def __init__(self, **kwargs):
self._constants = []
try:
for codename, (value, description) in kwargs.items():
if hasattr(self, codena... | from collections import namedtuple
class Constants(object):
Constant = namedtuple('Constant', ['codename', 'value', 'description'])
def __init__(self, **kwargs):
self._constants = []
for codename in kwargs:
try:
value, description = kwargs.get(codename)
... | Refactor Constants initialization to throw more specific exceptions | Refactor Constants initialization to throw more specific exceptions
| Python | bsd-3-clause | caktus/django-dry-choices | from collections import namedtuple
class Constants(object):
Constant = namedtuple('Constant', ['codename', 'value', 'description'])
def __init__(self, **kwargs):
self._constants = []
try:
for codename, (value, description) in kwargs.items():
if hasattr(self, codena... | from collections import namedtuple
class Constants(object):
Constant = namedtuple('Constant', ['codename', 'value', 'description'])
def __init__(self, **kwargs):
self._constants = []
for codename in kwargs:
try:
value, description = kwargs.get(codename)
... | <commit_before>from collections import namedtuple
class Constants(object):
Constant = namedtuple('Constant', ['codename', 'value', 'description'])
def __init__(self, **kwargs):
self._constants = []
try:
for codename, (value, description) in kwargs.items():
if hasat... | from collections import namedtuple
class Constants(object):
Constant = namedtuple('Constant', ['codename', 'value', 'description'])
def __init__(self, **kwargs):
self._constants = []
for codename in kwargs:
try:
value, description = kwargs.get(codename)
... | from collections import namedtuple
class Constants(object):
Constant = namedtuple('Constant', ['codename', 'value', 'description'])
def __init__(self, **kwargs):
self._constants = []
try:
for codename, (value, description) in kwargs.items():
if hasattr(self, codena... | <commit_before>from collections import namedtuple
class Constants(object):
Constant = namedtuple('Constant', ['codename', 'value', 'description'])
def __init__(self, **kwargs):
self._constants = []
try:
for codename, (value, description) in kwargs.items():
if hasat... |
d9ce6cc440019ecfc73f1c82e41da4e9ce02a234 | smart_open/__init__.py | smart_open/__init__.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Radim Rehurek <[email protected]>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
#
"""
Utilities for streaming to/from several file-like data storages: S3 / HDFS / local
filesystem / compressed files, and many more, using a sim... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Radim Rehurek <[email protected]>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
#
"""
Utilities for streaming to/from several file-like data storages: S3 / HDFS / local
filesystem / compressed files, and many more, using a sim... | Configure logging handlers before submodule imports | Configure logging handlers before submodule imports
- Fix #474
- Fix #475
| Python | mit | RaRe-Technologies/smart_open,RaRe-Technologies/smart_open,piskvorky/smart_open | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Radim Rehurek <[email protected]>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
#
"""
Utilities for streaming to/from several file-like data storages: S3 / HDFS / local
filesystem / compressed files, and many more, using a sim... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Radim Rehurek <[email protected]>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
#
"""
Utilities for streaming to/from several file-like data storages: S3 / HDFS / local
filesystem / compressed files, and many more, using a sim... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Radim Rehurek <[email protected]>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
#
"""
Utilities for streaming to/from several file-like data storages: S3 / HDFS / local
filesystem / compressed files, and many mo... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Radim Rehurek <[email protected]>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
#
"""
Utilities for streaming to/from several file-like data storages: S3 / HDFS / local
filesystem / compressed files, and many more, using a sim... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Radim Rehurek <[email protected]>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
#
"""
Utilities for streaming to/from several file-like data storages: S3 / HDFS / local
filesystem / compressed files, and many more, using a sim... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Radim Rehurek <[email protected]>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
#
"""
Utilities for streaming to/from several file-like data storages: S3 / HDFS / local
filesystem / compressed files, and many mo... |
1d90e26b3f4d84252b98f4ea80709beb96d4007e | wafer/registration/apps.py | wafer/registration/apps.py | # Needed due to django 1.7 changed app name restrictions
from django.apps import AppConfig
class RegistrationConfig(AppConfig):
label = 'wafer.registration'
name = 'wafer.registration'
| # Needed due to django 1.7 changed app name restrictions
from django.apps import AppConfig
class RegistrationConfig(AppConfig):
label = 'wafer_registration'
name = 'wafer.registration'
| Fix syntax to work with Django 3.2 | Fix syntax to work with Django 3.2
| Python | isc | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | # Needed due to django 1.7 changed app name restrictions
from django.apps import AppConfig
class RegistrationConfig(AppConfig):
label = 'wafer.registration'
name = 'wafer.registration'
Fix syntax to work with Django 3.2 | # Needed due to django 1.7 changed app name restrictions
from django.apps import AppConfig
class RegistrationConfig(AppConfig):
label = 'wafer_registration'
name = 'wafer.registration'
| <commit_before># Needed due to django 1.7 changed app name restrictions
from django.apps import AppConfig
class RegistrationConfig(AppConfig):
label = 'wafer.registration'
name = 'wafer.registration'
<commit_msg>Fix syntax to work with Django 3.2<commit_after> | # Needed due to django 1.7 changed app name restrictions
from django.apps import AppConfig
class RegistrationConfig(AppConfig):
label = 'wafer_registration'
name = 'wafer.registration'
| # Needed due to django 1.7 changed app name restrictions
from django.apps import AppConfig
class RegistrationConfig(AppConfig):
label = 'wafer.registration'
name = 'wafer.registration'
Fix syntax to work with Django 3.2# Needed due to django 1.7 changed app name restrictions
from django.apps import AppConfi... | <commit_before># Needed due to django 1.7 changed app name restrictions
from django.apps import AppConfig
class RegistrationConfig(AppConfig):
label = 'wafer.registration'
name = 'wafer.registration'
<commit_msg>Fix syntax to work with Django 3.2<commit_after># Needed due to django 1.7 changed app name restr... |
ac9123c7926c04af7ac68949e2636a81f771fd7d | ncdc_download/download_mapper2.py | ncdc_download/download_mapper2.py | #!/usr/bin/env python3
import ftplib
import gzip
import sys
host = 'ftp.ncdc.noaa.gov'
base = '/pub/data/noaa'
retries = 3
ftp = ftplib.FTP(host)
ftp.login()
for line in sys.stdin:
(year, filename) = line.strip().split()
for i in range(retries):
sys.stderr.write('reporter:status:Processing file %s/%s... | #!/usr/bin/env python3
import ftplib
import gzip
import os
import sys
host = 'ftp.ncdc.noaa.gov'
base = '/pub/data/noaa'
retries = 3
ftp = ftplib.FTP(host)
ftp.login()
for line in sys.stdin:
(year, filename) = line.strip().split()
for i in range(retries):
sys.stderr.write('reporter:status:Processing ... | Decompress downloaded files from disk, not in memory | Decompress downloaded files from disk, not in memory
| Python | mit | simonbrady/cat,simonbrady/cat | #!/usr/bin/env python3
import ftplib
import gzip
import sys
host = 'ftp.ncdc.noaa.gov'
base = '/pub/data/noaa'
retries = 3
ftp = ftplib.FTP(host)
ftp.login()
for line in sys.stdin:
(year, filename) = line.strip().split()
for i in range(retries):
sys.stderr.write('reporter:status:Processing file %s/%s... | #!/usr/bin/env python3
import ftplib
import gzip
import os
import sys
host = 'ftp.ncdc.noaa.gov'
base = '/pub/data/noaa'
retries = 3
ftp = ftplib.FTP(host)
ftp.login()
for line in sys.stdin:
(year, filename) = line.strip().split()
for i in range(retries):
sys.stderr.write('reporter:status:Processing ... | <commit_before>#!/usr/bin/env python3
import ftplib
import gzip
import sys
host = 'ftp.ncdc.noaa.gov'
base = '/pub/data/noaa'
retries = 3
ftp = ftplib.FTP(host)
ftp.login()
for line in sys.stdin:
(year, filename) = line.strip().split()
for i in range(retries):
sys.stderr.write('reporter:status:Proces... | #!/usr/bin/env python3
import ftplib
import gzip
import os
import sys
host = 'ftp.ncdc.noaa.gov'
base = '/pub/data/noaa'
retries = 3
ftp = ftplib.FTP(host)
ftp.login()
for line in sys.stdin:
(year, filename) = line.strip().split()
for i in range(retries):
sys.stderr.write('reporter:status:Processing ... | #!/usr/bin/env python3
import ftplib
import gzip
import sys
host = 'ftp.ncdc.noaa.gov'
base = '/pub/data/noaa'
retries = 3
ftp = ftplib.FTP(host)
ftp.login()
for line in sys.stdin:
(year, filename) = line.strip().split()
for i in range(retries):
sys.stderr.write('reporter:status:Processing file %s/%s... | <commit_before>#!/usr/bin/env python3
import ftplib
import gzip
import sys
host = 'ftp.ncdc.noaa.gov'
base = '/pub/data/noaa'
retries = 3
ftp = ftplib.FTP(host)
ftp.login()
for line in sys.stdin:
(year, filename) = line.strip().split()
for i in range(retries):
sys.stderr.write('reporter:status:Proces... |
db13de154fa44f3ef0bf1e365d2ee0d7a6951700 | cellcounter/accounts/urls.py | cellcounter/accounts/urls.py | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | Use URL regex as per main Django project | Use URL regex as per main Django project
| Python | mit | cellcounter/cellcounter,haematologic/cellcounter,haematologic/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,haematologic/cellcounter | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | <commit_before>from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.... | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.UserDeleteView.... | <commit_before>from django.conf.urls import patterns, url
from cellcounter.accounts import views
urlpatterns = patterns('',
url('^new/$', views.RegistrationView.as_view(), name='register'),
url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_view(), name='user-detail'),
url('^(?P<pk>[0-9]+)/delete/$', views.... |
bea43337d9caa4e9a5271b66d951ae6547a23c80 | DjangoLibrary/middleware.py | DjangoLibrary/middleware.py | from django.contrib import auth
from django.contrib.auth.middleware import AuthenticationMiddleware
import base64
class AutologinAuthenticationMiddleware(AuthenticationMiddleware):
def process_request(self, request):
if 'autologin' not in request.COOKIES:
return
if request.COOKIES['a... | from django.contrib import auth
from django.contrib.auth.middleware import AuthenticationMiddleware
import base64
class AutologinAuthenticationMiddleware(AuthenticationMiddleware):
def process_request(self, request):
if 'autologin' not in request.COOKIES:
return
if request.COOKIES['a... | Add a comment to py3 byte string decode. | Add a comment to py3 byte string decode.
| Python | apache-2.0 | kitconcept/robotframework-djangolibrary | from django.contrib import auth
from django.contrib.auth.middleware import AuthenticationMiddleware
import base64
class AutologinAuthenticationMiddleware(AuthenticationMiddleware):
def process_request(self, request):
if 'autologin' not in request.COOKIES:
return
if request.COOKIES['a... | from django.contrib import auth
from django.contrib.auth.middleware import AuthenticationMiddleware
import base64
class AutologinAuthenticationMiddleware(AuthenticationMiddleware):
def process_request(self, request):
if 'autologin' not in request.COOKIES:
return
if request.COOKIES['a... | <commit_before>from django.contrib import auth
from django.contrib.auth.middleware import AuthenticationMiddleware
import base64
class AutologinAuthenticationMiddleware(AuthenticationMiddleware):
def process_request(self, request):
if 'autologin' not in request.COOKIES:
return
if req... | from django.contrib import auth
from django.contrib.auth.middleware import AuthenticationMiddleware
import base64
class AutologinAuthenticationMiddleware(AuthenticationMiddleware):
def process_request(self, request):
if 'autologin' not in request.COOKIES:
return
if request.COOKIES['a... | from django.contrib import auth
from django.contrib.auth.middleware import AuthenticationMiddleware
import base64
class AutologinAuthenticationMiddleware(AuthenticationMiddleware):
def process_request(self, request):
if 'autologin' not in request.COOKIES:
return
if request.COOKIES['a... | <commit_before>from django.contrib import auth
from django.contrib.auth.middleware import AuthenticationMiddleware
import base64
class AutologinAuthenticationMiddleware(AuthenticationMiddleware):
def process_request(self, request):
if 'autologin' not in request.COOKIES:
return
if req... |
df5594e3da75ecd7f5ab6d112d22e5da628a3ccf | onepercentclub/settings/travis.py | onepercentclub/settings/travis.py | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS = False
ROOT_UR... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'firefox'
SELENIUM_TESTS = False
ROOT_U... | Use FF as test browser in Travis | Use FF as test browser in Travis
| Python | bsd-3-clause | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS = False
ROOT_UR... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'firefox'
SELENIUM_TESTS = False
ROOT_U... | <commit_before># TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS =... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'firefox'
SELENIUM_TESTS = False
ROOT_U... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS = False
ROOT_UR... | <commit_before># TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS =... |
7e5777c7b09780d7cde1a94e58dd022f98051168 | scrapple/utils/config.py | scrapple/utils/config.py | """
scrapple.utils.config
~~~~~~~~~~~~~~~~~~~~~
Functions related to traversing the configuration file
"""
from __future__ import print_function
def traverse_next(page, next, results):
"""
Recursive generator to traverse through the next attribute and \
crawl through the links to be followed
"""
... | """
scrapple.utils.config
~~~~~~~~~~~~~~~~~~~~~
Functions related to traversing the configuration file
"""
from __future__ import print_function
from colorama import init, Fore, Back
init()
def traverse_next(page, next, results):
"""
Recursive generator to traverse through the next attribute and \
craw... | Modify stdout logging in crawler run | Modify stdout logging in crawler run
| Python | mit | AlexMathew/scrapple,AlexMathew/scrapple,scrappleapp/scrapple,scrappleapp/scrapple,AlexMathew/scrapple | """
scrapple.utils.config
~~~~~~~~~~~~~~~~~~~~~
Functions related to traversing the configuration file
"""
from __future__ import print_function
def traverse_next(page, next, results):
"""
Recursive generator to traverse through the next attribute and \
crawl through the links to be followed
"""
... | """
scrapple.utils.config
~~~~~~~~~~~~~~~~~~~~~
Functions related to traversing the configuration file
"""
from __future__ import print_function
from colorama import init, Fore, Back
init()
def traverse_next(page, next, results):
"""
Recursive generator to traverse through the next attribute and \
craw... | <commit_before>"""
scrapple.utils.config
~~~~~~~~~~~~~~~~~~~~~
Functions related to traversing the configuration file
"""
from __future__ import print_function
def traverse_next(page, next, results):
"""
Recursive generator to traverse through the next attribute and \
crawl through the links to be follo... | """
scrapple.utils.config
~~~~~~~~~~~~~~~~~~~~~
Functions related to traversing the configuration file
"""
from __future__ import print_function
from colorama import init, Fore, Back
init()
def traverse_next(page, next, results):
"""
Recursive generator to traverse through the next attribute and \
craw... | """
scrapple.utils.config
~~~~~~~~~~~~~~~~~~~~~
Functions related to traversing the configuration file
"""
from __future__ import print_function
def traverse_next(page, next, results):
"""
Recursive generator to traverse through the next attribute and \
crawl through the links to be followed
"""
... | <commit_before>"""
scrapple.utils.config
~~~~~~~~~~~~~~~~~~~~~
Functions related to traversing the configuration file
"""
from __future__ import print_function
def traverse_next(page, next, results):
"""
Recursive generator to traverse through the next attribute and \
crawl through the links to be follo... |
cc8f1507c90261947d9520859922bff44ef9c6b4 | observatory/lib/InheritanceQuerySet.py | observatory/lib/InheritanceQuerySet.py | from django.db.models.query import QuerySet
from django.db.models.fields.related import SingleRelatedObjectDescriptor
class InheritanceQuerySet(QuerySet):
def select_subclasses(self, *subclasses):
if not subclasses:
subclasses = [o for o in dir(self.model)
if isinstance(getattr(self.model, o)... | from django.db.models.query import QuerySet
from django.db.models.fields.related import SingleRelatedObjectDescriptor
from django.core.exceptions import ObjectDoesNotExist
class InheritanceQuerySet(QuerySet):
def select_subclasses(self, *subclasses):
if not subclasses:
subclasses = [o for o in dir(self.mod... | Fix the feed to work with new versions of django | Fix the feed to work with new versions of django
| Python | isc | rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory | from django.db.models.query import QuerySet
from django.db.models.fields.related import SingleRelatedObjectDescriptor
class InheritanceQuerySet(QuerySet):
def select_subclasses(self, *subclasses):
if not subclasses:
subclasses = [o for o in dir(self.model)
if isinstance(getattr(self.model, o)... | from django.db.models.query import QuerySet
from django.db.models.fields.related import SingleRelatedObjectDescriptor
from django.core.exceptions import ObjectDoesNotExist
class InheritanceQuerySet(QuerySet):
def select_subclasses(self, *subclasses):
if not subclasses:
subclasses = [o for o in dir(self.mod... | <commit_before>from django.db.models.query import QuerySet
from django.db.models.fields.related import SingleRelatedObjectDescriptor
class InheritanceQuerySet(QuerySet):
def select_subclasses(self, *subclasses):
if not subclasses:
subclasses = [o for o in dir(self.model)
if isinstance(getattr... | from django.db.models.query import QuerySet
from django.db.models.fields.related import SingleRelatedObjectDescriptor
from django.core.exceptions import ObjectDoesNotExist
class InheritanceQuerySet(QuerySet):
def select_subclasses(self, *subclasses):
if not subclasses:
subclasses = [o for o in dir(self.mod... | from django.db.models.query import QuerySet
from django.db.models.fields.related import SingleRelatedObjectDescriptor
class InheritanceQuerySet(QuerySet):
def select_subclasses(self, *subclasses):
if not subclasses:
subclasses = [o for o in dir(self.model)
if isinstance(getattr(self.model, o)... | <commit_before>from django.db.models.query import QuerySet
from django.db.models.fields.related import SingleRelatedObjectDescriptor
class InheritanceQuerySet(QuerySet):
def select_subclasses(self, *subclasses):
if not subclasses:
subclasses = [o for o in dir(self.model)
if isinstance(getattr... |
096496a04ae728103e1bd1460cf654854c7e5527 | src/core/settings/production.py | src/core/settings/production.py | from core.settings.base import * # noqa
DEBUG = False
ALLOWED_HOSTS = ['*.miximum.fr']
| from core.settings.base import * # noqa
DEBUG = False
ALLOWED_HOSTS = ['*.miximum.fr']
SECRET_KEY = '7cqu2zqu3lt)uw@@cx9_i7xo-d688zi3!q(r0zt37$rdqo1=lj'
| Add a dummy secret key to settings | Add a dummy secret key to settings
(bad, i know)
| Python | mit | thibault/pomodoro_api | from core.settings.base import * # noqa
DEBUG = False
ALLOWED_HOSTS = ['*.miximum.fr']
Add a dummy secret key to settings
(bad, i know) | from core.settings.base import * # noqa
DEBUG = False
ALLOWED_HOSTS = ['*.miximum.fr']
SECRET_KEY = '7cqu2zqu3lt)uw@@cx9_i7xo-d688zi3!q(r0zt37$rdqo1=lj'
| <commit_before>from core.settings.base import * # noqa
DEBUG = False
ALLOWED_HOSTS = ['*.miximum.fr']
<commit_msg>Add a dummy secret key to settings
(bad, i know)<commit_after> | from core.settings.base import * # noqa
DEBUG = False
ALLOWED_HOSTS = ['*.miximum.fr']
SECRET_KEY = '7cqu2zqu3lt)uw@@cx9_i7xo-d688zi3!q(r0zt37$rdqo1=lj'
| from core.settings.base import * # noqa
DEBUG = False
ALLOWED_HOSTS = ['*.miximum.fr']
Add a dummy secret key to settings
(bad, i know)from core.settings.base import * # noqa
DEBUG = False
ALLOWED_HOSTS = ['*.miximum.fr']
SECRET_KEY = '7cqu2zqu3lt)uw@@cx9_i7xo-d688zi3!q(r0zt37$rdqo1=lj'
| <commit_before>from core.settings.base import * # noqa
DEBUG = False
ALLOWED_HOSTS = ['*.miximum.fr']
<commit_msg>Add a dummy secret key to settings
(bad, i know)<commit_after>from core.settings.base import * # noqa
DEBUG = False
ALLOWED_HOSTS = ['*.miximum.fr']
SECRET_KEY = '7cqu2zqu3lt)uw@@cx9_i7xo-d688zi3!... |
48acf57692a2a0eb03a3d616507cae2d5f619ded | yunity/models/relations.py | yunity/models/relations.py | from django.db.models import ForeignKey, DateTimeField, ManyToManyField
from yunity.models.entities import User, Location, Mappable, Message
from yunity.models.utils import BaseModel, MaxLengthCharField
from yunity.utils.decorators import classproperty
class Chat(BaseModel):
participants = ManyToManyField(User)
... | from django.db.models import ForeignKey, DateTimeField, ManyToManyField
from yunity.models.entities import User, Location, Mappable, Message
from yunity.models.utils import BaseModel, MaxLengthCharField
from yunity.utils.decorators import classproperty
class Chat(BaseModel):
participants = ManyToManyField(User)
... | Add default value for date | Add default value for date
with @NerdyProjects
| Python | agpl-3.0 | yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/yunity-core | from django.db.models import ForeignKey, DateTimeField, ManyToManyField
from yunity.models.entities import User, Location, Mappable, Message
from yunity.models.utils import BaseModel, MaxLengthCharField
from yunity.utils.decorators import classproperty
class Chat(BaseModel):
participants = ManyToManyField(User)
... | from django.db.models import ForeignKey, DateTimeField, ManyToManyField
from yunity.models.entities import User, Location, Mappable, Message
from yunity.models.utils import BaseModel, MaxLengthCharField
from yunity.utils.decorators import classproperty
class Chat(BaseModel):
participants = ManyToManyField(User)
... | <commit_before>from django.db.models import ForeignKey, DateTimeField, ManyToManyField
from yunity.models.entities import User, Location, Mappable, Message
from yunity.models.utils import BaseModel, MaxLengthCharField
from yunity.utils.decorators import classproperty
class Chat(BaseModel):
participants = ManyToMa... | from django.db.models import ForeignKey, DateTimeField, ManyToManyField
from yunity.models.entities import User, Location, Mappable, Message
from yunity.models.utils import BaseModel, MaxLengthCharField
from yunity.utils.decorators import classproperty
class Chat(BaseModel):
participants = ManyToManyField(User)
... | from django.db.models import ForeignKey, DateTimeField, ManyToManyField
from yunity.models.entities import User, Location, Mappable, Message
from yunity.models.utils import BaseModel, MaxLengthCharField
from yunity.utils.decorators import classproperty
class Chat(BaseModel):
participants = ManyToManyField(User)
... | <commit_before>from django.db.models import ForeignKey, DateTimeField, ManyToManyField
from yunity.models.entities import User, Location, Mappable, Message
from yunity.models.utils import BaseModel, MaxLengthCharField
from yunity.utils.decorators import classproperty
class Chat(BaseModel):
participants = ManyToMa... |
074520d7de93db9b83d8d20dd03640146609eeb2 | critical_critiques/submission/forms.py | critical_critiques/submission/forms.py | from django.forms import ModelForm
from .models import Submission
class SubmissionForm(ModelForm):
class Meta:
model = Submission
fields = ('url',)
| from urlparse import urlparse
from django import forms
from .models import Submission
class SubmissionForm(forms.ModelForm):
class Meta:
model = Submission
fields = ('url',)
def clean_url(self):
url = self.cleaned_data['url']
parsed_url = urlparse(url)
if not (parse... | Validate that the submission URLs are for GitHub | Validate that the submission URLs are for GitHub
| Python | mit | team-stroller/critical_critiques,team-stroller/critical_critiques,team-stroller/critical_critiques | from django.forms import ModelForm
from .models import Submission
class SubmissionForm(ModelForm):
class Meta:
model = Submission
fields = ('url',)
Validate that the submission URLs are for GitHub | from urlparse import urlparse
from django import forms
from .models import Submission
class SubmissionForm(forms.ModelForm):
class Meta:
model = Submission
fields = ('url',)
def clean_url(self):
url = self.cleaned_data['url']
parsed_url = urlparse(url)
if not (parse... | <commit_before>from django.forms import ModelForm
from .models import Submission
class SubmissionForm(ModelForm):
class Meta:
model = Submission
fields = ('url',)
<commit_msg>Validate that the submission URLs are for GitHub<commit_after> | from urlparse import urlparse
from django import forms
from .models import Submission
class SubmissionForm(forms.ModelForm):
class Meta:
model = Submission
fields = ('url',)
def clean_url(self):
url = self.cleaned_data['url']
parsed_url = urlparse(url)
if not (parse... | from django.forms import ModelForm
from .models import Submission
class SubmissionForm(ModelForm):
class Meta:
model = Submission
fields = ('url',)
Validate that the submission URLs are for GitHubfrom urlparse import urlparse
from django import forms
from .models import Submission
class Subm... | <commit_before>from django.forms import ModelForm
from .models import Submission
class SubmissionForm(ModelForm):
class Meta:
model = Submission
fields = ('url',)
<commit_msg>Validate that the submission URLs are for GitHub<commit_after>from urlparse import urlparse
from django import forms
fr... |
4b8b4a295e5b9f9674d351e60ffac74f85eae0d3 | WebIntegration/MatchData.py | WebIntegration/MatchData.py | '''
Created on Mar 28, 2017
@author: Jack Rausch
'''
import http.client
import json
import ssl
import tbapy
#import requests
URL = "http://www.thebluealliance.com/api/v2/"
HEADER_KEY = "X-TBA-App-Id"
HEADER_VAL = 'frc4215:data-analysis:.1'
#I was thinking that we should turn this into a class so that we can have an ... | #!/usr/bin/python3
# -*- encoding: utf8 -*-
'''
Created on Mar 28, 2017
@author: Jack Rausch
'''
import http.client
import json
import ssl
import tbapy
#import requests
URL = "http://www.thebluealliance.com/api/v2/"
HEADER_KEY = "X-TBA-App-Id"
HEADER_VAL = 'frc4215:data-analysis:.1'
#I was thinking that we should t... | Add sufficient leading lines to indicate the launching program of this script. | Add sufficient leading lines to indicate the launching program of this script.
| Python | mit | TrinityTrihawks/BluePython | '''
Created on Mar 28, 2017
@author: Jack Rausch
'''
import http.client
import json
import ssl
import tbapy
#import requests
URL = "http://www.thebluealliance.com/api/v2/"
HEADER_KEY = "X-TBA-App-Id"
HEADER_VAL = 'frc4215:data-analysis:.1'
#I was thinking that we should turn this into a class so that we can have an ... | #!/usr/bin/python3
# -*- encoding: utf8 -*-
'''
Created on Mar 28, 2017
@author: Jack Rausch
'''
import http.client
import json
import ssl
import tbapy
#import requests
URL = "http://www.thebluealliance.com/api/v2/"
HEADER_KEY = "X-TBA-App-Id"
HEADER_VAL = 'frc4215:data-analysis:.1'
#I was thinking that we should t... | <commit_before>'''
Created on Mar 28, 2017
@author: Jack Rausch
'''
import http.client
import json
import ssl
import tbapy
#import requests
URL = "http://www.thebluealliance.com/api/v2/"
HEADER_KEY = "X-TBA-App-Id"
HEADER_VAL = 'frc4215:data-analysis:.1'
#I was thinking that we should turn this into a class so that ... | #!/usr/bin/python3
# -*- encoding: utf8 -*-
'''
Created on Mar 28, 2017
@author: Jack Rausch
'''
import http.client
import json
import ssl
import tbapy
#import requests
URL = "http://www.thebluealliance.com/api/v2/"
HEADER_KEY = "X-TBA-App-Id"
HEADER_VAL = 'frc4215:data-analysis:.1'
#I was thinking that we should t... | '''
Created on Mar 28, 2017
@author: Jack Rausch
'''
import http.client
import json
import ssl
import tbapy
#import requests
URL = "http://www.thebluealliance.com/api/v2/"
HEADER_KEY = "X-TBA-App-Id"
HEADER_VAL = 'frc4215:data-analysis:.1'
#I was thinking that we should turn this into a class so that we can have an ... | <commit_before>'''
Created on Mar 28, 2017
@author: Jack Rausch
'''
import http.client
import json
import ssl
import tbapy
#import requests
URL = "http://www.thebluealliance.com/api/v2/"
HEADER_KEY = "X-TBA-App-Id"
HEADER_VAL = 'frc4215:data-analysis:.1'
#I was thinking that we should turn this into a class so that ... |
1b080248b2f90879ac43957eafa0d7adf5590a9a | flattener/tests/test_solidity-flattener.py | flattener/tests/test_solidity-flattener.py | import pytest
from .. import flattener
def test_thingy():
assert 1 == 1
| import pytest
from .. import core
def test_thingy():
assert 1 == 1
| Fix test execution. Doesn't actually do anything. | Fix test execution. Doesn't actually do anything.
| Python | mit | BlockCatIO/solidity-flattener,BlockCatIO/solidity-flattener | import pytest
from .. import flattener
def test_thingy():
assert 1 == 1
Fix test execution. Doesn't actually do anything. | import pytest
from .. import core
def test_thingy():
assert 1 == 1
| <commit_before>import pytest
from .. import flattener
def test_thingy():
assert 1 == 1
<commit_msg>Fix test execution. Doesn't actually do anything.<commit_after> | import pytest
from .. import core
def test_thingy():
assert 1 == 1
| import pytest
from .. import flattener
def test_thingy():
assert 1 == 1
Fix test execution. Doesn't actually do anything.import pytest
from .. import core
def test_thingy():
assert 1 == 1
| <commit_before>import pytest
from .. import flattener
def test_thingy():
assert 1 == 1
<commit_msg>Fix test execution. Doesn't actually do anything.<commit_after>import pytest
from .. import core
def test_thingy():
assert 1 == 1
|
0fcb48d98423b1b1e64beaff30a84910920786a2 | acme/_metadata.py | acme/_metadata.py | # python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# 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 re... | # python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# 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 re... | Update patch version ahead of a minor release. | Update patch version ahead of a minor release.
PiperOrigin-RevId: 393332838
Change-Id: I70845f5a679a29f6bd9f497896c5820fd2880df2
| Python | apache-2.0 | deepmind/acme,deepmind/acme | # python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# 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 re... | # python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# 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 re... | <commit_before># python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# 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.... | # python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# 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 re... | # python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# 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 re... | <commit_before># python3
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# 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.... |
a600543515c286ed7bcba2bad5a0746588b62f9a | app/views.py | app/views.py | import logging
import hashlib
import json
from django.http import HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from app.models import SocialNetworkApp
logger = logging.getLogger(__name__)
def _get_facebook_app():
apps = SocialNetworkApp.objects.all()
for app in ap... | import logging
import hashlib
import hmac
import json
from django.http import HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from app.models import SocialNetworkApp
logger = logging.getLogger(__name__)
def _get_facebook_app():
apps = SocialNetworkApp.objects.all()
f... | Modify function that calculate the expected signature | Modify function that calculate the expected signature
| Python | mit | rebearteta/social-ideation,joausaga/social-ideation,rebearteta/social-ideation,joausaga/social-ideation,joausaga/social-ideation,rebearteta/social-ideation,rebearteta/social-ideation,joausaga/social-ideation | import logging
import hashlib
import json
from django.http import HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from app.models import SocialNetworkApp
logger = logging.getLogger(__name__)
def _get_facebook_app():
apps = SocialNetworkApp.objects.all()
for app in ap... | import logging
import hashlib
import hmac
import json
from django.http import HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from app.models import SocialNetworkApp
logger = logging.getLogger(__name__)
def _get_facebook_app():
apps = SocialNetworkApp.objects.all()
f... | <commit_before>import logging
import hashlib
import json
from django.http import HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from app.models import SocialNetworkApp
logger = logging.getLogger(__name__)
def _get_facebook_app():
apps = SocialNetworkApp.objects.all()
... | import logging
import hashlib
import hmac
import json
from django.http import HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from app.models import SocialNetworkApp
logger = logging.getLogger(__name__)
def _get_facebook_app():
apps = SocialNetworkApp.objects.all()
f... | import logging
import hashlib
import json
from django.http import HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from app.models import SocialNetworkApp
logger = logging.getLogger(__name__)
def _get_facebook_app():
apps = SocialNetworkApp.objects.all()
for app in ap... | <commit_before>import logging
import hashlib
import json
from django.http import HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from app.models import SocialNetworkApp
logger = logging.getLogger(__name__)
def _get_facebook_app():
apps = SocialNetworkApp.objects.all()
... |
2fdf0366819c2d1cbc9ff6987797eca5acd8de5a | config/freetype2/__init__.py | config/freetype2/__init__.py | import os
from SCons.Script import *
def configure(conf):
env = conf.env
conf.CBCheckHome('freetype2',
inc_suffix=['/include', '/include/freetype2'])
if not 'FREETYPE2_INCLUDE' in os.environ:
try:
env.ParseConfig('freetype-config --cflags')
except OSError... | import os
from SCons.Script import *
def configure(conf):
env = conf.env
conf.CBCheckHome('freetype2',
inc_suffix=['/include', '/include/freetype2'])
if not 'FREETYPE2_INCLUDE' in os.environ:
try:
env.ParseConfig('pkg-config freetype2 --cflags')
except OS... | Use pkg-config for freetype2 include discovery. | Use pkg-config for freetype2 include discovery.
| Python | lgpl-2.1 | CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang | import os
from SCons.Script import *
def configure(conf):
env = conf.env
conf.CBCheckHome('freetype2',
inc_suffix=['/include', '/include/freetype2'])
if not 'FREETYPE2_INCLUDE' in os.environ:
try:
env.ParseConfig('freetype-config --cflags')
except OSError... | import os
from SCons.Script import *
def configure(conf):
env = conf.env
conf.CBCheckHome('freetype2',
inc_suffix=['/include', '/include/freetype2'])
if not 'FREETYPE2_INCLUDE' in os.environ:
try:
env.ParseConfig('pkg-config freetype2 --cflags')
except OS... | <commit_before>import os
from SCons.Script import *
def configure(conf):
env = conf.env
conf.CBCheckHome('freetype2',
inc_suffix=['/include', '/include/freetype2'])
if not 'FREETYPE2_INCLUDE' in os.environ:
try:
env.ParseConfig('freetype-config --cflags')
... | import os
from SCons.Script import *
def configure(conf):
env = conf.env
conf.CBCheckHome('freetype2',
inc_suffix=['/include', '/include/freetype2'])
if not 'FREETYPE2_INCLUDE' in os.environ:
try:
env.ParseConfig('pkg-config freetype2 --cflags')
except OS... | import os
from SCons.Script import *
def configure(conf):
env = conf.env
conf.CBCheckHome('freetype2',
inc_suffix=['/include', '/include/freetype2'])
if not 'FREETYPE2_INCLUDE' in os.environ:
try:
env.ParseConfig('freetype-config --cflags')
except OSError... | <commit_before>import os
from SCons.Script import *
def configure(conf):
env = conf.env
conf.CBCheckHome('freetype2',
inc_suffix=['/include', '/include/freetype2'])
if not 'FREETYPE2_INCLUDE' in os.environ:
try:
env.ParseConfig('freetype-config --cflags')
... |
f9b1418c7ea46d3d69fac027f097c5c1ace62f74 | django_cradmin/viewhelpers/__init__.py | django_cradmin/viewhelpers/__init__.py | from . import mixins # noqa
from . import generic # noqa
from . import formbase # noqa
from . import crudbase # noqa
from . import create # noqa
from . import update # noqa
from . import delete # noqa
from . import detail # noqa
from . import listbuilderview # noqa
from . import multiselect # noqa
from . impo... | from . import mixins # noqa
from . import generic # noqa
from . import formbase # noqa
from . import crudbase # noqa
from . import create # noqa
from . import update # noqa
from . import delete # noqa
from . import detail # noqa
from . import listbuilderview # noqa
| Remove import for multiselect and objecttable. | viewhelpers: Remove import for multiselect and objecttable.
| Python | bsd-3-clause | appressoas/django_cradmin,appressoas/django_cradmin,appressoas/django_cradmin | from . import mixins # noqa
from . import generic # noqa
from . import formbase # noqa
from . import crudbase # noqa
from . import create # noqa
from . import update # noqa
from . import delete # noqa
from . import detail # noqa
from . import listbuilderview # noqa
from . import multiselect # noqa
from . impo... | from . import mixins # noqa
from . import generic # noqa
from . import formbase # noqa
from . import crudbase # noqa
from . import create # noqa
from . import update # noqa
from . import delete # noqa
from . import detail # noqa
from . import listbuilderview # noqa
| <commit_before>from . import mixins # noqa
from . import generic # noqa
from . import formbase # noqa
from . import crudbase # noqa
from . import create # noqa
from . import update # noqa
from . import delete # noqa
from . import detail # noqa
from . import listbuilderview # noqa
from . import multiselect # n... | from . import mixins # noqa
from . import generic # noqa
from . import formbase # noqa
from . import crudbase # noqa
from . import create # noqa
from . import update # noqa
from . import delete # noqa
from . import detail # noqa
from . import listbuilderview # noqa
| from . import mixins # noqa
from . import generic # noqa
from . import formbase # noqa
from . import crudbase # noqa
from . import create # noqa
from . import update # noqa
from . import delete # noqa
from . import detail # noqa
from . import listbuilderview # noqa
from . import multiselect # noqa
from . impo... | <commit_before>from . import mixins # noqa
from . import generic # noqa
from . import formbase # noqa
from . import crudbase # noqa
from . import create # noqa
from . import update # noqa
from . import delete # noqa
from . import detail # noqa
from . import listbuilderview # noqa
from . import multiselect # n... |
9deeb98a05483bfa262db59319c55eec78e900db | tests/test_stock.py | tests/test_stock.py | import unittest
from datetime import datetime
from stock import Stock
class StockTest(unittest.TestCase):
def test_new_stock_price(self):
"""A new stock should have a price that is None.
"""
stock = Stock("GOOG")
self.assertIsNone(stock.price)
def test_stock_update(self):
... | import unittest
from datetime import datetime
from stock import Stock
class StockTest(unittest.TestCase):
def test_new_stock_price(self):
"""A new stock should have a price that is None.
"""
stock = Stock("GOOG")
self.assertIsNone(stock.price)
def test_stock_update(self):
... | Add negative price exception test. | Add negative price exception test.
| Python | mit | bsmukasa/stock_alerter | import unittest
from datetime import datetime
from stock import Stock
class StockTest(unittest.TestCase):
def test_new_stock_price(self):
"""A new stock should have a price that is None.
"""
stock = Stock("GOOG")
self.assertIsNone(stock.price)
def test_stock_update(self):
... | import unittest
from datetime import datetime
from stock import Stock
class StockTest(unittest.TestCase):
def test_new_stock_price(self):
"""A new stock should have a price that is None.
"""
stock = Stock("GOOG")
self.assertIsNone(stock.price)
def test_stock_update(self):
... | <commit_before>import unittest
from datetime import datetime
from stock import Stock
class StockTest(unittest.TestCase):
def test_new_stock_price(self):
"""A new stock should have a price that is None.
"""
stock = Stock("GOOG")
self.assertIsNone(stock.price)
def test_stock_up... | import unittest
from datetime import datetime
from stock import Stock
class StockTest(unittest.TestCase):
def test_new_stock_price(self):
"""A new stock should have a price that is None.
"""
stock = Stock("GOOG")
self.assertIsNone(stock.price)
def test_stock_update(self):
... | import unittest
from datetime import datetime
from stock import Stock
class StockTest(unittest.TestCase):
def test_new_stock_price(self):
"""A new stock should have a price that is None.
"""
stock = Stock("GOOG")
self.assertIsNone(stock.price)
def test_stock_update(self):
... | <commit_before>import unittest
from datetime import datetime
from stock import Stock
class StockTest(unittest.TestCase):
def test_new_stock_price(self):
"""A new stock should have a price that is None.
"""
stock = Stock("GOOG")
self.assertIsNone(stock.price)
def test_stock_up... |
de88382029a01c036a3601c40cacc342f5212080 | api/base/views.py | api/base/views.py | from rest_framework.decorators import api_view
from rest_framework.response import Response
from .utils import absolute_reverse
from api.users.serializers import UserSerializer
@api_view(('GET',))
def root(request, format=None):
if request.user and not request.user.is_anonymous():
user = request.user
... | from rest_framework.decorators import api_view
from rest_framework.response import Response
from .utils import absolute_reverse
from api.users.serializers import UserSerializer
@api_view(('GET',))
def root(request, format=None):
if request.user and not request.user.is_anonymous():
user = request.user
... | Use request.version instead of hardcoding | Use request.version instead of hardcoding
| Python | apache-2.0 | KAsante95/osf.io,Johnetordoff/osf.io,petermalcolm/osf.io,mluo613/osf.io,saradbowman/osf.io,emetsger/osf.io,jmcarp/osf.io,Ghalko/osf.io,jinluyuan/osf.io,mluke93/osf.io,monikagrabowska/osf.io,hmoco/osf.io,chennan47/osf.io,zachjanicki/osf.io,acshi/osf.io,rdhyee/osf.io,jeffreyliu3230/osf.io,acshi/osf.io,mfraezz/osf.io,slor... | from rest_framework.decorators import api_view
from rest_framework.response import Response
from .utils import absolute_reverse
from api.users.serializers import UserSerializer
@api_view(('GET',))
def root(request, format=None):
if request.user and not request.user.is_anonymous():
user = request.user
... | from rest_framework.decorators import api_view
from rest_framework.response import Response
from .utils import absolute_reverse
from api.users.serializers import UserSerializer
@api_view(('GET',))
def root(request, format=None):
if request.user and not request.user.is_anonymous():
user = request.user
... | <commit_before>from rest_framework.decorators import api_view
from rest_framework.response import Response
from .utils import absolute_reverse
from api.users.serializers import UserSerializer
@api_view(('GET',))
def root(request, format=None):
if request.user and not request.user.is_anonymous():
user = r... | from rest_framework.decorators import api_view
from rest_framework.response import Response
from .utils import absolute_reverse
from api.users.serializers import UserSerializer
@api_view(('GET',))
def root(request, format=None):
if request.user and not request.user.is_anonymous():
user = request.user
... | from rest_framework.decorators import api_view
from rest_framework.response import Response
from .utils import absolute_reverse
from api.users.serializers import UserSerializer
@api_view(('GET',))
def root(request, format=None):
if request.user and not request.user.is_anonymous():
user = request.user
... | <commit_before>from rest_framework.decorators import api_view
from rest_framework.response import Response
from .utils import absolute_reverse
from api.users.serializers import UserSerializer
@api_view(('GET',))
def root(request, format=None):
if request.user and not request.user.is_anonymous():
user = r... |
e11166ed27b49250ee914c1227b3022ef7659e15 | curator/script.py | curator/script.py | import hashlib
from redis.exceptions import NoScriptError
class LuaScript(object):
def __init__(self, redis, template, cache):
self.redis = redis
self.template = template
self.cache = cache
self.script = self._render_template(template)
def _render_template(self, template):
... | import hashlib
from redis.exceptions import ResponseError
class LuaScript(object):
def __init__(self, redis, template, cache):
self.redis = redis
self.template = template
self.cache = cache
self.script = self._render_template(template)
def _render_template(self, template):
... | Use ResponseError instead of NoScriptError to be compatible with earlier versions of the redis client | Use ResponseError instead of NoScriptError to be compatible with earlier versions of the redis client
| Python | mit | eventbrite/curator | import hashlib
from redis.exceptions import NoScriptError
class LuaScript(object):
def __init__(self, redis, template, cache):
self.redis = redis
self.template = template
self.cache = cache
self.script = self._render_template(template)
def _render_template(self, template):
... | import hashlib
from redis.exceptions import ResponseError
class LuaScript(object):
def __init__(self, redis, template, cache):
self.redis = redis
self.template = template
self.cache = cache
self.script = self._render_template(template)
def _render_template(self, template):
... | <commit_before>import hashlib
from redis.exceptions import NoScriptError
class LuaScript(object):
def __init__(self, redis, template, cache):
self.redis = redis
self.template = template
self.cache = cache
self.script = self._render_template(template)
def _render_template(sel... | import hashlib
from redis.exceptions import ResponseError
class LuaScript(object):
def __init__(self, redis, template, cache):
self.redis = redis
self.template = template
self.cache = cache
self.script = self._render_template(template)
def _render_template(self, template):
... | import hashlib
from redis.exceptions import NoScriptError
class LuaScript(object):
def __init__(self, redis, template, cache):
self.redis = redis
self.template = template
self.cache = cache
self.script = self._render_template(template)
def _render_template(self, template):
... | <commit_before>import hashlib
from redis.exceptions import NoScriptError
class LuaScript(object):
def __init__(self, redis, template, cache):
self.redis = redis
self.template = template
self.cache = cache
self.script = self._render_template(template)
def _render_template(sel... |
4b459a367c67b40561b170b86c2df8882880d2be | test/test_examples.py | test/test_examples.py | # coding=utf-8
import os
import pytest
from os.path import join, dirname
from glob import glob
# tests to exclude
excludes = ['authorization_v1.py', 'alchemy_data_news_v1.py', 'alchemy_language_v1.py']
# examples path. /examples
examples_path = join(dirname(__file__), '../', 'examples', '*.py')
# environment varia... | # coding=utf-8
import os
import pytest
import json as json_import
from os.path import join, dirname
from glob import glob
# tests to exclude
excludes = ['authorization_v1.py', 'alchemy_data_news_v1.py', 'alchemy_language_v1.py', 'discovery_v1.ipynb', '__init__.py']
# examples path. /examples
examples_path = join(d... | Exclude tests if there are no credentials in VCAP_SERVICES | Exclude tests if there are no credentials in VCAP_SERVICES
| Python | apache-2.0 | ehdsouza/python-sdk,ehdsouza/python-sdk,ehdsouza/python-sdk | # coding=utf-8
import os
import pytest
from os.path import join, dirname
from glob import glob
# tests to exclude
excludes = ['authorization_v1.py', 'alchemy_data_news_v1.py', 'alchemy_language_v1.py']
# examples path. /examples
examples_path = join(dirname(__file__), '../', 'examples', '*.py')
# environment varia... | # coding=utf-8
import os
import pytest
import json as json_import
from os.path import join, dirname
from glob import glob
# tests to exclude
excludes = ['authorization_v1.py', 'alchemy_data_news_v1.py', 'alchemy_language_v1.py', 'discovery_v1.ipynb', '__init__.py']
# examples path. /examples
examples_path = join(d... | <commit_before># coding=utf-8
import os
import pytest
from os.path import join, dirname
from glob import glob
# tests to exclude
excludes = ['authorization_v1.py', 'alchemy_data_news_v1.py', 'alchemy_language_v1.py']
# examples path. /examples
examples_path = join(dirname(__file__), '../', 'examples', '*.py')
# en... | # coding=utf-8
import os
import pytest
import json as json_import
from os.path import join, dirname
from glob import glob
# tests to exclude
excludes = ['authorization_v1.py', 'alchemy_data_news_v1.py', 'alchemy_language_v1.py', 'discovery_v1.ipynb', '__init__.py']
# examples path. /examples
examples_path = join(d... | # coding=utf-8
import os
import pytest
from os.path import join, dirname
from glob import glob
# tests to exclude
excludes = ['authorization_v1.py', 'alchemy_data_news_v1.py', 'alchemy_language_v1.py']
# examples path. /examples
examples_path = join(dirname(__file__), '../', 'examples', '*.py')
# environment varia... | <commit_before># coding=utf-8
import os
import pytest
from os.path import join, dirname
from glob import glob
# tests to exclude
excludes = ['authorization_v1.py', 'alchemy_data_news_v1.py', 'alchemy_language_v1.py']
# examples path. /examples
examples_path = join(dirname(__file__), '../', 'examples', '*.py')
# en... |
c88171bef919dc02bf5796b1bc9318d60a680a8f | test/test_scraping.py | test/test_scraping.py | from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
self.assertIs(type(time),... | from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
assert type(time) is date... | Fix for assertIs method not being present in Python 2.6. | Fix for assertIs method not being present in Python 2.6.
| Python | mit | alanmcintyre/btce-api,CodeReclaimers/btce-api,lromanov/tidex-api | from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
self.assertIs(type(time),... | from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
assert type(time) is date... | <commit_before>from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
self.asser... | from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
assert type(time) is date... | from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
self.assertIs(type(time),... | <commit_before>from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
self.asser... |
61d71b27111f255c3dad3f974e6c7e0ace0c2ce9 | karld/iter_utils.py | karld/iter_utils.py | from functools import partial
from itertools import imap
from itertools import islice
from itertools import izip_longest
from itertools import ifilter
from operator import itemgetter
from operator import is_not
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter... | from functools import partial
from itertools import imap
from itertools import islice
from operator import itemgetter
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter_maker.
:param getter_maker: function that returns a getter function.
:param iterato... | Remove grouper and grouper based batchers | Remove grouper and grouper based batchers
I prefer to not use the filter fill value method to
batch. I don't like the need to allocate room for
the fill value object.
| Python | apache-2.0 | johnwlockwood/stream_tap,johnwlockwood/karl_data,johnwlockwood/iter_karld_tools,johnwlockwood/stream_tap | from functools import partial
from itertools import imap
from itertools import islice
from itertools import izip_longest
from itertools import ifilter
from operator import itemgetter
from operator import is_not
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter... | from functools import partial
from itertools import imap
from itertools import islice
from operator import itemgetter
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter_maker.
:param getter_maker: function that returns a getter function.
:param iterato... | <commit_before>from functools import partial
from itertools import imap
from itertools import islice
from itertools import izip_longest
from itertools import ifilter
from operator import itemgetter
from operator import is_not
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the r... | from functools import partial
from itertools import imap
from itertools import islice
from operator import itemgetter
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter_maker.
:param getter_maker: function that returns a getter function.
:param iterato... | from functools import partial
from itertools import imap
from itertools import islice
from itertools import izip_longest
from itertools import ifilter
from operator import itemgetter
from operator import is_not
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter... | <commit_before>from functools import partial
from itertools import imap
from itertools import islice
from itertools import izip_longest
from itertools import ifilter
from operator import itemgetter
from operator import is_not
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the r... |
6aad52505450b481d7b47e7ffe5c08cb7774e84a | python/testData/skeletons/BinaryStandardModule.py | python/testData/skeletons/BinaryStandardModule.py | import binascii
import datetime
import <error descr="No module named nonexistent">nonexistent</error>
print(binascii)
print(datetime)
print(nonexistent)
| import binascii
import datetime
import <error descr="No module named 'nonexistent'">nonexistent</error>
print(binascii)
print(datetime)
print(nonexistent)
| Fix test data in an env test on skeleton generation | i18n: Fix test data in an env test on skeleton generation
GitOrigin-RevId: 7be12c5b3b3a333e7e3afebe45fe32770bbdfa81 | Python | apache-2.0 | allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/int... | import binascii
import datetime
import <error descr="No module named nonexistent">nonexistent</error>
print(binascii)
print(datetime)
print(nonexistent)
i18n: Fix test data in an env test on skeleton generation
GitOrigin-RevId: 7be12c5b3b3a333e7e3afebe45fe32770bbdfa81 | import binascii
import datetime
import <error descr="No module named 'nonexistent'">nonexistent</error>
print(binascii)
print(datetime)
print(nonexistent)
| <commit_before>import binascii
import datetime
import <error descr="No module named nonexistent">nonexistent</error>
print(binascii)
print(datetime)
print(nonexistent)
<commit_msg>i18n: Fix test data in an env test on skeleton generation
GitOrigin-RevId: 7be12c5b3b3a333e7e3afebe45fe32770bbdfa81<commit_after> | import binascii
import datetime
import <error descr="No module named 'nonexistent'">nonexistent</error>
print(binascii)
print(datetime)
print(nonexistent)
| import binascii
import datetime
import <error descr="No module named nonexistent">nonexistent</error>
print(binascii)
print(datetime)
print(nonexistent)
i18n: Fix test data in an env test on skeleton generation
GitOrigin-RevId: 7be12c5b3b3a333e7e3afebe45fe32770bbdfa81import binascii
import datetime
import <error des... | <commit_before>import binascii
import datetime
import <error descr="No module named nonexistent">nonexistent</error>
print(binascii)
print(datetime)
print(nonexistent)
<commit_msg>i18n: Fix test data in an env test on skeleton generation
GitOrigin-RevId: 7be12c5b3b3a333e7e3afebe45fe32770bbdfa81<commit_after>import b... |
6d2255b6f44a18bae0b50fb528564c6767683c68 | src/bindings/python/test/test.py | src/bindings/python/test/test.py | #ckwg +4
# Copyright 2012 by Kitware, Inc. All Rights Reserved. Please refer to
# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
def test_error(msg):
import sys
sys.stderr.write('Error: %s\n' % msg)
def expect_exception... | #ckwg +4
# Copyright 2012 by Kitware, Inc. All Rights Reserved. Please refer to
# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
def test_error(msg):
import sys
sys.stderr.write('Error: %s\n' % msg)
def expect_exception... | Update Python expect_exception to be like C++'s | Update Python expect_exception to be like C++'s
| Python | bsd-3-clause | Kitware/sprokit,Kitware/sprokit,linus-sherrill/sprokit,Kitware/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,linus-sherrill/sprokit,mathstuf/sprokit,mathstuf/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,Kitware/sprokit | #ckwg +4
# Copyright 2012 by Kitware, Inc. All Rights Reserved. Please refer to
# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
def test_error(msg):
import sys
sys.stderr.write('Error: %s\n' % msg)
def expect_exception... | #ckwg +4
# Copyright 2012 by Kitware, Inc. All Rights Reserved. Please refer to
# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
def test_error(msg):
import sys
sys.stderr.write('Error: %s\n' % msg)
def expect_exception... | <commit_before>#ckwg +4
# Copyright 2012 by Kitware, Inc. All Rights Reserved. Please refer to
# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
def test_error(msg):
import sys
sys.stderr.write('Error: %s\n' % msg)
def e... | #ckwg +4
# Copyright 2012 by Kitware, Inc. All Rights Reserved. Please refer to
# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
def test_error(msg):
import sys
sys.stderr.write('Error: %s\n' % msg)
def expect_exception... | #ckwg +4
# Copyright 2012 by Kitware, Inc. All Rights Reserved. Please refer to
# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
def test_error(msg):
import sys
sys.stderr.write('Error: %s\n' % msg)
def expect_exception... | <commit_before>#ckwg +4
# Copyright 2012 by Kitware, Inc. All Rights Reserved. Please refer to
# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
def test_error(msg):
import sys
sys.stderr.write('Error: %s\n' % msg)
def e... |
654d3c666fd963760445f6ae8a6ba745ba85e014 | dci/server/tests/settings.py | dci/server/tests/settings.py | # -*- encoding: utf-8 -*-
#
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | # -*- encoding: utf-8 -*-
#
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | Remove logging to stdout when performing tests | Remove logging to stdout when performing tests
During tests it logs to /dev/null in order to avoid bottleneck
Change-Id: I4fd54cf1f2c572b9750d63450da67ef06101a8d8
| Python | apache-2.0 | enovance/dci-control-server,redhat-cip/dci-control-server,redhat-cip/dci-control-server,enovance/dci-control-server | # -*- encoding: utf-8 -*-
#
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | # -*- encoding: utf-8 -*-
#
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | <commit_before># -*- encoding: utf-8 -*-
#
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | # -*- encoding: utf-8 -*-
#
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | # -*- encoding: utf-8 -*-
#
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | <commit_before># -*- encoding: utf-8 -*-
#
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... |
285f4e21190d28e4e3b26dc62b9fd396de1db24e | keyring/__init__.py | keyring/__init__.py | from __future__ import absolute_import
import logging
logger = logging.getLogger('keyring')
from .core import (set_keyring, get_keyring, set_password, get_password,
delete_password)
from .getpassbackend import get_password as get_pass_get_password
try:
import pkg_resources
__version__ = pk... | from __future__ import absolute_import
import logging
logger = logging.getLogger('keyring')
from .core import (set_keyring, get_keyring, set_password, get_password,
delete_password)
from .getpassbackend import get_password as get_pass_get_password
try:
import pkg_resources
__version__ = pk... | Define __all__ to suppress lint warnings. | Define __all__ to suppress lint warnings.
| Python | mit | jaraco/keyring | from __future__ import absolute_import
import logging
logger = logging.getLogger('keyring')
from .core import (set_keyring, get_keyring, set_password, get_password,
delete_password)
from .getpassbackend import get_password as get_pass_get_password
try:
import pkg_resources
__version__ = pk... | from __future__ import absolute_import
import logging
logger = logging.getLogger('keyring')
from .core import (set_keyring, get_keyring, set_password, get_password,
delete_password)
from .getpassbackend import get_password as get_pass_get_password
try:
import pkg_resources
__version__ = pk... | <commit_before>from __future__ import absolute_import
import logging
logger = logging.getLogger('keyring')
from .core import (set_keyring, get_keyring, set_password, get_password,
delete_password)
from .getpassbackend import get_password as get_pass_get_password
try:
import pkg_resources
_... | from __future__ import absolute_import
import logging
logger = logging.getLogger('keyring')
from .core import (set_keyring, get_keyring, set_password, get_password,
delete_password)
from .getpassbackend import get_password as get_pass_get_password
try:
import pkg_resources
__version__ = pk... | from __future__ import absolute_import
import logging
logger = logging.getLogger('keyring')
from .core import (set_keyring, get_keyring, set_password, get_password,
delete_password)
from .getpassbackend import get_password as get_pass_get_password
try:
import pkg_resources
__version__ = pk... | <commit_before>from __future__ import absolute_import
import logging
logger = logging.getLogger('keyring')
from .core import (set_keyring, get_keyring, set_password, get_password,
delete_password)
from .getpassbackend import get_password as get_pass_get_password
try:
import pkg_resources
_... |
aae0e295ef1c020371831aa9145820d8678670f7 | axes/apps.py | axes/apps.py | from logging import getLogger
from pkg_resources import get_distribution
from django import apps
log = getLogger(__name__)
class AppConfig(apps.AppConfig):
name = "axes"
initialized = False
@classmethod
def initialize(cls):
"""
Initialize Axes logging and show version information.
... | from logging import getLogger
from pkg_resources import get_distribution
from django import apps
log = getLogger(__name__)
class AppConfig(apps.AppConfig):
name = "axes"
initialized = False
@classmethod
def initialize(cls):
"""
Initialize Axes logging and show version information.
... | Add QA skip for import ordering | Add QA skip for import ordering | Python | mit | jazzband/django-axes | from logging import getLogger
from pkg_resources import get_distribution
from django import apps
log = getLogger(__name__)
class AppConfig(apps.AppConfig):
name = "axes"
initialized = False
@classmethod
def initialize(cls):
"""
Initialize Axes logging and show version information.
... | from logging import getLogger
from pkg_resources import get_distribution
from django import apps
log = getLogger(__name__)
class AppConfig(apps.AppConfig):
name = "axes"
initialized = False
@classmethod
def initialize(cls):
"""
Initialize Axes logging and show version information.
... | <commit_before>from logging import getLogger
from pkg_resources import get_distribution
from django import apps
log = getLogger(__name__)
class AppConfig(apps.AppConfig):
name = "axes"
initialized = False
@classmethod
def initialize(cls):
"""
Initialize Axes logging and show version... | from logging import getLogger
from pkg_resources import get_distribution
from django import apps
log = getLogger(__name__)
class AppConfig(apps.AppConfig):
name = "axes"
initialized = False
@classmethod
def initialize(cls):
"""
Initialize Axes logging and show version information.
... | from logging import getLogger
from pkg_resources import get_distribution
from django import apps
log = getLogger(__name__)
class AppConfig(apps.AppConfig):
name = "axes"
initialized = False
@classmethod
def initialize(cls):
"""
Initialize Axes logging and show version information.
... | <commit_before>from logging import getLogger
from pkg_resources import get_distribution
from django import apps
log = getLogger(__name__)
class AppConfig(apps.AppConfig):
name = "axes"
initialized = False
@classmethod
def initialize(cls):
"""
Initialize Axes logging and show version... |
2733cf558a7455eb017ec4690307a2ee18afbd8b | blogtrans.py | blogtrans.py | from blogtrans.ui.MainWindow import *
import sys, traceback
import getopt
import wx
# Importers / Exporters
from blogtrans.wretch.WretchImporter import WretchImporter
from blogtrans.mt import *
from blogtrans.blogger.BloggerExporter import *
from blogtrans.blogger.BloggerImporter import *
def trap_error(func) :
... | from blogtrans.ui.MainWindow import *
import sys, traceback
import getopt
import wx
# Importers / Exporters
from blogtrans.wretch.WretchImporter import WretchImporter
from blogtrans.mt import *
from blogtrans.blogger.BloggerExporter import *
from blogtrans.blogger.BloggerImporter import *
def trap_error(func) :
... | Load blog data from command line | Load blog data from command line
| Python | mit | miaout17/blogtrans,miaout17/blogtrans | from blogtrans.ui.MainWindow import *
import sys, traceback
import getopt
import wx
# Importers / Exporters
from blogtrans.wretch.WretchImporter import WretchImporter
from blogtrans.mt import *
from blogtrans.blogger.BloggerExporter import *
from blogtrans.blogger.BloggerImporter import *
def trap_error(func) :
... | from blogtrans.ui.MainWindow import *
import sys, traceback
import getopt
import wx
# Importers / Exporters
from blogtrans.wretch.WretchImporter import WretchImporter
from blogtrans.mt import *
from blogtrans.blogger.BloggerExporter import *
from blogtrans.blogger.BloggerImporter import *
def trap_error(func) :
... | <commit_before>from blogtrans.ui.MainWindow import *
import sys, traceback
import getopt
import wx
# Importers / Exporters
from blogtrans.wretch.WretchImporter import WretchImporter
from blogtrans.mt import *
from blogtrans.blogger.BloggerExporter import *
from blogtrans.blogger.BloggerImporter import *
def trap_er... | from blogtrans.ui.MainWindow import *
import sys, traceback
import getopt
import wx
# Importers / Exporters
from blogtrans.wretch.WretchImporter import WretchImporter
from blogtrans.mt import *
from blogtrans.blogger.BloggerExporter import *
from blogtrans.blogger.BloggerImporter import *
def trap_error(func) :
... | from blogtrans.ui.MainWindow import *
import sys, traceback
import getopt
import wx
# Importers / Exporters
from blogtrans.wretch.WretchImporter import WretchImporter
from blogtrans.mt import *
from blogtrans.blogger.BloggerExporter import *
from blogtrans.blogger.BloggerImporter import *
def trap_error(func) :
... | <commit_before>from blogtrans.ui.MainWindow import *
import sys, traceback
import getopt
import wx
# Importers / Exporters
from blogtrans.wretch.WretchImporter import WretchImporter
from blogtrans.mt import *
from blogtrans.blogger.BloggerExporter import *
from blogtrans.blogger.BloggerImporter import *
def trap_er... |
a8a257ef2bfb63d175f7db1cb91924adae125b5c | sympy/core/tests/test_compatibility.py | sympy/core/tests/test_compatibility.py | from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def test_as_int... | from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def test_as_int... | Change docstring to inline comment | Change docstring to inline comment
This is in response to comment from smichr
modified: sympy/core/tests/test_compatibility.py
| Python | bsd-3-clause | Mitchkoens/sympy,Sumith1896/sympy,kaichogami/sympy,sunny94/temp,jamesblunt/sympy,pbrady/sympy,Vishluck/sympy,Titan-C/sympy,jaimahajan1997/sympy,kevalds51/sympy,yukoba/sympy,kevalds51/sympy,abhiii5459/sympy,debugger22/sympy,kumarkrishna/sympy,lindsayad/sympy,Vishluck/sympy,souravsingh/sympy,debugger22/sympy,yashsharan/s... | from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def test_as_int... | from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def test_as_int... | <commit_before>from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
... | from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def test_as_int... | from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def test_as_int... | <commit_before>from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
... |
ce23775d3a76b0b8ecf349733454c0709cfe53d8 | opentreemap/treemap/templatetags/paging.py | opentreemap/treemap/templatetags/paging.py | from django import template
register = template.Library()
@register.filter
def four_before_page(page_range, page):
"""Returns 4 or fewer pages before the given (1-based) page number"""
return page_range[max(page-5, 0):max(page-1, 0)]
@register.filter
def four_after_page(page_range, page):
"""Returns 4 ... | from django import template
register = template.Library()
@register.filter
def four_before_page(page_range, page):
"""Returns 4 or fewer pages before the given (1-based) page number"""
return list(page_range)[max(page-5, 0):max(page-1, 0)]
@register.filter
def four_after_page(page_range, page):
"""Retu... | Support Paginator.page_range returning an iterator or list | Support Paginator.page_range returning an iterator or list
Paginator.page_range will return an iterator in Django 1.9+
| Python | agpl-3.0 | maurizi/otm-core,maurizi/otm-core,maurizi/otm-core,maurizi/otm-core | from django import template
register = template.Library()
@register.filter
def four_before_page(page_range, page):
"""Returns 4 or fewer pages before the given (1-based) page number"""
return page_range[max(page-5, 0):max(page-1, 0)]
@register.filter
def four_after_page(page_range, page):
"""Returns 4 ... | from django import template
register = template.Library()
@register.filter
def four_before_page(page_range, page):
"""Returns 4 or fewer pages before the given (1-based) page number"""
return list(page_range)[max(page-5, 0):max(page-1, 0)]
@register.filter
def four_after_page(page_range, page):
"""Retu... | <commit_before>from django import template
register = template.Library()
@register.filter
def four_before_page(page_range, page):
"""Returns 4 or fewer pages before the given (1-based) page number"""
return page_range[max(page-5, 0):max(page-1, 0)]
@register.filter
def four_after_page(page_range, page):
... | from django import template
register = template.Library()
@register.filter
def four_before_page(page_range, page):
"""Returns 4 or fewer pages before the given (1-based) page number"""
return list(page_range)[max(page-5, 0):max(page-1, 0)]
@register.filter
def four_after_page(page_range, page):
"""Retu... | from django import template
register = template.Library()
@register.filter
def four_before_page(page_range, page):
"""Returns 4 or fewer pages before the given (1-based) page number"""
return page_range[max(page-5, 0):max(page-1, 0)]
@register.filter
def four_after_page(page_range, page):
"""Returns 4 ... | <commit_before>from django import template
register = template.Library()
@register.filter
def four_before_page(page_range, page):
"""Returns 4 or fewer pages before the given (1-based) page number"""
return page_range[max(page-5, 0):max(page-1, 0)]
@register.filter
def four_after_page(page_range, page):
... |
56b85e7f995eb460a5e6fedb9f2296e430d17e96 | listener.py | listener.py | # Listener Class Override
import time
import json
from tweepy.streaming import StreamListener
import sys
class Listener(StreamListener):
def __init__(self, twitter_api, start_time=time.time()):
self.time = start_time
self.api = twitter_api
def on_data(self, data):
# uids we are current... | # Listener Class Override
import time
import json
from tweepy.streaming import StreamListener
import sys
class Listener(StreamListener):
def __init__(self, twitter_api, start_time=time.time()):
self.time = start_time
self.api = twitter_api
def on_data(self, data):
# uids we are current... | Remove text to make tweet unique for testing | Remove text to make tweet unique for testing
| Python | mit | robot-overlord/syriarightnow | # Listener Class Override
import time
import json
from tweepy.streaming import StreamListener
import sys
class Listener(StreamListener):
def __init__(self, twitter_api, start_time=time.time()):
self.time = start_time
self.api = twitter_api
def on_data(self, data):
# uids we are current... | # Listener Class Override
import time
import json
from tweepy.streaming import StreamListener
import sys
class Listener(StreamListener):
def __init__(self, twitter_api, start_time=time.time()):
self.time = start_time
self.api = twitter_api
def on_data(self, data):
# uids we are current... | <commit_before># Listener Class Override
import time
import json
from tweepy.streaming import StreamListener
import sys
class Listener(StreamListener):
def __init__(self, twitter_api, start_time=time.time()):
self.time = start_time
self.api = twitter_api
def on_data(self, data):
# uids... | # Listener Class Override
import time
import json
from tweepy.streaming import StreamListener
import sys
class Listener(StreamListener):
def __init__(self, twitter_api, start_time=time.time()):
self.time = start_time
self.api = twitter_api
def on_data(self, data):
# uids we are current... | # Listener Class Override
import time
import json
from tweepy.streaming import StreamListener
import sys
class Listener(StreamListener):
def __init__(self, twitter_api, start_time=time.time()):
self.time = start_time
self.api = twitter_api
def on_data(self, data):
# uids we are current... | <commit_before># Listener Class Override
import time
import json
from tweepy.streaming import StreamListener
import sys
class Listener(StreamListener):
def __init__(self, twitter_api, start_time=time.time()):
self.time = start_time
self.api = twitter_api
def on_data(self, data):
# uids... |
10db07f1fc432f6f3e1e530d28cfbfd6ada0a321 | versebot/webparser.py | versebot/webparser.py | """
VerseBot for reddit
By Matthieu Grieger
webparser.py
Copyright (c) 2015 Matthieu Grieger (MIT License)
"""
from bs4 import BeautifulSoup
from urllib.request import urlopen
class Parser:
""" Parser class for BibleGateway parsing methods. """
def __init__(self):
""" Initializes translations att... | """
VerseBot for reddit
By Matthieu Grieger
webparser.py
Copyright (c) 2015 Matthieu Grieger (MIT License)
"""
from bs4 import BeautifulSoup
from urllib.request import urlopen
class Parser:
""" Parser class for BibleGateway parsing methods. """
def __init__(self):
""" Initializes translations att... | Rename translations to translations_select, switch to HTTPS | Rename translations to translations_select, switch to HTTPS
| Python | mit | Matthew-Arnold/slack-versebot,Matthew-Arnold/slack-versebot | """
VerseBot for reddit
By Matthieu Grieger
webparser.py
Copyright (c) 2015 Matthieu Grieger (MIT License)
"""
from bs4 import BeautifulSoup
from urllib.request import urlopen
class Parser:
""" Parser class for BibleGateway parsing methods. """
def __init__(self):
""" Initializes translations att... | """
VerseBot for reddit
By Matthieu Grieger
webparser.py
Copyright (c) 2015 Matthieu Grieger (MIT License)
"""
from bs4 import BeautifulSoup
from urllib.request import urlopen
class Parser:
""" Parser class for BibleGateway parsing methods. """
def __init__(self):
""" Initializes translations att... | <commit_before>"""
VerseBot for reddit
By Matthieu Grieger
webparser.py
Copyright (c) 2015 Matthieu Grieger (MIT License)
"""
from bs4 import BeautifulSoup
from urllib.request import urlopen
class Parser:
""" Parser class for BibleGateway parsing methods. """
def __init__(self):
""" Initializes t... | """
VerseBot for reddit
By Matthieu Grieger
webparser.py
Copyright (c) 2015 Matthieu Grieger (MIT License)
"""
from bs4 import BeautifulSoup
from urllib.request import urlopen
class Parser:
""" Parser class for BibleGateway parsing methods. """
def __init__(self):
""" Initializes translations att... | """
VerseBot for reddit
By Matthieu Grieger
webparser.py
Copyright (c) 2015 Matthieu Grieger (MIT License)
"""
from bs4 import BeautifulSoup
from urllib.request import urlopen
class Parser:
""" Parser class for BibleGateway parsing methods. """
def __init__(self):
""" Initializes translations att... | <commit_before>"""
VerseBot for reddit
By Matthieu Grieger
webparser.py
Copyright (c) 2015 Matthieu Grieger (MIT License)
"""
from bs4 import BeautifulSoup
from urllib.request import urlopen
class Parser:
""" Parser class for BibleGateway parsing methods. """
def __init__(self):
""" Initializes t... |
9d95974bb35ab6e7286fe762def7f117944268f0 | examples/balance.py | examples/balance.py | #!/usr/bin/env python
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
import messagebird
ACCESS_KEY = 'test_gshuPaZoeEG6ovbc8M79w0QyM'
try:
# Create a MessageBird client with the specified ACCESS_KEY.
client = messagebird.Client(ACCESS_KEY)
# Fetch the Balance object.
balan... | #!/usr/bin/env python
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import messagebird
ACCESS_KEY = 'test_gshuPaZoeEG6ovbc8M79w0QyM'
try:
# Create a MessageBird client with the specified ACCESS_KEY.
client = messagebird.Client(ACCESS_KEY)
# Fetch the Balance object.
balance... | Change double quotes to single quotes | Change double quotes to single quotes
| Python | bsd-2-clause | messagebird/python-rest-api | #!/usr/bin/env python
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
import messagebird
ACCESS_KEY = 'test_gshuPaZoeEG6ovbc8M79w0QyM'
try:
# Create a MessageBird client with the specified ACCESS_KEY.
client = messagebird.Client(ACCESS_KEY)
# Fetch the Balance object.
balan... | #!/usr/bin/env python
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import messagebird
ACCESS_KEY = 'test_gshuPaZoeEG6ovbc8M79w0QyM'
try:
# Create a MessageBird client with the specified ACCESS_KEY.
client = messagebird.Client(ACCESS_KEY)
# Fetch the Balance object.
balance... | <commit_before>#!/usr/bin/env python
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
import messagebird
ACCESS_KEY = 'test_gshuPaZoeEG6ovbc8M79w0QyM'
try:
# Create a MessageBird client with the specified ACCESS_KEY.
client = messagebird.Client(ACCESS_KEY)
# Fetch the Balance ... | #!/usr/bin/env python
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import messagebird
ACCESS_KEY = 'test_gshuPaZoeEG6ovbc8M79w0QyM'
try:
# Create a MessageBird client with the specified ACCESS_KEY.
client = messagebird.Client(ACCESS_KEY)
# Fetch the Balance object.
balance... | #!/usr/bin/env python
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
import messagebird
ACCESS_KEY = 'test_gshuPaZoeEG6ovbc8M79w0QyM'
try:
# Create a MessageBird client with the specified ACCESS_KEY.
client = messagebird.Client(ACCESS_KEY)
# Fetch the Balance object.
balan... | <commit_before>#!/usr/bin/env python
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
import messagebird
ACCESS_KEY = 'test_gshuPaZoeEG6ovbc8M79w0QyM'
try:
# Create a MessageBird client with the specified ACCESS_KEY.
client = messagebird.Client(ACCESS_KEY)
# Fetch the Balance ... |
6d660b0c27029817bc20406454ba565d09cfa31d | wagtail/core/forms.py | wagtail/core/forms.py | from django import forms
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
class PasswordViewRestrictionForm(forms.Form):
password = forms.CharField(label=gettext_lazy("Password"), widget=forms.PasswordInput)
return_url = forms.CharField(widget=forms.HiddenInp... | from django import forms
from django.utils.crypto import constant_time_compare
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
class PasswordViewRestrictionForm(forms.Form):
password = forms.CharField(label=gettext_lazy("Password"), widget=forms.PasswordInput)
... | Use constant_time_compare for view restriction password checks | Use constant_time_compare for view restriction password checks
| Python | bsd-3-clause | zerolab/wagtail,takeflight/wagtail,rsalmaso/wagtail,gasman/wagtail,thenewguy/wagtail,takeflight/wagtail,gasman/wagtail,mixxorz/wagtail,kaedroho/wagtail,FlipperPA/wagtail,rsalmaso/wagtail,wagtail/wagtail,thenewguy/wagtail,rsalmaso/wagtail,takeflight/wagtail,wagtail/wagtail,jnns/wagtail,torchbox/wagtail,mixxorz/wagtail,m... | from django import forms
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
class PasswordViewRestrictionForm(forms.Form):
password = forms.CharField(label=gettext_lazy("Password"), widget=forms.PasswordInput)
return_url = forms.CharField(widget=forms.HiddenInp... | from django import forms
from django.utils.crypto import constant_time_compare
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
class PasswordViewRestrictionForm(forms.Form):
password = forms.CharField(label=gettext_lazy("Password"), widget=forms.PasswordInput)
... | <commit_before>from django import forms
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
class PasswordViewRestrictionForm(forms.Form):
password = forms.CharField(label=gettext_lazy("Password"), widget=forms.PasswordInput)
return_url = forms.CharField(widget=... | from django import forms
from django.utils.crypto import constant_time_compare
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
class PasswordViewRestrictionForm(forms.Form):
password = forms.CharField(label=gettext_lazy("Password"), widget=forms.PasswordInput)
... | from django import forms
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
class PasswordViewRestrictionForm(forms.Form):
password = forms.CharField(label=gettext_lazy("Password"), widget=forms.PasswordInput)
return_url = forms.CharField(widget=forms.HiddenInp... | <commit_before>from django import forms
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
class PasswordViewRestrictionForm(forms.Form):
password = forms.CharField(label=gettext_lazy("Password"), widget=forms.PasswordInput)
return_url = forms.CharField(widget=... |
29beebfa571164827bf22618e85cc9db9d402c1a | plugins/FileHandlers/OBJReader/__init__.py | plugins/FileHandlers/OBJReader/__init__.py | #Shoopdawoop
from . import OBJReader
def getMetaData():
return {
'type': 'mesh_reader',
'plugin': {
"name": "OBJ Reader",
},
'mesh_reader': {
'extension': 'obj',
'description': 'LightWave OBJ File'
}
}
def register(app):
return OB... | #Shoopdawoop
from . import OBJReader
def getMetaData():
return {
'type': 'mesh_reader',
'plugin': {
"name": "OBJ Reader",
},
'mesh_reader': {
'extension': 'obj',
'description': 'Wavefront OBJ File'
}
}
def register(app):
return OB... | Set the right description for the OBJ reader | Set the right description for the OBJ reader
| Python | agpl-3.0 | onitake/Uranium,onitake/Uranium | #Shoopdawoop
from . import OBJReader
def getMetaData():
return {
'type': 'mesh_reader',
'plugin': {
"name": "OBJ Reader",
},
'mesh_reader': {
'extension': 'obj',
'description': 'LightWave OBJ File'
}
}
def register(app):
return OB... | #Shoopdawoop
from . import OBJReader
def getMetaData():
return {
'type': 'mesh_reader',
'plugin': {
"name": "OBJ Reader",
},
'mesh_reader': {
'extension': 'obj',
'description': 'Wavefront OBJ File'
}
}
def register(app):
return OB... | <commit_before>#Shoopdawoop
from . import OBJReader
def getMetaData():
return {
'type': 'mesh_reader',
'plugin': {
"name": "OBJ Reader",
},
'mesh_reader': {
'extension': 'obj',
'description': 'LightWave OBJ File'
}
}
def register(app)... | #Shoopdawoop
from . import OBJReader
def getMetaData():
return {
'type': 'mesh_reader',
'plugin': {
"name": "OBJ Reader",
},
'mesh_reader': {
'extension': 'obj',
'description': 'Wavefront OBJ File'
}
}
def register(app):
return OB... | #Shoopdawoop
from . import OBJReader
def getMetaData():
return {
'type': 'mesh_reader',
'plugin': {
"name": "OBJ Reader",
},
'mesh_reader': {
'extension': 'obj',
'description': 'LightWave OBJ File'
}
}
def register(app):
return OB... | <commit_before>#Shoopdawoop
from . import OBJReader
def getMetaData():
return {
'type': 'mesh_reader',
'plugin': {
"name": "OBJ Reader",
},
'mesh_reader': {
'extension': 'obj',
'description': 'LightWave OBJ File'
}
}
def register(app)... |
eac6629dca5a368048b4d2eeec30f760efd867a1 | conanfile.py | conanfile.py | from conans import ConanFile
import os
class ArghConan(ConanFile):
name = "argh"
version = "1.2.0"
url = "https://github.com/adishavit/argh"
description = "Argh! A minimalist argument handler."
license = "BSD 3-Clause"
exports = ["LICENSE"]
exports_sources = "*.h"
def package(self):
... | from conans import ConanFile
import os
class ArghConan(ConanFile):
name = "argh"
version = "1.2.1"
url = "https://github.com/adishavit/argh"
description = "Argh! A minimalist argument handler."
license = "BSD 3-Clause"
exports = ["LICENSE"]
exports_sources = "argh.h"
def package(self)... | Create release 1.2.1 with conan and bintray support. | Create release 1.2.1 with conan and bintray support.
| Python | bsd-3-clause | adishavit/argh,adishavit/argh | from conans import ConanFile
import os
class ArghConan(ConanFile):
name = "argh"
version = "1.2.0"
url = "https://github.com/adishavit/argh"
description = "Argh! A minimalist argument handler."
license = "BSD 3-Clause"
exports = ["LICENSE"]
exports_sources = "*.h"
def package(self):
... | from conans import ConanFile
import os
class ArghConan(ConanFile):
name = "argh"
version = "1.2.1"
url = "https://github.com/adishavit/argh"
description = "Argh! A minimalist argument handler."
license = "BSD 3-Clause"
exports = ["LICENSE"]
exports_sources = "argh.h"
def package(self)... | <commit_before>from conans import ConanFile
import os
class ArghConan(ConanFile):
name = "argh"
version = "1.2.0"
url = "https://github.com/adishavit/argh"
description = "Argh! A minimalist argument handler."
license = "BSD 3-Clause"
exports = ["LICENSE"]
exports_sources = "*.h"
def p... | from conans import ConanFile
import os
class ArghConan(ConanFile):
name = "argh"
version = "1.2.1"
url = "https://github.com/adishavit/argh"
description = "Argh! A minimalist argument handler."
license = "BSD 3-Clause"
exports = ["LICENSE"]
exports_sources = "argh.h"
def package(self)... | from conans import ConanFile
import os
class ArghConan(ConanFile):
name = "argh"
version = "1.2.0"
url = "https://github.com/adishavit/argh"
description = "Argh! A minimalist argument handler."
license = "BSD 3-Clause"
exports = ["LICENSE"]
exports_sources = "*.h"
def package(self):
... | <commit_before>from conans import ConanFile
import os
class ArghConan(ConanFile):
name = "argh"
version = "1.2.0"
url = "https://github.com/adishavit/argh"
description = "Argh! A minimalist argument handler."
license = "BSD 3-Clause"
exports = ["LICENSE"]
exports_sources = "*.h"
def p... |
fc8318361755d7327fc6e02dbbd68a6221acad34 | impersonate/migrations/0001_initial.py | impersonate/migrations/0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | Fix unicode strings in migration | Fix unicode strings in migration
Fixes #31
| Python | bsd-3-clause | Top20Talent/django-impersonate,Top20Talent/django-impersonate | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
mi... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
mi... |
ef4bd591abc794211624c0723d15cfa311370bb2 | examples/chatserver/views.py | examples/chatserver/views.py | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.decorators.csrf import csrf_exempt
import redis
from ws4redis import settings as redis_settings
class BaseTemplateView(TemplateView):
def ge... | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.decorators.csrf import csrf_exempt
import redis
from ws4redis import settings as redis_settings
class BaseTemplateView(TemplateView):
def ge... | Use META.SERVER_NAME in template view. | Use META.SERVER_NAME in template view.
We may want to access this example from a different machine.
| Python | mit | schinckel/django-websocket-redis | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.decorators.csrf import csrf_exempt
import redis
from ws4redis import settings as redis_settings
class BaseTemplateView(TemplateView):
def ge... | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.decorators.csrf import csrf_exempt
import redis
from ws4redis import settings as redis_settings
class BaseTemplateView(TemplateView):
def ge... | <commit_before># -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.decorators.csrf import csrf_exempt
import redis
from ws4redis import settings as redis_settings
class BaseTemplateView(TemplateVi... | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.decorators.csrf import csrf_exempt
import redis
from ws4redis import settings as redis_settings
class BaseTemplateView(TemplateView):
def ge... | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.decorators.csrf import csrf_exempt
import redis
from ws4redis import settings as redis_settings
class BaseTemplateView(TemplateView):
def ge... | <commit_before># -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.decorators.csrf import csrf_exempt
import redis
from ws4redis import settings as redis_settings
class BaseTemplateView(TemplateVi... |
c8c858cd26031178a8be30c3824577e0832806dc | bookworm/settings_mobile.py | bookworm/settings_mobile.py | from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
| from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
SESSION_COOKIE_NAME = 'bookworm_mobile'
| Change cookie name for mobile setting | Change cookie name for mobile setting
--HG--
extra : convert_revision : svn%3Ae08d0fb5-4147-0410-a205-bba44f1f51a3/trunk%40553
| Python | bsd-3-clause | erochest/threepress-rdfa,erochest/threepress-rdfa,erochest/threepress-rdfa,erochest/threepress-rdfa | from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
Change cookie name for mobile setting
--HG--
extra : convert_re... | from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
SESSION_COOKIE_NAME = 'bookworm_mobile'
| <commit_before>from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
<commit_msg>Change cookie name for mobile setting... | from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
SESSION_COOKIE_NAME = 'bookworm_mobile'
| from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
Change cookie name for mobile setting
--HG--
extra : convert_re... | <commit_before>from settings import *
import settings
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
'%s/library/templates/mobile/auth' % ROOT_PATH,
'%s/library/templates/mobile' % ROOT_PATH,
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
<commit_msg>Change cookie name for mobile setting... |
d883208fa4084e06aa0f19ba7031566f33260e23 | lib/web/web.py | lib/web/web.py | import os, os.path
import random
import string
import json
import cherrypy
from . import get_pic
class StringGenerator(object):
@cherrypy.expose
def index(self):
return """<html>
<head>
<link href="/static/css/style.css" rel="stylesheet">
</head>
<body>
... | import os, os.path
import random
import string
import json
import cherrypy
from . import get_pic
class StringGenerator(object):
@cherrypy.expose
def index(self):
return """<html>
<head>
<link href="/static/css/style.css" rel="stylesheet">
</head>
<body>
... | Add sample urls to json.dump | Add sample urls to json.dump
| Python | mit | DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat | import os, os.path
import random
import string
import json
import cherrypy
from . import get_pic
class StringGenerator(object):
@cherrypy.expose
def index(self):
return """<html>
<head>
<link href="/static/css/style.css" rel="stylesheet">
</head>
<body>
... | import os, os.path
import random
import string
import json
import cherrypy
from . import get_pic
class StringGenerator(object):
@cherrypy.expose
def index(self):
return """<html>
<head>
<link href="/static/css/style.css" rel="stylesheet">
</head>
<body>
... | <commit_before>import os, os.path
import random
import string
import json
import cherrypy
from . import get_pic
class StringGenerator(object):
@cherrypy.expose
def index(self):
return """<html>
<head>
<link href="/static/css/style.css" rel="stylesheet">
</head>
... | import os, os.path
import random
import string
import json
import cherrypy
from . import get_pic
class StringGenerator(object):
@cherrypy.expose
def index(self):
return """<html>
<head>
<link href="/static/css/style.css" rel="stylesheet">
</head>
<body>
... | import os, os.path
import random
import string
import json
import cherrypy
from . import get_pic
class StringGenerator(object):
@cherrypy.expose
def index(self):
return """<html>
<head>
<link href="/static/css/style.css" rel="stylesheet">
</head>
<body>
... | <commit_before>import os, os.path
import random
import string
import json
import cherrypy
from . import get_pic
class StringGenerator(object):
@cherrypy.expose
def index(self):
return """<html>
<head>
<link href="/static/css/style.css" rel="stylesheet">
</head>
... |
fc3f64de95554a66e2ec64804acf9c6032dd7e7b | test/rsrc/convert_stub.py | test/rsrc/convert_stub.py | #!/usr/bin/env python
"""A tiny tool used to test the `convert` plugin. It copies a file and appends
a specified text tag.
"""
import sys
def convert(in_file, out_file, tag):
"""Copy `in_file` to `out_file` and append the string `tag`.
"""
with open(out_file, 'wb') as out_f:
with open(in_file, '... | #!/usr/bin/env python
"""A tiny tool used to test the `convert` plugin. It copies a file and appends
a specified text tag.
"""
import sys
def convert(in_file, out_file, tag):
"""Copy `in_file` to `out_file` and append the string `tag`.
"""
# On Python 3, encode the tag argument as bytes.
if not isin... | Convert stub: Python 3 compatibility | Convert stub: Python 3 compatibility
Important for systems where `python` is 3.x, like Arch, even when beets itself
is running on Python 2.
| Python | mit | madmouser1/beets,jcoady9/beets,jcoady9/beets,xsteadfastx/beets,madmouser1/beets,diego-plan9/beets,Kraymer/beets,jackwilsdon/beets,sampsyo/beets,beetbox/beets,MyTunesFreeMusic/privacy-policy,shamangeorge/beets,pkess/beets,Kraymer/beets,mosesfistos1/beetbox,Kraymer/beets,sampsyo/beets,lengtche/beets,pkess/beets,xsteadfas... | #!/usr/bin/env python
"""A tiny tool used to test the `convert` plugin. It copies a file and appends
a specified text tag.
"""
import sys
def convert(in_file, out_file, tag):
"""Copy `in_file` to `out_file` and append the string `tag`.
"""
with open(out_file, 'wb') as out_f:
with open(in_file, '... | #!/usr/bin/env python
"""A tiny tool used to test the `convert` plugin. It copies a file and appends
a specified text tag.
"""
import sys
def convert(in_file, out_file, tag):
"""Copy `in_file` to `out_file` and append the string `tag`.
"""
# On Python 3, encode the tag argument as bytes.
if not isin... | <commit_before>#!/usr/bin/env python
"""A tiny tool used to test the `convert` plugin. It copies a file and appends
a specified text tag.
"""
import sys
def convert(in_file, out_file, tag):
"""Copy `in_file` to `out_file` and append the string `tag`.
"""
with open(out_file, 'wb') as out_f:
with ... | #!/usr/bin/env python
"""A tiny tool used to test the `convert` plugin. It copies a file and appends
a specified text tag.
"""
import sys
def convert(in_file, out_file, tag):
"""Copy `in_file` to `out_file` and append the string `tag`.
"""
# On Python 3, encode the tag argument as bytes.
if not isin... | #!/usr/bin/env python
"""A tiny tool used to test the `convert` plugin. It copies a file and appends
a specified text tag.
"""
import sys
def convert(in_file, out_file, tag):
"""Copy `in_file` to `out_file` and append the string `tag`.
"""
with open(out_file, 'wb') as out_f:
with open(in_file, '... | <commit_before>#!/usr/bin/env python
"""A tiny tool used to test the `convert` plugin. It copies a file and appends
a specified text tag.
"""
import sys
def convert(in_file, out_file, tag):
"""Copy `in_file` to `out_file` and append the string `tag`.
"""
with open(out_file, 'wb') as out_f:
with ... |
901868b42f98b8b25bc49e0930e0eb4bb56f26d1 | lib/rapidsms/tests/test_backend_irc.py | lib/rapidsms/tests/test_backend_irc.py | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import unittest
from harness import MockRouter
class TestLog(unittest.TestCase):
def test_backend_irc (self):
router = MockRouter()
try:
import irclib
from rapidsms.backends.irc import Backend
backend = Backend(... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import unittest
from harness import MockRouter
class TestBackendIRC(unittest.TestCase):
def test_backend_irc (self):
router = MockRouter()
try:
import irclib
from rapidsms.backends.irc import Backend
backend = B... | Rename test class (sloppy cut n' paste job) | Rename test class (sloppy cut n' paste job)
| Python | bsd-3-clause | rapidsms/rapidsms-legacy,rapidsms/rapidsms-legacy,rapidsms/rapidsms-legacy | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import unittest
from harness import MockRouter
class TestLog(unittest.TestCase):
def test_backend_irc (self):
router = MockRouter()
try:
import irclib
from rapidsms.backends.irc import Backend
backend = Backend(... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import unittest
from harness import MockRouter
class TestBackendIRC(unittest.TestCase):
def test_backend_irc (self):
router = MockRouter()
try:
import irclib
from rapidsms.backends.irc import Backend
backend = B... | <commit_before>#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import unittest
from harness import MockRouter
class TestLog(unittest.TestCase):
def test_backend_irc (self):
router = MockRouter()
try:
import irclib
from rapidsms.backends.irc import Backend
bac... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import unittest
from harness import MockRouter
class TestBackendIRC(unittest.TestCase):
def test_backend_irc (self):
router = MockRouter()
try:
import irclib
from rapidsms.backends.irc import Backend
backend = B... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import unittest
from harness import MockRouter
class TestLog(unittest.TestCase):
def test_backend_irc (self):
router = MockRouter()
try:
import irclib
from rapidsms.backends.irc import Backend
backend = Backend(... | <commit_before>#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import unittest
from harness import MockRouter
class TestLog(unittest.TestCase):
def test_backend_irc (self):
router = MockRouter()
try:
import irclib
from rapidsms.backends.irc import Backend
bac... |
9dad4f997371011ee7fe9f6ecd0c1a58cbba6d27 | html_parse.py | html_parse.py | from bs4 import BeautifulSoup
def parse(html):
soup = BeautifulSoup(html, features="html.parser")
return soup.get_text() | import imp
import logging
log = logging.getLogger(__name__)
def module_exists(module_name):
try:
imp.find_module(module_name)
return True
except ImportError:
return False
if module_exists("bs4"):
log.info("Parsing HTML using beautifulsoup4")
from bs4 import BeautifulSoup
... | Add support for html2text or no parser Will still prefer beautifulsoup4 if installed | Add support for html2text or no parser
Will still prefer beautifulsoup4 if installed
| Python | mit | idiotandrobot/heathergraph | from bs4 import BeautifulSoup
def parse(html):
soup = BeautifulSoup(html, features="html.parser")
return soup.get_text()Add support for html2text or no parser
Will still prefer beautifulsoup4 if installed | import imp
import logging
log = logging.getLogger(__name__)
def module_exists(module_name):
try:
imp.find_module(module_name)
return True
except ImportError:
return False
if module_exists("bs4"):
log.info("Parsing HTML using beautifulsoup4")
from bs4 import BeautifulSoup
... | <commit_before>from bs4 import BeautifulSoup
def parse(html):
soup = BeautifulSoup(html, features="html.parser")
return soup.get_text()<commit_msg>Add support for html2text or no parser
Will still prefer beautifulsoup4 if installed<commit_after> | import imp
import logging
log = logging.getLogger(__name__)
def module_exists(module_name):
try:
imp.find_module(module_name)
return True
except ImportError:
return False
if module_exists("bs4"):
log.info("Parsing HTML using beautifulsoup4")
from bs4 import BeautifulSoup
... | from bs4 import BeautifulSoup
def parse(html):
soup = BeautifulSoup(html, features="html.parser")
return soup.get_text()Add support for html2text or no parser
Will still prefer beautifulsoup4 if installedimport imp
import logging
log = logging.getLogger(__name__)
def module_exists(module_name):
try:
... | <commit_before>from bs4 import BeautifulSoup
def parse(html):
soup = BeautifulSoup(html, features="html.parser")
return soup.get_text()<commit_msg>Add support for html2text or no parser
Will still prefer beautifulsoup4 if installed<commit_after>import imp
import logging
log = logging.getLogger(__name__)
def m... |
ebafc242445e1a8413cd6afd45ae53d989850f9e | subprocrunner/error.py | subprocrunner/error.py | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
import subprocess
import sys
from typing import Optional
from .typing import Command
class CommandError(Exception):
@property
def cmd(self) -> Optional[Command]:
return self.__cmd
@property
def errno(self) -> Optional[... | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
# keep the following line for backward compatibility
from subprocess import CalledProcessError # noqa
from typing import Optional
from .typing import Command
class CommandError(Exception):
@property
def cmd(self) -> Optional[Command]:... | Remove a class definition that no longer needed | Remove a class definition that no longer needed
| Python | mit | thombashi/subprocrunner,thombashi/subprocrunner | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
import subprocess
import sys
from typing import Optional
from .typing import Command
class CommandError(Exception):
@property
def cmd(self) -> Optional[Command]:
return self.__cmd
@property
def errno(self) -> Optional[... | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
# keep the following line for backward compatibility
from subprocess import CalledProcessError # noqa
from typing import Optional
from .typing import Command
class CommandError(Exception):
@property
def cmd(self) -> Optional[Command]:... | <commit_before>"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
import subprocess
import sys
from typing import Optional
from .typing import Command
class CommandError(Exception):
@property
def cmd(self) -> Optional[Command]:
return self.__cmd
@property
def errno(sel... | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
# keep the following line for backward compatibility
from subprocess import CalledProcessError # noqa
from typing import Optional
from .typing import Command
class CommandError(Exception):
@property
def cmd(self) -> Optional[Command]:... | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
import subprocess
import sys
from typing import Optional
from .typing import Command
class CommandError(Exception):
@property
def cmd(self) -> Optional[Command]:
return self.__cmd
@property
def errno(self) -> Optional[... | <commit_before>"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
import subprocess
import sys
from typing import Optional
from .typing import Command
class CommandError(Exception):
@property
def cmd(self) -> Optional[Command]:
return self.__cmd
@property
def errno(sel... |
c21fe453911af190f3cbd93356396d4f5e65195e | mopidy/backends/gstreamer.py | mopidy/backends/gstreamer.py | import logging
import gst
from mopidy import config
from mopidy.backends import BaseBackend
from mopidy.models import Artist, Album, Track, Playlist
logger = logging.getLogger(u'backends.gstreamer')
class GStreamerBackend(BaseBackend):
def __init__(self, *args, **kwargs):
super(GStreamerBackend, self)._... | import logging
import gst
from mopidy import config
from mopidy.backends import BaseBackend
from mopidy.models import Artist, Album, Track, Playlist
logger = logging.getLogger(u'backends.gstreamer')
class GStreamerBackend(BaseBackend):
def __init__(self, *args, **kwargs):
super(GStreamerBackend, self)._... | Clean play code for GStreamer | Clean play code for GStreamer
| Python | apache-2.0 | vrs01/mopidy,bacontext/mopidy,vrs01/mopidy,quartz55/mopidy,priestd09/mopidy,swak/mopidy,liamw9534/mopidy,hkariti/mopidy,pacificIT/mopidy,ZenithDK/mopidy,hkariti/mopidy,dbrgn/mopidy,kingosticks/mopidy,ZenithDK/mopidy,diandiankan/mopidy,vrs01/mopidy,hkariti/mopidy,pacificIT/mopidy,ali/mopidy,SuperStarPL/mopidy,adamcik/mo... | import logging
import gst
from mopidy import config
from mopidy.backends import BaseBackend
from mopidy.models import Artist, Album, Track, Playlist
logger = logging.getLogger(u'backends.gstreamer')
class GStreamerBackend(BaseBackend):
def __init__(self, *args, **kwargs):
super(GStreamerBackend, self)._... | import logging
import gst
from mopidy import config
from mopidy.backends import BaseBackend
from mopidy.models import Artist, Album, Track, Playlist
logger = logging.getLogger(u'backends.gstreamer')
class GStreamerBackend(BaseBackend):
def __init__(self, *args, **kwargs):
super(GStreamerBackend, self)._... | <commit_before>import logging
import gst
from mopidy import config
from mopidy.backends import BaseBackend
from mopidy.models import Artist, Album, Track, Playlist
logger = logging.getLogger(u'backends.gstreamer')
class GStreamerBackend(BaseBackend):
def __init__(self, *args, **kwargs):
super(GStreamerB... | import logging
import gst
from mopidy import config
from mopidy.backends import BaseBackend
from mopidy.models import Artist, Album, Track, Playlist
logger = logging.getLogger(u'backends.gstreamer')
class GStreamerBackend(BaseBackend):
def __init__(self, *args, **kwargs):
super(GStreamerBackend, self)._... | import logging
import gst
from mopidy import config
from mopidy.backends import BaseBackend
from mopidy.models import Artist, Album, Track, Playlist
logger = logging.getLogger(u'backends.gstreamer')
class GStreamerBackend(BaseBackend):
def __init__(self, *args, **kwargs):
super(GStreamerBackend, self)._... | <commit_before>import logging
import gst
from mopidy import config
from mopidy.backends import BaseBackend
from mopidy.models import Artist, Album, Track, Playlist
logger = logging.getLogger(u'backends.gstreamer')
class GStreamerBackend(BaseBackend):
def __init__(self, *args, **kwargs):
super(GStreamerB... |
454ee9051bd8d949eb290fb4d3a622941c9ccc74 | test/python/test_binarycodec.py | test/python/test_binarycodec.py | '''Unit tests for CODA binary serialization'''
import io
import unittest
from coda import descriptors
from coda.io.binarycodec import BinaryCodec
from coda.runtime.descdata import BoolValue
class BinaryCodecTest(unittest.TestCase):
def setUp(self):
self.buffer = io.BytesIO()
# self.encoder = BinaryCodec.crea... | '''Unit tests for CODA binary serialization'''
import io
import unittest
from coda import descriptors
from coda.io.binarycodec import BinaryCodec
from coda.runtime.descdata import BoolValue
class BinaryCodecTest(unittest.TestCase):
def setUp(self):
self.buffer = io.BytesIO()
# self.encoder = BinaryCodec.crea... | Disable debug mode in python unit test. | Disable debug mode in python unit test.
| Python | apache-2.0 | viridia/coda,viridia/coda,viridia/coda | '''Unit tests for CODA binary serialization'''
import io
import unittest
from coda import descriptors
from coda.io.binarycodec import BinaryCodec
from coda.runtime.descdata import BoolValue
class BinaryCodecTest(unittest.TestCase):
def setUp(self):
self.buffer = io.BytesIO()
# self.encoder = BinaryCodec.crea... | '''Unit tests for CODA binary serialization'''
import io
import unittest
from coda import descriptors
from coda.io.binarycodec import BinaryCodec
from coda.runtime.descdata import BoolValue
class BinaryCodecTest(unittest.TestCase):
def setUp(self):
self.buffer = io.BytesIO()
# self.encoder = BinaryCodec.crea... | <commit_before>'''Unit tests for CODA binary serialization'''
import io
import unittest
from coda import descriptors
from coda.io.binarycodec import BinaryCodec
from coda.runtime.descdata import BoolValue
class BinaryCodecTest(unittest.TestCase):
def setUp(self):
self.buffer = io.BytesIO()
# self.encoder = B... | '''Unit tests for CODA binary serialization'''
import io
import unittest
from coda import descriptors
from coda.io.binarycodec import BinaryCodec
from coda.runtime.descdata import BoolValue
class BinaryCodecTest(unittest.TestCase):
def setUp(self):
self.buffer = io.BytesIO()
# self.encoder = BinaryCodec.crea... | '''Unit tests for CODA binary serialization'''
import io
import unittest
from coda import descriptors
from coda.io.binarycodec import BinaryCodec
from coda.runtime.descdata import BoolValue
class BinaryCodecTest(unittest.TestCase):
def setUp(self):
self.buffer = io.BytesIO()
# self.encoder = BinaryCodec.crea... | <commit_before>'''Unit tests for CODA binary serialization'''
import io
import unittest
from coda import descriptors
from coda.io.binarycodec import BinaryCodec
from coda.runtime.descdata import BoolValue
class BinaryCodecTest(unittest.TestCase):
def setUp(self):
self.buffer = io.BytesIO()
# self.encoder = B... |
22f01c8727377fcbeb68489c9658443dd9e367dc | flask-app/nickITAPI/app.py | flask-app/nickITAPI/app.py | from flask import Flask, Response, request, jsonify
from ldap3 import Server, Connection, ALL
import json
import re
app = Flask(__name__) # create the application instance :)
@app.route('/')
def hello_world():
return 'Hello, World!'
def parse_query(query):
nick_list = re.compile('\s*[,]+\s*').split(query)
... | from flask import Flask, Response, request, jsonify, abort, render_template
from ldap3 import Server, Connection, ALL
import json
import re
app = Flask(__name__) # create the application instance :)
@app.route('/')
def hello_world():
return 'Hello, World!'
def parse_query(query):
nick_list = re.compile('\s*[... | Add handling of an empty search | Add handling of an empty search
| Python | mit | cthit/nickIT,cthit/nickIT,cthit/nickIT | from flask import Flask, Response, request, jsonify
from ldap3 import Server, Connection, ALL
import json
import re
app = Flask(__name__) # create the application instance :)
@app.route('/')
def hello_world():
return 'Hello, World!'
def parse_query(query):
nick_list = re.compile('\s*[,]+\s*').split(query)
... | from flask import Flask, Response, request, jsonify, abort, render_template
from ldap3 import Server, Connection, ALL
import json
import re
app = Flask(__name__) # create the application instance :)
@app.route('/')
def hello_world():
return 'Hello, World!'
def parse_query(query):
nick_list = re.compile('\s*[... | <commit_before>from flask import Flask, Response, request, jsonify
from ldap3 import Server, Connection, ALL
import json
import re
app = Flask(__name__) # create the application instance :)
@app.route('/')
def hello_world():
return 'Hello, World!'
def parse_query(query):
nick_list = re.compile('\s*[,]+\s*').... | from flask import Flask, Response, request, jsonify, abort, render_template
from ldap3 import Server, Connection, ALL
import json
import re
app = Flask(__name__) # create the application instance :)
@app.route('/')
def hello_world():
return 'Hello, World!'
def parse_query(query):
nick_list = re.compile('\s*[... | from flask import Flask, Response, request, jsonify
from ldap3 import Server, Connection, ALL
import json
import re
app = Flask(__name__) # create the application instance :)
@app.route('/')
def hello_world():
return 'Hello, World!'
def parse_query(query):
nick_list = re.compile('\s*[,]+\s*').split(query)
... | <commit_before>from flask import Flask, Response, request, jsonify
from ldap3 import Server, Connection, ALL
import json
import re
app = Flask(__name__) # create the application instance :)
@app.route('/')
def hello_world():
return 'Hello, World!'
def parse_query(query):
nick_list = re.compile('\s*[,]+\s*').... |
bbcbcefedcbff4cfd7a16cbfa904b42462f1ee88 | python/ql/test/query-tests/Variables/unused/type_annotation_fp.py | python/ql/test/query-tests/Variables/unused/type_annotation_fp.py | # FP Type annotation counts as redefinition
# See https://github.com/Semmle/ql/issues/2652
def type_annotation(x):
foo = 5
if x:
foo : int
do_stuff_with(foo)
else:
foo : float
do_other_stuff_with(foo)
| # FP Type annotation counts as redefinition
# See https://github.com/Semmle/ql/issues/2652
def type_annotation(x):
foo = 5
if x:
foo : int
do_stuff_with(foo)
else:
foo : float
do_other_stuff_with(foo)
def type_annotation_fn():
# False negative: the value of `bar` is nev... | Add false negative test case. | Python: Add false negative test case.
| Python | mit | github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql | # FP Type annotation counts as redefinition
# See https://github.com/Semmle/ql/issues/2652
def type_annotation(x):
foo = 5
if x:
foo : int
do_stuff_with(foo)
else:
foo : float
do_other_stuff_with(foo)
Python: Add false negative test case. | # FP Type annotation counts as redefinition
# See https://github.com/Semmle/ql/issues/2652
def type_annotation(x):
foo = 5
if x:
foo : int
do_stuff_with(foo)
else:
foo : float
do_other_stuff_with(foo)
def type_annotation_fn():
# False negative: the value of `bar` is nev... | <commit_before># FP Type annotation counts as redefinition
# See https://github.com/Semmle/ql/issues/2652
def type_annotation(x):
foo = 5
if x:
foo : int
do_stuff_with(foo)
else:
foo : float
do_other_stuff_with(foo)
<commit_msg>Python: Add false negative test case.<commit_af... | # FP Type annotation counts as redefinition
# See https://github.com/Semmle/ql/issues/2652
def type_annotation(x):
foo = 5
if x:
foo : int
do_stuff_with(foo)
else:
foo : float
do_other_stuff_with(foo)
def type_annotation_fn():
# False negative: the value of `bar` is nev... | # FP Type annotation counts as redefinition
# See https://github.com/Semmle/ql/issues/2652
def type_annotation(x):
foo = 5
if x:
foo : int
do_stuff_with(foo)
else:
foo : float
do_other_stuff_with(foo)
Python: Add false negative test case.# FP Type annotation counts as redefi... | <commit_before># FP Type annotation counts as redefinition
# See https://github.com/Semmle/ql/issues/2652
def type_annotation(x):
foo = 5
if x:
foo : int
do_stuff_with(foo)
else:
foo : float
do_other_stuff_with(foo)
<commit_msg>Python: Add false negative test case.<commit_af... |
4889f26d51cafca6e36d29e6bcf62f4af6c6712d | openfisca_country_template/entities.py | openfisca_country_template/entities.py | # -*- coding: utf-8 -*-
# This file defines the entities needed by our legislation.
from openfisca_core.entities import build_entity
Household = build_entity(
key = "household",
plural = "households",
label = u'Household',
roles = [
{
'key': 'parent',
'plural': 'parent... | # -*- coding: utf-8 -*-
# This file defines the entities needed by our legislation.
from openfisca_core.entities import build_entity
Household = build_entity(
key = "household",
plural = "households",
label = u'Household',
roles = [
{
'key': 'parent',
'plural': 'parent... | Add docstring on every entity | Add docstring on every entity | Python | agpl-3.0 | openfisca/country-template,openfisca/country-template | # -*- coding: utf-8 -*-
# This file defines the entities needed by our legislation.
from openfisca_core.entities import build_entity
Household = build_entity(
key = "household",
plural = "households",
label = u'Household',
roles = [
{
'key': 'parent',
'plural': 'parent... | # -*- coding: utf-8 -*-
# This file defines the entities needed by our legislation.
from openfisca_core.entities import build_entity
Household = build_entity(
key = "household",
plural = "households",
label = u'Household',
roles = [
{
'key': 'parent',
'plural': 'parent... | <commit_before># -*- coding: utf-8 -*-
# This file defines the entities needed by our legislation.
from openfisca_core.entities import build_entity
Household = build_entity(
key = "household",
plural = "households",
label = u'Household',
roles = [
{
'key': 'parent',
'p... | # -*- coding: utf-8 -*-
# This file defines the entities needed by our legislation.
from openfisca_core.entities import build_entity
Household = build_entity(
key = "household",
plural = "households",
label = u'Household',
roles = [
{
'key': 'parent',
'plural': 'parent... | # -*- coding: utf-8 -*-
# This file defines the entities needed by our legislation.
from openfisca_core.entities import build_entity
Household = build_entity(
key = "household",
plural = "households",
label = u'Household',
roles = [
{
'key': 'parent',
'plural': 'parent... | <commit_before># -*- coding: utf-8 -*-
# This file defines the entities needed by our legislation.
from openfisca_core.entities import build_entity
Household = build_entity(
key = "household",
plural = "households",
label = u'Household',
roles = [
{
'key': 'parent',
'p... |
00f270137c460361537f979adc9da18a38324f2f | openremote-server-python/openremote.py | openremote-server-python/openremote.py | #!/usr/bin/env python
import sys
import re
import subprocess
import urlparse
import platform
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class OpenRemoteHandler(BaseHTTPRequestHandler):
def do_GET(self):
url = ''
try:
request_url = urlparse.urlsplit(self.path)
... | #!/usr/bin/env python
import re
import webbrowser
import urlparse
import platform
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class OpenRemoteHandler(BaseHTTPRequestHandler):
def do_GET(self):
url = ''
try:
request_url = urlparse.urlsplit(self.path)
if re.... | Use the webserver module, which means the script is now cross-platform. Hooray, Python\! | Use the webserver module, which means the script is now cross-platform. Hooray, Python\!
| Python | mit | chuckbjones/openremote,chuckbjones/openremote,chuckbjones/openremote,chuckbjones/openremote | #!/usr/bin/env python
import sys
import re
import subprocess
import urlparse
import platform
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class OpenRemoteHandler(BaseHTTPRequestHandler):
def do_GET(self):
url = ''
try:
request_url = urlparse.urlsplit(self.path)
... | #!/usr/bin/env python
import re
import webbrowser
import urlparse
import platform
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class OpenRemoteHandler(BaseHTTPRequestHandler):
def do_GET(self):
url = ''
try:
request_url = urlparse.urlsplit(self.path)
if re.... | <commit_before>#!/usr/bin/env python
import sys
import re
import subprocess
import urlparse
import platform
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class OpenRemoteHandler(BaseHTTPRequestHandler):
def do_GET(self):
url = ''
try:
request_url = urlparse.urlsplit(sel... | #!/usr/bin/env python
import re
import webbrowser
import urlparse
import platform
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class OpenRemoteHandler(BaseHTTPRequestHandler):
def do_GET(self):
url = ''
try:
request_url = urlparse.urlsplit(self.path)
if re.... | #!/usr/bin/env python
import sys
import re
import subprocess
import urlparse
import platform
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class OpenRemoteHandler(BaseHTTPRequestHandler):
def do_GET(self):
url = ''
try:
request_url = urlparse.urlsplit(self.path)
... | <commit_before>#!/usr/bin/env python
import sys
import re
import subprocess
import urlparse
import platform
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class OpenRemoteHandler(BaseHTTPRequestHandler):
def do_GET(self):
url = ''
try:
request_url = urlparse.urlsplit(sel... |
d4070aaee0e086b934912982d77126af53e9ade8 | src/core/tests.py | src/core/tests.py | # -*- coding: utf-8 -*-
from django.test import TestCase
from .models import Session
from .models import Spec
# if self.name == '':
# names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('name')
# name_suffix = 1
# if len(names):
# names = [x.name for x in nam... | # -*- coding: utf-8 -*-
from django.test import TestCase
from .models import Session
from .models import Spec
# if self.name == '':
# names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('name')
# name_suffix = 1
# if len(names):
# names = [x.name for x in nam... | Create 'Untitled 2' session name. | Create 'Untitled 2' session name. | Python | mit | uxebu/tddbin-backend,uxebu/tddbin-backend | # -*- coding: utf-8 -*-
from django.test import TestCase
from .models import Session
from .models import Spec
# if self.name == '':
# names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('name')
# name_suffix = 1
# if len(names):
# names = [x.name for x in nam... | # -*- coding: utf-8 -*-
from django.test import TestCase
from .models import Session
from .models import Spec
# if self.name == '':
# names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('name')
# name_suffix = 1
# if len(names):
# names = [x.name for x in nam... | <commit_before># -*- coding: utf-8 -*-
from django.test import TestCase
from .models import Session
from .models import Spec
# if self.name == '':
# names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('name')
# name_suffix = 1
# if len(names):
# names = [x.na... | # -*- coding: utf-8 -*-
from django.test import TestCase
from .models import Session
from .models import Spec
# if self.name == '':
# names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('name')
# name_suffix = 1
# if len(names):
# names = [x.name for x in nam... | # -*- coding: utf-8 -*-
from django.test import TestCase
from .models import Session
from .models import Spec
# if self.name == '':
# names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('name')
# name_suffix = 1
# if len(names):
# names = [x.name for x in nam... | <commit_before># -*- coding: utf-8 -*-
from django.test import TestCase
from .models import Session
from .models import Spec
# if self.name == '':
# names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('name')
# name_suffix = 1
# if len(names):
# names = [x.na... |
57f3141bf61fe74cc4ba3472f42640e0fada0f44 | tests/spin_one_half_gen_test.py | tests/spin_one_half_gen_test.py | """Tests for the general model with explicit one-half spin."""
import pytest
from drudge import UP, DOWN, SpinOneHalfGenDrudge
@pytest.fixture(scope='module')
def dr(spark_ctx):
"""The fixture with a general spin one-half drudge."""
return SpinOneHalfGenDrudge(spark_ctx)
def test_spin_one_half_general_dru... | """Tests for the general model with explicit one-half spin."""
import pytest
from sympy import IndexedBase, symbols, Rational
from drudge import CR, AN, UP, DOWN, SpinOneHalfGenDrudge
@pytest.fixture(scope='module')
def dr(spark_ctx):
"""The fixture with a general spin one-half drudge."""
return SpinOneHal... | Add test for restricted HF theory | Add test for restricted HF theory
| Python | mit | tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge | """Tests for the general model with explicit one-half spin."""
import pytest
from drudge import UP, DOWN, SpinOneHalfGenDrudge
@pytest.fixture(scope='module')
def dr(spark_ctx):
"""The fixture with a general spin one-half drudge."""
return SpinOneHalfGenDrudge(spark_ctx)
def test_spin_one_half_general_dru... | """Tests for the general model with explicit one-half spin."""
import pytest
from sympy import IndexedBase, symbols, Rational
from drudge import CR, AN, UP, DOWN, SpinOneHalfGenDrudge
@pytest.fixture(scope='module')
def dr(spark_ctx):
"""The fixture with a general spin one-half drudge."""
return SpinOneHal... | <commit_before>"""Tests for the general model with explicit one-half spin."""
import pytest
from drudge import UP, DOWN, SpinOneHalfGenDrudge
@pytest.fixture(scope='module')
def dr(spark_ctx):
"""The fixture with a general spin one-half drudge."""
return SpinOneHalfGenDrudge(spark_ctx)
def test_spin_one_h... | """Tests for the general model with explicit one-half spin."""
import pytest
from sympy import IndexedBase, symbols, Rational
from drudge import CR, AN, UP, DOWN, SpinOneHalfGenDrudge
@pytest.fixture(scope='module')
def dr(spark_ctx):
"""The fixture with a general spin one-half drudge."""
return SpinOneHal... | """Tests for the general model with explicit one-half spin."""
import pytest
from drudge import UP, DOWN, SpinOneHalfGenDrudge
@pytest.fixture(scope='module')
def dr(spark_ctx):
"""The fixture with a general spin one-half drudge."""
return SpinOneHalfGenDrudge(spark_ctx)
def test_spin_one_half_general_dru... | <commit_before>"""Tests for the general model with explicit one-half spin."""
import pytest
from drudge import UP, DOWN, SpinOneHalfGenDrudge
@pytest.fixture(scope='module')
def dr(spark_ctx):
"""The fixture with a general spin one-half drudge."""
return SpinOneHalfGenDrudge(spark_ctx)
def test_spin_one_h... |
f1e7776b8c01081bf54c2c1be0dc2c15e5566ec9 | tests/testnet/aio/test_block.py | tests/testnet/aio/test_block.py | # -*- coding: utf-8 -*-
import pytest
import logging
from bitshares.aio.block import Block
log = logging.getLogger("grapheneapi")
log.setLevel(logging.DEBUG)
@pytest.mark.asyncio
async def test_aio_block(bitshares):
block = await Block(333, blockchain_instance=bitshares)
assert block["witness"] == "1.6.6"
... | # -*- coding: utf-8 -*-
import asyncio
import pytest
import logging
from bitshares.aio.block import Block
log = logging.getLogger("grapheneapi")
log.setLevel(logging.DEBUG)
@pytest.mark.asyncio
async def test_aio_block(bitshares):
# Wait for block
await asyncio.sleep(1)
block = await Block(1, blockchain... | Fix test for async Block | Fix test for async Block
| Python | mit | xeroc/python-bitshares | # -*- coding: utf-8 -*-
import pytest
import logging
from bitshares.aio.block import Block
log = logging.getLogger("grapheneapi")
log.setLevel(logging.DEBUG)
@pytest.mark.asyncio
async def test_aio_block(bitshares):
block = await Block(333, blockchain_instance=bitshares)
assert block["witness"] == "1.6.6"
... | # -*- coding: utf-8 -*-
import asyncio
import pytest
import logging
from bitshares.aio.block import Block
log = logging.getLogger("grapheneapi")
log.setLevel(logging.DEBUG)
@pytest.mark.asyncio
async def test_aio_block(bitshares):
# Wait for block
await asyncio.sleep(1)
block = await Block(1, blockchain... | <commit_before># -*- coding: utf-8 -*-
import pytest
import logging
from bitshares.aio.block import Block
log = logging.getLogger("grapheneapi")
log.setLevel(logging.DEBUG)
@pytest.mark.asyncio
async def test_aio_block(bitshares):
block = await Block(333, blockchain_instance=bitshares)
assert block["witness... | # -*- coding: utf-8 -*-
import asyncio
import pytest
import logging
from bitshares.aio.block import Block
log = logging.getLogger("grapheneapi")
log.setLevel(logging.DEBUG)
@pytest.mark.asyncio
async def test_aio_block(bitshares):
# Wait for block
await asyncio.sleep(1)
block = await Block(1, blockchain... | # -*- coding: utf-8 -*-
import pytest
import logging
from bitshares.aio.block import Block
log = logging.getLogger("grapheneapi")
log.setLevel(logging.DEBUG)
@pytest.mark.asyncio
async def test_aio_block(bitshares):
block = await Block(333, blockchain_instance=bitshares)
assert block["witness"] == "1.6.6"
... | <commit_before># -*- coding: utf-8 -*-
import pytest
import logging
from bitshares.aio.block import Block
log = logging.getLogger("grapheneapi")
log.setLevel(logging.DEBUG)
@pytest.mark.asyncio
async def test_aio_block(bitshares):
block = await Block(333, blockchain_instance=bitshares)
assert block["witness... |
7f0097d240c4a231029222fdd2bf507ca7d5b2ed | tests/v6/exemplar_generators.py | tests/v6/exemplar_generators.py | from .context import tohu
from tohu.v5.primitive_generators import *
EXEMPLAR_PRIMITIVE_GENERATORS = [
Constant("quux"),
Integer(100, 200),
]
EXEMPLAR_DERIVED_GENERATORS = []
EXEMPLAR_GENERATORS = EXEMPLAR_PRIMITIVE_GENERATORS + EXEMPLAR_DERIVED_GENERATORS | from .context import tohu
from tohu.v5.primitive_generators import *
EXEMPLAR_PRIMITIVE_GENERATORS = [
Constant("quux"),
Integer(100, 200),
HashDigest(length=8),
FakerGenerator(method="name"),
]
EXEMPLAR_DERIVED_GENERATORS = []
EXEMPLAR_GENERATORS = EXEMPLAR_PRIMITIVE_GENERATORS + EXEMPLAR_DERIVED_G... | Add exemplar generators for HashDigest, FakerGenerator | Add exemplar generators for HashDigest, FakerGenerator
| Python | mit | maxalbert/tohu | from .context import tohu
from tohu.v5.primitive_generators import *
EXEMPLAR_PRIMITIVE_GENERATORS = [
Constant("quux"),
Integer(100, 200),
]
EXEMPLAR_DERIVED_GENERATORS = []
EXEMPLAR_GENERATORS = EXEMPLAR_PRIMITIVE_GENERATORS + EXEMPLAR_DERIVED_GENERATORSAdd exemplar generators for HashDigest, FakerGenerat... | from .context import tohu
from tohu.v5.primitive_generators import *
EXEMPLAR_PRIMITIVE_GENERATORS = [
Constant("quux"),
Integer(100, 200),
HashDigest(length=8),
FakerGenerator(method="name"),
]
EXEMPLAR_DERIVED_GENERATORS = []
EXEMPLAR_GENERATORS = EXEMPLAR_PRIMITIVE_GENERATORS + EXEMPLAR_DERIVED_G... | <commit_before>from .context import tohu
from tohu.v5.primitive_generators import *
EXEMPLAR_PRIMITIVE_GENERATORS = [
Constant("quux"),
Integer(100, 200),
]
EXEMPLAR_DERIVED_GENERATORS = []
EXEMPLAR_GENERATORS = EXEMPLAR_PRIMITIVE_GENERATORS + EXEMPLAR_DERIVED_GENERATORS<commit_msg>Add exemplar generators f... | from .context import tohu
from tohu.v5.primitive_generators import *
EXEMPLAR_PRIMITIVE_GENERATORS = [
Constant("quux"),
Integer(100, 200),
HashDigest(length=8),
FakerGenerator(method="name"),
]
EXEMPLAR_DERIVED_GENERATORS = []
EXEMPLAR_GENERATORS = EXEMPLAR_PRIMITIVE_GENERATORS + EXEMPLAR_DERIVED_G... | from .context import tohu
from tohu.v5.primitive_generators import *
EXEMPLAR_PRIMITIVE_GENERATORS = [
Constant("quux"),
Integer(100, 200),
]
EXEMPLAR_DERIVED_GENERATORS = []
EXEMPLAR_GENERATORS = EXEMPLAR_PRIMITIVE_GENERATORS + EXEMPLAR_DERIVED_GENERATORSAdd exemplar generators for HashDigest, FakerGenerat... | <commit_before>from .context import tohu
from tohu.v5.primitive_generators import *
EXEMPLAR_PRIMITIVE_GENERATORS = [
Constant("quux"),
Integer(100, 200),
]
EXEMPLAR_DERIVED_GENERATORS = []
EXEMPLAR_GENERATORS = EXEMPLAR_PRIMITIVE_GENERATORS + EXEMPLAR_DERIVED_GENERATORS<commit_msg>Add exemplar generators f... |
88c4e5630c7689b44100e899c666e7d78b54b975 | adhocracy4/emails/mixins.py | adhocracy4/emails/mixins.py | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
class PlatformEmailMixin():
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments()
filename = find... | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
class PlatformEmailMixin():
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments()
filename = find... | Allow to supply a different logo version for email | Allow to supply a different logo version for email
- use symlink if the same logo should be used
| Python | agpl-3.0 | liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4 | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
class PlatformEmailMixin():
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments()
filename = find... | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
class PlatformEmailMixin():
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments()
filename = find... | <commit_before>from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
class PlatformEmailMixin():
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments()
... | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
class PlatformEmailMixin():
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments()
filename = find... | from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
class PlatformEmailMixin():
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments()
filename = find... | <commit_before>from email.mime.image import MIMEImage
from django.contrib.staticfiles import finders
class PlatformEmailMixin():
"""
Attaches the static file images/logo.png so it can be used in an html
email.
"""
def get_attachments(self):
attachments = super().get_attachments()
... |
fd5f3875d0d7e0fdb7b7ef33a94cf50d1d2b5fa4 | tests/write_to_stringio_test.py | tests/write_to_stringio_test.py | #! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# vi:ts=4:et
import pycurl
import unittest
from . import appmanager
from . import util
setup_module, teardown_module = appmanager.setup(('app', 8380))
class WriteToStringioTest(unittest.TestCase):
def setUp(self):
self.curl = pycurl.Curl()
def... | #! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# vi:ts=4:et
import pycurl
import unittest
import sys
from . import appmanager
from . import util
setup_module, teardown_module = appmanager.setup(('app', 8380))
class WriteToStringioTest(unittest.TestCase):
def setUp(self):
self.curl = pycurl.Curl()
... | Add a test for writing to StringIO which is now different and does not work | Add a test for writing to StringIO which is now different and does not work
| Python | lgpl-2.1 | pycurl/pycurl,pycurl/pycurl,pycurl/pycurl | #! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# vi:ts=4:et
import pycurl
import unittest
from . import appmanager
from . import util
setup_module, teardown_module = appmanager.setup(('app', 8380))
class WriteToStringioTest(unittest.TestCase):
def setUp(self):
self.curl = pycurl.Curl()
def... | #! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# vi:ts=4:et
import pycurl
import unittest
import sys
from . import appmanager
from . import util
setup_module, teardown_module = appmanager.setup(('app', 8380))
class WriteToStringioTest(unittest.TestCase):
def setUp(self):
self.curl = pycurl.Curl()
... | <commit_before>#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# vi:ts=4:et
import pycurl
import unittest
from . import appmanager
from . import util
setup_module, teardown_module = appmanager.setup(('app', 8380))
class WriteToStringioTest(unittest.TestCase):
def setUp(self):
self.curl = pycurl.Curl... | #! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# vi:ts=4:et
import pycurl
import unittest
import sys
from . import appmanager
from . import util
setup_module, teardown_module = appmanager.setup(('app', 8380))
class WriteToStringioTest(unittest.TestCase):
def setUp(self):
self.curl = pycurl.Curl()
... | #! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# vi:ts=4:et
import pycurl
import unittest
from . import appmanager
from . import util
setup_module, teardown_module = appmanager.setup(('app', 8380))
class WriteToStringioTest(unittest.TestCase):
def setUp(self):
self.curl = pycurl.Curl()
def... | <commit_before>#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# vi:ts=4:et
import pycurl
import unittest
from . import appmanager
from . import util
setup_module, teardown_module = appmanager.setup(('app', 8380))
class WriteToStringioTest(unittest.TestCase):
def setUp(self):
self.curl = pycurl.Curl... |
c3e88993964f1c775829fc2f14aea2e84d33c099 | tests/frontends/mpd/protocol/audio_output_test.py | tests/frontends/mpd/protocol/audio_output_test.py | from __future__ import unicode_literals
from tests.frontends.mpd import protocol
class AudioOutputHandlerTest(protocol.BaseTestCase):
def test_enableoutput(self):
self.sendRequest('enableoutput "0"')
self.assertInResponse('OK')
def test_disableoutput(self):
self.sendRequest('disableo... | from __future__ import unicode_literals
from tests.frontends.mpd import protocol
class AudioOutputHandlerTest(protocol.BaseTestCase):
def test_enableoutput(self):
self.core.playback.mute = True
self.sendRequest('enableoutput "0"')
self.assertInResponse('OK')
self.assertEqual(sel... | Test that output enabling/disabling unmutes/mutes audio | mpd: Test that output enabling/disabling unmutes/mutes audio
| Python | apache-2.0 | jmarsik/mopidy,mopidy/mopidy,priestd09/mopidy,hkariti/mopidy,rawdlite/mopidy,adamcik/mopidy,vrs01/mopidy,ZenithDK/mopidy,ali/mopidy,bacontext/mopidy,kingosticks/mopidy,jcass77/mopidy,bacontext/mopidy,mopidy/mopidy,glogiotatidis/mopidy,bacontext/mopidy,woutervanwijk/mopidy,diandiankan/mopidy,bencevans/mopidy,dbrgn/mopid... | from __future__ import unicode_literals
from tests.frontends.mpd import protocol
class AudioOutputHandlerTest(protocol.BaseTestCase):
def test_enableoutput(self):
self.sendRequest('enableoutput "0"')
self.assertInResponse('OK')
def test_disableoutput(self):
self.sendRequest('disableo... | from __future__ import unicode_literals
from tests.frontends.mpd import protocol
class AudioOutputHandlerTest(protocol.BaseTestCase):
def test_enableoutput(self):
self.core.playback.mute = True
self.sendRequest('enableoutput "0"')
self.assertInResponse('OK')
self.assertEqual(sel... | <commit_before>from __future__ import unicode_literals
from tests.frontends.mpd import protocol
class AudioOutputHandlerTest(protocol.BaseTestCase):
def test_enableoutput(self):
self.sendRequest('enableoutput "0"')
self.assertInResponse('OK')
def test_disableoutput(self):
self.sendRe... | from __future__ import unicode_literals
from tests.frontends.mpd import protocol
class AudioOutputHandlerTest(protocol.BaseTestCase):
def test_enableoutput(self):
self.core.playback.mute = True
self.sendRequest('enableoutput "0"')
self.assertInResponse('OK')
self.assertEqual(sel... | from __future__ import unicode_literals
from tests.frontends.mpd import protocol
class AudioOutputHandlerTest(protocol.BaseTestCase):
def test_enableoutput(self):
self.sendRequest('enableoutput "0"')
self.assertInResponse('OK')
def test_disableoutput(self):
self.sendRequest('disableo... | <commit_before>from __future__ import unicode_literals
from tests.frontends.mpd import protocol
class AudioOutputHandlerTest(protocol.BaseTestCase):
def test_enableoutput(self):
self.sendRequest('enableoutput "0"')
self.assertInResponse('OK')
def test_disableoutput(self):
self.sendRe... |
de09310ebfd932cd725954e9c05f5a1ce78311e0 | news/management/commands/sync_newsletters.py | news/management/commands/sync_newsletters.py | from django.conf import settings
from django.core.management import BaseCommand
from synctool.functions import sync_data
DEFAULT_SYNC_DOMAIN = 'basket.mozilla.org'
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('-d', '--domain',
default=geta... | from django.conf import settings
from django.core.management import BaseCommand
from synctool.functions import sync_data
from news.newsletters import clear_newsletter_cache, clear_sms_cache
DEFAULT_SYNC_DOMAIN = 'basket.mozilla.org'
class Command(BaseCommand):
def add_arguments(self, parser):
parser.a... | Add cache clear to sync command | Add cache clear to sync command
| Python | mpl-2.0 | glogiotatidis/basket,glogiotatidis/basket,glogiotatidis/basket | from django.conf import settings
from django.core.management import BaseCommand
from synctool.functions import sync_data
DEFAULT_SYNC_DOMAIN = 'basket.mozilla.org'
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('-d', '--domain',
default=geta... | from django.conf import settings
from django.core.management import BaseCommand
from synctool.functions import sync_data
from news.newsletters import clear_newsletter_cache, clear_sms_cache
DEFAULT_SYNC_DOMAIN = 'basket.mozilla.org'
class Command(BaseCommand):
def add_arguments(self, parser):
parser.a... | <commit_before>from django.conf import settings
from django.core.management import BaseCommand
from synctool.functions import sync_data
DEFAULT_SYNC_DOMAIN = 'basket.mozilla.org'
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('-d', '--domain',
... | from django.conf import settings
from django.core.management import BaseCommand
from synctool.functions import sync_data
from news.newsletters import clear_newsletter_cache, clear_sms_cache
DEFAULT_SYNC_DOMAIN = 'basket.mozilla.org'
class Command(BaseCommand):
def add_arguments(self, parser):
parser.a... | from django.conf import settings
from django.core.management import BaseCommand
from synctool.functions import sync_data
DEFAULT_SYNC_DOMAIN = 'basket.mozilla.org'
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('-d', '--domain',
default=geta... | <commit_before>from django.conf import settings
from django.core.management import BaseCommand
from synctool.functions import sync_data
DEFAULT_SYNC_DOMAIN = 'basket.mozilla.org'
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('-d', '--domain',
... |
7226e9ae349eadba10d8f23f81df0b4d70adb6a2 | detectem/plugins/helpers.py | detectem/plugins/helpers.py | def meta_generator(name):
return '//meta[@name="generator" and contains(@content, "{}")]' \
'/@content'.format(name)
| def meta_generator(name):
return '//meta[re:test(@name,"generator","i") and contains(@content, "{}")]' \
'/@content'.format(name)
| Update meta_generator to match case insensitive | Update meta_generator to match case insensitive
| Python | mit | spectresearch/detectem | def meta_generator(name):
return '//meta[@name="generator" and contains(@content, "{}")]' \
'/@content'.format(name)
Update meta_generator to match case insensitive | def meta_generator(name):
return '//meta[re:test(@name,"generator","i") and contains(@content, "{}")]' \
'/@content'.format(name)
| <commit_before>def meta_generator(name):
return '//meta[@name="generator" and contains(@content, "{}")]' \
'/@content'.format(name)
<commit_msg>Update meta_generator to match case insensitive<commit_after> | def meta_generator(name):
return '//meta[re:test(@name,"generator","i") and contains(@content, "{}")]' \
'/@content'.format(name)
| def meta_generator(name):
return '//meta[@name="generator" and contains(@content, "{}")]' \
'/@content'.format(name)
Update meta_generator to match case insensitivedef meta_generator(name):
return '//meta[re:test(@name,"generator","i") and contains(@content, "{}")]' \
'/@content'.format(... | <commit_before>def meta_generator(name):
return '//meta[@name="generator" and contains(@content, "{}")]' \
'/@content'.format(name)
<commit_msg>Update meta_generator to match case insensitive<commit_after>def meta_generator(name):
return '//meta[re:test(@name,"generator","i") and contains(@content, ... |
dbf8d75c0e4105570676af0bde50d2a4c43e6dd3 | ain7/organizations/autocomplete_light_registry.py | ain7/organizations/autocomplete_light_registry.py | # -*- coding: utf-8
"""
ain7/annuaire/autocomplete_light_registry.py
"""
#
# Copyright © 2007-2016 AIn7 Devel Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of ... | # -*- coding: utf-8
"""
ain7/annuaire/autocomplete_light_registry.py
"""
#
# Copyright © 2007-2016 AIn7 Devel Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of ... | Add a link to add a company in user profile | Add a link to add a company in user profile
When a user change its experience, s⋅he can add an organization (not an
office) if it does not exist yet.
Link to autocomplete-light module's doc:
http://django-autocomplete-light.readthedocs.io/en/2.3.1/addanother.html#autocompletes.
Fix #3
| Python | lgpl-2.1 | ain7/www.ain7.org,ain7/www.ain7.org,ain7/www.ain7.org,ain7/www.ain7.org | # -*- coding: utf-8
"""
ain7/annuaire/autocomplete_light_registry.py
"""
#
# Copyright © 2007-2016 AIn7 Devel Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of ... | # -*- coding: utf-8
"""
ain7/annuaire/autocomplete_light_registry.py
"""
#
# Copyright © 2007-2016 AIn7 Devel Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of ... | <commit_before># -*- coding: utf-8
"""
ain7/annuaire/autocomplete_light_registry.py
"""
#
# Copyright © 2007-2016 AIn7 Devel Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; eithe... | # -*- coding: utf-8
"""
ain7/annuaire/autocomplete_light_registry.py
"""
#
# Copyright © 2007-2016 AIn7 Devel Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of ... | # -*- coding: utf-8
"""
ain7/annuaire/autocomplete_light_registry.py
"""
#
# Copyright © 2007-2016 AIn7 Devel Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of ... | <commit_before># -*- coding: utf-8
"""
ain7/annuaire/autocomplete_light_registry.py
"""
#
# Copyright © 2007-2016 AIn7 Devel Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; eithe... |
b5e239d96b9349b2b21b1d8703a5d3f232f871b4 | spykeutils/monkeypatch/quantities_patch.py | spykeutils/monkeypatch/quantities_patch.py | from __future__ import absolute_import
import quantities as pq
# At least up to quantities 0.10.1 the additional arguments to the min and max
# function did not get passed along.
# A fix already exists:
# <https://github.com/dopplershift/python-quantities/commit/30e8812ac15f551c65311d808c2a004f53913a25>
# Also a pull... | from __future__ import absolute_import
import quantities as pq
# At least up to quantities 0.10.1 the additional arguments to the min and max
# function did not get passed along.
# A fix already exists:
# <https://github.com/dopplershift/python-quantities/commit/30e8812ac15f551c65311d808c2a004f53913a25>
# Also a pull... | Fix for Quantities not working with numpy.linspace() in numpy 1.11 | Fix for Quantities not working with numpy.linspace() in numpy 1.11
| Python | bsd-3-clause | rproepp/spykeutils | from __future__ import absolute_import
import quantities as pq
# At least up to quantities 0.10.1 the additional arguments to the min and max
# function did not get passed along.
# A fix already exists:
# <https://github.com/dopplershift/python-quantities/commit/30e8812ac15f551c65311d808c2a004f53913a25>
# Also a pull... | from __future__ import absolute_import
import quantities as pq
# At least up to quantities 0.10.1 the additional arguments to the min and max
# function did not get passed along.
# A fix already exists:
# <https://github.com/dopplershift/python-quantities/commit/30e8812ac15f551c65311d808c2a004f53913a25>
# Also a pull... | <commit_before>from __future__ import absolute_import
import quantities as pq
# At least up to quantities 0.10.1 the additional arguments to the min and max
# function did not get passed along.
# A fix already exists:
# <https://github.com/dopplershift/python-quantities/commit/30e8812ac15f551c65311d808c2a004f53913a25... | from __future__ import absolute_import
import quantities as pq
# At least up to quantities 0.10.1 the additional arguments to the min and max
# function did not get passed along.
# A fix already exists:
# <https://github.com/dopplershift/python-quantities/commit/30e8812ac15f551c65311d808c2a004f53913a25>
# Also a pull... | from __future__ import absolute_import
import quantities as pq
# At least up to quantities 0.10.1 the additional arguments to the min and max
# function did not get passed along.
# A fix already exists:
# <https://github.com/dopplershift/python-quantities/commit/30e8812ac15f551c65311d808c2a004f53913a25>
# Also a pull... | <commit_before>from __future__ import absolute_import
import quantities as pq
# At least up to quantities 0.10.1 the additional arguments to the min and max
# function did not get passed along.
# A fix already exists:
# <https://github.com/dopplershift/python-quantities/commit/30e8812ac15f551c65311d808c2a004f53913a25... |
5228bbadc94159c084f4da77fcebdee3e0733b06 | astropy/utils/setup_package.py | astropy/utils/setup_package.py | from distutils.core import Extension
from os.path import dirname, join, relpath, exists
ASTROPY_UTILS_ROOT = dirname(__file__)
def get_extensions():
return [
Extension('astropy.utils._compiler',
[relpath(join(ASTROPY_UTILS_ROOT, 'src', 'compiler.c'))])
]
def get_package_data():... | from distutils.core import Extension
from os.path import dirname, join, relpath
ASTROPY_UTILS_ROOT = dirname(__file__)
def get_extensions():
return [
Extension('astropy.utils._compiler',
[relpath(join(ASTROPY_UTILS_ROOT, 'src', 'compiler.c'))])
]
def get_package_data():
# I... | Remove unused import left over from an earlier version of this patch | Remove unused import left over from an earlier version of this patch
| Python | bsd-3-clause | lpsinger/astropy,saimn/astropy,astropy/astropy,pllim/astropy,mhvk/astropy,lpsinger/astropy,larrybradley/astropy,MSeifert04/astropy,StuartLittlefair/astropy,StuartLittlefair/astropy,pllim/astropy,tbabej/astropy,kelle/astropy,AustereCuriosity/astropy,StuartLittlefair/astropy,stargaser/astropy,aleksandr-bakanov/astropy,as... | from distutils.core import Extension
from os.path import dirname, join, relpath, exists
ASTROPY_UTILS_ROOT = dirname(__file__)
def get_extensions():
return [
Extension('astropy.utils._compiler',
[relpath(join(ASTROPY_UTILS_ROOT, 'src', 'compiler.c'))])
]
def get_package_data():... | from distutils.core import Extension
from os.path import dirname, join, relpath
ASTROPY_UTILS_ROOT = dirname(__file__)
def get_extensions():
return [
Extension('astropy.utils._compiler',
[relpath(join(ASTROPY_UTILS_ROOT, 'src', 'compiler.c'))])
]
def get_package_data():
# I... | <commit_before>from distutils.core import Extension
from os.path import dirname, join, relpath, exists
ASTROPY_UTILS_ROOT = dirname(__file__)
def get_extensions():
return [
Extension('astropy.utils._compiler',
[relpath(join(ASTROPY_UTILS_ROOT, 'src', 'compiler.c'))])
]
def get_... | from distutils.core import Extension
from os.path import dirname, join, relpath
ASTROPY_UTILS_ROOT = dirname(__file__)
def get_extensions():
return [
Extension('astropy.utils._compiler',
[relpath(join(ASTROPY_UTILS_ROOT, 'src', 'compiler.c'))])
]
def get_package_data():
# I... | from distutils.core import Extension
from os.path import dirname, join, relpath, exists
ASTROPY_UTILS_ROOT = dirname(__file__)
def get_extensions():
return [
Extension('astropy.utils._compiler',
[relpath(join(ASTROPY_UTILS_ROOT, 'src', 'compiler.c'))])
]
def get_package_data():... | <commit_before>from distutils.core import Extension
from os.path import dirname, join, relpath, exists
ASTROPY_UTILS_ROOT = dirname(__file__)
def get_extensions():
return [
Extension('astropy.utils._compiler',
[relpath(join(ASTROPY_UTILS_ROOT, 'src', 'compiler.c'))])
]
def get_... |
ac7c04f76ad4276c34e000a065b6bc900f941ee5 | girder/utility/__init__.py | girder/utility/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | Send timestamps as ISO8601 format | Send timestamps as ISO8601 format
| Python | apache-2.0 | msmolens/girder,salamb/girder,jbeezley/girder,Kitware/girder,data-exp-lab/girder,sutartmelson/girder,opadron/girder,Xarthisius/girder,manthey/girder,essamjoubori/girder,Kitware/girder,sutartmelson/girder,Xarthisius/girder,essamjoubori/girder,kotfic/girder,RafaelPalomar/girder,sutartmelson/girder,kotfic/girder,Kitware/g... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ob... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ob... |
d8d8473e9fd61219f75b64b5bf3c703599b7f09b | tests/controller/test_home_controller.py | tests/controller/test_home_controller.py | import unittest
import pyramid.testing
from nflpool.tests.web_settings import settings
class HomeControllerTests(unittest.TestCase):
def setUp(self):
from nflpool import main
app = main({}, **settings, logging="OFF")
# noinspection PyPackageRequirements
from webtest import TestAp... | import unittest
import pyramid.testing
from tests.web_settings import settings
class HomeControllerTests(unittest.TestCase):
def setUp(self):
from nflpool import main
app = main({}, **settings, logging="OFF")
# noinspection PyPackageRequirements
from webtest import TestApp
... | Update home controller test to use correct directory structure | Update home controller test to use correct directory structure
| Python | mit | prcutler/nflpool,prcutler/nflpool | import unittest
import pyramid.testing
from nflpool.tests.web_settings import settings
class HomeControllerTests(unittest.TestCase):
def setUp(self):
from nflpool import main
app = main({}, **settings, logging="OFF")
# noinspection PyPackageRequirements
from webtest import TestAp... | import unittest
import pyramid.testing
from tests.web_settings import settings
class HomeControllerTests(unittest.TestCase):
def setUp(self):
from nflpool import main
app = main({}, **settings, logging="OFF")
# noinspection PyPackageRequirements
from webtest import TestApp
... | <commit_before>import unittest
import pyramid.testing
from nflpool.tests.web_settings import settings
class HomeControllerTests(unittest.TestCase):
def setUp(self):
from nflpool import main
app = main({}, **settings, logging="OFF")
# noinspection PyPackageRequirements
from webtes... | import unittest
import pyramid.testing
from tests.web_settings import settings
class HomeControllerTests(unittest.TestCase):
def setUp(self):
from nflpool import main
app = main({}, **settings, logging="OFF")
# noinspection PyPackageRequirements
from webtest import TestApp
... | import unittest
import pyramid.testing
from nflpool.tests.web_settings import settings
class HomeControllerTests(unittest.TestCase):
def setUp(self):
from nflpool import main
app = main({}, **settings, logging="OFF")
# noinspection PyPackageRequirements
from webtest import TestAp... | <commit_before>import unittest
import pyramid.testing
from nflpool.tests.web_settings import settings
class HomeControllerTests(unittest.TestCase):
def setUp(self):
from nflpool import main
app = main({}, **settings, logging="OFF")
# noinspection PyPackageRequirements
from webtes... |
14f0b7e25a795a853b79f781632edb2b82c3b904 | docs/conf.py | docs/conf.py | import os
import ramrod
project = u'stix-ramrod'
copyright = u'2015, The MITRE Corporation'
version = ramrod.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinxcontrib.napoleon',
]... | import os
import ramrod
project = u'stix-ramrod'
copyright = u'2015, The MITRE Corporation'
version = ramrod.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinxcontrib.napoleon',
]... | Fix zero-length field error when building docs in Python 2.6 | Fix zero-length field error when building docs in Python 2.6
| Python | bsd-3-clause | STIXProject/stix-ramrod | import os
import ramrod
project = u'stix-ramrod'
copyright = u'2015, The MITRE Corporation'
version = ramrod.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinxcontrib.napoleon',
]... | import os
import ramrod
project = u'stix-ramrod'
copyright = u'2015, The MITRE Corporation'
version = ramrod.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinxcontrib.napoleon',
]... | <commit_before>import os
import ramrod
project = u'stix-ramrod'
copyright = u'2015, The MITRE Corporation'
version = ramrod.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinxcontr... | import os
import ramrod
project = u'stix-ramrod'
copyright = u'2015, The MITRE Corporation'
version = ramrod.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinxcontrib.napoleon',
]... | import os
import ramrod
project = u'stix-ramrod'
copyright = u'2015, The MITRE Corporation'
version = ramrod.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinxcontrib.napoleon',
]... | <commit_before>import os
import ramrod
project = u'stix-ramrod'
copyright = u'2015, The MITRE Corporation'
version = ramrod.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinxcontr... |
712741d4c6189e9cb000935676269e84a1be455b | src/puzzle/puzzlepedia/debug_data_widget.py | src/puzzle/puzzlepedia/debug_data_widget.py | import io
from typing import Any, ContextManager
import numpy as np
from PIL import Image
from ipywidgets import widgets
from puzzle.puzzlepedia import _common
from puzzle.steps import step
def DebugDataWidget(s: step.Step, capture: ContextManager) -> widgets.Widget:
with capture:
try:
data = s.get_debu... | import io
from typing import Any, ContextManager, Dict
import numpy as np
from PIL import Image
from ipywidgets import widgets
from puzzle.puzzlepedia import _bind, _common
from puzzle.steps import step
def DebugDataWidget(s: step.Step, capture: ContextManager) -> widgets.Widget:
with capture:
try:
data... | Add the ability to show multiple debug data values. | Add the ability to show multiple debug data values.
Implemented as a slider.
| Python | mit | PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge | import io
from typing import Any, ContextManager
import numpy as np
from PIL import Image
from ipywidgets import widgets
from puzzle.puzzlepedia import _common
from puzzle.steps import step
def DebugDataWidget(s: step.Step, capture: ContextManager) -> widgets.Widget:
with capture:
try:
data = s.get_debu... | import io
from typing import Any, ContextManager, Dict
import numpy as np
from PIL import Image
from ipywidgets import widgets
from puzzle.puzzlepedia import _bind, _common
from puzzle.steps import step
def DebugDataWidget(s: step.Step, capture: ContextManager) -> widgets.Widget:
with capture:
try:
data... | <commit_before>import io
from typing import Any, ContextManager
import numpy as np
from PIL import Image
from ipywidgets import widgets
from puzzle.puzzlepedia import _common
from puzzle.steps import step
def DebugDataWidget(s: step.Step, capture: ContextManager) -> widgets.Widget:
with capture:
try:
da... | import io
from typing import Any, ContextManager, Dict
import numpy as np
from PIL import Image
from ipywidgets import widgets
from puzzle.puzzlepedia import _bind, _common
from puzzle.steps import step
def DebugDataWidget(s: step.Step, capture: ContextManager) -> widgets.Widget:
with capture:
try:
data... | import io
from typing import Any, ContextManager
import numpy as np
from PIL import Image
from ipywidgets import widgets
from puzzle.puzzlepedia import _common
from puzzle.steps import step
def DebugDataWidget(s: step.Step, capture: ContextManager) -> widgets.Widget:
with capture:
try:
data = s.get_debu... | <commit_before>import io
from typing import Any, ContextManager
import numpy as np
from PIL import Image
from ipywidgets import widgets
from puzzle.puzzlepedia import _common
from puzzle.steps import step
def DebugDataWidget(s: step.Step, capture: ContextManager) -> widgets.Widget:
with capture:
try:
da... |
99daef4c39d89ac41c02533e8c6becd67f5c76b5 | docs/conf.py | docs/conf.py | from crate.theme.rtd.conf.python import *
if "sphinx.ext.intersphinx" not in extensions:
extensions += ["sphinx.ext.intersphinx"]
if "intersphinx_mapping" not in globals():
intersphinx_mapping = {}
intersphinx_mapping.update({
'reference': ('https://crate.io/docs/crate/reference/', None),
'sa': ('... | from crate.theme.rtd.conf.python import *
if "sphinx.ext.intersphinx" not in extensions:
extensions += ["sphinx.ext.intersphinx"]
if "intersphinx_mapping" not in globals():
intersphinx_mapping = {}
intersphinx_mapping.update({
'reference': ('https://crate.io/docs/crate/reference/en/latest/', None),
... | Fix documentation checks by adjusting intersphinx mapping | Fix documentation checks by adjusting intersphinx mapping | Python | apache-2.0 | crate/crate-python,crate/crate-python | from crate.theme.rtd.conf.python import *
if "sphinx.ext.intersphinx" not in extensions:
extensions += ["sphinx.ext.intersphinx"]
if "intersphinx_mapping" not in globals():
intersphinx_mapping = {}
intersphinx_mapping.update({
'reference': ('https://crate.io/docs/crate/reference/', None),
'sa': ('... | from crate.theme.rtd.conf.python import *
if "sphinx.ext.intersphinx" not in extensions:
extensions += ["sphinx.ext.intersphinx"]
if "intersphinx_mapping" not in globals():
intersphinx_mapping = {}
intersphinx_mapping.update({
'reference': ('https://crate.io/docs/crate/reference/en/latest/', None),
... | <commit_before>from crate.theme.rtd.conf.python import *
if "sphinx.ext.intersphinx" not in extensions:
extensions += ["sphinx.ext.intersphinx"]
if "intersphinx_mapping" not in globals():
intersphinx_mapping = {}
intersphinx_mapping.update({
'reference': ('https://crate.io/docs/crate/reference/', None... | from crate.theme.rtd.conf.python import *
if "sphinx.ext.intersphinx" not in extensions:
extensions += ["sphinx.ext.intersphinx"]
if "intersphinx_mapping" not in globals():
intersphinx_mapping = {}
intersphinx_mapping.update({
'reference': ('https://crate.io/docs/crate/reference/en/latest/', None),
... | from crate.theme.rtd.conf.python import *
if "sphinx.ext.intersphinx" not in extensions:
extensions += ["sphinx.ext.intersphinx"]
if "intersphinx_mapping" not in globals():
intersphinx_mapping = {}
intersphinx_mapping.update({
'reference': ('https://crate.io/docs/crate/reference/', None),
'sa': ('... | <commit_before>from crate.theme.rtd.conf.python import *
if "sphinx.ext.intersphinx" not in extensions:
extensions += ["sphinx.ext.intersphinx"]
if "intersphinx_mapping" not in globals():
intersphinx_mapping = {}
intersphinx_mapping.update({
'reference': ('https://crate.io/docs/crate/reference/', None... |
a303d4d0491abf91c8f2856527d0b3566f704b90 | tracestack/__init__.py | tracestack/__init__.py | import sys, urllib, webbrowser
def tracestack():
try:
last_error = sys.last_value
except:
raise Exception("No error message available.")
error_query = urllib.urlencode("[python] " + str(last_error))
search_url = "http://stackoverflow.com/search?q=" + error_query
webbrowser.open(sear... | import sys, urllib, webbrowser
def tracestack():
try:
last_error = "{0} {1}".format(sys.last_type, sys.last_value)
except:
raise Exception("No error message available.")
error_query = urllib.urlencode({"q": "[python] " + last_error})
search_url = "http://stackoverflow.com/search?q=" + e... | Fix bugs thanks to Aaron | Fix bugs thanks to Aaron | Python | mit | kod3r/tracestack,danrobinson/tracestack | import sys, urllib, webbrowser
def tracestack():
try:
last_error = sys.last_value
except:
raise Exception("No error message available.")
error_query = urllib.urlencode("[python] " + str(last_error))
search_url = "http://stackoverflow.com/search?q=" + error_query
webbrowser.open(sear... | import sys, urllib, webbrowser
def tracestack():
try:
last_error = "{0} {1}".format(sys.last_type, sys.last_value)
except:
raise Exception("No error message available.")
error_query = urllib.urlencode({"q": "[python] " + last_error})
search_url = "http://stackoverflow.com/search?q=" + e... | <commit_before>import sys, urllib, webbrowser
def tracestack():
try:
last_error = sys.last_value
except:
raise Exception("No error message available.")
error_query = urllib.urlencode("[python] " + str(last_error))
search_url = "http://stackoverflow.com/search?q=" + error_query
webbr... | import sys, urllib, webbrowser
def tracestack():
try:
last_error = "{0} {1}".format(sys.last_type, sys.last_value)
except:
raise Exception("No error message available.")
error_query = urllib.urlencode({"q": "[python] " + last_error})
search_url = "http://stackoverflow.com/search?q=" + e... | import sys, urllib, webbrowser
def tracestack():
try:
last_error = sys.last_value
except:
raise Exception("No error message available.")
error_query = urllib.urlencode("[python] " + str(last_error))
search_url = "http://stackoverflow.com/search?q=" + error_query
webbrowser.open(sear... | <commit_before>import sys, urllib, webbrowser
def tracestack():
try:
last_error = sys.last_value
except:
raise Exception("No error message available.")
error_query = urllib.urlencode("[python] " + str(last_error))
search_url = "http://stackoverflow.com/search?q=" + error_query
webbr... |
03590da0c3ffceb97ccc15c458ca29a18290f559 | jobs/collect_9gag_posts.py | jobs/collect_9gag_posts.py | import time
import feedparser
from bs4 import BeautifulSoup
import boto3
from PIL import Image
import requests
import logging
NINEGAG_RSS_URL = 'http://www.15minutesoffame.be/9gag/rss/9GAG_-_Trending.atom'
def main():
feed = feedparser.parse(NINEGAG_RSS_URL)['items']
table = boto3.resource('dynamodb', 'eu-w... | import time
import feedparser
from bs4 import BeautifulSoup
import boto3
from PIL import Image
import requests
import logging
NINEGAG_RSS_URL = 'http://www.15minutesoffame.be/9gag/rss/9GAG_-_Trending.atom'
def main():
feed = feedparser.parse(NINEGAG_RSS_URL)['items']
table = boto3.resource('dynamodb', 'eu-w... | Change 9gag collector longpost detector | Change 9gag collector longpost detector
| Python | mit | sevazhidkov/leonard | import time
import feedparser
from bs4 import BeautifulSoup
import boto3
from PIL import Image
import requests
import logging
NINEGAG_RSS_URL = 'http://www.15minutesoffame.be/9gag/rss/9GAG_-_Trending.atom'
def main():
feed = feedparser.parse(NINEGAG_RSS_URL)['items']
table = boto3.resource('dynamodb', 'eu-w... | import time
import feedparser
from bs4 import BeautifulSoup
import boto3
from PIL import Image
import requests
import logging
NINEGAG_RSS_URL = 'http://www.15minutesoffame.be/9gag/rss/9GAG_-_Trending.atom'
def main():
feed = feedparser.parse(NINEGAG_RSS_URL)['items']
table = boto3.resource('dynamodb', 'eu-w... | <commit_before>import time
import feedparser
from bs4 import BeautifulSoup
import boto3
from PIL import Image
import requests
import logging
NINEGAG_RSS_URL = 'http://www.15minutesoffame.be/9gag/rss/9GAG_-_Trending.atom'
def main():
feed = feedparser.parse(NINEGAG_RSS_URL)['items']
table = boto3.resource('d... | import time
import feedparser
from bs4 import BeautifulSoup
import boto3
from PIL import Image
import requests
import logging
NINEGAG_RSS_URL = 'http://www.15minutesoffame.be/9gag/rss/9GAG_-_Trending.atom'
def main():
feed = feedparser.parse(NINEGAG_RSS_URL)['items']
table = boto3.resource('dynamodb', 'eu-w... | import time
import feedparser
from bs4 import BeautifulSoup
import boto3
from PIL import Image
import requests
import logging
NINEGAG_RSS_URL = 'http://www.15minutesoffame.be/9gag/rss/9GAG_-_Trending.atom'
def main():
feed = feedparser.parse(NINEGAG_RSS_URL)['items']
table = boto3.resource('dynamodb', 'eu-w... | <commit_before>import time
import feedparser
from bs4 import BeautifulSoup
import boto3
from PIL import Image
import requests
import logging
NINEGAG_RSS_URL = 'http://www.15minutesoffame.be/9gag/rss/9GAG_-_Trending.atom'
def main():
feed = feedparser.parse(NINEGAG_RSS_URL)['items']
table = boto3.resource('d... |
5a3c8161943989942c14b0f476241ee52a8706ae | adhocracy/lib/instance/discriminator.py | adhocracy/lib/instance/discriminator.py | import logging
from adhocracy import model
from pylons import config
log = logging.getLogger(__name__)
class InstanceDiscriminatorMiddleware(object):
def __init__(self, app, domain):
self.app = app
self.domain = domain
log.debug("Host name: %s." % domain)
def __call__(self, environ... | import logging
from adhocracy import model
from pylons import config
log = logging.getLogger(__name__)
class InstanceDiscriminatorMiddleware(object):
def __init__(self, app, domain):
self.app = app
self.domain = domain
log.debug("Host name: %s." % domain)
def __call__(self, environ... | Allow to set the port in adhocracy.domain to make adhocracy work stand alone again. | Allow to set the port in adhocracy.domain to make adhocracy work stand alone again.
| Python | agpl-3.0 | alkadis/vcv,liqd/adhocracy,SysTheron/adhocracy,alkadis/vcv,phihag/adhocracy,alkadis/vcv,SysTheron/adhocracy,liqd/adhocracy,liqd/adhocracy,DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy,alkadis/vcv,alkadis/vcv,DanielNeugebauer/adhocracy,SysTheron/adhocracy,phihag/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocr... | import logging
from adhocracy import model
from pylons import config
log = logging.getLogger(__name__)
class InstanceDiscriminatorMiddleware(object):
def __init__(self, app, domain):
self.app = app
self.domain = domain
log.debug("Host name: %s." % domain)
def __call__(self, environ... | import logging
from adhocracy import model
from pylons import config
log = logging.getLogger(__name__)
class InstanceDiscriminatorMiddleware(object):
def __init__(self, app, domain):
self.app = app
self.domain = domain
log.debug("Host name: %s." % domain)
def __call__(self, environ... | <commit_before>import logging
from adhocracy import model
from pylons import config
log = logging.getLogger(__name__)
class InstanceDiscriminatorMiddleware(object):
def __init__(self, app, domain):
self.app = app
self.domain = domain
log.debug("Host name: %s." % domain)
def __call_... | import logging
from adhocracy import model
from pylons import config
log = logging.getLogger(__name__)
class InstanceDiscriminatorMiddleware(object):
def __init__(self, app, domain):
self.app = app
self.domain = domain
log.debug("Host name: %s." % domain)
def __call__(self, environ... | import logging
from adhocracy import model
from pylons import config
log = logging.getLogger(__name__)
class InstanceDiscriminatorMiddleware(object):
def __init__(self, app, domain):
self.app = app
self.domain = domain
log.debug("Host name: %s." % domain)
def __call__(self, environ... | <commit_before>import logging
from adhocracy import model
from pylons import config
log = logging.getLogger(__name__)
class InstanceDiscriminatorMiddleware(object):
def __init__(self, app, domain):
self.app = app
self.domain = domain
log.debug("Host name: %s." % domain)
def __call_... |
57f4b34a70a3506f1fb1e1842b3e75dc977bfe18 | flask_app.py | flask_app.py | from flask import Flask
from flask_caching import Cache
import main
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
@app.route('/')
def display_available():
content = ('<html>' +
'<head>' +
'<title>Restaurant Menu Parser</title>' +
'</head>... | from flask import abort
from flask import Flask
from flask_caching import Cache
import main
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
@app.route('/')
def display_available():
content = ('<html>' +
'<head>' +
'<title>Restaurant Menu Parser</title>' +... | Add import of abort function. | Add import of abort function.
| Python | bsd-3-clause | talavis/kimenu | from flask import Flask
from flask_caching import Cache
import main
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
@app.route('/')
def display_available():
content = ('<html>' +
'<head>' +
'<title>Restaurant Menu Parser</title>' +
'</head>... | from flask import abort
from flask import Flask
from flask_caching import Cache
import main
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
@app.route('/')
def display_available():
content = ('<html>' +
'<head>' +
'<title>Restaurant Menu Parser</title>' +... | <commit_before>from flask import Flask
from flask_caching import Cache
import main
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
@app.route('/')
def display_available():
content = ('<html>' +
'<head>' +
'<title>Restaurant Menu Parser</title>' +
... | from flask import abort
from flask import Flask
from flask_caching import Cache
import main
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
@app.route('/')
def display_available():
content = ('<html>' +
'<head>' +
'<title>Restaurant Menu Parser</title>' +... | from flask import Flask
from flask_caching import Cache
import main
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
@app.route('/')
def display_available():
content = ('<html>' +
'<head>' +
'<title>Restaurant Menu Parser</title>' +
'</head>... | <commit_before>from flask import Flask
from flask_caching import Cache
import main
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
@app.route('/')
def display_available():
content = ('<html>' +
'<head>' +
'<title>Restaurant Menu Parser</title>' +
... |
00b31f3025493942c0ce7eb03c7cc09abf0eb8d0 | txlege84/core/views.py | txlege84/core/views.py | from django.views.generic import ListView
from topics.models import Topic, TopIssue
class LandingView(ListView):
model = Topic
template_name = 'landing.html'
def get_context_data(self, **kwargs):
context = super(LandingView, self).get_context_data(**kwargs)
context['top_issues'] = TopIss... | from django.views.generic import ListView
from topics.models import Topic, TopIssue
class LandingView(ListView):
model = Topic
template_name = 'landing.html'
def get_context_data(self, **kwargs):
context = super(LandingView, self).get_context_data(**kwargs)
context['top_issues'] = TopIss... | Print statement snuck in there | Print statement snuck in there
| Python | mit | texastribune/txlege84,texastribune/txlege84,texastribune/txlege84,texastribune/txlege84 | from django.views.generic import ListView
from topics.models import Topic, TopIssue
class LandingView(ListView):
model = Topic
template_name = 'landing.html'
def get_context_data(self, **kwargs):
context = super(LandingView, self).get_context_data(**kwargs)
context['top_issues'] = TopIss... | from django.views.generic import ListView
from topics.models import Topic, TopIssue
class LandingView(ListView):
model = Topic
template_name = 'landing.html'
def get_context_data(self, **kwargs):
context = super(LandingView, self).get_context_data(**kwargs)
context['top_issues'] = TopIss... | <commit_before>from django.views.generic import ListView
from topics.models import Topic, TopIssue
class LandingView(ListView):
model = Topic
template_name = 'landing.html'
def get_context_data(self, **kwargs):
context = super(LandingView, self).get_context_data(**kwargs)
context['top_is... | from django.views.generic import ListView
from topics.models import Topic, TopIssue
class LandingView(ListView):
model = Topic
template_name = 'landing.html'
def get_context_data(self, **kwargs):
context = super(LandingView, self).get_context_data(**kwargs)
context['top_issues'] = TopIss... | from django.views.generic import ListView
from topics.models import Topic, TopIssue
class LandingView(ListView):
model = Topic
template_name = 'landing.html'
def get_context_data(self, **kwargs):
context = super(LandingView, self).get_context_data(**kwargs)
context['top_issues'] = TopIss... | <commit_before>from django.views.generic import ListView
from topics.models import Topic, TopIssue
class LandingView(ListView):
model = Topic
template_name = 'landing.html'
def get_context_data(self, **kwargs):
context = super(LandingView, self).get_context_data(**kwargs)
context['top_is... |
a9bc4d98e8b61b63c14a2a5f1e11c85d91747f30 | analysis/data_process/uk_2017/config.py | analysis/data_process/uk_2017/config.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Config file for the cleaning - plotting and notebook process"""
class CleaningConfig:
# Unprocessed dataset
raw_data = './dataset/raw_results-survey245554.csv'
# load the different answers to questions to classify questions based on that
question_fil... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Config file for the cleaning - plotting and notebook process"""
class CleaningConfig:
# Unprocessed dataset
raw_data = './dataset/raw_results-survey245554.csv'
# load the different answers to questions to classify questions based on that
question_fil... | Add options in the plot | Add options in the plot
| Python | bsd-3-clause | softwaresaved/international-survey | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Config file for the cleaning - plotting and notebook process"""
class CleaningConfig:
# Unprocessed dataset
raw_data = './dataset/raw_results-survey245554.csv'
# load the different answers to questions to classify questions based on that
question_fil... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Config file for the cleaning - plotting and notebook process"""
class CleaningConfig:
# Unprocessed dataset
raw_data = './dataset/raw_results-survey245554.csv'
# load the different answers to questions to classify questions based on that
question_fil... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Config file for the cleaning - plotting and notebook process"""
class CleaningConfig:
# Unprocessed dataset
raw_data = './dataset/raw_results-survey245554.csv'
# load the different answers to questions to classify questions based on that
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Config file for the cleaning - plotting and notebook process"""
class CleaningConfig:
# Unprocessed dataset
raw_data = './dataset/raw_results-survey245554.csv'
# load the different answers to questions to classify questions based on that
question_fil... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Config file for the cleaning - plotting and notebook process"""
class CleaningConfig:
# Unprocessed dataset
raw_data = './dataset/raw_results-survey245554.csv'
# load the different answers to questions to classify questions based on that
question_fil... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Config file for the cleaning - plotting and notebook process"""
class CleaningConfig:
# Unprocessed dataset
raw_data = './dataset/raw_results-survey245554.csv'
# load the different answers to questions to classify questions based on that
... |
e99196e14cd258960ad188875723178579b4dbf4 | src/rf/apps/workers/image_validator.py | src/rf/apps/workers/image_validator.py | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf import settings
import os
import uuid
from boto.s3.key import Key
from boto.s3.connection import S3Connection
from osgeo import gdal
def ensure_band_count(key_string... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf import settings
import os
import uuid
from boto.s3.key import Key
from boto.s3.connection import S3Connection
from osgeo import gdal
def ensure_band_count(key_string... | Use new temp file directory. | Use new temp file directory.
We created a new scratch directory that matches EC2 mounted temp space and
supplied this as a setting in commit 21916b. This switches temporary images to
be downloaded there rather than at /tmp.
| Python | apache-2.0 | aaronxsu/raster-foundry,aaronxsu/raster-foundry,kdeloach/raster-foundry,azavea/raster-foundry,raster-foundry/raster-foundry,raster-foundry/raster-foundry,azavea/raster-foundry,aaronxsu/raster-foundry,kdeloach/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,aaronxsu/raster-foundry,kdeloa... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf import settings
import os
import uuid
from boto.s3.key import Key
from boto.s3.connection import S3Connection
from osgeo import gdal
def ensure_band_count(key_string... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf import settings
import os
import uuid
from boto.s3.key import Key
from boto.s3.connection import S3Connection
from osgeo import gdal
def ensure_band_count(key_string... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf import settings
import os
import uuid
from boto.s3.key import Key
from boto.s3.connection import S3Connection
from osgeo import gdal
def ensure_band_c... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf import settings
import os
import uuid
from boto.s3.key import Key
from boto.s3.connection import S3Connection
from osgeo import gdal
def ensure_band_count(key_string... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf import settings
import os
import uuid
from boto.s3.key import Key
from boto.s3.connection import S3Connection
from osgeo import gdal
def ensure_band_count(key_string... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf import settings
import os
import uuid
from boto.s3.key import Key
from boto.s3.connection import S3Connection
from osgeo import gdal
def ensure_band_c... |
ad257e7730d03df984124493814656930bcb0b5f | Communication/tcpServer.py | Communication/tcpServer.py | #!/usr/bin/env python
import socket
TCP_IP = '127.0.0.1'
TCP_PORT = 54321
BUFFER_SIZE = 20 # Normally 1024, but we want fast response
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connection address:', addr
while 1:
data = conn.recv... | #!/usr/bin/env python
import socket
TCP_IP = '127.0.0.1'
TCP_PORT = 1234
BUFFER_SIZE = 20 # Normally 1024, but we want fast response
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connection address:', addr
while 1:
data = conn.recv(... | Change port to fit with other script of tcp communication test | Change port to fit with other script of tcp communication test
| Python | mit | baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite | #!/usr/bin/env python
import socket
TCP_IP = '127.0.0.1'
TCP_PORT = 54321
BUFFER_SIZE = 20 # Normally 1024, but we want fast response
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connection address:', addr
while 1:
data = conn.recv... | #!/usr/bin/env python
import socket
TCP_IP = '127.0.0.1'
TCP_PORT = 1234
BUFFER_SIZE = 20 # Normally 1024, but we want fast response
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connection address:', addr
while 1:
data = conn.recv(... | <commit_before>#!/usr/bin/env python
import socket
TCP_IP = '127.0.0.1'
TCP_PORT = 54321
BUFFER_SIZE = 20 # Normally 1024, but we want fast response
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connection address:', addr
while 1:
d... | #!/usr/bin/env python
import socket
TCP_IP = '127.0.0.1'
TCP_PORT = 1234
BUFFER_SIZE = 20 # Normally 1024, but we want fast response
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connection address:', addr
while 1:
data = conn.recv(... | #!/usr/bin/env python
import socket
TCP_IP = '127.0.0.1'
TCP_PORT = 54321
BUFFER_SIZE = 20 # Normally 1024, but we want fast response
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connection address:', addr
while 1:
data = conn.recv... | <commit_before>#!/usr/bin/env python
import socket
TCP_IP = '127.0.0.1'
TCP_PORT = 54321
BUFFER_SIZE = 20 # Normally 1024, but we want fast response
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connection address:', addr
while 1:
d... |
f73775980e37b51882bfbd21f609ddfda807b8c8 | tests/test_datafeed_fms_teams.py | tests/test_datafeed_fms_teams.py | import unittest2
import datetime
from google.appengine.ext import testbed
from datafeeds.datafeed_fms import DatafeedFms
class TestDatafeedFmsTeams(unittest2.TestCase):
def setUp(self):
self.testbed = testbed.Testbed()
self.testbed.activate()
self.testbed.init_urlfetch_stub()
se... | import unittest2
import datetime
from google.appengine.ext import testbed
from datafeeds.datafeed_fms import DatafeedFms
class TestDatafeedFmsTeams(unittest2.TestCase):
def setUp(self):
self.testbed = testbed.Testbed()
self.testbed.activate()
self.testbed.init_urlfetch_stub()
se... | Speed up test by breaking out of a for loop if match found | Speed up test by breaking out of a for loop if match found
| Python | mit | phil-lopreiato/the-blue-alliance,tsteward/the-blue-alliance,1fish2/the-blue-alliance,synth3tk/the-blue-alliance,bdaroz/the-blue-alliance,verycumbersome/the-blue-alliance,synth3tk/the-blue-alliance,nwalters512/the-blue-alliance,tsteward/the-blue-alliance,jaredhasenklein/the-blue-alliance,phil-lopreiato/the-blue-alliance... | import unittest2
import datetime
from google.appengine.ext import testbed
from datafeeds.datafeed_fms import DatafeedFms
class TestDatafeedFmsTeams(unittest2.TestCase):
def setUp(self):
self.testbed = testbed.Testbed()
self.testbed.activate()
self.testbed.init_urlfetch_stub()
se... | import unittest2
import datetime
from google.appengine.ext import testbed
from datafeeds.datafeed_fms import DatafeedFms
class TestDatafeedFmsTeams(unittest2.TestCase):
def setUp(self):
self.testbed = testbed.Testbed()
self.testbed.activate()
self.testbed.init_urlfetch_stub()
se... | <commit_before>import unittest2
import datetime
from google.appengine.ext import testbed
from datafeeds.datafeed_fms import DatafeedFms
class TestDatafeedFmsTeams(unittest2.TestCase):
def setUp(self):
self.testbed = testbed.Testbed()
self.testbed.activate()
self.testbed.init_urlfetch_st... | import unittest2
import datetime
from google.appengine.ext import testbed
from datafeeds.datafeed_fms import DatafeedFms
class TestDatafeedFmsTeams(unittest2.TestCase):
def setUp(self):
self.testbed = testbed.Testbed()
self.testbed.activate()
self.testbed.init_urlfetch_stub()
se... | import unittest2
import datetime
from google.appengine.ext import testbed
from datafeeds.datafeed_fms import DatafeedFms
class TestDatafeedFmsTeams(unittest2.TestCase):
def setUp(self):
self.testbed = testbed.Testbed()
self.testbed.activate()
self.testbed.init_urlfetch_stub()
se... | <commit_before>import unittest2
import datetime
from google.appengine.ext import testbed
from datafeeds.datafeed_fms import DatafeedFms
class TestDatafeedFmsTeams(unittest2.TestCase):
def setUp(self):
self.testbed = testbed.Testbed()
self.testbed.activate()
self.testbed.init_urlfetch_st... |
f863f37a05855180dce40181a27e7925f0662647 | djangoautoconf/management/commands/dump_settings.py | djangoautoconf/management/commands/dump_settings.py | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | Fix int float setting issue. | Fix int float setting issue.
| Python | bsd-3-clause | weijia/djangoautoconf,weijia/djangoautoconf | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | <commit_before>import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
... | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
help = 'Crea... | <commit_before>import os
from django.core.management import BaseCommand
from django.conf import settings
def dump_attrs(obj_instance):
for attr in dir(obj_instance):
if attr != attr.upper():
continue
yield attr, getattr(obj_instance, attr)
class Command(BaseCommand):
args = ''
... |
e778a2da7938dcf565282635e395dc410ef989d6 | terraform-gce/worker/generate-certs.py | terraform-gce/worker/generate-certs.py | #!/usr/bin/env python
import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('assets/certific... | #!/usr/bin/env python
import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('assets/certific... | Copy cert auth from master | Copy cert auth from master
| Python | apache-2.0 | aknuds1/contrib,aknuds1/contrib,aknuds1/contrib,aknuds1/contrib,aknuds1/contrib,aknuds1/contrib | #!/usr/bin/env python
import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('assets/certific... | #!/usr/bin/env python
import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('assets/certific... | <commit_before>#!/usr/bin/env python
import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('... | #!/usr/bin/env python
import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('assets/certific... | #!/usr/bin/env python
import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('assets/certific... | <commit_before>#!/usr/bin/env python
import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('... |
ffdd45d798eaf1349e12fc061789daacdefcd05c | membership.py | membership.py | """Manage society membership by checking member IDs and adding new members"""
import sqlite3
class MemberDatabase:
def __init__(self, dbFile = 'members.db', safe = True):
self.__connection = sqlite3.connect(dbFile)
self.__safe = safe
def __del__(self):
self.__connection.commit() # her... | """Manage society membership by checking member IDs and adding new members"""
import sqlite3
class MemberDatabase:
def __init__(self, dbFile = 'members.db', safe = True):
self.__connection = sqlite3.connect(dbFile)
self.__safe = safe
def __del__(self):
self.__connection.commit() # her... | Update last_attended when checking member | Update last_attended when checking member
| Python | mit | NullInfinity/socman,NullInfinity/society-event-manager | """Manage society membership by checking member IDs and adding new members"""
import sqlite3
class MemberDatabase:
def __init__(self, dbFile = 'members.db', safe = True):
self.__connection = sqlite3.connect(dbFile)
self.__safe = safe
def __del__(self):
self.__connection.commit() # her... | """Manage society membership by checking member IDs and adding new members"""
import sqlite3
class MemberDatabase:
def __init__(self, dbFile = 'members.db', safe = True):
self.__connection = sqlite3.connect(dbFile)
self.__safe = safe
def __del__(self):
self.__connection.commit() # her... | <commit_before>"""Manage society membership by checking member IDs and adding new members"""
import sqlite3
class MemberDatabase:
def __init__(self, dbFile = 'members.db', safe = True):
self.__connection = sqlite3.connect(dbFile)
self.__safe = safe
def __del__(self):
self.__connection... | """Manage society membership by checking member IDs and adding new members"""
import sqlite3
class MemberDatabase:
def __init__(self, dbFile = 'members.db', safe = True):
self.__connection = sqlite3.connect(dbFile)
self.__safe = safe
def __del__(self):
self.__connection.commit() # her... | """Manage society membership by checking member IDs and adding new members"""
import sqlite3
class MemberDatabase:
def __init__(self, dbFile = 'members.db', safe = True):
self.__connection = sqlite3.connect(dbFile)
self.__safe = safe
def __del__(self):
self.__connection.commit() # her... | <commit_before>"""Manage society membership by checking member IDs and adding new members"""
import sqlite3
class MemberDatabase:
def __init__(self, dbFile = 'members.db', safe = True):
self.__connection = sqlite3.connect(dbFile)
self.__safe = safe
def __del__(self):
self.__connection... |
c6346fa2c026318b530dbbdc90dbaee8310b6b05 | robot/Cumulus/resources/locators_50.py | robot/Cumulus/resources/locators_50.py | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[contains(@class, 'uiInput')][.//lab... | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
# current version (Sravani's )
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[con... | Revert "Revert "changes in locator_50 file (current and old versions)"" | Revert "Revert "changes in locator_50 file (current and old versions)""
This reverts commit 7537387aa80109877d6659cc54ec0ee7aa6496bd.
| Python | bsd-3-clause | SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[contains(@class, 'uiInput')][.//lab... | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
# current version (Sravani's )
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[con... | <commit_before>from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[contains(@class, 'ui... | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
# current version (Sravani's )
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[con... | from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[contains(@class, 'uiInput')][.//lab... | <commit_before>from locators_51 import *
import copy
npsp_lex_locators = copy.deepcopy(npsp_lex_locators)
npsp_lex_locators['delete_icon']='//span[contains(text() ,"{}")]/following::span[. = "{}"]/following-sibling::a/child::span[@class = "deleteIcon"]'
npsp_lex_locators['object']['field']= "//div[contains(@class, 'ui... |
b3c99c3ce6ec181cf2ea82dbbbac5801d7f27874 | app/interact_app.py | app/interact_app.py | import os
import tornado.web
from tornado.options import define
from .handlers import LandingHandler, RequestHandler
class InteractApp(tornado.web.Application):
"""
Entry point for the interact app.
"""
def __init__(self, config=None):
# Terrible hack to get config object in global namespace.... | import os
import tornado.web
from tornado.options import define
from .handlers import LandingHandler, RequestHandler
class InteractApp(tornado.web.Application):
"""
Entry point for the interact app.
"""
def __init__(self, config=None):
# Terrible hack to get config object in global namespace.... | Disable template caching for now. | Disable template caching for now.
| Python | apache-2.0 | data-8/DS8-Interact,data-8/DS8-Interact,data-8/DS8-Interact | import os
import tornado.web
from tornado.options import define
from .handlers import LandingHandler, RequestHandler
class InteractApp(tornado.web.Application):
"""
Entry point for the interact app.
"""
def __init__(self, config=None):
# Terrible hack to get config object in global namespace.... | import os
import tornado.web
from tornado.options import define
from .handlers import LandingHandler, RequestHandler
class InteractApp(tornado.web.Application):
"""
Entry point for the interact app.
"""
def __init__(self, config=None):
# Terrible hack to get config object in global namespace.... | <commit_before>import os
import tornado.web
from tornado.options import define
from .handlers import LandingHandler, RequestHandler
class InteractApp(tornado.web.Application):
"""
Entry point for the interact app.
"""
def __init__(self, config=None):
# Terrible hack to get config object in gl... | import os
import tornado.web
from tornado.options import define
from .handlers import LandingHandler, RequestHandler
class InteractApp(tornado.web.Application):
"""
Entry point for the interact app.
"""
def __init__(self, config=None):
# Terrible hack to get config object in global namespace.... | import os
import tornado.web
from tornado.options import define
from .handlers import LandingHandler, RequestHandler
class InteractApp(tornado.web.Application):
"""
Entry point for the interact app.
"""
def __init__(self, config=None):
# Terrible hack to get config object in global namespace.... | <commit_before>import os
import tornado.web
from tornado.options import define
from .handlers import LandingHandler, RequestHandler
class InteractApp(tornado.web.Application):
"""
Entry point for the interact app.
"""
def __init__(self, config=None):
# Terrible hack to get config object in gl... |
356c9cd23ebf4953af169f38126fd521b49ca6c4 | recipe_scrapers/_abstract.py | recipe_scrapers/_abstract.py | from urllib import request
from bs4 import BeautifulSoup
class AbstractScraper():
def __init__(self, url, test=False):
if test:
# when testing, we simply load a file
self.soup = BeautifulSoup(url.read(), "html.parser")
else:
self.soup = BeautifulSoup(request.u... | from urllib import request
from bs4 import BeautifulSoup
class AbstractScraper():
def __init__(self, url, test=False):
if test:
# when testing, we simply load a file
self.soup = BeautifulSoup(url.read(), "html.parser")
else:
self.soup = BeautifulSoup(request.u... | Add docstring to the methods structure in the abstract class | Add docstring to the methods structure in the abstract class
| Python | mit | hhursev/recipe-scraper | from urllib import request
from bs4 import BeautifulSoup
class AbstractScraper():
def __init__(self, url, test=False):
if test:
# when testing, we simply load a file
self.soup = BeautifulSoup(url.read(), "html.parser")
else:
self.soup = BeautifulSoup(request.u... | from urllib import request
from bs4 import BeautifulSoup
class AbstractScraper():
def __init__(self, url, test=False):
if test:
# when testing, we simply load a file
self.soup = BeautifulSoup(url.read(), "html.parser")
else:
self.soup = BeautifulSoup(request.u... | <commit_before>from urllib import request
from bs4 import BeautifulSoup
class AbstractScraper():
def __init__(self, url, test=False):
if test:
# when testing, we simply load a file
self.soup = BeautifulSoup(url.read(), "html.parser")
else:
self.soup = Beautifu... | from urllib import request
from bs4 import BeautifulSoup
class AbstractScraper():
def __init__(self, url, test=False):
if test:
# when testing, we simply load a file
self.soup = BeautifulSoup(url.read(), "html.parser")
else:
self.soup = BeautifulSoup(request.u... | from urllib import request
from bs4 import BeautifulSoup
class AbstractScraper():
def __init__(self, url, test=False):
if test:
# when testing, we simply load a file
self.soup = BeautifulSoup(url.read(), "html.parser")
else:
self.soup = BeautifulSoup(request.u... | <commit_before>from urllib import request
from bs4 import BeautifulSoup
class AbstractScraper():
def __init__(self, url, test=False):
if test:
# when testing, we simply load a file
self.soup = BeautifulSoup(url.read(), "html.parser")
else:
self.soup = Beautifu... |
d371c92e999aa90df39887a33901fdaa58f648f1 | test/gui/test_messages.py | test/gui/test_messages.py | import sys
from sequana.gui import messages
from PyQt5 import QtWidgets as QW
app = QW.QApplication(sys.argv)
def test_warning():
w = messages.WarningMessage("test")
def test_critical():
w = messages.CriticalMessage("test", details="test")
| from sequana.gui import messages
def test_warning(qtbot):
w = messages.WarningMessage("test")
def test_critical(qtbot):
w = messages.CriticalMessage("test", details="test")
| Fix test that caused a pytest hang | Fix test that caused a pytest hang
| Python | bsd-3-clause | sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana | import sys
from sequana.gui import messages
from PyQt5 import QtWidgets as QW
app = QW.QApplication(sys.argv)
def test_warning():
w = messages.WarningMessage("test")
def test_critical():
w = messages.CriticalMessage("test", details="test")
Fix test that caused a pytest hang | from sequana.gui import messages
def test_warning(qtbot):
w = messages.WarningMessage("test")
def test_critical(qtbot):
w = messages.CriticalMessage("test", details="test")
| <commit_before>import sys
from sequana.gui import messages
from PyQt5 import QtWidgets as QW
app = QW.QApplication(sys.argv)
def test_warning():
w = messages.WarningMessage("test")
def test_critical():
w = messages.CriticalMessage("test", details="test")
<commit_msg>Fix test that caused a pytest hang<co... | from sequana.gui import messages
def test_warning(qtbot):
w = messages.WarningMessage("test")
def test_critical(qtbot):
w = messages.CriticalMessage("test", details="test")
| import sys
from sequana.gui import messages
from PyQt5 import QtWidgets as QW
app = QW.QApplication(sys.argv)
def test_warning():
w = messages.WarningMessage("test")
def test_critical():
w = messages.CriticalMessage("test", details="test")
Fix test that caused a pytest hangfrom sequana.gui import messag... | <commit_before>import sys
from sequana.gui import messages
from PyQt5 import QtWidgets as QW
app = QW.QApplication(sys.argv)
def test_warning():
w = messages.WarningMessage("test")
def test_critical():
w = messages.CriticalMessage("test", details="test")
<commit_msg>Fix test that caused a pytest hang<co... |
631983a14f941fa745b6e7f4b32fe1ef697d5703 | tests/mixers/denontest.py | tests/mixers/denontest.py | import unittest
import os
from mopidy.mixers.denon import DenonMixer
class DenonMixerDeviceMock(object):
def __init__(self):
self._open = True
self.ret_val = bytes('00')
def write(self, x):
pass
def read(self, x):
return self.ret_val
def isOpen(self):
return se... | import unittest
import os
from mopidy.mixers.denon import DenonMixer
class DenonMixerDeviceMock(object):
def __init__(self):
self._open = True
self.ret_val = bytes('MV00\r')
def write(self, x):
if x[2] != '?':
self.ret_val = bytes(x)
def read(self, x):
return s... | Update denon device mock to reflect mixer changes | Update denon device mock to reflect mixer changes
| Python | apache-2.0 | mokieyue/mopidy,diandiankan/mopidy,bacontext/mopidy,tkem/mopidy,bacontext/mopidy,priestd09/mopidy,ZenithDK/mopidy,tkem/mopidy,quartz55/mopidy,bencevans/mopidy,vrs01/mopidy,priestd09/mopidy,jodal/mopidy,glogiotatidis/mopidy,ZenithDK/mopidy,rawdlite/mopidy,dbrgn/mopidy,bencevans/mopidy,abarisain/mopidy,jmarsik/mopidy,ali... | import unittest
import os
from mopidy.mixers.denon import DenonMixer
class DenonMixerDeviceMock(object):
def __init__(self):
self._open = True
self.ret_val = bytes('00')
def write(self, x):
pass
def read(self, x):
return self.ret_val
def isOpen(self):
return se... | import unittest
import os
from mopidy.mixers.denon import DenonMixer
class DenonMixerDeviceMock(object):
def __init__(self):
self._open = True
self.ret_val = bytes('MV00\r')
def write(self, x):
if x[2] != '?':
self.ret_val = bytes(x)
def read(self, x):
return s... | <commit_before>import unittest
import os
from mopidy.mixers.denon import DenonMixer
class DenonMixerDeviceMock(object):
def __init__(self):
self._open = True
self.ret_val = bytes('00')
def write(self, x):
pass
def read(self, x):
return self.ret_val
def isOpen(self):
... | import unittest
import os
from mopidy.mixers.denon import DenonMixer
class DenonMixerDeviceMock(object):
def __init__(self):
self._open = True
self.ret_val = bytes('MV00\r')
def write(self, x):
if x[2] != '?':
self.ret_val = bytes(x)
def read(self, x):
return s... | import unittest
import os
from mopidy.mixers.denon import DenonMixer
class DenonMixerDeviceMock(object):
def __init__(self):
self._open = True
self.ret_val = bytes('00')
def write(self, x):
pass
def read(self, x):
return self.ret_val
def isOpen(self):
return se... | <commit_before>import unittest
import os
from mopidy.mixers.denon import DenonMixer
class DenonMixerDeviceMock(object):
def __init__(self):
self._open = True
self.ret_val = bytes('00')
def write(self, x):
pass
def read(self, x):
return self.ret_val
def isOpen(self):
... |
4636c2deb451c284ffdfc44c744cf025a9f87377 | scribeui_pyramid/modules/plugins/__init__.py | scribeui_pyramid/modules/plugins/__init__.py | import imp #For plugins
import sys
import traceback
import logging
import os #For plugins
log = logging.getLogger(__name__)
pluginsList = []
def includeme(config):
global pluginsList
plugins = load_plugins()
for name, plugin in plugins.iteritems():
config.include("..plugins."+name)
plug... | import imp #For plugins
import sys
import traceback
import logging
import os #For plugins
log = logging.getLogger(__name__)
pluginsList = []
def includeme(config):
global pluginsList
plugins = load_plugins()
for name, plugin in plugins.iteritems():
config.include("..plugins."+name)
plug... | Fix load_plugin loop loading only one plugin | Fix load_plugin loop loading only one plugin
| Python | mit | mapgears/scribeui,mapgears/scribeui,mapgears/scribeui,mapgears/scribeui,mapgears/scribeui,mapgears/scribeui | import imp #For plugins
import sys
import traceback
import logging
import os #For plugins
log = logging.getLogger(__name__)
pluginsList = []
def includeme(config):
global pluginsList
plugins = load_plugins()
for name, plugin in plugins.iteritems():
config.include("..plugins."+name)
plug... | import imp #For plugins
import sys
import traceback
import logging
import os #For plugins
log = logging.getLogger(__name__)
pluginsList = []
def includeme(config):
global pluginsList
plugins = load_plugins()
for name, plugin in plugins.iteritems():
config.include("..plugins."+name)
plug... | <commit_before>import imp #For plugins
import sys
import traceback
import logging
import os #For plugins
log = logging.getLogger(__name__)
pluginsList = []
def includeme(config):
global pluginsList
plugins = load_plugins()
for name, plugin in plugins.iteritems():
config.include("..plugins."+nam... | import imp #For plugins
import sys
import traceback
import logging
import os #For plugins
log = logging.getLogger(__name__)
pluginsList = []
def includeme(config):
global pluginsList
plugins = load_plugins()
for name, plugin in plugins.iteritems():
config.include("..plugins."+name)
plug... | import imp #For plugins
import sys
import traceback
import logging
import os #For plugins
log = logging.getLogger(__name__)
pluginsList = []
def includeme(config):
global pluginsList
plugins = load_plugins()
for name, plugin in plugins.iteritems():
config.include("..plugins."+name)
plug... | <commit_before>import imp #For plugins
import sys
import traceback
import logging
import os #For plugins
log = logging.getLogger(__name__)
pluginsList = []
def includeme(config):
global pluginsList
plugins = load_plugins()
for name, plugin in plugins.iteritems():
config.include("..plugins."+nam... |
d8f6938649acd4a72a53d47c26a1b16adb0e8fe3 | jupyterlab_gitsync/jupyterlab_gitsync/__init__.py | jupyterlab_gitsync/jupyterlab_gitsync/__init__.py | from notebook.utils import url_path_join
from jupyterlab_gitsync.handlers import *
from jupyterlab_gitsync.version import VERSION
__version__ = VERSION
def _jupyter_server_extension_paths():
return [{'module': 'jupyterlab_gitsync'}]
def load_jupyter_server_extension(nb_server_app):
"""
Called when the ext... | from notebook.utils import url_path_join
from jupyterlab_gitsync.handlers import *
from jupyterlab_gitsync.version import VERSION
__version__ = VERSION
def _jupyter_server_extension_paths():
return [{'module': 'jupyterlab_gitsync'}]
def load_jupyter_server_extension(nb_server_app):
"""
Called when the exten... | Fix indentation to pass tests | Fix indentation to pass tests | Python | apache-2.0 | GoogleCloudPlatform/jupyter-extensions,GoogleCloudPlatform/jupyter-extensions,GoogleCloudPlatform/jupyter-extensions,GoogleCloudPlatform/jupyter-extensions | from notebook.utils import url_path_join
from jupyterlab_gitsync.handlers import *
from jupyterlab_gitsync.version import VERSION
__version__ = VERSION
def _jupyter_server_extension_paths():
return [{'module': 'jupyterlab_gitsync'}]
def load_jupyter_server_extension(nb_server_app):
"""
Called when the ext... | from notebook.utils import url_path_join
from jupyterlab_gitsync.handlers import *
from jupyterlab_gitsync.version import VERSION
__version__ = VERSION
def _jupyter_server_extension_paths():
return [{'module': 'jupyterlab_gitsync'}]
def load_jupyter_server_extension(nb_server_app):
"""
Called when the exten... | <commit_before>from notebook.utils import url_path_join
from jupyterlab_gitsync.handlers import *
from jupyterlab_gitsync.version import VERSION
__version__ = VERSION
def _jupyter_server_extension_paths():
return [{'module': 'jupyterlab_gitsync'}]
def load_jupyter_server_extension(nb_server_app):
"""
Call... | from notebook.utils import url_path_join
from jupyterlab_gitsync.handlers import *
from jupyterlab_gitsync.version import VERSION
__version__ = VERSION
def _jupyter_server_extension_paths():
return [{'module': 'jupyterlab_gitsync'}]
def load_jupyter_server_extension(nb_server_app):
"""
Called when the exten... | from notebook.utils import url_path_join
from jupyterlab_gitsync.handlers import *
from jupyterlab_gitsync.version import VERSION
__version__ = VERSION
def _jupyter_server_extension_paths():
return [{'module': 'jupyterlab_gitsync'}]
def load_jupyter_server_extension(nb_server_app):
"""
Called when the ext... | <commit_before>from notebook.utils import url_path_join
from jupyterlab_gitsync.handlers import *
from jupyterlab_gitsync.version import VERSION
__version__ = VERSION
def _jupyter_server_extension_paths():
return [{'module': 'jupyterlab_gitsync'}]
def load_jupyter_server_extension(nb_server_app):
"""
Call... |
d47ba3167b60710efe07e40113150b53c88e7d85 | tests/test_highlighter.py | tests/test_highlighter.py | import pytest
from rich.highlighter import NullHighlighter
def test_wrong_type():
highlighter = NullHighlighter()
with pytest.raises(TypeError):
highlighter([])
| """Tests for the higlighter classes."""
import pytest
from rich.highlighter import NullHighlighter, ReprHighlighter
from rich.text import Span, Text
def test_wrong_type():
highlighter = NullHighlighter()
with pytest.raises(TypeError):
highlighter([])
@pytest.mark.parametrize(
"style_name, test_... | Add tests for EUI-48 and EUI-64 in ReprHighlighter | Add tests for EUI-48 and EUI-64 in ReprHighlighter
| Python | mit | willmcgugan/rich | import pytest
from rich.highlighter import NullHighlighter
def test_wrong_type():
highlighter = NullHighlighter()
with pytest.raises(TypeError):
highlighter([])
Add tests for EUI-48 and EUI-64 in ReprHighlighter | """Tests for the higlighter classes."""
import pytest
from rich.highlighter import NullHighlighter, ReprHighlighter
from rich.text import Span, Text
def test_wrong_type():
highlighter = NullHighlighter()
with pytest.raises(TypeError):
highlighter([])
@pytest.mark.parametrize(
"style_name, test_... | <commit_before>import pytest
from rich.highlighter import NullHighlighter
def test_wrong_type():
highlighter = NullHighlighter()
with pytest.raises(TypeError):
highlighter([])
<commit_msg>Add tests for EUI-48 and EUI-64 in ReprHighlighter<commit_after> | """Tests for the higlighter classes."""
import pytest
from rich.highlighter import NullHighlighter, ReprHighlighter
from rich.text import Span, Text
def test_wrong_type():
highlighter = NullHighlighter()
with pytest.raises(TypeError):
highlighter([])
@pytest.mark.parametrize(
"style_name, test_... | import pytest
from rich.highlighter import NullHighlighter
def test_wrong_type():
highlighter = NullHighlighter()
with pytest.raises(TypeError):
highlighter([])
Add tests for EUI-48 and EUI-64 in ReprHighlighter"""Tests for the higlighter classes."""
import pytest
from rich.highlighter import NullHig... | <commit_before>import pytest
from rich.highlighter import NullHighlighter
def test_wrong_type():
highlighter = NullHighlighter()
with pytest.raises(TypeError):
highlighter([])
<commit_msg>Add tests for EUI-48 and EUI-64 in ReprHighlighter<commit_after>"""Tests for the higlighter classes."""
import pyt... |
6d930e7f29e12cd677cce07c7c1accc66ae594c8 | tests/test_zz_jvm_kill.py | tests/test_zz_jvm_kill.py | from cellom2tif import cellom2tif
import pytest
cfile = 'test-data/d1/MFGTMP_120628160001_C18f00d0.C01'
def test_read_image():
im = cellom2tif.read_image(cfile)
assert im.shape == (512, 512)
def test_done():
cellom2tif.done()
assert cellom2tif.VM_KILLED
def test_vm_killed_error():
cellom2tif... | from cellom2tif import cellom2tif
import bioformats as bf
import pytest
cfile = 'test-data/d1/MFGTMP_120628160001_C18f00d0.C01'
def test_read_image():
im = cellom2tif.read_image(cfile)
assert im.shape == (512, 512)
def test_read_image_from_reader():
rdr = bf.ImageReader(cfile)
im = cellom2tif.read... | Test reading from bf.ImageReader directly | Test reading from bf.ImageReader directly
| Python | bsd-3-clause | jni/cellom2tif | from cellom2tif import cellom2tif
import pytest
cfile = 'test-data/d1/MFGTMP_120628160001_C18f00d0.C01'
def test_read_image():
im = cellom2tif.read_image(cfile)
assert im.shape == (512, 512)
def test_done():
cellom2tif.done()
assert cellom2tif.VM_KILLED
def test_vm_killed_error():
cellom2tif... | from cellom2tif import cellom2tif
import bioformats as bf
import pytest
cfile = 'test-data/d1/MFGTMP_120628160001_C18f00d0.C01'
def test_read_image():
im = cellom2tif.read_image(cfile)
assert im.shape == (512, 512)
def test_read_image_from_reader():
rdr = bf.ImageReader(cfile)
im = cellom2tif.read... | <commit_before>from cellom2tif import cellom2tif
import pytest
cfile = 'test-data/d1/MFGTMP_120628160001_C18f00d0.C01'
def test_read_image():
im = cellom2tif.read_image(cfile)
assert im.shape == (512, 512)
def test_done():
cellom2tif.done()
assert cellom2tif.VM_KILLED
def test_vm_killed_error():... | from cellom2tif import cellom2tif
import bioformats as bf
import pytest
cfile = 'test-data/d1/MFGTMP_120628160001_C18f00d0.C01'
def test_read_image():
im = cellom2tif.read_image(cfile)
assert im.shape == (512, 512)
def test_read_image_from_reader():
rdr = bf.ImageReader(cfile)
im = cellom2tif.read... | from cellom2tif import cellom2tif
import pytest
cfile = 'test-data/d1/MFGTMP_120628160001_C18f00d0.C01'
def test_read_image():
im = cellom2tif.read_image(cfile)
assert im.shape == (512, 512)
def test_done():
cellom2tif.done()
assert cellom2tif.VM_KILLED
def test_vm_killed_error():
cellom2tif... | <commit_before>from cellom2tif import cellom2tif
import pytest
cfile = 'test-data/d1/MFGTMP_120628160001_C18f00d0.C01'
def test_read_image():
im = cellom2tif.read_image(cfile)
assert im.shape == (512, 512)
def test_done():
cellom2tif.done()
assert cellom2tif.VM_KILLED
def test_vm_killed_error():... |
351bc14c66962e5ef386b6d41073697993c95236 | greengraph/test/test_map.py | greengraph/test/test_map.py | from greengraph.map import Map
import numpy as np
from nose.tools import assert_equal
import yaml
def test_green():
size = (10,10)
zoom = 10
lat = 50
lon = 50
satellite = True
testMap = Map(lat,lon,satellite,zoom,size)
threshold = 1
trueArray = np.ones(size,dtype=bool)
falseArray =... | from greengraph.map import Map
import numpy as np
from nose.tools import assert_equal
from mock import patch
import os
@patch('requests.get')
@patch('matplotlib.image.imread')
@patch('StringIO.StringIO')
def test_green(mock_get,mock_imread,mock_StringIO):
def assert_images_equal(r,g,b,checkArray):
testMap... | Add patch decorator to test_green() function | Add patch decorator to test_green() function
| Python | mit | MikeVasmer/GreenGraphCoursework | from greengraph.map import Map
import numpy as np
from nose.tools import assert_equal
import yaml
def test_green():
size = (10,10)
zoom = 10
lat = 50
lon = 50
satellite = True
testMap = Map(lat,lon,satellite,zoom,size)
threshold = 1
trueArray = np.ones(size,dtype=bool)
falseArray =... | from greengraph.map import Map
import numpy as np
from nose.tools import assert_equal
from mock import patch
import os
@patch('requests.get')
@patch('matplotlib.image.imread')
@patch('StringIO.StringIO')
def test_green(mock_get,mock_imread,mock_StringIO):
def assert_images_equal(r,g,b,checkArray):
testMap... | <commit_before>from greengraph.map import Map
import numpy as np
from nose.tools import assert_equal
import yaml
def test_green():
size = (10,10)
zoom = 10
lat = 50
lon = 50
satellite = True
testMap = Map(lat,lon,satellite,zoom,size)
threshold = 1
trueArray = np.ones(size,dtype=bool)
... | from greengraph.map import Map
import numpy as np
from nose.tools import assert_equal
from mock import patch
import os
@patch('requests.get')
@patch('matplotlib.image.imread')
@patch('StringIO.StringIO')
def test_green(mock_get,mock_imread,mock_StringIO):
def assert_images_equal(r,g,b,checkArray):
testMap... | from greengraph.map import Map
import numpy as np
from nose.tools import assert_equal
import yaml
def test_green():
size = (10,10)
zoom = 10
lat = 50
lon = 50
satellite = True
testMap = Map(lat,lon,satellite,zoom,size)
threshold = 1
trueArray = np.ones(size,dtype=bool)
falseArray =... | <commit_before>from greengraph.map import Map
import numpy as np
from nose.tools import assert_equal
import yaml
def test_green():
size = (10,10)
zoom = 10
lat = 50
lon = 50
satellite = True
testMap = Map(lat,lon,satellite,zoom,size)
threshold = 1
trueArray = np.ones(size,dtype=bool)
... |
efda61fab238c278791245af9a89c6d70d2425e7 | pyflation/analysis/tests/test_deltaprel.py | pyflation/analysis/tests/test_deltaprel.py | ''' test_deltaprel - Test functions for deltaprel module
Author: Ian Huston
For license and copyright information see LICENSE.txt which was distributed with this file.
'''
import numpy as np
from numpy.testing import assert_, assert_raises
from pyflation.analysis import deltaprel
import nose
class TestSoundSpeeds... | ''' test_deltaprel - Test functions for deltaprel module
Author: Ian Huston
For license and copyright information see LICENSE.txt which was distributed with this file.
'''
import numpy as np
from numpy.testing import assert_, assert_raises
from pyflation.analysis import deltaprel
import nose
class TestSoundSpeeds... | Fix arrangement of argument list. | Fix arrangement of argument list.
| Python | bsd-3-clause | ihuston/pyflation,ihuston/pyflation | ''' test_deltaprel - Test functions for deltaprel module
Author: Ian Huston
For license and copyright information see LICENSE.txt which was distributed with this file.
'''
import numpy as np
from numpy.testing import assert_, assert_raises
from pyflation.analysis import deltaprel
import nose
class TestSoundSpeeds... | ''' test_deltaprel - Test functions for deltaprel module
Author: Ian Huston
For license and copyright information see LICENSE.txt which was distributed with this file.
'''
import numpy as np
from numpy.testing import assert_, assert_raises
from pyflation.analysis import deltaprel
import nose
class TestSoundSpeeds... | <commit_before>''' test_deltaprel - Test functions for deltaprel module
Author: Ian Huston
For license and copyright information see LICENSE.txt which was distributed with this file.
'''
import numpy as np
from numpy.testing import assert_, assert_raises
from pyflation.analysis import deltaprel
import nose
class ... | ''' test_deltaprel - Test functions for deltaprel module
Author: Ian Huston
For license and copyright information see LICENSE.txt which was distributed with this file.
'''
import numpy as np
from numpy.testing import assert_, assert_raises
from pyflation.analysis import deltaprel
import nose
class TestSoundSpeeds... | ''' test_deltaprel - Test functions for deltaprel module
Author: Ian Huston
For license and copyright information see LICENSE.txt which was distributed with this file.
'''
import numpy as np
from numpy.testing import assert_, assert_raises
from pyflation.analysis import deltaprel
import nose
class TestSoundSpeeds... | <commit_before>''' test_deltaprel - Test functions for deltaprel module
Author: Ian Huston
For license and copyright information see LICENSE.txt which was distributed with this file.
'''
import numpy as np
from numpy.testing import assert_, assert_raises
from pyflation.analysis import deltaprel
import nose
class ... |
2453d33da9535d069a829ec9a316093874fbb9a4 | pythonwarrior/towers/beginner/level_002.py | pythonwarrior/towers/beginner/level_002.py | # --------
# |@ s >|
# --------
level.description("It is too dark to see anything, but you smell sludge nearby.")
level.tip("Use warrior.feel().is_empty to see if there is anything in front of you, and warrior.attack! to fight it. Remember, you can only do one action (ending in _) per turn.")
level.time_bonus(20)... | # --------
# |@ s >|
# --------
level.description("It is too dark to see anything, but you smell sludge nearby.")
level.tip("Use warrior.feel().is_empty() to see if there is anything in front of you, and warrior.attack() to fight it. Remember, you can only do one action (ending in _) per turn.")
level.time_bonus(... | Update description and fix Ruby -> Python syntax | Update description and fix Ruby -> Python syntax | Python | mit | arbylee/python-warrior | # --------
# |@ s >|
# --------
level.description("It is too dark to see anything, but you smell sludge nearby.")
level.tip("Use warrior.feel().is_empty to see if there is anything in front of you, and warrior.attack! to fight it. Remember, you can only do one action (ending in _) per turn.")
level.time_bonus(20)... | # --------
# |@ s >|
# --------
level.description("It is too dark to see anything, but you smell sludge nearby.")
level.tip("Use warrior.feel().is_empty() to see if there is anything in front of you, and warrior.attack() to fight it. Remember, you can only do one action (ending in _) per turn.")
level.time_bonus(... | <commit_before># --------
# |@ s >|
# --------
level.description("It is too dark to see anything, but you smell sludge nearby.")
level.tip("Use warrior.feel().is_empty to see if there is anything in front of you, and warrior.attack! to fight it. Remember, you can only do one action (ending in _) per turn.")
level... | # --------
# |@ s >|
# --------
level.description("It is too dark to see anything, but you smell sludge nearby.")
level.tip("Use warrior.feel().is_empty() to see if there is anything in front of you, and warrior.attack() to fight it. Remember, you can only do one action (ending in _) per turn.")
level.time_bonus(... | # --------
# |@ s >|
# --------
level.description("It is too dark to see anything, but you smell sludge nearby.")
level.tip("Use warrior.feel().is_empty to see if there is anything in front of you, and warrior.attack! to fight it. Remember, you can only do one action (ending in _) per turn.")
level.time_bonus(20)... | <commit_before># --------
# |@ s >|
# --------
level.description("It is too dark to see anything, but you smell sludge nearby.")
level.tip("Use warrior.feel().is_empty to see if there is anything in front of you, and warrior.attack! to fight it. Remember, you can only do one action (ending in _) per turn.")
level... |
95da47010839da430223700345e07078b2157131 | evewspace/account/models.py | evewspace/account/models.py | from django.db import models
from django.contrib.auth.models import User, Group
from evewspace.Map.models import Map
from django.db.models.signals import post_save
# Create your models here.
class UserProfile(models.Model):
"""UserProfile defines custom fields tied to each User record in the Django auth DB."... | from django.db import models
from django.contrib.auth.models import User, Group
from evewspace.Map.models import Map
from django.db.models.signals import post_save
# Create your models here.
class PlayTime(models.Model):
"""PlayTime represents a choice of play times for use in several forms."""
fromtime = ... | Add PlayTime class and tie it to user profiles | Add PlayTime class and tie it to user profiles
Created a PlayTime class in account with from and to times.
Added ManyToManyField to UserProfile to keep track of play times.
| Python | apache-2.0 | evewspace/eve-wspace,Maarten28/eve-wspace,proycon/eve-wspace,gpapaz/eve-wspace,Unsettled/eve-wspace,acdervis/eve-wspace,Unsettled/eve-wspace,marbindrakon/eve-wspace,hybrid1969/eve-wspace,Unsettled/eve-wspace,acdervis/eve-wspace,marbindrakon/eve-wspace,Maarten28/eve-wspace,mmalyska/eve-wspace,acdervis/eve-wspace,nyrocro... | from django.db import models
from django.contrib.auth.models import User, Group
from evewspace.Map.models import Map
from django.db.models.signals import post_save
# Create your models here.
class UserProfile(models.Model):
"""UserProfile defines custom fields tied to each User record in the Django auth DB."... | from django.db import models
from django.contrib.auth.models import User, Group
from evewspace.Map.models import Map
from django.db.models.signals import post_save
# Create your models here.
class PlayTime(models.Model):
"""PlayTime represents a choice of play times for use in several forms."""
fromtime = ... | <commit_before>from django.db import models
from django.contrib.auth.models import User, Group
from evewspace.Map.models import Map
from django.db.models.signals import post_save
# Create your models here.
class UserProfile(models.Model):
"""UserProfile defines custom fields tied to each User record in the D... | from django.db import models
from django.contrib.auth.models import User, Group
from evewspace.Map.models import Map
from django.db.models.signals import post_save
# Create your models here.
class PlayTime(models.Model):
"""PlayTime represents a choice of play times for use in several forms."""
fromtime = ... | from django.db import models
from django.contrib.auth.models import User, Group
from evewspace.Map.models import Map
from django.db.models.signals import post_save
# Create your models here.
class UserProfile(models.Model):
"""UserProfile defines custom fields tied to each User record in the Django auth DB."... | <commit_before>from django.db import models
from django.contrib.auth.models import User, Group
from evewspace.Map.models import Map
from django.db.models.signals import post_save
# Create your models here.
class UserProfile(models.Model):
"""UserProfile defines custom fields tied to each User record in the D... |
09052d05c27921bc87b0c968de02b244b4e5a56b | cryptchat/test/test_networkhandler.py | cryptchat/test/test_networkhandler.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Run from Cryptchat
# python3 -m unittest discover
import unittest
from ..network.networkhandler import NetworkHandler
from ..crypto.aes import AESCipher
from ..crypto.diffiehellman import DiffieHellman
class testNetworkHandler(unittest.TestCase):
def setUp(self):... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Run from Cryptchat
# python3 -m unittest discover
import unittest
from ..network.networkhandler import NetworkHandler
from ..crypto.aes import AESCipher
from ..crypto.diffiehellman import DiffieHellman
class testNetworkHandler(unittest.TestCase):
@classmethod
... | Set up server/client once for the netcode test | Set up server/client once for the netcode test
| Python | mit | djohsson/Cryptchat | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Run from Cryptchat
# python3 -m unittest discover
import unittest
from ..network.networkhandler import NetworkHandler
from ..crypto.aes import AESCipher
from ..crypto.diffiehellman import DiffieHellman
class testNetworkHandler(unittest.TestCase):
def setUp(self):... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Run from Cryptchat
# python3 -m unittest discover
import unittest
from ..network.networkhandler import NetworkHandler
from ..crypto.aes import AESCipher
from ..crypto.diffiehellman import DiffieHellman
class testNetworkHandler(unittest.TestCase):
@classmethod
... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Run from Cryptchat
# python3 -m unittest discover
import unittest
from ..network.networkhandler import NetworkHandler
from ..crypto.aes import AESCipher
from ..crypto.diffiehellman import DiffieHellman
class testNetworkHandler(unittest.TestCase):
d... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Run from Cryptchat
# python3 -m unittest discover
import unittest
from ..network.networkhandler import NetworkHandler
from ..crypto.aes import AESCipher
from ..crypto.diffiehellman import DiffieHellman
class testNetworkHandler(unittest.TestCase):
@classmethod
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Run from Cryptchat
# python3 -m unittest discover
import unittest
from ..network.networkhandler import NetworkHandler
from ..crypto.aes import AESCipher
from ..crypto.diffiehellman import DiffieHellman
class testNetworkHandler(unittest.TestCase):
def setUp(self):... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Run from Cryptchat
# python3 -m unittest discover
import unittest
from ..network.networkhandler import NetworkHandler
from ..crypto.aes import AESCipher
from ..crypto.diffiehellman import DiffieHellman
class testNetworkHandler(unittest.TestCase):
d... |
83831a3434cdaf0a5ca214dfc4bd7fec65d4ffac | fastai/vision/models/tvm.py | fastai/vision/models/tvm.py | from torchvision.models import ResNet,resnet18,resnet34,resnet50,resnet101,resnet152
from torchvision.models import SqueezeNet,squeezenet1_0,squeezenet1_1
from torchvision.models import densenet121,densenet169,densenet201,densenet161
from torchvision.models import vgg11_bn,vgg13_bn,vgg16_bn,vgg19_bn,alexnet
| from torchvision.models import *
import types as _t
_g = globals()
for _k, _v in list(_g.items()):
if (
isinstance(_v, _t.ModuleType) and _v.__name__.startswith("torchvision.models")
) or (callable(_v) and _v.__module__ == "torchvision.models._api"):
del _g[_k]
del _k, _v, _g, _t
| Add latest TorchVision models on fastai | Add latest TorchVision models on fastai | Python | apache-2.0 | fastai/fastai | from torchvision.models import ResNet,resnet18,resnet34,resnet50,resnet101,resnet152
from torchvision.models import SqueezeNet,squeezenet1_0,squeezenet1_1
from torchvision.models import densenet121,densenet169,densenet201,densenet161
from torchvision.models import vgg11_bn,vgg13_bn,vgg16_bn,vgg19_bn,alexnet
Add latest ... | from torchvision.models import *
import types as _t
_g = globals()
for _k, _v in list(_g.items()):
if (
isinstance(_v, _t.ModuleType) and _v.__name__.startswith("torchvision.models")
) or (callable(_v) and _v.__module__ == "torchvision.models._api"):
del _g[_k]
del _k, _v, _g, _t
| <commit_before>from torchvision.models import ResNet,resnet18,resnet34,resnet50,resnet101,resnet152
from torchvision.models import SqueezeNet,squeezenet1_0,squeezenet1_1
from torchvision.models import densenet121,densenet169,densenet201,densenet161
from torchvision.models import vgg11_bn,vgg13_bn,vgg16_bn,vgg19_bn,alex... | from torchvision.models import *
import types as _t
_g = globals()
for _k, _v in list(_g.items()):
if (
isinstance(_v, _t.ModuleType) and _v.__name__.startswith("torchvision.models")
) or (callable(_v) and _v.__module__ == "torchvision.models._api"):
del _g[_k]
del _k, _v, _g, _t
| from torchvision.models import ResNet,resnet18,resnet34,resnet50,resnet101,resnet152
from torchvision.models import SqueezeNet,squeezenet1_0,squeezenet1_1
from torchvision.models import densenet121,densenet169,densenet201,densenet161
from torchvision.models import vgg11_bn,vgg13_bn,vgg16_bn,vgg19_bn,alexnet
Add latest ... | <commit_before>from torchvision.models import ResNet,resnet18,resnet34,resnet50,resnet101,resnet152
from torchvision.models import SqueezeNet,squeezenet1_0,squeezenet1_1
from torchvision.models import densenet121,densenet169,densenet201,densenet161
from torchvision.models import vgg11_bn,vgg13_bn,vgg16_bn,vgg19_bn,alex... |
8972720110ca73bf01c718bdc5cd2f99d2d12743 | tests/test_parse_perl6.py | tests/test_parse_perl6.py | import cdent.test
import cdent.parser.cdent.yaml
import cdent.parser.perl6
class TestPythonParser(cdent.test.TestCase):
def test_parse_perl6(self):
parser = cdent.parser.perl6.Parser()
# parser.debug = True
input = file('tests/modules/world.cd.pm6', 'r').read()
parser.open(input)
... | import cdent.test
import cdent.parser.cdent.yaml
import cdent.parser.perl6
class TestPythonParser(cdent.test.TestCase):
def test_parse_perl6(self):
parser = cdent.parser.perl6.Parser()
# parser.debug = True
input = file('tests/modules/World.cd.pm6', 'r').read()
parser.open(input)
... | Fix capitalization in test path | Fix capitalization in test path
| Python | bsd-2-clause | ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py | import cdent.test
import cdent.parser.cdent.yaml
import cdent.parser.perl6
class TestPythonParser(cdent.test.TestCase):
def test_parse_perl6(self):
parser = cdent.parser.perl6.Parser()
# parser.debug = True
input = file('tests/modules/world.cd.pm6', 'r').read()
parser.open(input)
... | import cdent.test
import cdent.parser.cdent.yaml
import cdent.parser.perl6
class TestPythonParser(cdent.test.TestCase):
def test_parse_perl6(self):
parser = cdent.parser.perl6.Parser()
# parser.debug = True
input = file('tests/modules/World.cd.pm6', 'r').read()
parser.open(input)
... | <commit_before>import cdent.test
import cdent.parser.cdent.yaml
import cdent.parser.perl6
class TestPythonParser(cdent.test.TestCase):
def test_parse_perl6(self):
parser = cdent.parser.perl6.Parser()
# parser.debug = True
input = file('tests/modules/world.cd.pm6', 'r').read()
pars... | import cdent.test
import cdent.parser.cdent.yaml
import cdent.parser.perl6
class TestPythonParser(cdent.test.TestCase):
def test_parse_perl6(self):
parser = cdent.parser.perl6.Parser()
# parser.debug = True
input = file('tests/modules/World.cd.pm6', 'r').read()
parser.open(input)
... | import cdent.test
import cdent.parser.cdent.yaml
import cdent.parser.perl6
class TestPythonParser(cdent.test.TestCase):
def test_parse_perl6(self):
parser = cdent.parser.perl6.Parser()
# parser.debug = True
input = file('tests/modules/world.cd.pm6', 'r').read()
parser.open(input)
... | <commit_before>import cdent.test
import cdent.parser.cdent.yaml
import cdent.parser.perl6
class TestPythonParser(cdent.test.TestCase):
def test_parse_perl6(self):
parser = cdent.parser.perl6.Parser()
# parser.debug = True
input = file('tests/modules/world.cd.pm6', 'r').read()
pars... |
45bdff8fbd19a74bf04aead7d134511605df99d5 | test/settings/gyptest-settings.py | test/settings/gyptest-settings.py | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('settings.gyp')
test.build('test.gyp', test.AL... | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
# 'settings' is only supported for make and scons (and will be removed there as
# we... | Make new settings test not run for xcode generator. | Make new settings test not run for xcode generator.
TBR=evan
Review URL: http://codereview.chromium.org/7472006
git-svn-id: e7e1075985beda50ea81ac4472467b4f6e91fc78@970 78cadc50-ecff-11dd-a971-7dbc132099af
| Python | bsd-3-clause | carlTLR/gyp,mistydemeo/gyp,msc-/gyp,okumura/gyp,Omegaphora/external_chromium_org_tools_gyp,channing/gyp,erikge/watch_gyp,ryfx/gyp,trafi/gyp,IllusionRom-deprecated/android_platform_external_chromium_org_tools_gyp,lukeweber/gyp-override,Phuehvk/gyp,duanhjlt/gyp,cchamberlain/gyp,Jack-Q/GYP-copy,clar/gyp,clar/gyp,openpeer/... | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('settings.gyp')
test.build('test.gyp', test.AL... | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
# 'settings' is only supported for make and scons (and will be removed there as
# we... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('settings.gyp')
test.build('tes... | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
# 'settings' is only supported for make and scons (and will be removed there as
# we... | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('settings.gyp')
test.build('test.gyp', test.AL... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('settings.gyp')
test.build('tes... |
10f2a3d6e748e18bd3858fe5686a6978cf9dc9ea | lib/precompilers.py | lib/precompilers.py | from compressor.filters.base import CompilerFilter
from compressor.filters.css_default import CssAbsoluteFilter
# Work around the fact that django-compressor doesn't succeed in running the
# CssAbsoluteFilter on less files due to broken path lookups.
class LessFilter(CompilerFilter):
def __init__(self, content, a... | from compressor.filters.base import CompilerFilter
from compressor.filters.css_default import CssAbsoluteFilter
from compressor.utils import staticfiles
class CustomCssAbsoluteFilter(CssAbsoluteFilter):
def find(self, basename):
# This is the same as the inherited implementation except for the
# re... | Fix staticfiles lookups on Heroku | lib: Fix staticfiles lookups on Heroku
| Python | mit | okfn/website,okfn/website,MjAbuz/foundation,MjAbuz/foundation,okfn/foundation,okfn/foundation,okfn/website,MjAbuz/foundation,okfn/foundation,MjAbuz/foundation,okfn/website,okfn/foundation | from compressor.filters.base import CompilerFilter
from compressor.filters.css_default import CssAbsoluteFilter
# Work around the fact that django-compressor doesn't succeed in running the
# CssAbsoluteFilter on less files due to broken path lookups.
class LessFilter(CompilerFilter):
def __init__(self, content, a... | from compressor.filters.base import CompilerFilter
from compressor.filters.css_default import CssAbsoluteFilter
from compressor.utils import staticfiles
class CustomCssAbsoluteFilter(CssAbsoluteFilter):
def find(self, basename):
# This is the same as the inherited implementation except for the
# re... | <commit_before>from compressor.filters.base import CompilerFilter
from compressor.filters.css_default import CssAbsoluteFilter
# Work around the fact that django-compressor doesn't succeed in running the
# CssAbsoluteFilter on less files due to broken path lookups.
class LessFilter(CompilerFilter):
def __init__(s... | from compressor.filters.base import CompilerFilter
from compressor.filters.css_default import CssAbsoluteFilter
from compressor.utils import staticfiles
class CustomCssAbsoluteFilter(CssAbsoluteFilter):
def find(self, basename):
# This is the same as the inherited implementation except for the
# re... | from compressor.filters.base import CompilerFilter
from compressor.filters.css_default import CssAbsoluteFilter
# Work around the fact that django-compressor doesn't succeed in running the
# CssAbsoluteFilter on less files due to broken path lookups.
class LessFilter(CompilerFilter):
def __init__(self, content, a... | <commit_before>from compressor.filters.base import CompilerFilter
from compressor.filters.css_default import CssAbsoluteFilter
# Work around the fact that django-compressor doesn't succeed in running the
# CssAbsoluteFilter on less files due to broken path lookups.
class LessFilter(CompilerFilter):
def __init__(s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.