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
427a4b50934e4c4353d98851a33352961d05d051
backend/submissions/types.py
backend/submissions/types.py
import graphene from graphene_django import DjangoObjectType from voting.types import VoteType from .models import Submission from .models import SubmissionType as ModelSubmissionType class SubmissionTypeType(DjangoObjectType): class Meta: model = ModelSubmissionType only_fields = ("id", "name")...
import graphene from graphene_django import DjangoObjectType from voting.models import Vote from voting.types import VoteType from .models import Submission from .models import SubmissionType as ModelSubmissionType class SubmissionTypeType(DjangoObjectType): class Meta: model = ModelSubmissionType ...
Add logged user vote field to SubmissionType
Add logged user vote field to SubmissionType
Python
mit
patrick91/pycon,patrick91/pycon
import graphene from graphene_django import DjangoObjectType from voting.types import VoteType from .models import Submission from .models import SubmissionType as ModelSubmissionType class SubmissionTypeType(DjangoObjectType): class Meta: model = ModelSubmissionType only_fields = ("id", "name")...
import graphene from graphene_django import DjangoObjectType from voting.models import Vote from voting.types import VoteType from .models import Submission from .models import SubmissionType as ModelSubmissionType class SubmissionTypeType(DjangoObjectType): class Meta: model = ModelSubmissionType ...
<commit_before>import graphene from graphene_django import DjangoObjectType from voting.types import VoteType from .models import Submission from .models import SubmissionType as ModelSubmissionType class SubmissionTypeType(DjangoObjectType): class Meta: model = ModelSubmissionType only_fields =...
import graphene from graphene_django import DjangoObjectType from voting.models import Vote from voting.types import VoteType from .models import Submission from .models import SubmissionType as ModelSubmissionType class SubmissionTypeType(DjangoObjectType): class Meta: model = ModelSubmissionType ...
import graphene from graphene_django import DjangoObjectType from voting.types import VoteType from .models import Submission from .models import SubmissionType as ModelSubmissionType class SubmissionTypeType(DjangoObjectType): class Meta: model = ModelSubmissionType only_fields = ("id", "name")...
<commit_before>import graphene from graphene_django import DjangoObjectType from voting.types import VoteType from .models import Submission from .models import SubmissionType as ModelSubmissionType class SubmissionTypeType(DjangoObjectType): class Meta: model = ModelSubmissionType only_fields =...
93eb8e22b823c523833538cd93dfc2bf48f80854
mpfmc/_version.py
mpfmc/_version.py
__version__ = '0.33.0-dev.12' __short_version__ = '0.33' __bcp_version__ = '1.1' __config_version__ = '4' __mpf_version_required__ = '0.33.0-dev.15' version = "MPF-MC v{} (config_version={}, BCP v{}, Requires MPF v{})".format( __version__, __config_version__, __bcp_version__, __mpf_version_required__)
__version__ = '0.50.0-dev.1' __short_version__ = '0.50' __bcp_version__ = '1.1' __config_version__ = '4' __mpf_version_required__ = '0.50.0-dev.1' version = "MPF-MC v{} (config_version={}, BCP v{}, Requires MPF v{})".format( __version__, __config_version__, __bcp_version__, __mpf_version_required__)
Change dev version to 0.50.0-dev.1
Change dev version to 0.50.0-dev.1
Python
mit
missionpinball/mpf-mc,missionpinball/mpf-mc,missionpinball/mpf-mc
__version__ = '0.33.0-dev.12' __short_version__ = '0.33' __bcp_version__ = '1.1' __config_version__ = '4' __mpf_version_required__ = '0.33.0-dev.15' version = "MPF-MC v{} (config_version={}, BCP v{}, Requires MPF v{})".format( __version__, __config_version__, __bcp_version__, __mpf_version_required__) Change dev v...
__version__ = '0.50.0-dev.1' __short_version__ = '0.50' __bcp_version__ = '1.1' __config_version__ = '4' __mpf_version_required__ = '0.50.0-dev.1' version = "MPF-MC v{} (config_version={}, BCP v{}, Requires MPF v{})".format( __version__, __config_version__, __bcp_version__, __mpf_version_required__)
<commit_before>__version__ = '0.33.0-dev.12' __short_version__ = '0.33' __bcp_version__ = '1.1' __config_version__ = '4' __mpf_version_required__ = '0.33.0-dev.15' version = "MPF-MC v{} (config_version={}, BCP v{}, Requires MPF v{})".format( __version__, __config_version__, __bcp_version__, __mpf_version_required_...
__version__ = '0.50.0-dev.1' __short_version__ = '0.50' __bcp_version__ = '1.1' __config_version__ = '4' __mpf_version_required__ = '0.50.0-dev.1' version = "MPF-MC v{} (config_version={}, BCP v{}, Requires MPF v{})".format( __version__, __config_version__, __bcp_version__, __mpf_version_required__)
__version__ = '0.33.0-dev.12' __short_version__ = '0.33' __bcp_version__ = '1.1' __config_version__ = '4' __mpf_version_required__ = '0.33.0-dev.15' version = "MPF-MC v{} (config_version={}, BCP v{}, Requires MPF v{})".format( __version__, __config_version__, __bcp_version__, __mpf_version_required__) Change dev v...
<commit_before>__version__ = '0.33.0-dev.12' __short_version__ = '0.33' __bcp_version__ = '1.1' __config_version__ = '4' __mpf_version_required__ = '0.33.0-dev.15' version = "MPF-MC v{} (config_version={}, BCP v{}, Requires MPF v{})".format( __version__, __config_version__, __bcp_version__, __mpf_version_required_...
ab7a8335bae22bae6f729fc9805810c0c8925703
isitbullshit/__init__.py
isitbullshit/__init__.py
# -*- coding: utf-8 -*- __version__ = 0, 1, 1 from .core import isitbullshit, raise_for_problem, WHATEVER # NOQA from .exceptions import ItIsBullshitError # NOQA from .testcase_mixin import IsItBullshitMixin # NOQA # silence for pyflakes assert isitbullshit assert raise_for_problem assert WHATEVER assert ItIsB...
# -*- coding: utf-8 -*- __author__ = "Sergey Arkhipov <[email protected]>" __version__ = 0, 1, 1 from .core import isitbullshit, raise_for_problem, WHATEVER # NOQA from .exceptions import ItIsBullshitError # NOQA from .testcase_mixin import IsItBullshitMixin # NOQA # silence for pyflakes assert isitbullsh...
Add myself to the module
Add myself to the module
Python
mit
9seconds/isitbullshit
# -*- coding: utf-8 -*- __version__ = 0, 1, 1 from .core import isitbullshit, raise_for_problem, WHATEVER # NOQA from .exceptions import ItIsBullshitError # NOQA from .testcase_mixin import IsItBullshitMixin # NOQA # silence for pyflakes assert isitbullshit assert raise_for_problem assert WHATEVER assert ItIsB...
# -*- coding: utf-8 -*- __author__ = "Sergey Arkhipov <[email protected]>" __version__ = 0, 1, 1 from .core import isitbullshit, raise_for_problem, WHATEVER # NOQA from .exceptions import ItIsBullshitError # NOQA from .testcase_mixin import IsItBullshitMixin # NOQA # silence for pyflakes assert isitbullsh...
<commit_before># -*- coding: utf-8 -*- __version__ = 0, 1, 1 from .core import isitbullshit, raise_for_problem, WHATEVER # NOQA from .exceptions import ItIsBullshitError # NOQA from .testcase_mixin import IsItBullshitMixin # NOQA # silence for pyflakes assert isitbullshit assert raise_for_problem assert WHATEV...
# -*- coding: utf-8 -*- __author__ = "Sergey Arkhipov <[email protected]>" __version__ = 0, 1, 1 from .core import isitbullshit, raise_for_problem, WHATEVER # NOQA from .exceptions import ItIsBullshitError # NOQA from .testcase_mixin import IsItBullshitMixin # NOQA # silence for pyflakes assert isitbullsh...
# -*- coding: utf-8 -*- __version__ = 0, 1, 1 from .core import isitbullshit, raise_for_problem, WHATEVER # NOQA from .exceptions import ItIsBullshitError # NOQA from .testcase_mixin import IsItBullshitMixin # NOQA # silence for pyflakes assert isitbullshit assert raise_for_problem assert WHATEVER assert ItIsB...
<commit_before># -*- coding: utf-8 -*- __version__ = 0, 1, 1 from .core import isitbullshit, raise_for_problem, WHATEVER # NOQA from .exceptions import ItIsBullshitError # NOQA from .testcase_mixin import IsItBullshitMixin # NOQA # silence for pyflakes assert isitbullshit assert raise_for_problem assert WHATEV...
88a6708061ccdc7d3ac4d031c48de44039937b54
frontends/etiquette_flask/etiquette_flask_entrypoint.py
frontends/etiquette_flask/etiquette_flask_entrypoint.py
''' This file is the WSGI entrypoint for remote / production use. If you are using Gunicorn, for example: gunicorn etiquette_flask_entrypoint:site --bind "0.0.0.0:PORT" --access-logfile "-" ''' import werkzeug.contrib.fixers import backend backend.site.wsgi_app = werkzeug.contrib.fixers.ProxyFix(backend.site.wsgi_ap...
''' This file is the WSGI entrypoint for remote / production use. If you are using Gunicorn, for example: gunicorn etiquette_flask_entrypoint:site --bind "0.0.0.0:PORT" --access-logfile "-" ''' import werkzeug.middleware.proxy_fix import backend backend.site.wsgi_app = werkzeug.middleware.proxy_fix.ProxyFix(backend....
Replace werkzeug.contrib with werkzeug.middleware proxyfix.
Replace werkzeug.contrib with werkzeug.middleware proxyfix. werkzeug.contrib has been deprecated, this is the new location of the proxyfix.
Python
bsd-3-clause
voussoir/etiquette,voussoir/etiquette,voussoir/etiquette
''' This file is the WSGI entrypoint for remote / production use. If you are using Gunicorn, for example: gunicorn etiquette_flask_entrypoint:site --bind "0.0.0.0:PORT" --access-logfile "-" ''' import werkzeug.contrib.fixers import backend backend.site.wsgi_app = werkzeug.contrib.fixers.ProxyFix(backend.site.wsgi_ap...
''' This file is the WSGI entrypoint for remote / production use. If you are using Gunicorn, for example: gunicorn etiquette_flask_entrypoint:site --bind "0.0.0.0:PORT" --access-logfile "-" ''' import werkzeug.middleware.proxy_fix import backend backend.site.wsgi_app = werkzeug.middleware.proxy_fix.ProxyFix(backend....
<commit_before>''' This file is the WSGI entrypoint for remote / production use. If you are using Gunicorn, for example: gunicorn etiquette_flask_entrypoint:site --bind "0.0.0.0:PORT" --access-logfile "-" ''' import werkzeug.contrib.fixers import backend backend.site.wsgi_app = werkzeug.contrib.fixers.ProxyFix(backe...
''' This file is the WSGI entrypoint for remote / production use. If you are using Gunicorn, for example: gunicorn etiquette_flask_entrypoint:site --bind "0.0.0.0:PORT" --access-logfile "-" ''' import werkzeug.middleware.proxy_fix import backend backend.site.wsgi_app = werkzeug.middleware.proxy_fix.ProxyFix(backend....
''' This file is the WSGI entrypoint for remote / production use. If you are using Gunicorn, for example: gunicorn etiquette_flask_entrypoint:site --bind "0.0.0.0:PORT" --access-logfile "-" ''' import werkzeug.contrib.fixers import backend backend.site.wsgi_app = werkzeug.contrib.fixers.ProxyFix(backend.site.wsgi_ap...
<commit_before>''' This file is the WSGI entrypoint for remote / production use. If you are using Gunicorn, for example: gunicorn etiquette_flask_entrypoint:site --bind "0.0.0.0:PORT" --access-logfile "-" ''' import werkzeug.contrib.fixers import backend backend.site.wsgi_app = werkzeug.contrib.fixers.ProxyFix(backe...
1b8afd8a7bbc832e1394cbca29624e24d5e7d062
data_structures/linked_list.py
data_structures/linked_list.py
class Node(object): def __init__(self, val=None, pointer=None): self.val = val self.pointer = pointer class LinkedList(object): def __init__(self, values=None, head=None): self.head = head self.length = 0 def size(self): pass def search(self): pass def display(self)...
Add basic structure and methods for linked list
Add basic structure and methods for linked list
Python
mit
sjschmidt44/python_data_structures
Add basic structure and methods for linked list
class Node(object): def __init__(self, val=None, pointer=None): self.val = val self.pointer = pointer class LinkedList(object): def __init__(self, values=None, head=None): self.head = head self.length = 0 def size(self): pass def search(self): pass def display(self)...
<commit_before><commit_msg>Add basic structure and methods for linked list<commit_after>
class Node(object): def __init__(self, val=None, pointer=None): self.val = val self.pointer = pointer class LinkedList(object): def __init__(self, values=None, head=None): self.head = head self.length = 0 def size(self): pass def search(self): pass def display(self)...
Add basic structure and methods for linked listclass Node(object): def __init__(self, val=None, pointer=None): self.val = val self.pointer = pointer class LinkedList(object): def __init__(self, values=None, head=None): self.head = head self.length = 0 def size(self): pass...
<commit_before><commit_msg>Add basic structure and methods for linked list<commit_after>class Node(object): def __init__(self, val=None, pointer=None): self.val = val self.pointer = pointer class LinkedList(object): def __init__(self, values=None, head=None): self.head = head s...
601962d1a34a00c79b0e56b302a17b5673eb8168
etcd3/__init__.py
etcd3/__init__.py
from __future__ import absolute_import import etcd3.etcdrpc as etcdrpc from etcd3.client import Etcd3Client from etcd3.client import Transactions from etcd3.client import client from etcd3.leases import Lease from etcd3.locks import Lock from etcd3.members import Member __author__ = 'Louis Taylor' __email__ = 'louis@...
from __future__ import absolute_import import etcd3.etcdrpc as etcdrpc from etcd3.client import Etcd3Client from etcd3.client import Transactions from etcd3.client import client from etcd3.leases import Lease from etcd3.locks import Lock from etcd3.members import Member __author__ = 'Louis Taylor' __email__ = 'louis@...
Reorder '__all__' entries to respect import order
Reorder '__all__' entries to respect import order
Python
apache-2.0
kragniz/python-etcd3
from __future__ import absolute_import import etcd3.etcdrpc as etcdrpc from etcd3.client import Etcd3Client from etcd3.client import Transactions from etcd3.client import client from etcd3.leases import Lease from etcd3.locks import Lock from etcd3.members import Member __author__ = 'Louis Taylor' __email__ = 'louis@...
from __future__ import absolute_import import etcd3.etcdrpc as etcdrpc from etcd3.client import Etcd3Client from etcd3.client import Transactions from etcd3.client import client from etcd3.leases import Lease from etcd3.locks import Lock from etcd3.members import Member __author__ = 'Louis Taylor' __email__ = 'louis@...
<commit_before>from __future__ import absolute_import import etcd3.etcdrpc as etcdrpc from etcd3.client import Etcd3Client from etcd3.client import Transactions from etcd3.client import client from etcd3.leases import Lease from etcd3.locks import Lock from etcd3.members import Member __author__ = 'Louis Taylor' __em...
from __future__ import absolute_import import etcd3.etcdrpc as etcdrpc from etcd3.client import Etcd3Client from etcd3.client import Transactions from etcd3.client import client from etcd3.leases import Lease from etcd3.locks import Lock from etcd3.members import Member __author__ = 'Louis Taylor' __email__ = 'louis@...
from __future__ import absolute_import import etcd3.etcdrpc as etcdrpc from etcd3.client import Etcd3Client from etcd3.client import Transactions from etcd3.client import client from etcd3.leases import Lease from etcd3.locks import Lock from etcd3.members import Member __author__ = 'Louis Taylor' __email__ = 'louis@...
<commit_before>from __future__ import absolute_import import etcd3.etcdrpc as etcdrpc from etcd3.client import Etcd3Client from etcd3.client import Transactions from etcd3.client import client from etcd3.leases import Lease from etcd3.locks import Lock from etcd3.members import Member __author__ = 'Louis Taylor' __em...
ee441c445bf8a9401af045993ed4bd5c65db9eff
garnish/utils.py
garnish/utils.py
import sys def fill_template(temp, args, longname, filename, url): """ Takes a template string (temp) and replaces all template keywords with information from commandline arguments. """ temp = temp.replace('OWNER_NAME', args.copyright_holder) temp = temp.replace('COPYRIGHT_YEAR', args.year) ...
import sys import textwrap def fill_template(temp, args, longname, filename, url): """ Takes a template string (temp) and replaces all template keywords with information from commandline arguments. """ temp = temp.replace('OWNER_NAME', args.copyright_holder) temp = temp.replace('COPYRIGHT_YEAR'...
Add function that extends textwrap.wrap to multi-paragraph inputs.
Add function that extends textwrap.wrap to multi-paragraph inputs.
Python
mit
radicalbiscuit/garnish
import sys def fill_template(temp, args, longname, filename, url): """ Takes a template string (temp) and replaces all template keywords with information from commandline arguments. """ temp = temp.replace('OWNER_NAME', args.copyright_holder) temp = temp.replace('COPYRIGHT_YEAR', args.year) ...
import sys import textwrap def fill_template(temp, args, longname, filename, url): """ Takes a template string (temp) and replaces all template keywords with information from commandline arguments. """ temp = temp.replace('OWNER_NAME', args.copyright_holder) temp = temp.replace('COPYRIGHT_YEAR'...
<commit_before>import sys def fill_template(temp, args, longname, filename, url): """ Takes a template string (temp) and replaces all template keywords with information from commandline arguments. """ temp = temp.replace('OWNER_NAME', args.copyright_holder) temp = temp.replace('COPYRIGHT_YEAR',...
import sys import textwrap def fill_template(temp, args, longname, filename, url): """ Takes a template string (temp) and replaces all template keywords with information from commandline arguments. """ temp = temp.replace('OWNER_NAME', args.copyright_holder) temp = temp.replace('COPYRIGHT_YEAR'...
import sys def fill_template(temp, args, longname, filename, url): """ Takes a template string (temp) and replaces all template keywords with information from commandline arguments. """ temp = temp.replace('OWNER_NAME', args.copyright_holder) temp = temp.replace('COPYRIGHT_YEAR', args.year) ...
<commit_before>import sys def fill_template(temp, args, longname, filename, url): """ Takes a template string (temp) and replaces all template keywords with information from commandline arguments. """ temp = temp.replace('OWNER_NAME', args.copyright_holder) temp = temp.replace('COPYRIGHT_YEAR',...
dca788c815fb4375258f7ec0ec85af1c86aab70d
datastore/tasks.py
datastore/tasks.py
from __future__ import absolute_import import logging import traceback from celery import shared_task from celery.utils.log import get_task_logger from datastore.models import ProjectRun logger = get_task_logger(__name__) @shared_task def execute_project_run(project_run_pk): try: project_run = Projec...
from __future__ import absolute_import import logging import traceback from celery import shared_task from celery.utils.log import get_task_logger from datastore.models import ProjectRun logger = get_task_logger(__name__) @shared_task def execute_project_run(project_run_pk): try: project_run = Projec...
Add project run to project result.
Add project run to project result.
Python
mit
impactlab/oeem-energy-datastore,impactlab/oeem-energy-datastore,impactlab/oeem-energy-datastore
from __future__ import absolute_import import logging import traceback from celery import shared_task from celery.utils.log import get_task_logger from datastore.models import ProjectRun logger = get_task_logger(__name__) @shared_task def execute_project_run(project_run_pk): try: project_run = Projec...
from __future__ import absolute_import import logging import traceback from celery import shared_task from celery.utils.log import get_task_logger from datastore.models import ProjectRun logger = get_task_logger(__name__) @shared_task def execute_project_run(project_run_pk): try: project_run = Projec...
<commit_before>from __future__ import absolute_import import logging import traceback from celery import shared_task from celery.utils.log import get_task_logger from datastore.models import ProjectRun logger = get_task_logger(__name__) @shared_task def execute_project_run(project_run_pk): try: proje...
from __future__ import absolute_import import logging import traceback from celery import shared_task from celery.utils.log import get_task_logger from datastore.models import ProjectRun logger = get_task_logger(__name__) @shared_task def execute_project_run(project_run_pk): try: project_run = Projec...
from __future__ import absolute_import import logging import traceback from celery import shared_task from celery.utils.log import get_task_logger from datastore.models import ProjectRun logger = get_task_logger(__name__) @shared_task def execute_project_run(project_run_pk): try: project_run = Projec...
<commit_before>from __future__ import absolute_import import logging import traceback from celery import shared_task from celery.utils.log import get_task_logger from datastore.models import ProjectRun logger = get_task_logger(__name__) @shared_task def execute_project_run(project_run_pk): try: proje...
98ba04f92d5f95c363bf89c0bb937463a6f95eab
tests/test_main.py
tests/test_main.py
import asyncio import sys import pytest pytestmark = pytest.mark.asyncio() async def test_command_line_send(smtpd_server, hostname, port): proc = await asyncio.create_subprocess_exec( sys.executable, b"-m", b"aiosmtplib", stdin=asyncio.subprocess.PIPE, stdout=asyncio.sub...
import asyncio import sys import pytest pytestmark = pytest.mark.asyncio() async def test_command_line_send(smtpd_server, hostname, port): proc = await asyncio.create_subprocess_exec( sys.executable, b"-m", b"aiosmtplib", stdin=asyncio.subprocess.PIPE, stdout=asyncio.sub...
Fix deadlock in subprocess pipes
Fix deadlock in subprocess pipes
Python
mit
cole/aiosmtplib
import asyncio import sys import pytest pytestmark = pytest.mark.asyncio() async def test_command_line_send(smtpd_server, hostname, port): proc = await asyncio.create_subprocess_exec( sys.executable, b"-m", b"aiosmtplib", stdin=asyncio.subprocess.PIPE, stdout=asyncio.sub...
import asyncio import sys import pytest pytestmark = pytest.mark.asyncio() async def test_command_line_send(smtpd_server, hostname, port): proc = await asyncio.create_subprocess_exec( sys.executable, b"-m", b"aiosmtplib", stdin=asyncio.subprocess.PIPE, stdout=asyncio.sub...
<commit_before>import asyncio import sys import pytest pytestmark = pytest.mark.asyncio() async def test_command_line_send(smtpd_server, hostname, port): proc = await asyncio.create_subprocess_exec( sys.executable, b"-m", b"aiosmtplib", stdin=asyncio.subprocess.PIPE, std...
import asyncio import sys import pytest pytestmark = pytest.mark.asyncio() async def test_command_line_send(smtpd_server, hostname, port): proc = await asyncio.create_subprocess_exec( sys.executable, b"-m", b"aiosmtplib", stdin=asyncio.subprocess.PIPE, stdout=asyncio.sub...
import asyncio import sys import pytest pytestmark = pytest.mark.asyncio() async def test_command_line_send(smtpd_server, hostname, port): proc = await asyncio.create_subprocess_exec( sys.executable, b"-m", b"aiosmtplib", stdin=asyncio.subprocess.PIPE, stdout=asyncio.sub...
<commit_before>import asyncio import sys import pytest pytestmark = pytest.mark.asyncio() async def test_command_line_send(smtpd_server, hostname, port): proc = await asyncio.create_subprocess_exec( sys.executable, b"-m", b"aiosmtplib", stdin=asyncio.subprocess.PIPE, std...
659321fafc7379f32f45f86eb4c366de884cce35
tests/test_ping.py
tests/test_ping.py
from rohrpost.handlers import handle_ping def test_ping(message): handle_ping(message, request={'id': 123}) assert message.reply_channel.closed is False assert len(message.reply_channel.data) == 1 data = message.reply_channel.data[-1] assert data['id'] == 123 assert data['type'] == 'pong' ...
from rohrpost.handlers import handle_ping def test_ping(message): handle_ping(message, request={'id': 123}) assert message.reply_channel.closed is False assert len(message.reply_channel.data) == 1 data = message.reply_channel.data[-1] assert data['id'] == 123 assert data['type'] == 'pong' ...
Add a failing test that demonstrates wrong handling of data
[tests] Add a failing test that demonstrates wrong handling of data The ping handler adds the data directly to the response_kwargs, allowing internal kwargs to be overwritten. `send_message()` and `build_message()` should not accept `**additional_data`, but `additional_data: dict = None` instead.
Python
mit
axsemantics/rohrpost,axsemantics/rohrpost
from rohrpost.handlers import handle_ping def test_ping(message): handle_ping(message, request={'id': 123}) assert message.reply_channel.closed is False assert len(message.reply_channel.data) == 1 data = message.reply_channel.data[-1] assert data['id'] == 123 assert data['type'] == 'pong' ...
from rohrpost.handlers import handle_ping def test_ping(message): handle_ping(message, request={'id': 123}) assert message.reply_channel.closed is False assert len(message.reply_channel.data) == 1 data = message.reply_channel.data[-1] assert data['id'] == 123 assert data['type'] == 'pong' ...
<commit_before>from rohrpost.handlers import handle_ping def test_ping(message): handle_ping(message, request={'id': 123}) assert message.reply_channel.closed is False assert len(message.reply_channel.data) == 1 data = message.reply_channel.data[-1] assert data['id'] == 123 assert data['type'...
from rohrpost.handlers import handle_ping def test_ping(message): handle_ping(message, request={'id': 123}) assert message.reply_channel.closed is False assert len(message.reply_channel.data) == 1 data = message.reply_channel.data[-1] assert data['id'] == 123 assert data['type'] == 'pong' ...
from rohrpost.handlers import handle_ping def test_ping(message): handle_ping(message, request={'id': 123}) assert message.reply_channel.closed is False assert len(message.reply_channel.data) == 1 data = message.reply_channel.data[-1] assert data['id'] == 123 assert data['type'] == 'pong' ...
<commit_before>from rohrpost.handlers import handle_ping def test_ping(message): handle_ping(message, request={'id': 123}) assert message.reply_channel.closed is False assert len(message.reply_channel.data) == 1 data = message.reply_channel.data[-1] assert data['id'] == 123 assert data['type'...
8830e4e86a9b9e807017a55da5c4faab76e01b69
tests/test_util.py
tests/test_util.py
from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class TestGrouper(objec...
import pytest from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 def t...
Cover unknown time format case
Cover unknown time format case
Python
mit
CodersOfTheNight/verata
from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class TestGrouper(objec...
import pytest from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 def t...
<commit_before>from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class Te...
import pytest from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 def t...
from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class TestGrouper(objec...
<commit_before>from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class Te...
8dc7035d10f648489bbdfd3087a65f0355e1a72c
tests/test_mapping.py
tests/test_mapping.py
from unittest import TestCase from prudent.mapping import Mapping class MappingTest(TestCase): def setUp(self): self.mapping = Mapping([(1, 2), (2, 3), (3, 4)]) def test_iter(self): keys = [1, 2, 3] for _ in range(2): assert list(self.mapping) == keys def test_contain...
from unittest import TestCase from prudent.mapping import Mapping class MappingTest(TestCase): def setUp(self): self.mapping = Mapping([(1, 2), (2, 3), (3, 4)]) def test_iter_preserves_keys(self): keys = [1, 2, 3] for _ in range(2): assert list(self.mapping) == keys d...
Use a more descriptive test case name
Use a more descriptive test case name
Python
mit
eugene-eeo/prudent
from unittest import TestCase from prudent.mapping import Mapping class MappingTest(TestCase): def setUp(self): self.mapping = Mapping([(1, 2), (2, 3), (3, 4)]) def test_iter(self): keys = [1, 2, 3] for _ in range(2): assert list(self.mapping) == keys def test_contain...
from unittest import TestCase from prudent.mapping import Mapping class MappingTest(TestCase): def setUp(self): self.mapping = Mapping([(1, 2), (2, 3), (3, 4)]) def test_iter_preserves_keys(self): keys = [1, 2, 3] for _ in range(2): assert list(self.mapping) == keys d...
<commit_before>from unittest import TestCase from prudent.mapping import Mapping class MappingTest(TestCase): def setUp(self): self.mapping = Mapping([(1, 2), (2, 3), (3, 4)]) def test_iter(self): keys = [1, 2, 3] for _ in range(2): assert list(self.mapping) == keys d...
from unittest import TestCase from prudent.mapping import Mapping class MappingTest(TestCase): def setUp(self): self.mapping = Mapping([(1, 2), (2, 3), (3, 4)]) def test_iter_preserves_keys(self): keys = [1, 2, 3] for _ in range(2): assert list(self.mapping) == keys d...
from unittest import TestCase from prudent.mapping import Mapping class MappingTest(TestCase): def setUp(self): self.mapping = Mapping([(1, 2), (2, 3), (3, 4)]) def test_iter(self): keys = [1, 2, 3] for _ in range(2): assert list(self.mapping) == keys def test_contain...
<commit_before>from unittest import TestCase from prudent.mapping import Mapping class MappingTest(TestCase): def setUp(self): self.mapping = Mapping([(1, 2), (2, 3), (3, 4)]) def test_iter(self): keys = [1, 2, 3] for _ in range(2): assert list(self.mapping) == keys d...
6848eb77af8dc274f881e5895e541923f34e5354
elections/admin.py
elections/admin.py
from django.contrib import admin from .models import (Election, VacantPosition, Candidature, Vote) @admin.register(Election) class ElectionAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} class Media: js = ('tinymce/tinymce.min.js', 'js/tinymce_4_config.js') @admin.register(Candida...
from django.contrib import admin from .models import (Election, VacantPosition, Candidature, Vote) class VacantPositionInline(admin.StackedInline): model = VacantPosition extra = 0 @admin.register(Election) class ElectionAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} inlines = [Va...
Move VacantPosition to Election as an inline. Remove Vote.
Move VacantPosition to Election as an inline. Remove Vote.
Python
mit
QSchulz/sportassociation,QSchulz/sportassociation,QSchulz/sportassociation
from django.contrib import admin from .models import (Election, VacantPosition, Candidature, Vote) @admin.register(Election) class ElectionAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} class Media: js = ('tinymce/tinymce.min.js', 'js/tinymce_4_config.js') @admin.register(Candida...
from django.contrib import admin from .models import (Election, VacantPosition, Candidature, Vote) class VacantPositionInline(admin.StackedInline): model = VacantPosition extra = 0 @admin.register(Election) class ElectionAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} inlines = [Va...
<commit_before>from django.contrib import admin from .models import (Election, VacantPosition, Candidature, Vote) @admin.register(Election) class ElectionAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} class Media: js = ('tinymce/tinymce.min.js', 'js/tinymce_4_config.js') @admin.r...
from django.contrib import admin from .models import (Election, VacantPosition, Candidature, Vote) class VacantPositionInline(admin.StackedInline): model = VacantPosition extra = 0 @admin.register(Election) class ElectionAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} inlines = [Va...
from django.contrib import admin from .models import (Election, VacantPosition, Candidature, Vote) @admin.register(Election) class ElectionAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} class Media: js = ('tinymce/tinymce.min.js', 'js/tinymce_4_config.js') @admin.register(Candida...
<commit_before>from django.contrib import admin from .models import (Election, VacantPosition, Candidature, Vote) @admin.register(Election) class ElectionAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} class Media: js = ('tinymce/tinymce.min.js', 'js/tinymce_4_config.js') @admin.r...
69b33f8f87b6dfc0fbaf96eca25c02535c9e09e7
src/test/almost_equal.py
src/test/almost_equal.py
def datetime_almost_equal(datetime1, datetime2, seconds=60): dd = datetime1 - datetime2 sd = (dd.days * 24 * 60 * 60) + dd.seconds return abs(sd) <= seconds
from datetime import datetime import pytz def datetime_almost_equal(datetime1:datetime, datetime2:datetime, seconds:int=60): if not(datetime1.tzinfo): datetime1 = pytz.utc.localize(datetime1) datetime1 = datetime1.astimezone(pytz.utc) if not(datetime2.tzinfo): datetime2 = pytz.utc.localiz...
Make sure all datetimes are UTC
Make sure all datetimes are UTC
Python
apache-2.0
sffjunkie/astral,sffjunkie/astral
def datetime_almost_equal(datetime1, datetime2, seconds=60): dd = datetime1 - datetime2 sd = (dd.days * 24 * 60 * 60) + dd.seconds return abs(sd) <= seconds Make sure all datetimes are UTC
from datetime import datetime import pytz def datetime_almost_equal(datetime1:datetime, datetime2:datetime, seconds:int=60): if not(datetime1.tzinfo): datetime1 = pytz.utc.localize(datetime1) datetime1 = datetime1.astimezone(pytz.utc) if not(datetime2.tzinfo): datetime2 = pytz.utc.localiz...
<commit_before>def datetime_almost_equal(datetime1, datetime2, seconds=60): dd = datetime1 - datetime2 sd = (dd.days * 24 * 60 * 60) + dd.seconds return abs(sd) <= seconds <commit_msg>Make sure all datetimes are UTC<commit_after>
from datetime import datetime import pytz def datetime_almost_equal(datetime1:datetime, datetime2:datetime, seconds:int=60): if not(datetime1.tzinfo): datetime1 = pytz.utc.localize(datetime1) datetime1 = datetime1.astimezone(pytz.utc) if not(datetime2.tzinfo): datetime2 = pytz.utc.localiz...
def datetime_almost_equal(datetime1, datetime2, seconds=60): dd = datetime1 - datetime2 sd = (dd.days * 24 * 60 * 60) + dd.seconds return abs(sd) <= seconds Make sure all datetimes are UTCfrom datetime import datetime import pytz def datetime_almost_equal(datetime1:datetime, datetime2:datetime, seconds:in...
<commit_before>def datetime_almost_equal(datetime1, datetime2, seconds=60): dd = datetime1 - datetime2 sd = (dd.days * 24 * 60 * 60) + dd.seconds return abs(sd) <= seconds <commit_msg>Make sure all datetimes are UTC<commit_after>from datetime import datetime import pytz def datetime_almost_equal(datetime1...
0f593824cae8d0ae3a888194184362493222628e
jsonsempai.py
jsonsempai.py
import imp import json import os import sys class Dot(dict): def __init__(self, d): super(dict, self).__init__() for k, v in iter(d.items()): if isinstance(v, dict): self[k] = Dot(v) else: self[k] = v def __getattr__(self, attr): ...
import imp import json import os import sys class Dot(dict): def __init__(self, d): super(dict, self).__init__() for k, v in iter(d.items()): if isinstance(v, dict): self[k] = Dot(v) else: self[k] = v def __getattr__(self, attr): ...
Fix python 2.6 default string formatting
Fix python 2.6 default string formatting
Python
mit
kragniz/json-sempai
import imp import json import os import sys class Dot(dict): def __init__(self, d): super(dict, self).__init__() for k, v in iter(d.items()): if isinstance(v, dict): self[k] = Dot(v) else: self[k] = v def __getattr__(self, attr): ...
import imp import json import os import sys class Dot(dict): def __init__(self, d): super(dict, self).__init__() for k, v in iter(d.items()): if isinstance(v, dict): self[k] = Dot(v) else: self[k] = v def __getattr__(self, attr): ...
<commit_before>import imp import json import os import sys class Dot(dict): def __init__(self, d): super(dict, self).__init__() for k, v in iter(d.items()): if isinstance(v, dict): self[k] = Dot(v) else: self[k] = v def __getattr__(self...
import imp import json import os import sys class Dot(dict): def __init__(self, d): super(dict, self).__init__() for k, v in iter(d.items()): if isinstance(v, dict): self[k] = Dot(v) else: self[k] = v def __getattr__(self, attr): ...
import imp import json import os import sys class Dot(dict): def __init__(self, d): super(dict, self).__init__() for k, v in iter(d.items()): if isinstance(v, dict): self[k] = Dot(v) else: self[k] = v def __getattr__(self, attr): ...
<commit_before>import imp import json import os import sys class Dot(dict): def __init__(self, d): super(dict, self).__init__() for k, v in iter(d.items()): if isinstance(v, dict): self[k] = Dot(v) else: self[k] = v def __getattr__(self...
0c63a45755eb492192207dcf0561231183634869
internal/util.py
internal/util.py
__author__ = 'Gareth Coles' import logging import sys logging.basicConfig( format="%(asctime)s | %(levelname)8s | %(message)s", datefmt="%d %b %Y - %H:%M:%S", level=(logging.DEBUG if "--debug" in sys.argv else logging.INFO)) def log(message, level=logging.INFO): logging.log(level, message) def log...
__author__ = 'Gareth Coles' import logging import sys logging.basicConfig( format="%(asctime)s | %(levelname)8s | %(message)s", datefmt="%d %b %Y - %H:%M:%S") logger = logging.getLogger("Web") logger.setLevel(logging.DEBUG if "--debug" in sys.argv else logging.INFO) def log(message, level=logging.INFO): ...
Cut down on logging spam from dict2xml :U
Cut down on logging spam from dict2xml :U
Python
artistic-2.0
Statik-Metrics/Statik-API
__author__ = 'Gareth Coles' import logging import sys logging.basicConfig( format="%(asctime)s | %(levelname)8s | %(message)s", datefmt="%d %b %Y - %H:%M:%S", level=(logging.DEBUG if "--debug" in sys.argv else logging.INFO)) def log(message, level=logging.INFO): logging.log(level, message) def log...
__author__ = 'Gareth Coles' import logging import sys logging.basicConfig( format="%(asctime)s | %(levelname)8s | %(message)s", datefmt="%d %b %Y - %H:%M:%S") logger = logging.getLogger("Web") logger.setLevel(logging.DEBUG if "--debug" in sys.argv else logging.INFO) def log(message, level=logging.INFO): ...
<commit_before>__author__ = 'Gareth Coles' import logging import sys logging.basicConfig( format="%(asctime)s | %(levelname)8s | %(message)s", datefmt="%d %b %Y - %H:%M:%S", level=(logging.DEBUG if "--debug" in sys.argv else logging.INFO)) def log(message, level=logging.INFO): logging.log(level, mes...
__author__ = 'Gareth Coles' import logging import sys logging.basicConfig( format="%(asctime)s | %(levelname)8s | %(message)s", datefmt="%d %b %Y - %H:%M:%S") logger = logging.getLogger("Web") logger.setLevel(logging.DEBUG if "--debug" in sys.argv else logging.INFO) def log(message, level=logging.INFO): ...
__author__ = 'Gareth Coles' import logging import sys logging.basicConfig( format="%(asctime)s | %(levelname)8s | %(message)s", datefmt="%d %b %Y - %H:%M:%S", level=(logging.DEBUG if "--debug" in sys.argv else logging.INFO)) def log(message, level=logging.INFO): logging.log(level, message) def log...
<commit_before>__author__ = 'Gareth Coles' import logging import sys logging.basicConfig( format="%(asctime)s | %(levelname)8s | %(message)s", datefmt="%d %b %Y - %H:%M:%S", level=(logging.DEBUG if "--debug" in sys.argv else logging.INFO)) def log(message, level=logging.INFO): logging.log(level, mes...
088f3dfe9bee2b7004bfdf51a6ce224783245c4e
chess/simplemove/movediff.py
chess/simplemove/movediff.py
import re,sys def main(argv): for line in sys.stdin: piece,from_location,to_location = line.split("\t") from_location = from_location.split(",") to_location = to_location.split(",") print "%s\t%s\t%s" % (piece, int(to_location[0])-int(from_location[0]), int(to_location[1]) - int(from_location[1]) ) if __n...
import re,sys def main(argv): for line in sys.stdin: piece,from_location,to_location = line.split("\t") from_location = from_location.split(",") to_location = to_location.split(",") print "%s\t%s\t%s" % (piece, int(to_location[1])-int(from_location[1]), int(to_location[0]) - int(from_location[0]) ) if...
Change order of diff to be x,y instead of y,x
Change order of diff to be x,y instead of y,x
Python
apache-2.0
nivm/learningchess,nivm/learningchess
import re,sys def main(argv): for line in sys.stdin: piece,from_location,to_location = line.split("\t") from_location = from_location.split(",") to_location = to_location.split(",") print "%s\t%s\t%s" % (piece, int(to_location[0])-int(from_location[0]), int(to_location[1]) - int(from_location[1]) ) if __n...
import re,sys def main(argv): for line in sys.stdin: piece,from_location,to_location = line.split("\t") from_location = from_location.split(",") to_location = to_location.split(",") print "%s\t%s\t%s" % (piece, int(to_location[1])-int(from_location[1]), int(to_location[0]) - int(from_location[0]) ) if...
<commit_before>import re,sys def main(argv): for line in sys.stdin: piece,from_location,to_location = line.split("\t") from_location = from_location.split(",") to_location = to_location.split(",") print "%s\t%s\t%s" % (piece, int(to_location[0])-int(from_location[0]), int(to_location[1]) - int(from_location[...
import re,sys def main(argv): for line in sys.stdin: piece,from_location,to_location = line.split("\t") from_location = from_location.split(",") to_location = to_location.split(",") print "%s\t%s\t%s" % (piece, int(to_location[1])-int(from_location[1]), int(to_location[0]) - int(from_location[0]) ) if...
import re,sys def main(argv): for line in sys.stdin: piece,from_location,to_location = line.split("\t") from_location = from_location.split(",") to_location = to_location.split(",") print "%s\t%s\t%s" % (piece, int(to_location[0])-int(from_location[0]), int(to_location[1]) - int(from_location[1]) ) if __n...
<commit_before>import re,sys def main(argv): for line in sys.stdin: piece,from_location,to_location = line.split("\t") from_location = from_location.split(",") to_location = to_location.split(",") print "%s\t%s\t%s" % (piece, int(to_location[0])-int(from_location[0]), int(to_location[1]) - int(from_location[...
f4e5f0587c1214433de46fc5d86e77d849fdddc4
src/robot/utils/robotio.py
src/robot/utils/robotio.py
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
Replace TODO with comment explaining why it wasn't possible
Replace TODO with comment explaining why it wasn't possible
Python
apache-2.0
alexandrul-ci/robotframework,synsun/robotframework,jaloren/robotframework,snyderr/robotframework,joongh/robotframework,HelioGuilherme66/robotframework,HelioGuilherme66/robotframework,alexandrul-ci/robotframework,synsun/robotframework,synsun/robotframework,snyderr/robotframework,joongh/robotframework,synsun/robotframewo...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
<commit_before># Copyright 2008-2015 Nokia Solutions and Networks # # 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 ...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
<commit_before># Copyright 2008-2015 Nokia Solutions and Networks # # 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 ...
ffdf13c8217f3a785fe8768697b3e3da4b6ff9cb
cherrypy/py3util.py
cherrypy/py3util.py
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys def sorted(lst): newlst = list(lst) newlst.sort() return newlst def reversed(lst): newlst = list(lst) return iter(newlst[::-1])
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys try: sorted = sorted except NameError: def sorted(lst): newlst = list(lst) newlst.sort() return newlst try: reversed = reversed except NameError: def reversed(lst): newls...
Use builtin sorted, reversed if available.
Use builtin sorted, reversed if available.
Python
bsd-3-clause
cherrypy/cheroot,Safihre/cherrypy,cherrypy/cherrypy,Safihre/cherrypy,cherrypy/cherrypy
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys def sorted(lst): newlst = list(lst) newlst.sort() return newlst def reversed(lst): newlst = list(lst) return iter(newlst[::-1]) Use builtin sorted, reversed if available.
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys try: sorted = sorted except NameError: def sorted(lst): newlst = list(lst) newlst.sort() return newlst try: reversed = reversed except NameError: def reversed(lst): newls...
<commit_before>""" A simple module that helps unify the code between a python2 and python3 library. """ import sys def sorted(lst): newlst = list(lst) newlst.sort() return newlst def reversed(lst): newlst = list(lst) return iter(newlst[::-1]) <commit_msg>Use builtin sorted, reversed if available.<...
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys try: sorted = sorted except NameError: def sorted(lst): newlst = list(lst) newlst.sort() return newlst try: reversed = reversed except NameError: def reversed(lst): newls...
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys def sorted(lst): newlst = list(lst) newlst.sort() return newlst def reversed(lst): newlst = list(lst) return iter(newlst[::-1]) Use builtin sorted, reversed if available.""" A simple module that hel...
<commit_before>""" A simple module that helps unify the code between a python2 and python3 library. """ import sys def sorted(lst): newlst = list(lst) newlst.sort() return newlst def reversed(lst): newlst = list(lst) return iter(newlst[::-1]) <commit_msg>Use builtin sorted, reversed if available.<...
a978d79bf1a7c9ec9b38841c3e809bd2dc52f3c0
corehq/apps/commtrack/admin.py
corehq/apps/commtrack/admin.py
from django.contrib import admin from .models import StockState class StockStateAdmin(admin.ModelAdmin): model = StockState list_display = [ 'section_id', 'case_id', 'product_id', 'stock_on_hand', 'daily_consumption', 'last_modified_date' ] list_filter =...
from django.contrib import admin from .models import StockState class StockStateAdmin(admin.ModelAdmin): model = StockState list_display = [ 'section_id', 'case_id', 'product_id', 'stock_on_hand', 'daily_consumption', 'last_modified_date' ] list_filter =...
Use product/case id's in search rather than filter
Use product/case id's in search rather than filter
Python
bsd-3-clause
dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttar...
from django.contrib import admin from .models import StockState class StockStateAdmin(admin.ModelAdmin): model = StockState list_display = [ 'section_id', 'case_id', 'product_id', 'stock_on_hand', 'daily_consumption', 'last_modified_date' ] list_filter =...
from django.contrib import admin from .models import StockState class StockStateAdmin(admin.ModelAdmin): model = StockState list_display = [ 'section_id', 'case_id', 'product_id', 'stock_on_hand', 'daily_consumption', 'last_modified_date' ] list_filter =...
<commit_before>from django.contrib import admin from .models import StockState class StockStateAdmin(admin.ModelAdmin): model = StockState list_display = [ 'section_id', 'case_id', 'product_id', 'stock_on_hand', 'daily_consumption', 'last_modified_date' ] ...
from django.contrib import admin from .models import StockState class StockStateAdmin(admin.ModelAdmin): model = StockState list_display = [ 'section_id', 'case_id', 'product_id', 'stock_on_hand', 'daily_consumption', 'last_modified_date' ] list_filter =...
from django.contrib import admin from .models import StockState class StockStateAdmin(admin.ModelAdmin): model = StockState list_display = [ 'section_id', 'case_id', 'product_id', 'stock_on_hand', 'daily_consumption', 'last_modified_date' ] list_filter =...
<commit_before>from django.contrib import admin from .models import StockState class StockStateAdmin(admin.ModelAdmin): model = StockState list_display = [ 'section_id', 'case_id', 'product_id', 'stock_on_hand', 'daily_consumption', 'last_modified_date' ] ...
bae4f53d126ebfe61ba0e10aa8af6eb573931ec3
mysite/data_2015_fall/models.py
mysite/data_2015_fall/models.py
from neomodel import (StructuredNode, StringProperty, IntegerProperty, ArrayProperty, RelationshipTo, RelationshipFrom) # Create your models here. class Article(StructuredNode): title = StringProperty() journal = StringProperty() year = IntegerProperty() volume = IntegerProperty() authors = Re...
from neomodel import (StructuredNode, StringProperty, IntegerProperty, ArrayProperty, RelationshipTo, RelationshipFrom) # Create your models here. class Article(StructuredNode): title = StringProperty() journal = StringProperty() year = IntegerProperty() volume = StringProperty() authors = Rel...
Fix bug in class Article, volume should be string type
Fix bug in class Article, volume should be string type
Python
unlicense
cmusv-sc/DIWD-Team4-Wei-Lin-Tsai,cmusv-sc/DIWD-Team4-Wei-Lin-Tsai,cmusv-sc/DIWD-Team4-Wei-Lin-Tsai,cmusv-sc/DIWD-Team4-Wei-Lin-Tsai
from neomodel import (StructuredNode, StringProperty, IntegerProperty, ArrayProperty, RelationshipTo, RelationshipFrom) # Create your models here. class Article(StructuredNode): title = StringProperty() journal = StringProperty() year = IntegerProperty() volume = IntegerProperty() authors = Re...
from neomodel import (StructuredNode, StringProperty, IntegerProperty, ArrayProperty, RelationshipTo, RelationshipFrom) # Create your models here. class Article(StructuredNode): title = StringProperty() journal = StringProperty() year = IntegerProperty() volume = StringProperty() authors = Rel...
<commit_before>from neomodel import (StructuredNode, StringProperty, IntegerProperty, ArrayProperty, RelationshipTo, RelationshipFrom) # Create your models here. class Article(StructuredNode): title = StringProperty() journal = StringProperty() year = IntegerProperty() volume = IntegerProperty() ...
from neomodel import (StructuredNode, StringProperty, IntegerProperty, ArrayProperty, RelationshipTo, RelationshipFrom) # Create your models here. class Article(StructuredNode): title = StringProperty() journal = StringProperty() year = IntegerProperty() volume = StringProperty() authors = Rel...
from neomodel import (StructuredNode, StringProperty, IntegerProperty, ArrayProperty, RelationshipTo, RelationshipFrom) # Create your models here. class Article(StructuredNode): title = StringProperty() journal = StringProperty() year = IntegerProperty() volume = IntegerProperty() authors = Re...
<commit_before>from neomodel import (StructuredNode, StringProperty, IntegerProperty, ArrayProperty, RelationshipTo, RelationshipFrom) # Create your models here. class Article(StructuredNode): title = StringProperty() journal = StringProperty() year = IntegerProperty() volume = IntegerProperty() ...
2c2295ad42fe0c340aa8ff3046bbfe16ac784b66
csunplugged/config/__init__.py
csunplugged/config/__init__.py
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.4" __version_english__ = "2.0 Alpha 4"
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.5" __version_english__ = "2.0 Alpha 5"
Increment version number to 2.0.0-alpha.5
Increment version number to 2.0.0-alpha.5
Python
mit
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.4" __version_english__ = "2.0 Alpha 4" Increment version number to 2.0.0-alpha.5
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.5" __version_english__ = "2.0 Alpha 5"
<commit_before>"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.4" __version_english__ = "2.0 Alpha 4" <commit_msg>Increment version number to 2.0.0-alpha.5<commit_after>
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.5" __version_english__ = "2.0 Alpha 5"
"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.4" __version_english__ = "2.0 Alpha 4" Increment version number to 2.0.0-alpha.5"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.5" __version_english__ = "2.0 Alpha 5"
<commit_before>"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.4" __version_english__ = "2.0 Alpha 4" <commit_msg>Increment version number to 2.0.0-alpha.5<commit_after>"""Module for Django system configuration.""" __version__ = "2.0.0-alpha.5" __version_english__ = "2.0 Alpha 5"
1e73195e33c384605072e36ac1551bd6d67ba7cb
QGL/BasicSequences/__init__.py
QGL/BasicSequences/__init__.py
from RabiAmp import RabiAmp from Ramsey import Ramsey from FlipFlop import FlipFlop from SPAM import SPAM from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT
from RabiAmp import RabiAmp from Ramsey import Ramsey from FlipFlop import FlipFlop from SPAM import SPAM from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT from itertools import product import operator from ..PulsePrimitives import Id, X def create_cal_seqs(qubits, numCals): """ Helper function to c...
Add a helper function to create calibration sequences.
Add a helper function to create calibration sequences.
Python
apache-2.0
Plourde-Research-Lab/PyQLab,calebjordan/PyQLab,BBN-Q/PyQLab,rmcgurrin/PyQLab
from RabiAmp import RabiAmp from Ramsey import Ramsey from FlipFlop import FlipFlop from SPAM import SPAM from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBTAdd a helper function to create calibration sequences.
from RabiAmp import RabiAmp from Ramsey import Ramsey from FlipFlop import FlipFlop from SPAM import SPAM from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT from itertools import product import operator from ..PulsePrimitives import Id, X def create_cal_seqs(qubits, numCals): """ Helper function to c...
<commit_before>from RabiAmp import RabiAmp from Ramsey import Ramsey from FlipFlop import FlipFlop from SPAM import SPAM from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT<commit_msg>Add a helper function to create calibration sequences.<commit_after>
from RabiAmp import RabiAmp from Ramsey import Ramsey from FlipFlop import FlipFlop from SPAM import SPAM from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT from itertools import product import operator from ..PulsePrimitives import Id, X def create_cal_seqs(qubits, numCals): """ Helper function to c...
from RabiAmp import RabiAmp from Ramsey import Ramsey from FlipFlop import FlipFlop from SPAM import SPAM from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBTAdd a helper function to create calibration sequences.from RabiAmp import RabiAmp from Ramsey import Ramsey from FlipFlop import FlipFlop from SPAM impo...
<commit_before>from RabiAmp import RabiAmp from Ramsey import Ramsey from FlipFlop import FlipFlop from SPAM import SPAM from RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT<commit_msg>Add a helper function to create calibration sequences.<commit_after>from RabiAmp import RabiAmp from Ramsey import Ramsey fro...
519aff5c44c6801c44981b059654e598c6d8db49
second/blog/models.py
second/blog/models.py
from __future__ import unicode_literals from django.db import models # Create your models here.
from __future__ import unicode_literals from django.db import models from django.utils import timezone # Create your models here. class Post(models.Model): author = models.ForeignKey('auth.User') title = models.CharField(max_length=200) text = models.TextField() created_date = models.DateTimeField(de...
Create Post model in model.py
Create Post model in model.py
Python
mit
ugaliguy/Django-Tutorial-Projects,ugaliguy/Django-Tutorial-Projects
from __future__ import unicode_literals from django.db import models # Create your models here. Create Post model in model.py
from __future__ import unicode_literals from django.db import models from django.utils import timezone # Create your models here. class Post(models.Model): author = models.ForeignKey('auth.User') title = models.CharField(max_length=200) text = models.TextField() created_date = models.DateTimeField(de...
<commit_before>from __future__ import unicode_literals from django.db import models # Create your models here. <commit_msg>Create Post model in model.py<commit_after>
from __future__ import unicode_literals from django.db import models from django.utils import timezone # Create your models here. class Post(models.Model): author = models.ForeignKey('auth.User') title = models.CharField(max_length=200) text = models.TextField() created_date = models.DateTimeField(de...
from __future__ import unicode_literals from django.db import models # Create your models here. Create Post model in model.pyfrom __future__ import unicode_literals from django.db import models from django.utils import timezone # Create your models here. class Post(models.Model): author = models.ForeignKey('au...
<commit_before>from __future__ import unicode_literals from django.db import models # Create your models here. <commit_msg>Create Post model in model.py<commit_after>from __future__ import unicode_literals from django.db import models from django.utils import timezone # Create your models here. class Post(models.M...
f59adf7887d26c09257b16438a2d920861be3f33
eventtools/tests/_inject_app.py
eventtools/tests/_inject_app.py
from django.test import TestCase from django.conf import settings from django.db.models.loading import load_app from django.core.management import call_command from _fixture import fixture APP_NAME = 'eventtools.tests.eventtools_testapp' class TestCaseWithApp(TestCase): """Make sure to call super(..).setUp and t...
from django.db.models.loading import load_app from django.conf import settings from django.core.management import call_command from django.template.loaders import app_directories from django.template import loader from django.test import TestCase from _fixture import fixture APP_NAME = 'eventtools.tests.eventtools_te...
Disable loading templates from project templates (use only the app ones). Makes all the views tests pass when ran as part of the suite of a larger project like NFSA. (Eventually, eventtools should just use testtools, this functionality is built in there)
Disable loading templates from project templates (use only the app ones). Makes all the views tests pass when ran as part of the suite of a larger project like NFSA. (Eventually, eventtools should just use testtools, this functionality is built in there)
Python
bsd-3-clause
ixc/glamkit-eventtools,ixc/glamkit-eventtools
from django.test import TestCase from django.conf import settings from django.db.models.loading import load_app from django.core.management import call_command from _fixture import fixture APP_NAME = 'eventtools.tests.eventtools_testapp' class TestCaseWithApp(TestCase): """Make sure to call super(..).setUp and t...
from django.db.models.loading import load_app from django.conf import settings from django.core.management import call_command from django.template.loaders import app_directories from django.template import loader from django.test import TestCase from _fixture import fixture APP_NAME = 'eventtools.tests.eventtools_te...
<commit_before>from django.test import TestCase from django.conf import settings from django.db.models.loading import load_app from django.core.management import call_command from _fixture import fixture APP_NAME = 'eventtools.tests.eventtools_testapp' class TestCaseWithApp(TestCase): """Make sure to call super(...
from django.db.models.loading import load_app from django.conf import settings from django.core.management import call_command from django.template.loaders import app_directories from django.template import loader from django.test import TestCase from _fixture import fixture APP_NAME = 'eventtools.tests.eventtools_te...
from django.test import TestCase from django.conf import settings from django.db.models.loading import load_app from django.core.management import call_command from _fixture import fixture APP_NAME = 'eventtools.tests.eventtools_testapp' class TestCaseWithApp(TestCase): """Make sure to call super(..).setUp and t...
<commit_before>from django.test import TestCase from django.conf import settings from django.db.models.loading import load_app from django.core.management import call_command from _fixture import fixture APP_NAME = 'eventtools.tests.eventtools_testapp' class TestCaseWithApp(TestCase): """Make sure to call super(...
155f53100148ffd09e9e0e0f1f9de073974ea97b
osgtest/tests/test_89_condor.py
osgtest/tests/test_89_condor.py
import osgtest.library.core as core import osgtest.library.files as files import osgtest.library.service as service import osgtest.library.osgunittest as osgunittest class TestStopCondor(osgunittest.OSGTestCase): def test_01_stop_condor(self): core.skip_ok_unless_installed('condor') self.skip_ok_i...
import osgtest.library.core as core import osgtest.library.files as files import osgtest.library.service as service import osgtest.library.osgunittest as osgunittest class TestStopCondor(osgunittest.OSGTestCase): def test_01_stop_condor(self): core.skip_ok_unless_installed('condor') self.skip_ok_u...
Use skip_ok_unless instead of a comparison against 'False'
Use skip_ok_unless instead of a comparison against 'False'
Python
apache-2.0
efajardo/osg-test,efajardo/osg-test
import osgtest.library.core as core import osgtest.library.files as files import osgtest.library.service as service import osgtest.library.osgunittest as osgunittest class TestStopCondor(osgunittest.OSGTestCase): def test_01_stop_condor(self): core.skip_ok_unless_installed('condor') self.skip_ok_i...
import osgtest.library.core as core import osgtest.library.files as files import osgtest.library.service as service import osgtest.library.osgunittest as osgunittest class TestStopCondor(osgunittest.OSGTestCase): def test_01_stop_condor(self): core.skip_ok_unless_installed('condor') self.skip_ok_u...
<commit_before>import osgtest.library.core as core import osgtest.library.files as files import osgtest.library.service as service import osgtest.library.osgunittest as osgunittest class TestStopCondor(osgunittest.OSGTestCase): def test_01_stop_condor(self): core.skip_ok_unless_installed('condor') ...
import osgtest.library.core as core import osgtest.library.files as files import osgtest.library.service as service import osgtest.library.osgunittest as osgunittest class TestStopCondor(osgunittest.OSGTestCase): def test_01_stop_condor(self): core.skip_ok_unless_installed('condor') self.skip_ok_u...
import osgtest.library.core as core import osgtest.library.files as files import osgtest.library.service as service import osgtest.library.osgunittest as osgunittest class TestStopCondor(osgunittest.OSGTestCase): def test_01_stop_condor(self): core.skip_ok_unless_installed('condor') self.skip_ok_i...
<commit_before>import osgtest.library.core as core import osgtest.library.files as files import osgtest.library.service as service import osgtest.library.osgunittest as osgunittest class TestStopCondor(osgunittest.OSGTestCase): def test_01_stop_condor(self): core.skip_ok_unless_installed('condor') ...
c26a2056273fca15f0505b448709e056898ffd7d
src/targetsomstandalone.py
src/targetsomstandalone.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.vm.universe import main, Exit from rpython.rlib import jit #from rpython.rlib.debug import debug_start, debug_stop, debug_print # __________ Entry points __________ def entry_point(argv): try: main(argv) except Exit, e: ret...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.vm.universe import main, Exit from rpython.rlib import jit #from rpython.rlib.debug import debug_start, debug_stop, debug_print # __________ Entry points __________ def entry_point(argv): try: main(argv) except Exit, e: ret...
Change binary name, and encode whether it uses a JIT compiler or not
Change binary name, and encode whether it uses a JIT compiler or not Signed-off-by: Stefan Marr <[email protected]>
Python
mit
smarr/PySOM,smarr/PySOM,SOM-st/RTruffleSOM,SOM-st/RTruffleSOM,smarr/RTruffleSOM,smarr/RTruffleSOM,SOM-st/PySOM,SOM-st/RPySOM,SOM-st/PySOM,SOM-st/RPySOM
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.vm.universe import main, Exit from rpython.rlib import jit #from rpython.rlib.debug import debug_start, debug_stop, debug_print # __________ Entry points __________ def entry_point(argv): try: main(argv) except Exit, e: ret...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.vm.universe import main, Exit from rpython.rlib import jit #from rpython.rlib.debug import debug_start, debug_stop, debug_print # __________ Entry points __________ def entry_point(argv): try: main(argv) except Exit, e: ret...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.vm.universe import main, Exit from rpython.rlib import jit #from rpython.rlib.debug import debug_start, debug_stop, debug_print # __________ Entry points __________ def entry_point(argv): try: main(argv) except Exit,...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.vm.universe import main, Exit from rpython.rlib import jit #from rpython.rlib.debug import debug_start, debug_stop, debug_print # __________ Entry points __________ def entry_point(argv): try: main(argv) except Exit, e: ret...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.vm.universe import main, Exit from rpython.rlib import jit #from rpython.rlib.debug import debug_start, debug_stop, debug_print # __________ Entry points __________ def entry_point(argv): try: main(argv) except Exit, e: ret...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.vm.universe import main, Exit from rpython.rlib import jit #from rpython.rlib.debug import debug_start, debug_stop, debug_print # __________ Entry points __________ def entry_point(argv): try: main(argv) except Exit,...
73373c893c1fe8412b5a3fecc83767988b1bccdf
genshi/__init__.py
genshi/__init__.py
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2008 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2008 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
Remove pkg_resources import from top-level package, will just need to remember updating the version in two places.
Remove pkg_resources import from top-level package, will just need to remember updating the version in two places.
Python
bsd-3-clause
hodgestar/genshi,hodgestar/genshi,hodgestar/genshi,hodgestar/genshi
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2008 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2008 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
<commit_before># -*- coding: utf-8 -*- # # Copyright (C) 2006-2008 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This s...
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2008 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2008 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
<commit_before># -*- coding: utf-8 -*- # # Copyright (C) 2006-2008 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This s...
1edf69ac029bf8e35cd897fa123ad4e0943d6bc9
src/wikicurses/__init__.py
src/wikicurses/__init__.py
from enum import Enum class BitEnum(int, Enum): def __new__(cls, *args): value = 1 << len(cls.__members__) return int.__new__(cls, value) formats = BitEnum("formats", "i b blockquote")
from enum import IntEnum class formats(IntEnum): i, b, blockquote = (1<<i for i in range(3))
Remove BitEnum class, use IntEnum
Remove BitEnum class, use IntEnum
Python
mit
ids1024/wikicurses
from enum import Enum class BitEnum(int, Enum): def __new__(cls, *args): value = 1 << len(cls.__members__) return int.__new__(cls, value) formats = BitEnum("formats", "i b blockquote") Remove BitEnum class, use IntEnum
from enum import IntEnum class formats(IntEnum): i, b, blockquote = (1<<i for i in range(3))
<commit_before>from enum import Enum class BitEnum(int, Enum): def __new__(cls, *args): value = 1 << len(cls.__members__) return int.__new__(cls, value) formats = BitEnum("formats", "i b blockquote") <commit_msg>Remove BitEnum class, use IntEnum<commit_after>
from enum import IntEnum class formats(IntEnum): i, b, blockquote = (1<<i for i in range(3))
from enum import Enum class BitEnum(int, Enum): def __new__(cls, *args): value = 1 << len(cls.__members__) return int.__new__(cls, value) formats = BitEnum("formats", "i b blockquote") Remove BitEnum class, use IntEnumfrom enum import IntEnum class formats(IntEnum): i, b, blockquote = (1<<i f...
<commit_before>from enum import Enum class BitEnum(int, Enum): def __new__(cls, *args): value = 1 << len(cls.__members__) return int.__new__(cls, value) formats = BitEnum("formats", "i b blockquote") <commit_msg>Remove BitEnum class, use IntEnum<commit_after>from enum import IntEnum class formats...
96e0f2621dafd691e4560afe9b59df21aad3d2a8
taskwiki/cache.py
taskwiki/cache.py
import vim from taskwiki.task import VimwikiTask class TaskCache(object): """ A cache that holds all the tasks in the given file and prevents multiple redundant taskwarrior calls. """ def __init__(self, tw): self.cache = dict() self.tw = tw def __getitem__(self, key): ...
import copy import vim from taskwiki.task import VimwikiTask class TaskCache(object): """ A cache that holds all the tasks in the given file and prevents multiple redundant taskwarrior calls. """ def __init__(self, tw): self.uuid_cache = dict() self.cache = dict() self.tw...
Index tasks by uuid as well as line number
Cache: Index tasks by uuid as well as line number
Python
mit
phha/taskwiki,Spirotot/taskwiki
import vim from taskwiki.task import VimwikiTask class TaskCache(object): """ A cache that holds all the tasks in the given file and prevents multiple redundant taskwarrior calls. """ def __init__(self, tw): self.cache = dict() self.tw = tw def __getitem__(self, key): ...
import copy import vim from taskwiki.task import VimwikiTask class TaskCache(object): """ A cache that holds all the tasks in the given file and prevents multiple redundant taskwarrior calls. """ def __init__(self, tw): self.uuid_cache = dict() self.cache = dict() self.tw...
<commit_before>import vim from taskwiki.task import VimwikiTask class TaskCache(object): """ A cache that holds all the tasks in the given file and prevents multiple redundant taskwarrior calls. """ def __init__(self, tw): self.cache = dict() self.tw = tw def __getitem__(self...
import copy import vim from taskwiki.task import VimwikiTask class TaskCache(object): """ A cache that holds all the tasks in the given file and prevents multiple redundant taskwarrior calls. """ def __init__(self, tw): self.uuid_cache = dict() self.cache = dict() self.tw...
import vim from taskwiki.task import VimwikiTask class TaskCache(object): """ A cache that holds all the tasks in the given file and prevents multiple redundant taskwarrior calls. """ def __init__(self, tw): self.cache = dict() self.tw = tw def __getitem__(self, key): ...
<commit_before>import vim from taskwiki.task import VimwikiTask class TaskCache(object): """ A cache that holds all the tasks in the given file and prevents multiple redundant taskwarrior calls. """ def __init__(self, tw): self.cache = dict() self.tw = tw def __getitem__(self...
be1d11bcf53ecab1fbb0e69191c62c83492363d2
cmn_color_helper.py
cmn_color_helper.py
class ColorStr: _HEADER = '\033[95m' _OKBLUE = '\033[94m' _OKGREEN = '\033[92m' _WARNING = '\033[93m' _FAIL = '\033[91m' _ENDC = '\033[0m' _BOLD = '\033[1m' _UNDERLINE = '\033[4m' @staticmethod def color_fun_name(fun): return ColorStr._UNDERLINE + ColorStr._BOLD + Color...
class ColorStr: _HEADER = '\033[95m' _OKBLUE = '\033[94m' _OKGREEN = '\033[92m' _WARNING = '\033[93m' _FAIL = '\033[91m' _ENDC = '\033[0m' _BOLD = '\033[1m' _UNDERLINE = '\033[4m' @staticmethod def color_fun_name(fun): return ColorStr._HEADER + ColorStr._BOLD + fun + Co...
Change function and pkg color style.
Change function and pkg color style.
Python
mit
fanchen1988/sc-common-helper
class ColorStr: _HEADER = '\033[95m' _OKBLUE = '\033[94m' _OKGREEN = '\033[92m' _WARNING = '\033[93m' _FAIL = '\033[91m' _ENDC = '\033[0m' _BOLD = '\033[1m' _UNDERLINE = '\033[4m' @staticmethod def color_fun_name(fun): return ColorStr._UNDERLINE + ColorStr._BOLD + Color...
class ColorStr: _HEADER = '\033[95m' _OKBLUE = '\033[94m' _OKGREEN = '\033[92m' _WARNING = '\033[93m' _FAIL = '\033[91m' _ENDC = '\033[0m' _BOLD = '\033[1m' _UNDERLINE = '\033[4m' @staticmethod def color_fun_name(fun): return ColorStr._HEADER + ColorStr._BOLD + fun + Co...
<commit_before>class ColorStr: _HEADER = '\033[95m' _OKBLUE = '\033[94m' _OKGREEN = '\033[92m' _WARNING = '\033[93m' _FAIL = '\033[91m' _ENDC = '\033[0m' _BOLD = '\033[1m' _UNDERLINE = '\033[4m' @staticmethod def color_fun_name(fun): return ColorStr._UNDERLINE + ColorSt...
class ColorStr: _HEADER = '\033[95m' _OKBLUE = '\033[94m' _OKGREEN = '\033[92m' _WARNING = '\033[93m' _FAIL = '\033[91m' _ENDC = '\033[0m' _BOLD = '\033[1m' _UNDERLINE = '\033[4m' @staticmethod def color_fun_name(fun): return ColorStr._HEADER + ColorStr._BOLD + fun + Co...
class ColorStr: _HEADER = '\033[95m' _OKBLUE = '\033[94m' _OKGREEN = '\033[92m' _WARNING = '\033[93m' _FAIL = '\033[91m' _ENDC = '\033[0m' _BOLD = '\033[1m' _UNDERLINE = '\033[4m' @staticmethod def color_fun_name(fun): return ColorStr._UNDERLINE + ColorStr._BOLD + Color...
<commit_before>class ColorStr: _HEADER = '\033[95m' _OKBLUE = '\033[94m' _OKGREEN = '\033[92m' _WARNING = '\033[93m' _FAIL = '\033[91m' _ENDC = '\033[0m' _BOLD = '\033[1m' _UNDERLINE = '\033[4m' @staticmethod def color_fun_name(fun): return ColorStr._UNDERLINE + ColorSt...
a175dbf2f239690cb5128698d5896233467e285e
huxley/settings/pipeline.py
huxley/settings/pipeline.py
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from os.path import join from .roots import PROJECT_ROOT PIPELINE_COMPILERS = ( 'huxley.utils.pipeline.PySCSSCompiler', 'pipeline_browserify.compiler.Browserify...
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from os.path import join from .roots import PROJECT_ROOT PIPELINE_COMPILERS = ( 'huxley.utils.pipeline.PySCSSCompiler', 'pipeline_browserify.compiler.Browserify...
Clean up file patterns in PIPELINE_CSS setting.
Clean up file patterns in PIPELINE_CSS setting.
Python
bsd-3-clause
ctmunwebmaster/huxley,ctmunwebmaster/huxley,nathanielparke/huxley,bmun/huxley,bmun/huxley,nathanielparke/huxley,nathanielparke/huxley,nathanielparke/huxley,ctmunwebmaster/huxley,bmun/huxley,ctmunwebmaster/huxley,bmun/huxley
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from os.path import join from .roots import PROJECT_ROOT PIPELINE_COMPILERS = ( 'huxley.utils.pipeline.PySCSSCompiler', 'pipeline_browserify.compiler.Browserify...
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from os.path import join from .roots import PROJECT_ROOT PIPELINE_COMPILERS = ( 'huxley.utils.pipeline.PySCSSCompiler', 'pipeline_browserify.compiler.Browserify...
<commit_before># Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from os.path import join from .roots import PROJECT_ROOT PIPELINE_COMPILERS = ( 'huxley.utils.pipeline.PySCSSCompiler', 'pipeline_browserify.comp...
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from os.path import join from .roots import PROJECT_ROOT PIPELINE_COMPILERS = ( 'huxley.utils.pipeline.PySCSSCompiler', 'pipeline_browserify.compiler.Browserify...
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from os.path import join from .roots import PROJECT_ROOT PIPELINE_COMPILERS = ( 'huxley.utils.pipeline.PySCSSCompiler', 'pipeline_browserify.compiler.Browserify...
<commit_before># Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from os.path import join from .roots import PROJECT_ROOT PIPELINE_COMPILERS = ( 'huxley.utils.pipeline.PySCSSCompiler', 'pipeline_browserify.comp...
85ff7e048a1e9c913adb7749cfed0aa903366197
data/load_data.py
data/load_data.py
import csv from chemtools.ml import get_decay_feature_vector from chemtools.mol_name import get_exact_name from models import DataPoint def main(path): with open(path, "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] for row in reader: if...
import csv from chemtools.ml import get_decay_feature_vector from chemtools.mol_name import get_exact_name from models import DataPoint def main(path): with open(path, "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] count = 0 for row in read...
Add indicator for how many datapoints have been loaded
Add indicator for how many datapoints have been loaded
Python
mit
crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp
import csv from chemtools.ml import get_decay_feature_vector from chemtools.mol_name import get_exact_name from models import DataPoint def main(path): with open(path, "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] for row in reader: if...
import csv from chemtools.ml import get_decay_feature_vector from chemtools.mol_name import get_exact_name from models import DataPoint def main(path): with open(path, "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] count = 0 for row in read...
<commit_before>import csv from chemtools.ml import get_decay_feature_vector from chemtools.mol_name import get_exact_name from models import DataPoint def main(path): with open(path, "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] for row in reader:...
import csv from chemtools.ml import get_decay_feature_vector from chemtools.mol_name import get_exact_name from models import DataPoint def main(path): with open(path, "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] count = 0 for row in read...
import csv from chemtools.ml import get_decay_feature_vector from chemtools.mol_name import get_exact_name from models import DataPoint def main(path): with open(path, "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] for row in reader: if...
<commit_before>import csv from chemtools.ml import get_decay_feature_vector from chemtools.mol_name import get_exact_name from models import DataPoint def main(path): with open(path, "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] for row in reader:...
7fff4438510c30e592db858b2d519eddb5837a6c
geomet/__init__.py
geomet/__init__.py
# Copyright 2013 Lars Butler & individual contributors # # 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 applicab...
# Copyright 2013 Lars Butler & individual contributors # # 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 applicab...
Increment lib version to 1.0.0
Increment lib version to 1.0.0
Python
apache-2.0
geomet/geomet,geomet/geomet
# Copyright 2013 Lars Butler & individual contributors # # 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 applicab...
# Copyright 2013 Lars Butler & individual contributors # # 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 applicab...
<commit_before># Copyright 2013 Lars Butler & individual contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
# Copyright 2013 Lars Butler & individual contributors # # 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 applicab...
# Copyright 2013 Lars Butler & individual contributors # # 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 applicab...
<commit_before># Copyright 2013 Lars Butler & individual contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
3af4434a40724d52cdb29d823041b0d44be4b753
purkinje/purkinje.py
purkinje/purkinje.py
#!/usr/bin/env python """Main module""" from __future__ import print_function from __future__ import absolute_import import gevent import gevent.monkey gevent.monkey.patch_all() from gevent.pywsgi import WSGIServer from geventwebsocket.handler import WebSocketHandler import werkzeug.serving # from werkzeug.debug impo...
#!/usr/bin/env python """Main module""" from __future__ import print_function from __future__ import absolute_import import gevent import gevent.monkey gevent.monkey.patch_all() from gevent.pywsgi import WSGIServer from geventwebsocket.handler import WebSocketHandler import werkzeug.serving # from werkzeug.debug impo...
Disable Flask 12h caching in debug mode - prevented refreshing of Angular directive templates
Disable Flask 12h caching in debug mode - prevented refreshing of Angular directive templates
Python
mit
bbiskup/purkinje,bbiskup/purkinje,bbiskup/purkinje,bbiskup/purkinje
#!/usr/bin/env python """Main module""" from __future__ import print_function from __future__ import absolute_import import gevent import gevent.monkey gevent.monkey.patch_all() from gevent.pywsgi import WSGIServer from geventwebsocket.handler import WebSocketHandler import werkzeug.serving # from werkzeug.debug impo...
#!/usr/bin/env python """Main module""" from __future__ import print_function from __future__ import absolute_import import gevent import gevent.monkey gevent.monkey.patch_all() from gevent.pywsgi import WSGIServer from geventwebsocket.handler import WebSocketHandler import werkzeug.serving # from werkzeug.debug impo...
<commit_before>#!/usr/bin/env python """Main module""" from __future__ import print_function from __future__ import absolute_import import gevent import gevent.monkey gevent.monkey.patch_all() from gevent.pywsgi import WSGIServer from geventwebsocket.handler import WebSocketHandler import werkzeug.serving # from werk...
#!/usr/bin/env python """Main module""" from __future__ import print_function from __future__ import absolute_import import gevent import gevent.monkey gevent.monkey.patch_all() from gevent.pywsgi import WSGIServer from geventwebsocket.handler import WebSocketHandler import werkzeug.serving # from werkzeug.debug impo...
#!/usr/bin/env python """Main module""" from __future__ import print_function from __future__ import absolute_import import gevent import gevent.monkey gevent.monkey.patch_all() from gevent.pywsgi import WSGIServer from geventwebsocket.handler import WebSocketHandler import werkzeug.serving # from werkzeug.debug impo...
<commit_before>#!/usr/bin/env python """Main module""" from __future__ import print_function from __future__ import absolute_import import gevent import gevent.monkey gevent.monkey.patch_all() from gevent.pywsgi import WSGIServer from geventwebsocket.handler import WebSocketHandler import werkzeug.serving # from werk...
dd69f35b623fa93579930e03c3aea8fc8f290136
lc0001_two_sum.py
lc0001_two_sum.py
"""Leetcode 1. Two Sum Easy URL: https://leetcode.com/problems/two-sum/description/ Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given n...
"""Leetcode 1. Two Sum Easy URL: https://leetcode.com/problems/two-sum/description/ Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given n...
Revise to var n & add space line
Revise to var n & add space line
Python
bsd-2-clause
bowen0701/algorithms_data_structures
"""Leetcode 1. Two Sum Easy URL: https://leetcode.com/problems/two-sum/description/ Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given n...
"""Leetcode 1. Two Sum Easy URL: https://leetcode.com/problems/two-sum/description/ Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given n...
<commit_before>"""Leetcode 1. Two Sum Easy URL: https://leetcode.com/problems/two-sum/description/ Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. E...
"""Leetcode 1. Two Sum Easy URL: https://leetcode.com/problems/two-sum/description/ Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given n...
"""Leetcode 1. Two Sum Easy URL: https://leetcode.com/problems/two-sum/description/ Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given n...
<commit_before>"""Leetcode 1. Two Sum Easy URL: https://leetcode.com/problems/two-sum/description/ Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. E...
bbc65d55d247d290a427ac5ba2c43b9d0033654d
WeatherServer/weather/views.py
WeatherServer/weather/views.py
import IP from flask import Blueprint, request, render_template, jsonify weather = Blueprint('weather', __name__, url_prefix='/weather') @weather.route('/', methods=['GET']) def index(): ip = request.remote_addr location = IP.find(ip) return jsonify(location=location, ip=ip)
import IP from flask import Blueprint, request, render_template, jsonify weather = Blueprint('weather', __name__, url_prefix='/weather') @weather.route('/', methods=['GET']) def index(): if request.headers.getlist("X-Forwarded-For"): ip = request.headers.getlist("X-Forwarded-For")[0] else: ip...
Fix user's real ip address.
Fix user's real ip address.
Python
mit
keysona/WeatherServer,keysona/WeatherServer,keysona/WeatherServer,keysona/WeatherServer
import IP from flask import Blueprint, request, render_template, jsonify weather = Blueprint('weather', __name__, url_prefix='/weather') @weather.route('/', methods=['GET']) def index(): ip = request.remote_addr location = IP.find(ip) return jsonify(location=location, ip=ip) Fix user's real ip address.
import IP from flask import Blueprint, request, render_template, jsonify weather = Blueprint('weather', __name__, url_prefix='/weather') @weather.route('/', methods=['GET']) def index(): if request.headers.getlist("X-Forwarded-For"): ip = request.headers.getlist("X-Forwarded-For")[0] else: ip...
<commit_before>import IP from flask import Blueprint, request, render_template, jsonify weather = Blueprint('weather', __name__, url_prefix='/weather') @weather.route('/', methods=['GET']) def index(): ip = request.remote_addr location = IP.find(ip) return jsonify(location=location, ip=ip) <commit_msg>Fi...
import IP from flask import Blueprint, request, render_template, jsonify weather = Blueprint('weather', __name__, url_prefix='/weather') @weather.route('/', methods=['GET']) def index(): if request.headers.getlist("X-Forwarded-For"): ip = request.headers.getlist("X-Forwarded-For")[0] else: ip...
import IP from flask import Blueprint, request, render_template, jsonify weather = Blueprint('weather', __name__, url_prefix='/weather') @weather.route('/', methods=['GET']) def index(): ip = request.remote_addr location = IP.find(ip) return jsonify(location=location, ip=ip) Fix user's real ip address.im...
<commit_before>import IP from flask import Blueprint, request, render_template, jsonify weather = Blueprint('weather', __name__, url_prefix='/weather') @weather.route('/', methods=['GET']) def index(): ip = request.remote_addr location = IP.find(ip) return jsonify(location=location, ip=ip) <commit_msg>Fi...
4d30c1b3b475debefc2b6b0226e1fc62eb1f1bfa
wagtailmenus/migrations/0011_auto_20160415_1519.py
wagtailmenus/migrations/0011_auto_20160415_1519.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailmenus', '0010_auto_20160201_1558'), ] operations = [ migrations.AlterField( model_name='flatmenuitem', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailmenus', '0010_auto_20160201_1558'), ] operations = [ migrations.AlterField( model_name='flatmenuitem', ...
Replace binary strings with normal strings in an older migration
Replace binary strings with normal strings in an older migration
Python
mit
ababic/wagtailmenus,rkhleics/wagtailmenus,ababic/wagtailmenus,rkhleics/wagtailmenus,ababic/wagtailmenus,rkhleics/wagtailmenus
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailmenus', '0010_auto_20160201_1558'), ] operations = [ migrations.AlterField( model_name='flatmenuitem', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailmenus', '0010_auto_20160201_1558'), ] operations = [ migrations.AlterField( model_name='flatmenuitem', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailmenus', '0010_auto_20160201_1558'), ] operations = [ migrations.AlterField( model_name='fl...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailmenus', '0010_auto_20160201_1558'), ] operations = [ migrations.AlterField( model_name='flatmenuitem', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailmenus', '0010_auto_20160201_1558'), ] operations = [ migrations.AlterField( model_name='flatmenuitem', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailmenus', '0010_auto_20160201_1558'), ] operations = [ migrations.AlterField( model_name='fl...
f28ece27ad325a17be20963cd30d91b9ddc913aa
winworker/create/files/utilities/add_git_credentials.py
winworker/create/files/utilities/add_git_credentials.py
#!/usr/bin/python import sys import os.path if not len(sys.argv) == 2: sys.exit(1) credentials_file = os.path.expanduser('~') + '.git-credentials' credentials = sys.argv[1] with open(credentials_file, 'ab') as f: f.write(credentials + '\n')
#!/usr/bin/python import sys import os.path if not len(sys.argv) == 2: sys.exit(1) credentials_file = os.path.expanduser('~') + '\\.git-credentials' credentials = sys.argv[1] with open(credentials_file, 'ab') as f: f.write(credentials + '\n')
Fix a path error when copying git credentialswq
Fix a path error when copying git credentialswq
Python
mit
hicknhack-software/ansible-buildbot
#!/usr/bin/python import sys import os.path if not len(sys.argv) == 2: sys.exit(1) credentials_file = os.path.expanduser('~') + '.git-credentials' credentials = sys.argv[1] with open(credentials_file, 'ab') as f: f.write(credentials + '\n')Fix a path error when copying git credentialswq
#!/usr/bin/python import sys import os.path if not len(sys.argv) == 2: sys.exit(1) credentials_file = os.path.expanduser('~') + '\\.git-credentials' credentials = sys.argv[1] with open(credentials_file, 'ab') as f: f.write(credentials + '\n')
<commit_before>#!/usr/bin/python import sys import os.path if not len(sys.argv) == 2: sys.exit(1) credentials_file = os.path.expanduser('~') + '.git-credentials' credentials = sys.argv[1] with open(credentials_file, 'ab') as f: f.write(credentials + '\n')<commit_msg>Fix a path error when copying git credential...
#!/usr/bin/python import sys import os.path if not len(sys.argv) == 2: sys.exit(1) credentials_file = os.path.expanduser('~') + '\\.git-credentials' credentials = sys.argv[1] with open(credentials_file, 'ab') as f: f.write(credentials + '\n')
#!/usr/bin/python import sys import os.path if not len(sys.argv) == 2: sys.exit(1) credentials_file = os.path.expanduser('~') + '.git-credentials' credentials = sys.argv[1] with open(credentials_file, 'ab') as f: f.write(credentials + '\n')Fix a path error when copying git credentialswq#!/usr/bin/python impor...
<commit_before>#!/usr/bin/python import sys import os.path if not len(sys.argv) == 2: sys.exit(1) credentials_file = os.path.expanduser('~') + '.git-credentials' credentials = sys.argv[1] with open(credentials_file, 'ab') as f: f.write(credentials + '\n')<commit_msg>Fix a path error when copying git credential...
7dc6f71c758b1735eaee4bde9ac5cc2c3ff26e15
memegen/routes/latest.py
memegen/routes/latest.py
from flask import Blueprint, render_template from flask_api.decorators import set_renderers from flask_api.renderers import HTMLRenderer from ._common import route, get_tid blueprint = Blueprint('latest', __name__, url_prefix="/latest") @blueprint.route("") @set_renderers(HTMLRenderer) def get(): return render...
from flask import Blueprint, render_template from flask_api.decorators import set_renderers from flask_api.renderers import HTMLRenderer from ._common import route, get_tid blueprint = Blueprint('latest', __name__, url_prefix="/latest") @blueprint.route("") @set_renderers(HTMLRenderer) def get(): return render...
Set refresh rate to 5 seconds
Set refresh rate to 5 seconds
Python
mit
DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen
from flask import Blueprint, render_template from flask_api.decorators import set_renderers from flask_api.renderers import HTMLRenderer from ._common import route, get_tid blueprint = Blueprint('latest', __name__, url_prefix="/latest") @blueprint.route("") @set_renderers(HTMLRenderer) def get(): return render...
from flask import Blueprint, render_template from flask_api.decorators import set_renderers from flask_api.renderers import HTMLRenderer from ._common import route, get_tid blueprint = Blueprint('latest', __name__, url_prefix="/latest") @blueprint.route("") @set_renderers(HTMLRenderer) def get(): return render...
<commit_before>from flask import Blueprint, render_template from flask_api.decorators import set_renderers from flask_api.renderers import HTMLRenderer from ._common import route, get_tid blueprint = Blueprint('latest', __name__, url_prefix="/latest") @blueprint.route("") @set_renderers(HTMLRenderer) def get(): ...
from flask import Blueprint, render_template from flask_api.decorators import set_renderers from flask_api.renderers import HTMLRenderer from ._common import route, get_tid blueprint = Blueprint('latest', __name__, url_prefix="/latest") @blueprint.route("") @set_renderers(HTMLRenderer) def get(): return render...
from flask import Blueprint, render_template from flask_api.decorators import set_renderers from flask_api.renderers import HTMLRenderer from ._common import route, get_tid blueprint = Blueprint('latest', __name__, url_prefix="/latest") @blueprint.route("") @set_renderers(HTMLRenderer) def get(): return render...
<commit_before>from flask import Blueprint, render_template from flask_api.decorators import set_renderers from flask_api.renderers import HTMLRenderer from ._common import route, get_tid blueprint = Blueprint('latest', __name__, url_prefix="/latest") @blueprint.route("") @set_renderers(HTMLRenderer) def get(): ...
01df07dbdd38cc0166c75592c7f8508b5618dc21
adrian/cgen/_generator.py
adrian/cgen/_generator.py
from . import errors from . import objects from . import _context from . import _layers class NodeGenerator(_layers.Layer): @_layers.register(objects.Val) def _val(self, val): if isinstance(val.type_, tuple(map(type, ( objects.CTypes.int_fast8, objects.CTypes.int_fast32, ...
from . import errors from . import objects from . import _context from . import _layers class NodeGenerator(_layers.Layer): def _type(self, type_): # TODO: implement # return "int" errors.not_implemented() def _expr(self, expr): if isinstance(expr, objects.Val): r...
Add high-level decl translation function without low-level functions' implementations
Add high-level decl translation function without low-level functions' implementations
Python
bsd-3-clause
adrian-lang/adrian.cgen
from . import errors from . import objects from . import _context from . import _layers class NodeGenerator(_layers.Layer): @_layers.register(objects.Val) def _val(self, val): if isinstance(val.type_, tuple(map(type, ( objects.CTypes.int_fast8, objects.CTypes.int_fast32, ...
from . import errors from . import objects from . import _context from . import _layers class NodeGenerator(_layers.Layer): def _type(self, type_): # TODO: implement # return "int" errors.not_implemented() def _expr(self, expr): if isinstance(expr, objects.Val): r...
<commit_before>from . import errors from . import objects from . import _context from . import _layers class NodeGenerator(_layers.Layer): @_layers.register(objects.Val) def _val(self, val): if isinstance(val.type_, tuple(map(type, ( objects.CTypes.int_fast8, objects.CTypes.int_fast32...
from . import errors from . import objects from . import _context from . import _layers class NodeGenerator(_layers.Layer): def _type(self, type_): # TODO: implement # return "int" errors.not_implemented() def _expr(self, expr): if isinstance(expr, objects.Val): r...
from . import errors from . import objects from . import _context from . import _layers class NodeGenerator(_layers.Layer): @_layers.register(objects.Val) def _val(self, val): if isinstance(val.type_, tuple(map(type, ( objects.CTypes.int_fast8, objects.CTypes.int_fast32, ...
<commit_before>from . import errors from . import objects from . import _context from . import _layers class NodeGenerator(_layers.Layer): @_layers.register(objects.Val) def _val(self, val): if isinstance(val.type_, tuple(map(type, ( objects.CTypes.int_fast8, objects.CTypes.int_fast32...
3a08414e02ae2e4d39951df21d16c62a6fab2a5c
dthm4kaiako/config/__init__.py
dthm4kaiako/config/__init__.py
"""Configuration for Django system.""" __version__ = "0.15.1" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
"""Configuration for Django system.""" __version__ = "0.15.2" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
Increment version number to 0.15.2
Increment version number to 0.15.2
Python
mit
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
"""Configuration for Django system.""" __version__ = "0.15.1" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) Increment version number to 0.15.2
"""Configuration for Django system.""" __version__ = "0.15.2" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
<commit_before>"""Configuration for Django system.""" __version__ = "0.15.1" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) <commit_msg>Increment version number to 0.15.2<commit_after>
"""Configuration for Django system.""" __version__ = "0.15.2" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
"""Configuration for Django system.""" __version__ = "0.15.1" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) Increment version number to 0.15.2"""Configuration for Django system.""" __version__ = "0.15.2" __version_info...
<commit_before>"""Configuration for Django system.""" __version__ = "0.15.1" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) <commit_msg>Increment version number to 0.15.2<commit_after>"""Configuration for Django system."...
6b73de9fea31b7a5176601d7f19370291ba4e130
tests/test_transpiler.py
tests/test_transpiler.py
import os import unittest import transpiler class TestTranspiler: def test_transpiler_creates_files_without_format(self): transpiler.main(["--output-dir", "/tmp"]) assert os.path.isfile("/tmp/auto_functions.cpp") assert os.path.isfile("/tmp/auto_functions.h") def test_transpiler_cre...
import os import unittest import transpiler class TestTranspiler: def test_transpiler_creates_files_without_format(self): try: os.remove("/tmp/auto_functions.cpp") os.remove("/tmp/auto_functions.h") except FileNotFoundError: pass transpiler.main(["--ou...
Make transpiler test remove files if they already exist
Make transpiler test remove files if they already exist
Python
mit
WesleyAC/lemonscript-transpiler,WesleyAC/lemonscript-transpiler,WesleyAC/lemonscript-transpiler
import os import unittest import transpiler class TestTranspiler: def test_transpiler_creates_files_without_format(self): transpiler.main(["--output-dir", "/tmp"]) assert os.path.isfile("/tmp/auto_functions.cpp") assert os.path.isfile("/tmp/auto_functions.h") def test_transpiler_cre...
import os import unittest import transpiler class TestTranspiler: def test_transpiler_creates_files_without_format(self): try: os.remove("/tmp/auto_functions.cpp") os.remove("/tmp/auto_functions.h") except FileNotFoundError: pass transpiler.main(["--ou...
<commit_before>import os import unittest import transpiler class TestTranspiler: def test_transpiler_creates_files_without_format(self): transpiler.main(["--output-dir", "/tmp"]) assert os.path.isfile("/tmp/auto_functions.cpp") assert os.path.isfile("/tmp/auto_functions.h") def test...
import os import unittest import transpiler class TestTranspiler: def test_transpiler_creates_files_without_format(self): try: os.remove("/tmp/auto_functions.cpp") os.remove("/tmp/auto_functions.h") except FileNotFoundError: pass transpiler.main(["--ou...
import os import unittest import transpiler class TestTranspiler: def test_transpiler_creates_files_without_format(self): transpiler.main(["--output-dir", "/tmp"]) assert os.path.isfile("/tmp/auto_functions.cpp") assert os.path.isfile("/tmp/auto_functions.h") def test_transpiler_cre...
<commit_before>import os import unittest import transpiler class TestTranspiler: def test_transpiler_creates_files_without_format(self): transpiler.main(["--output-dir", "/tmp"]) assert os.path.isfile("/tmp/auto_functions.cpp") assert os.path.isfile("/tmp/auto_functions.h") def test...
903a618cbde1f6d4c18a806e9bb8c3d17bc58b3b
flocker/control/test/test_script.py
flocker/control/test/test_script.py
# Copyright Hybrid Logic Ltd. See LICENSE file for details. from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor class ControlOptionsTests(): """ Tests for ``ControlOptions``....
# Copyright Hybrid Logic Ltd. See LICENSE file for details. from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor, StandardOptionsTestsMixin class ControlOptionsTests(StandardOptionsTe...
Make sure options tests run.
Make sure options tests run.
Python
apache-2.0
1d4Nf6/flocker,runcom/flocker,w4ngyi/flocker,lukemarsden/flocker,agonzalezro/flocker,w4ngyi/flocker,hackday-profilers/flocker,achanda/flocker,mbrukman/flocker,runcom/flocker,jml/flocker,1d4Nf6/flocker,achanda/flocker,adamtheturtle/flocker,agonzalezro/flocker,Azulinho/flocker,lukemarsden/flocker,moypray/flocker,1d4Nf6/f...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor class ControlOptionsTests(): """ Tests for ``ControlOptions``....
# Copyright Hybrid Logic Ltd. See LICENSE file for details. from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor, StandardOptionsTestsMixin class ControlOptionsTests(StandardOptionsTe...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor class ControlOptionsTests(): """ Tests for ``Co...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor, StandardOptionsTestsMixin class ControlOptionsTests(StandardOptionsTe...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor class ControlOptionsTests(): """ Tests for ``ControlOptions``....
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor class ControlOptionsTests(): """ Tests for ``Co...
6642c377d579a8401eb5827f25a1aaf6ab117921
tests/benchmark/plugins/clear_buffer_cache.py
tests/benchmark/plugins/clear_buffer_cache.py
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. 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 requir...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. 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 requir...
Update clear buffer cache plugin to only flush page cache.
Update clear buffer cache plugin to only flush page cache. More detail: http://linux-mm.org/Drop_Caches Change-Id: I7fa675ccdc81f375d88e9cfab330fca3bc983ec8 Reviewed-on: http://gerrit.ent.cloudera.com:8080/1157 Reviewed-by: Alex Behm <[email protected]> Reviewed-by: Lenni Kuff <724...
Python
apache-2.0
cloudera/Impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. 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 requir...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. 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 requir...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. 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 # ...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. 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 requir...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. 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 requir...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. 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 # ...
ceadcb80150278ae29fb60b339049f4c840c135d
astroquery/nist/tests/test_nist_remote.py
astroquery/nist/tests/test_nist_remote.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function from astropy.tests.helper import remote_data from astropy.table import Table import astropy.units as u import requests import imp from ... import nist imp.reload(requests) @remote_data class TestNist: def tes...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function import numpy as np from astropy.tests.helper import remote_data from astropy.table import Table import astropy.units as u from ... import nist @remote_data class TestNist: def test_query_async(self): ...
Add missing numpy import, and cleanup the rest
Add missing numpy import, and cleanup the rest
Python
bsd-3-clause
ceb8/astroquery,imbasimba/astroquery,ceb8/astroquery,imbasimba/astroquery
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function from astropy.tests.helper import remote_data from astropy.table import Table import astropy.units as u import requests import imp from ... import nist imp.reload(requests) @remote_data class TestNist: def tes...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function import numpy as np from astropy.tests.helper import remote_data from astropy.table import Table import astropy.units as u from ... import nist @remote_data class TestNist: def test_query_async(self): ...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function from astropy.tests.helper import remote_data from astropy.table import Table import astropy.units as u import requests import imp from ... import nist imp.reload(requests) @remote_data class TestNis...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function import numpy as np from astropy.tests.helper import remote_data from astropy.table import Table import astropy.units as u from ... import nist @remote_data class TestNist: def test_query_async(self): ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function from astropy.tests.helper import remote_data from astropy.table import Table import astropy.units as u import requests import imp from ... import nist imp.reload(requests) @remote_data class TestNist: def tes...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function from astropy.tests.helper import remote_data from astropy.table import Table import astropy.units as u import requests import imp from ... import nist imp.reload(requests) @remote_data class TestNis...
76728fcba7671575053620da9e1e26aaa279547a
awx/main/notifications/webhook_backend.py
awx/main/notifications/webhook_backend.py
# Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. import logging import requests import json from django.utils.encoding import smart_text from awx.main.notifications.base import TowerBaseEmailBackend logger = logging.getLogger('awx.main.notifications.webhook_backend') class WebhookBackend(TowerBaseEmailBac...
# Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. import logging import requests import json from django.utils.encoding import smart_text from awx.main.notifications.base import TowerBaseEmailBackend from awx.main.utils import get_awx_version logger = logging.getLogger('awx.main.notifications.webhook_backen...
Set a user agent for the webhook if not provided
Set a user agent for the webhook if not provided
Python
apache-2.0
wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx
# Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. import logging import requests import json from django.utils.encoding import smart_text from awx.main.notifications.base import TowerBaseEmailBackend logger = logging.getLogger('awx.main.notifications.webhook_backend') class WebhookBackend(TowerBaseEmailBac...
# Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. import logging import requests import json from django.utils.encoding import smart_text from awx.main.notifications.base import TowerBaseEmailBackend from awx.main.utils import get_awx_version logger = logging.getLogger('awx.main.notifications.webhook_backen...
<commit_before># Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. import logging import requests import json from django.utils.encoding import smart_text from awx.main.notifications.base import TowerBaseEmailBackend logger = logging.getLogger('awx.main.notifications.webhook_backend') class WebhookBackend(To...
# Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. import logging import requests import json from django.utils.encoding import smart_text from awx.main.notifications.base import TowerBaseEmailBackend from awx.main.utils import get_awx_version logger = logging.getLogger('awx.main.notifications.webhook_backen...
# Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. import logging import requests import json from django.utils.encoding import smart_text from awx.main.notifications.base import TowerBaseEmailBackend logger = logging.getLogger('awx.main.notifications.webhook_backend') class WebhookBackend(TowerBaseEmailBac...
<commit_before># Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. import logging import requests import json from django.utils.encoding import smart_text from awx.main.notifications.base import TowerBaseEmailBackend logger = logging.getLogger('awx.main.notifications.webhook_backend') class WebhookBackend(To...
4630b898e37d0653baa22c98578eb06c82eebfe6
kobo/hub/admin.py
kobo/hub/admin.py
# -*- coding: utf-8 -*- import django.contrib.admin as admin from models import * class TaskAdmin(admin.ModelAdmin): list_display = ("id", "method", "label", "state", "owner", "dt_created", "dt_finished", "time", "arch", "channel") list_filter = ("method", "state") search_fields = ("id", "method", "lab...
# -*- coding: utf-8 -*- import django.contrib.admin as admin from models import * class TaskAdmin(admin.ModelAdmin): list_display = ("id", "method", "label", "state", "owner", "dt_created", "dt_finished", "time", "arch", "channel") list_filter = ("method", "state") search_fields = ("id", "method", "lab...
Fix TaskAdmin to search for user in correct db field.
Fix TaskAdmin to search for user in correct db field.
Python
lgpl-2.1
pombredanne/https-git.fedorahosted.org-git-kobo,release-engineering/kobo,pombredanne/https-git.fedorahosted.org-git-kobo,pombredanne/https-git.fedorahosted.org-git-kobo,release-engineering/kobo,release-engineering/kobo,release-engineering/kobo,pombredanne/https-git.fedorahosted.org-git-kobo
# -*- coding: utf-8 -*- import django.contrib.admin as admin from models import * class TaskAdmin(admin.ModelAdmin): list_display = ("id", "method", "label", "state", "owner", "dt_created", "dt_finished", "time", "arch", "channel") list_filter = ("method", "state") search_fields = ("id", "method", "lab...
# -*- coding: utf-8 -*- import django.contrib.admin as admin from models import * class TaskAdmin(admin.ModelAdmin): list_display = ("id", "method", "label", "state", "owner", "dt_created", "dt_finished", "time", "arch", "channel") list_filter = ("method", "state") search_fields = ("id", "method", "lab...
<commit_before># -*- coding: utf-8 -*- import django.contrib.admin as admin from models import * class TaskAdmin(admin.ModelAdmin): list_display = ("id", "method", "label", "state", "owner", "dt_created", "dt_finished", "time", "arch", "channel") list_filter = ("method", "state") search_fields = ("id",...
# -*- coding: utf-8 -*- import django.contrib.admin as admin from models import * class TaskAdmin(admin.ModelAdmin): list_display = ("id", "method", "label", "state", "owner", "dt_created", "dt_finished", "time", "arch", "channel") list_filter = ("method", "state") search_fields = ("id", "method", "lab...
# -*- coding: utf-8 -*- import django.contrib.admin as admin from models import * class TaskAdmin(admin.ModelAdmin): list_display = ("id", "method", "label", "state", "owner", "dt_created", "dt_finished", "time", "arch", "channel") list_filter = ("method", "state") search_fields = ("id", "method", "lab...
<commit_before># -*- coding: utf-8 -*- import django.contrib.admin as admin from models import * class TaskAdmin(admin.ModelAdmin): list_display = ("id", "method", "label", "state", "owner", "dt_created", "dt_finished", "time", "arch", "channel") list_filter = ("method", "state") search_fields = ("id",...
ebc06c75186d7e856fb11b01d321edc156b4ad24
tests/conftest.py
tests/conftest.py
import pytest import sys import psycopg2 import os from testing import postgresql as pgsql_test postgresql = None @pytest.hookimpl(tryfirst=True) def pytest_collection_modifyitems(items): # will execute as early as possible items.sort(key=lambda item: item.parent.obj.ORDER if hasattr(item.parent.obj, 'ORDER')...
import sys import psycopg2 import os from testing import postgresql as pgsql_test postgresql = None def pytest_configure(config): # TODO: this is dirty hack to be able to run pytest if config: return global postgresql def handler(postgresql): f = open(os.path.dirname(os.path.realpat...
Add hack to be able to run pytest
Add hack to be able to run pytest
Python
agpl-3.0
em92/quakelive-local-ratings,em92/quakelive-local-ratings,em92/quakelive-local-ratings,em92/pickup-rating,em92/quakelive-local-ratings,em92/pickup-rating,em92/pickup-rating,em92/quakelive-local-ratings
import pytest import sys import psycopg2 import os from testing import postgresql as pgsql_test postgresql = None @pytest.hookimpl(tryfirst=True) def pytest_collection_modifyitems(items): # will execute as early as possible items.sort(key=lambda item: item.parent.obj.ORDER if hasattr(item.parent.obj, 'ORDER')...
import sys import psycopg2 import os from testing import postgresql as pgsql_test postgresql = None def pytest_configure(config): # TODO: this is dirty hack to be able to run pytest if config: return global postgresql def handler(postgresql): f = open(os.path.dirname(os.path.realpat...
<commit_before>import pytest import sys import psycopg2 import os from testing import postgresql as pgsql_test postgresql = None @pytest.hookimpl(tryfirst=True) def pytest_collection_modifyitems(items): # will execute as early as possible items.sort(key=lambda item: item.parent.obj.ORDER if hasattr(item.paren...
import sys import psycopg2 import os from testing import postgresql as pgsql_test postgresql = None def pytest_configure(config): # TODO: this is dirty hack to be able to run pytest if config: return global postgresql def handler(postgresql): f = open(os.path.dirname(os.path.realpat...
import pytest import sys import psycopg2 import os from testing import postgresql as pgsql_test postgresql = None @pytest.hookimpl(tryfirst=True) def pytest_collection_modifyitems(items): # will execute as early as possible items.sort(key=lambda item: item.parent.obj.ORDER if hasattr(item.parent.obj, 'ORDER')...
<commit_before>import pytest import sys import psycopg2 import os from testing import postgresql as pgsql_test postgresql = None @pytest.hookimpl(tryfirst=True) def pytest_collection_modifyitems(items): # will execute as early as possible items.sort(key=lambda item: item.parent.obj.ORDER if hasattr(item.paren...
3189b35f4fea14962cc5dcff7385d7e02bba4e01
plata/product/feincms/models.py
plata/product/feincms/models.py
from django.utils.translation import get_language, ugettext_lazy as _ from feincms.models import Base from plata.product.models import Product, ProductManager class CMSProduct(Product, Base): """ FeinCMS-based product model """ class Meta: app_label = 'product' verbose_name = _('pro...
from django.utils.translation import get_language, ugettext_lazy as _ from feincms.models import Base from plata.product.models import Product, ProductManager class CMSProduct(Product, Base): """ FeinCMS-based product model The admin integration requires FeinCMS >=1.2 to work correctly. """ cl...
Add note about FeinCMS version requirements
Add note about FeinCMS version requirements
Python
bsd-3-clause
armicron/plata,armicron/plata,stefanklug/plata,armicron/plata,allink/plata
from django.utils.translation import get_language, ugettext_lazy as _ from feincms.models import Base from plata.product.models import Product, ProductManager class CMSProduct(Product, Base): """ FeinCMS-based product model """ class Meta: app_label = 'product' verbose_name = _('pro...
from django.utils.translation import get_language, ugettext_lazy as _ from feincms.models import Base from plata.product.models import Product, ProductManager class CMSProduct(Product, Base): """ FeinCMS-based product model The admin integration requires FeinCMS >=1.2 to work correctly. """ cl...
<commit_before>from django.utils.translation import get_language, ugettext_lazy as _ from feincms.models import Base from plata.product.models import Product, ProductManager class CMSProduct(Product, Base): """ FeinCMS-based product model """ class Meta: app_label = 'product' verbos...
from django.utils.translation import get_language, ugettext_lazy as _ from feincms.models import Base from plata.product.models import Product, ProductManager class CMSProduct(Product, Base): """ FeinCMS-based product model The admin integration requires FeinCMS >=1.2 to work correctly. """ cl...
from django.utils.translation import get_language, ugettext_lazy as _ from feincms.models import Base from plata.product.models import Product, ProductManager class CMSProduct(Product, Base): """ FeinCMS-based product model """ class Meta: app_label = 'product' verbose_name = _('pro...
<commit_before>from django.utils.translation import get_language, ugettext_lazy as _ from feincms.models import Base from plata.product.models import Product, ProductManager class CMSProduct(Product, Base): """ FeinCMS-based product model """ class Meta: app_label = 'product' verbos...
8528f21397672b5719fcf4edecd8efa3a1eec60a
cellardoor/serializers/json_serializer.py
cellardoor/serializers/json_serializer.py
import re import json from datetime import datetime from . import Serializer class CellarDoorJSONEncoder(json.JSONEncoder): def default(self, obj): try: iterable = iter(obj) except TypeError: pass else: return list(iterable) if isinstance(obj, datetime): return obj.isoformat() return s...
import re import json from datetime import datetime import collections from . import Serializer class CellarDoorJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, collections.Iterable): return list(obj) if isinstance(obj, datetime): return obj.isoformat() return super(Cell...
Use more reliable method of detecting iterables
Use more reliable method of detecting iterables
Python
mit
cooper-software/cellardoor
import re import json from datetime import datetime from . import Serializer class CellarDoorJSONEncoder(json.JSONEncoder): def default(self, obj): try: iterable = iter(obj) except TypeError: pass else: return list(iterable) if isinstance(obj, datetime): return obj.isoformat() return s...
import re import json from datetime import datetime import collections from . import Serializer class CellarDoorJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, collections.Iterable): return list(obj) if isinstance(obj, datetime): return obj.isoformat() return super(Cell...
<commit_before>import re import json from datetime import datetime from . import Serializer class CellarDoorJSONEncoder(json.JSONEncoder): def default(self, obj): try: iterable = iter(obj) except TypeError: pass else: return list(iterable) if isinstance(obj, datetime): return obj.isoformat(...
import re import json from datetime import datetime import collections from . import Serializer class CellarDoorJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, collections.Iterable): return list(obj) if isinstance(obj, datetime): return obj.isoformat() return super(Cell...
import re import json from datetime import datetime from . import Serializer class CellarDoorJSONEncoder(json.JSONEncoder): def default(self, obj): try: iterable = iter(obj) except TypeError: pass else: return list(iterable) if isinstance(obj, datetime): return obj.isoformat() return s...
<commit_before>import re import json from datetime import datetime from . import Serializer class CellarDoorJSONEncoder(json.JSONEncoder): def default(self, obj): try: iterable = iter(obj) except TypeError: pass else: return list(iterable) if isinstance(obj, datetime): return obj.isoformat(...
daeabec6f055ca232903f50f307b5ab8a518b1aa
apps/domain/src/main/core/manager/environment_manager.py
apps/domain/src/main/core/manager/environment_manager.py
from typing import List from typing import Union from .database_manager import DatabaseManager from ..database.environment.environment import Environment from ..database.environment.user_environment import UserEnvironment from ..exceptions import ( EnvironmentNotFoundError, ) class EnvironmentManager(DatabaseMana...
from typing import List from typing import Union from .database_manager import DatabaseManager from ..database.environment.environment import Environment from ..database.environment.user_environment import UserEnvironment from ..exceptions import ( EnvironmentNotFoundError, ) class EnvironmentManager(DatabaseMana...
ADD delete_associations method at EnvironmentManager
ADD delete_associations method at EnvironmentManager
Python
apache-2.0
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
from typing import List from typing import Union from .database_manager import DatabaseManager from ..database.environment.environment import Environment from ..database.environment.user_environment import UserEnvironment from ..exceptions import ( EnvironmentNotFoundError, ) class EnvironmentManager(DatabaseMana...
from typing import List from typing import Union from .database_manager import DatabaseManager from ..database.environment.environment import Environment from ..database.environment.user_environment import UserEnvironment from ..exceptions import ( EnvironmentNotFoundError, ) class EnvironmentManager(DatabaseMana...
<commit_before>from typing import List from typing import Union from .database_manager import DatabaseManager from ..database.environment.environment import Environment from ..database.environment.user_environment import UserEnvironment from ..exceptions import ( EnvironmentNotFoundError, ) class EnvironmentManag...
from typing import List from typing import Union from .database_manager import DatabaseManager from ..database.environment.environment import Environment from ..database.environment.user_environment import UserEnvironment from ..exceptions import ( EnvironmentNotFoundError, ) class EnvironmentManager(DatabaseMana...
from typing import List from typing import Union from .database_manager import DatabaseManager from ..database.environment.environment import Environment from ..database.environment.user_environment import UserEnvironment from ..exceptions import ( EnvironmentNotFoundError, ) class EnvironmentManager(DatabaseMana...
<commit_before>from typing import List from typing import Union from .database_manager import DatabaseManager from ..database.environment.environment import Environment from ..database.environment.user_environment import UserEnvironment from ..exceptions import ( EnvironmentNotFoundError, ) class EnvironmentManag...
600ec67b175ca78c4dd72b4468368920ce390316
flask_controllers/GameModes.py
flask_controllers/GameModes.py
from flask.views import MethodView from flask_helpers.build_response import build_response from flask_helpers.ErrorHandler import ErrorHandler from python_cowbull_game.GameObject import GameObject class GameModes(MethodView): def get(self): digits = GameObject.digits_used guesses = GameObject.gues...
from flask import request from flask.views import MethodView from flask_helpers.build_response import build_response from flask_helpers.ErrorHandler import ErrorHandler from python_cowbull_game.GameObject import GameObject class GameModes(MethodView): def get(self): textonly = request.args.get('textmode',...
Add text only mode to get game modes
Add text only mode to get game modes
Python
apache-2.0
dsandersAzure/python_cowbull_server,dsandersAzure/python_cowbull_server
from flask.views import MethodView from flask_helpers.build_response import build_response from flask_helpers.ErrorHandler import ErrorHandler from python_cowbull_game.GameObject import GameObject class GameModes(MethodView): def get(self): digits = GameObject.digits_used guesses = GameObject.gues...
from flask import request from flask.views import MethodView from flask_helpers.build_response import build_response from flask_helpers.ErrorHandler import ErrorHandler from python_cowbull_game.GameObject import GameObject class GameModes(MethodView): def get(self): textonly = request.args.get('textmode',...
<commit_before>from flask.views import MethodView from flask_helpers.build_response import build_response from flask_helpers.ErrorHandler import ErrorHandler from python_cowbull_game.GameObject import GameObject class GameModes(MethodView): def get(self): digits = GameObject.digits_used guesses = ...
from flask import request from flask.views import MethodView from flask_helpers.build_response import build_response from flask_helpers.ErrorHandler import ErrorHandler from python_cowbull_game.GameObject import GameObject class GameModes(MethodView): def get(self): textonly = request.args.get('textmode',...
from flask.views import MethodView from flask_helpers.build_response import build_response from flask_helpers.ErrorHandler import ErrorHandler from python_cowbull_game.GameObject import GameObject class GameModes(MethodView): def get(self): digits = GameObject.digits_used guesses = GameObject.gues...
<commit_before>from flask.views import MethodView from flask_helpers.build_response import build_response from flask_helpers.ErrorHandler import ErrorHandler from python_cowbull_game.GameObject import GameObject class GameModes(MethodView): def get(self): digits = GameObject.digits_used guesses = ...
8d409ab4ca35b38d97d17f0f443c8cdb62d5e58e
tests/tests/mendertesting.py
tests/tests/mendertesting.py
import pytest class MenderTesting(object): slow = pytest.mark.skipif(not pytest.config.getoption("--runslow"), reason="need --runslow option to run") fast = pytest.mark.skipif(not pytest.config.getoption("--runfast"), reason="need --runfast option to run") nightly = pytest.mark.skipif(not pytest.config.get...
import pytest class MenderTesting(object): slow_cond = False fast_cond = False nightly_cond = False slow = None fast = None nightly = None if pytest.config.getoption("--runslow"): MenderTesting.slow_cond = True else: MenderTesting.slow_cond = False if pytest.config.getoption("--runfa...
Fix no tests running when not passing any options.
Fix no tests running when not passing any options. Signed-off-by: Kristian Amlie <[email protected]>
Python
apache-2.0
pasinskim/integration,GregorioDiStefano/integration,pasinskim/integration,GregorioDiStefano/integration,pasinskim/integration
import pytest class MenderTesting(object): slow = pytest.mark.skipif(not pytest.config.getoption("--runslow"), reason="need --runslow option to run") fast = pytest.mark.skipif(not pytest.config.getoption("--runfast"), reason="need --runfast option to run") nightly = pytest.mark.skipif(not pytest.config.get...
import pytest class MenderTesting(object): slow_cond = False fast_cond = False nightly_cond = False slow = None fast = None nightly = None if pytest.config.getoption("--runslow"): MenderTesting.slow_cond = True else: MenderTesting.slow_cond = False if pytest.config.getoption("--runfa...
<commit_before>import pytest class MenderTesting(object): slow = pytest.mark.skipif(not pytest.config.getoption("--runslow"), reason="need --runslow option to run") fast = pytest.mark.skipif(not pytest.config.getoption("--runfast"), reason="need --runfast option to run") nightly = pytest.mark.skipif(not py...
import pytest class MenderTesting(object): slow_cond = False fast_cond = False nightly_cond = False slow = None fast = None nightly = None if pytest.config.getoption("--runslow"): MenderTesting.slow_cond = True else: MenderTesting.slow_cond = False if pytest.config.getoption("--runfa...
import pytest class MenderTesting(object): slow = pytest.mark.skipif(not pytest.config.getoption("--runslow"), reason="need --runslow option to run") fast = pytest.mark.skipif(not pytest.config.getoption("--runfast"), reason="need --runfast option to run") nightly = pytest.mark.skipif(not pytest.config.get...
<commit_before>import pytest class MenderTesting(object): slow = pytest.mark.skipif(not pytest.config.getoption("--runslow"), reason="need --runslow option to run") fast = pytest.mark.skipif(not pytest.config.getoption("--runfast"), reason="need --runfast option to run") nightly = pytest.mark.skipif(not py...
92baaeca9065a769272bb9aafbcfef990620fe24
src/cm/utils/embed.py
src/cm/utils/embed.py
from django.core.urlresolvers import reverse from django.conf import settings def embed_html(text_key, attrs='', version_key=None, query_string="") : if version_key : url = reverse('text-view-comments-frame-version', args=[text_key, version_key]) else : url = reverse('text-view-comments-frame...
from django.core.urlresolvers import reverse from django.conf import settings def embed_html(text_key, attrs='', version_key=None, query_string="") : if version_key : url = reverse('text-view-comments-frame-version', args=[text_key, version_key]) else : url = reverse('text-view-comments-frame...
FIX : no autoclose iframe html element
FIX : no autoclose iframe html element
Python
agpl-3.0
co-ment/comt,co-ment/comt,co-ment/comt,co-ment/comt,co-ment/comt,co-ment/comt,co-ment/comt
from django.core.urlresolvers import reverse from django.conf import settings def embed_html(text_key, attrs='', version_key=None, query_string="") : if version_key : url = reverse('text-view-comments-frame-version', args=[text_key, version_key]) else : url = reverse('text-view-comments-frame...
from django.core.urlresolvers import reverse from django.conf import settings def embed_html(text_key, attrs='', version_key=None, query_string="") : if version_key : url = reverse('text-view-comments-frame-version', args=[text_key, version_key]) else : url = reverse('text-view-comments-frame...
<commit_before>from django.core.urlresolvers import reverse from django.conf import settings def embed_html(text_key, attrs='', version_key=None, query_string="") : if version_key : url = reverse('text-view-comments-frame-version', args=[text_key, version_key]) else : url = reverse('text-view...
from django.core.urlresolvers import reverse from django.conf import settings def embed_html(text_key, attrs='', version_key=None, query_string="") : if version_key : url = reverse('text-view-comments-frame-version', args=[text_key, version_key]) else : url = reverse('text-view-comments-frame...
from django.core.urlresolvers import reverse from django.conf import settings def embed_html(text_key, attrs='', version_key=None, query_string="") : if version_key : url = reverse('text-view-comments-frame-version', args=[text_key, version_key]) else : url = reverse('text-view-comments-frame...
<commit_before>from django.core.urlresolvers import reverse from django.conf import settings def embed_html(text_key, attrs='', version_key=None, query_string="") : if version_key : url = reverse('text-view-comments-frame-version', args=[text_key, version_key]) else : url = reverse('text-view...
4585c5d0a69b190f55486a2cfb94a5c361bd4365
tests/pytests/functional/states/test_npm.py
tests/pytests/functional/states/test_npm.py
import pytest from salt.exceptions import CommandExecutionError @pytest.fixture(scope="module", autouse=True) def install_npm(sminion): try: sminion.functions.pkg.install("npm") except CommandExecutionError: pytest.skip("Unable to install npm") @pytest.mark.slow_test @pytest.mark.destructive...
import pytest from salt.exceptions import CommandExecutionError @pytest.fixture(scope="module", autouse=True) def install_npm(sminion): try: sminion.functions.pkg.install("npm") # Just name the thing we're looking for sminion.functions.npm # pylint: disable=pointless-statement except ...
Check npm name as well
Check npm name as well
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
import pytest from salt.exceptions import CommandExecutionError @pytest.fixture(scope="module", autouse=True) def install_npm(sminion): try: sminion.functions.pkg.install("npm") except CommandExecutionError: pytest.skip("Unable to install npm") @pytest.mark.slow_test @pytest.mark.destructive...
import pytest from salt.exceptions import CommandExecutionError @pytest.fixture(scope="module", autouse=True) def install_npm(sminion): try: sminion.functions.pkg.install("npm") # Just name the thing we're looking for sminion.functions.npm # pylint: disable=pointless-statement except ...
<commit_before>import pytest from salt.exceptions import CommandExecutionError @pytest.fixture(scope="module", autouse=True) def install_npm(sminion): try: sminion.functions.pkg.install("npm") except CommandExecutionError: pytest.skip("Unable to install npm") @pytest.mark.slow_test @pytest.m...
import pytest from salt.exceptions import CommandExecutionError @pytest.fixture(scope="module", autouse=True) def install_npm(sminion): try: sminion.functions.pkg.install("npm") # Just name the thing we're looking for sminion.functions.npm # pylint: disable=pointless-statement except ...
import pytest from salt.exceptions import CommandExecutionError @pytest.fixture(scope="module", autouse=True) def install_npm(sminion): try: sminion.functions.pkg.install("npm") except CommandExecutionError: pytest.skip("Unable to install npm") @pytest.mark.slow_test @pytest.mark.destructive...
<commit_before>import pytest from salt.exceptions import CommandExecutionError @pytest.fixture(scope="module", autouse=True) def install_npm(sminion): try: sminion.functions.pkg.install("npm") except CommandExecutionError: pytest.skip("Unable to install npm") @pytest.mark.slow_test @pytest.m...
a16cffb7c3fe100e5e68a71e2dfcca26bf124464
prime-factors/prime_factors.py
prime-factors/prime_factors.py
# File: prime_factors.py # Purpose: Compute the prime factors of a given natural number. # Programmer: Amal Shehu # Course: Exercism # Date: Monday 26 September 2016, 12:05 AM def prime_factors(number, n=2, factors=None): if factors is None: factors = [] for num in range(n, num...
# File: prime_factors.py # Purpose: Compute the prime factors of a given natural number. # Programmer: Amal Shehu # Course: Exercism # Date: Monday 26 September 2016, 12:05 AM def prime_factors(number): num = 2 factors = [] while num <= number: if (number % ...
Change if condition to while with reformat
Change if condition to while with reformat
Python
mit
amalshehu/exercism-python
# File: prime_factors.py # Purpose: Compute the prime factors of a given natural number. # Programmer: Amal Shehu # Course: Exercism # Date: Monday 26 September 2016, 12:05 AM def prime_factors(number, n=2, factors=None): if factors is None: factors = [] for num in range(n, num...
# File: prime_factors.py # Purpose: Compute the prime factors of a given natural number. # Programmer: Amal Shehu # Course: Exercism # Date: Monday 26 September 2016, 12:05 AM def prime_factors(number): num = 2 factors = [] while num <= number: if (number % ...
<commit_before># File: prime_factors.py # Purpose: Compute the prime factors of a given natural number. # Programmer: Amal Shehu # Course: Exercism # Date: Monday 26 September 2016, 12:05 AM def prime_factors(number, n=2, factors=None): if factors is None: factors = [] for num ...
# File: prime_factors.py # Purpose: Compute the prime factors of a given natural number. # Programmer: Amal Shehu # Course: Exercism # Date: Monday 26 September 2016, 12:05 AM def prime_factors(number): num = 2 factors = [] while num <= number: if (number % ...
# File: prime_factors.py # Purpose: Compute the prime factors of a given natural number. # Programmer: Amal Shehu # Course: Exercism # Date: Monday 26 September 2016, 12:05 AM def prime_factors(number, n=2, factors=None): if factors is None: factors = [] for num in range(n, num...
<commit_before># File: prime_factors.py # Purpose: Compute the prime factors of a given natural number. # Programmer: Amal Shehu # Course: Exercism # Date: Monday 26 September 2016, 12:05 AM def prime_factors(number, n=2, factors=None): if factors is None: factors = [] for num ...
7619513d29c5f7ae886963ced70315d42dbd1a9b
ogbot/core/researcher.py
ogbot/core/researcher.py
from base import BaseBot from scraping import research, general class ResearcherBot(BaseBot): def __init__(self, browser, config, planets): self.research_client = research.Research(browser, config) self.general_client = general.General(browser, config) self.planets = planets supe...
from base import BaseBot from scraping import research, general class ResearcherBot(BaseBot): def __init__(self, browser, config, planets): self.research_client = research.Research(browser, config) self.general_client = general.General(browser, config) self.planets = planets supe...
Add logging if no research available
Add logging if no research available
Python
mit
yosh778/OG-Bot,yosh778/OG-Bot,yosh778/OG-Bot,winiciuscota/OG-Bot
from base import BaseBot from scraping import research, general class ResearcherBot(BaseBot): def __init__(self, browser, config, planets): self.research_client = research.Research(browser, config) self.general_client = general.General(browser, config) self.planets = planets supe...
from base import BaseBot from scraping import research, general class ResearcherBot(BaseBot): def __init__(self, browser, config, planets): self.research_client = research.Research(browser, config) self.general_client = general.General(browser, config) self.planets = planets supe...
<commit_before>from base import BaseBot from scraping import research, general class ResearcherBot(BaseBot): def __init__(self, browser, config, planets): self.research_client = research.Research(browser, config) self.general_client = general.General(browser, config) self.planets = plane...
from base import BaseBot from scraping import research, general class ResearcherBot(BaseBot): def __init__(self, browser, config, planets): self.research_client = research.Research(browser, config) self.general_client = general.General(browser, config) self.planets = planets supe...
from base import BaseBot from scraping import research, general class ResearcherBot(BaseBot): def __init__(self, browser, config, planets): self.research_client = research.Research(browser, config) self.general_client = general.General(browser, config) self.planets = planets supe...
<commit_before>from base import BaseBot from scraping import research, general class ResearcherBot(BaseBot): def __init__(self, browser, config, planets): self.research_client = research.Research(browser, config) self.general_client = general.General(browser, config) self.planets = plane...
b8792d9164f669133032eb26ab78281acb17c9c5
appengine/standard/conftest.py
appengine/standard/conftest.py
# Copyright 2015 Google Inc. 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 applicable law or a...
# Copyright 2015 Google Inc. 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 applicable law or a...
Fix lint issue and review comments
Fix lint issue and review comments Change-Id: I02a53961b6411247ef06d84dad7b533cb97d89f7
Python
apache-2.0
canglade/NLP,hashems/Mobile-Cloud-Development-Projects,sharbison3/python-docs-samples,JavaRabbit/CS496_capstone,GoogleCloudPlatform/python-docs-samples,sharbison3/python-docs-samples,sharbison3/python-docs-samples,sharbison3/python-docs-samples,hashems/Mobile-Cloud-Development-Projects,JavaRabbit/CS496_capstone,Brandon...
# Copyright 2015 Google Inc. 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 applicable law or a...
# Copyright 2015 Google Inc. 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 applicable law or a...
<commit_before># Copyright 2015 Google Inc. 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 appl...
# Copyright 2015 Google Inc. 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 applicable law or a...
# Copyright 2015 Google Inc. 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 applicable law or a...
<commit_before># Copyright 2015 Google Inc. 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 appl...
e921df4218053b1afe2a60262516873e96ac2679
slave/skia_slave_scripts/flavor_utils/xsan_build_step_utils.py
slave/skia_slave_scripts/flavor_utils/xsan_build_step_utils.py
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for ASAN,TSAN,etc. build steps. """ from default_build_step_utils import DefaultBuildStepUtils from utils import she...
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for ASAN,TSAN,etc. build steps. """ from default_build_step_utils import DefaultBuildStepUtils from utils import she...
Use tools/tsan.supp for TSAN suppressions.
Use tools/tsan.supp for TSAN suppressions. BUG=skia: [email protected], [email protected] Author: [email protected] Review URL: https://codereview.chromium.org/266393003
Python
bsd-3-clause
Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Ti...
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for ASAN,TSAN,etc. build steps. """ from default_build_step_utils import DefaultBuildStepUtils from utils import she...
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for ASAN,TSAN,etc. build steps. """ from default_build_step_utils import DefaultBuildStepUtils from utils import she...
<commit_before>#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for ASAN,TSAN,etc. build steps. """ from default_build_step_utils import DefaultBuildStepUtils from u...
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for ASAN,TSAN,etc. build steps. """ from default_build_step_utils import DefaultBuildStepUtils from utils import she...
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for ASAN,TSAN,etc. build steps. """ from default_build_step_utils import DefaultBuildStepUtils from utils import she...
<commit_before>#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for ASAN,TSAN,etc. build steps. """ from default_build_step_utils import DefaultBuildStepUtils from u...
a3f9b4d7a82335cadaba09167a6ac873733646fa
lambda_function.py
lambda_function.py
#!/usr/bin/env python2 from StringIO import StringIO import boto3 from dmr_marc_users_cs750 import ( get_users, get_groups, write_contacts_csv, write_contacts_xlsx ) def lambda_handler(event=None, context=None): users = get_users() csvo = StringIO() write_contacts_csv(users, csvo) ...
#!/usr/bin/env python2 from StringIO import StringIO import boto3 from dmr_marc_users_cs750 import ( get_users, get_groups, write_contacts_csv, write_contacts_xlsx ) def lambda_handler(event=None, context=None): users = get_users() csvo = StringIO() write_contacts_csv(users, csvo) ...
Add main routine to lambda handler
Add main routine to lambda handler
Python
apache-2.0
ajorg/DMR_contacts
#!/usr/bin/env python2 from StringIO import StringIO import boto3 from dmr_marc_users_cs750 import ( get_users, get_groups, write_contacts_csv, write_contacts_xlsx ) def lambda_handler(event=None, context=None): users = get_users() csvo = StringIO() write_contacts_csv(users, csvo) ...
#!/usr/bin/env python2 from StringIO import StringIO import boto3 from dmr_marc_users_cs750 import ( get_users, get_groups, write_contacts_csv, write_contacts_xlsx ) def lambda_handler(event=None, context=None): users = get_users() csvo = StringIO() write_contacts_csv(users, csvo) ...
<commit_before>#!/usr/bin/env python2 from StringIO import StringIO import boto3 from dmr_marc_users_cs750 import ( get_users, get_groups, write_contacts_csv, write_contacts_xlsx ) def lambda_handler(event=None, context=None): users = get_users() csvo = StringIO() write_contacts_csv(use...
#!/usr/bin/env python2 from StringIO import StringIO import boto3 from dmr_marc_users_cs750 import ( get_users, get_groups, write_contacts_csv, write_contacts_xlsx ) def lambda_handler(event=None, context=None): users = get_users() csvo = StringIO() write_contacts_csv(users, csvo) ...
#!/usr/bin/env python2 from StringIO import StringIO import boto3 from dmr_marc_users_cs750 import ( get_users, get_groups, write_contacts_csv, write_contacts_xlsx ) def lambda_handler(event=None, context=None): users = get_users() csvo = StringIO() write_contacts_csv(users, csvo) ...
<commit_before>#!/usr/bin/env python2 from StringIO import StringIO import boto3 from dmr_marc_users_cs750 import ( get_users, get_groups, write_contacts_csv, write_contacts_xlsx ) def lambda_handler(event=None, context=None): users = get_users() csvo = StringIO() write_contacts_csv(use...
fd18cd0867f925b3b7abf214cbfb3c2f8f9101cb
uri_extension_to_dict.py
uri_extension_to_dict.py
#! /usr/bin/env python2.7 from collections import Counter from pprint import pprint from re import search from sys import argv def count_extension(filename): with open(filename, 'r') as file: # New empty counter. ext_dict = Counter() for line in file: # Remove newlines / carria...
#! /usr/bin/env python2.7 from collections import Counter from pprint import pprint from re import search from sys import argv def count_extension(filename): with open(filename, 'r') as file: # New empty counter. ext_dict = Counter() for line in file: # Remove newlines / carria...
Replace double quote by simple quote, no need interpolation
Replace double quote by simple quote, no need interpolation
Python
mit
gdelpierre/scripts,gdelpierre/scripts
#! /usr/bin/env python2.7 from collections import Counter from pprint import pprint from re import search from sys import argv def count_extension(filename): with open(filename, 'r') as file: # New empty counter. ext_dict = Counter() for line in file: # Remove newlines / carria...
#! /usr/bin/env python2.7 from collections import Counter from pprint import pprint from re import search from sys import argv def count_extension(filename): with open(filename, 'r') as file: # New empty counter. ext_dict = Counter() for line in file: # Remove newlines / carria...
<commit_before>#! /usr/bin/env python2.7 from collections import Counter from pprint import pprint from re import search from sys import argv def count_extension(filename): with open(filename, 'r') as file: # New empty counter. ext_dict = Counter() for line in file: # Remove ne...
#! /usr/bin/env python2.7 from collections import Counter from pprint import pprint from re import search from sys import argv def count_extension(filename): with open(filename, 'r') as file: # New empty counter. ext_dict = Counter() for line in file: # Remove newlines / carria...
#! /usr/bin/env python2.7 from collections import Counter from pprint import pprint from re import search from sys import argv def count_extension(filename): with open(filename, 'r') as file: # New empty counter. ext_dict = Counter() for line in file: # Remove newlines / carria...
<commit_before>#! /usr/bin/env python2.7 from collections import Counter from pprint import pprint from re import search from sys import argv def count_extension(filename): with open(filename, 'r') as file: # New empty counter. ext_dict = Counter() for line in file: # Remove ne...
0d19453290043ecf96fe3219d00140146b699cb9
python/servo/devenv_commands.py
python/servo/devenv_commands.py
from __future__ import print_function, unicode_literals import json import os import os.path as path import shutil import subprocess import sys import tarfile from time import time import urllib from mach.registrar import Registrar from mach.decorators import ( CommandArgument, CommandProvider, Command, )...
from __future__ import print_function, unicode_literals import json import os import os.path as path import shutil import subprocess import sys import tarfile from time import time import urllib from mach.registrar import Registrar from mach.decorators import ( CommandArgument, CommandProvider, Command, )...
Fix typo in 'mach cargo --help'
Fix typo in 'mach cargo --help'
Python
mpl-2.0
codemac/servo,AnthonyBroadCrawford/servo,zhangjunlei26/servo,Shraddha512/servo,boghison/servo,CJ8664/servo,codemac/servo,ConnorGBrewster/servo,jlegendary/servo,rnestler/servo,notriddle/servo,upsuper/servo,snf/servo,Shraddha512/servo,mdibaiee/servo,samfoo/servo,dagnir/servo,pyfisch/servo,pgonda/servo,ConnorGBrewster/ser...
from __future__ import print_function, unicode_literals import json import os import os.path as path import shutil import subprocess import sys import tarfile from time import time import urllib from mach.registrar import Registrar from mach.decorators import ( CommandArgument, CommandProvider, Command, )...
from __future__ import print_function, unicode_literals import json import os import os.path as path import shutil import subprocess import sys import tarfile from time import time import urllib from mach.registrar import Registrar from mach.decorators import ( CommandArgument, CommandProvider, Command, )...
<commit_before>from __future__ import print_function, unicode_literals import json import os import os.path as path import shutil import subprocess import sys import tarfile from time import time import urllib from mach.registrar import Registrar from mach.decorators import ( CommandArgument, CommandProvider,...
from __future__ import print_function, unicode_literals import json import os import os.path as path import shutil import subprocess import sys import tarfile from time import time import urllib from mach.registrar import Registrar from mach.decorators import ( CommandArgument, CommandProvider, Command, )...
from __future__ import print_function, unicode_literals import json import os import os.path as path import shutil import subprocess import sys import tarfile from time import time import urllib from mach.registrar import Registrar from mach.decorators import ( CommandArgument, CommandProvider, Command, )...
<commit_before>from __future__ import print_function, unicode_literals import json import os import os.path as path import shutil import subprocess import sys import tarfile from time import time import urllib from mach.registrar import Registrar from mach.decorators import ( CommandArgument, CommandProvider,...
b7a80f92b4e2e7227efe5712e512f5a75bc4e67c
locales/seattle/librenms.py
locales/seattle/librenms.py
#!/usr/bin/env python import json import urllib2 librenms = json.loads( urllib2.urlopen(urllib2.Request( 'https://librenms.hamwan.org/api/v0/devices', headers={'X-Auth-Token': '600dc6857a6e2bf200b46e56b78c0049'}, )).read() ) inventory = { "_meta": { "hostvars": {} } } for ke...
#!/usr/bin/env python import json import urllib2 librenms = json.loads( urllib2.urlopen(urllib2.Request( 'https://librenms.hamwan.org/api/v0/devices', headers={'X-Auth-Token': '600dc6857a6e2bf200b46e56b78c0049'}, )).read() ) inventory = { "_meta": { "hostvars": {} }, "all...
Add seattle group to LibreNMS dynamic inventory to trigger seattle group vars.
Add seattle group to LibreNMS dynamic inventory to trigger seattle group vars.
Python
apache-2.0
HamWAN/infrastructure-configs,HamWAN/infrastructure-configs,HamWAN/infrastructure-configs
#!/usr/bin/env python import json import urllib2 librenms = json.loads( urllib2.urlopen(urllib2.Request( 'https://librenms.hamwan.org/api/v0/devices', headers={'X-Auth-Token': '600dc6857a6e2bf200b46e56b78c0049'}, )).read() ) inventory = { "_meta": { "hostvars": {} } } for ke...
#!/usr/bin/env python import json import urllib2 librenms = json.loads( urllib2.urlopen(urllib2.Request( 'https://librenms.hamwan.org/api/v0/devices', headers={'X-Auth-Token': '600dc6857a6e2bf200b46e56b78c0049'}, )).read() ) inventory = { "_meta": { "hostvars": {} }, "all...
<commit_before>#!/usr/bin/env python import json import urllib2 librenms = json.loads( urllib2.urlopen(urllib2.Request( 'https://librenms.hamwan.org/api/v0/devices', headers={'X-Auth-Token': '600dc6857a6e2bf200b46e56b78c0049'}, )).read() ) inventory = { "_meta": { "hostvars": {} ...
#!/usr/bin/env python import json import urllib2 librenms = json.loads( urllib2.urlopen(urllib2.Request( 'https://librenms.hamwan.org/api/v0/devices', headers={'X-Auth-Token': '600dc6857a6e2bf200b46e56b78c0049'}, )).read() ) inventory = { "_meta": { "hostvars": {} }, "all...
#!/usr/bin/env python import json import urllib2 librenms = json.loads( urllib2.urlopen(urllib2.Request( 'https://librenms.hamwan.org/api/v0/devices', headers={'X-Auth-Token': '600dc6857a6e2bf200b46e56b78c0049'}, )).read() ) inventory = { "_meta": { "hostvars": {} } } for ke...
<commit_before>#!/usr/bin/env python import json import urllib2 librenms = json.loads( urllib2.urlopen(urllib2.Request( 'https://librenms.hamwan.org/api/v0/devices', headers={'X-Auth-Token': '600dc6857a6e2bf200b46e56b78c0049'}, )).read() ) inventory = { "_meta": { "hostvars": {} ...
46b8a4d0668c764df85f1e8a94672d81dd112beb
maps/api/views.py
maps/api/views.py
from django.http import HttpResponse def list_question_sets(request): return HttpResponse('Lol, udachi')
import json from django.http import HttpResponse from maps.models import QuestionSet def list_question_sets(request): objects = QuestionSet.objects.all() items = [] for obj in objects: items.append({ 'title': obj.title, 'max_duration': obj.max_duration.seconds, ...
Add API method for question sets list
Add API method for question sets list
Python
mit
sevazhidkov/greenland,sevazhidkov/greenland
from django.http import HttpResponse def list_question_sets(request): return HttpResponse('Lol, udachi') Add API method for question sets list
import json from django.http import HttpResponse from maps.models import QuestionSet def list_question_sets(request): objects = QuestionSet.objects.all() items = [] for obj in objects: items.append({ 'title': obj.title, 'max_duration': obj.max_duration.seconds, ...
<commit_before>from django.http import HttpResponse def list_question_sets(request): return HttpResponse('Lol, udachi') <commit_msg>Add API method for question sets list<commit_after>
import json from django.http import HttpResponse from maps.models import QuestionSet def list_question_sets(request): objects = QuestionSet.objects.all() items = [] for obj in objects: items.append({ 'title': obj.title, 'max_duration': obj.max_duration.seconds, ...
from django.http import HttpResponse def list_question_sets(request): return HttpResponse('Lol, udachi') Add API method for question sets listimport json from django.http import HttpResponse from maps.models import QuestionSet def list_question_sets(request): objects = QuestionSet.objects.all() items = ...
<commit_before>from django.http import HttpResponse def list_question_sets(request): return HttpResponse('Lol, udachi') <commit_msg>Add API method for question sets list<commit_after>import json from django.http import HttpResponse from maps.models import QuestionSet def list_question_sets(request): objects...
3152ee5ca2f21708e428faac5eaadbb403d0a1dc
spacy/tests/serialize/test_serialize_tokenizer.py
spacy/tests/serialize/test_serialize_tokenizer.py
# coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir import pytest @pytest.mark.parametrize('text', ["I can't do this"]) def test_serialize_tokenizer_roundtrip_bytes(en_tokenizer, text): tokenizer_b = en_tokenizer.to_bytes() new_tokenizer = en_tokenizer.from_bytes(tokenize...
# coding: utf-8 from __future__ import unicode_literals from ...util import get_lang_class from ..util import make_tempdir, assert_packed_msg_equal import pytest def load_tokenizer(b): tok = get_lang_class('en').Defaults.create_tokenizer() tok.from_bytes(b) return tok @pytest.mark.parametrize('text', ...
Update serialization tests for tokenizer
Update serialization tests for tokenizer
Python
mit
honnibal/spaCy,honnibal/spaCy,honnibal/spaCy,recognai/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,spacy-io/spaCy,aikramer2/spaCy,recognai/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaC...
# coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir import pytest @pytest.mark.parametrize('text', ["I can't do this"]) def test_serialize_tokenizer_roundtrip_bytes(en_tokenizer, text): tokenizer_b = en_tokenizer.to_bytes() new_tokenizer = en_tokenizer.from_bytes(tokenize...
# coding: utf-8 from __future__ import unicode_literals from ...util import get_lang_class from ..util import make_tempdir, assert_packed_msg_equal import pytest def load_tokenizer(b): tok = get_lang_class('en').Defaults.create_tokenizer() tok.from_bytes(b) return tok @pytest.mark.parametrize('text', ...
<commit_before># coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir import pytest @pytest.mark.parametrize('text', ["I can't do this"]) def test_serialize_tokenizer_roundtrip_bytes(en_tokenizer, text): tokenizer_b = en_tokenizer.to_bytes() new_tokenizer = en_tokenizer.from...
# coding: utf-8 from __future__ import unicode_literals from ...util import get_lang_class from ..util import make_tempdir, assert_packed_msg_equal import pytest def load_tokenizer(b): tok = get_lang_class('en').Defaults.create_tokenizer() tok.from_bytes(b) return tok @pytest.mark.parametrize('text', ...
# coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir import pytest @pytest.mark.parametrize('text', ["I can't do this"]) def test_serialize_tokenizer_roundtrip_bytes(en_tokenizer, text): tokenizer_b = en_tokenizer.to_bytes() new_tokenizer = en_tokenizer.from_bytes(tokenize...
<commit_before># coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir import pytest @pytest.mark.parametrize('text', ["I can't do this"]) def test_serialize_tokenizer_roundtrip_bytes(en_tokenizer, text): tokenizer_b = en_tokenizer.to_bytes() new_tokenizer = en_tokenizer.from...
f8290954b27e655562878d16df7e4793262f50d7
wafer/tickets/management/commands/import_quicket_guest_list.py
wafer/tickets/management/commands/import_quicket_guest_list.py
import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: raise Comma...
import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: raise Comma...
Check CSV header, not column count (and refactor)
Check CSV header, not column count (and refactor)
Python
isc
CarlFK/wafer,CarlFK/wafer,CarlFK/wafer,CarlFK/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: raise Comma...
import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: raise Comma...
<commit_before>import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: ...
import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: raise Comma...
import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: raise Comma...
<commit_before>import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: ...
4a8dbde660361a53a3206097bff9ae95b0edfec7
alg_strongly_connected_graph.py
alg_strongly_connected_graph.py
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dfs_recur(): pass def traverse_dfs_recur(): pass def transpose_graph(): pass def strongly_connected_graph(): """Find strongly connected graphs by Kosaraju's Algorithm.""" def main(): adjace...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dfs_recur(): pass def traverse_dfs_recur(): pass def transpose_graph(): pass def strongly_connected_graph(): """Find strongly connected graphs by Kosaraju's Algorithm.""" def main(): # 3 stron...
Add comment for strongly connected graphs
Add comment for strongly connected graphs
Python
bsd-2-clause
bowen0701/algorithms_data_structures
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dfs_recur(): pass def traverse_dfs_recur(): pass def transpose_graph(): pass def strongly_connected_graph(): """Find strongly connected graphs by Kosaraju's Algorithm.""" def main(): adjace...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dfs_recur(): pass def traverse_dfs_recur(): pass def transpose_graph(): pass def strongly_connected_graph(): """Find strongly connected graphs by Kosaraju's Algorithm.""" def main(): # 3 stron...
<commit_before>from __future__ import absolute_import from __future__ import print_function from __future__ import division def dfs_recur(): pass def traverse_dfs_recur(): pass def transpose_graph(): pass def strongly_connected_graph(): """Find strongly connected graphs by Kosaraju's Algorithm.""" def mai...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dfs_recur(): pass def traverse_dfs_recur(): pass def transpose_graph(): pass def strongly_connected_graph(): """Find strongly connected graphs by Kosaraju's Algorithm.""" def main(): # 3 stron...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dfs_recur(): pass def traverse_dfs_recur(): pass def transpose_graph(): pass def strongly_connected_graph(): """Find strongly connected graphs by Kosaraju's Algorithm.""" def main(): adjace...
<commit_before>from __future__ import absolute_import from __future__ import print_function from __future__ import division def dfs_recur(): pass def traverse_dfs_recur(): pass def transpose_graph(): pass def strongly_connected_graph(): """Find strongly connected graphs by Kosaraju's Algorithm.""" def mai...
14d0669f54b1207d8764a97bd4a73e1d4c45f679
sep/sep_search_result.py
sep/sep_search_result.py
from lxml import html import re import requests from constants import SEP_URL class SEPSearchResult(): query = None results = None def __init__(self, query): self.set_query(query) def set_query(self, query): self.query = str(query).lower().split() @property def url(self): ...
from lxml import html import re import requests from constants import SEP_URL class SEPSearchResult(): query = None results = None def __init__(self, query): self.set_query(query) def set_query(self, query): pattern = re.compile('[^a-zA-Z\d\s]') stripped_query = re.sub(patte...
Use regex to remove non alphanumerics from post titles
New: Use regex to remove non alphanumerics from post titles
Python
mit
AFFogarty/SEP-Bot,AFFogarty/SEP-Bot
from lxml import html import re import requests from constants import SEP_URL class SEPSearchResult(): query = None results = None def __init__(self, query): self.set_query(query) def set_query(self, query): self.query = str(query).lower().split() @property def url(self): ...
from lxml import html import re import requests from constants import SEP_URL class SEPSearchResult(): query = None results = None def __init__(self, query): self.set_query(query) def set_query(self, query): pattern = re.compile('[^a-zA-Z\d\s]') stripped_query = re.sub(patte...
<commit_before>from lxml import html import re import requests from constants import SEP_URL class SEPSearchResult(): query = None results = None def __init__(self, query): self.set_query(query) def set_query(self, query): self.query = str(query).lower().split() @property d...
from lxml import html import re import requests from constants import SEP_URL class SEPSearchResult(): query = None results = None def __init__(self, query): self.set_query(query) def set_query(self, query): pattern = re.compile('[^a-zA-Z\d\s]') stripped_query = re.sub(patte...
from lxml import html import re import requests from constants import SEP_URL class SEPSearchResult(): query = None results = None def __init__(self, query): self.set_query(query) def set_query(self, query): self.query = str(query).lower().split() @property def url(self): ...
<commit_before>from lxml import html import re import requests from constants import SEP_URL class SEPSearchResult(): query = None results = None def __init__(self, query): self.set_query(query) def set_query(self, query): self.query = str(query).lower().split() @property d...
9c91cdeaed24ab994924b9a5485b6cc3feb9dfc0
tutorials/models.py
tutorials/models.py
from django.db import models # Create your models here. class Tutorial(models.Model): title = models.TextField() html = models.TextField() markdown = models.TextField()
from django.db import models from markdownx.models import MarkdownxField # Create your models here. class Tutorial(models.Model): # ToDo: Fields that are out-commented are missing according to the mockup -> datamodel ?? # Category = models.TextField() title = models.TextField() html = models.TextFie...
Add missing Fields according to mockup, Add markdownfield
Add missing Fields according to mockup, Add markdownfield
Python
agpl-3.0
openego/oeplatform,openego/oeplatform,openego/oeplatform,openego/oeplatform
from django.db import models # Create your models here. class Tutorial(models.Model): title = models.TextField() html = models.TextField() markdown = models.TextField()Add missing Fields according to mockup, Add markdownfield
from django.db import models from markdownx.models import MarkdownxField # Create your models here. class Tutorial(models.Model): # ToDo: Fields that are out-commented are missing according to the mockup -> datamodel ?? # Category = models.TextField() title = models.TextField() html = models.TextFie...
<commit_before>from django.db import models # Create your models here. class Tutorial(models.Model): title = models.TextField() html = models.TextField() markdown = models.TextField()<commit_msg>Add missing Fields according to mockup, Add markdownfield<commit_after>
from django.db import models from markdownx.models import MarkdownxField # Create your models here. class Tutorial(models.Model): # ToDo: Fields that are out-commented are missing according to the mockup -> datamodel ?? # Category = models.TextField() title = models.TextField() html = models.TextFie...
from django.db import models # Create your models here. class Tutorial(models.Model): title = models.TextField() html = models.TextField() markdown = models.TextField()Add missing Fields according to mockup, Add markdownfieldfrom django.db import models from markdownx.models import MarkdownxField # Creat...
<commit_before>from django.db import models # Create your models here. class Tutorial(models.Model): title = models.TextField() html = models.TextField() markdown = models.TextField()<commit_msg>Add missing Fields according to mockup, Add markdownfield<commit_after>from django.db import models from markdo...
44e9e06c7db64682340505754af0b69b99cae305
diceware.py
diceware.py
#!/usr/bin/env python import random def read_list(filename): words = [] with open(filename, "r") as wordfile: started = False for line in wordfile: if not started and line == "\n": started = True elif started: if line == "\n": ...
#!/usr/bin/env python import random def read_list(filename): words = [] with open(filename, "r") as wordfile: started = False for line in wordfile: if not started and line == "\n": started = True elif started: if line == "\n": ...
Use SystemRandom to access urandom where available
Use SystemRandom to access urandom where available
Python
mit
davb5/pydiceware
#!/usr/bin/env python import random def read_list(filename): words = [] with open(filename, "r") as wordfile: started = False for line in wordfile: if not started and line == "\n": started = True elif started: if line == "\n": ...
#!/usr/bin/env python import random def read_list(filename): words = [] with open(filename, "r") as wordfile: started = False for line in wordfile: if not started and line == "\n": started = True elif started: if line == "\n": ...
<commit_before>#!/usr/bin/env python import random def read_list(filename): words = [] with open(filename, "r") as wordfile: started = False for line in wordfile: if not started and line == "\n": started = True elif started: if line == "\...
#!/usr/bin/env python import random def read_list(filename): words = [] with open(filename, "r") as wordfile: started = False for line in wordfile: if not started and line == "\n": started = True elif started: if line == "\n": ...
#!/usr/bin/env python import random def read_list(filename): words = [] with open(filename, "r") as wordfile: started = False for line in wordfile: if not started and line == "\n": started = True elif started: if line == "\n": ...
<commit_before>#!/usr/bin/env python import random def read_list(filename): words = [] with open(filename, "r") as wordfile: started = False for line in wordfile: if not started and line == "\n": started = True elif started: if line == "\...
5081734e07497e26834485891d634a7f3ac7ef28
pies/collections.py
pies/collections.py
from __future__ import absolute_import from collections import * from .version_info import PY2 if PY2: from UserString import * from UserList import * from ordereddict import OrderedDict
from __future__ import absolute_import from collections import * from .version_info import PY2 if PY2: from UserString import * from UserList import * import sys if sys.version_info < (2, 7): from ordereddict import OrderedDict
Fix import of ordered dict on python 2.7
Fix import of ordered dict on python 2.7
Python
mit
AbsoluteMSTR/pies,timothycrosley/pies,lisongmin/pies,AbsoluteMSTR/pies,lisongmin/pies,timothycrosley/pies
from __future__ import absolute_import from collections import * from .version_info import PY2 if PY2: from UserString import * from UserList import * from ordereddict import OrderedDict Fix import of ordered dict on python 2.7
from __future__ import absolute_import from collections import * from .version_info import PY2 if PY2: from UserString import * from UserList import * import sys if sys.version_info < (2, 7): from ordereddict import OrderedDict
<commit_before>from __future__ import absolute_import from collections import * from .version_info import PY2 if PY2: from UserString import * from UserList import * from ordereddict import OrderedDict <commit_msg>Fix import of ordered dict on python 2.7<commit_after>
from __future__ import absolute_import from collections import * from .version_info import PY2 if PY2: from UserString import * from UserList import * import sys if sys.version_info < (2, 7): from ordereddict import OrderedDict
from __future__ import absolute_import from collections import * from .version_info import PY2 if PY2: from UserString import * from UserList import * from ordereddict import OrderedDict Fix import of ordered dict on python 2.7from __future__ import absolute_import from collections import * from .versi...
<commit_before>from __future__ import absolute_import from collections import * from .version_info import PY2 if PY2: from UserString import * from UserList import * from ordereddict import OrderedDict <commit_msg>Fix import of ordered dict on python 2.7<commit_after>from __future__ import absolute_impor...
fca148d85b0deb16c988473ddab651529653e9de
cheroot/__init__.py
cheroot/__init__.py
"""High-performance, pure-Python HTTP server used by CherryPy.""" from __future__ import absolute_import, division, print_function __metaclass__ = type try: import pkg_resources except ImportError: pass try: __version__ = pkg_resources.get_distribution('cheroot').version except Exception: __version_...
"""High-performance, pure-Python HTTP server used by CherryPy.""" try: import pkg_resources except ImportError: pass try: __version__ = pkg_resources.get_distribution('cheroot').version except Exception: __version__ = 'unknown'
Remove compatibility code from cheroot
Remove compatibility code from cheroot
Python
bsd-3-clause
cherrypy/cheroot
"""High-performance, pure-Python HTTP server used by CherryPy.""" from __future__ import absolute_import, division, print_function __metaclass__ = type try: import pkg_resources except ImportError: pass try: __version__ = pkg_resources.get_distribution('cheroot').version except Exception: __version_...
"""High-performance, pure-Python HTTP server used by CherryPy.""" try: import pkg_resources except ImportError: pass try: __version__ = pkg_resources.get_distribution('cheroot').version except Exception: __version__ = 'unknown'
<commit_before>"""High-performance, pure-Python HTTP server used by CherryPy.""" from __future__ import absolute_import, division, print_function __metaclass__ = type try: import pkg_resources except ImportError: pass try: __version__ = pkg_resources.get_distribution('cheroot').version except Exception:...
"""High-performance, pure-Python HTTP server used by CherryPy.""" try: import pkg_resources except ImportError: pass try: __version__ = pkg_resources.get_distribution('cheroot').version except Exception: __version__ = 'unknown'
"""High-performance, pure-Python HTTP server used by CherryPy.""" from __future__ import absolute_import, division, print_function __metaclass__ = type try: import pkg_resources except ImportError: pass try: __version__ = pkg_resources.get_distribution('cheroot').version except Exception: __version_...
<commit_before>"""High-performance, pure-Python HTTP server used by CherryPy.""" from __future__ import absolute_import, division, print_function __metaclass__ = type try: import pkg_resources except ImportError: pass try: __version__ = pkg_resources.get_distribution('cheroot').version except Exception:...
1a93c58e278712a2c52f36b098a570a7f48c7ef2
taOonja/game/views.py
taOonja/game/views.py
from django.shortcuts import render from django.views.generic.list import ListView from django.views.generic.detail import DetailView from game.models import * class LocationListView(ListView): template_name = 'game/location_list.html' context_object_name = 'location_list' def get_queryset(self): ...
from django.shortcuts import render from django.views.generic.list import ListView from django.views.generic.detail import DetailView from game.models import Location class LocationListView(ListView): template_name = 'game/location_list.html' context_object_name = 'location_list' def get_queryset(self): ...
Change View According to model Changes
Change View According to model Changes
Python
mit
Javid-Izadfar/TaOonja,Javid-Izadfar/TaOonja,Javid-Izadfar/TaOonja
from django.shortcuts import render from django.views.generic.list import ListView from django.views.generic.detail import DetailView from game.models import * class LocationListView(ListView): template_name = 'game/location_list.html' context_object_name = 'location_list' def get_queryset(self): ...
from django.shortcuts import render from django.views.generic.list import ListView from django.views.generic.detail import DetailView from game.models import Location class LocationListView(ListView): template_name = 'game/location_list.html' context_object_name = 'location_list' def get_queryset(self): ...
<commit_before>from django.shortcuts import render from django.views.generic.list import ListView from django.views.generic.detail import DetailView from game.models import * class LocationListView(ListView): template_name = 'game/location_list.html' context_object_name = 'location_list' def get_queryset(...
from django.shortcuts import render from django.views.generic.list import ListView from django.views.generic.detail import DetailView from game.models import Location class LocationListView(ListView): template_name = 'game/location_list.html' context_object_name = 'location_list' def get_queryset(self): ...
from django.shortcuts import render from django.views.generic.list import ListView from django.views.generic.detail import DetailView from game.models import * class LocationListView(ListView): template_name = 'game/location_list.html' context_object_name = 'location_list' def get_queryset(self): ...
<commit_before>from django.shortcuts import render from django.views.generic.list import ListView from django.views.generic.detail import DetailView from game.models import * class LocationListView(ListView): template_name = 'game/location_list.html' context_object_name = 'location_list' def get_queryset(...
c57290f07071a42a0744667974922fda897e6354
slaveapi/__init__.py
slaveapi/__init__.py
__version_info__ = ("1", "0", "17") __version__ = ".".join(__version_info__)
__version_info__ = ("1", "0", "18") __version__ = ".".join(__version_info__)
Bump ver for bustage fix
Bump ver for bustage fix
Python
mpl-2.0
lundjordan/slaveapi
__version_info__ = ("1", "0", "17") __version__ = ".".join(__version_info__) Bump ver for bustage fix
__version_info__ = ("1", "0", "18") __version__ = ".".join(__version_info__)
<commit_before>__version_info__ = ("1", "0", "17") __version__ = ".".join(__version_info__) <commit_msg>Bump ver for bustage fix<commit_after>
__version_info__ = ("1", "0", "18") __version__ = ".".join(__version_info__)
__version_info__ = ("1", "0", "17") __version__ = ".".join(__version_info__) Bump ver for bustage fix__version_info__ = ("1", "0", "18") __version__ = ".".join(__version_info__)
<commit_before>__version_info__ = ("1", "0", "17") __version__ = ".".join(__version_info__) <commit_msg>Bump ver for bustage fix<commit_after>__version_info__ = ("1", "0", "18") __version__ = ".".join(__version_info__)
99880b935c939ab7128a788cc09cd759f3d397b2
src/passgen.py
src/passgen.py
import string import random def passgen(length=8): """Generate a strong password with *length* characters""" pool = string.ascii_uppercase + string.ascii_lowercase + string.digits return ''.join(random.SystemRandom().choice(pool) for _ in range(length)) def main(): for _ in range(10): print ...
import string import random import argparse def passgen(length=8): """Generate a strong password with *length* characters""" pool = string.ascii_uppercase + string.ascii_lowercase + string.digits return ''.join(random.SystemRandom().choice(pool) for _ in range(length)) def main(): parser = argparse....
Add length argument to the main script
Add length argument to the main script
Python
mit
soslan/passgen
import string import random def passgen(length=8): """Generate a strong password with *length* characters""" pool = string.ascii_uppercase + string.ascii_lowercase + string.digits return ''.join(random.SystemRandom().choice(pool) for _ in range(length)) def main(): for _ in range(10): print ...
import string import random import argparse def passgen(length=8): """Generate a strong password with *length* characters""" pool = string.ascii_uppercase + string.ascii_lowercase + string.digits return ''.join(random.SystemRandom().choice(pool) for _ in range(length)) def main(): parser = argparse....
<commit_before>import string import random def passgen(length=8): """Generate a strong password with *length* characters""" pool = string.ascii_uppercase + string.ascii_lowercase + string.digits return ''.join(random.SystemRandom().choice(pool) for _ in range(length)) def main(): for _ in range(10):...
import string import random import argparse def passgen(length=8): """Generate a strong password with *length* characters""" pool = string.ascii_uppercase + string.ascii_lowercase + string.digits return ''.join(random.SystemRandom().choice(pool) for _ in range(length)) def main(): parser = argparse....
import string import random def passgen(length=8): """Generate a strong password with *length* characters""" pool = string.ascii_uppercase + string.ascii_lowercase + string.digits return ''.join(random.SystemRandom().choice(pool) for _ in range(length)) def main(): for _ in range(10): print ...
<commit_before>import string import random def passgen(length=8): """Generate a strong password with *length* characters""" pool = string.ascii_uppercase + string.ascii_lowercase + string.digits return ''.join(random.SystemRandom().choice(pool) for _ in range(length)) def main(): for _ in range(10):...
0053cba05e19f640b5d30d02a130f6c994f68f8e
speedcenter/codespeed/admin.py
speedcenter/codespeed/admin.py
# -*- coding: utf-8 -*- from codespeed.models import Project, Revision, Executable, Benchmark, Result, Environment from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): list_display = ('name', 'repo_type', 'repo_path', 'track') admin.site.register(Project, ProjectAdmin) class RevisionAdmin(a...
# -*- coding: utf-8 -*- from codespeed.models import Project, Revision, Executable, Benchmark, Result, Environment from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): list_display = ('name', 'repo_type', 'repo_path', 'track') admin.site.register(Project, ProjectAdmin) class RevisionAdmin(a...
Order Benchmark by name in the Admin
Order Benchmark by name in the Admin
Python
lgpl-2.1
cykl/codespeed,alex/codespeed,nomeata/codespeed,alex/codespeed,cykl/codespeed,nomeata/codespeed
# -*- coding: utf-8 -*- from codespeed.models import Project, Revision, Executable, Benchmark, Result, Environment from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): list_display = ('name', 'repo_type', 'repo_path', 'track') admin.site.register(Project, ProjectAdmin) class RevisionAdmin(a...
# -*- coding: utf-8 -*- from codespeed.models import Project, Revision, Executable, Benchmark, Result, Environment from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): list_display = ('name', 'repo_type', 'repo_path', 'track') admin.site.register(Project, ProjectAdmin) class RevisionAdmin(a...
<commit_before># -*- coding: utf-8 -*- from codespeed.models import Project, Revision, Executable, Benchmark, Result, Environment from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): list_display = ('name', 'repo_type', 'repo_path', 'track') admin.site.register(Project, ProjectAdmin) class ...
# -*- coding: utf-8 -*- from codespeed.models import Project, Revision, Executable, Benchmark, Result, Environment from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): list_display = ('name', 'repo_type', 'repo_path', 'track') admin.site.register(Project, ProjectAdmin) class RevisionAdmin(a...
# -*- coding: utf-8 -*- from codespeed.models import Project, Revision, Executable, Benchmark, Result, Environment from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): list_display = ('name', 'repo_type', 'repo_path', 'track') admin.site.register(Project, ProjectAdmin) class RevisionAdmin(a...
<commit_before># -*- coding: utf-8 -*- from codespeed.models import Project, Revision, Executable, Benchmark, Result, Environment from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): list_display = ('name', 'repo_type', 'repo_path', 'track') admin.site.register(Project, ProjectAdmin) class ...
b8d8ac842f0c22607a32995a48180261d6a84c39
cumulus/management/commands/collectstatic.py
cumulus/management/commands/collectstatic.py
import hashlib from django.contrib.staticfiles.management.commands import collectstatic from cumulus.storage import CloudFilesStorage class Command(collectstatic.Command): def delete_file(self, path, prefixed_path, source_storage): """ Checks if the target file should be deleted if it already ex...
import hashlib from django.contrib.staticfiles.management.commands import collectstatic from cumulus.storage import CloudFilesStorage class Command(collectstatic.Command): def delete_file(self, path, prefixed_path, source_storage): """ Checks if the target file should be deleted if it already ex...
Fix collecstatic command return value
Fix collecstatic command return value delete_file() method should return a boolean, was missing a return when calling super()
Python
bsd-3-clause
SmithsonianEnterprises/django-cumulus,absoludity/django-cumulus,bennylope/django-cumulus,absoludity/django-cumulus,ferrix/django-cumulus,django-cumulus/django-cumulus,bennylope/django-cumulus,elsmorian/django-cumulus,ImaginaryLandscape/django-cumulus,rizumu/django-cumulus,SmithsonianEnterprises/django-cumulus,CoachLogi...
import hashlib from django.contrib.staticfiles.management.commands import collectstatic from cumulus.storage import CloudFilesStorage class Command(collectstatic.Command): def delete_file(self, path, prefixed_path, source_storage): """ Checks if the target file should be deleted if it already ex...
import hashlib from django.contrib.staticfiles.management.commands import collectstatic from cumulus.storage import CloudFilesStorage class Command(collectstatic.Command): def delete_file(self, path, prefixed_path, source_storage): """ Checks if the target file should be deleted if it already ex...
<commit_before>import hashlib from django.contrib.staticfiles.management.commands import collectstatic from cumulus.storage import CloudFilesStorage class Command(collectstatic.Command): def delete_file(self, path, prefixed_path, source_storage): """ Checks if the target file should be deleted i...
import hashlib from django.contrib.staticfiles.management.commands import collectstatic from cumulus.storage import CloudFilesStorage class Command(collectstatic.Command): def delete_file(self, path, prefixed_path, source_storage): """ Checks if the target file should be deleted if it already ex...
import hashlib from django.contrib.staticfiles.management.commands import collectstatic from cumulus.storage import CloudFilesStorage class Command(collectstatic.Command): def delete_file(self, path, prefixed_path, source_storage): """ Checks if the target file should be deleted if it already ex...
<commit_before>import hashlib from django.contrib.staticfiles.management.commands import collectstatic from cumulus.storage import CloudFilesStorage class Command(collectstatic.Command): def delete_file(self, path, prefixed_path, source_storage): """ Checks if the target file should be deleted i...
4ace9edb7432b5c0de677924301477ce86480486
common/safeprint.py
common/safeprint.py
import multiprocessing, sys from datetime import datetime from common import settings print_lock = multiprocessing.RLock() def safeprint(msg, verbosity=0): """Prints in a thread-lock, taking a single object as an argument""" string = ("[" + str(multiprocessing.current_process().pid) + "] " + da...
import multiprocessing, sys from datetime import datetime from common import settings print_lock = multiprocessing.RLock() max_digits = 0 def safeprint(msg, verbosity=0): """Prints in a thread-lock, taking a single object as an argument""" pid = str(multiprocessing.current_process().pid) max_digits = max(...
Make thread marker consistent length
Make thread marker consistent length
Python
mit
gappleto97/Senior-Project
import multiprocessing, sys from datetime import datetime from common import settings print_lock = multiprocessing.RLock() def safeprint(msg, verbosity=0): """Prints in a thread-lock, taking a single object as an argument""" string = ("[" + str(multiprocessing.current_process().pid) + "] " + da...
import multiprocessing, sys from datetime import datetime from common import settings print_lock = multiprocessing.RLock() max_digits = 0 def safeprint(msg, verbosity=0): """Prints in a thread-lock, taking a single object as an argument""" pid = str(multiprocessing.current_process().pid) max_digits = max(...
<commit_before>import multiprocessing, sys from datetime import datetime from common import settings print_lock = multiprocessing.RLock() def safeprint(msg, verbosity=0): """Prints in a thread-lock, taking a single object as an argument""" string = ("[" + str(multiprocessing.current_process().pid) + "] " + ...
import multiprocessing, sys from datetime import datetime from common import settings print_lock = multiprocessing.RLock() max_digits = 0 def safeprint(msg, verbosity=0): """Prints in a thread-lock, taking a single object as an argument""" pid = str(multiprocessing.current_process().pid) max_digits = max(...
import multiprocessing, sys from datetime import datetime from common import settings print_lock = multiprocessing.RLock() def safeprint(msg, verbosity=0): """Prints in a thread-lock, taking a single object as an argument""" string = ("[" + str(multiprocessing.current_process().pid) + "] " + da...
<commit_before>import multiprocessing, sys from datetime import datetime from common import settings print_lock = multiprocessing.RLock() def safeprint(msg, verbosity=0): """Prints in a thread-lock, taking a single object as an argument""" string = ("[" + str(multiprocessing.current_process().pid) + "] " + ...
ac8dbe8f70061906035ea24ae6bae91f0432dca8
astropy/utils/setup_package.py
astropy/utils/setup_package.py
from distutils.core import Extension from os.path import dirname, join def get_extensions(): ROOT = dirname(__file__) return [ Extension('astropy.utils._compiler', [join(ROOT, 'src', 'compiler.c')]) ]
from distutils.core import Extension from os.path import dirname, join, relpath def get_extensions(): ROOT = dirname(__file__) return [ Extension('astropy.utils._compiler', [relpath(join(ROOT, 'src', 'compiler.c'))]) ]
Make sure to use the relative path for all C extension source files. Otherwise distuils' MSVC compiler generates some potentially long (too long for Windows) pathnames in the build\temp dir for various compiler artifacts. (This was particularly problematic in Jenkins, where having multiple configuration matrix axes can...
Make sure to use the relative path for all C extension source files. Otherwise distuils' MSVC compiler generates some potentially long (too long for Windows) pathnames in the build\temp dir for various compiler artifacts. (This was particularly problematic in Jenkins, where having multiple configuration matrix axes c...
Python
bsd-3-clause
MSeifert04/astropy,pllim/astropy,funbaker/astropy,stargaser/astropy,lpsinger/astropy,DougBurke/astropy,larrybradley/astropy,AustereCuriosity/astropy,dhomeier/astropy,saimn/astropy,mhvk/astropy,tbabej/astropy,DougBurke/astropy,kelle/astropy,AustereCuriosity/astropy,saimn/astropy,mhvk/astropy,bsipocz/astropy,funbaker/ast...
from distutils.core import Extension from os.path import dirname, join def get_extensions(): ROOT = dirname(__file__) return [ Extension('astropy.utils._compiler', [join(ROOT, 'src', 'compiler.c')]) ] Make sure to use the relative path for all C extension source files. Othe...
from distutils.core import Extension from os.path import dirname, join, relpath def get_extensions(): ROOT = dirname(__file__) return [ Extension('astropy.utils._compiler', [relpath(join(ROOT, 'src', 'compiler.c'))]) ]
<commit_before>from distutils.core import Extension from os.path import dirname, join def get_extensions(): ROOT = dirname(__file__) return [ Extension('astropy.utils._compiler', [join(ROOT, 'src', 'compiler.c')]) ] <commit_msg>Make sure to use the relative path for all C ex...
from distutils.core import Extension from os.path import dirname, join, relpath def get_extensions(): ROOT = dirname(__file__) return [ Extension('astropy.utils._compiler', [relpath(join(ROOT, 'src', 'compiler.c'))]) ]
from distutils.core import Extension from os.path import dirname, join def get_extensions(): ROOT = dirname(__file__) return [ Extension('astropy.utils._compiler', [join(ROOT, 'src', 'compiler.c')]) ] Make sure to use the relative path for all C extension source files. Othe...
<commit_before>from distutils.core import Extension from os.path import dirname, join def get_extensions(): ROOT = dirname(__file__) return [ Extension('astropy.utils._compiler', [join(ROOT, 'src', 'compiler.c')]) ] <commit_msg>Make sure to use the relative path for all C ex...
bab9464394c91f63786c50080292347339aa122a
bonemapy_version.py
bonemapy_version.py
__version__ = '0.2.2'
# -*- coding: utf-8 -*- # Copyright (C) 2013 Michael Hogg # This file is part of bonemapy - See LICENSE.txt for information on usage and redistribution __version__ = '0.2.2'
Add license + redist info to version file
Add license + redist info to version file
Python
mit
mhogg/bonemapy
__version__ = '0.2.2'Add license + redist info to version file
# -*- coding: utf-8 -*- # Copyright (C) 2013 Michael Hogg # This file is part of bonemapy - See LICENSE.txt for information on usage and redistribution __version__ = '0.2.2'
<commit_before> __version__ = '0.2.2'<commit_msg>Add license + redist info to version file<commit_after>
# -*- coding: utf-8 -*- # Copyright (C) 2013 Michael Hogg # This file is part of bonemapy - See LICENSE.txt for information on usage and redistribution __version__ = '0.2.2'
__version__ = '0.2.2'Add license + redist info to version file# -*- coding: utf-8 -*- # Copyright (C) 2013 Michael Hogg # This file is part of bonemapy - See LICENSE.txt for information on usage and redistribution __version__ = '0.2.2'
<commit_before> __version__ = '0.2.2'<commit_msg>Add license + redist info to version file<commit_after># -*- coding: utf-8 -*- # Copyright (C) 2013 Michael Hogg # This file is part of bonemapy - See LICENSE.txt for information on usage and redistribution __version__ = '0.2.2'
6d816ac65cd26601440876295cf70955f172d6d0
organizer/models.py
organizer/models.py
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
Add options to Startup model fields.
Ch03: Add options to Startup model fields. [skip ci] Field options allow us to easily customize behavior of a field. Global Field Options: https://docs.djangoproject.com/en/1.8/ref/models/fields/#db-index https://docs.djangoproject.com/en/1.8/ref/models/fields/#help-text https://docs.djangoproject.com/en...
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
<commit_before>from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
<commit_before>from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label...
58eb2f88821f7284c744838725351ddff67dd7f4
website/views.py
website/views.py
from django.template import RequestContext from website.models import Restaurant, OpenTime, BaseModel from website.api import export_data from django.shortcuts import render_to_response from django.http import HttpResponse from django.views.decorators.http import condition import hashlib import json def restaurant_gr...
from django.template import RequestContext from website.models import Restaurant, OpenTime, BaseModel from website.api import export_data from django.shortcuts import render_to_response from django.http import HttpResponse from django.views.decorators.http import condition import hashlib import json def restaurant_gr...
Add pretty printing for API
Add pretty printing for API
Python
apache-2.0
srct/whats-open,srct/whats-open,srct/whats-open
from django.template import RequestContext from website.models import Restaurant, OpenTime, BaseModel from website.api import export_data from django.shortcuts import render_to_response from django.http import HttpResponse from django.views.decorators.http import condition import hashlib import json def restaurant_gr...
from django.template import RequestContext from website.models import Restaurant, OpenTime, BaseModel from website.api import export_data from django.shortcuts import render_to_response from django.http import HttpResponse from django.views.decorators.http import condition import hashlib import json def restaurant_gr...
<commit_before>from django.template import RequestContext from website.models import Restaurant, OpenTime, BaseModel from website.api import export_data from django.shortcuts import render_to_response from django.http import HttpResponse from django.views.decorators.http import condition import hashlib import json de...
from django.template import RequestContext from website.models import Restaurant, OpenTime, BaseModel from website.api import export_data from django.shortcuts import render_to_response from django.http import HttpResponse from django.views.decorators.http import condition import hashlib import json def restaurant_gr...
from django.template import RequestContext from website.models import Restaurant, OpenTime, BaseModel from website.api import export_data from django.shortcuts import render_to_response from django.http import HttpResponse from django.views.decorators.http import condition import hashlib import json def restaurant_gr...
<commit_before>from django.template import RequestContext from website.models import Restaurant, OpenTime, BaseModel from website.api import export_data from django.shortcuts import render_to_response from django.http import HttpResponse from django.views.decorators.http import condition import hashlib import json de...
b56a198cd58787dff5be1f7fa476e0d75fd17e88
notifications/upcoming_match.py
notifications/upcoming_match.py
from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class UpcomingMatchNotification(BaseNotification): def __init__(self, match, event): self.match = match self.event = event def _build_dict(self): data = {} data[...
from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class UpcomingMatchNotification(BaseNotification): def __init__(self, match, event): self.match = match self.event = event def _build_dict(self): data = {} data[...
Update match modified time when we mark push as sent
Update match modified time when we mark push as sent
Python
mit
synth3tk/the-blue-alliance,josephbisch/the-blue-alliance,1fish2/the-blue-alliance,fangeugene/the-blue-alliance,jaredhasenklein/the-blue-alliance,bvisness/the-blue-alliance,phil-lopreiato/the-blue-alliance,1fish2/the-blue-alliance,verycumbersome/the-blue-alliance,fangeugene/the-blue-alliance,josephbisch/the-blue-allianc...
from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class UpcomingMatchNotification(BaseNotification): def __init__(self, match, event): self.match = match self.event = event def _build_dict(self): data = {} data[...
from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class UpcomingMatchNotification(BaseNotification): def __init__(self, match, event): self.match = match self.event = event def _build_dict(self): data = {} data[...
<commit_before>from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class UpcomingMatchNotification(BaseNotification): def __init__(self, match, event): self.match = match self.event = event def _build_dict(self): data = {...
from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class UpcomingMatchNotification(BaseNotification): def __init__(self, match, event): self.match = match self.event = event def _build_dict(self): data = {} data[...
from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class UpcomingMatchNotification(BaseNotification): def __init__(self, match, event): self.match = match self.event = event def _build_dict(self): data = {} data[...
<commit_before>from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class UpcomingMatchNotification(BaseNotification): def __init__(self, match, event): self.match = match self.event = event def _build_dict(self): data = {...
30c019447bdf99589383a50b9b68d5ae2dcc76a8
test/inventory_api.py
test/inventory_api.py
#!/usr/bin/env python import json import sys from optparse import OptionParser parser = OptionParser() parser.add_option('-l', '--list', default=False, dest="list_hosts", action="store_true") parser.add_option('-H', '--host', default=None, dest="host") parser.add_option('-e', '--extra-vars', default=None, dest="extr...
#!/usr/bin/env python import json import sys from optparse import OptionParser parser = OptionParser() parser.add_option('-l', '--list', default=False, dest="list_hosts", action="store_true") parser.add_option('-H', '--host', default=None, dest="host") parser.add_option('-e', '--extra-vars', default=None, dest="extr...
Fix typo in inventory API test script.
Fix typo in inventory API test script.
Python
mit
thaim/ansible,thaim/ansible
#!/usr/bin/env python import json import sys from optparse import OptionParser parser = OptionParser() parser.add_option('-l', '--list', default=False, dest="list_hosts", action="store_true") parser.add_option('-H', '--host', default=None, dest="host") parser.add_option('-e', '--extra-vars', default=None, dest="extr...
#!/usr/bin/env python import json import sys from optparse import OptionParser parser = OptionParser() parser.add_option('-l', '--list', default=False, dest="list_hosts", action="store_true") parser.add_option('-H', '--host', default=None, dest="host") parser.add_option('-e', '--extra-vars', default=None, dest="extr...
<commit_before>#!/usr/bin/env python import json import sys from optparse import OptionParser parser = OptionParser() parser.add_option('-l', '--list', default=False, dest="list_hosts", action="store_true") parser.add_option('-H', '--host', default=None, dest="host") parser.add_option('-e', '--extra-vars', default=N...
#!/usr/bin/env python import json import sys from optparse import OptionParser parser = OptionParser() parser.add_option('-l', '--list', default=False, dest="list_hosts", action="store_true") parser.add_option('-H', '--host', default=None, dest="host") parser.add_option('-e', '--extra-vars', default=None, dest="extr...
#!/usr/bin/env python import json import sys from optparse import OptionParser parser = OptionParser() parser.add_option('-l', '--list', default=False, dest="list_hosts", action="store_true") parser.add_option('-H', '--host', default=None, dest="host") parser.add_option('-e', '--extra-vars', default=None, dest="extr...
<commit_before>#!/usr/bin/env python import json import sys from optparse import OptionParser parser = OptionParser() parser.add_option('-l', '--list', default=False, dest="list_hosts", action="store_true") parser.add_option('-H', '--host', default=None, dest="host") parser.add_option('-e', '--extra-vars', default=N...
02b08ce32a17d62bc54d648e2fe53282aa38651e
core/build/views.py
core/build/views.py
from core.build.subnet import build_subnet from core.network.models import Network from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse import pdb def build_network(request, network_pk): network = get_object_or_404(Network, pk=network_pk) if request.GET.pop(...
from core.build.subnet import build_subnet from core.network.models import Network from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse import pdb def build_network(request, network_pk): network = get_object_or_404(Network, pk=network_pk) if request.GET.get(...
Revert "use pop instead of get because it doens't cause uncaught exceptions."
Revert "use pop instead of get because it doens't cause uncaught exceptions." This reverts commit 7aa3e4128b9df890a2683faee0ebe2ee8e64ce33.
Python
bsd-3-clause
rtucker-mozilla/mozilla_inventory,rtucker-mozilla/mozilla_inventory,mozilla/inventory,mozilla/inventory,rtucker-mozilla/mozilla_inventory,rtucker-mozilla/mozilla_inventory,mozilla/inventory,rtucker-mozilla/inventory,rtucker-mozilla/inventory,rtucker-mozilla/inventory,rtucker-mozilla/inventory,rtucker-mozilla/mozilla_in...
from core.build.subnet import build_subnet from core.network.models import Network from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse import pdb def build_network(request, network_pk): network = get_object_or_404(Network, pk=network_pk) if request.GET.pop(...
from core.build.subnet import build_subnet from core.network.models import Network from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse import pdb def build_network(request, network_pk): network = get_object_or_404(Network, pk=network_pk) if request.GET.get(...
<commit_before>from core.build.subnet import build_subnet from core.network.models import Network from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse import pdb def build_network(request, network_pk): network = get_object_or_404(Network, pk=network_pk) if r...
from core.build.subnet import build_subnet from core.network.models import Network from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse import pdb def build_network(request, network_pk): network = get_object_or_404(Network, pk=network_pk) if request.GET.get(...
from core.build.subnet import build_subnet from core.network.models import Network from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse import pdb def build_network(request, network_pk): network = get_object_or_404(Network, pk=network_pk) if request.GET.pop(...
<commit_before>from core.build.subnet import build_subnet from core.network.models import Network from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse import pdb def build_network(request, network_pk): network = get_object_or_404(Network, pk=network_pk) if r...
50783ead4aab7dc2ea32b0045ff12a0bacf2b21d
challenge/models.py
challenge/models.py
from datetime import datetime, timedelta from django.db import models CHALLENGE_STATUS_CHOICES = ( ('NW', 'New'), ('IP', 'In Progress'), ('CP', 'Completed'), ) class Challenge(models.Model): title = models.CharField('Challenge Title', max_length = 200) starts = models.DateTimeField('Start Date', d...
from datetime import datetime, timedelta from django.db import models from django.core.urlresolvers import reverse CHALLENGE_STATUS_CHOICES = ( ('NW', 'New'), ('IP', 'In Progress'), ('CP', 'Completed'), ) class Challenge(models.Model): title = models.CharField('Challenge Title', max_length = 200) ...
Use reverse() instead of a hardcoded url for Challenge
Use reverse() instead of a hardcoded url for Challenge Instead of hardcoding the url in Challenge.get_absolute_url(), use reverse(). Signed-off-by: Sebastian Nowicki <[email protected]>
Python
bsd-3-clause
wraithan/archcode
from datetime import datetime, timedelta from django.db import models CHALLENGE_STATUS_CHOICES = ( ('NW', 'New'), ('IP', 'In Progress'), ('CP', 'Completed'), ) class Challenge(models.Model): title = models.CharField('Challenge Title', max_length = 200) starts = models.DateTimeField('Start Date', d...
from datetime import datetime, timedelta from django.db import models from django.core.urlresolvers import reverse CHALLENGE_STATUS_CHOICES = ( ('NW', 'New'), ('IP', 'In Progress'), ('CP', 'Completed'), ) class Challenge(models.Model): title = models.CharField('Challenge Title', max_length = 200) ...
<commit_before>from datetime import datetime, timedelta from django.db import models CHALLENGE_STATUS_CHOICES = ( ('NW', 'New'), ('IP', 'In Progress'), ('CP', 'Completed'), ) class Challenge(models.Model): title = models.CharField('Challenge Title', max_length = 200) starts = models.DateTimeField(...
from datetime import datetime, timedelta from django.db import models from django.core.urlresolvers import reverse CHALLENGE_STATUS_CHOICES = ( ('NW', 'New'), ('IP', 'In Progress'), ('CP', 'Completed'), ) class Challenge(models.Model): title = models.CharField('Challenge Title', max_length = 200) ...
from datetime import datetime, timedelta from django.db import models CHALLENGE_STATUS_CHOICES = ( ('NW', 'New'), ('IP', 'In Progress'), ('CP', 'Completed'), ) class Challenge(models.Model): title = models.CharField('Challenge Title', max_length = 200) starts = models.DateTimeField('Start Date', d...
<commit_before>from datetime import datetime, timedelta from django.db import models CHALLENGE_STATUS_CHOICES = ( ('NW', 'New'), ('IP', 'In Progress'), ('CP', 'Completed'), ) class Challenge(models.Model): title = models.CharField('Challenge Title', max_length = 200) starts = models.DateTimeField(...
b149e2089ee819f59e920f8c295c623dce813ab7
was/photo/urls.py
was/photo/urls.py
from django.conf.urls import url from .views import (upload_photo_artist, delete_photo_artist, AlbumListView, CreateAlbumView) urlpatterns = [ url(r'^upload/?$', upload_photo_artist, name='upload_photo_artist'), url(r'^(?P<photo_id>\d+)/delete/$', delete_photo_artist, name='delete_photo_ar...
from django.conf.urls import url from django.contrib.auth.decorators import login_required from .views import (upload_photo_artist, delete_photo_artist, AlbumListView, CreateAlbumView) urlpatterns = [ url(r'^upload/?$', upload_photo_artist, name='upload_photo_artist'), url(r'^(?P<photo_id>...
Add login requirement on create album view
Add login requirement on create album view
Python
mit
KeserOner/where-artists-share,KeserOner/where-artists-share
from django.conf.urls import url from .views import (upload_photo_artist, delete_photo_artist, AlbumListView, CreateAlbumView) urlpatterns = [ url(r'^upload/?$', upload_photo_artist, name='upload_photo_artist'), url(r'^(?P<photo_id>\d+)/delete/$', delete_photo_artist, name='delete_photo_ar...
from django.conf.urls import url from django.contrib.auth.decorators import login_required from .views import (upload_photo_artist, delete_photo_artist, AlbumListView, CreateAlbumView) urlpatterns = [ url(r'^upload/?$', upload_photo_artist, name='upload_photo_artist'), url(r'^(?P<photo_id>...
<commit_before>from django.conf.urls import url from .views import (upload_photo_artist, delete_photo_artist, AlbumListView, CreateAlbumView) urlpatterns = [ url(r'^upload/?$', upload_photo_artist, name='upload_photo_artist'), url(r'^(?P<photo_id>\d+)/delete/$', delete_photo_artist, name='...
from django.conf.urls import url from django.contrib.auth.decorators import login_required from .views import (upload_photo_artist, delete_photo_artist, AlbumListView, CreateAlbumView) urlpatterns = [ url(r'^upload/?$', upload_photo_artist, name='upload_photo_artist'), url(r'^(?P<photo_id>...
from django.conf.urls import url from .views import (upload_photo_artist, delete_photo_artist, AlbumListView, CreateAlbumView) urlpatterns = [ url(r'^upload/?$', upload_photo_artist, name='upload_photo_artist'), url(r'^(?P<photo_id>\d+)/delete/$', delete_photo_artist, name='delete_photo_ar...
<commit_before>from django.conf.urls import url from .views import (upload_photo_artist, delete_photo_artist, AlbumListView, CreateAlbumView) urlpatterns = [ url(r'^upload/?$', upload_photo_artist, name='upload_photo_artist'), url(r'^(?P<photo_id>\d+)/delete/$', delete_photo_artist, name='...
f3875956cda23c4b0086dbc083161dc6f2c1a771
spicedham/split_tokenizer.py
spicedham/split_tokenizer.py
from re import split from spicedham.tokenizer import BaseTokenizer class SplitTokenizer(BaseTokenizer): """ Split the text on punctuation and newlines, lowercase everything, and filter the empty strings """ def tokenize(self, text): text = split('[ ,.?!\n\r]', text) is_not_blan...
from re import split from spicedham.tokenizer import BaseTokenizer class SplitTokenizer(BaseTokenizer): """ Split the text on punctuation and newlines, lowercase everything, and filter the empty strings """ def tokenize(self, text): text = split('[ ,.?!\n\r]', text) text = [tok...
Make mapping & filtering into a list comprehension
Make mapping & filtering into a list comprehension
Python
mpl-2.0
mozilla/spicedham,mozilla/spicedham
from re import split from spicedham.tokenizer import BaseTokenizer class SplitTokenizer(BaseTokenizer): """ Split the text on punctuation and newlines, lowercase everything, and filter the empty strings """ def tokenize(self, text): text = split('[ ,.?!\n\r]', text) is_not_blan...
from re import split from spicedham.tokenizer import BaseTokenizer class SplitTokenizer(BaseTokenizer): """ Split the text on punctuation and newlines, lowercase everything, and filter the empty strings """ def tokenize(self, text): text = split('[ ,.?!\n\r]', text) text = [tok...
<commit_before>from re import split from spicedham.tokenizer import BaseTokenizer class SplitTokenizer(BaseTokenizer): """ Split the text on punctuation and newlines, lowercase everything, and filter the empty strings """ def tokenize(self, text): text = split('[ ,.?!\n\r]', text) ...
from re import split from spicedham.tokenizer import BaseTokenizer class SplitTokenizer(BaseTokenizer): """ Split the text on punctuation and newlines, lowercase everything, and filter the empty strings """ def tokenize(self, text): text = split('[ ,.?!\n\r]', text) text = [tok...
from re import split from spicedham.tokenizer import BaseTokenizer class SplitTokenizer(BaseTokenizer): """ Split the text on punctuation and newlines, lowercase everything, and filter the empty strings """ def tokenize(self, text): text = split('[ ,.?!\n\r]', text) is_not_blan...
<commit_before>from re import split from spicedham.tokenizer import BaseTokenizer class SplitTokenizer(BaseTokenizer): """ Split the text on punctuation and newlines, lowercase everything, and filter the empty strings """ def tokenize(self, text): text = split('[ ,.?!\n\r]', text) ...
1f90a3d733de99cc9c412cdd559ed3ad26519acc
autoencoder/api.py
autoencoder/api.py
from .io import preprocess from .train import train from .encode import encode def autoencode(count_matrix, kfold=None, censor_matrix=None, type='normal', learning_rate=1e-2, hidden_size=10, epochs=10): x = preprocess(count_matrix, kfold=kfold, censor=c...
from .io import preprocess from .train import train from .encode import encode def autoencode(count_matrix, kfold=None, reduced=False, censor_matrix=None, type='normal', learning_rate=1e-2, hidden_size=10, epochs=10): x = preprocess(count_matrix, kfold=...
Add reduce option to API
Add reduce option to API
Python
apache-2.0
theislab/dca,theislab/dca,theislab/dca
from .io import preprocess from .train import train from .encode import encode def autoencode(count_matrix, kfold=None, censor_matrix=None, type='normal', learning_rate=1e-2, hidden_size=10, epochs=10): x = preprocess(count_matrix, kfold=kfold, censor=c...
from .io import preprocess from .train import train from .encode import encode def autoencode(count_matrix, kfold=None, reduced=False, censor_matrix=None, type='normal', learning_rate=1e-2, hidden_size=10, epochs=10): x = preprocess(count_matrix, kfold=...
<commit_before>from .io import preprocess from .train import train from .encode import encode def autoencode(count_matrix, kfold=None, censor_matrix=None, type='normal', learning_rate=1e-2, hidden_size=10, epochs=10): x = preprocess(count_matrix, kfold=...
from .io import preprocess from .train import train from .encode import encode def autoencode(count_matrix, kfold=None, reduced=False, censor_matrix=None, type='normal', learning_rate=1e-2, hidden_size=10, epochs=10): x = preprocess(count_matrix, kfold=...
from .io import preprocess from .train import train from .encode import encode def autoencode(count_matrix, kfold=None, censor_matrix=None, type='normal', learning_rate=1e-2, hidden_size=10, epochs=10): x = preprocess(count_matrix, kfold=kfold, censor=c...
<commit_before>from .io import preprocess from .train import train from .encode import encode def autoencode(count_matrix, kfold=None, censor_matrix=None, type='normal', learning_rate=1e-2, hidden_size=10, epochs=10): x = preprocess(count_matrix, kfold=...
6bba72aca76a8c40b615bfbde7e7a74d705f1012
avalon/__init__.py
avalon/__init__.py
# -*- coding: utf-8 -*- # # Avalon Music Server # # Copyright 2012-2014 TSH Labs <[email protected]> # # Available under the MIT license. See LICENSE for details. # """Supporting library for the Avalon Music Server.""" from __future__ import unicode_literals __all__ = [ '__version__', 'DEFAULT_ENCODING' ...
# -*- coding: utf-8 -*- # # Avalon Music Server # # Copyright 2012-2014 TSH Labs <[email protected]> # # Available under the MIT license. See LICENSE for details. # """Supporting library for the Avalon Music Server.""" from __future__ import unicode_literals __all__ = [ '__version__', 'DEFAULT_ENCODING' ...
Add -DEV suffix while version has not been released
Add -DEV suffix while version has not been released
Python
mit
tshlabs/avalonms
# -*- coding: utf-8 -*- # # Avalon Music Server # # Copyright 2012-2014 TSH Labs <[email protected]> # # Available under the MIT license. See LICENSE for details. # """Supporting library for the Avalon Music Server.""" from __future__ import unicode_literals __all__ = [ '__version__', 'DEFAULT_ENCODING' ...
# -*- coding: utf-8 -*- # # Avalon Music Server # # Copyright 2012-2014 TSH Labs <[email protected]> # # Available under the MIT license. See LICENSE for details. # """Supporting library for the Avalon Music Server.""" from __future__ import unicode_literals __all__ = [ '__version__', 'DEFAULT_ENCODING' ...
<commit_before># -*- coding: utf-8 -*- # # Avalon Music Server # # Copyright 2012-2014 TSH Labs <[email protected]> # # Available under the MIT license. See LICENSE for details. # """Supporting library for the Avalon Music Server.""" from __future__ import unicode_literals __all__ = [ '__version__', 'DEF...
# -*- coding: utf-8 -*- # # Avalon Music Server # # Copyright 2012-2014 TSH Labs <[email protected]> # # Available under the MIT license. See LICENSE for details. # """Supporting library for the Avalon Music Server.""" from __future__ import unicode_literals __all__ = [ '__version__', 'DEFAULT_ENCODING' ...
# -*- coding: utf-8 -*- # # Avalon Music Server # # Copyright 2012-2014 TSH Labs <[email protected]> # # Available under the MIT license. See LICENSE for details. # """Supporting library for the Avalon Music Server.""" from __future__ import unicode_literals __all__ = [ '__version__', 'DEFAULT_ENCODING' ...
<commit_before># -*- coding: utf-8 -*- # # Avalon Music Server # # Copyright 2012-2014 TSH Labs <[email protected]> # # Available under the MIT license. See LICENSE for details. # """Supporting library for the Avalon Music Server.""" from __future__ import unicode_literals __all__ = [ '__version__', 'DEF...
679f20fc8747020f08f1e18a47772b18d886d29f
circuit/_twisted.py
circuit/_twisted.py
# Copyright 2012 Edgeware AB. # # 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,...
# Copyright 2012 Edgeware AB. # # 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,...
Remove print statements from TwistedCircuitBreaker
Remove print statements from TwistedCircuitBreaker
Python
apache-2.0
edgeware/python-circuit
# Copyright 2012 Edgeware AB. # # 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,...
# Copyright 2012 Edgeware AB. # # 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,...
<commit_before># Copyright 2012 Edgeware AB. # # 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...
# Copyright 2012 Edgeware AB. # # 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,...
# Copyright 2012 Edgeware AB. # # 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,...
<commit_before># Copyright 2012 Edgeware AB. # # 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...
8e6eb543fb011ff85fc548f41ec8def183b1b8df
class4/exercise4.py
class4/exercise4.py
#!/usr/bin/env python import sys from getpass import getpass import time import pexpect def main(): ip_addr = '50.76.53.27' username = 'pyclass' port = 8022 password = getpass() # ssh -l pyclass 50.76.53.27 -p 8022 ssh_conn = pexpect.spawn('ssh -l {} {} -p {}'.format(username, ip_addr, port))...
# Use PExpect to change the logging buffer size (logging buffered <size>) on pynet-rtr2. Verify this change by examining the output of 'show run'. #!/usr/bin/env python import sys from getpass import getpass import time import pexpect def main(): ip_addr = '50.76.53.27' username = 'pyclass' port = 8022 ...
Use PExpect to change the logging buffer size (logging buffered <size>) on pynet-rtr2. Verify this change by examining the output of 'show run'.
Use PExpect to change the logging buffer size (logging buffered <size>) on pynet-rtr2. Verify this change by examining the output of 'show run'.
Python
apache-2.0
linkdebian/pynet_course
#!/usr/bin/env python import sys from getpass import getpass import time import pexpect def main(): ip_addr = '50.76.53.27' username = 'pyclass' port = 8022 password = getpass() # ssh -l pyclass 50.76.53.27 -p 8022 ssh_conn = pexpect.spawn('ssh -l {} {} -p {}'.format(username, ip_addr, port))...
# Use PExpect to change the logging buffer size (logging buffered <size>) on pynet-rtr2. Verify this change by examining the output of 'show run'. #!/usr/bin/env python import sys from getpass import getpass import time import pexpect def main(): ip_addr = '50.76.53.27' username = 'pyclass' port = 8022 ...
<commit_before>#!/usr/bin/env python import sys from getpass import getpass import time import pexpect def main(): ip_addr = '50.76.53.27' username = 'pyclass' port = 8022 password = getpass() # ssh -l pyclass 50.76.53.27 -p 8022 ssh_conn = pexpect.spawn('ssh -l {} {} -p {}'.format(username, ...
# Use PExpect to change the logging buffer size (logging buffered <size>) on pynet-rtr2. Verify this change by examining the output of 'show run'. #!/usr/bin/env python import sys from getpass import getpass import time import pexpect def main(): ip_addr = '50.76.53.27' username = 'pyclass' port = 8022 ...
#!/usr/bin/env python import sys from getpass import getpass import time import pexpect def main(): ip_addr = '50.76.53.27' username = 'pyclass' port = 8022 password = getpass() # ssh -l pyclass 50.76.53.27 -p 8022 ssh_conn = pexpect.spawn('ssh -l {} {} -p {}'.format(username, ip_addr, port))...
<commit_before>#!/usr/bin/env python import sys from getpass import getpass import time import pexpect def main(): ip_addr = '50.76.53.27' username = 'pyclass' port = 8022 password = getpass() # ssh -l pyclass 50.76.53.27 -p 8022 ssh_conn = pexpect.spawn('ssh -l {} {} -p {}'.format(username, ...
2bafbe1539b0c94a3fcad806e36af1f152fb71fe
tests/naming_tests.py
tests/naming_tests.py
from nose.tools import istest, assert_equal from whack.naming import PackageNamer @istest def package_with_unnamed_source_has_name_equal_to_install_identifier(): package_source = PackageSource("/tmp/nginx-src", "nginx") package_name = _name_package(package_source, {}) assert_equal("install-id(/tmp/nginx-...
from nose.tools import istest, assert_equal from whack.naming import PackageNamer @istest def package_with_unnamed_source_has_name_equal_to_install_identifier(): package_source = PackageSource("/tmp/nginx-src", None) package_name = _name_package(package_source, {}) assert_equal("install-id(/tmp/nginx-src...
Fix test by actually setting package source to have no name
Fix test by actually setting package source to have no name
Python
bsd-2-clause
mwilliamson/whack
from nose.tools import istest, assert_equal from whack.naming import PackageNamer @istest def package_with_unnamed_source_has_name_equal_to_install_identifier(): package_source = PackageSource("/tmp/nginx-src", "nginx") package_name = _name_package(package_source, {}) assert_equal("install-id(/tmp/nginx-...
from nose.tools import istest, assert_equal from whack.naming import PackageNamer @istest def package_with_unnamed_source_has_name_equal_to_install_identifier(): package_source = PackageSource("/tmp/nginx-src", None) package_name = _name_package(package_source, {}) assert_equal("install-id(/tmp/nginx-src...
<commit_before>from nose.tools import istest, assert_equal from whack.naming import PackageNamer @istest def package_with_unnamed_source_has_name_equal_to_install_identifier(): package_source = PackageSource("/tmp/nginx-src", "nginx") package_name = _name_package(package_source, {}) assert_equal("install...
from nose.tools import istest, assert_equal from whack.naming import PackageNamer @istest def package_with_unnamed_source_has_name_equal_to_install_identifier(): package_source = PackageSource("/tmp/nginx-src", None) package_name = _name_package(package_source, {}) assert_equal("install-id(/tmp/nginx-src...
from nose.tools import istest, assert_equal from whack.naming import PackageNamer @istest def package_with_unnamed_source_has_name_equal_to_install_identifier(): package_source = PackageSource("/tmp/nginx-src", "nginx") package_name = _name_package(package_source, {}) assert_equal("install-id(/tmp/nginx-...
<commit_before>from nose.tools import istest, assert_equal from whack.naming import PackageNamer @istest def package_with_unnamed_source_has_name_equal_to_install_identifier(): package_source = PackageSource("/tmp/nginx-src", "nginx") package_name = _name_package(package_source, {}) assert_equal("install...
ec72bfd00fdb81415efac782d224b17e534849c4
mfh.py
mfh.py
import os import sys import time from multiprocessing import Process, Event import mfhclient import server import update from arguments import parse from settings import HONEYPORT def main(): update_event = Event() mfhclient_process = Process( args=(args, update_event,), name="mfhclient_pro...
import os import sys import time from multiprocessing import Process, Event import mfhclient import server import update from arguments import parse from settings import HONEYPORT, HIVEPORT def main(): update_event = Event() mfhclient_process = Process( args=(args, update_event,), name="mfh...
Add condition to only launch server if -s or --server is specified
Add condition to only launch server if -s or --server is specified Now you can launch client, server or updater on its own, launch nothing, or launch the whole thing altogether!
Python
mit
Zloool/manyfaced-honeypot
import os import sys import time from multiprocessing import Process, Event import mfhclient import server import update from arguments import parse from settings import HONEYPORT def main(): update_event = Event() mfhclient_process = Process( args=(args, update_event,), name="mfhclient_pro...
import os import sys import time from multiprocessing import Process, Event import mfhclient import server import update from arguments import parse from settings import HONEYPORT, HIVEPORT def main(): update_event = Event() mfhclient_process = Process( args=(args, update_event,), name="mfh...
<commit_before>import os import sys import time from multiprocessing import Process, Event import mfhclient import server import update from arguments import parse from settings import HONEYPORT def main(): update_event = Event() mfhclient_process = Process( args=(args, update_event,), name...
import os import sys import time from multiprocessing import Process, Event import mfhclient import server import update from arguments import parse from settings import HONEYPORT, HIVEPORT def main(): update_event = Event() mfhclient_process = Process( args=(args, update_event,), name="mfh...
import os import sys import time from multiprocessing import Process, Event import mfhclient import server import update from arguments import parse from settings import HONEYPORT def main(): update_event = Event() mfhclient_process = Process( args=(args, update_event,), name="mfhclient_pro...
<commit_before>import os import sys import time from multiprocessing import Process, Event import mfhclient import server import update from arguments import parse from settings import HONEYPORT def main(): update_event = Event() mfhclient_process = Process( args=(args, update_event,), name...
d7a3bcf72df3cededc4220f46f976a0daef539a6
marvin/tests/__init__.py
marvin/tests/__init__.py
from marvin import create_app import unittest class AppCreationTest(unittest.TestCase): def test_create_app(self): app = create_app(MY_CONFIG_VALUE='foo') self.assertEqual(app.config['MY_CONFIG_VALUE'], 'foo')
from marvin import create_app import os import tempfile import unittest class AppCreationTest(unittest.TestCase): def setUp(self): self.config_file = tempfile.NamedTemporaryFile(delete=False) self.config_file.write('OTHER_CONFIG = "bar"'.encode('utf-8')) self.config_file.close() def...
Add test for app creation with config file.
Add test for app creation with config file. Also be explicit about encoding when writing to file.
Python
mit
streamr/marvin,streamr/marvin,streamr/marvin
from marvin import create_app import unittest class AppCreationTest(unittest.TestCase): def test_create_app(self): app = create_app(MY_CONFIG_VALUE='foo') self.assertEqual(app.config['MY_CONFIG_VALUE'], 'foo') Add test for app creation with config file. Also be explicit about encoding when writi...
from marvin import create_app import os import tempfile import unittest class AppCreationTest(unittest.TestCase): def setUp(self): self.config_file = tempfile.NamedTemporaryFile(delete=False) self.config_file.write('OTHER_CONFIG = "bar"'.encode('utf-8')) self.config_file.close() def...
<commit_before>from marvin import create_app import unittest class AppCreationTest(unittest.TestCase): def test_create_app(self): app = create_app(MY_CONFIG_VALUE='foo') self.assertEqual(app.config['MY_CONFIG_VALUE'], 'foo') <commit_msg>Add test for app creation with config file. Also be explici...
from marvin import create_app import os import tempfile import unittest class AppCreationTest(unittest.TestCase): def setUp(self): self.config_file = tempfile.NamedTemporaryFile(delete=False) self.config_file.write('OTHER_CONFIG = "bar"'.encode('utf-8')) self.config_file.close() def...
from marvin import create_app import unittest class AppCreationTest(unittest.TestCase): def test_create_app(self): app = create_app(MY_CONFIG_VALUE='foo') self.assertEqual(app.config['MY_CONFIG_VALUE'], 'foo') Add test for app creation with config file. Also be explicit about encoding when writi...
<commit_before>from marvin import create_app import unittest class AppCreationTest(unittest.TestCase): def test_create_app(self): app = create_app(MY_CONFIG_VALUE='foo') self.assertEqual(app.config['MY_CONFIG_VALUE'], 'foo') <commit_msg>Add test for app creation with config file. Also be explici...
4d6afb50094de9f80f686115edf9bc4abfc85bd3
webui/__init__.py
webui/__init__.py
#!/usr/bin/env python # # Copyright 2012 Ajay Narayan, Madhusudan C.S., Shobhit N.S. # # # 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...
Add license to the package initalizer.
Add license to the package initalizer.
Python
apache-2.0
madhusudancs/sentiment-analyzer,madhusudancs/sentiment-analyzer
Add license to the package initalizer.
#!/usr/bin/env python # # Copyright 2012 Ajay Narayan, Madhusudan C.S., Shobhit N.S. # # # 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><commit_msg>Add license to the package initalizer.<commit_after>
#!/usr/bin/env python # # Copyright 2012 Ajay Narayan, Madhusudan C.S., Shobhit N.S. # # # 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...
Add license to the package initalizer.#!/usr/bin/env python # # Copyright 2012 Ajay Narayan, Madhusudan C.S., Shobhit N.S. # # # 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.a...
<commit_before><commit_msg>Add license to the package initalizer.<commit_after>#!/usr/bin/env python # # Copyright 2012 Ajay Narayan, Madhusudan C.S., Shobhit N.S. # # # 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 ...
ec52babd52abce01873b8452f00b01c651c2deef
zappa/__init__.py
zappa/__init__.py
import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6), (3, 7)] python_major_version = sys.version_info[0] python_minor_version = sys.version_info[1] if (python_major_version, python_minor_version) not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(mav, miv) for mav, miv in SUPPORTED_VERSIONS] ...
import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6), (3, 7)] if sys.version_info[:2] not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(*version) for version in SUPPORTED_VERSIONS] err_msg = ('This version of Python ({}.{}) is not supported!\n'.format(*sys.version_info) + 'Za...
Simplify Python version detection and remove the backslash
Simplify Python version detection and remove the backslash
Python
mit
Miserlou/Zappa,Miserlou/Zappa
import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6), (3, 7)] python_major_version = sys.version_info[0] python_minor_version = sys.version_info[1] if (python_major_version, python_minor_version) not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(mav, miv) for mav, miv in SUPPORTED_VERSIONS] ...
import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6), (3, 7)] if sys.version_info[:2] not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(*version) for version in SUPPORTED_VERSIONS] err_msg = ('This version of Python ({}.{}) is not supported!\n'.format(*sys.version_info) + 'Za...
<commit_before>import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6), (3, 7)] python_major_version = sys.version_info[0] python_minor_version = sys.version_info[1] if (python_major_version, python_minor_version) not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(mav, miv) for mav, miv in SUPPORT...
import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6), (3, 7)] if sys.version_info[:2] not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(*version) for version in SUPPORTED_VERSIONS] err_msg = ('This version of Python ({}.{}) is not supported!\n'.format(*sys.version_info) + 'Za...
import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6), (3, 7)] python_major_version = sys.version_info[0] python_minor_version = sys.version_info[1] if (python_major_version, python_minor_version) not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(mav, miv) for mav, miv in SUPPORTED_VERSIONS] ...
<commit_before>import sys SUPPORTED_VERSIONS = [(2, 7), (3, 6), (3, 7)] python_major_version = sys.version_info[0] python_minor_version = sys.version_info[1] if (python_major_version, python_minor_version) not in SUPPORTED_VERSIONS: formatted_supported_versions = ['{}.{}'.format(mav, miv) for mav, miv in SUPPORT...
e5c12ba8814d835a8e44b1e22316ae91aac3092f
run.py
run.py
from datetime import datetime import app.models import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s %(funcName)s() - %(message)s') def main(): logging.info('Start') # TODO instantiate from JSON - perhaps add functionality in Software __init__() sw = app.models.So...
from app import app # Run this to start the webapp app.run(debug=True) app.logger.debug("Started up...")
Move to web app from CLI
Move to web app from CLI
Python
bsd-3-clause
softwaresaved/software-assessment-framework,softwaresaved/software-assessment-framework
from datetime import datetime import app.models import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s %(funcName)s() - %(message)s') def main(): logging.info('Start') # TODO instantiate from JSON - perhaps add functionality in Software __init__() sw = app.models.So...
from app import app # Run this to start the webapp app.run(debug=True) app.logger.debug("Started up...")
<commit_before>from datetime import datetime import app.models import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s %(funcName)s() - %(message)s') def main(): logging.info('Start') # TODO instantiate from JSON - perhaps add functionality in Software __init__() sw ...
from app import app # Run this to start the webapp app.run(debug=True) app.logger.debug("Started up...")
from datetime import datetime import app.models import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s %(funcName)s() - %(message)s') def main(): logging.info('Start') # TODO instantiate from JSON - perhaps add functionality in Software __init__() sw = app.models.So...
<commit_before>from datetime import datetime import app.models import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s %(funcName)s() - %(message)s') def main(): logging.info('Start') # TODO instantiate from JSON - perhaps add functionality in Software __init__() sw ...
23419cf96eb2f9d45b60cfbc085d9a77190c40b5
django_lightweight_queue/job.py
django_lightweight_queue/job.py
import sys import time from django.utils import simplejson from .utils import get_path, get_middleware class Job(object): def __init__(self, path, args, kwargs): self.path = path self.args = args self.kwargs = kwargs def run(self): start = time.time() middleware = ge...
import sys import time from django.utils import simplejson from .utils import get_path, get_middleware class Job(object): def __init__(self, path, args, kwargs): self.path = path self.args = args self.kwargs = kwargs @classmethod def from_json(cls, json): return cls(**sim...
Add ability to generate a Job easily.
Add ability to generate a Job easily. Signed-off-by: Chris Lamb <[email protected]>
Python
bsd-3-clause
prophile/django-lightweight-queue,prophile/django-lightweight-queue,thread/django-lightweight-queue,thread/django-lightweight-queue,lamby/django-lightweight-queue
import sys import time from django.utils import simplejson from .utils import get_path, get_middleware class Job(object): def __init__(self, path, args, kwargs): self.path = path self.args = args self.kwargs = kwargs def run(self): start = time.time() middleware = ge...
import sys import time from django.utils import simplejson from .utils import get_path, get_middleware class Job(object): def __init__(self, path, args, kwargs): self.path = path self.args = args self.kwargs = kwargs @classmethod def from_json(cls, json): return cls(**sim...
<commit_before>import sys import time from django.utils import simplejson from .utils import get_path, get_middleware class Job(object): def __init__(self, path, args, kwargs): self.path = path self.args = args self.kwargs = kwargs def run(self): start = time.time() ...
import sys import time from django.utils import simplejson from .utils import get_path, get_middleware class Job(object): def __init__(self, path, args, kwargs): self.path = path self.args = args self.kwargs = kwargs @classmethod def from_json(cls, json): return cls(**sim...
import sys import time from django.utils import simplejson from .utils import get_path, get_middleware class Job(object): def __init__(self, path, args, kwargs): self.path = path self.args = args self.kwargs = kwargs def run(self): start = time.time() middleware = ge...
<commit_before>import sys import time from django.utils import simplejson from .utils import get_path, get_middleware class Job(object): def __init__(self, path, args, kwargs): self.path = path self.args = args self.kwargs = kwargs def run(self): start = time.time() ...