commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
564f1470e742f06dd2802341c4b5b118074a9013
Support unhidden polygamy.json file in a config directory
solarnz/polygamy,solarnz/polygamy
polygamy/RepoConfigParser.py
polygamy/RepoConfigParser.py
from __future__ import absolute_import import json import os.path class BaseConfigParser: CONFIG_DIR = '.polygamy' def parse_file(self): pass def find_config_file(self, path): real_path = os.path.realpath(path) config_file = os.path.join(path, self.CONFIG_FILE) config_d...
from __future__ import absolute_import import json import os.path class BaseConfigParser: CONFIG_DIR = '.polygamy' def parse_file(self): pass def find_config_file(self, path): real_path = os.path.realpath(path) config_file = os.path.join(path, self.CONFIG_FILE) config_d...
bsd-3-clause
Python
3ace8c1e603dd07bde9c46e036e14b49a6103238
Upgrade notify message
codex-bot/github
github/events/watch.py
github/events/watch.py
from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase import math ordinal = lambda n: "%d%s" % (n,"tsnrhtdd"[(math.floor(n/10)%10!=1)*(n%10<4)*n%10::4]) class EventWatch(EventBase): def __init__(self, sdk): super(EventWa...
from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase class EventWatch(EventBase): def __init__(self, sdk): super(EventWatch, self).__init__(sdk) self.hook = None self.repository = None self.sende...
mit
Python
24d808ae518b192b0136e2dfe3cf8a3464ac857d
Update watch.py
codex-bot/github
github/events/watch.py
github/events/watch.py
from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase class EventWatch(EventBase): def __init__(self, sdk): super(EventWatch, self).__init__(sdk) self.hook = None self.repository = None self.sender...
from data_types.hook import Hook from data_types.repository import Repository from data_types.user import User from .base import EventBase import math ordinal = lambda n: "%d%s" % (n,"tsnrhtdd"[(math.floor(n/10)%10!=1)*(n%10<4)*n%10::4]) class EventWatch(EventBase): def __init__(self, sdk): super(EventWa...
mit
Python
aee36b42f59ae9e8ec2f4f2dd82cd758c73a7274
Remove unneeded import from south_africa urls
ken-muturi/pombola,geoffkilpin/pombola,mysociety/pombola,ken-muturi/pombola,patricmutwiri/pombola,geoffkilpin/pombola,patricmutwiri/pombola,geoffkilpin/pombola,hzj123/56th,patricmutwiri/pombola,patricmutwiri/pombola,mysociety/pombola,ken-muturi/pombola,mysociety/pombola,mysociety/pombola,hzj123/56th,hzj123/56th,patricm...
pombola/south_africa/urls.py
pombola/south_africa/urls.py
from django.conf.urls import patterns, include, url from pombola.south_africa.views import LatLonDetailView,SAPlaceDetailSub urlpatterns = patterns('pombola.south_africa.views', url(r'^place/latlon/(?P<lat>[0-9\.-]+),(?P<lon>[0-9\.-]+)/', LatLonDetailView.as_view(), name='latlon'), url(r'^place/(?P<slug>[-\w]...
from django.conf.urls import patterns, include, url from pombola.core.views import PersonDetailSub from pombola.south_africa.views import LatLonDetailView,SAPlaceDetailSub urlpatterns = patterns('pombola.south_africa.views', url(r'^place/latlon/(?P<lat>[0-9\.-]+),(?P<lon>[0-9\.-]+)/', LatLonDetailView.as_view(), ...
agpl-3.0
Python
f878e80ea7d743abcb5b730568dff71bab391f33
Combine tests into one
CubicComet/exercism-python-solutions
leap/leap.py
leap/leap.py
def is_leap_year(y): return (y % 4 == 0) and (y % 100 != 0 or y % 400 == 0)
def is_leap_year(y): if y % 400 == 0: return True elif y % 100 == 0: return False elif y % 4 == 0: return True else: return False
agpl-3.0
Python
9011f4f5b984de16cbf5a166d75984ac95d37b6d
Add support for GRAFANA_API_TOKEN environment variable
m110/grafcli,m110/grafcli
grafcli/storage/api.py
grafcli/storage/api.py
import os import requests from climb.config import config from grafcli.storage import Storage from grafcli.documents import Dashboard from grafcli.exceptions import DocumentNotFound class APIStorage(Storage): def __init__(self, host): super().__init__(host) self._config = config[host] def _...
import os import requests from climb.config import config from grafcli.storage import Storage from grafcli.documents import Dashboard from grafcli.exceptions import DocumentNotFound class APIStorage(Storage): def __init__(self, host): super().__init__(host) self._config = config[host] def _...
mit
Python
d0e7763827e542fa2c63d254010021c3ad507346
Implement SchemaNavigator Update CollectionHelper.transform() method
lucasdavid/grapher
grapher/core/common.py
grapher/core/common.py
import abc from . import errors class CollectionHelper(metaclass=abc.ABCMeta): """Helper for normalizing unknown structures into lists. """ @classmethod def needs(cls, item): """Checks if :item needs to be transformed into a list. Fundamentally, lists, tuples, sets and objects that h...
import abc class CollectionHelper(metaclass=abc.ABCMeta): """Helper for normalizing unknown structures into lists. """ @classmethod def needs(cls, item): """Checks if :item needs to be transformed into a list. :param item: the unknown structure. :return: :boolean: """...
mit
Python
7a9d91a91603bfb6adc514c483c5b552fccbff44
fix circular reference in TimerCallback with calls to connect/disconnect
openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro
software/ddapp/src/python/ddapp/timercallback.py
software/ddapp/src/python/ddapp/timercallback.py
import time from PythonQt import QtCore import traceback class TimerCallback(object): def __init__(self, targetFps=30): ''' Construct TimerCallback. The targetFps defines frames per second, the frequency for the ticks() callback method. ''' self.targetFps = targetFps ...
import time from PythonQt import QtCore import traceback class TimerCallback(object): def __init__(self, targetFps=30): ''' Construct TimerCallback. The targetFps defines frames per second, the frequency for the ticks() callback method. ''' self.targetFps = targetFps ...
bsd-3-clause
Python
1192cb849fb23dfd516d40f5b32d86d76c4e765b
Use the right variable in this loop
thread/django-lightweight-queue,thread/django-lightweight-queue
django_lightweight_queue/management/commands/queue_configuration.py
django_lightweight_queue/management/commands/queue_configuration.py
from typing import Any from django.core.management.base import BaseCommand, CommandParser from ... import app_settings from ...utils import get_backend, get_queue_counts, load_extra_config from ...cron_scheduler import get_cron_config class Command(BaseCommand): def add_arguments(self, parser: CommandParser) ->...
from typing import Any from django.core.management.base import BaseCommand, CommandParser from ... import app_settings from ...utils import get_backend, get_queue_counts, load_extra_config from ...cron_scheduler import get_cron_config class Command(BaseCommand): def add_arguments(self, parser: CommandParser) ->...
bsd-3-clause
Python
82b2e87de2c41b43248a2bccdc75c0066ec2ef49
Correct SDK PEP 564 nanosecond time reference (#1867)
open-telemetry/opentelemetry-python,open-telemetry/opentelemetry-python
opentelemetry-api/src/opentelemetry/util/_time.py
opentelemetry-api/src/opentelemetry/util/_time.py
# Copyright The OpenTelemetry Authors # # 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 ...
# Copyright The OpenTelemetry Authors # # 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 ...
apache-2.0
Python
f1465418e0f36b1062233672bdeece1382394b6f
Remove unnecessary idiokit.stop argument.
abusesa/abusehelper
abusehelper/contrib/autoshun/autoshunbot.py
abusehelper/contrib/autoshun/autoshunbot.py
import idiokit from abusehelper.core import utils, cymruwhois, bot, events AUTOSHUN_CSV_URL = "http://www.autoshun.org/files/shunlist.csv" class AutoshunBot(bot.PollingBot): COLUMNS = ["ip", "time", "type"] feed_url = bot.Param(default=AUTOSHUN_CSV_URL) use_cymru_whois = bot.BoolParam(default=True) ...
import idiokit from abusehelper.core import utils, cymruwhois, bot, events AUTOSHUN_CSV_URL = "http://www.autoshun.org/files/shunlist.csv" class AutoshunBot(bot.PollingBot): COLUMNS = ["ip", "time", "type"] feed_url = bot.Param(default=AUTOSHUN_CSV_URL) use_cymru_whois = bot.BoolParam(default=True) ...
mit
Python
9c591c864bbef43cfb632cb7992b746a7f957842
Clarify the ProhibitNoAbortFunction message (#304)
Kuniwak/vint,Kuniwak/vint
vint/linting/policy/prohibit_no_abort_function.py
vint/linting/policy/prohibit_no_abort_function.py
from vint.ast.node_type import NodeType from vint.linting.level import Level from vint.linting.policy.abstract_policy import AbstractPolicy from vint.linting.policy.reference.googlevimscriptstyleguide import get_reference_source from vint.linting.policy_registry import register_policy @register_policy class ProhibitN...
from vint.ast.node_type import NodeType from vint.linting.level import Level from vint.linting.policy.abstract_policy import AbstractPolicy from vint.linting.policy.reference.googlevimscriptstyleguide import get_reference_source from vint.linting.policy_registry import register_policy @register_policy class ProhibitN...
mit
Python
0507dfbd23db74db1c59bd1084647cc49ef19aee
Change logger messages to info
shingonoide/odoo_ezdoo,shingonoide/odoo_ezdoo
addons/website_notfound_redirect/ir_http.py
addons/website_notfound_redirect/ir_http.py
# -*- coding: utf-8 -*- import logging import urllib2 from openerp.http import request from openerp.osv import orm logger = logging.getLogger(__name__) class ir_http(orm.AbstractModel): _inherit = 'ir.http' def _handle_exception(self, exception, code=500): code = getattr(exception, 'code', code) ...
# -*- coding: utf-8 -*- import logging import urllib2 from openerp.http import request from openerp.osv import orm logger = logging.getLogger(__name__) class ir_http(orm.AbstractModel): _inherit = 'ir.http' def _handle_exception(self, exception, code=500): code = getattr(exception, 'code', code) ...
agpl-3.0
Python
1827b4c5cbb53f652f47acdb45358dfdfda6c228
use autotools. (#11808)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,iulian787/spack,iulian787/spack,iulian787/spack,LLNL/spack
var/spack/repos/builtin/packages/mpileaks/package.py
var/spack/repos/builtin/packages/mpileaks/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Mpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Reque...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Mpileaks(Package): """Tool to detect and report leaked MPI objects like MPI_Requests and ...
lgpl-2.1
Python
5b14ed5ad9b45830951b2bf495bf1d46feeed7cf
remove superfluous shebang
freifunkhamburg/ffmap-backend,kpcyrd/ffmap-backend,ffnord/ffmap-backend,freifunk-mwu/ffmap-backend,rubo77/ffmap-backend,ffac/ffmap-backend,FreifunkBremen/ffmap-backend,freifunk-fulda/ffmap-backend,FreifunkJena/ffmap-backend,freifunk-mwu/ffmap-backend,FreifunkBremen/ffmap-backend,freifunkhamburg/ffmap-backend,mweinelt/f...
alfred.py
alfred.py
import subprocess import json def _fetch(data_type): output = subprocess.check_output(["alfred-json", "-z", "-f", "json", "-r", str(data_type)]) return json.loads(output.decode("utf-8")).values() def nodeinfo(): return _fetch(158) def statistics(): return _fetch(159) def vis(): return _fetch...
#!/usr/bin/env python3 import subprocess import json def _fetch(data_type): output = subprocess.check_output(["alfred-json", "-z", "-f", "json", "-r", str(data_type)]) return json.loads(output.decode("utf-8")).values() def nodeinfo(): return _fetch(158) def statistics(): return _fetch(159) def v...
bsd-3-clause
Python
2c13128cdb2296f3b7920d8b1c083d01445c1a76
Remove wait
zemogle/raspberrysky
allsky.py
allsky.py
import time import numpy as np import logging import subprocess import signal import sys import time import os import json FORMAT = '%(asctime)-15s %(message)s' logging.basicConfig(format=FORMAT,level=logging.DEBUG) logger = logging.getLogger('imgserver') def camera_active(): # is the camera running? cmd = "p...
import time import numpy as np import logging import subprocess import signal import sys import time import os import json FORMAT = '%(asctime)-15s %(message)s' logging.basicConfig(format=FORMAT,level=logging.DEBUG) logger = logging.getLogger('imgserver') def camera_active(): # is the camera running? cmd = "p...
mit
Python
8af3aef367135dbbc55e573c6a943a86ff3ccd9d
Use an absolute Path for localization tests
Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey
survey/tests/locale/test_locale_normalization.py
survey/tests/locale/test_locale_normalization.py
import os import platform import subprocess import unittest from pathlib import Path class TestLocaleNormalization(unittest.TestCase): LOCALE_PATH = Path("survey", "locale").absolute() def test_normalization(self): """ We test if the messages were properly created with makemessages --no-obsolete --n...
import os import platform import subprocess import unittest class TestLocaleNormalization(unittest.TestCase): LOCALE_PATH = "survey/locale/" def test_normalization(self): """ We test if the messages were properly created with makemessages --no-obsolete --no-wrap. """ if platform.system() == ...
agpl-3.0
Python
7a174e05108b673ae3e6a7b259ee8992b764e973
Use more robust quickfix parser.
markstory/lint-review,markstory/lint-review,markstory/lint-review
lintreview/tools/yamllint.py
lintreview/tools/yamllint.py
import os import logging from lintreview.tools import Tool from lintreview.tools import run_command, process_quickfix from lintreview.utils import in_path log = logging.getLogger(__name__) class Yamllint(Tool): name = 'yamllint' def check_dependencies(self): """ See if yamllint is on the PA...
import os import logging from lintreview.tools import Tool from lintreview.tools import run_command from lintreview.utils import in_path log = logging.getLogger(__name__) class Yamllint(Tool): name = 'yamllint' def check_dependencies(self): """ See if yamllint is on the PATH """ ...
mit
Python
3e8a64f522986f0b41836e045bf3826def55577f
Disable internet access for non-online tests
dpshelio/sunpy,dpshelio/sunpy,dpshelio/sunpy
sunpy/conftest.py
sunpy/conftest.py
from __future__ import absolute_import, print_function from functools import partial import os import socket import tempfile import json from sunpy.extern.six.moves.urllib.request import urlopen from sunpy.extern.six.moves.urllib.error import URLError import pytest # Force MPL to use non-gui backends for testing. ...
from __future__ import absolute_import, print_function from functools import partial import os import socket import tempfile import json from sunpy.extern.six.moves.urllib.request import urlopen from sunpy.extern.six.moves.urllib.error import URLError import pytest # Force MPL to use non-gui backends for testing. ...
bsd-2-clause
Python
9ff9a5585ad1535840fd802421c0664ae75c6460
Add some additional test cases for types.
mistio/libcloud,Kami/libcloud,apache/libcloud,Kami/libcloud,andrewsomething/libcloud,andrewsomething/libcloud,andrewsomething/libcloud,apache/libcloud,mistio/libcloud,mistio/libcloud,Kami/libcloud,apache/libcloud
libcloud/test/compute/test_types.py
libcloud/test/compute/test_types.py
import sys import unittest from unittest import TestCase from libcloud.compute.types import Provider, NodeState, StorageVolumeState, \ VolumeSnapshotState, Type class TestType(Type): INUSE = "inuse" NOTINUSE = "NOTINUSE" class TestTestType(TestCase): model = TestType def test_provider_tostring...
import sys import unittest from unittest import TestCase from libcloud.compute.types import Provider, NodeState, StorageVolumeState, \ VolumeSnapshotState, Type class TestType(Type): INUSE = "inuse" class TestTestType(TestCase): model = TestType attribute = TestType.INUSE def test_provider_tos...
apache-2.0
Python
3279c37bea364f644045dab7aa13c2639e10767d
Remove a debugging statement
yougov/pmxbot,yougov/pmxbot,yougov/pmxbot
tests/functional/plugins/pmxbot_test_commands.py
tests/functional/plugins/pmxbot_test_commands.py
from pmxbot import core @core.command("crashnow") def crash_immediately(): "Crash now!" raise TypeError("You should never call this!") @core.command("crashiter") def crash_in_iterator(): "Crash in iterator!" raise TypeError("You should never call this!") yield "You can't touch this" @core.regexp('feck', r'\bf...
from pmxbot import core @core.command("crashnow") def crash_immediately(): "Crash now!" raise TypeError("You should never call this!") @core.command("crashiter") def crash_in_iterator(): "Crash in iterator!" raise TypeError("You should never call this!") yield "You can't touch this" @core.regexp('feck', r'\bf...
mit
Python
b0d5d9ee2e507906f5af75d5f62c0db3836dfc00
Reformat for 80 chars
gratipay/aspen.py,gratipay/aspen.py
aspen/hooks/filters.py
aspen/hooks/filters.py
import re def by_regex(hook, regex_tuples, default=True): """A filter for hooks. regex_tuples is a list of (regex, filter?) where if the regex matches the requested URI, then the hook is applied or not based on if filter? is True or False. """ regex_res = [ (re.compile(regex), disposition) \...
import re def by_regex(hook, regex_tuples, default=True): """A filter for hooks. regex_tuples is a list of (regex, filter?) where if the regex matches the requested URI, then the hook is applied or not based on if filter? is True or False. """ regex_res = [ (re.compile(regex), disposition) for rege...
mit
Python
cc246bd43efbc5e3873525f160eb360fb3335392
fix logging issue with create_mapping
4dn-dcic/fourfront,hms-dbmi/fourfront,hms-dbmi/fourfront,4dn-dcic/fourfront,4dn-dcic/fourfront,hms-dbmi/fourfront,4dn-dcic/fourfront,hms-dbmi/fourfront,hms-dbmi/fourfront
src/encoded/commands/create_mapping_on_deploy.py
src/encoded/commands/create_mapping_on_deploy.py
import argparse import structlog import logging from pyramid.paster import get_app from snovault.elasticsearch.create_mapping import run as run_create_mapping from snovault import set_logging from dcicutils.beanstalk_utils import whodaman log = structlog.getLogger(__name__) EPILOG = __doc__ def main(): parser =...
import argparse import structlog import logging from pyramid.paster import get_app from snovault.elasticsearch.create_mapping import run as run_create_mapping from dcicutils.beanstalk_utils import whodaman log = structlog.getLogger(__name__) EPILOG = __doc__ def main(): parser = argparse.ArgumentParser( ...
mit
Python
4988bbe7fa3e75062bc0048aff18cba8d57a9bc1
add more generic get_objs function
heracek/djangotoolbox,adieu/djangotoolbox
djangotoolbox/contrib/auth/models.py
djangotoolbox/contrib/auth/models.py
from django.db import models from django.contrib.auth.models import User, Group, Permission from djangotoolbox.fields import ListField def get_objs(obj_cls, obj_ids): objs = set() if len(obj_ids) > 0: # order_by() has to be used to override invalid default Permission filter objs.update(obj_cls...
from django.db import models from django.contrib.auth.models import User, Group, Permission from djangotoolbox.fields import ListField class UserPermissionList(models.Model): user = models.ForeignKey(User) _fk_list = ListField(models.ForeignKey(Permission)) def _get_permissions(self): if...
bsd-3-clause
Python
fb6c1cc3da1a632e922c7bdeb467ad9f9cb32efe
undo temporary changes needed to fix #2699
lsaffre/lino,lino-framework/lino,lino-framework/lino,lsaffre/lino,lsaffre/lino,lino-framework/lino,lsaffre/lino,lino-framework/lino,lsaffre/lino,lino-framework/lino
lino/utils/ajax.py
lino/utils/ajax.py
# -*- coding: UTF-8 -*- # Copyright 2011-2018 Rumma & Ko Ltd # License: BSD (see file COPYING for details) """This middleware is automatically being installed on every Lino site. When an exception occurs during an AJAX call, Lino should not respond with Django's default HTML formatted error report but with a plain-te...
# -*- coding: UTF-8 -*- # Copyright 2011-2018 Rumma & Ko Ltd # License: BSD (see file COPYING for details) """This middleware is automatically being installed on every Lino site. When an exception occurs during an AJAX call, Lino should not respond with Django's default HTML formatted error report but with a plain-te...
unknown
Python
9c9e564d51d44fb27101249d57d769828f14e97e
Fix the failing dns test on Windows
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/integration/modules/test_win_dns_client.py
tests/integration/modules/test_win_dns_client.py
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.unit import skipIf from tests.support.helpers import destructiveTest # Import Salt libs import salt.utils.platform @skipIf(not salt.utils.platf...
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.unit import skipIf from tests.support.helpers import destructiveTest # Import Salt libs import salt.utils.platform @skipIf(not salt.utils.platf...
apache-2.0
Python
577a72831479f971de4c8ad16496984d25578de5
Remove Redundant Information in Example Dags (#5497)
dhuang/incubator-airflow,spektom/incubator-airflow,danielvdende/incubator-airflow,danielvdende/incubator-airflow,apache/airflow,bolkedebruin/airflow,spektom/incubator-airflow,cfei18/incubator-airflow,Acehaidrey/incubator-airflow,nathanielvarona/airflow,bolkedebruin/airflow,airbnb/airflow,cfei18/incubator-airflow,daniel...
airflow/example_dags/example_subdag_operator.py
airflow/example_dags/example_subdag_operator.py
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
Python
a806bb51961b6640cc77c4fcb0ec05bac5f9616a
Update __manifest__.py
OCA/l10n-romania,OCA/l10n-romania
l10n_ro_stock_account_date_wizard/__manifest__.py
l10n_ro_stock_account_date_wizard/__manifest__.py
# Copyright (C) 2022 NextERP Romania # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Stock Accounting Date Wizard", "version": "14.0.1.2.0", "category": "Localization", "summary": "Romania - Stock Accounting Date Wizard", "author": "NextERP Romania," "Odoo C...
# Copyright (C) 2022 NextERP Romania # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Stock Accounting Date Wizard", "version": "14.0.1.2.0", "category": "Localization", "summary": "Romania - Stock Accounting Date Wizard", "author": "NextERP Romania," "Odoo C...
agpl-3.0
Python
231969addd7abffb4cddebff88ed3983c04f61d7
Make English strings modifiable
servalproject/nikola,s2hc-johan/nikola,TyberiusPrime/nikola,lucacerone/nikola,wcmckee/nikola,xuhdev/nikola,xuhdev/nikola,damianavila/nikola,andredias/nikola,schettino72/nikola,lucacerone/nikola,atiro/nikola,getnikola/nikola,jjconti/nikola,berezovskyi/nikola,okin/nikola,wcmckee/nikola,atiro/nikola,TyberiusPrime/nikola,y...
nikola/data/themes/default/messages/messages_en.py
nikola/data/themes/default/messages/messages_en.py
# -*- encoding:utf-8 -*- from __future__ import unicode_literals MESSAGES = { "LANGUAGE": "English", "Posts for year %s": "Posts for year %s", "Archive": "Archive", "Posts about %s": "Posts about %s", "Tags": "Tags", "Also available in": "Also available in", "More posts about": "More posts about",...
from __future__ import unicode_literals MESSAGES = [ "Posts for year %s", "Archive", "Posts about %s", "Tags", "Also available in", "More posts about", "Posted", "Original site", "Read in English", "Newer posts", "Older posts", "Previous post", "Next post", "old ...
mit
Python
f3a275f4acda2afee4d071961f78ef8705d547f9
Create bddirectory-amarphonebook-com-css.py
thetypist/scrappybot
quotesbot/spiders/bddirectory-amarphonebook-com-css.py
quotesbot/spiders/bddirectory-amarphonebook-com-css.py
# -*- coding: utf-8 -*- import scrapy class ToScrapeCSSSpider(scrapy.Spider): name = "amarphonebook-com-css" start_urls = [ 'http://www.amarphonebook.com/list/Dhaka/All-Groceries/1/1113', ] def parse(self, response): for quote in response.css("div.list_common1"): yield { ...
# -*- coding: utf-8 -*- import scrapy class ToScrapeCSSSpider(scrapy.Spider): name = "amarphonebook-com-css" start_urls = [ 'http://www.amarphonebook.com/list/Dhaka/All-Groceries/1/1113', ] def parse(self, response): for quote in response.css("div.list_common1"): yield { ...
mit
Python
dabdae4ec8aef552cb59472fd454ebd8db6ed004
Bump version to 0.7.5 (final)
iamutkarshtiwari/sympy,pbrady/sympy,bukzor/sympy,Designist/sympy,Gadal/sympy,mafiya69/sympy,madan96/sympy,dqnykamp/sympy,atsao72/sympy,AkademieOlympia/sympy,atreyv/sympy,Mitchkoens/sympy,debugger22/sympy,dqnykamp/sympy,lindsayad/sympy,pbrady/sympy,Mitchkoens/sympy,moble/sympy,atreyv/sympy,lindsayad/sympy,saurabhjn76/sy...
sympy/__init__.py
sympy/__init__.py
""" SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible. SymPy is written entirely in Python and does not require any external libraries, except optionally for...
""" SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible. SymPy is written entirely in Python and does not require any external libraries, except optionally for...
bsd-3-clause
Python
dc6500b6a2cc58585b6971fee9efd695cd6124bb
Update homedept_assignment_filter.py
ctsit/vivo-pump,ctsit/vivo-pump,mconlon17/vivo-pump
uf_examples/people/homedept_assignment_filter.py
uf_examples/people/homedept_assignment_filter.py
#!/usr/bin/env/python """ homedept_assignment_filter.py -- for home departments matched to patterns in an exception file, assign new home departments as indicated in the exception file """ __author__ = "Michael Conlon" __copyright__ = "Copyright 2016 (c) Michael Conlon" __license__ = "New BSD License" __versi...
#!/usr/bin/env/python """ homedept_assignment_filter.py -- for home departments matched to patterns in an exception file, assign new home departments as indicated in the exception file """ __author__ = "Michael Conlon" __copyright__ = "Copyright 2015 (c) Michael Conlon" __license__ = "New BSD License" __versi...
bsd-2-clause
Python
7f74a3d8bfae9c578a3ec4cfee53b19550728cac
Fix unit tests
rackerlabs/django-DefectDojo,rackerlabs/django-DefectDojo,rackerlabs/django-DefectDojo,rackerlabs/django-DefectDojo
dojo/unittests/test_microfocus_webinspect_parser.py
dojo/unittests/test_microfocus_webinspect_parser.py
from django.test import TestCase from dojo.tools.microfocus_webinspect.parser import MicrofocusWebinspectXMLParser from dojo.models import Test, Engagement, Product class TestMicrofocusWebinspectXMLParser(TestCase): def test_parse_without_file_has_no_findings(self): parser = MicrofocusWebinspectXMLParser...
from django.test import TestCase from dojo.tools.microfocus_webinspect.parser import MicrofocusWebinspectXMLParser from dojo.models import Test, Engagement, Product class TestMicrofocusWebinspectXMLParser(TestCase): def test_parse_without_file_has_no_findings(self): parser = MicrofocusWebinspectXMLParser...
bsd-3-clause
Python
29366d6b23caefa390abb0c2f401844ea1827d06
update SendWriteDiaryEmailTask: send email to users who didn't write diary
jupiny/EnglishDiary,jupiny/EnglishDiary,jupiny/EnglishDiary
english_diary/users/tasks/send_write_diary_email.py
english_diary/users/tasks/send_write_diary_email.py
from django.conf import settings from django.contrib.auth import get_user_model from datetime import datetime from celery import Task from users.utils.send_email import send_email class SendWriteDiaryEmailTask(Task): def run(self): today = datetime.now().strftime("%Y/%m/%d") for user in get_use...
from django.conf import settings from django.contrib.auth import get_user_model from celery import Task from users.utils.send_email import send_email class SendWriteDiaryEmailTask(Task): def run(self): for user in get_user_model().objects.all(): send_email( sender=settings.A...
mit
Python
05078fdca2c2ad30ebb12234f5873470c20ade94
Add a context manager to the useful read/writer lock.
openstack/taskflow,pombredanne/taskflow-1,jessicalucci/TaskManagement,jessicalucci/TaskManagement,pombredanne/taskflow-1,junneyang/taskflow,jimbobhickville/taskflow,citrix-openstack-build/taskflow,citrix-openstack-build/taskflow,varunarya10/taskflow,varunarya10/taskflow,openstack/taskflow,junneyang/taskflow,jimbobhickv...
taskflow/utils.py
taskflow/utils.py
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! 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 # # ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! 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 # # ...
apache-2.0
Python
b73a8f283972b686fa7b2aeb83b1314fb042e619
Add comment
pubres/pubres
pubres/tests/logging_test.py
pubres/tests/logging_test.py
import logging import logging.handlers import multiprocessing import pubres from pubres.pubres_logging import setup_logging from .base import * # Tests if the logging works. # Uses a custom logging handler that collects log messages into a list # and then asserts that they are there. # Care is taken about the serve...
import logging import logging.handlers import multiprocessing import pubres from pubres.pubres_logging import setup_logging from .base import * class MultiprocessingQueueStreamHandler(logging.handlers.BufferingHandler): """A logging handler that pushes the getMessage() of every LogRecord into a multiprocess...
mit
Python
c719802c83c8c5f77e27d2ac8b2bc59516cafe4f
Add new version of zlib, deprecate 1.2.10 (#3136)
EmreAtes/spack,tmerrick1/spack,iulian787/spack,LLNL/spack,skosukhin/spack,matthiasdiener/spack,EmreAtes/spack,iulian787/spack,tmerrick1/spack,LLNL/spack,krafczyk/spack,LLNL/spack,iulian787/spack,matthiasdiener/spack,skosukhin/spack,krafczyk/spack,EmreAtes/spack,matthiasdiener/spack,TheTimmy/spack,LLNL/spack,skosukhin/s...
var/spack/repos/builtin/packages/zlib/package.py
var/spack/repos/builtin/packages/zlib/package.py
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
Python
2f75327ce3be5c67f815f53d9afd8e8341a4235a
Fix default value quotes, test was failing
valdur55/py3status,ultrabug/py3status,tobes/py3status,Andrwe/py3status,vvoland/py3status,guiniol/py3status,Andrwe/py3status,tobes/py3status,valdur55/py3status,guiniol/py3status,ultrabug/py3status,ultrabug/py3status,docwalter/py3status,alexoneill/py3status,valdur55/py3status
py3status/modules/systemd.py
py3status/modules/systemd.py
# -*- coding: utf-8 -*- """ Check systemd unit status. Check the status of a systemd unit. Configuration parameters: cache_timeout: How often we refresh this module in seconds (default 5) format: Format for module output (default "{unit}: {status}") unit: Name of the unit (default "dbus.service") Format ...
# -*- coding: utf-8 -*- """ Check systemd unit status. Check the status of a systemd unit. Configuration parameters: cache_timeout: How often we refresh this module in seconds (default 5) format: Format for module output (default "{unit}: {status}") unit: Name of the unit (default dbus.service) Format of...
bsd-3-clause
Python
16f9d0943c8ae7bde5bde8a58c5aaa119342ecd8
Fix docstring for python.call
Fizzadar/pyinfra,Fizzadar/pyinfra
pyinfra/operations/python.py
pyinfra/operations/python.py
''' The Python module allows you to execute Python code within the context of a deploy. ''' from pyinfra.api import FunctionCommand, operation @operation def call(function, *args, **kwargs): ''' Execute a Python function within a deploy. + function: the function to execute + args: additional argumen...
''' The Python module allows you to execute Python code within the context of a deploy. ''' from pyinfra.api import FunctionCommand, operation @operation def call(function, *args, **kwargs): ''' Execute a Python function within a deploy. + func: the function to execute + args: additional arguments t...
mit
Python
2393de5f80744baf86c4ca1d822dc9d0bc1ff905
Fix package doc.
Dioptas/pymatgen,sonium0/pymatgen,ctoher/pymatgen,migueldiascosta/pymatgen,ctoher/pymatgen,ctoher/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,Dioptas/pymatgen,migueldiascosta/pymatgen,Bismarrck/pymatgen,rousseab/pymatgen,sonium0/pymatgen,Bismarrck/pymatgen,rousseab/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,yanik...
pymatgen/matproj/__init__.py
pymatgen/matproj/__init__.py
""" This module implements high-level interfaces to the public Materials Project. """
mit
Python
6f3336ef5dd43c02c851001715cf0f231c269276
Add keystone to the request
bertjwregeer/pyramid_keystone
pyramid_keystone/__init__.py
pyramid_keystone/__init__.py
default_settings = [ ('auth_url', str, 'http://localhost:5000/v3'), ('region', str, 'RegionOne'), ('user_domain_name', str, 'Default'), ('cacert', str, ''), ] def parse_settings(settings): parsed = {} def populate(name, convert, default): sname = '%s%s' % ('keystone.',...
default_settings = [ ('auth_url', str, 'http://localhost:5000/v3'), ('region', str, 'RegionOne'), ('user_domain_name', str, 'Default'), ('cacert', str, ''), ] def parse_settings(settings): parsed = {} def populate(name, convert, default): sname = '%s%s' % ('keystone.',...
isc
Python
41912722601e1296c05530641170401cc29a6bbb
Update __init__.py
PyThaiNLP/pythainlp
pythainlp/corpus/__init__.py
pythainlp/corpus/__init__.py
# -*- coding: utf-8 -*- """ Corpus related functions. Access to dictionaries, word lists, and language models. Including download manager. """ __all__ = [ "corpus_path", "corpus_db_path", "corpus_db_url", "countries", "download", "get_corpus", "get_corpus_db", "get_corpus_db_detail", ...
# -*- coding: utf-8 -*- """ Corpus related functions. Access to dictionaries, word lists, and language models. Including download manager. """ __all__ = [ "corpus_path", "corpus_db_path", "corpus_db_url", "countries", "download", "get_corpus", "get_corpus_db", "get_corpus_db_detail", ...
apache-2.0
Python
6ebeba5ebc7c76f9f0803a1cdbc2babd2ac57d63
Update CUBE-AI example.
kwagyeman/openmv,iabdalkader/openmv,iabdalkader/openmv,iabdalkader/openmv,openmv/openmv,iabdalkader/openmv,kwagyeman/openmv,openmv/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,kwagyeman/openmv
scripts/examples/25-Machine-Learning/nn_stm32cubeai.py
scripts/examples/25-Machine-Learning/nn_stm32cubeai.py
# STM32 CUBE.AI on OpenMV MNIST Example # See https://github.com/openmv/openmv/blob/master/src/stm32cubeai/README.MD import sensor, image, time, nn_st sensor.reset() # Reset and initialize the sensor. sensor.set_contrast(3) sensor.set_brightness(0) sensor.set_auto_gain(True) sensor.set_auto_expos...
# STM32 CUBE.AI on OpenMV MNIST Example import sensor, image, time, nn_st sensor.reset() # Reset and initialize the sensor. sensor.set_contrast(3) sensor.set_brightness(0) sensor.set_auto_gain(True) sensor.set_auto_exposure(True) sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to Graysc...
mit
Python
ac0f2c967ccd6fab47607fb246fc8e359c56073b
update user context to take program
masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api
web/impact/impact/tests/contexts/user_context.py
web/impact/impact/tests/contexts/user_context.py
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from datetime import timedelta from django.utils import timezone from impact.tests.factories import ( BaseProfileFactory, EntrepreneurProfileFactory, ExpertProfileFactory, IndustryFactory, MemberProfileFactory, UserFactory, ProgramRole...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from datetime import timedelta from django.utils import timezone from impact.tests.factories import ( BaseProfileFactory, EntrepreneurProfileFactory, ExpertProfileFactory, IndustryFactory, MemberProfileFactory, UserFactory, ) class UserC...
mit
Python
22b3b7e254714aa2c33cbad11126a05d1e7ecfc6
Add new CloudSearch regions. Closes #1465.
lochiiconnectivity/boto,lochiiconnectivity/boto,rayluo/boto,zzzirk/boto,rjschwei/boto,alfredodeza/boto,TiVoMaker/boto,jameslegg/boto,awatts/boto,alex/boto,ocadotechnology/boto,disruptek/boto,israelbenatar/boto,yangchaogit/boto,kouk/boto,elainexmas/boto,shaunbrady/boto,bleib1dj/boto,stevenbrichards/boto,abridgett/boto,d...
boto/cloudsearch/__init__.py
boto/cloudsearch/__init__.py
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without...
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without...
mit
Python
3902897c97977eb51f034696b376143d17a8c09a
Fix spelling in docstring.
machinelearningdeveloper/aoc_2016
01/solve_1.py
01/solve_1.py
"""Report the manhattan distance between a starting point and an ending point, given a set of directions to follow to move between the two points.""" from distance import get_distance from directions import load_directions, follow_directions def main(): directions = load_directions('directions.txt') startin...
"""Report the manhattan distance between a starting point and an ending point, given a set of directions to follow to get move between the two points.""" from distance import get_distance from directions import load_directions, follow_directions def main(): directions = load_directions('directions.txt') sta...
mit
Python
a361fd3eaccfa3ca16bdc1080ceea00b9a24c1cd
Change navbar DropdownMenu to right aligned so menu doesn't render off screen
CodeForPhilly/chime,CodeForPhilly/chime,CodeForPhilly/chime
src/chime_dash/app/components/menu.py
src/chime_dash/app/components/menu.py
"""component/menu Dropdown menu which appears on the navigation bar at the top of the screen refactor incoming """ from typing import List from dash.development.base_component import ComponentMeta import dash_bootstrap_components as dbc from chime_dash.app.components.base import Component class Menu(Component): ...
"""component/menu Dropdown menu which appears on the navigation bar at the top of the screen refactor incoming """ from typing import List from dash.development.base_component import ComponentMeta import dash_bootstrap_components as dbc from chime_dash.app.components.base import Component class Menu(Component): ...
mit
Python
2dd6ba84f348fa2680de896c306cdb9a788634d8
fix attribute name
sapcc/monasca-notification
monasca_notification/plugins/abstract_notifier.py
monasca_notification/plugins/abstract_notifier.py
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP # # 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 applica...
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP # # 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 applica...
apache-2.0
Python
8a4819daa627f06e1a0eac87ab44176b7e2a0115
Correct renamed module names for bank-statement-import repository.
OpenUpgrade/OpenUpgrade,grap/OpenUpgrade,grap/OpenUpgrade,OpenUpgrade/OpenUpgrade,OpenUpgrade/OpenUpgrade,OpenUpgrade/OpenUpgrade,OpenUpgrade/OpenUpgrade,Endika/OpenUpgrade,grap/OpenUpgrade,Endika/OpenUpgrade,OpenUpgrade/OpenUpgrade,Endika/OpenUpgrade,grap/OpenUpgrade,grap/OpenUpgrade,OpenUpgrade/OpenUpgrade,Endika/Ope...
openerp/addons/openupgrade_records/lib/apriori.py
openerp/addons/openupgrade_records/lib/apriori.py
""" Encode any known changes to the database here to help the matching process """ renamed_modules = { 'base_calendar': 'calendar', 'mrp_jit': 'procurement_jit', 'project_mrp': 'sale_service', # OCA/account-invoicing 'invoice_validation_wkfl': 'account_invoice_validation_workflow', 'account_inv...
""" Encode any known changes to the database here to help the matching process """ renamed_modules = { 'base_calendar': 'calendar', 'mrp_jit': 'procurement_jit', 'project_mrp': 'sale_service', # OCA/account-invoicing 'invoice_validation_wkfl': 'account_invoice_validation_workflow', 'account_inv...
agpl-3.0
Python
f026af91d39cf8f5f4db0925d09fc6ddff2cc443
Use breadcrumbs from lava-server
OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server
dashboard_app/bread_crumbs.py
dashboard_app/bread_crumbs.py
# Copyright (C) 2010 Linaro Limited # # Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org> # # This file is part of Launch Control. # # Launch Control is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License version 3 # as published by the Free Software F...
# Copyright (C) 2010 Linaro Limited # # Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org> # # This file is part of Launch Control. # # Launch Control is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License version 3 # as published by the Free Software F...
agpl-3.0
Python
931267a0fedb97e3b53d1a3792dd2eee72e6510b
Add todo.
faneshion/MatchZoo,faneshion/MatchZoo
matchzoo/metrics/__init__.py
matchzoo/metrics/__init__.py
from .precision import Precision from .average_precision import AveragePrecision from .discounted_cumulative_gain import DiscountedCumulativeGain from .mean_reciprocal_rank import MeanReciprocalRank from .mean_average_precision import MeanAveragePrecision from .normalized_discounted_cumulative_gain import \ Normali...
from .precision import Precision from .average_precision import AveragePrecision from .discounted_cumulative_gain import DiscountedCumulativeGain from .mean_reciprocal_rank import MeanReciprocalRank from .mean_average_precision import MeanAveragePrecision from .normalized_discounted_cumulative_gain import \ Normali...
apache-2.0
Python
bc29c044f271ca9940b8357d1194412de4986e3c
Resuelve compatibilidad con el guardado desde el API
jchernandez88/OVC_API_calc
API/models.py
API/models.py
# -*- coding: utf-8 -*- from django.db import models class Operacion(models.Model): OPERACIONES = ( (u'+', u'Suma'), (u'-', u'Resta'), (u'*', u'Multiplicación'), (u'/', u'División'), ) op1 = models.DecimalField( max_digits=14, decimal_places=4, defau...
# -*- coding: utf-8 -*- from django.db import models class Operacion(models.Model): OPERACIONES = ( (u'+', u'Suma'), (u'-', u'Resta'), (u'*', u'Multiplicación'), (u'/', u'División'), ) op1 = models.DecimalField( max_digits=14, decimal_places=4, defau...
mit
Python
665c9f9811d6ee432384b205211aa053e4f401fe
Update SARSA
davidrobles/mlnd-capstone-code
capstone/algorithms/sarsa.py
capstone/algorithms/sarsa.py
import random from capstone.policy import EGreedyPolicy from capstone.policy import RandomPolicy class Sarsa(object): def __init__(self, env, policy=EGreedyPolicy(), qf={}, alpha=0.1, gamma=0.99, n_episodes=1000): self.env = env self.policy = policy self.qf = qf s...
import random from capstone.policy import RandomPolicy class Sarsa(object): def __init__(self, env, policy=RandomPolicy(), qf={}, alpha=0.1, gamma=0.99, n_episodes=1000): self.env = env self.policy = policy self.qf = qf self.alpha = alpha self.gamma = gamm...
mit
Python
1d4bbdfac78c63566438e59e7ca6836d4cee07be
Simplify run_swf_command helper
pior/caravan
caravan/commands/__init__.py
caravan/commands/__init__.py
import importlib import inspect import sys import boto3 from botocore.exceptions import ClientError from caravan.swf import get_connection def run_swf_command(command_name, **kwargs): connection = kwargs.get('connection') if connection is None: connection = get_connection() command = getattr(con...
import importlib import inspect import sys import boto3 from botocore.exceptions import ClientError from caravan.swf import get_connection def is_response_success(response): status_code = response.get('ResponseMetadata', {}).get('HTTPStatusCode') return status_code == 200 def run_swf_command(command, **kwa...
mit
Python
324af0eefaa3e453049b050633f52c403d5746cd
Update __init__.py
Fillll/reddit2telegram,Fillll/reddit2telegram
reddit2telegram/channels/r_apphookup/__init__.py
reddit2telegram/channels/r_apphookup/__init__.py
# Just empty file
mit
Python
43a974f2fe1203160699c044aab80492b2cfd5d6
Make SignalQueue singleton
clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage
py/g1/asyncs/kernels/g1/asyncs/kernels/signals.py
py/g1/asyncs/kernels/g1/asyncs/kernels/signals.py
__all__ = [ 'SignalQueue', ] import signal import socket import struct import threading from g1.bases.assertions import ASSERT from g1.bases.classes import SingletonMeta from . import adapters class SignalQueue(metaclass=SingletonMeta): """Signal queue. Python runtime implements a UNIX signal handler ...
__all__ = [ 'SignalQueue', ] import signal import socket import struct import threading from g1.bases.assertions import ASSERT from . import adapters class SignalQueue: """Signal queue. Python runtime implements a UNIX signal handler that writes signal number to a file descriptor (which is globall...
mit
Python
fbcae346a308a4cf327ea5696cdc76f6c1d13e24
make it 1 jvm
calvingit21/h2o-2,111t8e/h2o-2,h2oai/h2o,rowhit/h2o-2,h2oai/h2o,eg-zhang/h2o-2,vbelakov/h2o,111t8e/h2o-2,111t8e/h2o-2,111t8e/h2o-2,elkingtonmcb/h2o-2,h2oai/h2o-2,vbelakov/h2o,100star/h2o,h2oai/h2o-2,vbelakov/h2o,100star/h2o,calvingit21/h2o-2,h2oai/h2o,100star/h2o,rowhit/h2o-2,elkingtonmcb/h2o-2,rowhit/h2o-2,vbelakov/h2...
py/testdir_single_jvm/test_rf_model_key_unique.py
py/testdir_single_jvm/test_rf_model_key_unique.py
import os, json, unittest, time, shutil, sys sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_hosts import argparse class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): localhost = h2o.decide_if_localhost() i...
import os, json, unittest, time, shutil, sys sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_hosts import argparse class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): localhost = h2o.decide_if_localhost() i...
apache-2.0
Python
2344e5bdc2663bcc222376faba32a292ed3e686d
Update python 3 classifiers
ajaali/cookiecutter-pypackage-minimal,kragniz/cookiecutter-pypackage-minimal
{{cookiecutter.package_name}}/setup.py
{{cookiecutter.package_name}}/setup.py
import setuptools setuptools.setup( name="{{ cookiecutter.package_name }}", version="{{ cookiecutter.package_version }}", url="{{ cookiecutter.package_url }}", author="{{ cookiecutter.author_name }}", author_email="{{ cookiecutter.author_email }}", description="{{ cookiecutter.package_descrip...
import setuptools setuptools.setup( name="{{ cookiecutter.package_name }}", version="{{ cookiecutter.package_version }}", url="{{ cookiecutter.package_url }}", author="{{ cookiecutter.author_name }}", author_email="{{ cookiecutter.author_email }}", description="{{ cookiecutter.package_descrip...
mit
Python
b12c0e0f8706cac061d30854c3cab9586645d3aa
Update to latest stable release (#4543)
lgarren/spack,iulian787/spack,krafczyk/spack,iulian787/spack,mfherbst/spack,TheTimmy/spack,mfherbst/spack,EmreAtes/spack,lgarren/spack,skosukhin/spack,mfherbst/spack,matthiasdiener/spack,skosukhin/spack,skosukhin/spack,LLNL/spack,matthiasdiener/spack,iulian787/spack,krafczyk/spack,tmerrick1/spack,matthiasdiener/spack,L...
var/spack/repos/builtin/packages/fontconfig/package.py
var/spack/repos/builtin/packages/fontconfig/package.py
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
Python
b5c931816099b8d9b738de9708c289c2541c3005
Add dependency (#21271)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/py-cheroot/package.py
var/spack/repos/builtin/packages/py-cheroot/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyCheroot(PythonPackage): """ Highly-optimized, pure-python HTTP server """ homepage...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyCheroot(PythonPackage): """ Highly-optimized, pure-python HTTP server """ homepage...
lgpl-2.1
Python
b0bf2c4c99a3f2de5341eccb31bcab9bc299f85e
add version 2.0.1 to r-magrittr (#21085)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/r-magrittr/package.py
var/spack/repos/builtin/packages/r-magrittr/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RMagrittr(RPackage): """A Forward-Pipe Operator for R Provides a mechanism for chaini...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RMagrittr(RPackage): """Provides a mechanism for chaining commands with a new forward-pipe...
lgpl-2.1
Python
4e10b47eefac56bdcc91a79b00a3c23afd0f7bd8
Update Weather_Station.py
userdw/RaspberryPi_3_Starter_Kit
07_Weather_Station/Weather_Station/Weather_Station.py
07_Weather_Station/Weather_Station/Weather_Station.py
import MCP3202 import os from time import sleep try: while True: os.system("clear") value1= MCP3202.readADC(0) voltage = round(float(value1 * 5000 / 4095), 2) temperature = (voltage - 500) / 10 tampil = round(float(temperature), 2) print("Weather Station") print("Curent Temperature : ", tamp...
import MCP3202 import os from time import sleep try: while True: os.system("clear") value1= MCP3202.readADC(0) voltage = round(float(value1 * 5000 / 4096), 2) temperature = (voltage - 550) / 10 tampil = round(float(temperature), 2) print("Weather Station") print("Curent Temperature : ", tamp...
mit
Python
b6f2fdbc037aafca734bf88cf47261427cd99519
Add autospec
kubikusrubikus/mkdocs,pjbull/mkdocs,davidgillies/mkdocs,jeoygin/mkdocs,jamesbeebop/mkdocs,jeoygin/mkdocs,vi4m/mkdocs,hhg2288/mkdocs,hhg2288/mkdocs,cnbin/mkdocs,simonfork/mkdocs,samuelcolvin/mkdocs,samhatfield/mkdocs,lukfor/mkdocs,michaelmcandrew/mkdocs,jamesbeebop/mkdocs,rickpeters/mkdocs,nicoddemus/mkdocs,michaelmcand...
mkdocs/tests/cli_tests.py
mkdocs/tests/cli_tests.py
#!/usr/bin/env python # coding: utf-8 import unittest import mock from click.testing import CliRunner from mkdocs import cli class CLITests(unittest.TestCase): def setUp(self): self.runner = CliRunner() @mock.patch('mkdocs.serve.serve', autospec=True) def test_serve(self, mock_serve): ...
#!/usr/bin/env python # coding: utf-8 import unittest import mock from click.testing import CliRunner from mkdocs import cli class CLITests(unittest.TestCase): def setUp(self): self.runner = CliRunner() @mock.patch('mkdocs.serve.serve') def test_serve(self, mock_serve): result = self...
bsd-2-clause
Python
d838afa824fa6b626ba87e5b4eabe1e95c960016
Bump version
markstory/lint-review,markstory/lint-review,markstory/lint-review
lintreview/__init__.py
lintreview/__init__.py
__version__ = '2.23.0'
__version__ = '2.22.0'
mit
Python
f8d507cb7d439b8451a6633d46ab02df7858297f
Update ipc_lista1.5.py
any1m1c/ipc20161
lista1/ipc_lista1.5.py
lista1/ipc_lista1.5.py
#ipc_lista1.5 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa que converta metros para centímetros. metros = input("Digite o valor em metros que deseja converter em centímetros: ") centimetros = metros * 100 print "Esse valor equivale a: %d" %centimetros
#ipc_lista1.5 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa que converta metros para centímetros. metros = input("Digite o valor em metros que deseja converter em centímetros: ") centimetros = metros * 100 print "Esse valor equivale a: %d" %centime
apache-2.0
Python
6ed3c705e8e89d1a69d7930271d6e1144d28722a
Update ipc_lista2.7.py
any1m1c/ipc20161
lista2/ipc_lista2.7.py
lista2/ipc_lista2.7.py
#EQUIPE 2 # # # # Ana Beatriz Faria Frota - 1615310027 # Nahan Trindade Passos - 1615310021 # n1 = int(input("Insira um número: ")) n2 = int(input("Insira outro número: ")) n3 = int(input("Insira mais outro número: ")) if n1>n2 and n1>n3: print ("O primeiro número é maior") if n2>n3: pr...
# # Ana Beatriz Faria Frota - 1615310027 # Mateus Mota de Souza - 1615310016 # Matheus Henrique Araujo Batista - 1615310039 # Nahan Trindade Passos - 1615310021 # Victor Hugo Souza Correia - 1615310024 # n1 = int(input("Insira um número: ")) n2 = int(input("Insira outro número: ")) n3 = int(input("Insira mai...
apache-2.0
Python
6cf4367485ae79e7dcd19733cbec4ec7c844d624
test to new style
wkentaro/chainer,chainer/chainer,okuta/chainer,jnishi/chainer,tkerola/chainer,keisuke-umezawa/chainer,hvy/chainer,okuta/chainer,pfnet/chainer,ktnyt/chainer,chainer/chainer,wkentaro/chainer,ktnyt/chainer,niboshi/chainer,keisuke-umezawa/chainer,okuta/chainer,jnishi/chainer,jnishi/chainer,wkentaro/chainer,keisuke-umezawa/...
tests/chainer_tests/distributions_tests/test_multivariate_normal.py
tests/chainer_tests/distributions_tests/test_multivariate_normal.py
from chainer import distributions from chainer import testing import numpy @testing.parameterize(*testing.product({ 'shape': [(3, 2), (1,)], 'is_variable': [True, False], 'sample_shape': [(3, 2), ()], })) @testing.fix_random() @testing.with_requires('scipy') class TestMultivariateNormal(testing.distributi...
from chainer import distributions from chainer import testing import numpy @testing.parameterize(*testing.product({ 'shape': [(3, 2), (1,)], 'is_variable': [True, False], 'sample_shape': [(3, 2), ()], })) @testing.fix_random() @testing.with_requires('scipy') class TestMultivariateNormal(testing.distributi...
mit
Python
fdcc22dbe81bd930fa4764fd17a5b0d9b895bb3c
complete rework of HttpError: now it can set Content-Length
renskiy/marnadi
marnadi/http/errors.py
marnadi/http/errors.py
HTTP_200_OK = '200 OK' HTTP_404_NOT_FOUND = '404 Not Found' HTTP_405_METHOD_NOT_ALLOWED = '405 Method Not Allowed' HTTP_500_INTERNAL_SERVER_ERROR = '500 Internal Server Error' HTTP_501_NOT_IMPLEMENTED = '501 Not Implemented' class HttpError(Exception): @property def headers(self): default_headers =...
from marnadi.http import descriptors HTTP_200_OK = '200 OK' HTTP_404_NOT_FOUND = '404 Not Found' HTTP_405_METHOD_NOT_ALLOWED = '405 Method Not Allowed' HTTP_500_INTERNAL_SERVER_ERROR = '500 Internal Server Error' HTTP_501_NOT_IMPLEMENTED = '501 Not Implemented' class HttpError(Exception): status = HTTP_500_IN...
mit
Python
3d48066c78d693b89cb2daabfd1ebe756862edc5
Remove dependency check done by Mopidy
hechtus/mopidy-gmusic,jaapz/mopidy-gmusic,Tilley/mopidy-gmusic,elrosti/mopidy-gmusic,jodal/mopidy-gmusic,jaibot/mopidy-gmusic,mopidy/mopidy-gmusic
mopidy_gmusic/__init__.py
mopidy_gmusic/__init__.py
from __future__ import unicode_literals import os from mopidy import config, ext __version__ = '0.2.2' class GMusicExtension(ext.Extension): dist_name = 'Mopidy-GMusic' ext_name = 'gmusic' version = __version__ def get_default_config(self): conf_file = os.path.join(os.path.dirname(__file...
from __future__ import unicode_literals import os from mopidy import config, exceptions, ext __version__ = '0.2.2' class GMusicExtension(ext.Extension): dist_name = 'Mopidy-GMusic' ext_name = 'gmusic' version = __version__ def get_default_config(self): conf_file = os.path.join(os.path.di...
apache-2.0
Python
20479ca1bf0636041c4b97633ea39ce2bbf84c2c
Remove some unused variables
ipython/ipython,ipython/ipython
IPython/nbconvert/preprocessors/tests/test_svg2pdf.py
IPython/nbconvert/preprocessors/tests/test_svg2pdf.py
"""Tests for the svg2pdf preprocessor""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from IPython.testing import decorators as dec from IPython.nbformat import v4 as nbformat from .base import PreprocessorTestsBase from ..svg2pdf import SVG2PDFPreprocessor c...
"""Tests for the svg2pdf preprocessor""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from IPython.testing import decorators as dec from IPython.nbformat import v4 as nbformat from .base import PreprocessorTestsBase from ..svg2pdf import SVG2PDFPreprocessor c...
bsd-3-clause
Python
576b74bdb3e4ddcdcd533be48ff755c4bcb17c3f
Fix width and height parameters for latest images functions
asmeurer/iterm2-tools
iterm2_tools/images.py
iterm2_tools/images.py
""" Functions for displaying images inline in iTerm2. See https://iterm2.com/images.html. """ from __future__ import print_function, division, absolute_import import sys import os import base64 IMAGE_CODE = '\033]1337;File=name={name};inline={inline};size={size};width={width};height={height}:{base64_img}\a' def dis...
""" Functions for displaying images inline in iTerm2. See https://iterm2.com/images.html. """ from __future__ import print_function, division, absolute_import import sys import os import base64 IMAGE_CODE = '\033]1337;File=name={name};inline={inline};size={size};width={width};height={height}:{base64_img}\a' def dis...
mit
Python
e7bf5e84629daffd2a625759addf4eea8423e115
Put fill_event in the public API.
NSLS-II/dataportal,NSLS-II/dataportal,danielballan/datamuxer,danielballan/dataportal,ericdill/datamuxer,danielballan/datamuxer,NSLS-II/datamuxer,ericdill/databroker,tacaswell/dataportal,ericdill/datamuxer,ericdill/databroker,danielballan/dataportal,tacaswell/dataportal
dataportal/broker/__init__.py
dataportal/broker/__init__.py
from .simple_broker import (_DataBrokerClass, EventQueue, Header, LocationError, IntegrityError, fill_event) from .handler_registration import register_builtin_handlers DataBroker = _DataBrokerClass() # singleton, used by pims_readers import below from .pims_readers import Images, Subtracte...
from .simple_broker import (_DataBrokerClass, EventQueue, Header, LocationError, IntegrityError) from .handler_registration import register_builtin_handlers DataBroker = _DataBrokerClass() # singleton, used by pims_readers import below from .pims_readers import Images, SubtractedImages reg...
bsd-3-clause
Python
886cd787111f659ee5f54758ca75f208e4a99c2b
Fix plural typo in comment
xtaran/debian-devel-changes-bot,lamby/debian-devel-changes-bot,xtaran/debian-devel-changes-bot,sebastinas/debian-devel-changes-bot,lamby/debian-devel-changes-bot,lamby/debian-devel-changes-bot
DebianDevelChanges/mailparsers/accepted_upload.py
DebianDevelChanges/mailparsers/accepted_upload.py
# -*- coding: utf-8 -*- # # Debian Changes Bot # Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the...
# -*- coding: utf-8 -*- # # Debian Changes Bot # Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the...
agpl-3.0
Python
75726945934a049c9fc81066996f1670f29ead2c
Improve handling of SKIP_LONG_TESTS build variable.
rec/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel
test/long_test.py
test/long_test.py
import os, unittest """This module long_test provides a decorator, @long_test, that you can use to mark tests which take a lot of wall clock time. If the system environment variable SKIP_LONG_TESTS is set, tests decorated with @long_test will not be run. """ SKIP_LONG_TESTS = os.getenv('SKIP_LONG_TESTS', '').lower()...
import os, unittest """This module long_test provides a decorator, @long_test, that you can use to mark tests which take a lot of wall clock time. If the system environment variable SKIP_LONG_TESTS is set, tests decorated with @long_test will not be run. """ SKIP_LONG_TESTS = os.getenv('SKIP_LONG_TESTS', None) is no...
mit
Python
f3490a9fc6a21ec6a6bb1af9f77d270b003cf45a
update dit/__init__.py too
dit/dit,chebee7i/dit,dit/dit,Autoplectic/dit,Autoplectic/dit,Autoplectic/dit,dit/dit,Autoplectic/dit,dit/dit,chebee7i/dit,chebee7i/dit,chebee7i/dit,dit/dit,Autoplectic/dit
dit/__init__.py
dit/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ dit is a Python package for information theory on discrete random variables. d = discrete i = information t = theory However, the more precise statement (at this point) is that `dit` is a Python package for sigma-algebras defined on finite sets. Presently, a few assu...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ dit is a Python package for information theory on discrete random variables. d = discrete i = information t = theory However, the more precise statement (at this point) is that `dit` is a Python package for sigma-algebras defined on finite sets. Presently, a few assu...
bsd-3-clause
Python
1c74da888aeae06f97f07f37b523d7b33d9dd210
Bump version to 0.9.0
clb6/jarvis-cli
jarvis_cli/__init__.py
jarvis_cli/__init__.py
__version__ = '0.9.0' EVENT_CATEGORIES_TO_DEFAULTS = { "consumed": 100, "produced": 100, "experienced": 100, "interacted": 80, "formulated": 80, "completed": 50, "detected": 10, "measured": 5 } EVENT_CATEGORIES = list(EVENT_CATEGORIES_TO_DEFAULT...
__version__ = '0.8.0' EVENT_CATEGORIES_TO_DEFAULTS = { "consumed": 100, "produced": 100, "experienced": 100, "interacted": 80, "formulated": 80, "completed": 50, "detected": 10, "measured": 5 } EVENT_CATEGORIES = list(EVENT_CATEGORIES_TO_DEFAULT...
apache-2.0
Python
40c6c591792f6601706d350bfb3025b389f978c5
Update __init__.py
selvakarthik21/newspaper,selvakarthik21/newspaper
newspaperdemo/__init__.py
newspaperdemo/__init__.py
from flask import Flask, request, render_template, redirect, url_for,jsonify from newspaper import Article from xml.etree import ElementTree app = Flask(__name__) # Debug logging import logging import sys # Defaults to stdout logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) try: log.inf...
from flask import Flask, request, render_template, redirect, url_for,jsonify from newspaper import Article from xml.etree import ElementTree app = Flask(__name__) # Debug logging import logging import sys # Defaults to stdout logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) try: log.inf...
mit
Python
fb6e7aff9a30f0a1efbf7bf28735e985aaf50fe9
Use xarray support to simplify GINI example
Unidata/MetPy,ShawnMurd/MetPy,dopplershift/MetPy,ahaberlie/MetPy,Unidata/MetPy,ahaberlie/MetPy,jrleeman/MetPy,jrleeman/MetPy,dopplershift/MetPy
examples/formats/GINI_Water_Vapor.py
examples/formats/GINI_Water_Vapor.py
# Copyright (c) 2015,2018 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ GINI Water Vapor Imagery ======================== Use MetPy's support for GINI files to read in a water vapor satellite image and plot the data using CartoPy. """ import ca...
# Copyright (c) 2015,2018 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ GINI Water Vapor Imagery ======================== Use MetPy's support for GINI files to read in a water vapor satellite image and plot the data using CartoPy. """ import ca...
bsd-3-clause
Python
4a6d56acef9ab67c41386f32093ea517a8129f37
Fix failing test for checking get_owner
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/win_status.py
salt/modules/win_status.py
''' Module for returning various status data about a minion. These data can be useful for compiling into stats later. :depends: - pythoncom - wmi ''' import logging import salt.utils log = logging.getLogger(__name__) try: import pythoncom import wmi import salt.utils.winapi has_requir...
''' Module for returning various status data about a minion. These data can be useful for compiling into stats later. :depends: - pythoncom - wmi ''' import logging import salt.utils log = logging.getLogger(__name__) try: import pythoncom import wmi import salt.utils.winapi has_requir...
apache-2.0
Python
f1d43fdd3bf2bb9aea5fa2a610778e816c0d8d33
remove .waf if exists at prepare_samples
pfi/maf,pfi/maf
samples/prepare_samples.py
samples/prepare_samples.py
#!/usr/bin/env python """ Prepares for running samples. It just generates maf.py and copies maf.py and waf to each sample directory. Please run this script before trying these samples. """ import glob import os import shutil import subprocess if __name__ == '__main__': os.chdir('..') subprocess.check_call('....
#!/usr/bin/env python """ Prepares for running samples. It just generates maf.py and copies maf.py and waf to each sample directory. Please run this script before trying these samples. """ import glob import os import shutil import subprocess if __name__ == '__main__': os.chdir('..') subprocess.check_call('....
bsd-2-clause
Python
525cc6aea35264a7fb967905823faed62ac7522c
Drop Py2 and six on salt/beacons/proxy_example.py
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/beacons/proxy_example.py
salt/beacons/proxy_example.py
""" Example beacon to use with salt-proxy .. code-block:: yaml beacons: proxy_example: endpoint: beacon """ import logging import salt.utils.http # Important: If used with salt-proxy # this is required for the beacon to load!!! __proxyenabled__ = ["*"] __virtualname__ = "proxy_example" log = log...
# -*- coding: utf-8 -*- """ Example beacon to use with salt-proxy .. code-block:: yaml beacons: proxy_example: endpoint: beacon """ # Import Python libs from __future__ import absolute_import, unicode_literals import logging # Import salt libs import salt.utils.http from salt.ext.six.moves import...
apache-2.0
Python
d62bc64db740b8467aeabb5a88bd46503c0bcd31
add time command, run twice for testing cache speed
viraintel/OWASP-Nettacker,viraintel/OWASP-Nettacker,viraintel/OWASP-Nettacker,viraintel/OWASP-Nettacker
scripts/__travis_test__.py
scripts/__travis_test__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os # Test help menu command os.system('time python nettacker.py --help') # Test show version command os.system('time python nettacker.py --version') # Test all modules command os.system("time python nettacker.py -i 127.0.0.1 -u user1,user2 -p pass1,pass2 -m all -g ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os os.system('python nettacker.py --help') os.system("python nettacker.py -i 127.0.0.1 -u user1,user2 -p pass1,pass2 -m all -g 21,25,80,443 -t 2 -T 0.1")
apache-2.0
Python
6addf98a5ce2ca4e61f809664660418351cb8922
Remove unused convert function from validator
ipython/ipython,ipython/ipython
IPython/nbformat/validator.py
IPython/nbformat/validator.py
from __future__ import print_function #!/usr/bin/env python # -*- coding: utf8 -*- import json import os from IPython.external.jsonschema import Draft3Validator import IPython.external.jsonpointer as jsonpointer from IPython.utils.py3compat import iteritems from .current import nbformat, nbformat_schema schema_path ...
from __future__ import print_function #!/usr/bin/env python # -*- coding: utf8 -*- import json import os from IPython.external.jsonschema import Draft3Validator import IPython.external.jsonpointer as jsonpointer from IPython.utils.py3compat import iteritems from .current import nbformat, nbformat_schema schema_path ...
bsd-3-clause
Python
41fc2f6506c18df4aaa84320c2ae62db0aacd2ac
Fix bugs in compile_grm build extension
google/language-resources,google/language-resources,googlei18n/language-resources,google/language-resources,google/language-resources,google/language-resources,googlei18n/language-resources,google/language-resources,googlei18n/language-resources,googlei18n/language-resources,googlei18n/language-resources,googlei18n/lan...
mul_034/build_defs.bzl
mul_034/build_defs.bzl
# Copyright 2017 Google LLC. 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 2017 Google LLC. 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...
apache-2.0
Python
39ddd32ab8fd9237d7c347389ec06fff6216f89b
Add date-time field in serializer.py
futami/measone,futami/measone
meas/serializer.py
meas/serializer.py
from rest_framework import serializers from .models import Condition, Entry class ConditionSerializer(serializers.ModelSerializer): class Meta: model = Condition fields = ('description', 'condition', 'serial', 'uuid', 'created_at') class EntrySerializer(serializers.ModelSerializer): cl...
from rest_framework import serializers from .models import Condition, Entry class ConditionSerializer(serializers.ModelSerializer): class Meta: model = Condition fields = ('description', 'condition', 'serial', 'uuid') class EntrySerializer(serializers.ModelSerializer): class Meta: ...
mit
Python
1c0708355c7b3653c32e8a49c6ebe02266795b90
Update `keras` serializer for `tensorflow.contrib` version (#1067)
blaze/distributed,dask/distributed,dask/distributed,mrocklin/distributed,mrocklin/distributed,mrocklin/distributed,blaze/distributed,dask/distributed,dask/distributed
distributed/protocol/keras.py
distributed/protocol/keras.py
from __future__ import print_function, division, absolute_import from .serialize import register_serialization, serialize, deserialize def serialize_keras_model(model): import keras if keras.__version__ < '1.2.0': raise ImportError("Need Keras >= 1.2.0. " "Try pip install keras --upgr...
from __future__ import print_function, division, absolute_import from .serialize import register_serialization, serialize, deserialize def serialize_keras_model(model): import keras if keras.__version__ < '1.2.0': raise ImportError("Need Keras >= 1.2.0. " "Try pip install keras --upgr...
bsd-3-clause
Python
3c077d82881e3dd51eb0b3906e43f9e038346cb6
Remove `_allowed_symbols`, this is no longer used by the document generation.
tensorflow/federated,tensorflow/federated,tensorflow/federated
tensorflow_federated/python/core/test/__init__.py
tensorflow_federated/python/core/test/__init__.py
# Copyright 2018, The TensorFlow Federated Authors. # # 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 o...
# Copyright 2018, The TensorFlow Federated Authors. # # 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 o...
apache-2.0
Python
68f9e73d336eb973c72d2ba8332467bf83896c04
Add additional tests
scitran/core,scitran/core,scitran/api,scitran/core,scitran/core,scitran/api
tests/integration_tests/python/test_collection.py
tests/integration_tests/python/test_collection.py
def test_collections(data_builder, as_admin, as_user): session = data_builder.create_session() acquisition = data_builder.create_acquisition() # create collection r = as_admin.post('/collections', json={ 'label': 'SciTran/Testing' }) assert r.ok collection = r.json()['_id'] # g...
def test_collections(data_builder, as_admin): session = data_builder.create_session() acquisition = data_builder.create_acquisition() # create collection r = as_admin.post('/collections', json={ 'label': 'SciTran/Testing', 'public': True }) assert r.ok collection = r.json()[...
mit
Python
b2f89f81572dc13bdca5d8740181648d0fa28cb8
add run dependency to xorg-cf-files (#21251)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/imake/package.py
var/spack/repos/builtin/packages/imake/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Imake(AutotoolsPackage, XorgPackage): """The imake build system.""" homepage = "http:...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Imake(AutotoolsPackage, XorgPackage): """The imake build system.""" homepage = "http:...
lgpl-2.1
Python
1df3d651270035ffb0ffa4e1d5b51bb7b20e9907
add v1.22-3 (#20890)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/r-dtw/package.py
var/spack/repos/builtin/packages/r-dtw/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RDtw(RPackage): """Dynamic Time Warping Algorithms A comprehensive implementation of ...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RDtw(RPackage): """A comprehensive implementation of dynamic time warping (DTW) algorithms...
lgpl-2.1
Python
e879c4176d8940e53fd6b749582ec6da60287060
add version 0.6-2 to r-gmp (#21028)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/r-gmp/package.py
var/spack/repos/builtin/packages/r-gmp/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RGmp(RPackage): """Multiple Precision Arithmetic Multiple Precision Arithmetic (big i...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RGmp(RPackage): """Multiple Precision Arithmetic (big integers and rationals, prime ...
lgpl-2.1
Python
26f740b25a2d8a5fcddc67f5a0d1dc18ce2c132b
add new versions (#24443)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/sleef/package.py
var/spack/repos/builtin/packages/sleef/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Sleef(CMakePackage): """SIMD Library for Evaluating Elementary Functions, vectorized libm ...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Sleef(CMakePackage): """SIMD Library for Evaluating Elementary Functions, vectorized l...
lgpl-2.1
Python
696071e11f655578ef7c24118d9de26785779ae3
Update filter_blacklist_hashtag_medias.py
instagrambot/instabot,instagrambot/instabot,ohld/instabot
examples/filter_blacklist_hashtag_medias.py
examples/filter_blacklist_hashtag_medias.py
""" instabot filters out the media with your set blacklist hashtags Workflow: Try to follow a media with your blacklist hashtag in the description and see how bot filters it out. """ import os import sys sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot blacklist_has...
""" instabot filters out the media with your set blacklist hashtags Workflow: Try to follow a media with your blacklist hashtag in the description and see how bot filters it out. """ import os import sys sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot blacklist_has...
apache-2.0
Python
fc3e492c25fcaf98ba0f48e01422d339541b8f70
Add coding for python 2.7
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
ynr/apps/ynr_refactoring/helpers/popolo_fields.py
ynr/apps/ynr_refactoring/helpers/popolo_fields.py
# -*- coding: utf-8 -*- """ A helper to move away from SimplePopoloField and ComplexPopoloField models. """ class BaseField(): def __init__(self, *args, **kwargs): self.required = False for k, v in kwargs.items(): setattr(self, k, v) def __str__(self): return self.name ...
""" A helper to move away from SimplePopoloField and ComplexPopoloField models. """ class BaseField(): def __init__(self, *args, **kwargs): self.required = False for k, v in kwargs.items(): setattr(self, k, v) def __str__(self): return self.name def __eq__(self, other...
agpl-3.0
Python
28ce152686cb10f40acf2632766a457477e7008b
remove 32 bit python hack
BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild
packages/gtk+3.py
packages/gtk+3.py
class GtkPackage (GnomeXzPackage): def __init__ (self): GnomeXzPackage.__init__ (self, 'gtk+', version_major = '3.16', version_minor = '2', configure_flags = [ '--with-gdktarget=quartz', '--enable-quartz-backend', '--enable-debug', '--enable-static', '--disable-glibtest', '--disable-intros...
class GtkPackage (GnomeXzPackage): def __init__ (self): GnomeXzPackage.__init__ (self, 'gtk+', version_major = '3.16', version_minor = '2', configure_flags = [ '--with-gdktarget=quartz', '--enable-quartz-backend', '--enable-debug', '--enable-static', '--disable-glibtest', '--disable-intros...
mit
Python
00c92c618e778b9891283a699ecc2ea6d7a08510
Update pango to 1.36.8
BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild
packages/pango.py
packages/pango.py
class PangoPackage (GnomeXzPackage): def __init__ (self): GnomeXzPackage.__init__ (self, 'pango', version_major = '1.36', version_minor = '8', configure_flags = [ '--without-x', '--enable-debug' ] ) self.sources.extend ([ # 1 # Bug 321419 - Allow environment var substitution in Pang...
class PangoPackage (GnomeXzPackage): def __init__ (self): GnomePackage.__init__ (self, 'pango', version_major = '1.35', version_minor = '0', configure_flags = [ '--without-x', '--enable-debug' ] ) self.sources.extend ([ # 1 # Bug 321419 - Allow environment var substitution in Pango ...
mit
Python
a26e4f7a5a5605c0e39f2ae54708b60013d08c9a
Split out tag regexp so other modules can reference it
jcmcken/pallium,jcmcken/pallium
pallium/config.py
pallium/config.py
try: import json except ImportError: import simplejson as json import re import socket from copy import deepcopy _STR_RE_VALID_TAG = "[A-Za-z0-9_\-]+" _STR_RE_VALID_TAG_COMPLETE = "^%s$" % _STR_RE_VALID_TAG _RE_VALID_TAG = re.compile(_STR_RE_VALID_TAG_COMPLETE) DEFAULT_CONFIG_FILE = "/etc/pallium/config.jso...
try: import json except ImportError: import simplejson as json import re import socket from copy import deepcopy _STR_RE_VALID_TAG = "^[A-Za-z0-9_\-]+$" _RE_VALID_TAG = re.compile(_STR_RE_VALID_TAG) DEFAULT_CONFIG_FILE = "/etc/pallium/config.json" DEFAULT_CONFIG = { # gmetad server hostname or IP "serv...
bsd-3-clause
Python
5a3672eb16ea57b0757526966b496d71693743ec
Update get_stock() docstring.
scraperwiki/stock-tool,scraperwiki/stock-tool
pandas_finance.py
pandas_finance.py
#!/usr/bin/env python import datetime import scraperwiki import numpy import pandas.io.data as web def get_stock(stock, start, end, service): """ Return data frame of finance data for stock. Takes start and end datetimes, and service name of 'google' or 'yahoo'. """ return web.DataReader(stock, ...
#!/usr/bin/env python import datetime import scraperwiki import numpy import pandas.io.data as web def get_stock(stock, start, end, service): """ Return data frame of finance data for stock. Takes start and end datetimes. """ return web.DataReader(stock, service, start, end) def parse_finance_...
agpl-3.0
Python
53617b562b5aeb8daef3f2808a3d177c14f88f4b
Bump to version 1.1.12
kezabelle/pilkit,fladi/pilkit
pilkit/pkgmeta.py
pilkit/pkgmeta.py
__title__ = 'pilkit' __author__ = 'Matthew Tretter' __version__ = '1.1.12' __license__ = 'BSD' __all__ = ['__title__', '__author__', '__version__', '__license__']
__title__ = 'pilkit' __author__ = 'Matthew Tretter' __version__ = '1.1.11' __license__ = 'BSD' __all__ = ['__title__', '__author__', '__version__', '__license__']
bsd-3-clause
Python
07b193353115b7c144e8986d0621a0dee9da440b
Fix py35 gate
ozamiatin/oslo.messaging,ozamiatin/oslo.messaging
oslo_messaging/tests/functional/zmq/test_startup.py
oslo_messaging/tests/functional/zmq/test_startup.py
# Copyright 2016 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2016 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
Python