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
dfbebf26f52db94c9fc8e1056c39013d8cdb2656
name/context_processors.py
name/context_processors.py
def baseurl(request): """ Return a BASE_URL template context for the current request """ if request.is_secure(): scheme = 'https://' else: scheme = 'http://' return { 'BASE_URL': scheme + request.get_host(), }
from name.models import NAME_TYPE_CHOICES def baseurl(request): """ Return a BASE_URL template context for the current request """ if request.is_secure(): scheme = 'https://' else: scheme = 'http://' return { 'BASE_URL': scheme + request.get_host(), } def name_ty...
Add a new context processor to include the NAME_TYPE_CHOICES in every request context.
Add a new context processor to include the NAME_TYPE_CHOICES in every request context.
Python
bsd-3-clause
unt-libraries/django-name,damonkelley/django-name,unt-libraries/django-name,damonkelley/django-name,unt-libraries/django-name,damonkelley/django-name
def baseurl(request): """ Return a BASE_URL template context for the current request """ if request.is_secure(): scheme = 'https://' else: scheme = 'http://' return { 'BASE_URL': scheme + request.get_host(), } Add a new context processor to include the NAME_TYPE_CHOI...
from name.models import NAME_TYPE_CHOICES def baseurl(request): """ Return a BASE_URL template context for the current request """ if request.is_secure(): scheme = 'https://' else: scheme = 'http://' return { 'BASE_URL': scheme + request.get_host(), } def name_ty...
<commit_before>def baseurl(request): """ Return a BASE_URL template context for the current request """ if request.is_secure(): scheme = 'https://' else: scheme = 'http://' return { 'BASE_URL': scheme + request.get_host(), } <commit_msg>Add a new context processor to...
from name.models import NAME_TYPE_CHOICES def baseurl(request): """ Return a BASE_URL template context for the current request """ if request.is_secure(): scheme = 'https://' else: scheme = 'http://' return { 'BASE_URL': scheme + request.get_host(), } def name_ty...
def baseurl(request): """ Return a BASE_URL template context for the current request """ if request.is_secure(): scheme = 'https://' else: scheme = 'http://' return { 'BASE_URL': scheme + request.get_host(), } Add a new context processor to include the NAME_TYPE_CHOI...
<commit_before>def baseurl(request): """ Return a BASE_URL template context for the current request """ if request.is_secure(): scheme = 'https://' else: scheme = 'http://' return { 'BASE_URL': scheme + request.get_host(), } <commit_msg>Add a new context processor to...
f33bf5a99b9bb814fe6da6b7713e87014aae5fdf
src/journal/migrations/0035_journal_xsl.py
src/journal/migrations/0035_journal_xsl.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-11-03 20:56 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import journal.models class Migration(migrations.Migration): dependencies = [ ('journal', '0034_migrate_issue_types'...
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-11-03 20:56 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import journal.models class Migration(migrations.Migration): dependencies = [ ('journal', '0034_migrate_issue_types'...
Fix migration tree for journal 0035
Fix migration tree for journal 0035
Python
agpl-3.0
BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-11-03 20:56 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import journal.models class Migration(migrations.Migration): dependencies = [ ('journal', '0034_migrate_issue_types'...
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-11-03 20:56 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import journal.models class Migration(migrations.Migration): dependencies = [ ('journal', '0034_migrate_issue_types'...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-11-03 20:56 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import journal.models class Migration(migrations.Migration): dependencies = [ ('journal', '0034_migra...
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-11-03 20:56 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import journal.models class Migration(migrations.Migration): dependencies = [ ('journal', '0034_migrate_issue_types'...
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-11-03 20:56 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import journal.models class Migration(migrations.Migration): dependencies = [ ('journal', '0034_migrate_issue_types'...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-11-03 20:56 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import journal.models class Migration(migrations.Migration): dependencies = [ ('journal', '0034_migra...
0904d8f5ca4f10b4cc7121e60c35f7560e37019c
boardinghouse/templatetags/boardinghouse.py
boardinghouse/templatetags/boardinghouse.py
from django import template from ..schema import is_shared_model as _is_shared_model from ..schema import get_schema_model Schema = get_schema_model() register = template.Library() @register.filter def is_schema_aware(obj): return obj and not _is_shared_model(obj) @register.filter def is_shared_model(obj): ...
from django import template from ..schema import is_shared_model as _is_shared_model from ..schema import _get_schema register = template.Library() @register.filter def is_schema_aware(obj): return obj and not _is_shared_model(obj) @register.filter def is_shared_model(obj): return obj and _is_shared_model(o...
Remove a database access from the template tag.
Remove a database access from the template tag.
Python
bsd-3-clause
luzfcb/django-boardinghouse,luzfcb/django-boardinghouse,luzfcb/django-boardinghouse
from django import template from ..schema import is_shared_model as _is_shared_model from ..schema import get_schema_model Schema = get_schema_model() register = template.Library() @register.filter def is_schema_aware(obj): return obj and not _is_shared_model(obj) @register.filter def is_shared_model(obj): ...
from django import template from ..schema import is_shared_model as _is_shared_model from ..schema import _get_schema register = template.Library() @register.filter def is_schema_aware(obj): return obj and not _is_shared_model(obj) @register.filter def is_shared_model(obj): return obj and _is_shared_model(o...
<commit_before>from django import template from ..schema import is_shared_model as _is_shared_model from ..schema import get_schema_model Schema = get_schema_model() register = template.Library() @register.filter def is_schema_aware(obj): return obj and not _is_shared_model(obj) @register.filter def is_shared_...
from django import template from ..schema import is_shared_model as _is_shared_model from ..schema import _get_schema register = template.Library() @register.filter def is_schema_aware(obj): return obj and not _is_shared_model(obj) @register.filter def is_shared_model(obj): return obj and _is_shared_model(o...
from django import template from ..schema import is_shared_model as _is_shared_model from ..schema import get_schema_model Schema = get_schema_model() register = template.Library() @register.filter def is_schema_aware(obj): return obj and not _is_shared_model(obj) @register.filter def is_shared_model(obj): ...
<commit_before>from django import template from ..schema import is_shared_model as _is_shared_model from ..schema import get_schema_model Schema = get_schema_model() register = template.Library() @register.filter def is_schema_aware(obj): return obj and not _is_shared_model(obj) @register.filter def is_shared_...
4b448c704f69b951d19229c85debfdb5a2e122c1
citeproc/py2compat.py
citeproc/py2compat.py
from __future__ import (absolute_import, division, print_function, unicode_literals) import locale import sys __all__ = ['PY2'] PY2 = sys.version_info < (3, 0) if PY2: __all__ += ['str', 'print', 'open'] from io import open str = unicode std_print = print def print(*o...
from __future__ import (absolute_import, division, print_function, unicode_literals) import locale import sys __all__ = ['PY2'] PY2 = sys.version_info < (3, 0) if PY2: __all__ += ['str', 'print', 'open'] from io import open str = unicode std_print = print def print(*o...
Fix Tox/Travis testing on Python 2.7
Fix Tox/Travis testing on Python 2.7
Python
bsd-2-clause
jayvdb/citeproc-py
from __future__ import (absolute_import, division, print_function, unicode_literals) import locale import sys __all__ = ['PY2'] PY2 = sys.version_info < (3, 0) if PY2: __all__ += ['str', 'print', 'open'] from io import open str = unicode std_print = print def print(*o...
from __future__ import (absolute_import, division, print_function, unicode_literals) import locale import sys __all__ = ['PY2'] PY2 = sys.version_info < (3, 0) if PY2: __all__ += ['str', 'print', 'open'] from io import open str = unicode std_print = print def print(*o...
<commit_before> from __future__ import (absolute_import, division, print_function, unicode_literals) import locale import sys __all__ = ['PY2'] PY2 = sys.version_info < (3, 0) if PY2: __all__ += ['str', 'print', 'open'] from io import open str = unicode std_print = print ...
from __future__ import (absolute_import, division, print_function, unicode_literals) import locale import sys __all__ = ['PY2'] PY2 = sys.version_info < (3, 0) if PY2: __all__ += ['str', 'print', 'open'] from io import open str = unicode std_print = print def print(*o...
from __future__ import (absolute_import, division, print_function, unicode_literals) import locale import sys __all__ = ['PY2'] PY2 = sys.version_info < (3, 0) if PY2: __all__ += ['str', 'print', 'open'] from io import open str = unicode std_print = print def print(*o...
<commit_before> from __future__ import (absolute_import, division, print_function, unicode_literals) import locale import sys __all__ = ['PY2'] PY2 = sys.version_info < (3, 0) if PY2: __all__ += ['str', 'print', 'open'] from io import open str = unicode std_print = print ...
2436f1a00021baa39f3d3dfece1d44a2d3351dfd
bin/create_test_user.py
bin/create_test_user.py
# Create a dummy user for the app store review testing # This needs to be done every time we switch to a new database import sys from dao.user import User def create_fake_JWT_token(userEmail): """ Creates a fake JWT token for the specified user. This has two major benefits. 1. It allows us to finally writ...
# Create a dummy user for the app store review testing # This needs to be done every time we switch to a new database import sys from emission.core.wrapper.user import User def create_fake_JWT_token(userEmail): """ Creates a fake JWT token for the specified user. This has two major benefits. 1. It allows ...
Fix import to match the new directory structure
Fix import to match the new directory structure
Python
bsd-3-clause
yw374cornell/e-mission-server,joshzarrabi/e-mission-server,yw374cornell/e-mission-server,shankari/e-mission-server,joshzarrabi/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,yw374cornell/e-mission-server,e-mission/e-mission-server,yw374cornell/...
# Create a dummy user for the app store review testing # This needs to be done every time we switch to a new database import sys from dao.user import User def create_fake_JWT_token(userEmail): """ Creates a fake JWT token for the specified user. This has two major benefits. 1. It allows us to finally writ...
# Create a dummy user for the app store review testing # This needs to be done every time we switch to a new database import sys from emission.core.wrapper.user import User def create_fake_JWT_token(userEmail): """ Creates a fake JWT token for the specified user. This has two major benefits. 1. It allows ...
<commit_before># Create a dummy user for the app store review testing # This needs to be done every time we switch to a new database import sys from dao.user import User def create_fake_JWT_token(userEmail): """ Creates a fake JWT token for the specified user. This has two major benefits. 1. It allows us ...
# Create a dummy user for the app store review testing # This needs to be done every time we switch to a new database import sys from emission.core.wrapper.user import User def create_fake_JWT_token(userEmail): """ Creates a fake JWT token for the specified user. This has two major benefits. 1. It allows ...
# Create a dummy user for the app store review testing # This needs to be done every time we switch to a new database import sys from dao.user import User def create_fake_JWT_token(userEmail): """ Creates a fake JWT token for the specified user. This has two major benefits. 1. It allows us to finally writ...
<commit_before># Create a dummy user for the app store review testing # This needs to be done every time we switch to a new database import sys from dao.user import User def create_fake_JWT_token(userEmail): """ Creates a fake JWT token for the specified user. This has two major benefits. 1. It allows us ...
6e3d24b0594434577de6950190f0f103e08a2fbe
Source/Perforce/wb_p4_credential_dialogs.py
Source/Perforce/wb_p4_credential_dialogs.py
''' ==================================================================== Copyright (c) 2018 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===========================================================...
''' ==================================================================== Copyright (c) 2018 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===========================================================...
Update the crential dialog for perforce - untested
Update the crential dialog for perforce - untested
Python
apache-2.0
barry-scott/git-workbench,barry-scott/scm-workbench,barry-scott/scm-workbench,barry-scott/scm-workbench,barry-scott/git-workbench
''' ==================================================================== Copyright (c) 2018 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===========================================================...
''' ==================================================================== Copyright (c) 2018 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===========================================================...
<commit_before>''' ==================================================================== Copyright (c) 2018 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ============================================...
''' ==================================================================== Copyright (c) 2018 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===========================================================...
''' ==================================================================== Copyright (c) 2018 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===========================================================...
<commit_before>''' ==================================================================== Copyright (c) 2018 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ============================================...
2e6267c7b283fd579395fc3faac2b253ddb032fe
src/midonet/auth/keystone.py
src/midonet/auth/keystone.py
from keystoneclient.v2_0 import client as keystone_client from datetime import datetime from datetime import timedelta class KeystoneAuth: def __init__(self, uri, username, password, tenant_id=None, tenant_name=None): self.uri = uri self.username = username self.password...
from keystoneclient.v2_0 import client as keystone_client from datetime import datetime from datetime import timedelta class KeystoneAuth: def __init__(self, uri, username, password, tenant_id=None, tenant_name=None): self.uri = uri self.username = username self.password...
Add public method to get token.
Add public method to get token. Signed-off-by: Tomoe Sugihara <6015414ca332492cf0bb4dbbac212276d1c110a7@midokura.com>
Python
apache-2.0
midonet/python-midonetclient,midonet/python-midonetclient,midokura/python-midonetclient,midokura/python-midonetclient
from keystoneclient.v2_0 import client as keystone_client from datetime import datetime from datetime import timedelta class KeystoneAuth: def __init__(self, uri, username, password, tenant_id=None, tenant_name=None): self.uri = uri self.username = username self.password...
from keystoneclient.v2_0 import client as keystone_client from datetime import datetime from datetime import timedelta class KeystoneAuth: def __init__(self, uri, username, password, tenant_id=None, tenant_name=None): self.uri = uri self.username = username self.password...
<commit_before> from keystoneclient.v2_0 import client as keystone_client from datetime import datetime from datetime import timedelta class KeystoneAuth: def __init__(self, uri, username, password, tenant_id=None, tenant_name=None): self.uri = uri self.username = username ...
from keystoneclient.v2_0 import client as keystone_client from datetime import datetime from datetime import timedelta class KeystoneAuth: def __init__(self, uri, username, password, tenant_id=None, tenant_name=None): self.uri = uri self.username = username self.password...
from keystoneclient.v2_0 import client as keystone_client from datetime import datetime from datetime import timedelta class KeystoneAuth: def __init__(self, uri, username, password, tenant_id=None, tenant_name=None): self.uri = uri self.username = username self.password...
<commit_before> from keystoneclient.v2_0 import client as keystone_client from datetime import datetime from datetime import timedelta class KeystoneAuth: def __init__(self, uri, username, password, tenant_id=None, tenant_name=None): self.uri = uri self.username = username ...
7895b0a39694e88ed1bdd425c69fb747b7531c59
indico/testing/mocks.py
indico/testing/mocks.py
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 3 of the # License, or (a...
Fix str/int usage in MockConferenceHolder
Fix str/int usage in MockConferenceHolder
Python
mit
indico/indico,ThiefMaster/indico,indico/indico,OmeGak/indico,ThiefMaster/indico,OmeGak/indico,mic4ael/indico,DirkHoffmann/indico,mvidalgarcia/indico,mvidalgarcia/indico,OmeGak/indico,pferreir/indico,ThiefMaster/indico,mic4ael/indico,pferreir/indico,DirkHoffmann/indico,ThiefMaster/indico,OmeGak/indico,mic4ael/indico,ind...
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 3 of the # License, or (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 3 of the #...
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 3 of the # License, or (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 3 of the #...
06b6b2fa0d8f7d8e4ef35068c3aa32cd39ac04c3
accountant/functional_tests/test_homepage.py
accountant/functional_tests/test_homepage.py
# -*- coding: utf-8 -*- from .base import FunctionalTestCase from .pages import game class HomePageTest(FunctionalTestCase): def test_create_game(self): # Alice is a user who visits the website self.browser.get(self.live_server_url) # She sees that the title of the browser contains '18xx Ac...
# -*- coding: utf-8 -*- import unittest from .base import FunctionalTestCase from .pages import game class HomePageTest(FunctionalTestCase): @unittest.skip def test_create_game(self): # Alice is a user who visits the website self.browser.get(self.live_server_url) # She sees that the tit...
Add FT to test if angular is loaded
Add FT to test if angular is loaded
Python
mit
XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant
# -*- coding: utf-8 -*- from .base import FunctionalTestCase from .pages import game class HomePageTest(FunctionalTestCase): def test_create_game(self): # Alice is a user who visits the website self.browser.get(self.live_server_url) # She sees that the title of the browser contains '18xx Ac...
# -*- coding: utf-8 -*- import unittest from .base import FunctionalTestCase from .pages import game class HomePageTest(FunctionalTestCase): @unittest.skip def test_create_game(self): # Alice is a user who visits the website self.browser.get(self.live_server_url) # She sees that the tit...
<commit_before># -*- coding: utf-8 -*- from .base import FunctionalTestCase from .pages import game class HomePageTest(FunctionalTestCase): def test_create_game(self): # Alice is a user who visits the website self.browser.get(self.live_server_url) # She sees that the title of the browser co...
# -*- coding: utf-8 -*- import unittest from .base import FunctionalTestCase from .pages import game class HomePageTest(FunctionalTestCase): @unittest.skip def test_create_game(self): # Alice is a user who visits the website self.browser.get(self.live_server_url) # She sees that the tit...
# -*- coding: utf-8 -*- from .base import FunctionalTestCase from .pages import game class HomePageTest(FunctionalTestCase): def test_create_game(self): # Alice is a user who visits the website self.browser.get(self.live_server_url) # She sees that the title of the browser contains '18xx Ac...
<commit_before># -*- coding: utf-8 -*- from .base import FunctionalTestCase from .pages import game class HomePageTest(FunctionalTestCase): def test_create_game(self): # Alice is a user who visits the website self.browser.get(self.live_server_url) # She sees that the title of the browser co...
ba3544fc18d5c5e827b1c1777b7811201545a8c5
boto/pyami/scriptbase.py
boto/pyami/scriptbase.py
import os, sys, time, traceback import smtplib from boto.utils import ShellCommand, get_ts import boto import boto.utils class ScriptBase: def __init__(self, config_file=None): self.instance_id = boto.config.get('Instance', 'instance-id', 'default') self.name = self.__class__.__name__ self...
import os, sys, time, traceback import smtplib from boto.utils import ShellCommand, get_ts import boto import boto.utils class ScriptBase: def __init__(self, config_file=None): self.instance_id = boto.config.get('Instance', 'instance-id', 'default') self.name = self.__class__.__name__ self...
Add the command that failed to the error log and the error email to help debug problems where the error produces no output.
Add the command that failed to the error log and the error email to help debug problems where the error produces no output.
Python
mit
appneta/boto,dimdung/boto,j-carl/boto,ekalosak/boto,drbild/boto,acourtney2015/boto,bryx-inc/boto,darjus-amzn/boto,ddzialak/boto,alfredodeza/boto,vijaylbais/boto,clouddocx/boto,israelbenatar/boto,alex/boto,podhmo/boto,cyclecomputing/boto,shipci/boto,kouk/boto,jindongh/boto,felix-d/boto,Timus1712/boto,alex/boto,lochiicon...
import os, sys, time, traceback import smtplib from boto.utils import ShellCommand, get_ts import boto import boto.utils class ScriptBase: def __init__(self, config_file=None): self.instance_id = boto.config.get('Instance', 'instance-id', 'default') self.name = self.__class__.__name__ self...
import os, sys, time, traceback import smtplib from boto.utils import ShellCommand, get_ts import boto import boto.utils class ScriptBase: def __init__(self, config_file=None): self.instance_id = boto.config.get('Instance', 'instance-id', 'default') self.name = self.__class__.__name__ self...
<commit_before>import os, sys, time, traceback import smtplib from boto.utils import ShellCommand, get_ts import boto import boto.utils class ScriptBase: def __init__(self, config_file=None): self.instance_id = boto.config.get('Instance', 'instance-id', 'default') self.name = self.__class__.__name...
import os, sys, time, traceback import smtplib from boto.utils import ShellCommand, get_ts import boto import boto.utils class ScriptBase: def __init__(self, config_file=None): self.instance_id = boto.config.get('Instance', 'instance-id', 'default') self.name = self.__class__.__name__ self...
import os, sys, time, traceback import smtplib from boto.utils import ShellCommand, get_ts import boto import boto.utils class ScriptBase: def __init__(self, config_file=None): self.instance_id = boto.config.get('Instance', 'instance-id', 'default') self.name = self.__class__.__name__ self...
<commit_before>import os, sys, time, traceback import smtplib from boto.utils import ShellCommand, get_ts import boto import boto.utils class ScriptBase: def __init__(self, config_file=None): self.instance_id = boto.config.get('Instance', 'instance-id', 'default') self.name = self.__class__.__name...
2872d4f34dbcfe4b212ca7c72a7b9ec725cfcc20
pyQuantuccia/tests/test_get_holiday_date.py
pyQuantuccia/tests/test_get_holiday_date.py
from pyQuantuccia import quantuccia def test_get_holiday_date(): """ At the moment the only thing this function can do is return NULL. """ assert(quantuccia.get_holiday_date() is None)
# from pyQuantuccia import quantuccia def test_get_holiday_date(): """ At the moment the only thing this function can do is return NULL. """ # assert(quantuccia.get_holiday_date() is None) pass
Comment out the tests so that the diagnostic test can run.
Comment out the tests so that the diagnostic test can run.
Python
bsd-3-clause
jwg4/pyQuantuccia,jwg4/pyQuantuccia
from pyQuantuccia import quantuccia def test_get_holiday_date(): """ At the moment the only thing this function can do is return NULL. """ assert(quantuccia.get_holiday_date() is None) Comment out the tests so that the diagnostic test can run.
# from pyQuantuccia import quantuccia def test_get_holiday_date(): """ At the moment the only thing this function can do is return NULL. """ # assert(quantuccia.get_holiday_date() is None) pass
<commit_before>from pyQuantuccia import quantuccia def test_get_holiday_date(): """ At the moment the only thing this function can do is return NULL. """ assert(quantuccia.get_holiday_date() is None) <commit_msg>Comment out the tests so that the diagnostic test can run.<commit_after>
# from pyQuantuccia import quantuccia def test_get_holiday_date(): """ At the moment the only thing this function can do is return NULL. """ # assert(quantuccia.get_holiday_date() is None) pass
from pyQuantuccia import quantuccia def test_get_holiday_date(): """ At the moment the only thing this function can do is return NULL. """ assert(quantuccia.get_holiday_date() is None) Comment out the tests so that the diagnostic test can run.# from pyQuantuccia import quantuccia def test_get_h...
<commit_before>from pyQuantuccia import quantuccia def test_get_holiday_date(): """ At the moment the only thing this function can do is return NULL. """ assert(quantuccia.get_holiday_date() is None) <commit_msg>Comment out the tests so that the diagnostic test can run.<commit_after># from pyQuan...
d0b56873b40acd3932f450293c363b01b5a709b9
jinja2_time/__init__.py
jinja2_time/__init__.py
# -*- coding: utf-8 -*- __author__ = 'Raphael Pierzina' __email__ = 'raphael@hackebrot.de' __version__ = '0.1.0' from .jinja2_time import TimeExtension __all__ = ['TimeExtension']
# -*- coding: utf-8 -*- from .jinja2_time import TimeExtension __author__ = 'Raphael Pierzina' __email__ = 'raphael@hackebrot.de' __version__ = '0.1.0' __all__ = ['TimeExtension']
Fix flake8 issue in init
Fix flake8 issue in init
Python
mit
hackebrot/jinja2-time
# -*- coding: utf-8 -*- __author__ = 'Raphael Pierzina' __email__ = 'raphael@hackebrot.de' __version__ = '0.1.0' from .jinja2_time import TimeExtension __all__ = ['TimeExtension'] Fix flake8 issue in init
# -*- coding: utf-8 -*- from .jinja2_time import TimeExtension __author__ = 'Raphael Pierzina' __email__ = 'raphael@hackebrot.de' __version__ = '0.1.0' __all__ = ['TimeExtension']
<commit_before># -*- coding: utf-8 -*- __author__ = 'Raphael Pierzina' __email__ = 'raphael@hackebrot.de' __version__ = '0.1.0' from .jinja2_time import TimeExtension __all__ = ['TimeExtension'] <commit_msg>Fix flake8 issue in init<commit_after>
# -*- coding: utf-8 -*- from .jinja2_time import TimeExtension __author__ = 'Raphael Pierzina' __email__ = 'raphael@hackebrot.de' __version__ = '0.1.0' __all__ = ['TimeExtension']
# -*- coding: utf-8 -*- __author__ = 'Raphael Pierzina' __email__ = 'raphael@hackebrot.de' __version__ = '0.1.0' from .jinja2_time import TimeExtension __all__ = ['TimeExtension'] Fix flake8 issue in init# -*- coding: utf-8 -*- from .jinja2_time import TimeExtension __author__ = 'Raphael Pierzina' __email__ = 'rap...
<commit_before># -*- coding: utf-8 -*- __author__ = 'Raphael Pierzina' __email__ = 'raphael@hackebrot.de' __version__ = '0.1.0' from .jinja2_time import TimeExtension __all__ = ['TimeExtension'] <commit_msg>Fix flake8 issue in init<commit_after># -*- coding: utf-8 -*- from .jinja2_time import TimeExtension __autho...
810e688e8e896caf5a3c6de1c76a5bc696d918c6
apps.py
apps.py
import os import webapp2 import handlers debug = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') task_app = webapp2.WSGIApplication([ ('/task/index', handlers.IndexTaskHandler), ('/task/torrent', handlers.TorrentTaskHandler), ('/task/update_feeds', handlers.FeedTaskHandler), ('/task/cleanup'...
import os import webapp2 import logging import handlers debug = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') loglevel = logging.DEBUG if debug else logging.INFO logging.getLogger().setLevel(loglevel) task_app = webapp2.WSGIApplication([ ('/task/index', handlers.IndexTaskHandler), ('/task/torrent'...
Set logging level depenging on environment
Set logging level depenging on environment
Python
apache-2.0
notapresent/rutracker_rss,notapresent/rutracker_rss,notapresent/rutracker_rss
import os import webapp2 import handlers debug = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') task_app = webapp2.WSGIApplication([ ('/task/index', handlers.IndexTaskHandler), ('/task/torrent', handlers.TorrentTaskHandler), ('/task/update_feeds', handlers.FeedTaskHandler), ('/task/cleanup'...
import os import webapp2 import logging import handlers debug = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') loglevel = logging.DEBUG if debug else logging.INFO logging.getLogger().setLevel(loglevel) task_app = webapp2.WSGIApplication([ ('/task/index', handlers.IndexTaskHandler), ('/task/torrent'...
<commit_before>import os import webapp2 import handlers debug = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') task_app = webapp2.WSGIApplication([ ('/task/index', handlers.IndexTaskHandler), ('/task/torrent', handlers.TorrentTaskHandler), ('/task/update_feeds', handlers.FeedTaskHandler), (...
import os import webapp2 import logging import handlers debug = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') loglevel = logging.DEBUG if debug else logging.INFO logging.getLogger().setLevel(loglevel) task_app = webapp2.WSGIApplication([ ('/task/index', handlers.IndexTaskHandler), ('/task/torrent'...
import os import webapp2 import handlers debug = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') task_app = webapp2.WSGIApplication([ ('/task/index', handlers.IndexTaskHandler), ('/task/torrent', handlers.TorrentTaskHandler), ('/task/update_feeds', handlers.FeedTaskHandler), ('/task/cleanup'...
<commit_before>import os import webapp2 import handlers debug = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') task_app = webapp2.WSGIApplication([ ('/task/index', handlers.IndexTaskHandler), ('/task/torrent', handlers.TorrentTaskHandler), ('/task/update_feeds', handlers.FeedTaskHandler), (...
7e5221a65bd644cc86003f67daa3148f22b4a530
hash_table.py
hash_table.py
#!/usr/bin/env python '''Implementation of a simple hash table. The table has `hash`, `get` and `set` methods. The hash function uses a very basic hash algorithm to insert the value into the table. ''' class HashItem(object): def __init__(self): pass class Hash(object): def __init__(self, size=1024...
#!/usr/bin/env python '''Implementation of a simple hash table. The table has `hash`, `get` and `set` methods. The hash function uses a very basic hash algorithm to insert the value into the table. ''' class HashItem(object): def __init__(self, key, value): self.key = key self.value = value cla...
Build out hash item class
Build out hash item class
Python
mit
jwarren116/data-structures-deux
#!/usr/bin/env python '''Implementation of a simple hash table. The table has `hash`, `get` and `set` methods. The hash function uses a very basic hash algorithm to insert the value into the table. ''' class HashItem(object): def __init__(self): pass class Hash(object): def __init__(self, size=1024...
#!/usr/bin/env python '''Implementation of a simple hash table. The table has `hash`, `get` and `set` methods. The hash function uses a very basic hash algorithm to insert the value into the table. ''' class HashItem(object): def __init__(self, key, value): self.key = key self.value = value cla...
<commit_before>#!/usr/bin/env python '''Implementation of a simple hash table. The table has `hash`, `get` and `set` methods. The hash function uses a very basic hash algorithm to insert the value into the table. ''' class HashItem(object): def __init__(self): pass class Hash(object): def __init__(...
#!/usr/bin/env python '''Implementation of a simple hash table. The table has `hash`, `get` and `set` methods. The hash function uses a very basic hash algorithm to insert the value into the table. ''' class HashItem(object): def __init__(self, key, value): self.key = key self.value = value cla...
#!/usr/bin/env python '''Implementation of a simple hash table. The table has `hash`, `get` and `set` methods. The hash function uses a very basic hash algorithm to insert the value into the table. ''' class HashItem(object): def __init__(self): pass class Hash(object): def __init__(self, size=1024...
<commit_before>#!/usr/bin/env python '''Implementation of a simple hash table. The table has `hash`, `get` and `set` methods. The hash function uses a very basic hash algorithm to insert the value into the table. ''' class HashItem(object): def __init__(self): pass class Hash(object): def __init__(...
ca8556584876adfea9f9f1f1042ebb2704933f34
addons/product/__terp__.py
addons/product/__terp__.py
{ "name" : "Products & Pricelists", "version" : "1.0", "author" : "Tiny", "category" : "Generic Modules/Inventory Control", "depends" : ["base"], "init_xml" : [], "demo_xml" : ["product_demo.xml"], "description": """ This is the base module to manage products and pricelists in Tiny ERP. Products support vari...
{ "name" : "Products & Pricelists", "version" : "1.0", "author" : "Tiny", "category" : "Generic Modules/Inventory Control", "depends" : ["base"], "init_xml" : [], "demo_xml" : ["product_demo.xml"], "description": """ This is the base module to manage products and pricelists in Tiny ERP. Products support vari...
Add product_security.xml file entry in update_xml section
Add product_security.xml file entry in update_xml section bzr revid: mga@tinyerp.com-c1c968b6c0a6dd356a1ae7bc971a2daa2356a46d
Python
agpl-3.0
hbrunn/OpenUpgrade,jeasoft/odoo,FlorianLudwig/odoo,colinnewell/odoo,alhashash/odoo,jesramirez/odoo,lsinfo/odoo,rowemoore/odoo,sysadminmatmoz/OCB,JGarcia-Panach/odoo,dariemp/odoo,fgesora/odoo,takis/odoo,kirca/OpenUpgrade,tinkerthaler/odoo,Antiun/odoo,factorlibre/OCB,stonegithubs/odoo,matrixise/odoo,dllsf/odootest,Endika...
{ "name" : "Products & Pricelists", "version" : "1.0", "author" : "Tiny", "category" : "Generic Modules/Inventory Control", "depends" : ["base"], "init_xml" : [], "demo_xml" : ["product_demo.xml"], "description": """ This is the base module to manage products and pricelists in Tiny ERP. Products support vari...
{ "name" : "Products & Pricelists", "version" : "1.0", "author" : "Tiny", "category" : "Generic Modules/Inventory Control", "depends" : ["base"], "init_xml" : [], "demo_xml" : ["product_demo.xml"], "description": """ This is the base module to manage products and pricelists in Tiny ERP. Products support vari...
<commit_before>{ "name" : "Products & Pricelists", "version" : "1.0", "author" : "Tiny", "category" : "Generic Modules/Inventory Control", "depends" : ["base"], "init_xml" : [], "demo_xml" : ["product_demo.xml"], "description": """ This is the base module to manage products and pricelists in Tiny ERP. Produc...
{ "name" : "Products & Pricelists", "version" : "1.0", "author" : "Tiny", "category" : "Generic Modules/Inventory Control", "depends" : ["base"], "init_xml" : [], "demo_xml" : ["product_demo.xml"], "description": """ This is the base module to manage products and pricelists in Tiny ERP. Products support vari...
{ "name" : "Products & Pricelists", "version" : "1.0", "author" : "Tiny", "category" : "Generic Modules/Inventory Control", "depends" : ["base"], "init_xml" : [], "demo_xml" : ["product_demo.xml"], "description": """ This is the base module to manage products and pricelists in Tiny ERP. Products support vari...
<commit_before>{ "name" : "Products & Pricelists", "version" : "1.0", "author" : "Tiny", "category" : "Generic Modules/Inventory Control", "depends" : ["base"], "init_xml" : [], "demo_xml" : ["product_demo.xml"], "description": """ This is the base module to manage products and pricelists in Tiny ERP. Produc...
a3ee55cf4d9182247dcc7a42b0336c467dce9e3e
linter.py
linter.py
from SublimeLinter.lint import Linter, util class Cppcheck(Linter): cmd = ( 'cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}' ) regex = ( r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\...
from SublimeLinter.lint import Linter, util class Cppcheck(Linter): cmd = ( 'cppcheck', '--template={file}:{line}:{column}:{severity}:{id}:{message}', '--inline-suppr', '--quiet', '${args}', '${file}' ) regex = ( r'^(?P<file>(:\\|[^:])+):(?P<line>\d+...
Add cppcheck issue id as code field
Add cppcheck issue id as code field
Python
mit
SublimeLinter/SublimeLinter-cppcheck
from SublimeLinter.lint import Linter, util class Cppcheck(Linter): cmd = ( 'cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}' ) regex = ( r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\...
from SublimeLinter.lint import Linter, util class Cppcheck(Linter): cmd = ( 'cppcheck', '--template={file}:{line}:{column}:{severity}:{id}:{message}', '--inline-suppr', '--quiet', '${args}', '${file}' ) regex = ( r'^(?P<file>(:\\|[^:])+):(?P<line>\d+...
<commit_before>from SublimeLinter.lint import Linter, util class Cppcheck(Linter): cmd = ( 'cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}' ) regex = ( r'^(?P<file>(:\\|[^:])+):(?P<line>...
from SublimeLinter.lint import Linter, util class Cppcheck(Linter): cmd = ( 'cppcheck', '--template={file}:{line}:{column}:{severity}:{id}:{message}', '--inline-suppr', '--quiet', '${args}', '${file}' ) regex = ( r'^(?P<file>(:\\|[^:])+):(?P<line>\d+...
from SublimeLinter.lint import Linter, util class Cppcheck(Linter): cmd = ( 'cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}' ) regex = ( r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\...
<commit_before>from SublimeLinter.lint import Linter, util class Cppcheck(Linter): cmd = ( 'cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}' ) regex = ( r'^(?P<file>(:\\|[^:])+):(?P<line>...
336fbbd82a09469a7ac7d0eb850daa6a55f42669
ctypescrypto/__init__.py
ctypescrypto/__init__.py
""" Interface to some libcrypto functions """ from ctypes import CDLL, c_char_p def config(filename=None): """ Loads OpenSSL Config file. If none are specified, loads default (compiled in) one """ libcrypto.OPENSSL_config(filename) __all__ = ['config'] libcrypto = CDLL("libcrypto.s...
""" Interface to some libcrypto functions """ from ctypes import CDLL, c_char_p from ctypes.util import find_library import sys def config(filename=None): """ Loads OpenSSL Config file. If none are specified, loads default (compiled in) one """ libcrypto.OPENSSL_config(filename) __a...
Use find_library to search for openssl libs
Use find_library to search for openssl libs
Python
mit
vbwagner/ctypescrypto
""" Interface to some libcrypto functions """ from ctypes import CDLL, c_char_p def config(filename=None): """ Loads OpenSSL Config file. If none are specified, loads default (compiled in) one """ libcrypto.OPENSSL_config(filename) __all__ = ['config'] libcrypto = CDLL("libcrypto.s...
""" Interface to some libcrypto functions """ from ctypes import CDLL, c_char_p from ctypes.util import find_library import sys def config(filename=None): """ Loads OpenSSL Config file. If none are specified, loads default (compiled in) one """ libcrypto.OPENSSL_config(filename) __a...
<commit_before>""" Interface to some libcrypto functions """ from ctypes import CDLL, c_char_p def config(filename=None): """ Loads OpenSSL Config file. If none are specified, loads default (compiled in) one """ libcrypto.OPENSSL_config(filename) __all__ = ['config'] libcrypto = CD...
""" Interface to some libcrypto functions """ from ctypes import CDLL, c_char_p from ctypes.util import find_library import sys def config(filename=None): """ Loads OpenSSL Config file. If none are specified, loads default (compiled in) one """ libcrypto.OPENSSL_config(filename) __a...
""" Interface to some libcrypto functions """ from ctypes import CDLL, c_char_p def config(filename=None): """ Loads OpenSSL Config file. If none are specified, loads default (compiled in) one """ libcrypto.OPENSSL_config(filename) __all__ = ['config'] libcrypto = CDLL("libcrypto.s...
<commit_before>""" Interface to some libcrypto functions """ from ctypes import CDLL, c_char_p def config(filename=None): """ Loads OpenSSL Config file. If none are specified, loads default (compiled in) one """ libcrypto.OPENSSL_config(filename) __all__ = ['config'] libcrypto = CD...
024ddea9e3dc5ab2702b08c860e6df8702b3e5e8
captain_hook/endpoint.py
captain_hook/endpoint.py
from __future__ import absolute_import from os.path import abspath from os.path import dirname from flask import Flask, request import yaml import utils.config from services import find_services from comms import find_and_load_comms CONFIG_FOLDER = dirname(dirname(abspath(__file__))) application = Flask(__name__) ...
from __future__ import absolute_import from os.path import abspath from os.path import dirname from flask import Flask, request import yaml import utils.config from services import find_services from comms import find_and_load_comms CONFIG_FOLDER = dirname(dirname(abspath(__file__))) application = Flask(__name__) ...
Make services only receive their related configs
Make services only receive their related configs
Python
apache-2.0
brantje/captain_hook,brantje/telegram-github-bot,brantje/telegram-github-bot,brantje/captain_hook,brantje/telegram-github-bot,brantje/captain_hook
from __future__ import absolute_import from os.path import abspath from os.path import dirname from flask import Flask, request import yaml import utils.config from services import find_services from comms import find_and_load_comms CONFIG_FOLDER = dirname(dirname(abspath(__file__))) application = Flask(__name__) ...
from __future__ import absolute_import from os.path import abspath from os.path import dirname from flask import Flask, request import yaml import utils.config from services import find_services from comms import find_and_load_comms CONFIG_FOLDER = dirname(dirname(abspath(__file__))) application = Flask(__name__) ...
<commit_before>from __future__ import absolute_import from os.path import abspath from os.path import dirname from flask import Flask, request import yaml import utils.config from services import find_services from comms import find_and_load_comms CONFIG_FOLDER = dirname(dirname(abspath(__file__))) application = Fla...
from __future__ import absolute_import from os.path import abspath from os.path import dirname from flask import Flask, request import yaml import utils.config from services import find_services from comms import find_and_load_comms CONFIG_FOLDER = dirname(dirname(abspath(__file__))) application = Flask(__name__) ...
from __future__ import absolute_import from os.path import abspath from os.path import dirname from flask import Flask, request import yaml import utils.config from services import find_services from comms import find_and_load_comms CONFIG_FOLDER = dirname(dirname(abspath(__file__))) application = Flask(__name__) ...
<commit_before>from __future__ import absolute_import from os.path import abspath from os.path import dirname from flask import Flask, request import yaml import utils.config from services import find_services from comms import find_and_load_comms CONFIG_FOLDER = dirname(dirname(abspath(__file__))) application = Fla...
694651b5c143e4ce1fd3de25500909c1a16faf95
api/podcasts/controller.py
api/podcasts/controller.py
from django.core.cache import cache from .models import PodcastProvider from .remote.interface import PodcastDetails from .remote.timbre import fetch_podcasts, fetch_podcast __all__ = ['fetch_cached_podcasts', 'fetch_cached_podcast'] CACHE_KEY = "76_timbre_feeds" def fetch_cached_podcasts() -> list[PodcastDetails]:...
from typing import List from django.core.cache import cache from .models import PodcastProvider from .remote.interface import PodcastDetails from .remote.timbre import fetch_podcasts, fetch_podcast __all__ = ['fetch_cached_podcasts', 'fetch_cached_podcast'] CACHE_KEY = "76_timbre_feeds" def fetch_cached_podcasts()...
Fix typehint that is invalid in python 3.8
Fix typehint that is invalid in python 3.8
Python
mit
urfonline/api,urfonline/api,urfonline/api
from django.core.cache import cache from .models import PodcastProvider from .remote.interface import PodcastDetails from .remote.timbre import fetch_podcasts, fetch_podcast __all__ = ['fetch_cached_podcasts', 'fetch_cached_podcast'] CACHE_KEY = "76_timbre_feeds" def fetch_cached_podcasts() -> list[PodcastDetails]:...
from typing import List from django.core.cache import cache from .models import PodcastProvider from .remote.interface import PodcastDetails from .remote.timbre import fetch_podcasts, fetch_podcast __all__ = ['fetch_cached_podcasts', 'fetch_cached_podcast'] CACHE_KEY = "76_timbre_feeds" def fetch_cached_podcasts()...
<commit_before>from django.core.cache import cache from .models import PodcastProvider from .remote.interface import PodcastDetails from .remote.timbre import fetch_podcasts, fetch_podcast __all__ = ['fetch_cached_podcasts', 'fetch_cached_podcast'] CACHE_KEY = "76_timbre_feeds" def fetch_cached_podcasts() -> list[P...
from typing import List from django.core.cache import cache from .models import PodcastProvider from .remote.interface import PodcastDetails from .remote.timbre import fetch_podcasts, fetch_podcast __all__ = ['fetch_cached_podcasts', 'fetch_cached_podcast'] CACHE_KEY = "76_timbre_feeds" def fetch_cached_podcasts()...
from django.core.cache import cache from .models import PodcastProvider from .remote.interface import PodcastDetails from .remote.timbre import fetch_podcasts, fetch_podcast __all__ = ['fetch_cached_podcasts', 'fetch_cached_podcast'] CACHE_KEY = "76_timbre_feeds" def fetch_cached_podcasts() -> list[PodcastDetails]:...
<commit_before>from django.core.cache import cache from .models import PodcastProvider from .remote.interface import PodcastDetails from .remote.timbre import fetch_podcasts, fetch_podcast __all__ = ['fetch_cached_podcasts', 'fetch_cached_podcast'] CACHE_KEY = "76_timbre_feeds" def fetch_cached_podcasts() -> list[P...
3a7e87be0cc42b47375baec22ffdb978cb21847c
main.py
main.py
#!/usr/bin/env python3 import requests AUTH_TOKEN = open("config/auth_token").read().strip() USER_ID = open("config/user_id").read().strip() BASE_URL = "https://api.telegram.org/bot" + AUTH_TOKEN + "/" def send_request(command, **params): requests.get(BASE_URL + command, params=params) def send_message(chat_...
#!/usr/bin/env python3 import requests CONFIG_DIR = "config" class TelegramBotApi: def __init__(self, auth_token): self.base_url = "https://api.telegram.org/bot" + auth_token + "/" def send_message(self, chat_id, text): self.__send_request("sendMessage", chat_id=chat_id, text=text) def...
Create TelegramBotApi and Config classes
Create TelegramBotApi and Config classes To clean up code
Python
agpl-3.0
alvarogzp/telegram-bot,alvarogzp/telegram-bot
#!/usr/bin/env python3 import requests AUTH_TOKEN = open("config/auth_token").read().strip() USER_ID = open("config/user_id").read().strip() BASE_URL = "https://api.telegram.org/bot" + AUTH_TOKEN + "/" def send_request(command, **params): requests.get(BASE_URL + command, params=params) def send_message(chat_...
#!/usr/bin/env python3 import requests CONFIG_DIR = "config" class TelegramBotApi: def __init__(self, auth_token): self.base_url = "https://api.telegram.org/bot" + auth_token + "/" def send_message(self, chat_id, text): self.__send_request("sendMessage", chat_id=chat_id, text=text) def...
<commit_before>#!/usr/bin/env python3 import requests AUTH_TOKEN = open("config/auth_token").read().strip() USER_ID = open("config/user_id").read().strip() BASE_URL = "https://api.telegram.org/bot" + AUTH_TOKEN + "/" def send_request(command, **params): requests.get(BASE_URL + command, params=params) def sen...
#!/usr/bin/env python3 import requests CONFIG_DIR = "config" class TelegramBotApi: def __init__(self, auth_token): self.base_url = "https://api.telegram.org/bot" + auth_token + "/" def send_message(self, chat_id, text): self.__send_request("sendMessage", chat_id=chat_id, text=text) def...
#!/usr/bin/env python3 import requests AUTH_TOKEN = open("config/auth_token").read().strip() USER_ID = open("config/user_id").read().strip() BASE_URL = "https://api.telegram.org/bot" + AUTH_TOKEN + "/" def send_request(command, **params): requests.get(BASE_URL + command, params=params) def send_message(chat_...
<commit_before>#!/usr/bin/env python3 import requests AUTH_TOKEN = open("config/auth_token").read().strip() USER_ID = open("config/user_id").read().strip() BASE_URL = "https://api.telegram.org/bot" + AUTH_TOKEN + "/" def send_request(command, **params): requests.get(BASE_URL + command, params=params) def sen...
46fc845f76cfc244e6dff98a152221f7c3044386
config/test/__init__.py
config/test/__init__.py
from SCons.Script import * import inspect def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spaw...
from SCons.Script import * import shlex def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spawn....
Fix testHarness call for Windows
Fix testHarness call for Windows
Python
lgpl-2.1
CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang
from SCons.Script import * import inspect def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spaw...
from SCons.Script import * import shlex def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spawn....
<commit_before>from SCons.Script import * import inspect def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python =...
from SCons.Script import * import shlex def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spawn....
from SCons.Script import * import inspect def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spaw...
<commit_before>from SCons.Script import * import inspect def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python =...
6612978356a9b40e3a4b663c61b8e5ab96316623
examples/async_server.py
examples/async_server.py
from pythonosc.osc_server import AsyncIOOSCUDPServer from pythonosc.dispatcher import Dispatcher import asyncio def filter_handler(address, *args): print(f"{address}: {args}") dispatcher = Dispatcher() dispatcher.map("/filter", filter_handler) ip = "127.0.0.1" port = 1337 async def loop(): """Example mai...
import sys from pythonosc.osc_server import AsyncIOOSCUDPServer from pythonosc.dispatcher import Dispatcher import asyncio def filter_handler(address, *args): print(f"{address}: {args}") dispatcher = Dispatcher() dispatcher.map("/filter", filter_handler) ip = "127.0.0.1" port = 1337 async def loop(): """...
Support Python 3.6 event loops in this example
Support Python 3.6 event loops in this example
Python
unlicense
attwad/python-osc
from pythonosc.osc_server import AsyncIOOSCUDPServer from pythonosc.dispatcher import Dispatcher import asyncio def filter_handler(address, *args): print(f"{address}: {args}") dispatcher = Dispatcher() dispatcher.map("/filter", filter_handler) ip = "127.0.0.1" port = 1337 async def loop(): """Example mai...
import sys from pythonosc.osc_server import AsyncIOOSCUDPServer from pythonosc.dispatcher import Dispatcher import asyncio def filter_handler(address, *args): print(f"{address}: {args}") dispatcher = Dispatcher() dispatcher.map("/filter", filter_handler) ip = "127.0.0.1" port = 1337 async def loop(): """...
<commit_before>from pythonosc.osc_server import AsyncIOOSCUDPServer from pythonosc.dispatcher import Dispatcher import asyncio def filter_handler(address, *args): print(f"{address}: {args}") dispatcher = Dispatcher() dispatcher.map("/filter", filter_handler) ip = "127.0.0.1" port = 1337 async def loop(): ...
import sys from pythonosc.osc_server import AsyncIOOSCUDPServer from pythonosc.dispatcher import Dispatcher import asyncio def filter_handler(address, *args): print(f"{address}: {args}") dispatcher = Dispatcher() dispatcher.map("/filter", filter_handler) ip = "127.0.0.1" port = 1337 async def loop(): """...
from pythonosc.osc_server import AsyncIOOSCUDPServer from pythonosc.dispatcher import Dispatcher import asyncio def filter_handler(address, *args): print(f"{address}: {args}") dispatcher = Dispatcher() dispatcher.map("/filter", filter_handler) ip = "127.0.0.1" port = 1337 async def loop(): """Example mai...
<commit_before>from pythonosc.osc_server import AsyncIOOSCUDPServer from pythonosc.dispatcher import Dispatcher import asyncio def filter_handler(address, *args): print(f"{address}: {args}") dispatcher = Dispatcher() dispatcher.map("/filter", filter_handler) ip = "127.0.0.1" port = 1337 async def loop(): ...
709e1562e61110ba94ae7581952bc5233ee1035e
main.py
main.py
import argparse import logging from create_dataset import * if __name__ == '__main__': logging.basicConfig(format='%(asctime)s %(message)s', datefmt='[%Y/%m/%d][%I:%M:%S %p] ', level=logging.INFO) parser = argparse.ArgumentParser(description='Data Loader') parser.add_argument('--type', help='pickle or lmd...
import argparse import logging from create_dataset import * if __name__ == '__main__': logging.basicConfig(format='%(asctime)s %(message)s', datefmt='[%Y/%m/%d][%I:%M:%S %p] ', level=logging.INFO) parser = argparse.ArgumentParser(description='Data Loader') parser.add_argument('-type', help='pickle or lmdb...
Adjust the interface for split function
Adjust the interface for split function
Python
mit
CorcovadoMing/DataLoader,CorcovadoMing/DataLoader
import argparse import logging from create_dataset import * if __name__ == '__main__': logging.basicConfig(format='%(asctime)s %(message)s', datefmt='[%Y/%m/%d][%I:%M:%S %p] ', level=logging.INFO) parser = argparse.ArgumentParser(description='Data Loader') parser.add_argument('--type', help='pickle or lmd...
import argparse import logging from create_dataset import * if __name__ == '__main__': logging.basicConfig(format='%(asctime)s %(message)s', datefmt='[%Y/%m/%d][%I:%M:%S %p] ', level=logging.INFO) parser = argparse.ArgumentParser(description='Data Loader') parser.add_argument('-type', help='pickle or lmdb...
<commit_before>import argparse import logging from create_dataset import * if __name__ == '__main__': logging.basicConfig(format='%(asctime)s %(message)s', datefmt='[%Y/%m/%d][%I:%M:%S %p] ', level=logging.INFO) parser = argparse.ArgumentParser(description='Data Loader') parser.add_argument('--type', help...
import argparse import logging from create_dataset import * if __name__ == '__main__': logging.basicConfig(format='%(asctime)s %(message)s', datefmt='[%Y/%m/%d][%I:%M:%S %p] ', level=logging.INFO) parser = argparse.ArgumentParser(description='Data Loader') parser.add_argument('-type', help='pickle or lmdb...
import argparse import logging from create_dataset import * if __name__ == '__main__': logging.basicConfig(format='%(asctime)s %(message)s', datefmt='[%Y/%m/%d][%I:%M:%S %p] ', level=logging.INFO) parser = argparse.ArgumentParser(description='Data Loader') parser.add_argument('--type', help='pickle or lmd...
<commit_before>import argparse import logging from create_dataset import * if __name__ == '__main__': logging.basicConfig(format='%(asctime)s %(message)s', datefmt='[%Y/%m/%d][%I:%M:%S %p] ', level=logging.INFO) parser = argparse.ArgumentParser(description='Data Loader') parser.add_argument('--type', help...
6d03be0c21ac21e9d5ed826c5fe4991fa01743cb
main.py
main.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import Tool import time from Tieba import Tieba def main(): print("Local Time:", time.asctime(time.localtime())) # Read Cookies cookies = Tool.load_cookies_path(".") for cookie in cookies: # Login user = Tieba(cookie) ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import Tool import time from Tieba import Tieba def main(): print("Local Time:", time.asctime(time.localtime())) # Read Cookies cookies = Tool.load_cookies_path(".") for cookie in cookies: # Login user = Tieba(cookie) # List Likes ...
Change newline character to LF
Change newline character to LF
Python
apache-2.0
jiangzc/TiebaSign
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import Tool import time from Tieba import Tieba def main(): print("Local Time:", time.asctime(time.localtime())) # Read Cookies cookies = Tool.load_cookies_path(".") for cookie in cookies: # Login user = Tieba(cookie) ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import Tool import time from Tieba import Tieba def main(): print("Local Time:", time.asctime(time.localtime())) # Read Cookies cookies = Tool.load_cookies_path(".") for cookie in cookies: # Login user = Tieba(cookie) # List Likes ...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import Tool import time from Tieba import Tieba def main(): print("Local Time:", time.asctime(time.localtime())) # Read Cookies cookies = Tool.load_cookies_path(".") for cookie in cookies: # Login user = Tieba(co...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import Tool import time from Tieba import Tieba def main(): print("Local Time:", time.asctime(time.localtime())) # Read Cookies cookies = Tool.load_cookies_path(".") for cookie in cookies: # Login user = Tieba(cookie) # List Likes ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import Tool import time from Tieba import Tieba def main(): print("Local Time:", time.asctime(time.localtime())) # Read Cookies cookies = Tool.load_cookies_path(".") for cookie in cookies: # Login user = Tieba(cookie) ...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import Tool import time from Tieba import Tieba def main(): print("Local Time:", time.asctime(time.localtime())) # Read Cookies cookies = Tool.load_cookies_path(".") for cookie in cookies: # Login user = Tieba(co...
9dc068f947cbd5ca29b324436496d2d78f55edf7
src/trajectory/trajectory.py
src/trajectory/trajectory.py
#!/usr/bin/env python import math from geometry_msgs.msg import Point class NegativeTimeException(Exception): pass class Trajectory: def __init__(self): self.position = Point() def get_position_at(self, t): if t < 0: raise NegativeTimeException()
#!/usr/bin/env python import math from twisted.conch.insults.insults import Vector from geometry_msgs.msg import Point class NegativeTimeException(Exception): pass class Trajectory: def __init__(self): self.position = Point() def get_position_at(self, t): if t < 0: raise Neg...
Implement __abs__ and __sub__ dunder methods
feat: Implement __abs__ and __sub__ dunder methods Implement methods which are required to apply assertEqual and assertAlmostEqual to points.
Python
mit
bit0001/trajectory_tracking,bit0001/trajectory_tracking
#!/usr/bin/env python import math from geometry_msgs.msg import Point class NegativeTimeException(Exception): pass class Trajectory: def __init__(self): self.position = Point() def get_position_at(self, t): if t < 0: raise NegativeTimeException() feat: Implement __abs__ and ...
#!/usr/bin/env python import math from twisted.conch.insults.insults import Vector from geometry_msgs.msg import Point class NegativeTimeException(Exception): pass class Trajectory: def __init__(self): self.position = Point() def get_position_at(self, t): if t < 0: raise Neg...
<commit_before>#!/usr/bin/env python import math from geometry_msgs.msg import Point class NegativeTimeException(Exception): pass class Trajectory: def __init__(self): self.position = Point() def get_position_at(self, t): if t < 0: raise NegativeTimeException() <commit_msg>f...
#!/usr/bin/env python import math from twisted.conch.insults.insults import Vector from geometry_msgs.msg import Point class NegativeTimeException(Exception): pass class Trajectory: def __init__(self): self.position = Point() def get_position_at(self, t): if t < 0: raise Neg...
#!/usr/bin/env python import math from geometry_msgs.msg import Point class NegativeTimeException(Exception): pass class Trajectory: def __init__(self): self.position = Point() def get_position_at(self, t): if t < 0: raise NegativeTimeException() feat: Implement __abs__ and ...
<commit_before>#!/usr/bin/env python import math from geometry_msgs.msg import Point class NegativeTimeException(Exception): pass class Trajectory: def __init__(self): self.position = Point() def get_position_at(self, t): if t < 0: raise NegativeTimeException() <commit_msg>f...
92d2ff8a16b7419123a848f98ec8594694c5203a
lib/python2.6/aquilon/client/depends.py
lib/python2.6/aquilon/client/depends.py
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # 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...
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # 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...
Fix imports when using the client on Solaris
Fix imports when using the client on Solaris Previously the incorrect syntax had been used for inserting an item at the beginning of sys.path. Change-Id: I98a1451dd84619a0ba5f5be3dc4163509b867149 Addresses-Issue: Jira/AQUILON-1276 Reviewed-by: Gabor Gombas <3bb8c49439d9d044594e1c6967f991d0b4248a64@morganstanley.com>
Python
apache-2.0
stdweird/aquilon,quattor/aquilon,stdweird/aquilon,stdweird/aquilon,guillaume-philippon/aquilon,guillaume-philippon/aquilon,guillaume-philippon/aquilon,quattor/aquilon,quattor/aquilon
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # 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...
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # 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...
<commit_before># -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # 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...
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # 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...
<commit_before># -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
1923fdf26f2df092a52318dfcc91825fa10fac40
mesh.py
mesh.py
#!/usr/bin/env python3 import os import shutil import sys import traceback builtin_cmds = {'cd', 'pwd', 'exit',} def prompt(): print('%s $ ' % os.getcwd(), end='', flush=True) def read_command(): return sys.stdin.readline() def parse_command(cmd_text): return (cmd_text, cmd_text.strip().split()) def r...
#!/usr/bin/env python3 import os import shutil import sys import readline import traceback readline.parse_and_bind('tab: complete') readline.parse_and_bind('set editing-mode vi') builtin_cmds = {'cd', 'pwd', 'exit',} def prompt(): return '%s $ ' % os.getcwd() def read_command(): line = input(prompt()) ...
Add readline support with vi keybindings
Add readline support with vi keybindings
Python
mit
mmichie/mesh
#!/usr/bin/env python3 import os import shutil import sys import traceback builtin_cmds = {'cd', 'pwd', 'exit',} def prompt(): print('%s $ ' % os.getcwd(), end='', flush=True) def read_command(): return sys.stdin.readline() def parse_command(cmd_text): return (cmd_text, cmd_text.strip().split()) def r...
#!/usr/bin/env python3 import os import shutil import sys import readline import traceback readline.parse_and_bind('tab: complete') readline.parse_and_bind('set editing-mode vi') builtin_cmds = {'cd', 'pwd', 'exit',} def prompt(): return '%s $ ' % os.getcwd() def read_command(): line = input(prompt()) ...
<commit_before>#!/usr/bin/env python3 import os import shutil import sys import traceback builtin_cmds = {'cd', 'pwd', 'exit',} def prompt(): print('%s $ ' % os.getcwd(), end='', flush=True) def read_command(): return sys.stdin.readline() def parse_command(cmd_text): return (cmd_text, cmd_text.strip()....
#!/usr/bin/env python3 import os import shutil import sys import readline import traceback readline.parse_and_bind('tab: complete') readline.parse_and_bind('set editing-mode vi') builtin_cmds = {'cd', 'pwd', 'exit',} def prompt(): return '%s $ ' % os.getcwd() def read_command(): line = input(prompt()) ...
#!/usr/bin/env python3 import os import shutil import sys import traceback builtin_cmds = {'cd', 'pwd', 'exit',} def prompt(): print('%s $ ' % os.getcwd(), end='', flush=True) def read_command(): return sys.stdin.readline() def parse_command(cmd_text): return (cmd_text, cmd_text.strip().split()) def r...
<commit_before>#!/usr/bin/env python3 import os import shutil import sys import traceback builtin_cmds = {'cd', 'pwd', 'exit',} def prompt(): print('%s $ ' % os.getcwd(), end='', flush=True) def read_command(): return sys.stdin.readline() def parse_command(cmd_text): return (cmd_text, cmd_text.strip()....
bd5223af36fc167ce48bfa5c97f8a3fd79a7995a
camera_selection/scripts/camera_selection.py
camera_selection/scripts/camera_selection.py
#!/usr/bin/env python import rospy import Adafruit_BBIO.GPIO as GPIO from vortex_msgs.msg import CameraFeedSelection PIN_MAP_FEED0 = rospy.get_param('/camera/pin_map_feed0') PIN_MAP_FEED1 = rospy.get_param('/camera/pin_map_feed1') PIN_MAP_FEED2 = rospy.get_param('/camera/pin_map_feed2') PIN_MAP_LIST = [PIN_MAP_FEED0,P...
#!/usr/bin/env python import rospy import Adafruit_BBIO.GPIO as GPIO from vortex_msgs.msg import CameraFeedSelection PIN_MAP_FEED0 = rospy.get_param('/camera/pin_map_feed0') PIN_MAP_FEED1 = rospy.get_param('/camera/pin_map_feed1') PIN_MAP_FEED2 = rospy.get_param('/camera/pin_map_feed2') PIN_MAP_LIST = [PIN_MAP_FEED0,P...
Add camera selection based on desired feed and camera number
Add camera selection based on desired feed and camera number
Python
mit
vortexntnu/rov-control,vortexntnu/rov-control,vortexntnu/rov-control
#!/usr/bin/env python import rospy import Adafruit_BBIO.GPIO as GPIO from vortex_msgs.msg import CameraFeedSelection PIN_MAP_FEED0 = rospy.get_param('/camera/pin_map_feed0') PIN_MAP_FEED1 = rospy.get_param('/camera/pin_map_feed1') PIN_MAP_FEED2 = rospy.get_param('/camera/pin_map_feed2') PIN_MAP_LIST = [PIN_MAP_FEED0,P...
#!/usr/bin/env python import rospy import Adafruit_BBIO.GPIO as GPIO from vortex_msgs.msg import CameraFeedSelection PIN_MAP_FEED0 = rospy.get_param('/camera/pin_map_feed0') PIN_MAP_FEED1 = rospy.get_param('/camera/pin_map_feed1') PIN_MAP_FEED2 = rospy.get_param('/camera/pin_map_feed2') PIN_MAP_LIST = [PIN_MAP_FEED0,P...
<commit_before>#!/usr/bin/env python import rospy import Adafruit_BBIO.GPIO as GPIO from vortex_msgs.msg import CameraFeedSelection PIN_MAP_FEED0 = rospy.get_param('/camera/pin_map_feed0') PIN_MAP_FEED1 = rospy.get_param('/camera/pin_map_feed1') PIN_MAP_FEED2 = rospy.get_param('/camera/pin_map_feed2') PIN_MAP_LIST = [...
#!/usr/bin/env python import rospy import Adafruit_BBIO.GPIO as GPIO from vortex_msgs.msg import CameraFeedSelection PIN_MAP_FEED0 = rospy.get_param('/camera/pin_map_feed0') PIN_MAP_FEED1 = rospy.get_param('/camera/pin_map_feed1') PIN_MAP_FEED2 = rospy.get_param('/camera/pin_map_feed2') PIN_MAP_LIST = [PIN_MAP_FEED0,P...
#!/usr/bin/env python import rospy import Adafruit_BBIO.GPIO as GPIO from vortex_msgs.msg import CameraFeedSelection PIN_MAP_FEED0 = rospy.get_param('/camera/pin_map_feed0') PIN_MAP_FEED1 = rospy.get_param('/camera/pin_map_feed1') PIN_MAP_FEED2 = rospy.get_param('/camera/pin_map_feed2') PIN_MAP_LIST = [PIN_MAP_FEED0,P...
<commit_before>#!/usr/bin/env python import rospy import Adafruit_BBIO.GPIO as GPIO from vortex_msgs.msg import CameraFeedSelection PIN_MAP_FEED0 = rospy.get_param('/camera/pin_map_feed0') PIN_MAP_FEED1 = rospy.get_param('/camera/pin_map_feed1') PIN_MAP_FEED2 = rospy.get_param('/camera/pin_map_feed2') PIN_MAP_LIST = [...
65ede498c28dc37b96bc1a2d435f5714c9a4eb1e
cms/middleware/media.py
cms/middleware/media.py
from django.forms.widgets import Media from django.utils.encoding import smart_unicode from django.conf import settings from cms.middleware.toolbar import HTML_TYPES def inster_before_tag(string, tag, insertion): no_case = string.lower() index = no_case.find("<%s" % tag.lower()) if index > -1: star...
from django.forms.widgets import Media from django.utils.encoding import smart_unicode from django.conf import settings from cms.middleware.toolbar import HTML_TYPES def inster_before_tag(string, tag, insertion): no_case = string.lower() index = no_case.find("<%s" % tag.lower()) if index > -1: star...
Fix forgotten 'request' parameter to hasattr
Fix forgotten 'request' parameter to hasattr
Python
bsd-3-clause
sephii/django-cms,mkoistinen/django-cms,cyberintruder/django-cms,andyzsf/django-cms,isotoma/django-cms,takeshineshiro/django-cms,SachaMPS/django-cms,sznekol/django-cms,pbs/django-cms,chkir/django-cms,stefanw/django-cms,vad/django-cms,ScholzVolkmer/django-cms,webu/django-cms,VillageAlliance/django-cms,intip/django-cms,c...
from django.forms.widgets import Media from django.utils.encoding import smart_unicode from django.conf import settings from cms.middleware.toolbar import HTML_TYPES def inster_before_tag(string, tag, insertion): no_case = string.lower() index = no_case.find("<%s" % tag.lower()) if index > -1: star...
from django.forms.widgets import Media from django.utils.encoding import smart_unicode from django.conf import settings from cms.middleware.toolbar import HTML_TYPES def inster_before_tag(string, tag, insertion): no_case = string.lower() index = no_case.find("<%s" % tag.lower()) if index > -1: star...
<commit_before>from django.forms.widgets import Media from django.utils.encoding import smart_unicode from django.conf import settings from cms.middleware.toolbar import HTML_TYPES def inster_before_tag(string, tag, insertion): no_case = string.lower() index = no_case.find("<%s" % tag.lower()) if index > -...
from django.forms.widgets import Media from django.utils.encoding import smart_unicode from django.conf import settings from cms.middleware.toolbar import HTML_TYPES def inster_before_tag(string, tag, insertion): no_case = string.lower() index = no_case.find("<%s" % tag.lower()) if index > -1: star...
from django.forms.widgets import Media from django.utils.encoding import smart_unicode from django.conf import settings from cms.middleware.toolbar import HTML_TYPES def inster_before_tag(string, tag, insertion): no_case = string.lower() index = no_case.find("<%s" % tag.lower()) if index > -1: star...
<commit_before>from django.forms.widgets import Media from django.utils.encoding import smart_unicode from django.conf import settings from cms.middleware.toolbar import HTML_TYPES def inster_before_tag(string, tag, insertion): no_case = string.lower() index = no_case.find("<%s" % tag.lower()) if index > -...
daac5f26c07045ad162a481d035359dd17227c91
Lib/test/test_imaplib.py
Lib/test/test_imaplib.py
from test_support import verify,verbose import imaplib import time # We can check only that it successfully produces a result, # not the correctness of the result itself, since the result # depends on the timezone the machine is in. timevalues = [2000000000, 2000000000.0, time.localtime(2000000000), "18...
import imaplib import time # We can check only that it successfully produces a result, # not the correctness of the result itself, since the result # depends on the timezone the machine is in. timevalues = [2000000000, 2000000000.0, time.localtime(2000000000), "18-May-2033 05:33:20 +0200"] for t in tim...
Remove unused imports, clean up trailing whitespace.
Remove unused imports, clean up trailing whitespace.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
from test_support import verify,verbose import imaplib import time # We can check only that it successfully produces a result, # not the correctness of the result itself, since the result # depends on the timezone the machine is in. timevalues = [2000000000, 2000000000.0, time.localtime(2000000000), "18...
import imaplib import time # We can check only that it successfully produces a result, # not the correctness of the result itself, since the result # depends on the timezone the machine is in. timevalues = [2000000000, 2000000000.0, time.localtime(2000000000), "18-May-2033 05:33:20 +0200"] for t in tim...
<commit_before>from test_support import verify,verbose import imaplib import time # We can check only that it successfully produces a result, # not the correctness of the result itself, since the result # depends on the timezone the machine is in. timevalues = [2000000000, 2000000000.0, time.localtime(2000000000), ...
import imaplib import time # We can check only that it successfully produces a result, # not the correctness of the result itself, since the result # depends on the timezone the machine is in. timevalues = [2000000000, 2000000000.0, time.localtime(2000000000), "18-May-2033 05:33:20 +0200"] for t in tim...
from test_support import verify,verbose import imaplib import time # We can check only that it successfully produces a result, # not the correctness of the result itself, since the result # depends on the timezone the machine is in. timevalues = [2000000000, 2000000000.0, time.localtime(2000000000), "18...
<commit_before>from test_support import verify,verbose import imaplib import time # We can check only that it successfully produces a result, # not the correctness of the result itself, since the result # depends on the timezone the machine is in. timevalues = [2000000000, 2000000000.0, time.localtime(2000000000), ...
6dd523e0d92c39f1a3e4c9be2dac0442535bb88f
changes/backends/jenkins/generic_builder.py
changes/backends/jenkins/generic_builder.py
from .builder import JenkinsBuilder class JenkinsGenericBuilder(JenkinsBuilder): def __init__(self, *args, **kwargs): self.script = kwargs.pop('script') self.cluster = kwargs.pop('cluster') super(JenkinsGenericBuilder, self).__init__(*args, **kwargs) def get_job_parameters(self, job, ...
from .builder import JenkinsBuilder class JenkinsGenericBuilder(JenkinsBuilder): def __init__(self, *args, **kwargs): self.script = kwargs.pop('script') self.cluster = kwargs.pop('cluster') super(JenkinsGenericBuilder, self).__init__(*args, **kwargs) def get_job_parameters(self, job, ...
Fix target_id support in JenkinsGenericBuilder
Fix target_id support in JenkinsGenericBuilder
Python
apache-2.0
wfxiang08/changes,dropbox/changes,dropbox/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes
from .builder import JenkinsBuilder class JenkinsGenericBuilder(JenkinsBuilder): def __init__(self, *args, **kwargs): self.script = kwargs.pop('script') self.cluster = kwargs.pop('cluster') super(JenkinsGenericBuilder, self).__init__(*args, **kwargs) def get_job_parameters(self, job, ...
from .builder import JenkinsBuilder class JenkinsGenericBuilder(JenkinsBuilder): def __init__(self, *args, **kwargs): self.script = kwargs.pop('script') self.cluster = kwargs.pop('cluster') super(JenkinsGenericBuilder, self).__init__(*args, **kwargs) def get_job_parameters(self, job, ...
<commit_before>from .builder import JenkinsBuilder class JenkinsGenericBuilder(JenkinsBuilder): def __init__(self, *args, **kwargs): self.script = kwargs.pop('script') self.cluster = kwargs.pop('cluster') super(JenkinsGenericBuilder, self).__init__(*args, **kwargs) def get_job_paramet...
from .builder import JenkinsBuilder class JenkinsGenericBuilder(JenkinsBuilder): def __init__(self, *args, **kwargs): self.script = kwargs.pop('script') self.cluster = kwargs.pop('cluster') super(JenkinsGenericBuilder, self).__init__(*args, **kwargs) def get_job_parameters(self, job, ...
from .builder import JenkinsBuilder class JenkinsGenericBuilder(JenkinsBuilder): def __init__(self, *args, **kwargs): self.script = kwargs.pop('script') self.cluster = kwargs.pop('cluster') super(JenkinsGenericBuilder, self).__init__(*args, **kwargs) def get_job_parameters(self, job, ...
<commit_before>from .builder import JenkinsBuilder class JenkinsGenericBuilder(JenkinsBuilder): def __init__(self, *args, **kwargs): self.script = kwargs.pop('script') self.cluster = kwargs.pop('cluster') super(JenkinsGenericBuilder, self).__init__(*args, **kwargs) def get_job_paramet...
7b6c3b4af18746ad02169a93270fc13579c60829
pycket/targetpycket.py
pycket/targetpycket.py
from pycket.expand import load_json_ast_rpython from pycket.interpreter import interpret_one from pycket.error import SchemeException from rpython.rlib import jit def main(argv): jit.set_param(None, "trace_limit", 20000) # XXX crappy argument handling try: index = argv.index("--jit") except Va...
from pycket.expand import load_json_ast_rpython from pycket.interpreter import interpret_one from pycket.error import SchemeException from rpython.rlib import jit from rpython.rlib.objectmodel import we_are_translated def main(argv): jit.set_param(None, "trace_limit", 20000) # XXX crappy argument handling ...
Add auto-pdb fallback when not in translated mode for target
Add auto-pdb fallback when not in translated mode for target
Python
mit
pycket/pycket,pycket/pycket,samth/pycket,krono/pycket,samth/pycket,vishesh/pycket,samth/pycket,magnusmorton/pycket,pycket/pycket,krono/pycket,magnusmorton/pycket,magnusmorton/pycket,krono/pycket,cderici/pycket,cderici/pycket,vishesh/pycket,vishesh/pycket,cderici/pycket
from pycket.expand import load_json_ast_rpython from pycket.interpreter import interpret_one from pycket.error import SchemeException from rpython.rlib import jit def main(argv): jit.set_param(None, "trace_limit", 20000) # XXX crappy argument handling try: index = argv.index("--jit") except Va...
from pycket.expand import load_json_ast_rpython from pycket.interpreter import interpret_one from pycket.error import SchemeException from rpython.rlib import jit from rpython.rlib.objectmodel import we_are_translated def main(argv): jit.set_param(None, "trace_limit", 20000) # XXX crappy argument handling ...
<commit_before>from pycket.expand import load_json_ast_rpython from pycket.interpreter import interpret_one from pycket.error import SchemeException from rpython.rlib import jit def main(argv): jit.set_param(None, "trace_limit", 20000) # XXX crappy argument handling try: index = argv.index("--jit"...
from pycket.expand import load_json_ast_rpython from pycket.interpreter import interpret_one from pycket.error import SchemeException from rpython.rlib import jit from rpython.rlib.objectmodel import we_are_translated def main(argv): jit.set_param(None, "trace_limit", 20000) # XXX crappy argument handling ...
from pycket.expand import load_json_ast_rpython from pycket.interpreter import interpret_one from pycket.error import SchemeException from rpython.rlib import jit def main(argv): jit.set_param(None, "trace_limit", 20000) # XXX crappy argument handling try: index = argv.index("--jit") except Va...
<commit_before>from pycket.expand import load_json_ast_rpython from pycket.interpreter import interpret_one from pycket.error import SchemeException from rpython.rlib import jit def main(argv): jit.set_param(None, "trace_limit", 20000) # XXX crappy argument handling try: index = argv.index("--jit"...
ad73c91d4e2b2d5faed35420a1393d016af84e40
tests/test_event_manager/test_attribute.py
tests/test_event_manager/test_attribute.py
import uuid from datetime import datetime from dateutil.tz import UTC from event_manager.event import Attribute from tests.utils import BaseTest class TestAttribute(BaseTest): def test_props(self): attr = Attribute(name='test') assert attr.name == 'test' assert attr.attr_type == str ...
import uuid from datetime import datetime from dateutil.tz import UTC from event_manager.event import Attribute from tests.utils import BaseTest class TestAttribute(BaseTest): def test_name_should_not_be_instance(self): with self.assertRaises(AssertionError): Attribute(name='instance') ...
Add test for attribute instance assertion
Add test for attribute instance assertion
Python
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
import uuid from datetime import datetime from dateutil.tz import UTC from event_manager.event import Attribute from tests.utils import BaseTest class TestAttribute(BaseTest): def test_props(self): attr = Attribute(name='test') assert attr.name == 'test' assert attr.attr_type == str ...
import uuid from datetime import datetime from dateutil.tz import UTC from event_manager.event import Attribute from tests.utils import BaseTest class TestAttribute(BaseTest): def test_name_should_not_be_instance(self): with self.assertRaises(AssertionError): Attribute(name='instance') ...
<commit_before>import uuid from datetime import datetime from dateutil.tz import UTC from event_manager.event import Attribute from tests.utils import BaseTest class TestAttribute(BaseTest): def test_props(self): attr = Attribute(name='test') assert attr.name == 'test' assert attr.attr_...
import uuid from datetime import datetime from dateutil.tz import UTC from event_manager.event import Attribute from tests.utils import BaseTest class TestAttribute(BaseTest): def test_name_should_not_be_instance(self): with self.assertRaises(AssertionError): Attribute(name='instance') ...
import uuid from datetime import datetime from dateutil.tz import UTC from event_manager.event import Attribute from tests.utils import BaseTest class TestAttribute(BaseTest): def test_props(self): attr = Attribute(name='test') assert attr.name == 'test' assert attr.attr_type == str ...
<commit_before>import uuid from datetime import datetime from dateutil.tz import UTC from event_manager.event import Attribute from tests.utils import BaseTest class TestAttribute(BaseTest): def test_props(self): attr = Attribute(name='test') assert attr.name == 'test' assert attr.attr_...
b5cab8fe05899891e4508cb686d40d88e3c5b955
tests/unit/geometry/GenericGeometryTest.py
tests/unit/geometry/GenericGeometryTest.py
import openpnm as op class GenericGeometryTest: def setup_class(self): self.net = op.network.Cubic(shape=[3, 3, 3]) self.geo = op.geometry.StickAndBall(network=self.net, pores=self.net.Ps, throats=self.net.Ts)...
import openpnm as op class GenericGeometryTest: def setup_class(self): self.net = op.network.Cubic(shape=[3, 3, 3]) self.geo = op.geometry.StickAndBall(network=self.net, pores=self.net.Ps, throats=self.net.Ts)...
Augment unit test for show_hist
Augment unit test for show_hist
Python
mit
PMEAL/OpenPNM
import openpnm as op class GenericGeometryTest: def setup_class(self): self.net = op.network.Cubic(shape=[3, 3, 3]) self.geo = op.geometry.StickAndBall(network=self.net, pores=self.net.Ps, throats=self.net.Ts)...
import openpnm as op class GenericGeometryTest: def setup_class(self): self.net = op.network.Cubic(shape=[3, 3, 3]) self.geo = op.geometry.StickAndBall(network=self.net, pores=self.net.Ps, throats=self.net.Ts)...
<commit_before>import openpnm as op class GenericGeometryTest: def setup_class(self): self.net = op.network.Cubic(shape=[3, 3, 3]) self.geo = op.geometry.StickAndBall(network=self.net, pores=self.net.Ps, throa...
import openpnm as op class GenericGeometryTest: def setup_class(self): self.net = op.network.Cubic(shape=[3, 3, 3]) self.geo = op.geometry.StickAndBall(network=self.net, pores=self.net.Ps, throats=self.net.Ts)...
import openpnm as op class GenericGeometryTest: def setup_class(self): self.net = op.network.Cubic(shape=[3, 3, 3]) self.geo = op.geometry.StickAndBall(network=self.net, pores=self.net.Ps, throats=self.net.Ts)...
<commit_before>import openpnm as op class GenericGeometryTest: def setup_class(self): self.net = op.network.Cubic(shape=[3, 3, 3]) self.geo = op.geometry.StickAndBall(network=self.net, pores=self.net.Ps, throa...
2c73d919273b1660af40053afa198a42278c07a9
tests/qtgui/qdatastream_gui_operators_test.py
tests/qtgui/qdatastream_gui_operators_test.py
# -*- coding: utf-8 -*- import unittest import sys from PySide import QtGui, QtCore class QAppPresence(unittest.TestCase): def testQPixmap(self): ds = QtCore.QDataStream() p = QtGui.QPixmap() ds << p ds >> p if __name__ == '__main__': app = QtGui.QApplication([]) unitte...
# -*- coding: utf-8 -*- import unittest import sys from PySide.QtCore import QDataStream, QByteArray, QIODevice, Qt from PySide.QtGui import QPixmap, QColor from helper import UsesQApplication class QPixmapQDatastream(UsesQApplication): '''QDataStream <<>> QPixmap''' def setUp(self): super(QPixmapQ...
Fix QDataStream <</>> QPixmap test
Fix QDataStream <</>> QPixmap test
Python
lgpl-2.1
BadSingleton/pyside2,IronManMark20/pyside2,qtproject/pyside-pyside,M4rtinK/pyside-android,gbaty/pyside2,RobinD42/pyside,enthought/pyside,M4rtinK/pyside-bb10,enthought/pyside,enthought/pyside,qtproject/pyside-pyside,enthought/pyside,BadSingleton/pyside2,IronManMark20/pyside2,IronManMark20/pyside2,enthought/pyside,IronMa...
# -*- coding: utf-8 -*- import unittest import sys from PySide import QtGui, QtCore class QAppPresence(unittest.TestCase): def testQPixmap(self): ds = QtCore.QDataStream() p = QtGui.QPixmap() ds << p ds >> p if __name__ == '__main__': app = QtGui.QApplication([]) unitte...
# -*- coding: utf-8 -*- import unittest import sys from PySide.QtCore import QDataStream, QByteArray, QIODevice, Qt from PySide.QtGui import QPixmap, QColor from helper import UsesQApplication class QPixmapQDatastream(UsesQApplication): '''QDataStream <<>> QPixmap''' def setUp(self): super(QPixmapQ...
<commit_before># -*- coding: utf-8 -*- import unittest import sys from PySide import QtGui, QtCore class QAppPresence(unittest.TestCase): def testQPixmap(self): ds = QtCore.QDataStream() p = QtGui.QPixmap() ds << p ds >> p if __name__ == '__main__': app = QtGui.QApplication...
# -*- coding: utf-8 -*- import unittest import sys from PySide.QtCore import QDataStream, QByteArray, QIODevice, Qt from PySide.QtGui import QPixmap, QColor from helper import UsesQApplication class QPixmapQDatastream(UsesQApplication): '''QDataStream <<>> QPixmap''' def setUp(self): super(QPixmapQ...
# -*- coding: utf-8 -*- import unittest import sys from PySide import QtGui, QtCore class QAppPresence(unittest.TestCase): def testQPixmap(self): ds = QtCore.QDataStream() p = QtGui.QPixmap() ds << p ds >> p if __name__ == '__main__': app = QtGui.QApplication([]) unitte...
<commit_before># -*- coding: utf-8 -*- import unittest import sys from PySide import QtGui, QtCore class QAppPresence(unittest.TestCase): def testQPixmap(self): ds = QtCore.QDataStream() p = QtGui.QPixmap() ds << p ds >> p if __name__ == '__main__': app = QtGui.QApplication...
6129a57ab8b7de1a4189706a966b32174182c086
server.py
server.py
from flask import Flask # Create Flask application app = Flask(__name__) @app.route('/inventory') def index(): """ Intro page of the inventory API This method will only return some welcome words. Returns: response: welcome words in json format and status 200 Todo: * Finish the implementations. ...
from flask import Flask # Create Flask application app = Flask(__name__) @app.route('/inventory') def index(): """ Intro page of the inventory API This method will only return some welcome words. Returns: response: welcome words in json format and status 200 Todo: * Finish the implementations. ...
Create a GET products method
Create a GET products method
Python
mit
devops-foxtrot-s17/inventory,devops-foxtrot-s17/inventory
from flask import Flask # Create Flask application app = Flask(__name__) @app.route('/inventory') def index(): """ Intro page of the inventory API This method will only return some welcome words. Returns: response: welcome words in json format and status 200 Todo: * Finish the implementations. ...
from flask import Flask # Create Flask application app = Flask(__name__) @app.route('/inventory') def index(): """ Intro page of the inventory API This method will only return some welcome words. Returns: response: welcome words in json format and status 200 Todo: * Finish the implementations. ...
<commit_before>from flask import Flask # Create Flask application app = Flask(__name__) @app.route('/inventory') def index(): """ Intro page of the inventory API This method will only return some welcome words. Returns: response: welcome words in json format and status 200 Todo: * Finish the implem...
from flask import Flask # Create Flask application app = Flask(__name__) @app.route('/inventory') def index(): """ Intro page of the inventory API This method will only return some welcome words. Returns: response: welcome words in json format and status 200 Todo: * Finish the implementations. ...
from flask import Flask # Create Flask application app = Flask(__name__) @app.route('/inventory') def index(): """ Intro page of the inventory API This method will only return some welcome words. Returns: response: welcome words in json format and status 200 Todo: * Finish the implementations. ...
<commit_before>from flask import Flask # Create Flask application app = Flask(__name__) @app.route('/inventory') def index(): """ Intro page of the inventory API This method will only return some welcome words. Returns: response: welcome words in json format and status 200 Todo: * Finish the implem...
cc04dc53dd992b14b2f56f50f3efbfde83d5154d
dodo.py
dodo.py
from doitpy.pyflakes import Pyflakes DOIT_CONFIG = {'default_tasks': ['pyflakes', 'test', 'doctest']} def task_pyflakes(): yield Pyflakes().tasks('*.py') def task_test(): return { 'actions': ['py.test'], 'file_dep': ['configclass.py', 'test_configclass.py'], } def task_doctest(): ...
from doitpy.pyflakes import Pyflakes DOIT_CONFIG = {'default_tasks': ['pyflakes', 'test', 'doctest']} def task_pyflakes(): yield Pyflakes().tasks('*.py') def task_test(): return { 'actions': ['py.test'], 'file_dep': ['configclass.py', 'test_configclass.py'], } def task_doctest(): ...
Fix call to "coverage run"
doit: Fix call to "coverage run"
Python
mit
schettino72/configclass
from doitpy.pyflakes import Pyflakes DOIT_CONFIG = {'default_tasks': ['pyflakes', 'test', 'doctest']} def task_pyflakes(): yield Pyflakes().tasks('*.py') def task_test(): return { 'actions': ['py.test'], 'file_dep': ['configclass.py', 'test_configclass.py'], } def task_doctest(): ...
from doitpy.pyflakes import Pyflakes DOIT_CONFIG = {'default_tasks': ['pyflakes', 'test', 'doctest']} def task_pyflakes(): yield Pyflakes().tasks('*.py') def task_test(): return { 'actions': ['py.test'], 'file_dep': ['configclass.py', 'test_configclass.py'], } def task_doctest(): ...
<commit_before>from doitpy.pyflakes import Pyflakes DOIT_CONFIG = {'default_tasks': ['pyflakes', 'test', 'doctest']} def task_pyflakes(): yield Pyflakes().tasks('*.py') def task_test(): return { 'actions': ['py.test'], 'file_dep': ['configclass.py', 'test_configclass.py'], } def ta...
from doitpy.pyflakes import Pyflakes DOIT_CONFIG = {'default_tasks': ['pyflakes', 'test', 'doctest']} def task_pyflakes(): yield Pyflakes().tasks('*.py') def task_test(): return { 'actions': ['py.test'], 'file_dep': ['configclass.py', 'test_configclass.py'], } def task_doctest(): ...
from doitpy.pyflakes import Pyflakes DOIT_CONFIG = {'default_tasks': ['pyflakes', 'test', 'doctest']} def task_pyflakes(): yield Pyflakes().tasks('*.py') def task_test(): return { 'actions': ['py.test'], 'file_dep': ['configclass.py', 'test_configclass.py'], } def task_doctest(): ...
<commit_before>from doitpy.pyflakes import Pyflakes DOIT_CONFIG = {'default_tasks': ['pyflakes', 'test', 'doctest']} def task_pyflakes(): yield Pyflakes().tasks('*.py') def task_test(): return { 'actions': ['py.test'], 'file_dep': ['configclass.py', 'test_configclass.py'], } def ta...
ee2ecf60ea2fdbfe7f6c4f9ccc7275d534eeeacf
test_proj/urls.py
test_proj/urls.py
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), url(r'^admin_tools/', include('admin_tools.urls')), (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'do...
try: from django.conf.urls import patterns, url, include except ImportError: # django < 1.4 from django.conf.urls.defaults import patterns, url, include from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)),...
Support for Django > 1.4 for test proj
Support for Django > 1.4 for test proj
Python
mit
glic3rinu/django-admin-tools,artscoop/django-admin-tools,artscoop/django-admin-tools,artscoop/django-admin-tools,glic3rinu/django-admin-tools,glic3rinu/django-admin-tools,glic3rinu/django-admin-tools,artscoop/django-admin-tools
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), url(r'^admin_tools/', include('admin_tools.urls')), (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'do...
try: from django.conf.urls import patterns, url, include except ImportError: # django < 1.4 from django.conf.urls.defaults import patterns, url, include from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)),...
<commit_before>from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), url(r'^admin_tools/', include('admin_tools.urls')), (r'^static/(?P<path>.*)$', 'django.views.stat...
try: from django.conf.urls import patterns, url, include except ImportError: # django < 1.4 from django.conf.urls.defaults import patterns, url, include from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)),...
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), url(r'^admin_tools/', include('admin_tools.urls')), (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'do...
<commit_before>from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), url(r'^admin_tools/', include('admin_tools.urls')), (r'^static/(?P<path>.*)$', 'django.views.stat...
eaa85b0fe69e4ff020cd269007fa1a5c7f864b53
admin/common_auth/models.py
admin/common_auth/models.py
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True)
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) class Meta: # custom permissions ...
Add custom permissions to admin profile for spam, metrics, and prereg
Add custom permissions to admin profile for spam, metrics, and prereg
Python
apache-2.0
mattclark/osf.io,crcresearch/osf.io,acshi/osf.io,HalcyonChimera/osf.io,Nesiehr/osf.io,caneruguz/osf.io,binoculars/osf.io,caneruguz/osf.io,cslzchen/osf.io,felliott/osf.io,crcresearch/osf.io,hmoco/osf.io,baylee-d/osf.io,caseyrollins/osf.io,acshi/osf.io,leb2dg/osf.io,erinspace/osf.io,Johnetordoff/osf.io,chennan47/osf.io,s...
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) Add custom permissions to admin profile for spa...
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) class Meta: # custom permissions ...
<commit_before>from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) <commit_msg>Add custom permissio...
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) class Meta: # custom permissions ...
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) Add custom permissions to admin profile for spa...
<commit_before>from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) <commit_msg>Add custom permissio...
275c39faa02dc0bd4f8b9d9bd2a012eaee12a338
nose2/tests/functional/test_coverage.py
nose2/tests/functional/test_coverage.py
import os.path from nose2.tests._common import FunctionalTestCase class TestCoverage(FunctionalTestCase): def test_run(self): proc = self.runIn( 'scenario/test_with_module', '-v', '--with-coverage', '--coverage=lib/' ) STATS = ' 8 ...
import os.path from nose2.tests._common import FunctionalTestCase class TestCoverage(FunctionalTestCase): def test_run(self): proc = self.runIn( 'scenario/test_with_module', '-v', '--with-coverage', '--coverage=lib/' ) STATS = ' 8 ...
Fix regex matching coverage output
Fix regex matching coverage output The coverage library now returns the file extensions.
Python
bsd-2-clause
ojengwa/nose2,ptthiem/nose2,ptthiem/nose2,little-dude/nose2,ojengwa/nose2,little-dude/nose2
import os.path from nose2.tests._common import FunctionalTestCase class TestCoverage(FunctionalTestCase): def test_run(self): proc = self.runIn( 'scenario/test_with_module', '-v', '--with-coverage', '--coverage=lib/' ) STATS = ' 8 ...
import os.path from nose2.tests._common import FunctionalTestCase class TestCoverage(FunctionalTestCase): def test_run(self): proc = self.runIn( 'scenario/test_with_module', '-v', '--with-coverage', '--coverage=lib/' ) STATS = ' 8 ...
<commit_before>import os.path from nose2.tests._common import FunctionalTestCase class TestCoverage(FunctionalTestCase): def test_run(self): proc = self.runIn( 'scenario/test_with_module', '-v', '--with-coverage', '--coverage=lib/' ) STATS =...
import os.path from nose2.tests._common import FunctionalTestCase class TestCoverage(FunctionalTestCase): def test_run(self): proc = self.runIn( 'scenario/test_with_module', '-v', '--with-coverage', '--coverage=lib/' ) STATS = ' 8 ...
import os.path from nose2.tests._common import FunctionalTestCase class TestCoverage(FunctionalTestCase): def test_run(self): proc = self.runIn( 'scenario/test_with_module', '-v', '--with-coverage', '--coverage=lib/' ) STATS = ' 8 ...
<commit_before>import os.path from nose2.tests._common import FunctionalTestCase class TestCoverage(FunctionalTestCase): def test_run(self): proc = self.runIn( 'scenario/test_with_module', '-v', '--with-coverage', '--coverage=lib/' ) STATS =...
8a509fd2b6bfa5114986df5548132ab41eefff13
lightstep/util.py
lightstep/util.py
""" Utility functions """ import random import time from . import constants def _service_url_from_hostport(secure, host, port): """ Create an appropriate service URL given the parameters. `secure` should be a bool. """ if secure: protocol = 'https://' else: protocol = 'http://'...
""" Utility functions """ import random import time from . import constants guid_rng = random.Random() # Uses urandom seed def _service_url_from_hostport(secure, host, port): """ Create an appropriate service URL given the parameters. `secure` should be a bool. """ if secure: protocol =...
Use a private RNG for guids. Avoids potential for trouble w/ the global instance.
Use a private RNG for guids. Avoids potential for trouble w/ the global instance.
Python
mit
lightstephq/lightstep-tracer-python
""" Utility functions """ import random import time from . import constants def _service_url_from_hostport(secure, host, port): """ Create an appropriate service URL given the parameters. `secure` should be a bool. """ if secure: protocol = 'https://' else: protocol = 'http://'...
""" Utility functions """ import random import time from . import constants guid_rng = random.Random() # Uses urandom seed def _service_url_from_hostport(secure, host, port): """ Create an appropriate service URL given the parameters. `secure` should be a bool. """ if secure: protocol =...
<commit_before>""" Utility functions """ import random import time from . import constants def _service_url_from_hostport(secure, host, port): """ Create an appropriate service URL given the parameters. `secure` should be a bool. """ if secure: protocol = 'https://' else: proto...
""" Utility functions """ import random import time from . import constants guid_rng = random.Random() # Uses urandom seed def _service_url_from_hostport(secure, host, port): """ Create an appropriate service URL given the parameters. `secure` should be a bool. """ if secure: protocol =...
""" Utility functions """ import random import time from . import constants def _service_url_from_hostport(secure, host, port): """ Create an appropriate service URL given the parameters. `secure` should be a bool. """ if secure: protocol = 'https://' else: protocol = 'http://'...
<commit_before>""" Utility functions """ import random import time from . import constants def _service_url_from_hostport(secure, host, port): """ Create an appropriate service URL given the parameters. `secure` should be a bool. """ if secure: protocol = 'https://' else: proto...
64db9a503322ce1ee61c64afbdc38f367c3d6627
guardian/testapp/tests/management_test.py
guardian/testapp/tests/management_test.py
from __future__ import absolute_import from __future__ import unicode_literals from django.test import SimpleTestCase from guardian.compat import get_user_model from guardian.compat import mock from guardian.management import create_anonymous_user mocked_get_init_anon = mock.Mock() class TestGetAnonymousUser(Simpl...
from __future__ import absolute_import from __future__ import unicode_literals from guardian.compat import get_user_model from guardian.compat import mock from guardian.compat import unittest from guardian.management import create_anonymous_user import django mocked_get_init_anon = mock.Mock() class TestGetAnonymo...
Use unit test.TestCase instead of SimpleTestCase
Use unit test.TestCase instead of SimpleTestCase
Python
bsd-2-clause
calvinpy/django-guardian,vovanbo/django-guardian,loop0/django-guardian,frwickst/django-guardian,thedrow/django-guardian,emperorcezar/django-guardian,alexshin/django-guardian,calvinpy/django-guardian,flisky/django-guardian,vitan/django-guardian,sustainingtechnologies/django-guardian,rfleschenberg/django-guardian,frwicks...
from __future__ import absolute_import from __future__ import unicode_literals from django.test import SimpleTestCase from guardian.compat import get_user_model from guardian.compat import mock from guardian.management import create_anonymous_user mocked_get_init_anon = mock.Mock() class TestGetAnonymousUser(Simpl...
from __future__ import absolute_import from __future__ import unicode_literals from guardian.compat import get_user_model from guardian.compat import mock from guardian.compat import unittest from guardian.management import create_anonymous_user import django mocked_get_init_anon = mock.Mock() class TestGetAnonymo...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals from django.test import SimpleTestCase from guardian.compat import get_user_model from guardian.compat import mock from guardian.management import create_anonymous_user mocked_get_init_anon = mock.Mock() class TestGetAnon...
from __future__ import absolute_import from __future__ import unicode_literals from guardian.compat import get_user_model from guardian.compat import mock from guardian.compat import unittest from guardian.management import create_anonymous_user import django mocked_get_init_anon = mock.Mock() class TestGetAnonymo...
from __future__ import absolute_import from __future__ import unicode_literals from django.test import SimpleTestCase from guardian.compat import get_user_model from guardian.compat import mock from guardian.management import create_anonymous_user mocked_get_init_anon = mock.Mock() class TestGetAnonymousUser(Simpl...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals from django.test import SimpleTestCase from guardian.compat import get_user_model from guardian.compat import mock from guardian.management import create_anonymous_user mocked_get_init_anon = mock.Mock() class TestGetAnon...
2e40bccd158d0dd3a8e741704f055dbe7a04e3a5
heat/db/sqlalchemy/migrate_repo/manage.py
heat/db/sqlalchemy/migrate_repo/manage.py
#!/usr/bin/env python from migrate.versioning.shell import main if __name__ == '__main__': main(debug='False')
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
Add Apache 2.0 license to source file
Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be licensed under the Apache 2.0 license. [H104] Files with no code shouldn't contain any license header nor comments, and must be left completely empty. [1] http://docs.openstack.org/dev...
Python
apache-2.0
openstack/heat,noironetworks/heat,openstack/heat,noironetworks/heat
#!/usr/bin/env python from migrate.versioning.shell import main if __name__ == '__main__': main(debug='False') Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be licensed under the Apache 2.0 license. [H104] Files with no code shou...
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
<commit_before>#!/usr/bin/env python from migrate.versioning.shell import main if __name__ == '__main__': main(debug='False') <commit_msg>Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be licensed under the Apache 2.0 license. [H1...
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
#!/usr/bin/env python from migrate.versioning.shell import main if __name__ == '__main__': main(debug='False') Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be licensed under the Apache 2.0 license. [H104] Files with no code shou...
<commit_before>#!/usr/bin/env python from migrate.versioning.shell import main if __name__ == '__main__': main(debug='False') <commit_msg>Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be licensed under the Apache 2.0 license. [H1...
c10badab9b93eb021b1942475c681042292c182c
scrapi/harvesters/boise_state.py
scrapi/harvesters/boise_state.py
''' Harvester for the ScholarWorks for the SHARE project Example API call: http://scholarworks.boisestate.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class Boise_stateHarvester(OAIHarvester): short_name = 'boise_state' l...
''' Harvester for the ScholarWorks for the SHARE project Example API call: http://scholarworks.boisestate.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class Boise_stateHarvester(OAIHarvester): short_name = 'boise_state' l...
Update longname for Boise state
Update longname for Boise state
Python
apache-2.0
CenterForOpenScience/scrapi,CenterForOpenScience/scrapi
''' Harvester for the ScholarWorks for the SHARE project Example API call: http://scholarworks.boisestate.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class Boise_stateHarvester(OAIHarvester): short_name = 'boise_state' l...
''' Harvester for the ScholarWorks for the SHARE project Example API call: http://scholarworks.boisestate.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class Boise_stateHarvester(OAIHarvester): short_name = 'boise_state' l...
<commit_before>''' Harvester for the ScholarWorks for the SHARE project Example API call: http://scholarworks.boisestate.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class Boise_stateHarvester(OAIHarvester): short_name = 'boi...
''' Harvester for the ScholarWorks for the SHARE project Example API call: http://scholarworks.boisestate.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class Boise_stateHarvester(OAIHarvester): short_name = 'boise_state' l...
''' Harvester for the ScholarWorks for the SHARE project Example API call: http://scholarworks.boisestate.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class Boise_stateHarvester(OAIHarvester): short_name = 'boise_state' l...
<commit_before>''' Harvester for the ScholarWorks for the SHARE project Example API call: http://scholarworks.boisestate.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class Boise_stateHarvester(OAIHarvester): short_name = 'boi...
ac4f5451baaefd67392d9b908c9ccffc4083a9ad
fluidsynth/fluidsynth.py
fluidsynth/fluidsynth.py
from cffi import FFI ffi = FFI() ffi.cdef(""" typedef struct _fluid_hashtable_t fluid_settings_t; typedef struct _fluid_synth_t fluid_synth_t; typedef struct _fluid_audio_driver_t fluid_audio_driver_t; fluid_settings_t* new_fluid_settings(void); fluid_synth_t* new_fluid_synth(fluid_settings_t* settings); fluid_audio_...
from cffi import FFI ffi = FFI() ffi.cdef(""" typedef struct _fluid_hashtable_t fluid_settings_t; typedef struct _fluid_synth_t fluid_synth_t; typedef struct _fluid_audio_driver_t fluid_audio_driver_t; fluid_settings_t* new_fluid_settings(void); fluid_synth_t* new_fluid_synth(fluid_settings_t* settings); fluid_audio_...
Change the LD search path
Change the LD search path
Python
mit
paultag/python-fluidsynth
from cffi import FFI ffi = FFI() ffi.cdef(""" typedef struct _fluid_hashtable_t fluid_settings_t; typedef struct _fluid_synth_t fluid_synth_t; typedef struct _fluid_audio_driver_t fluid_audio_driver_t; fluid_settings_t* new_fluid_settings(void); fluid_synth_t* new_fluid_synth(fluid_settings_t* settings); fluid_audio_...
from cffi import FFI ffi = FFI() ffi.cdef(""" typedef struct _fluid_hashtable_t fluid_settings_t; typedef struct _fluid_synth_t fluid_synth_t; typedef struct _fluid_audio_driver_t fluid_audio_driver_t; fluid_settings_t* new_fluid_settings(void); fluid_synth_t* new_fluid_synth(fluid_settings_t* settings); fluid_audio_...
<commit_before>from cffi import FFI ffi = FFI() ffi.cdef(""" typedef struct _fluid_hashtable_t fluid_settings_t; typedef struct _fluid_synth_t fluid_synth_t; typedef struct _fluid_audio_driver_t fluid_audio_driver_t; fluid_settings_t* new_fluid_settings(void); fluid_synth_t* new_fluid_synth(fluid_settings_t* settings...
from cffi import FFI ffi = FFI() ffi.cdef(""" typedef struct _fluid_hashtable_t fluid_settings_t; typedef struct _fluid_synth_t fluid_synth_t; typedef struct _fluid_audio_driver_t fluid_audio_driver_t; fluid_settings_t* new_fluid_settings(void); fluid_synth_t* new_fluid_synth(fluid_settings_t* settings); fluid_audio_...
from cffi import FFI ffi = FFI() ffi.cdef(""" typedef struct _fluid_hashtable_t fluid_settings_t; typedef struct _fluid_synth_t fluid_synth_t; typedef struct _fluid_audio_driver_t fluid_audio_driver_t; fluid_settings_t* new_fluid_settings(void); fluid_synth_t* new_fluid_synth(fluid_settings_t* settings); fluid_audio_...
<commit_before>from cffi import FFI ffi = FFI() ffi.cdef(""" typedef struct _fluid_hashtable_t fluid_settings_t; typedef struct _fluid_synth_t fluid_synth_t; typedef struct _fluid_audio_driver_t fluid_audio_driver_t; fluid_settings_t* new_fluid_settings(void); fluid_synth_t* new_fluid_synth(fluid_settings_t* settings...
894060b4e4a59d1626cf2b9d80b5184371d79fb9
mopidy/mixers/alsa.py
mopidy/mixers/alsa.py
import alsaaudio from mopidy.mixers import BaseMixer class AlsaMixer(BaseMixer): """ Mixer which uses the Advanced Linux Sound Architecture (ALSA) to control volume. """ def __init__(self, *args, **kwargs): super(AlsaMixer, self).__init__(*args, **kwargs) self._mixer = alsaaudio.M...
import alsaaudio import logging from mopidy.mixers import BaseMixer logger = logging.getLogger('mopidy.mixers.alsa') class AlsaMixer(BaseMixer): """ Mixer which uses the Advanced Linux Sound Architecture (ALSA) to control volume. """ def __init__(self, *args, **kwargs): super(AlsaMixer, ...
Make AlsaMixer work on hosts without a mixer named 'Master'
Make AlsaMixer work on hosts without a mixer named 'Master'
Python
apache-2.0
tkem/mopidy,SuperStarPL/mopidy,ZenithDK/mopidy,vrs01/mopidy,dbrgn/mopidy,adamcik/mopidy,ali/mopidy,dbrgn/mopidy,hkariti/mopidy,bencevans/mopidy,mopidy/mopidy,swak/mopidy,glogiotatidis/mopidy,priestd09/mopidy,tkem/mopidy,abarisain/mopidy,pacificIT/mopidy,SuperStarPL/mopidy,priestd09/mopidy,jodal/mopidy,hkariti/mopidy,db...
import alsaaudio from mopidy.mixers import BaseMixer class AlsaMixer(BaseMixer): """ Mixer which uses the Advanced Linux Sound Architecture (ALSA) to control volume. """ def __init__(self, *args, **kwargs): super(AlsaMixer, self).__init__(*args, **kwargs) self._mixer = alsaaudio.M...
import alsaaudio import logging from mopidy.mixers import BaseMixer logger = logging.getLogger('mopidy.mixers.alsa') class AlsaMixer(BaseMixer): """ Mixer which uses the Advanced Linux Sound Architecture (ALSA) to control volume. """ def __init__(self, *args, **kwargs): super(AlsaMixer, ...
<commit_before>import alsaaudio from mopidy.mixers import BaseMixer class AlsaMixer(BaseMixer): """ Mixer which uses the Advanced Linux Sound Architecture (ALSA) to control volume. """ def __init__(self, *args, **kwargs): super(AlsaMixer, self).__init__(*args, **kwargs) self._mixe...
import alsaaudio import logging from mopidy.mixers import BaseMixer logger = logging.getLogger('mopidy.mixers.alsa') class AlsaMixer(BaseMixer): """ Mixer which uses the Advanced Linux Sound Architecture (ALSA) to control volume. """ def __init__(self, *args, **kwargs): super(AlsaMixer, ...
import alsaaudio from mopidy.mixers import BaseMixer class AlsaMixer(BaseMixer): """ Mixer which uses the Advanced Linux Sound Architecture (ALSA) to control volume. """ def __init__(self, *args, **kwargs): super(AlsaMixer, self).__init__(*args, **kwargs) self._mixer = alsaaudio.M...
<commit_before>import alsaaudio from mopidy.mixers import BaseMixer class AlsaMixer(BaseMixer): """ Mixer which uses the Advanced Linux Sound Architecture (ALSA) to control volume. """ def __init__(self, *args, **kwargs): super(AlsaMixer, self).__init__(*args, **kwargs) self._mixe...
4b0c8371bf08ff2d0c3f7c64dd5867d5732d3531
doc/java/lang.py
doc/java/lang.py
import jpype class Thread: """ Thread support for Python JPype adds methods to ``java.lang.Thread`` to interact with Python threads. These methods are all classmethods that act on the current Python thread. """ isAttached = jpype._jthread._JThread.isAttached attach = jpype._jthread._...
import jpype class Thread: """ Thread support for Python JPype adds methods to ``java.lang.Thread`` to interact with Python threads. These methods are all classmethods that act on the current Python thread. """ isAttached = jpype._jthread._JThread.isAttached attach = jpype._jthread._...
Fix java.nio.file import in AutoCloseable example
Fix java.nio.file import in AutoCloseable example
Python
apache-2.0
originell/jpype,originell/jpype,originell/jpype,originell/jpype,originell/jpype
import jpype class Thread: """ Thread support for Python JPype adds methods to ``java.lang.Thread`` to interact with Python threads. These methods are all classmethods that act on the current Python thread. """ isAttached = jpype._jthread._JThread.isAttached attach = jpype._jthread._...
import jpype class Thread: """ Thread support for Python JPype adds methods to ``java.lang.Thread`` to interact with Python threads. These methods are all classmethods that act on the current Python thread. """ isAttached = jpype._jthread._JThread.isAttached attach = jpype._jthread._...
<commit_before>import jpype class Thread: """ Thread support for Python JPype adds methods to ``java.lang.Thread`` to interact with Python threads. These methods are all classmethods that act on the current Python thread. """ isAttached = jpype._jthread._JThread.isAttached attach = j...
import jpype class Thread: """ Thread support for Python JPype adds methods to ``java.lang.Thread`` to interact with Python threads. These methods are all classmethods that act on the current Python thread. """ isAttached = jpype._jthread._JThread.isAttached attach = jpype._jthread._...
import jpype class Thread: """ Thread support for Python JPype adds methods to ``java.lang.Thread`` to interact with Python threads. These methods are all classmethods that act on the current Python thread. """ isAttached = jpype._jthread._JThread.isAttached attach = jpype._jthread._...
<commit_before>import jpype class Thread: """ Thread support for Python JPype adds methods to ``java.lang.Thread`` to interact with Python threads. These methods are all classmethods that act on the current Python thread. """ isAttached = jpype._jthread._JThread.isAttached attach = j...
ffc3bec9d488135ba2331386cec3279283927217
bamp/helpers/ui.py
bamp/helpers/ui.py
import sys from functools import partial, wraps import click def verify_response(func): """Decorator verifies response from the function. It expects function to return (bool, []), when bool is False content of list is printed out and program exits with error code. With successful execution results ar...
import sys from functools import partial, wraps import click def verify_response(func): """Decorator verifies response from the function. It expects function to return (bool, []), when bool is False content of list is printed out and program exits with error code. With successful execution results ar...
Enable passing str to echo
Enable passing str to echo
Python
mit
inirudebwoy/bamp
import sys from functools import partial, wraps import click def verify_response(func): """Decorator verifies response from the function. It expects function to return (bool, []), when bool is False content of list is printed out and program exits with error code. With successful execution results ar...
import sys from functools import partial, wraps import click def verify_response(func): """Decorator verifies response from the function. It expects function to return (bool, []), when bool is False content of list is printed out and program exits with error code. With successful execution results ar...
<commit_before>import sys from functools import partial, wraps import click def verify_response(func): """Decorator verifies response from the function. It expects function to return (bool, []), when bool is False content of list is printed out and program exits with error code. With successful execu...
import sys from functools import partial, wraps import click def verify_response(func): """Decorator verifies response from the function. It expects function to return (bool, []), when bool is False content of list is printed out and program exits with error code. With successful execution results ar...
import sys from functools import partial, wraps import click def verify_response(func): """Decorator verifies response from the function. It expects function to return (bool, []), when bool is False content of list is printed out and program exits with error code. With successful execution results ar...
<commit_before>import sys from functools import partial, wraps import click def verify_response(func): """Decorator verifies response from the function. It expects function to return (bool, []), when bool is False content of list is printed out and program exits with error code. With successful execu...
3504b4f3687fdf3ac52d6d7df9306519762900a7
ndaparser/__init__.py
ndaparser/__init__.py
import ndaparser if __name__ == "__main__" : trns = ndaparser.parseLine("T10188000060SCTSZFW3GT3WU1B 1501131501131501121710Viitemaksu +000000000000002800 HAKKERI HEIKKI HOKSAAVA A 00000000000000111012 ") print(trns)
import ndaparser if __name__ == "__main__" : transactions = []; with open("./testdata.nda") as f: for line in f: transaction = ndaparser.parseLine(line) if transaction is not None: transactions.append(transaction) for transaction in transactions: pri...
Read testdata from file, print valid transactions
Read testdata from file, print valid transactions
Python
mit
rambo/asylum,hacklab-fi/asylum,ojousima/asylum,HelsinkiHacklab/asylum,hacklab-fi/asylum,ojousima/asylum,ojousima/asylum,jautero/asylum,rambo/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,rambo/asylum,jautero/asylum,HelsinkiHacklab/asylum,ojousima/asylum,jautero/asylum,jautero/asylum,hacklab-fi/asylum,hacklab-fi/...
import ndaparser if __name__ == "__main__" : trns = ndaparser.parseLine("T10188000060SCTSZFW3GT3WU1B 1501131501131501121710Viitemaksu +000000000000002800 HAKKERI HEIKKI HOKSAAVA A 00000000000000111012 ") print(trns) Read testdata from file, print val...
import ndaparser if __name__ == "__main__" : transactions = []; with open("./testdata.nda") as f: for line in f: transaction = ndaparser.parseLine(line) if transaction is not None: transactions.append(transaction) for transaction in transactions: pri...
<commit_before>import ndaparser if __name__ == "__main__" : trns = ndaparser.parseLine("T10188000060SCTSZFW3GT3WU1B 1501131501131501121710Viitemaksu +000000000000002800 HAKKERI HEIKKI HOKSAAVA A 00000000000000111012 ") print(trns) <commit_msg>Read te...
import ndaparser if __name__ == "__main__" : transactions = []; with open("./testdata.nda") as f: for line in f: transaction = ndaparser.parseLine(line) if transaction is not None: transactions.append(transaction) for transaction in transactions: pri...
import ndaparser if __name__ == "__main__" : trns = ndaparser.parseLine("T10188000060SCTSZFW3GT3WU1B 1501131501131501121710Viitemaksu +000000000000002800 HAKKERI HEIKKI HOKSAAVA A 00000000000000111012 ") print(trns) Read testdata from file, print val...
<commit_before>import ndaparser if __name__ == "__main__" : trns = ndaparser.parseLine("T10188000060SCTSZFW3GT3WU1B 1501131501131501121710Viitemaksu +000000000000002800 HAKKERI HEIKKI HOKSAAVA A 00000000000000111012 ") print(trns) <commit_msg>Read te...
087925b336794b71675b31b70f845042e1f635fb
metro_accounts/metro_account.py
metro_accounts/metro_account.py
# -*- coding: utf-8 -*- import time from openerp.report import report_sxw from openerp.osv import fields, osv class account_account(osv.osv): _inherit = "account.account" _columns={ 'name': fields.char('Name', size=256, required=True, select=True, translate=True), 'bal_direct': fields.selec...
# -*- coding: utf-8 -*- import time from openerp.report import report_sxw from openerp.osv import fields, osv class account_account(osv.osv): _inherit = "account.account" _columns={ 'name': fields.char('Name', size=256, required=True, select=True, translate=True), 'bal_direct': fields.selec...
Add the SQL to update account balance direction field bal_direct
Add the SQL to update account balance direction field bal_direct
Python
agpl-3.0
837278709/metro-openerp,john-wang-metro/metro-openerp,john-wang-metro/metro-openerp,837278709/metro-openerp,837278709/metro-openerp,john-wang-metro/metro-openerp
# -*- coding: utf-8 -*- import time from openerp.report import report_sxw from openerp.osv import fields, osv class account_account(osv.osv): _inherit = "account.account" _columns={ 'name': fields.char('Name', size=256, required=True, select=True, translate=True), 'bal_direct': fields.selec...
# -*- coding: utf-8 -*- import time from openerp.report import report_sxw from openerp.osv import fields, osv class account_account(osv.osv): _inherit = "account.account" _columns={ 'name': fields.char('Name', size=256, required=True, select=True, translate=True), 'bal_direct': fields.selec...
<commit_before># -*- coding: utf-8 -*- import time from openerp.report import report_sxw from openerp.osv import fields, osv class account_account(osv.osv): _inherit = "account.account" _columns={ 'name': fields.char('Name', size=256, required=True, select=True, translate=True), 'bal_direct...
# -*- coding: utf-8 -*- import time from openerp.report import report_sxw from openerp.osv import fields, osv class account_account(osv.osv): _inherit = "account.account" _columns={ 'name': fields.char('Name', size=256, required=True, select=True, translate=True), 'bal_direct': fields.selec...
# -*- coding: utf-8 -*- import time from openerp.report import report_sxw from openerp.osv import fields, osv class account_account(osv.osv): _inherit = "account.account" _columns={ 'name': fields.char('Name', size=256, required=True, select=True, translate=True), 'bal_direct': fields.selec...
<commit_before># -*- coding: utf-8 -*- import time from openerp.report import report_sxw from openerp.osv import fields, osv class account_account(osv.osv): _inherit = "account.account" _columns={ 'name': fields.char('Name', size=256, required=True, select=True, translate=True), 'bal_direct...
82b78ed248f28709b6603315bd673337e4997c4e
pseudorandom.py
pseudorandom.py
#!/usr/bin/env python import os from flask import Flask, render_template, request, make_response from names import get_full_name app = Flask(__name__) @app.route("/") def index(): if (request.headers.get('User-Agent', '')[:4].lower() == 'curl' or request.headers['Content-Type'] == 'text/plain'): ...
#!/usr/bin/env python import os from flask import Flask, render_template, request, make_response from names import get_full_name app = Flask(__name__) @app.route("/") def index(): content_type = request.headers.get('Content-Type', '') browser = request.headers.get('User-Agent', '').lower() if browser[:4...
Send text to wget/curl unless html content-type
Send text to wget/curl unless html content-type
Python
mit
treyhunner/pseudorandom.name,treyhunner/pseudorandom.name
#!/usr/bin/env python import os from flask import Flask, render_template, request, make_response from names import get_full_name app = Flask(__name__) @app.route("/") def index(): if (request.headers.get('User-Agent', '')[:4].lower() == 'curl' or request.headers['Content-Type'] == 'text/plain'): ...
#!/usr/bin/env python import os from flask import Flask, render_template, request, make_response from names import get_full_name app = Flask(__name__) @app.route("/") def index(): content_type = request.headers.get('Content-Type', '') browser = request.headers.get('User-Agent', '').lower() if browser[:4...
<commit_before>#!/usr/bin/env python import os from flask import Flask, render_template, request, make_response from names import get_full_name app = Flask(__name__) @app.route("/") def index(): if (request.headers.get('User-Agent', '')[:4].lower() == 'curl' or request.headers['Content-Type'] == 'text/p...
#!/usr/bin/env python import os from flask import Flask, render_template, request, make_response from names import get_full_name app = Flask(__name__) @app.route("/") def index(): content_type = request.headers.get('Content-Type', '') browser = request.headers.get('User-Agent', '').lower() if browser[:4...
#!/usr/bin/env python import os from flask import Flask, render_template, request, make_response from names import get_full_name app = Flask(__name__) @app.route("/") def index(): if (request.headers.get('User-Agent', '')[:4].lower() == 'curl' or request.headers['Content-Type'] == 'text/plain'): ...
<commit_before>#!/usr/bin/env python import os from flask import Flask, render_template, request, make_response from names import get_full_name app = Flask(__name__) @app.route("/") def index(): if (request.headers.get('User-Agent', '')[:4].lower() == 'curl' or request.headers['Content-Type'] == 'text/p...
7b9233c157630733da688abb7c0f3fffecddd0e7
scripts/lib/getUserPath.py
scripts/lib/getUserPath.py
def getUserPath(filename, is_command): import lib.app, os # Places quotation marks around the full path, to handle cases where the user-specified path / file name contains spaces # However, this should only occur in situations where the output is being interpreted as part of a full command string; # if the ex...
def getUserPath(filename, is_command): import lib.app, os # Places quotation marks around the full path, to handle cases where the user-specified path / file name contains spaces # However, this should only occur in situations where the output is being interpreted as part of a full command string; # if the ex...
Fix for working directory containing whitespace
Scripts: Fix for working directory containing whitespace
Python
mpl-2.0
MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3
def getUserPath(filename, is_command): import lib.app, os # Places quotation marks around the full path, to handle cases where the user-specified path / file name contains spaces # However, this should only occur in situations where the output is being interpreted as part of a full command string; # if the ex...
def getUserPath(filename, is_command): import lib.app, os # Places quotation marks around the full path, to handle cases where the user-specified path / file name contains spaces # However, this should only occur in situations where the output is being interpreted as part of a full command string; # if the ex...
<commit_before>def getUserPath(filename, is_command): import lib.app, os # Places quotation marks around the full path, to handle cases where the user-specified path / file name contains spaces # However, this should only occur in situations where the output is being interpreted as part of a full command string; ...
def getUserPath(filename, is_command): import lib.app, os # Places quotation marks around the full path, to handle cases where the user-specified path / file name contains spaces # However, this should only occur in situations where the output is being interpreted as part of a full command string; # if the ex...
def getUserPath(filename, is_command): import lib.app, os # Places quotation marks around the full path, to handle cases where the user-specified path / file name contains spaces # However, this should only occur in situations where the output is being interpreted as part of a full command string; # if the ex...
<commit_before>def getUserPath(filename, is_command): import lib.app, os # Places quotation marks around the full path, to handle cases where the user-specified path / file name contains spaces # However, this should only occur in situations where the output is being interpreted as part of a full command string; ...
4c4fd3021931e2203088a2ec578eb479a622e2c5
blogsite/models.py
blogsite/models.py
"""Collection of Models used in blogsite.""" from . import db class Post(db.Model): """Model representing a blog post. Attributes ---------- id : SQLAlchemy.Column Autogenerated primary key title : SQLAlchemy.Column body : SQLAlchemy.Column """ # Columns id = db.Column(db...
"""Collection of Models used in blogsite.""" from . import db from datetime import datetime class Post(db.Model): """Model representing a blog post. Attributes ---------- id : SQLAlchemy.Column Autogenerated primary key title : SQLAlchemy.Column body : SQLAlchemy.Column pub_date :...
Add Category model and expanding Post model.
Add Category model and expanding Post model. Post model now contains a publish date and a foreign key reference to the Category model.
Python
mit
paulaylingdev/blogsite,paulaylingdev/blogsite
"""Collection of Models used in blogsite.""" from . import db class Post(db.Model): """Model representing a blog post. Attributes ---------- id : SQLAlchemy.Column Autogenerated primary key title : SQLAlchemy.Column body : SQLAlchemy.Column """ # Columns id = db.Column(db...
"""Collection of Models used in blogsite.""" from . import db from datetime import datetime class Post(db.Model): """Model representing a blog post. Attributes ---------- id : SQLAlchemy.Column Autogenerated primary key title : SQLAlchemy.Column body : SQLAlchemy.Column pub_date :...
<commit_before>"""Collection of Models used in blogsite.""" from . import db class Post(db.Model): """Model representing a blog post. Attributes ---------- id : SQLAlchemy.Column Autogenerated primary key title : SQLAlchemy.Column body : SQLAlchemy.Column """ # Columns id...
"""Collection of Models used in blogsite.""" from . import db from datetime import datetime class Post(db.Model): """Model representing a blog post. Attributes ---------- id : SQLAlchemy.Column Autogenerated primary key title : SQLAlchemy.Column body : SQLAlchemy.Column pub_date :...
"""Collection of Models used in blogsite.""" from . import db class Post(db.Model): """Model representing a blog post. Attributes ---------- id : SQLAlchemy.Column Autogenerated primary key title : SQLAlchemy.Column body : SQLAlchemy.Column """ # Columns id = db.Column(db...
<commit_before>"""Collection of Models used in blogsite.""" from . import db class Post(db.Model): """Model representing a blog post. Attributes ---------- id : SQLAlchemy.Column Autogenerated primary key title : SQLAlchemy.Column body : SQLAlchemy.Column """ # Columns id...
d7621f5bf2e1ae30f79d1701fe5e34ee60da1a53
go/api/go_api/tests/test_client.py
go/api/go_api/tests/test_client.py
import json from django.conf import settings from django.test import TestCase from go.api.go_api import client from mock import patch class ClientTestCase(TestCase): @patch('requests.request') def test_request(self, mock_req): client.request('123', 'lorem ipsum', 'GET') mock_req.assert_cal...
import json from django.conf import settings from django.test import TestCase from go.api.go_api import client from mock import patch class ClientTestCase(TestCase): @patch('requests.request') def test_rpc(self, mock_req): client.rpc('123', 'do_something', ['foo', 'bar'], id='abc') mock_re...
Remove a test that is no longer relevant
Remove a test that is no longer relevant
Python
bsd-3-clause
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
import json from django.conf import settings from django.test import TestCase from go.api.go_api import client from mock import patch class ClientTestCase(TestCase): @patch('requests.request') def test_request(self, mock_req): client.request('123', 'lorem ipsum', 'GET') mock_req.assert_cal...
import json from django.conf import settings from django.test import TestCase from go.api.go_api import client from mock import patch class ClientTestCase(TestCase): @patch('requests.request') def test_rpc(self, mock_req): client.rpc('123', 'do_something', ['foo', 'bar'], id='abc') mock_re...
<commit_before>import json from django.conf import settings from django.test import TestCase from go.api.go_api import client from mock import patch class ClientTestCase(TestCase): @patch('requests.request') def test_request(self, mock_req): client.request('123', 'lorem ipsum', 'GET') mock...
import json from django.conf import settings from django.test import TestCase from go.api.go_api import client from mock import patch class ClientTestCase(TestCase): @patch('requests.request') def test_rpc(self, mock_req): client.rpc('123', 'do_something', ['foo', 'bar'], id='abc') mock_re...
import json from django.conf import settings from django.test import TestCase from go.api.go_api import client from mock import patch class ClientTestCase(TestCase): @patch('requests.request') def test_request(self, mock_req): client.request('123', 'lorem ipsum', 'GET') mock_req.assert_cal...
<commit_before>import json from django.conf import settings from django.test import TestCase from go.api.go_api import client from mock import patch class ClientTestCase(TestCase): @patch('requests.request') def test_request(self, mock_req): client.request('123', 'lorem ipsum', 'GET') mock...
f85bcd07f34f817722b6a5af317e9dbfa2667576
mysite/search/tasks/__init__.py
mysite/search/tasks/__init__.py
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
Fix the same typo in GrabLaunchpadBugs
Fix the same typo in GrabLaunchpadBugs
Python
agpl-3.0
moijes12/oh-mainline,sudheesh001/oh-mainline,openhatch/oh-mainline,eeshangarg/oh-mainline,campbe13/openhatch,campbe13/openhatch,campbe13/openhatch,openhatch/oh-mainline,SnappleCap/oh-mainline,nirmeshk/oh-mainline,ehashman/oh-mainline,nirmeshk/oh-mainline,vipul-sharma20/oh-mainline,onceuponatimeforever/oh-mainline,heera...
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
<commit_before>from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta...
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
<commit_before>from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta...
279f0b984209f27743791aca9cf3da7941e5d520
zephyr/lib/minify.py
zephyr/lib/minify.py
from django.conf import settings from hashlib import sha1 from os import path from pipeline.compressors import SubProcessCompressor class ClosureSourceMapCompressor(SubProcessCompressor): def compress_js(self, js): # js is the full text of the JavaScript source, and we can't # easily ...
from django.conf import settings from hashlib import sha1 from os import path from pipeline.compressors import SubProcessCompressor class ClosureSourceMapCompressor(SubProcessCompressor): def compress_js(self, js): # js is the full text of the JavaScript source, and we can't # easily ...
Make it easier to find the source map for app.js
Make it easier to find the source map for app.js (imported from commit bca27c9838573fb4b74e2d269b253a48702c9e1c)
Python
apache-2.0
gigawhitlocks/zulip,hayderimran7/zulip,dhcrzf/zulip,jackrzhang/zulip,MariaFaBella85/zulip,verma-varsha/zulip,esander91/zulip,jonesgithub/zulip,johnnygaddarr/zulip,hackerkid/zulip,joshisa/zulip,Frouk/zulip,arpitpanwar/zulip,qq1012803704/zulip,dawran6/zulip,RobotCaleb/zulip,wavelets/zulip,qq1012803704/zulip,jerryge/zulip...
from django.conf import settings from hashlib import sha1 from os import path from pipeline.compressors import SubProcessCompressor class ClosureSourceMapCompressor(SubProcessCompressor): def compress_js(self, js): # js is the full text of the JavaScript source, and we can't # easily ...
from django.conf import settings from hashlib import sha1 from os import path from pipeline.compressors import SubProcessCompressor class ClosureSourceMapCompressor(SubProcessCompressor): def compress_js(self, js): # js is the full text of the JavaScript source, and we can't # easily ...
<commit_before>from django.conf import settings from hashlib import sha1 from os import path from pipeline.compressors import SubProcessCompressor class ClosureSourceMapCompressor(SubProcessCompressor): def compress_js(self, js): # js is the full text of the JavaScript source, and we can't ...
from django.conf import settings from hashlib import sha1 from os import path from pipeline.compressors import SubProcessCompressor class ClosureSourceMapCompressor(SubProcessCompressor): def compress_js(self, js): # js is the full text of the JavaScript source, and we can't # easily ...
from django.conf import settings from hashlib import sha1 from os import path from pipeline.compressors import SubProcessCompressor class ClosureSourceMapCompressor(SubProcessCompressor): def compress_js(self, js): # js is the full text of the JavaScript source, and we can't # easily ...
<commit_before>from django.conf import settings from hashlib import sha1 from os import path from pipeline.compressors import SubProcessCompressor class ClosureSourceMapCompressor(SubProcessCompressor): def compress_js(self, js): # js is the full text of the JavaScript source, and we can't ...
0a5e4194fe06b20b4eaacaa9452403f70076ccd3
base_solver.py
base_solver.py
#!/usr/bin/env python # encoding: utf-8 from datetime import datetime class BaseSolver(object): task = None best_solution = None best_distance = float('inf') search_time = None cycles = 0 def __init__(self, task): self.task = task def run(self): start_time = datetime.now...
#!/usr/bin/env python # encoding: utf-8 from datetime import datetime class RunSolverFirst(Exception): pass class BaseSolver(object): task = None best_solution = None best_distance = float('inf') search_time = None cycles = 0 def __init__(self, task): self.task = task def ...
Add run solver first exception type
Add run solver first exception type
Python
mit
Cosiek/KombiVojager
#!/usr/bin/env python # encoding: utf-8 from datetime import datetime class BaseSolver(object): task = None best_solution = None best_distance = float('inf') search_time = None cycles = 0 def __init__(self, task): self.task = task def run(self): start_time = datetime.now...
#!/usr/bin/env python # encoding: utf-8 from datetime import datetime class RunSolverFirst(Exception): pass class BaseSolver(object): task = None best_solution = None best_distance = float('inf') search_time = None cycles = 0 def __init__(self, task): self.task = task def ...
<commit_before>#!/usr/bin/env python # encoding: utf-8 from datetime import datetime class BaseSolver(object): task = None best_solution = None best_distance = float('inf') search_time = None cycles = 0 def __init__(self, task): self.task = task def run(self): start_time...
#!/usr/bin/env python # encoding: utf-8 from datetime import datetime class RunSolverFirst(Exception): pass class BaseSolver(object): task = None best_solution = None best_distance = float('inf') search_time = None cycles = 0 def __init__(self, task): self.task = task def ...
#!/usr/bin/env python # encoding: utf-8 from datetime import datetime class BaseSolver(object): task = None best_solution = None best_distance = float('inf') search_time = None cycles = 0 def __init__(self, task): self.task = task def run(self): start_time = datetime.now...
<commit_before>#!/usr/bin/env python # encoding: utf-8 from datetime import datetime class BaseSolver(object): task = None best_solution = None best_distance = float('inf') search_time = None cycles = 0 def __init__(self, task): self.task = task def run(self): start_time...
1069565b596d3bc13b99bcae4ec831c2228e7946
PrinterApplication.py
PrinterApplication.py
from Cura.WxApplication import WxApplication import wx class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): frame = wx.Frame(None, wx.ID_ANY, "Hello World") frame.Show(True) super(PrinterApplication, sel...
from Cura.Wx.WxApplication import WxApplication class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): super(PrinterApplication, self).run()
Move WxApplication into its own Wx submodule
Move WxApplication into its own Wx submodule
Python
agpl-3.0
lo0ol/Ultimaker-Cura,Curahelper/Cura,senttech/Cura,DeskboxBrazil/Cura,lo0ol/Ultimaker-Cura,bq/Ultimaker-Cura,fxtentacle/Cura,totalretribution/Cura,derekhe/Cura,ad1217/Cura,ad1217/Cura,derekhe/Cura,Curahelper/Cura,ynotstartups/Wanhao,hmflash/Cura,markwal/Cura,fieldOfView/Cura,fxtentacle/Cura,hmflash/Cura,quillford/Cura,...
from Cura.WxApplication import WxApplication import wx class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): frame = wx.Frame(None, wx.ID_ANY, "Hello World") frame.Show(True) super(PrinterApplication, sel...
from Cura.Wx.WxApplication import WxApplication class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): super(PrinterApplication, self).run()
<commit_before>from Cura.WxApplication import WxApplication import wx class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): frame = wx.Frame(None, wx.ID_ANY, "Hello World") frame.Show(True) super(PrinterA...
from Cura.Wx.WxApplication import WxApplication class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): super(PrinterApplication, self).run()
from Cura.WxApplication import WxApplication import wx class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): frame = wx.Frame(None, wx.ID_ANY, "Hello World") frame.Show(True) super(PrinterApplication, sel...
<commit_before>from Cura.WxApplication import WxApplication import wx class PrinterApplication(WxApplication): def __init__(self): super(PrinterApplication, self).__init__() def run(self): frame = wx.Frame(None, wx.ID_ANY, "Hello World") frame.Show(True) super(PrinterA...
4b10355d256f1a0bf6b7cc8eae1eda4b8794cb09
indra/sources/omnipath/__init__.py
indra/sources/omnipath/__init__.py
from .api import process_from_web from .processor import OmniPathProcessor
""" The OmniPath module accesses biomolecular interaction data from various curated databases using the OmniPath API (see https://saezlab.github.io/pypath/html/index.html#webservice) and processes the returned data into statements using the OmniPathProcessor. Currently, the following data is collected: - Modificatio...
Write short blurb about module and its usage
Write short blurb about module and its usage
Python
bsd-2-clause
sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,bgyori/indra,johnbachman/indra,johnbachman/belpy,johnbachman/belpy,bgyori/indra,sorgerlab/indra
from .api import process_from_web from .processor import OmniPathProcessor Write short blurb about module and its usage
""" The OmniPath module accesses biomolecular interaction data from various curated databases using the OmniPath API (see https://saezlab.github.io/pypath/html/index.html#webservice) and processes the returned data into statements using the OmniPathProcessor. Currently, the following data is collected: - Modificatio...
<commit_before>from .api import process_from_web from .processor import OmniPathProcessor <commit_msg>Write short blurb about module and its usage<commit_after>
""" The OmniPath module accesses biomolecular interaction data from various curated databases using the OmniPath API (see https://saezlab.github.io/pypath/html/index.html#webservice) and processes the returned data into statements using the OmniPathProcessor. Currently, the following data is collected: - Modificatio...
from .api import process_from_web from .processor import OmniPathProcessor Write short blurb about module and its usage""" The OmniPath module accesses biomolecular interaction data from various curated databases using the OmniPath API (see https://saezlab.github.io/pypath/html/index.html#webservice) and processes the ...
<commit_before>from .api import process_from_web from .processor import OmniPathProcessor <commit_msg>Write short blurb about module and its usage<commit_after>""" The OmniPath module accesses biomolecular interaction data from various curated databases using the OmniPath API (see https://saezlab.github.io/pypath/html/...
ad74a2d02b109308b79b5629920a23b85748e439
photutils/conftest.py
photutils/conftest.py
# this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.tests.pytest_plugins import * ## Uncomment the following line to treat all DeprecationWarnings as ## exc...
# this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.tests.pytest_plugins import * ## Uncomment the following line to treat all DeprecationWarnings as ## exc...
Add scikit-image to test header information
Add scikit-image to test header information
Python
bsd-3-clause
larrybradley/photutils,astropy/photutils
# this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.tests.pytest_plugins import * ## Uncomment the following line to treat all DeprecationWarnings as ## exc...
# this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.tests.pytest_plugins import * ## Uncomment the following line to treat all DeprecationWarnings as ## exc...
<commit_before># this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.tests.pytest_plugins import * ## Uncomment the following line to treat all DeprecationWar...
# this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.tests.pytest_plugins import * ## Uncomment the following line to treat all DeprecationWarnings as ## exc...
# this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.tests.pytest_plugins import * ## Uncomment the following line to treat all DeprecationWarnings as ## exc...
<commit_before># this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.tests.pytest_plugins import * ## Uncomment the following line to treat all DeprecationWar...
da90ddfd697da5be7e0c01f183e733bbc981fe85
app.py
app.py
from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run()
from flask import Flask app = Flask(__name__) @app.route('/') @app.route('/index') def index(): return 'Hello World!' if __name__ == '__main__': app.run()
Index action ready with "Hello, World!" message
Index action ready with "Hello, World!" message
Python
mit
alexander-emelyanov/microblog,alexander-emelyanov/microblog
from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run() Index action ready with "Hello, World!" message
from flask import Flask app = Flask(__name__) @app.route('/') @app.route('/index') def index(): return 'Hello World!' if __name__ == '__main__': app.run()
<commit_before>from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run() <commit_msg>Index action ready with "Hello, World!" message<commit_after>
from flask import Flask app = Flask(__name__) @app.route('/') @app.route('/index') def index(): return 'Hello World!' if __name__ == '__main__': app.run()
from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run() Index action ready with "Hello, World!" messagefrom flask import Flask app = Flask(__name__) @app.route('/') @app.route('/index') def index(): return 'Hello Wor...
<commit_before>from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run() <commit_msg>Index action ready with "Hello, World!" message<commit_after>from flask import Flask app = Flask(__name__) @app.route('/') @app.route('/i...
a9892cc1fcb7d2911f6afba52a06a6f1c1ed9b25
tests/test_wrap_modes.py
tests/test_wrap_modes.py
from hypothesis_auto import auto_pytest_magic from isort import wrap_modes auto_pytest_magic(wrap_modes.grid, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.vertical, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.hanging_indent, auto_allow_exceptions_=(ValueError,)) auto_pytes...
from hypothesis_auto import auto_pytest_magic from isort import wrap_modes auto_pytest_magic(wrap_modes.grid, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.vertical, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.hanging_indent, auto_allow_exceptions_=(ValueError,)) auto_pytes...
Increase wrap mode test coverage
Increase wrap mode test coverage
Python
mit
PyCQA/isort,PyCQA/isort
from hypothesis_auto import auto_pytest_magic from isort import wrap_modes auto_pytest_magic(wrap_modes.grid, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.vertical, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.hanging_indent, auto_allow_exceptions_=(ValueError,)) auto_pytes...
from hypothesis_auto import auto_pytest_magic from isort import wrap_modes auto_pytest_magic(wrap_modes.grid, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.vertical, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.hanging_indent, auto_allow_exceptions_=(ValueError,)) auto_pytes...
<commit_before>from hypothesis_auto import auto_pytest_magic from isort import wrap_modes auto_pytest_magic(wrap_modes.grid, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.vertical, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.hanging_indent, auto_allow_exceptions_=(ValueErro...
from hypothesis_auto import auto_pytest_magic from isort import wrap_modes auto_pytest_magic(wrap_modes.grid, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.vertical, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.hanging_indent, auto_allow_exceptions_=(ValueError,)) auto_pytes...
from hypothesis_auto import auto_pytest_magic from isort import wrap_modes auto_pytest_magic(wrap_modes.grid, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.vertical, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.hanging_indent, auto_allow_exceptions_=(ValueError,)) auto_pytes...
<commit_before>from hypothesis_auto import auto_pytest_magic from isort import wrap_modes auto_pytest_magic(wrap_modes.grid, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.vertical, auto_allow_exceptions_=(ValueError,)) auto_pytest_magic(wrap_modes.hanging_indent, auto_allow_exceptions_=(ValueErro...
cf52a25001a3c9883caff70d3eb0318c8418fa76
test/pyrostest/pub_foo.py
test/pyrostest/pub_foo.py
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 pub = rospy.Publisher('/pub_val', Int32, queue_size=10) def pub_foo(): rospy.init_node('pub_foo', anonymous=True) while True: pub.publish(rospy.get_param('foo')) if __name__ == '__main__': pub_foo()
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 pub = rospy.Publisher('/pub_val', Int32, queue_size=10) def pub_foo(): rospy.init_node('pub_foo', anonymous=True) while True: pub.publish(rospy.get_param('/foo')) if __name__ == '__main__': pub_foo()
Use absolute path to make the node work.
Use absolute path to make the node work.
Python
mit
gtagency/pyrostest,gtagency/pyrostest
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 pub = rospy.Publisher('/pub_val', Int32, queue_size=10) def pub_foo(): rospy.init_node('pub_foo', anonymous=True) while True: pub.publish(rospy.get_param('foo')) if __name__ == '__main__': pub_foo() Use absolute path to make the...
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 pub = rospy.Publisher('/pub_val', Int32, queue_size=10) def pub_foo(): rospy.init_node('pub_foo', anonymous=True) while True: pub.publish(rospy.get_param('/foo')) if __name__ == '__main__': pub_foo()
<commit_before>#!/usr/bin/env python import rospy from std_msgs.msg import Int32 pub = rospy.Publisher('/pub_val', Int32, queue_size=10) def pub_foo(): rospy.init_node('pub_foo', anonymous=True) while True: pub.publish(rospy.get_param('foo')) if __name__ == '__main__': pub_foo() <commit_msg>Us...
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 pub = rospy.Publisher('/pub_val', Int32, queue_size=10) def pub_foo(): rospy.init_node('pub_foo', anonymous=True) while True: pub.publish(rospy.get_param('/foo')) if __name__ == '__main__': pub_foo()
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 pub = rospy.Publisher('/pub_val', Int32, queue_size=10) def pub_foo(): rospy.init_node('pub_foo', anonymous=True) while True: pub.publish(rospy.get_param('foo')) if __name__ == '__main__': pub_foo() Use absolute path to make the...
<commit_before>#!/usr/bin/env python import rospy from std_msgs.msg import Int32 pub = rospy.Publisher('/pub_val', Int32, queue_size=10) def pub_foo(): rospy.init_node('pub_foo', anonymous=True) while True: pub.publish(rospy.get_param('foo')) if __name__ == '__main__': pub_foo() <commit_msg>Us...
d54c54d50a17afde8dbaa8116d7475d66f787aad
pdxtrees/settings_production.py
pdxtrees/settings_production.py
""" Based on: https://devcenter.heroku.com/articles/getting-started-with-django """ import settings DEBUG = False # Parse database configuration from $DATABASE_URL import dj_database_url DATABASES = {'default': dj_database_url.config() } #DATABASES['default'] = dj_database_url.config() # Honor the 'X-Forwarded-P...
""" Based on: https://devcenter.heroku.com/articles/getting-started-with-django """ import settings DEBUG = False # Parse database configuration from $DATABASE_URL import dj_database_url DATABASES = {'default': dj_database_url.config() } SECRET_KEY = os.environ.get('SECRET_KEY') WSGI_APPLICATION = 'pdxtrees.wsgi...
Read secret key from env var explicitly
Read secret key from env var explicitly
Python
mit
mattblair/pdx-trees-django,mattblair/pdx-trees-django
""" Based on: https://devcenter.heroku.com/articles/getting-started-with-django """ import settings DEBUG = False # Parse database configuration from $DATABASE_URL import dj_database_url DATABASES = {'default': dj_database_url.config() } #DATABASES['default'] = dj_database_url.config() # Honor the 'X-Forwarded-P...
""" Based on: https://devcenter.heroku.com/articles/getting-started-with-django """ import settings DEBUG = False # Parse database configuration from $DATABASE_URL import dj_database_url DATABASES = {'default': dj_database_url.config() } SECRET_KEY = os.environ.get('SECRET_KEY') WSGI_APPLICATION = 'pdxtrees.wsgi...
<commit_before>""" Based on: https://devcenter.heroku.com/articles/getting-started-with-django """ import settings DEBUG = False # Parse database configuration from $DATABASE_URL import dj_database_url DATABASES = {'default': dj_database_url.config() } #DATABASES['default'] = dj_database_url.config() # Honor the...
""" Based on: https://devcenter.heroku.com/articles/getting-started-with-django """ import settings DEBUG = False # Parse database configuration from $DATABASE_URL import dj_database_url DATABASES = {'default': dj_database_url.config() } SECRET_KEY = os.environ.get('SECRET_KEY') WSGI_APPLICATION = 'pdxtrees.wsgi...
""" Based on: https://devcenter.heroku.com/articles/getting-started-with-django """ import settings DEBUG = False # Parse database configuration from $DATABASE_URL import dj_database_url DATABASES = {'default': dj_database_url.config() } #DATABASES['default'] = dj_database_url.config() # Honor the 'X-Forwarded-P...
<commit_before>""" Based on: https://devcenter.heroku.com/articles/getting-started-with-django """ import settings DEBUG = False # Parse database configuration from $DATABASE_URL import dj_database_url DATABASES = {'default': dj_database_url.config() } #DATABASES['default'] = dj_database_url.config() # Honor the...
66a4fc0ce6e5c07540c5e4849b829e6623df6590
biothings/web/api/es/handlers/small_handlers.py
biothings/web/api/es/handlers/small_handlers.py
""" TODO load balancer check settings """ from biothings.web.api.es.handlers.base_handler import BaseESRequestHandler from elasticsearch.exceptions import ElasticsearchException from tornado.web import HTTPError class StatusHandler(BaseESRequestHandler): ''' Handles requests to check the status of the se...
""" TODO load balancer check settings """ from biothings.web.api.es.handlers.base_handler import BaseESRequestHandler from elasticsearch.exceptions import ElasticsearchException from tornado.web import HTTPError class StatusHandler(BaseESRequestHandler): ''' Handles requests to check the status of the se...
Rename var to comply with pylint
Rename var to comply with pylint
Python
apache-2.0
biothings/biothings.api,biothings/biothings.api
""" TODO load balancer check settings """ from biothings.web.api.es.handlers.base_handler import BaseESRequestHandler from elasticsearch.exceptions import ElasticsearchException from tornado.web import HTTPError class StatusHandler(BaseESRequestHandler): ''' Handles requests to check the status of the se...
""" TODO load balancer check settings """ from biothings.web.api.es.handlers.base_handler import BaseESRequestHandler from elasticsearch.exceptions import ElasticsearchException from tornado.web import HTTPError class StatusHandler(BaseESRequestHandler): ''' Handles requests to check the status of the se...
<commit_before>""" TODO load balancer check settings """ from biothings.web.api.es.handlers.base_handler import BaseESRequestHandler from elasticsearch.exceptions import ElasticsearchException from tornado.web import HTTPError class StatusHandler(BaseESRequestHandler): ''' Handles requests to check the s...
""" TODO load balancer check settings """ from biothings.web.api.es.handlers.base_handler import BaseESRequestHandler from elasticsearch.exceptions import ElasticsearchException from tornado.web import HTTPError class StatusHandler(BaseESRequestHandler): ''' Handles requests to check the status of the se...
""" TODO load balancer check settings """ from biothings.web.api.es.handlers.base_handler import BaseESRequestHandler from elasticsearch.exceptions import ElasticsearchException from tornado.web import HTTPError class StatusHandler(BaseESRequestHandler): ''' Handles requests to check the status of the se...
<commit_before>""" TODO load balancer check settings """ from biothings.web.api.es.handlers.base_handler import BaseESRequestHandler from elasticsearch.exceptions import ElasticsearchException from tornado.web import HTTPError class StatusHandler(BaseESRequestHandler): ''' Handles requests to check the s...
da2f01c6fbeba6a0df3d6bb2c6dcf6a6ae659a76
opentreemap/registration_backend/urls.py
opentreemap/registration_backend/urls.py
from django.conf.urls import patterns from django.conf.urls import include from django.conf.urls import url from django.views.generic.base import TemplateView from views import RegistrationView, ActivationView urlpatterns = patterns('', url(r'^activate/complete/$', TemplateView.as_view(template_name='regi...
from django.conf.urls import patterns from django.conf.urls import include from django.conf.urls import url from django.views.generic.base import TemplateView from registration.forms import RegistrationFormUniqueEmail from views import RegistrationView, ActivationView urlpatterns = patterns('', url(r'^activate/...
Use registration form to prevent duplicate emails
Use registration form to prevent duplicate emails Fixes #725. We enforce this both at the database level, and here, using django registration's ready-made form class.
Python
agpl-3.0
clever-crow-consulting/otm-core,maurizi/otm-core,clever-crow-consulting/otm-core,RickMohr/otm-core,recklessromeo/otm-core,maurizi/otm-core,maurizi/otm-core,RickMohr/otm-core,RickMohr/otm-core,recklessromeo/otm-core,recklessromeo/otm-core,RickMohr/otm-core,clever-crow-consulting/otm-core,clever-crow-consulting/otm-core,...
from django.conf.urls import patterns from django.conf.urls import include from django.conf.urls import url from django.views.generic.base import TemplateView from views import RegistrationView, ActivationView urlpatterns = patterns('', url(r'^activate/complete/$', TemplateView.as_view(template_name='regi...
from django.conf.urls import patterns from django.conf.urls import include from django.conf.urls import url from django.views.generic.base import TemplateView from registration.forms import RegistrationFormUniqueEmail from views import RegistrationView, ActivationView urlpatterns = patterns('', url(r'^activate/...
<commit_before>from django.conf.urls import patterns from django.conf.urls import include from django.conf.urls import url from django.views.generic.base import TemplateView from views import RegistrationView, ActivationView urlpatterns = patterns('', url(r'^activate/complete/$', TemplateView.as_view(temp...
from django.conf.urls import patterns from django.conf.urls import include from django.conf.urls import url from django.views.generic.base import TemplateView from registration.forms import RegistrationFormUniqueEmail from views import RegistrationView, ActivationView urlpatterns = patterns('', url(r'^activate/...
from django.conf.urls import patterns from django.conf.urls import include from django.conf.urls import url from django.views.generic.base import TemplateView from views import RegistrationView, ActivationView urlpatterns = patterns('', url(r'^activate/complete/$', TemplateView.as_view(template_name='regi...
<commit_before>from django.conf.urls import patterns from django.conf.urls import include from django.conf.urls import url from django.views.generic.base import TemplateView from views import RegistrationView, ActivationView urlpatterns = patterns('', url(r'^activate/complete/$', TemplateView.as_view(temp...
fdfd26b57abfd471fca36fb1f73f739a6374ddb3
ScannerServer/nfc_scanner.py
ScannerServer/nfc_scanner.py
import signal import time from pirc522 import RFID loop = True rfid = RFID() util = rfid.util() def end_read(signal, frame): global loop print("\nCtrl+C captured, ending read.") loop = False rfid.cleanup() signal.signal(signal.SIGINT, end_read) print("Scanning...") while loop: (not_found, data...
import signal import time from pirc522 import RFID loop = True rfid = RFID() util = rfid.util() def end_read(signal, frame): global loop print("\nCtrl+C captured, ending read.") loop = False rfid.cleanup() signal.signal(signal.SIGINT, end_read) print("Scanning...") while loop: (not_found, data...
Discard charcode 254 at end of URL
Discard charcode 254 at end of URL
Python
mit
straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock
import signal import time from pirc522 import RFID loop = True rfid = RFID() util = rfid.util() def end_read(signal, frame): global loop print("\nCtrl+C captured, ending read.") loop = False rfid.cleanup() signal.signal(signal.SIGINT, end_read) print("Scanning...") while loop: (not_found, data...
import signal import time from pirc522 import RFID loop = True rfid = RFID() util = rfid.util() def end_read(signal, frame): global loop print("\nCtrl+C captured, ending read.") loop = False rfid.cleanup() signal.signal(signal.SIGINT, end_read) print("Scanning...") while loop: (not_found, data...
<commit_before>import signal import time from pirc522 import RFID loop = True rfid = RFID() util = rfid.util() def end_read(signal, frame): global loop print("\nCtrl+C captured, ending read.") loop = False rfid.cleanup() signal.signal(signal.SIGINT, end_read) print("Scanning...") while loop: (...
import signal import time from pirc522 import RFID loop = True rfid = RFID() util = rfid.util() def end_read(signal, frame): global loop print("\nCtrl+C captured, ending read.") loop = False rfid.cleanup() signal.signal(signal.SIGINT, end_read) print("Scanning...") while loop: (not_found, data...
import signal import time from pirc522 import RFID loop = True rfid = RFID() util = rfid.util() def end_read(signal, frame): global loop print("\nCtrl+C captured, ending read.") loop = False rfid.cleanup() signal.signal(signal.SIGINT, end_read) print("Scanning...") while loop: (not_found, data...
<commit_before>import signal import time from pirc522 import RFID loop = True rfid = RFID() util = rfid.util() def end_read(signal, frame): global loop print("\nCtrl+C captured, ending read.") loop = False rfid.cleanup() signal.signal(signal.SIGINT, end_read) print("Scanning...") while loop: (...
6c3621aa5d3936953da027efde9dd3622da50d38
virtool/indexes/models.py
virtool/indexes/models.py
import enum from sqlalchemy import Column, Integer, String, Enum from virtool.pg.utils import Base, SQLEnum class IndexType(str, SQLEnum): """ Enumerated type for index file types """ json = "json" fasta = "fasta" bowtie2 = "bowtie2" class IndexFile(Base): """ SQL model to store n...
from sqlalchemy import Column, Enum, Integer, String from virtool.pg.utils import Base, SQLEnum class IndexType(str, SQLEnum): """ Enumerated type for index file types """ json = "json" fasta = "fasta" bowtie2 = "bowtie2" class IndexFile(Base): """ SQL model to store new index fil...
Fix incorrect column in IndexFile model
Fix incorrect column in IndexFile model * Change `reference` to `index`. * Removed unused import of `enum`
Python
mit
igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool
import enum from sqlalchemy import Column, Integer, String, Enum from virtool.pg.utils import Base, SQLEnum class IndexType(str, SQLEnum): """ Enumerated type for index file types """ json = "json" fasta = "fasta" bowtie2 = "bowtie2" class IndexFile(Base): """ SQL model to store n...
from sqlalchemy import Column, Enum, Integer, String from virtool.pg.utils import Base, SQLEnum class IndexType(str, SQLEnum): """ Enumerated type for index file types """ json = "json" fasta = "fasta" bowtie2 = "bowtie2" class IndexFile(Base): """ SQL model to store new index fil...
<commit_before>import enum from sqlalchemy import Column, Integer, String, Enum from virtool.pg.utils import Base, SQLEnum class IndexType(str, SQLEnum): """ Enumerated type for index file types """ json = "json" fasta = "fasta" bowtie2 = "bowtie2" class IndexFile(Base): """ SQL m...
from sqlalchemy import Column, Enum, Integer, String from virtool.pg.utils import Base, SQLEnum class IndexType(str, SQLEnum): """ Enumerated type for index file types """ json = "json" fasta = "fasta" bowtie2 = "bowtie2" class IndexFile(Base): """ SQL model to store new index fil...
import enum from sqlalchemy import Column, Integer, String, Enum from virtool.pg.utils import Base, SQLEnum class IndexType(str, SQLEnum): """ Enumerated type for index file types """ json = "json" fasta = "fasta" bowtie2 = "bowtie2" class IndexFile(Base): """ SQL model to store n...
<commit_before>import enum from sqlalchemy import Column, Integer, String, Enum from virtool.pg.utils import Base, SQLEnum class IndexType(str, SQLEnum): """ Enumerated type for index file types """ json = "json" fasta = "fasta" bowtie2 = "bowtie2" class IndexFile(Base): """ SQL m...
ba2913658e3770ef73d0e7972435def32199cc08
test.py
test.py
import random from keras.models import Sequential from keras.layers import Dense, Activation import numpy as np def generate_data(size): """" x_train = [] y_train = [] for i in range(size): x = random.randint(0, 100) y = 2*x x_train.append(x) y_train.append(y) return...
import random from keras.models import Sequential from keras.layers import Dense, Activation import numpy as np def generate_data(size): """" x_train = [] y_train = [] for i in range(size): x = random.randint(0, 100) y = 2*x x_train.append(x) y_train.append(y) return...
Fix lirear regression model loss calculation
Fix lirear regression model loss calculation
Python
apache-2.0
alexkorep/dogs-vs-cats
import random from keras.models import Sequential from keras.layers import Dense, Activation import numpy as np def generate_data(size): """" x_train = [] y_train = [] for i in range(size): x = random.randint(0, 100) y = 2*x x_train.append(x) y_train.append(y) return...
import random from keras.models import Sequential from keras.layers import Dense, Activation import numpy as np def generate_data(size): """" x_train = [] y_train = [] for i in range(size): x = random.randint(0, 100) y = 2*x x_train.append(x) y_train.append(y) return...
<commit_before>import random from keras.models import Sequential from keras.layers import Dense, Activation import numpy as np def generate_data(size): """" x_train = [] y_train = [] for i in range(size): x = random.randint(0, 100) y = 2*x x_train.append(x) y_train.appen...
import random from keras.models import Sequential from keras.layers import Dense, Activation import numpy as np def generate_data(size): """" x_train = [] y_train = [] for i in range(size): x = random.randint(0, 100) y = 2*x x_train.append(x) y_train.append(y) return...
import random from keras.models import Sequential from keras.layers import Dense, Activation import numpy as np def generate_data(size): """" x_train = [] y_train = [] for i in range(size): x = random.randint(0, 100) y = 2*x x_train.append(x) y_train.append(y) return...
<commit_before>import random from keras.models import Sequential from keras.layers import Dense, Activation import numpy as np def generate_data(size): """" x_train = [] y_train = [] for i in range(size): x = random.randint(0, 100) y = 2*x x_train.append(x) y_train.appen...
de16cdd72c69c232008ad22c2c45a2985d7ac99c
urls.py
urls.py
from django.conf.urls.defaults import * from django.conf import settings import os # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', (r'^$', 'routez.travel.views.main_page'), (r'^iphone$', 'routez.travel.views.iphone'), ...
from django.conf.urls.defaults import * from django.conf import settings import os # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', (r'^$', 'routez.travel.views.main_page'), (r'^iphone$', 'routez.travel.views.iphone'), ...
Fix stoptimes in range function to actually take a full blown address
Fix stoptimes in range function to actually take a full blown address
Python
agpl-3.0
wlach/routez,wlach/routez
from django.conf.urls.defaults import * from django.conf import settings import os # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', (r'^$', 'routez.travel.views.main_page'), (r'^iphone$', 'routez.travel.views.iphone'), ...
from django.conf.urls.defaults import * from django.conf import settings import os # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', (r'^$', 'routez.travel.views.main_page'), (r'^iphone$', 'routez.travel.views.iphone'), ...
<commit_before>from django.conf.urls.defaults import * from django.conf import settings import os # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', (r'^$', 'routez.travel.views.main_page'), (r'^iphone$', 'routez.travel.view...
from django.conf.urls.defaults import * from django.conf import settings import os # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', (r'^$', 'routez.travel.views.main_page'), (r'^iphone$', 'routez.travel.views.iphone'), ...
from django.conf.urls.defaults import * from django.conf import settings import os # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', (r'^$', 'routez.travel.views.main_page'), (r'^iphone$', 'routez.travel.views.iphone'), ...
<commit_before>from django.conf.urls.defaults import * from django.conf import settings import os # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', (r'^$', 'routez.travel.views.main_page'), (r'^iphone$', 'routez.travel.view...
e1dffa732ab0a2f9468e16c026a392e3d35cdd9c
main.py
main.py
import slackclient import time import os
import slackclient import time import os slackClient = slackClient.SLackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() while True: print(slackClient.rtm_read()) time.sleep(5)
Add test of slack rtm read
Add test of slack rtm read
Python
mit
ollien/Slack-Welcome-Bot
import slackclient import time import os Add test of slack rtm read
import slackclient import time import os slackClient = slackClient.SLackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() while True: print(slackClient.rtm_read()) time.sleep(5)
<commit_before>import slackclient import time import os <commit_msg>Add test of slack rtm read<commit_after>
import slackclient import time import os slackClient = slackClient.SLackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() while True: print(slackClient.rtm_read()) time.sleep(5)
import slackclient import time import os Add test of slack rtm readimport slackclient import time import os slackClient = slackClient.SLackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() while True: print(slackClient.rtm_read()) time.sleep(5)
<commit_before>import slackclient import time import os <commit_msg>Add test of slack rtm read<commit_after>import slackclient import time import os slackClient = slackClient.SLackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() while True: print(slackClient.rtm_read()) time.sleep(5)
7d6c60898dd2708df07847253bca86049a33ed78
SigmaPi/SigmaPi/urls.py
SigmaPi/SigmaPi/urls.py
from django.conf.urls import include, url from django.conf import settings from django.conf.urls.static import static # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', 'SigmaPi.views.home', name='home'), # ur...
import warnings from django.conf.urls import include, url from django.conf import settings from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() # Turns deprecation warnings into errors warnings.simplefilter('error', DeprecationWarning) urlpatterns = [ # Examples: ...
Fix admin URLs; turn deprecation warnings into errors
Fix admin URLs; turn deprecation warnings into errors
Python
mit
sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web
from django.conf.urls import include, url from django.conf import settings from django.conf.urls.static import static # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', 'SigmaPi.views.home', name='home'), # ur...
import warnings from django.conf.urls import include, url from django.conf import settings from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() # Turns deprecation warnings into errors warnings.simplefilter('error', DeprecationWarning) urlpatterns = [ # Examples: ...
<commit_before>from django.conf.urls import include, url from django.conf import settings from django.conf.urls.static import static # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', 'SigmaPi.views.home', name='h...
import warnings from django.conf.urls import include, url from django.conf import settings from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() # Turns deprecation warnings into errors warnings.simplefilter('error', DeprecationWarning) urlpatterns = [ # Examples: ...
from django.conf.urls import include, url from django.conf import settings from django.conf.urls.static import static # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', 'SigmaPi.views.home', name='home'), # ur...
<commit_before>from django.conf.urls import include, url from django.conf import settings from django.conf.urls.static import static # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', 'SigmaPi.views.home', name='h...
56c173a9f1bd1f22448a33b044283ad0d7bcf16e
tests/test_views.py
tests/test_views.py
from django.test import LiveServerTestCase try: from django.urls import reverse except ImportError: # django < 1.10 from django.core.urlresolvers import reverse from tusclient import client class TestUploadView(LiveServerTestCase): def test_get_is_not_allowed(self): response = self.client.get(...
try: from django.urls import reverse except ImportError: # django < 1.10 from django.core.urlresolvers import reverse from tusclient.client import TusClient class TestUploadView(object): def test_get_is_not_allowed(self, client): response = client.get(reverse('tus_upload')) assert respo...
Refactor view to use fixtures from `pytest-django`.
Refactor view to use fixtures from `pytest-django`.
Python
mit
alican/django-tus
from django.test import LiveServerTestCase try: from django.urls import reverse except ImportError: # django < 1.10 from django.core.urlresolvers import reverse from tusclient import client class TestUploadView(LiveServerTestCase): def test_get_is_not_allowed(self): response = self.client.get(...
try: from django.urls import reverse except ImportError: # django < 1.10 from django.core.urlresolvers import reverse from tusclient.client import TusClient class TestUploadView(object): def test_get_is_not_allowed(self, client): response = client.get(reverse('tus_upload')) assert respo...
<commit_before>from django.test import LiveServerTestCase try: from django.urls import reverse except ImportError: # django < 1.10 from django.core.urlresolvers import reverse from tusclient import client class TestUploadView(LiveServerTestCase): def test_get_is_not_allowed(self): response = s...
try: from django.urls import reverse except ImportError: # django < 1.10 from django.core.urlresolvers import reverse from tusclient.client import TusClient class TestUploadView(object): def test_get_is_not_allowed(self, client): response = client.get(reverse('tus_upload')) assert respo...
from django.test import LiveServerTestCase try: from django.urls import reverse except ImportError: # django < 1.10 from django.core.urlresolvers import reverse from tusclient import client class TestUploadView(LiveServerTestCase): def test_get_is_not_allowed(self): response = self.client.get(...
<commit_before>from django.test import LiveServerTestCase try: from django.urls import reverse except ImportError: # django < 1.10 from django.core.urlresolvers import reverse from tusclient import client class TestUploadView(LiveServerTestCase): def test_get_is_not_allowed(self): response = s...
4b3428bca7bf9afd448d8c8da1633756a2e540fe
app/models.py
app/models.py
from app import db from hashlib import md5 class User(db.Model): id = db.Column(db.Integer, primary_key=True) nickname = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='dynamic') d...
from app import db from hashlib import md5 class User(db.Model): id = db.Column(db.Integer, primary_key=True) nickname = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='dynamic') ab...
Add more attributes for User, update db
Add more attributes for User, update db
Python
mit
ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme
from app import db from hashlib import md5 class User(db.Model): id = db.Column(db.Integer, primary_key=True) nickname = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='dynamic') d...
from app import db from hashlib import md5 class User(db.Model): id = db.Column(db.Integer, primary_key=True) nickname = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='dynamic') ab...
<commit_before>from app import db from hashlib import md5 class User(db.Model): id = db.Column(db.Integer, primary_key=True) nickname = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='d...
from app import db from hashlib import md5 class User(db.Model): id = db.Column(db.Integer, primary_key=True) nickname = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='dynamic') ab...
from app import db from hashlib import md5 class User(db.Model): id = db.Column(db.Integer, primary_key=True) nickname = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='dynamic') d...
<commit_before>from app import db from hashlib import md5 class User(db.Model): id = db.Column(db.Integer, primary_key=True) nickname = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) posts = db.relationship('Post', backref='author', lazy='d...
e165143ff629c193a2e9c31874b66c0925de3c60
sgpublish/io/maya.py
sgpublish/io/maya.py
from __future__ import absolute_import from . import base from maya import cmds __also_reload__ = ['.base'] class Exporter(base.Exporter): def get_previous_publish_ids(self): ids = cmds.fileInfo('sgpublish_%s_ids' % self.publish_type, query=True) return set(int(x.strip()) for x in ids[0].s...
from __future__ import absolute_import import os from . import base from maya import cmds __also_reload__ = ['.base'] class Exporter(base.Exporter): def __init__(self, *args, **kwargs): super(Exporter, self).__init__(*args, **kwargs) @property def filename_hint(self): return ...
Add more defaults to Maya exporter
Add more defaults to Maya exporter
Python
bsd-3-clause
westernx/sgpublish
from __future__ import absolute_import from . import base from maya import cmds __also_reload__ = ['.base'] class Exporter(base.Exporter): def get_previous_publish_ids(self): ids = cmds.fileInfo('sgpublish_%s_ids' % self.publish_type, query=True) return set(int(x.strip()) for x in ids[0].s...
from __future__ import absolute_import import os from . import base from maya import cmds __also_reload__ = ['.base'] class Exporter(base.Exporter): def __init__(self, *args, **kwargs): super(Exporter, self).__init__(*args, **kwargs) @property def filename_hint(self): return ...
<commit_before>from __future__ import absolute_import from . import base from maya import cmds __also_reload__ = ['.base'] class Exporter(base.Exporter): def get_previous_publish_ids(self): ids = cmds.fileInfo('sgpublish_%s_ids' % self.publish_type, query=True) return set(int(x.strip()) fo...
from __future__ import absolute_import import os from . import base from maya import cmds __also_reload__ = ['.base'] class Exporter(base.Exporter): def __init__(self, *args, **kwargs): super(Exporter, self).__init__(*args, **kwargs) @property def filename_hint(self): return ...
from __future__ import absolute_import from . import base from maya import cmds __also_reload__ = ['.base'] class Exporter(base.Exporter): def get_previous_publish_ids(self): ids = cmds.fileInfo('sgpublish_%s_ids' % self.publish_type, query=True) return set(int(x.strip()) for x in ids[0].s...
<commit_before>from __future__ import absolute_import from . import base from maya import cmds __also_reload__ = ['.base'] class Exporter(base.Exporter): def get_previous_publish_ids(self): ids = cmds.fileInfo('sgpublish_%s_ids' % self.publish_type, query=True) return set(int(x.strip()) fo...
429d701cce7ad2cf8fb77f169c4af6f2f27562fd
db_mutex/models.py
db_mutex/models.py
from django.db import models class DBMutex(models.Model): """ Models a mutex lock with a ``lock_id`` and a ``creation_time``. :type lock_id: str :param lock_id: A unique CharField with a max length of 256 :type creation_time: datetime :param creation_time: The creation time of the mutex lock...
from django.db import models class DBMutex(models.Model): """ Models a mutex lock with a ``lock_id`` and a ``creation_time``. :type lock_id: str :param lock_id: A unique CharField with a max length of 256 :type creation_time: datetime :param creation_time: The creation time of the mutex lock...
Declare app_label in model Meta class to work with Django 1.9
Declare app_label in model Meta class to work with Django 1.9 Fixes RemovedInDjango19Warning: Model class db_mutex.models.DBMutex doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Djan...
Python
mit
minervaproject/django-db-mutex
from django.db import models class DBMutex(models.Model): """ Models a mutex lock with a ``lock_id`` and a ``creation_time``. :type lock_id: str :param lock_id: A unique CharField with a max length of 256 :type creation_time: datetime :param creation_time: The creation time of the mutex lock...
from django.db import models class DBMutex(models.Model): """ Models a mutex lock with a ``lock_id`` and a ``creation_time``. :type lock_id: str :param lock_id: A unique CharField with a max length of 256 :type creation_time: datetime :param creation_time: The creation time of the mutex lock...
<commit_before>from django.db import models class DBMutex(models.Model): """ Models a mutex lock with a ``lock_id`` and a ``creation_time``. :type lock_id: str :param lock_id: A unique CharField with a max length of 256 :type creation_time: datetime :param creation_time: The creation time of...
from django.db import models class DBMutex(models.Model): """ Models a mutex lock with a ``lock_id`` and a ``creation_time``. :type lock_id: str :param lock_id: A unique CharField with a max length of 256 :type creation_time: datetime :param creation_time: The creation time of the mutex lock...
from django.db import models class DBMutex(models.Model): """ Models a mutex lock with a ``lock_id`` and a ``creation_time``. :type lock_id: str :param lock_id: A unique CharField with a max length of 256 :type creation_time: datetime :param creation_time: The creation time of the mutex lock...
<commit_before>from django.db import models class DBMutex(models.Model): """ Models a mutex lock with a ``lock_id`` and a ``creation_time``. :type lock_id: str :param lock_id: A unique CharField with a max length of 256 :type creation_time: datetime :param creation_time: The creation time of...
77d4f2bfcab2cb3ca1b8d1736c51018d69fe0940
rpe/resources/base.py
rpe/resources/base.py
# Copyright 2019 The resource-policy-evaluation-library Authors. 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 # # Unl...
# Copyright 2019 The resource-policy-evaluation-library Authors. 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 # # Unl...
Remove generic factory method from Resource
Remove generic factory method from Resource
Python
apache-2.0
forseti-security/resource-policy-evaluation-library
# Copyright 2019 The resource-policy-evaluation-library Authors. 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 # # Unl...
# Copyright 2019 The resource-policy-evaluation-library Authors. 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 # # Unl...
<commit_before># Copyright 2019 The resource-policy-evaluation-library Authors. 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/LICE...
# Copyright 2019 The resource-policy-evaluation-library Authors. 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 # # Unl...
# Copyright 2019 The resource-policy-evaluation-library Authors. 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 # # Unl...
<commit_before># Copyright 2019 The resource-policy-evaluation-library Authors. 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/LICE...
dd472ed80ba374d719f9b1dc56fd3038f6a73dee
examples/benchmark/benchmark_twisted_names.py
examples/benchmark/benchmark_twisted_names.py
""" Benchmark on Twisted Names subsystem. """ from twisted.names.dns import DNSDatagramProtocol from twisted.names.server import DNSServerFactory from twisted.names import hosts, client from twisted.internet import reactor import benchmarking @benchmarking.deferred(max_seconds=5) class TwistedNamesBenchmarkCase(ben...
""" Benchmark on Twisted Names subsystem. """ from twisted.names.dns import DNSDatagramProtocol from twisted.names.server import DNSServerFactory from twisted.names import hosts, client from twisted.internet import reactor import benchmarking @benchmarking.deferred(max_seconds=15) class TwistedNamesBenchmarkCase(be...
Make benchmark params match Twisted's params.
Make benchmark params match Twisted's params.
Python
mit
AlekSi/benchmarking-py
""" Benchmark on Twisted Names subsystem. """ from twisted.names.dns import DNSDatagramProtocol from twisted.names.server import DNSServerFactory from twisted.names import hosts, client from twisted.internet import reactor import benchmarking @benchmarking.deferred(max_seconds=5) class TwistedNamesBenchmarkCase(ben...
""" Benchmark on Twisted Names subsystem. """ from twisted.names.dns import DNSDatagramProtocol from twisted.names.server import DNSServerFactory from twisted.names import hosts, client from twisted.internet import reactor import benchmarking @benchmarking.deferred(max_seconds=15) class TwistedNamesBenchmarkCase(be...
<commit_before>""" Benchmark on Twisted Names subsystem. """ from twisted.names.dns import DNSDatagramProtocol from twisted.names.server import DNSServerFactory from twisted.names import hosts, client from twisted.internet import reactor import benchmarking @benchmarking.deferred(max_seconds=5) class TwistedNamesBe...
""" Benchmark on Twisted Names subsystem. """ from twisted.names.dns import DNSDatagramProtocol from twisted.names.server import DNSServerFactory from twisted.names import hosts, client from twisted.internet import reactor import benchmarking @benchmarking.deferred(max_seconds=15) class TwistedNamesBenchmarkCase(be...
""" Benchmark on Twisted Names subsystem. """ from twisted.names.dns import DNSDatagramProtocol from twisted.names.server import DNSServerFactory from twisted.names import hosts, client from twisted.internet import reactor import benchmarking @benchmarking.deferred(max_seconds=5) class TwistedNamesBenchmarkCase(ben...
<commit_before>""" Benchmark on Twisted Names subsystem. """ from twisted.names.dns import DNSDatagramProtocol from twisted.names.server import DNSServerFactory from twisted.names import hosts, client from twisted.internet import reactor import benchmarking @benchmarking.deferred(max_seconds=5) class TwistedNamesBe...
9e013b6123e3eefec64e9e479741a16fe4727ad6
plugins/python/org.eclipse.eclipsemonkey.lang.python.examples/samples/scripts/Views__Web_View.py
plugins/python/org.eclipse.eclipsemonkey.lang.python.examples/samples/scripts/Views__Web_View.py
# # Menu: Examples > Views > Py > Google Web View # Kudos: Paul Colton # License: EPL 1.0 # from org.eclipse.swt.browser import LocationListener from org.eclipse.eclipsemonkey.ui.scriptableView import GenericScriptableView from org.eclipse.ui import IWorkbenchPage class MyLocationListener(LocationListener): def ch...
# # Menu: Examples > Views > Py > Google Web View # Kudos: Paul Colton # License: EPL 1.0 # from org.eclipse.swt.browser import LocationListener from org.eclipse.eclipsemonkey.ui.views import GenericScriptableView from org.eclipse.ui import IWorkbenchPage class MyLocationListener(LocationListener): def changing(se...
Correct sample with new qualified name of the class
Correct sample with new qualified name of the class
Python
epl-1.0
adaussy/eclipse-monkey-revival,adaussy/eclipse-monkey-revival,adaussy/eclipse-monkey-revival
# # Menu: Examples > Views > Py > Google Web View # Kudos: Paul Colton # License: EPL 1.0 # from org.eclipse.swt.browser import LocationListener from org.eclipse.eclipsemonkey.ui.scriptableView import GenericScriptableView from org.eclipse.ui import IWorkbenchPage class MyLocationListener(LocationListener): def ch...
# # Menu: Examples > Views > Py > Google Web View # Kudos: Paul Colton # License: EPL 1.0 # from org.eclipse.swt.browser import LocationListener from org.eclipse.eclipsemonkey.ui.views import GenericScriptableView from org.eclipse.ui import IWorkbenchPage class MyLocationListener(LocationListener): def changing(se...
<commit_before># # Menu: Examples > Views > Py > Google Web View # Kudos: Paul Colton # License: EPL 1.0 # from org.eclipse.swt.browser import LocationListener from org.eclipse.eclipsemonkey.ui.scriptableView import GenericScriptableView from org.eclipse.ui import IWorkbenchPage class MyLocationListener(LocationListe...
# # Menu: Examples > Views > Py > Google Web View # Kudos: Paul Colton # License: EPL 1.0 # from org.eclipse.swt.browser import LocationListener from org.eclipse.eclipsemonkey.ui.views import GenericScriptableView from org.eclipse.ui import IWorkbenchPage class MyLocationListener(LocationListener): def changing(se...
# # Menu: Examples > Views > Py > Google Web View # Kudos: Paul Colton # License: EPL 1.0 # from org.eclipse.swt.browser import LocationListener from org.eclipse.eclipsemonkey.ui.scriptableView import GenericScriptableView from org.eclipse.ui import IWorkbenchPage class MyLocationListener(LocationListener): def ch...
<commit_before># # Menu: Examples > Views > Py > Google Web View # Kudos: Paul Colton # License: EPL 1.0 # from org.eclipse.swt.browser import LocationListener from org.eclipse.eclipsemonkey.ui.scriptableView import GenericScriptableView from org.eclipse.ui import IWorkbenchPage class MyLocationListener(LocationListe...
1db1dfe35a97080286577b78f4708cc9afd82232
rx/checkedobserver.py
rx/checkedobserver.py
from rx import Observer from rx.internal.exceptions import ReEntracyException, CompletedException class CheckedObserver(Observer): def __init__(self, observer): self._observer = observer self._state = 0 # 0 - idle, 1 - busy, 2 - done def on_next(self, value): self.check_access() ...
from six import add_metaclass from rx import Observer from rx.internal import ExtensionMethod from rx.internal.exceptions import ReEntracyException, CompletedException class CheckedObserver(Observer): def __init__(self, observer): self._observer = observer self._state = 0 # 0 - idle, 1 - busy, 2 -...
Use extension method for Observer.checked
Use extension method for Observer.checked
Python
mit
dbrattli/RxPY,ReactiveX/RxPY,ReactiveX/RxPY
from rx import Observer from rx.internal.exceptions import ReEntracyException, CompletedException class CheckedObserver(Observer): def __init__(self, observer): self._observer = observer self._state = 0 # 0 - idle, 1 - busy, 2 - done def on_next(self, value): self.check_access() ...
from six import add_metaclass from rx import Observer from rx.internal import ExtensionMethod from rx.internal.exceptions import ReEntracyException, CompletedException class CheckedObserver(Observer): def __init__(self, observer): self._observer = observer self._state = 0 # 0 - idle, 1 - busy, 2 -...
<commit_before>from rx import Observer from rx.internal.exceptions import ReEntracyException, CompletedException class CheckedObserver(Observer): def __init__(self, observer): self._observer = observer self._state = 0 # 0 - idle, 1 - busy, 2 - done def on_next(self, value): self.check_...
from six import add_metaclass from rx import Observer from rx.internal import ExtensionMethod from rx.internal.exceptions import ReEntracyException, CompletedException class CheckedObserver(Observer): def __init__(self, observer): self._observer = observer self._state = 0 # 0 - idle, 1 - busy, 2 -...
from rx import Observer from rx.internal.exceptions import ReEntracyException, CompletedException class CheckedObserver(Observer): def __init__(self, observer): self._observer = observer self._state = 0 # 0 - idle, 1 - busy, 2 - done def on_next(self, value): self.check_access() ...
<commit_before>from rx import Observer from rx.internal.exceptions import ReEntracyException, CompletedException class CheckedObserver(Observer): def __init__(self, observer): self._observer = observer self._state = 0 # 0 - idle, 1 - busy, 2 - done def on_next(self, value): self.check_...
f65f18ceec8abf468b1426cf819c806f2d1d7ff8
auslib/migrate/versions/009_add_rule_alias.py
auslib/migrate/versions/009_add_rule_alias.py
from sqlalchemy import Column, String, MetaData, Table def upgrade(migrate_engine): metadata = MetaData(bind=migrate_engine) def add_alias(table): alias = Column('alias', String(50), unique=True) alias.create(table) add_alias(Table('rules', metadata, autoload=True)) add_alias(Table('r...
from sqlalchemy import Column, String, MetaData, Table def upgrade(migrate_engine): metadata = MetaData(bind=migrate_engine) alias = Column("alias", String(50), unique=True) alias.create(Table("rules", metadata, autoload=True), unique_name="alias_unique") history_alias = Column("alias", String(50)) ...
Fix migration script to make column unique+add index.
Fix migration script to make column unique+add index.
Python
mpl-2.0
testbhearsum/balrog,nurav/balrog,aksareen/balrog,testbhearsum/balrog,tieu/balrog,aksareen/balrog,aksareen/balrog,tieu/balrog,nurav/balrog,nurav/balrog,testbhearsum/balrog,tieu/balrog,mozbhearsum/balrog,mozbhearsum/balrog,aksareen/balrog,mozbhearsum/balrog,nurav/balrog,testbhearsum/balrog,mozbhearsum/balrog,tieu/balrog
from sqlalchemy import Column, String, MetaData, Table def upgrade(migrate_engine): metadata = MetaData(bind=migrate_engine) def add_alias(table): alias = Column('alias', String(50), unique=True) alias.create(table) add_alias(Table('rules', metadata, autoload=True)) add_alias(Table('r...
from sqlalchemy import Column, String, MetaData, Table def upgrade(migrate_engine): metadata = MetaData(bind=migrate_engine) alias = Column("alias", String(50), unique=True) alias.create(Table("rules", metadata, autoload=True), unique_name="alias_unique") history_alias = Column("alias", String(50)) ...
<commit_before>from sqlalchemy import Column, String, MetaData, Table def upgrade(migrate_engine): metadata = MetaData(bind=migrate_engine) def add_alias(table): alias = Column('alias', String(50), unique=True) alias.create(table) add_alias(Table('rules', metadata, autoload=True)) add...
from sqlalchemy import Column, String, MetaData, Table def upgrade(migrate_engine): metadata = MetaData(bind=migrate_engine) alias = Column("alias", String(50), unique=True) alias.create(Table("rules", metadata, autoload=True), unique_name="alias_unique") history_alias = Column("alias", String(50)) ...
from sqlalchemy import Column, String, MetaData, Table def upgrade(migrate_engine): metadata = MetaData(bind=migrate_engine) def add_alias(table): alias = Column('alias', String(50), unique=True) alias.create(table) add_alias(Table('rules', metadata, autoload=True)) add_alias(Table('r...
<commit_before>from sqlalchemy import Column, String, MetaData, Table def upgrade(migrate_engine): metadata = MetaData(bind=migrate_engine) def add_alias(table): alias = Column('alias', String(50), unique=True) alias.create(table) add_alias(Table('rules', metadata, autoload=True)) add...
6bdec176a7a43b3e6eb65a2c7e639c09a89d43bc
data_models/data_refinery_models/models.py
data_models/data_refinery_models/models.py
from django.db import models from django.utils import timezone class TimeTrackedModel(models.Model): created_at = models.DateTimeField(editable=False) updated_at = models.DateTimeField() def save(self, *args, **kwargs): ''' On save, update timestamps ''' if not self.id: self.c...
from django.db import models from django.utils import timezone class TimeTrackedModel(models.Model): created_at = models.DateTimeField(editable=False) updated_at = models.DateTimeField() def save(self, *args, **kwargs): ''' On save, update timestamps ''' if not self.id: self.c...
Change a comment to mention the organism taxonomy ID from NCBI.
Change a comment to mention the organism taxonomy ID from NCBI.
Python
bsd-3-clause
data-refinery/data_refinery,data-refinery/data_refinery,data-refinery/data_refinery
from django.db import models from django.utils import timezone class TimeTrackedModel(models.Model): created_at = models.DateTimeField(editable=False) updated_at = models.DateTimeField() def save(self, *args, **kwargs): ''' On save, update timestamps ''' if not self.id: self.c...
from django.db import models from django.utils import timezone class TimeTrackedModel(models.Model): created_at = models.DateTimeField(editable=False) updated_at = models.DateTimeField() def save(self, *args, **kwargs): ''' On save, update timestamps ''' if not self.id: self.c...
<commit_before>from django.db import models from django.utils import timezone class TimeTrackedModel(models.Model): created_at = models.DateTimeField(editable=False) updated_at = models.DateTimeField() def save(self, *args, **kwargs): ''' On save, update timestamps ''' if not self.id: ...
from django.db import models from django.utils import timezone class TimeTrackedModel(models.Model): created_at = models.DateTimeField(editable=False) updated_at = models.DateTimeField() def save(self, *args, **kwargs): ''' On save, update timestamps ''' if not self.id: self.c...
from django.db import models from django.utils import timezone class TimeTrackedModel(models.Model): created_at = models.DateTimeField(editable=False) updated_at = models.DateTimeField() def save(self, *args, **kwargs): ''' On save, update timestamps ''' if not self.id: self.c...
<commit_before>from django.db import models from django.utils import timezone class TimeTrackedModel(models.Model): created_at = models.DateTimeField(editable=False) updated_at = models.DateTimeField() def save(self, *args, **kwargs): ''' On save, update timestamps ''' if not self.id: ...
10e040890f5dd1297aa4fa04ce2cf9e9db447d09
sample/sample/urls.py
sample/sample/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', url(r'^$', 'mini.views.index'), url(r'^about$', 'mini.views.about'), # Examples: # url(r'^$', 'sample.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic import TemplateView urlpatterns = patterns('', url(r'^$', 'mini.views.index', name='index'), url(r'^about$', TemplateView.as_view(template_name='about.html'), name='about'), # Examples: # url(...
Use a generic TemplateView for the sample's about page
Use a generic TemplateView for the sample's about page
Python
bsd-3-clause
tamarackapp/tamarack-collector-py
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', url(r'^$', 'mini.views.index'), url(r'^about$', 'mini.views.about'), # Examples: # url(r'^$', 'sample.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic import TemplateView urlpatterns = patterns('', url(r'^$', 'mini.views.index', name='index'), url(r'^about$', TemplateView.as_view(template_name='about.html'), name='about'), # Examples: # url(...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', url(r'^$', 'mini.views.index'), url(r'^about$', 'mini.views.about'), # Examples: # url(r'^$', 'sample.views.home', name='home'), # url(r'^blog/', include('blog.urls')), ...
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic import TemplateView urlpatterns = patterns('', url(r'^$', 'mini.views.index', name='index'), url(r'^about$', TemplateView.as_view(template_name='about.html'), name='about'), # Examples: # url(...
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', url(r'^$', 'mini.views.index'), url(r'^about$', 'mini.views.about'), # Examples: # url(r'^$', 'sample.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', url(r'^$', 'mini.views.index'), url(r'^about$', 'mini.views.about'), # Examples: # url(r'^$', 'sample.views.home', name='home'), # url(r'^blog/', include('blog.urls')), ...
3373521f43b0d605bba6cc36b190c064d5a0303e
kytos/core/link.py
kytos/core/link.py
"""Module with all classes related to links. Links are low level abstractions representing connections between two interfaces. """ import json from kytos.core.common import GenericEntity class Link(GenericEntity): """Define a link between two Endpoints.""" def __init__(self, endpoint_a, endpoint_b): ...
"""Module with all classes related to links. Links are low level abstractions representing connections between two interfaces. """ import json from uuid import uuid4 from kytos.core.common import GenericEntity class Link(GenericEntity): """Define a link between two Endpoints.""" def __init__(self, endpoi...
Define Link ID as UUID
Define Link ID as UUID
Python
mit
kytos/kyco,kytos/kytos,renanrodrigo/kytos,macartur/kytos
"""Module with all classes related to links. Links are low level abstractions representing connections between two interfaces. """ import json from kytos.core.common import GenericEntity class Link(GenericEntity): """Define a link between two Endpoints.""" def __init__(self, endpoint_a, endpoint_b): ...
"""Module with all classes related to links. Links are low level abstractions representing connections between two interfaces. """ import json from uuid import uuid4 from kytos.core.common import GenericEntity class Link(GenericEntity): """Define a link between two Endpoints.""" def __init__(self, endpoi...
<commit_before>"""Module with all classes related to links. Links are low level abstractions representing connections between two interfaces. """ import json from kytos.core.common import GenericEntity class Link(GenericEntity): """Define a link between two Endpoints.""" def __init__(self, endpoint_a, end...
"""Module with all classes related to links. Links are low level abstractions representing connections between two interfaces. """ import json from uuid import uuid4 from kytos.core.common import GenericEntity class Link(GenericEntity): """Define a link between two Endpoints.""" def __init__(self, endpoi...
"""Module with all classes related to links. Links are low level abstractions representing connections between two interfaces. """ import json from kytos.core.common import GenericEntity class Link(GenericEntity): """Define a link between two Endpoints.""" def __init__(self, endpoint_a, endpoint_b): ...
<commit_before>"""Module with all classes related to links. Links are low level abstractions representing connections between two interfaces. """ import json from kytos.core.common import GenericEntity class Link(GenericEntity): """Define a link between two Endpoints.""" def __init__(self, endpoint_a, end...
b6da3311c894ad502b32b1cb96c3b0e0a02b0b85
blog/views.py
blog/views.py
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from .models import Blog # Create your views here. def index(request): blogs_list = Blog.objects.filter(published=True).order_by('-dateline') paginator = Paginator(blogs_list, 5) page = request.GET.get('...
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.http import Http404 from django.shortcuts import render from .models import Blog # Create your views here. def index(request): blogs_list = Blog.objects.filter(published=True).order_by('-dateline') paginator = Paginator(blogs_list...
Handle blogs with a bad URL slug
Handle blogs with a bad URL slug
Python
bsd-3-clause
brendan1mcmanus/whartonfintech-v3,brendan1mcmanus/whartonfintech-v3,brendan1mcmanus/whartonfintech-v3,brendan1mcmanus/whartonfintech-v3,brendan1mcmanus/whartonfintech-v3
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from .models import Blog # Create your views here. def index(request): blogs_list = Blog.objects.filter(published=True).order_by('-dateline') paginator = Paginator(blogs_list, 5) page = request.GET.get('...
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.http import Http404 from django.shortcuts import render from .models import Blog # Create your views here. def index(request): blogs_list = Blog.objects.filter(published=True).order_by('-dateline') paginator = Paginator(blogs_list...
<commit_before>from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from .models import Blog # Create your views here. def index(request): blogs_list = Blog.objects.filter(published=True).order_by('-dateline') paginator = Paginator(blogs_list, 5) page = re...
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.http import Http404 from django.shortcuts import render from .models import Blog # Create your views here. def index(request): blogs_list = Blog.objects.filter(published=True).order_by('-dateline') paginator = Paginator(blogs_list...
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from .models import Blog # Create your views here. def index(request): blogs_list = Blog.objects.filter(published=True).order_by('-dateline') paginator = Paginator(blogs_list, 5) page = request.GET.get('...
<commit_before>from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from .models import Blog # Create your views here. def index(request): blogs_list = Blog.objects.filter(published=True).order_by('-dateline') paginator = Paginator(blogs_list, 5) page = re...
e730c552c0b6095a8962f29a114069fb335d7ec6
zinnia/urls/shortlink.py
zinnia/urls/shortlink.py
"""Urls for the Zinnia entries short link""" from django.conf.urls import url from django.conf.urls import patterns from zinnia.views.shortlink import EntryShortLink urlpatterns = patterns( '', url(r'^(?P<token>[\da-z]+)/$', EntryShortLink.as_view(), name='entry_shortlink'), )
"""Urls for the Zinnia entries short link""" from django.conf.urls import url from django.conf.urls import patterns from zinnia.views.shortlink import EntryShortLink urlpatterns = patterns( '', url(r'^e(?P<token>[\da-z]+)/$', EntryShortLink.as_view(), name='entry_shortlink'), )
Add a "e" prefix to avoid issue when reaching the ID 46656
Add a "e" prefix to avoid issue when reaching the ID 46656
Python
bsd-3-clause
aorzh/django-blog-zinnia,marctc/django-blog-zinnia,marctc/django-blog-zinnia,dapeng0802/django-blog-zinnia,ghachey/django-blog-zinnia,aorzh/django-blog-zinnia,ZuluPro/django-blog-zinnia,1844144/django-blog-zinnia,Maplecroft/django-blog-zinnia,extertioner/django-blog-zinnia,Zopieux/django-blog-zinnia,bywbilly/django-blo...
"""Urls for the Zinnia entries short link""" from django.conf.urls import url from django.conf.urls import patterns from zinnia.views.shortlink import EntryShortLink urlpatterns = patterns( '', url(r'^(?P<token>[\da-z]+)/$', EntryShortLink.as_view(), name='entry_shortlink'), ) Add a "e" prefi...
"""Urls for the Zinnia entries short link""" from django.conf.urls import url from django.conf.urls import patterns from zinnia.views.shortlink import EntryShortLink urlpatterns = patterns( '', url(r'^e(?P<token>[\da-z]+)/$', EntryShortLink.as_view(), name='entry_shortlink'), )
<commit_before>"""Urls for the Zinnia entries short link""" from django.conf.urls import url from django.conf.urls import patterns from zinnia.views.shortlink import EntryShortLink urlpatterns = patterns( '', url(r'^(?P<token>[\da-z]+)/$', EntryShortLink.as_view(), name='entry_shortlink'), ) ...
"""Urls for the Zinnia entries short link""" from django.conf.urls import url from django.conf.urls import patterns from zinnia.views.shortlink import EntryShortLink urlpatterns = patterns( '', url(r'^e(?P<token>[\da-z]+)/$', EntryShortLink.as_view(), name='entry_shortlink'), )
"""Urls for the Zinnia entries short link""" from django.conf.urls import url from django.conf.urls import patterns from zinnia.views.shortlink import EntryShortLink urlpatterns = patterns( '', url(r'^(?P<token>[\da-z]+)/$', EntryShortLink.as_view(), name='entry_shortlink'), ) Add a "e" prefi...
<commit_before>"""Urls for the Zinnia entries short link""" from django.conf.urls import url from django.conf.urls import patterns from zinnia.views.shortlink import EntryShortLink urlpatterns = patterns( '', url(r'^(?P<token>[\da-z]+)/$', EntryShortLink.as_view(), name='entry_shortlink'), ) ...
f01c6d22d30e175d120e5ffe10bef93378375ea7
example/myshop/models/__init__.py
example/myshop/models/__init__.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings # import default models from djangoSHOP to materialize them from shop.models.defaults.address import ShippingAddress, BillingAddress from shop.models.defaults.cart import Cart from shop.models.defaults.cart_item import Ca...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings # import default models from djangoSHOP to materialize them from shop.models.defaults.address import ShippingAddress, BillingAddress from shop.models.defaults.cart import Cart from shop.models.defaults.cart_item import Ca...
Use __all__ for restricted exports
Use __all__ for restricted exports
Python
bsd-3-clause
jrief/django-shop,khchine5/django-shop,nimbis/django-shop,jrief/django-shop,nimbis/django-shop,khchine5/django-shop,divio/django-shop,nimbis/django-shop,jrief/django-shop,khchine5/django-shop,divio/django-shop,awesto/django-shop,jrief/django-shop,awesto/django-shop,awesto/django-shop,divio/django-shop,nimbis/django-sho...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings # import default models from djangoSHOP to materialize them from shop.models.defaults.address import ShippingAddress, BillingAddress from shop.models.defaults.cart import Cart from shop.models.defaults.cart_item import Ca...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings # import default models from djangoSHOP to materialize them from shop.models.defaults.address import ShippingAddress, BillingAddress from shop.models.defaults.cart import Cart from shop.models.defaults.cart_item import Ca...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings # import default models from djangoSHOP to materialize them from shop.models.defaults.address import ShippingAddress, BillingAddress from shop.models.defaults.cart import Cart from shop.models.defaults.cart...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings # import default models from djangoSHOP to materialize them from shop.models.defaults.address import ShippingAddress, BillingAddress from shop.models.defaults.cart import Cart from shop.models.defaults.cart_item import Ca...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings # import default models from djangoSHOP to materialize them from shop.models.defaults.address import ShippingAddress, BillingAddress from shop.models.defaults.cart import Cart from shop.models.defaults.cart_item import Ca...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings # import default models from djangoSHOP to materialize them from shop.models.defaults.address import ShippingAddress, BillingAddress from shop.models.defaults.cart import Cart from shop.models.defaults.cart...
e92784a36053e6708a3eb2772f4c5cd4e16cde4a
app/base/templatetags/git.py
app/base/templatetags/git.py
import subprocess from django.template import Library register = Library() try: head = subprocess.Popen("git rev-parse --short HEAD", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) VERSION = head.stdout.readline().strip() except: VERSION = u'unknown' @register.simple_tag() def git...
import subprocess from django.template import Library register = Library() GIT_VERSION = None @register.simple_tag() def git_version(): global GIT_VERSION if GIT_VERSION: return GIT_VERSION try: head = subprocess.Popen("git rev-parse --short HEAD", shell...
Make GIT_VERSION on footer more robust
[REFACTOR] Make GIT_VERSION on footer more robust
Python
mit
internship2016/sovolo,internship2016/sovolo,internship2016/sovolo
import subprocess from django.template import Library register = Library() try: head = subprocess.Popen("git rev-parse --short HEAD", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) VERSION = head.stdout.readline().strip() except: VERSION = u'unknown' @register.simple_tag() def git...
import subprocess from django.template import Library register = Library() GIT_VERSION = None @register.simple_tag() def git_version(): global GIT_VERSION if GIT_VERSION: return GIT_VERSION try: head = subprocess.Popen("git rev-parse --short HEAD", shell...
<commit_before>import subprocess from django.template import Library register = Library() try: head = subprocess.Popen("git rev-parse --short HEAD", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) VERSION = head.stdout.readline().strip() except: VERSION = u'unknown' @register.simpl...
import subprocess from django.template import Library register = Library() GIT_VERSION = None @register.simple_tag() def git_version(): global GIT_VERSION if GIT_VERSION: return GIT_VERSION try: head = subprocess.Popen("git rev-parse --short HEAD", shell...
import subprocess from django.template import Library register = Library() try: head = subprocess.Popen("git rev-parse --short HEAD", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) VERSION = head.stdout.readline().strip() except: VERSION = u'unknown' @register.simple_tag() def git...
<commit_before>import subprocess from django.template import Library register = Library() try: head = subprocess.Popen("git rev-parse --short HEAD", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) VERSION = head.stdout.readline().strip() except: VERSION = u'unknown' @register.simpl...
59dd1dd68792b13ea75b4aaffc68983236d02ad3
config/urls.py
config/urls.py
"""ohmycommand URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
"""ohmycommand URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
Make sure that we pass a CSRF cookie with value
Make sure that we pass a CSRF cookie with value We need to pass a CSRF cookie when we make a GET request because otherwise Angular would have no way of grabing the CSRF.
Python
mit
gopar/OhMyCommand,gopar/OhMyCommand,gopar/OhMyCommand
"""ohmycommand URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
"""ohmycommand URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
<commit_before>"""ohmycommand URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, nam...
"""ohmycommand URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
"""ohmycommand URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
<commit_before>"""ohmycommand URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, nam...
ec80d534e91e480a40152550db10e8be8e777f43
pentai/ai/t_all.py
pentai/ai/t_all.py
#!/usr/bin/python import unittest import importlib def iam(m_str): """ import and add a module """ global all_tests module = importlib.import_module("pentai.ai.%s" % m_str) suite = unittest.defaultTestLoader.loadTestsFromModule(module) all_tests.addTest(suite) def suite(): global all_tests ...
#!/usr/bin/python import unittest import importlib def iam(m_str): """ import and add a module """ global all_tests module = importlib.import_module("pentai.ai.%s" % m_str) suite = unittest.defaultTestLoader.loadTestsFromModule(module) all_tests.addTest(suite) def suite(): global all_tests ...
Disable PF5 tests for now
Disable PF5 tests for now
Python
mit
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
#!/usr/bin/python import unittest import importlib def iam(m_str): """ import and add a module """ global all_tests module = importlib.import_module("pentai.ai.%s" % m_str) suite = unittest.defaultTestLoader.loadTestsFromModule(module) all_tests.addTest(suite) def suite(): global all_tests ...
#!/usr/bin/python import unittest import importlib def iam(m_str): """ import and add a module """ global all_tests module = importlib.import_module("pentai.ai.%s" % m_str) suite = unittest.defaultTestLoader.loadTestsFromModule(module) all_tests.addTest(suite) def suite(): global all_tests ...
<commit_before>#!/usr/bin/python import unittest import importlib def iam(m_str): """ import and add a module """ global all_tests module = importlib.import_module("pentai.ai.%s" % m_str) suite = unittest.defaultTestLoader.loadTestsFromModule(module) all_tests.addTest(suite) def suite(): gl...
#!/usr/bin/python import unittest import importlib def iam(m_str): """ import and add a module """ global all_tests module = importlib.import_module("pentai.ai.%s" % m_str) suite = unittest.defaultTestLoader.loadTestsFromModule(module) all_tests.addTest(suite) def suite(): global all_tests ...
#!/usr/bin/python import unittest import importlib def iam(m_str): """ import and add a module """ global all_tests module = importlib.import_module("pentai.ai.%s" % m_str) suite = unittest.defaultTestLoader.loadTestsFromModule(module) all_tests.addTest(suite) def suite(): global all_tests ...
<commit_before>#!/usr/bin/python import unittest import importlib def iam(m_str): """ import and add a module """ global all_tests module = importlib.import_module("pentai.ai.%s" % m_str) suite = unittest.defaultTestLoader.loadTestsFromModule(module) all_tests.addTest(suite) def suite(): gl...
269670c239339bb26b61e2f9dcf0a4110b80f828
exec_thread_1.py
exec_thread_1.py
#import spam import filter_lta #List of all directories containing valid observations VALID_FILES = filter_lta.VALID_OBS() #List of all directories for current threads to process THREAD_FILES = VALID_FILES[0:len(VALID_FILES):5] print THREAD_FILES def main(): for i in THREAD_FILES: LTA_FILES = os.chdir(...
#import spam import filter_lta import os #List of all directories containing valid observations VALID_FILES = filter_lta.VALID_OBS() #List of all directories for current threads to process THREAD_FILES = VALID_FILES[0:len(VALID_FILES):5] print 'Executing this thread' os.system('pwd') def main(): for i in THREAD...
Add code to test running thread
Add code to test running thread
Python
mit
NCRA-TIFR/gadpu,NCRA-TIFR/gadpu
#import spam import filter_lta #List of all directories containing valid observations VALID_FILES = filter_lta.VALID_OBS() #List of all directories for current threads to process THREAD_FILES = VALID_FILES[0:len(VALID_FILES):5] print THREAD_FILES def main(): for i in THREAD_FILES: LTA_FILES = os.chdir(...
#import spam import filter_lta import os #List of all directories containing valid observations VALID_FILES = filter_lta.VALID_OBS() #List of all directories for current threads to process THREAD_FILES = VALID_FILES[0:len(VALID_FILES):5] print 'Executing this thread' os.system('pwd') def main(): for i in THREAD...
<commit_before>#import spam import filter_lta #List of all directories containing valid observations VALID_FILES = filter_lta.VALID_OBS() #List of all directories for current threads to process THREAD_FILES = VALID_FILES[0:len(VALID_FILES):5] print THREAD_FILES def main(): for i in THREAD_FILES: LTA_FI...
#import spam import filter_lta import os #List of all directories containing valid observations VALID_FILES = filter_lta.VALID_OBS() #List of all directories for current threads to process THREAD_FILES = VALID_FILES[0:len(VALID_FILES):5] print 'Executing this thread' os.system('pwd') def main(): for i in THREAD...
#import spam import filter_lta #List of all directories containing valid observations VALID_FILES = filter_lta.VALID_OBS() #List of all directories for current threads to process THREAD_FILES = VALID_FILES[0:len(VALID_FILES):5] print THREAD_FILES def main(): for i in THREAD_FILES: LTA_FILES = os.chdir(...
<commit_before>#import spam import filter_lta #List of all directories containing valid observations VALID_FILES = filter_lta.VALID_OBS() #List of all directories for current threads to process THREAD_FILES = VALID_FILES[0:len(VALID_FILES):5] print THREAD_FILES def main(): for i in THREAD_FILES: LTA_FI...
bea43abce031ab70a1f4e59e5c1e4a00af37a406
fancypages/assets/forms/fields.py
fancypages/assets/forms/fields.py
from django.core import validators from django.db.models import get_model from django.forms.fields import MultiValueField, CharField, IntegerField from .widgets import AssetWidget class AssetField(MultiValueField): _delimiter = ':' widget = AssetWidget default_fields = { 'asset_pk': IntegerField,...
from django.core import validators from django.db.models import get_model from django.forms.fields import MultiValueField, CharField, IntegerField from .widgets import AssetWidget class AssetField(MultiValueField): _delimiter = ':' widget = AssetWidget pk_field_name = 'id' default_fields = { ...
Use default PK field name for Asset form field
Use default PK field name for Asset form field
Python
bsd-3-clause
socradev/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages,tangentlabs/django-fancypages
from django.core import validators from django.db.models import get_model from django.forms.fields import MultiValueField, CharField, IntegerField from .widgets import AssetWidget class AssetField(MultiValueField): _delimiter = ':' widget = AssetWidget default_fields = { 'asset_pk': IntegerField,...
from django.core import validators from django.db.models import get_model from django.forms.fields import MultiValueField, CharField, IntegerField from .widgets import AssetWidget class AssetField(MultiValueField): _delimiter = ':' widget = AssetWidget pk_field_name = 'id' default_fields = { ...
<commit_before>from django.core import validators from django.db.models import get_model from django.forms.fields import MultiValueField, CharField, IntegerField from .widgets import AssetWidget class AssetField(MultiValueField): _delimiter = ':' widget = AssetWidget default_fields = { 'asset_pk'...
from django.core import validators from django.db.models import get_model from django.forms.fields import MultiValueField, CharField, IntegerField from .widgets import AssetWidget class AssetField(MultiValueField): _delimiter = ':' widget = AssetWidget pk_field_name = 'id' default_fields = { ...
from django.core import validators from django.db.models import get_model from django.forms.fields import MultiValueField, CharField, IntegerField from .widgets import AssetWidget class AssetField(MultiValueField): _delimiter = ':' widget = AssetWidget default_fields = { 'asset_pk': IntegerField,...
<commit_before>from django.core import validators from django.db.models import get_model from django.forms.fields import MultiValueField, CharField, IntegerField from .widgets import AssetWidget class AssetField(MultiValueField): _delimiter = ':' widget = AssetWidget default_fields = { 'asset_pk'...
64d9a15f84257988b371a2d12f1137f7b9f41b02
python/009_palindrome_number.py
python/009_palindrome_number.py
""" Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could also try reversing an integer. However, if ...
""" Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could also try reversing an integer. However, if ...
Revise 009, add test cases
Revise 009, add test cases
Python
mit
ufjfeng/leetcode-jf-soln,ufjfeng/leetcode-jf-soln
""" Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could also try reversing an integer. However, if ...
""" Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could also try reversing an integer. However, if ...
<commit_before>""" Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could also try reversing an intege...
""" Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could also try reversing an integer. However, if ...
""" Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could also try reversing an integer. However, if ...
<commit_before>""" Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could also try reversing an intege...
0d84bed2f1254887c7e352a6b173b7f554dac5f7
timepiece/context_processors.py
timepiece/context_processors.py
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
Check request.user before using it
Check request.user before using it
Python
mit
josesanch/django-timepiece,josesanch/django-timepiece,dannybrowne86/django-timepiece,arbitrahj/django-timepiece,caktus/django-timepiece,gaga3966/django-timepiece,gaga3966/django-timepiece,BocuStudio/django-timepiece,dannybrowne86/django-timepiece,gaga3966/django-timepiece,josesanch/django-timepiece,dannybrowne86/django...
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
<commit_before>from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) co...
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
<commit_before>from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) co...
cb0c4b7af5efc16d1ca5da9722d9e29cae527fec
acme/utils/signals.py
acme/utils/signals.py
# 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 required by ...
# 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 required by ...
Fix pytype issue in signal handling code.
Fix pytype issue in signal handling code. PiperOrigin-RevId: 408605103 Change-Id: If724504629a50d5cb7a099cf0263ba642e95345d
Python
apache-2.0
deepmind/acme,deepmind/acme
# 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 required by ...
# 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 required by ...
<commit_before># 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 # # Unle...
# 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 required by ...
# 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 required by ...
<commit_before># 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 # # Unle...
d74fb6c7f9d0bf194b44443a13114ff1d5bb0756
scrape_PASS_FTN.py
scrape_PASS_FTN.py
""" A script to scrape all the function exports from the PASS_FTN.FOR By Ian Bell, NIST, January 2018 """ import os from generate_header import generate_interface_file, generate_function_dict if __name__=='__main__': generate_interface_file('R:/FORTRAN/PASS_FTN.FOR','REFPROP.PYF',verbose=False,python_exe='python'...
""" A script to scrape all the function exports from the PASS_FTN.FOR By Ian Bell, NIST, January 2018 """ import os from generate_header import generate_interface_file, generate_function_dict if __name__=='__main__': generate_interface_file('R:/FORTRAN/PASS_FTN.FOR','REFPROP.PYF',verbose=False,python_exe='python'...
Add a few spaces for easier copy-paste
Add a few spaces for easier copy-paste
Python
mit
CoolProp/REFPROP-headers,CoolProp/REFPROP-headers,CoolProp/REFPROP-headers,CoolProp/REFPROP-headers
""" A script to scrape all the function exports from the PASS_FTN.FOR By Ian Bell, NIST, January 2018 """ import os from generate_header import generate_interface_file, generate_function_dict if __name__=='__main__': generate_interface_file('R:/FORTRAN/PASS_FTN.FOR','REFPROP.PYF',verbose=False,python_exe='python'...
""" A script to scrape all the function exports from the PASS_FTN.FOR By Ian Bell, NIST, January 2018 """ import os from generate_header import generate_interface_file, generate_function_dict if __name__=='__main__': generate_interface_file('R:/FORTRAN/PASS_FTN.FOR','REFPROP.PYF',verbose=False,python_exe='python'...
<commit_before>""" A script to scrape all the function exports from the PASS_FTN.FOR By Ian Bell, NIST, January 2018 """ import os from generate_header import generate_interface_file, generate_function_dict if __name__=='__main__': generate_interface_file('R:/FORTRAN/PASS_FTN.FOR','REFPROP.PYF',verbose=False,pyth...
""" A script to scrape all the function exports from the PASS_FTN.FOR By Ian Bell, NIST, January 2018 """ import os from generate_header import generate_interface_file, generate_function_dict if __name__=='__main__': generate_interface_file('R:/FORTRAN/PASS_FTN.FOR','REFPROP.PYF',verbose=False,python_exe='python'...
""" A script to scrape all the function exports from the PASS_FTN.FOR By Ian Bell, NIST, January 2018 """ import os from generate_header import generate_interface_file, generate_function_dict if __name__=='__main__': generate_interface_file('R:/FORTRAN/PASS_FTN.FOR','REFPROP.PYF',verbose=False,python_exe='python'...
<commit_before>""" A script to scrape all the function exports from the PASS_FTN.FOR By Ian Bell, NIST, January 2018 """ import os from generate_header import generate_interface_file, generate_function_dict if __name__=='__main__': generate_interface_file('R:/FORTRAN/PASS_FTN.FOR','REFPROP.PYF',verbose=False,pyth...
1db5fefc1752b71bf11fbf63853f7c93bcc526f5
tests/macaroon_property_tests.py
tests/macaroon_property_tests.py
from __future__ import unicode_literals from mock import * from nose.tools import * from hypothesis import * from hypothesis.specifiers import * from six import text_type, binary_type from pymacaroons import Macaroon, Verifier ascii_text_stategy = strategy(text_type).map( lambda s: s.encode('ascii', 'ignore') )...
from __future__ import unicode_literals from mock import * from nose.tools import * from hypothesis import * from hypothesis.specifiers import * from six import text_type, binary_type from pymacaroons import Macaroon, Verifier from pymacaroons.utils import convert_to_bytes ascii_text_strategy = strategy( [sampl...
Improve strategies in property tests
Improve strategies in property tests
Python
mit
matrix-org/pymacaroons,matrix-org/pymacaroons,ecordell/pymacaroons,illicitonion/pymacaroons
from __future__ import unicode_literals from mock import * from nose.tools import * from hypothesis import * from hypothesis.specifiers import * from six import text_type, binary_type from pymacaroons import Macaroon, Verifier ascii_text_stategy = strategy(text_type).map( lambda s: s.encode('ascii', 'ignore') )...
from __future__ import unicode_literals from mock import * from nose.tools import * from hypothesis import * from hypothesis.specifiers import * from six import text_type, binary_type from pymacaroons import Macaroon, Verifier from pymacaroons.utils import convert_to_bytes ascii_text_strategy = strategy( [sampl...
<commit_before>from __future__ import unicode_literals from mock import * from nose.tools import * from hypothesis import * from hypothesis.specifiers import * from six import text_type, binary_type from pymacaroons import Macaroon, Verifier ascii_text_stategy = strategy(text_type).map( lambda s: s.encode('asci...
from __future__ import unicode_literals from mock import * from nose.tools import * from hypothesis import * from hypothesis.specifiers import * from six import text_type, binary_type from pymacaroons import Macaroon, Verifier from pymacaroons.utils import convert_to_bytes ascii_text_strategy = strategy( [sampl...
from __future__ import unicode_literals from mock import * from nose.tools import * from hypothesis import * from hypothesis.specifiers import * from six import text_type, binary_type from pymacaroons import Macaroon, Verifier ascii_text_stategy = strategy(text_type).map( lambda s: s.encode('ascii', 'ignore') )...
<commit_before>from __future__ import unicode_literals from mock import * from nose.tools import * from hypothesis import * from hypothesis.specifiers import * from six import text_type, binary_type from pymacaroons import Macaroon, Verifier ascii_text_stategy = strategy(text_type).map( lambda s: s.encode('asci...
6e8f35b83fc563c8349cb3be040c61a0588ca745
rplugin/python3/LanguageClient/logger.py
rplugin/python3/LanguageClient/logger.py
import logging logger = logging.getLogger("LanguageClient") fileHandler = logging.FileHandler(filename="/tmp/LanguageClient.log") fileHandler.setFormatter( logging.Formatter( "%(asctime)s %(levelname)-8s %(message)s", "%H:%M:%S")) logger.addHandler(fileHandler) logger.setLevel(logging.WARN)
import logging import tempfile logger = logging.getLogger("LanguageClient") with tempfile.NamedTemporaryFile( prefix="LanguageClient-", suffix=".log", delete=False) as tmp: tmpname = tmp.name fileHandler = logging.FileHandler(filename=tmpname) fileHandler.setFormatter( logging.Formatter( ...
Use tempfile lib for log file
Use tempfile lib for log file The fixed name for the log file causes issues for multiple users. The tempfile library will create temporary files that don't conflict.
Python
mit
autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/L...
import logging logger = logging.getLogger("LanguageClient") fileHandler = logging.FileHandler(filename="/tmp/LanguageClient.log") fileHandler.setFormatter( logging.Formatter( "%(asctime)s %(levelname)-8s %(message)s", "%H:%M:%S")) logger.addHandler(fileHandler) logger.setLevel(logging.WARN) Use tem...
import logging import tempfile logger = logging.getLogger("LanguageClient") with tempfile.NamedTemporaryFile( prefix="LanguageClient-", suffix=".log", delete=False) as tmp: tmpname = tmp.name fileHandler = logging.FileHandler(filename=tmpname) fileHandler.setFormatter( logging.Formatter( ...
<commit_before>import logging logger = logging.getLogger("LanguageClient") fileHandler = logging.FileHandler(filename="/tmp/LanguageClient.log") fileHandler.setFormatter( logging.Formatter( "%(asctime)s %(levelname)-8s %(message)s", "%H:%M:%S")) logger.addHandler(fileHandler) logger.setLevel(loggin...
import logging import tempfile logger = logging.getLogger("LanguageClient") with tempfile.NamedTemporaryFile( prefix="LanguageClient-", suffix=".log", delete=False) as tmp: tmpname = tmp.name fileHandler = logging.FileHandler(filename=tmpname) fileHandler.setFormatter( logging.Formatter( ...
import logging logger = logging.getLogger("LanguageClient") fileHandler = logging.FileHandler(filename="/tmp/LanguageClient.log") fileHandler.setFormatter( logging.Formatter( "%(asctime)s %(levelname)-8s %(message)s", "%H:%M:%S")) logger.addHandler(fileHandler) logger.setLevel(logging.WARN) Use tem...
<commit_before>import logging logger = logging.getLogger("LanguageClient") fileHandler = logging.FileHandler(filename="/tmp/LanguageClient.log") fileHandler.setFormatter( logging.Formatter( "%(asctime)s %(levelname)-8s %(message)s", "%H:%M:%S")) logger.addHandler(fileHandler) logger.setLevel(loggin...
1a8f67ec1eaa97aebe25d7d6625a237f8e1ce151
example/tests/integration/test_includes.py
example/tests/integration/test_includes.py
import pytest from django.core.urlresolvers import reverse from example.tests.utils import load_json pytestmark = pytest.mark.django_db def test_included_data_on_list(multiple_entries, client): response = client.get(reverse("entry-list") + '?include=comments&page_size=5') included = load_json(response.conte...
import pytest from django.core.urlresolvers import reverse from example.tests.utils import load_json pytestmark = pytest.mark.django_db def test_included_data_on_list(multiple_entries, client): response = client.get(reverse("entry-list") + '?include=comments&page_size=5') included = load_json(response.conte...
Fix for test included_data_on_list included types check
Fix for test included_data_on_list included types check
Python
bsd-2-clause
django-json-api/rest_framework_ember,scottfisk/django-rest-framework-json-api,schtibe/django-rest-framework-json-api,Instawork/django-rest-framework-json-api,martinmaillard/django-rest-framework-json-api,lukaslundgren/django-rest-framework-json-api,django-json-api/django-rest-framework-json-api,leo-naeka/django-rest-fr...
import pytest from django.core.urlresolvers import reverse from example.tests.utils import load_json pytestmark = pytest.mark.django_db def test_included_data_on_list(multiple_entries, client): response = client.get(reverse("entry-list") + '?include=comments&page_size=5') included = load_json(response.conte...
import pytest from django.core.urlresolvers import reverse from example.tests.utils import load_json pytestmark = pytest.mark.django_db def test_included_data_on_list(multiple_entries, client): response = client.get(reverse("entry-list") + '?include=comments&page_size=5') included = load_json(response.conte...
<commit_before>import pytest from django.core.urlresolvers import reverse from example.tests.utils import load_json pytestmark = pytest.mark.django_db def test_included_data_on_list(multiple_entries, client): response = client.get(reverse("entry-list") + '?include=comments&page_size=5') included = load_json...
import pytest from django.core.urlresolvers import reverse from example.tests.utils import load_json pytestmark = pytest.mark.django_db def test_included_data_on_list(multiple_entries, client): response = client.get(reverse("entry-list") + '?include=comments&page_size=5') included = load_json(response.conte...
import pytest from django.core.urlresolvers import reverse from example.tests.utils import load_json pytestmark = pytest.mark.django_db def test_included_data_on_list(multiple_entries, client): response = client.get(reverse("entry-list") + '?include=comments&page_size=5') included = load_json(response.conte...
<commit_before>import pytest from django.core.urlresolvers import reverse from example.tests.utils import load_json pytestmark = pytest.mark.django_db def test_included_data_on_list(multiple_entries, client): response = client.get(reverse("entry-list") + '?include=comments&page_size=5') included = load_json...
382b8df7a25732ee8384c02d776472a93c18a0ea
vcspull/__about__.py
vcspull/__about__.py
__title__ = 'vcspull' __package_name__ = 'vcspull' __description__ = 'synchronize your repos' __version__ = '1.2.0' __author__ = 'Tony Narlock' __github__ = 'https://github.com/vcs-python/vcspull' __pypi__ = 'https://pypi.org/project/vcspull/' __email__ = 'tony@git-pull.com' __license__ = 'MIT' __copyright__ = 'Copyrig...
__title__ = 'vcspull' __package_name__ = 'vcspull' __description__ = 'synchronize your repos' __version__ = '1.2.0' __author__ = 'Tony Narlock' __github__ = 'https://github.com/vcs-python/vcspull' __docs__ = 'https://vcspull.git-pull.com' __tracker__ = 'https://github.com/vcs-python/vcspull/issues' __pypi__ = 'https://...
Add docs / tracker to metadata
Add docs / tracker to metadata
Python
mit
tony/vcspull,tony/vcspull
__title__ = 'vcspull' __package_name__ = 'vcspull' __description__ = 'synchronize your repos' __version__ = '1.2.0' __author__ = 'Tony Narlock' __github__ = 'https://github.com/vcs-python/vcspull' __pypi__ = 'https://pypi.org/project/vcspull/' __email__ = 'tony@git-pull.com' __license__ = 'MIT' __copyright__ = 'Copyrig...
__title__ = 'vcspull' __package_name__ = 'vcspull' __description__ = 'synchronize your repos' __version__ = '1.2.0' __author__ = 'Tony Narlock' __github__ = 'https://github.com/vcs-python/vcspull' __docs__ = 'https://vcspull.git-pull.com' __tracker__ = 'https://github.com/vcs-python/vcspull/issues' __pypi__ = 'https://...
<commit_before>__title__ = 'vcspull' __package_name__ = 'vcspull' __description__ = 'synchronize your repos' __version__ = '1.2.0' __author__ = 'Tony Narlock' __github__ = 'https://github.com/vcs-python/vcspull' __pypi__ = 'https://pypi.org/project/vcspull/' __email__ = 'tony@git-pull.com' __license__ = 'MIT' __copyrig...
__title__ = 'vcspull' __package_name__ = 'vcspull' __description__ = 'synchronize your repos' __version__ = '1.2.0' __author__ = 'Tony Narlock' __github__ = 'https://github.com/vcs-python/vcspull' __docs__ = 'https://vcspull.git-pull.com' __tracker__ = 'https://github.com/vcs-python/vcspull/issues' __pypi__ = 'https://...
__title__ = 'vcspull' __package_name__ = 'vcspull' __description__ = 'synchronize your repos' __version__ = '1.2.0' __author__ = 'Tony Narlock' __github__ = 'https://github.com/vcs-python/vcspull' __pypi__ = 'https://pypi.org/project/vcspull/' __email__ = 'tony@git-pull.com' __license__ = 'MIT' __copyright__ = 'Copyrig...
<commit_before>__title__ = 'vcspull' __package_name__ = 'vcspull' __description__ = 'synchronize your repos' __version__ = '1.2.0' __author__ = 'Tony Narlock' __github__ = 'https://github.com/vcs-python/vcspull' __pypi__ = 'https://pypi.org/project/vcspull/' __email__ = 'tony@git-pull.com' __license__ = 'MIT' __copyrig...