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
e7cdc06db9fb1d8b132a339d50f5c22f0b81254b
Fix shape error in test_iterables
yarikoptic/NiPy-OLD,yarikoptic/NiPy-OLD
neuroimaging/modalities/fmri/fmristat/tests/test_iterables.py
neuroimaging/modalities/fmri/fmristat/tests/test_iterables.py
import numpy as np from numpy.random import standard_normal as noise from neuroimaging.testing import funcfile, anatfile from neuroimaging.core.api import load_image from neuroimaging.modalities.fmri.api import fromimage, fmri_generator from neuroimaging.core.image.generators import * from neuroimaging.fixes.scipy.sta...
import numpy as np from numpy.random import standard_normal as noise from neuroimaging.testing import funcfile, anatfile from neuroimaging.core.api import load_image from neuroimaging.modalities.fmri.api import fromimage, fmri_generator from neuroimaging.core.image.generators import * from neuroimaging.fixes.scipy.sta...
bsd-3-clause
Python
fe40b07ee55550399f7dd14253a161b16711bdfc
Fix pre-commit issues in test_simple_model.
Z2PackDev/TBmodels,Z2PackDev/TBmodels
tests/test_simple_model.py
tests/test_simple_model.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """Tests for creating a simple tight-binding model.""" import pytest from parameters import T_VALUES, KPT @pytest.mark.parametrize('t1', T_VALUES) @pytest.mark.para...
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> import pytest from parameters import T_VALUES, KPT @pytest.mark.parametrize('t1', T_VALUES) @pytest.mark.parametrize('k', KPT) def test_simple(t1, get_model, k, com...
apache-2.0
Python
08ca2d9c19311bab3911ef0094c77c6c85c6f43e
Replace yaml.dump with yaml.safe_dump
kevin-zhaoshuai/zun,kevin-zhaoshuai/zun,kevin-zhaoshuai/zun
zun/common/yamlutils.py
zun/common/yamlutils.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
Python
7716f279724d0866ec9488478b187bc34031a77b
Add docstrings to schema.py
Hardtack/formencode_jsonschema
formencode_jsonschema/schema.py
formencode_jsonschema/schema.py
from marshmallow import Schema, fields from formencode.api import Validator as FormencodeValidator from formencode.schema import Schema as FormencodeSchema from .converters import DEFAULT_CONVERTERS, SchemaDelegate class JSONSchema(Schema, SchemaDelegate): """ Marshmallow schema for convert Formencode's sche...
from marshmallow import Schema, fields from formencode.api import Validator as FormencodeValidator from formencode.schema import Schema as FormencodeSchema from .converters import DEFAULT_CONVERTERS, SchemaDelegate class JSONSchema(Schema, SchemaDelegate): type = fields.Constant('object') properties = fields...
mit
Python
a571e5539c89e7f5b815df40cc51520c38eeb670
Correct user return value
drcapulet/sentry,BuildingLink/sentry,BayanGroup/sentry,SilentCircle/sentry,JackDanger/sentry,ewdurbin/sentry,JamesMura/sentry,beni55/sentry,TedaLIEz/sentry,looker/sentry,drcapulet/sentry,ewdurbin/sentry,ngonzalvez/sentry,mvaled/sentry,looker/sentry,songyi199111/sentry,mvaled/sentry,gencer/sentry,BayanGroup/sentry,felix...
src/sentry/utils/social_auth.py
src/sentry/utils/social_auth.py
""" sentry.utils.social_auth ~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.conf import settings from social_auth.backends.pipeline.user import create_user from so...
""" sentry.utils.social_auth ~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.conf import settings from social_auth.backends.pipeline.user import create_user from so...
bsd-3-clause
Python
96cb0b0633e37f6a71d3fed755c0bb3bba79274f
fix issue caused by the removal of launcher.py
eavatar/eavatar-me,eavatar/eavatar-me,eavatar/eavatar-me,eavatar/eavatar-me
tests/unit/test_runtime.py
tests/unit/test_runtime.py
# -*- coding: utf-8 -*- import os import unittest from ava.runtime import environ class TestRuntimeConfig(unittest.TestCase): def setUp(self): from ava import wrapper wrapper.init_app_dir() def test_should_have_dir_settings(self): from ava.runtime.config import settings sel...
# -*- coding: utf-8 -*- import os import unittest from ava.runtime import environ class TestRuntimeConfig(unittest.TestCase): def setUp(self): from ava import launcher launcher.init_app_dir() def test_should_have_dir_settings(self): from ava.runtime.config import settings s...
apache-2.0
Python
113cafc12d17ddcd8dd0064139e29267cc82ff4f
implement Animes match, parse and format methods
caedus75/Renamer
src/renamer/filename/animes.py
src/renamer/filename/animes.py
# Copyright (c) 2021, Carlos Millett # All rights reserved. # This software may be modified and distributed under the terms # of the Simplified BSD License. See the LICENSE file for details. import re from pathlib import Path from .base import Media from .types import Types class Animes(Media): _rRule = re.c...
# Copyright (c) 2021, Carlos Millett # All rights reserved. # This software may be modified and distributed under the terms # of the Simplified BSD License. See the LICENSE file for details. import re from pathlib import Path from .base import Media from .types import Types class Animes(Media): _rRule = re.c...
bsd-2-clause
Python
d5e9113fbbf03fa5fadb7014d0460c02052ecbf8
Correct the woefully incorrect distmappings table.
Fale/fedora-packages,Fale/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,Fale/fedora-packages
fedoracommunity/search/distmappings.py
fedoracommunity/search/distmappings.py
# Global list of koji tags we care about tags = ({'name': 'Rawhide', 'tag': 'f20'}, {'name': 'Fedora 19', 'tag': 'f19-updates'}, {'name': 'Fedora 19', 'tag': 'f19'}, {'name': 'Fedora 19 Testing', 'tag': 'f19-updates-testing'}, {'name': 'Fedora 18', 'tag': 'f18-updates'}, {'name...
# Global list of koji tags we care about tags = ({'name': 'Rawhide', 'tag': 'f20'}, {'name': 'Fedora 19', 'tag': 'f16-updates'}, {'name': 'Fedora 19', 'tag': 'f16'}, {'name': 'Fedora 19 Testing', 'tag': 'f16-updates-testing'}, {'name': 'Fedora 18', 'tag': 'f16-updates'}, {'name':...
agpl-3.0
Python
9a40ea36a902d3cc81bb2d4617e5905acc4c3bc2
print the time on logs.
camswords/raspberry-pi-instagram-printer,camswords/raspberry-pi-instagram-printer
src/lib/support_team.py
src/lib/support_team.py
import sys import datetime class SupportTeam: @staticmethod def notify(message): print "%s: %s" % (datetime.datetime.now(), message) sys.stdout.flush()
import sys class SupportTeam: @staticmethod def notify(message): print message sys.stdout.flush()
mit
Python
435a8a09a933075336eeedcb61bfa059ebc628b7
Add preferred_display_name to fields list for agency
gadventures/gapipy
gapipy/resources/booking/agency.py
gapipy/resources/booking/agency.py
# Python 2 and 3 from __future__ import unicode_literals from ...models import Address from ...models import AgencyDocument from ...models.base import BaseModel from .agency_chain import AgencyChain from ..base import Resource from ..tour import Promotion class AgencyEmail(BaseModel): _as_is_fields = ['type', '...
# Python 2 and 3 from __future__ import unicode_literals from ...models import Address from ...models import AgencyDocument from ...models.base import BaseModel from .agency_chain import AgencyChain from ..base import Resource from ..tour import Promotion class AgencyEmail(BaseModel): _as_is_fields = ['type', '...
mit
Python
b93ca1e230043d5c91898ada1ea31e20e74116e2
return js compatible version in check_version
cartologic/cartoview,cartologic/cartoview,cartologic/cartoview,cartologic/cartoview
cartoview/views.py
cartoview/views.py
# -*- coding: utf-8 -*- import requests from django.shortcuts import render from pkg_resources import parse_version from .log_handler import get_logger from .version import get_current_version logger = get_logger(__name__) def index(request): context = {} return render(request, 'site_index.html', context) ...
# -*- coding: utf-8 -*- import requests from django.shortcuts import render from .log_handler import get_logger from .version import get_current_version logger = get_logger(__name__) def index(request): context = {} return render(request, 'site_index.html', context) def check_version(request): r = req...
bsd-2-clause
Python
0cb34d55730e5d6f3f5aef10db4b1e3e1e28bd98
change usage table to usage_events
zhujzhuo/openstack-trove,changsimon/trove,redhat-openstack/trove,changsimon/trove,denismakogon/trove-guestagent,changsimon/trove,cp16net/trove,hplustree/trove,fabian4/trove,mmasaki/trove,zhujzhuo/openstack-trove,zhangg/trove,zhujzhuo/openstack-trove,fabian4/trove,citrix-openstack-build/trove,citrix-openstack/build-trov...
reddwarf/db/sqlalchemy/migrate_repo/versions/010_add_usage.py
reddwarf/db/sqlalchemy/migrate_repo/versions/010_add_usage.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack 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/...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack 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/...
apache-2.0
Python
0439458617d43fd20eaf604674e991114525d8e3
Update purify characters
farakavco/lutino
src/lutino/persian.py
src/lutino/persian.py
# -*- coding: utf-8 -*- _character_map = str.maketrans({ 'ي': 'ی', 'ي': 'ی', 'ى': 'ی', 'ك': 'ک', 'ة': 'ه', 'ۀ': 'ه', 'ؤ': 'و', 'إ': 'ا', 'أ': 'ا', 'ء': '', 'ّ': '', 'ِ': '', 'ُ': '', 'َ': '', 'ْ': '', 'ٍ': '', 'ً': '', 'ٌ': '', '؛': '', '،...
# -*- coding: utf-8 -*- _character_map = str.maketrans({ 'ي': 'ی', 'ي': 'ی', 'ى': 'ی', 'ك': 'ک', 'ة': 'ه', 'ۀ': 'ه', 'ؤ': 'و', 'إ': 'ا', 'أ': 'ا', 'ء': '', 'ّ': '', 'ِ': '', 'ُ': '', 'َ': '', 'ْ': '', 'ٍ': '', 'ً': '', 'ٌ': '', '؛': '', #...
apache-2.0
Python
590bb4cba586b5d4ae490000fbbedb3d877d90e1
Use ascending order
geary/claslite,geary/claslite,geary/claslite,geary/claslite
web/app/rpc/handlers.py
web/app/rpc/handlers.py
# -*- coding: utf-8 -*- """ rpc.handlers ~~~~~~~~~~~~~~~~~~~~ CLASlite JSON-RPC handlers :By Michael Geary - http://mg.to/ :See UNLICENSE or http://unlicense.org/ for public domain notice. """ from google.appengine.api import users from tipfy import RequestHandler from tipfy.ext.jsonrpc import JSONRPCMixin fr...
# -*- coding: utf-8 -*- """ rpc.handlers ~~~~~~~~~~~~~~~~~~~~ CLASlite JSON-RPC handlers :By Michael Geary - http://mg.to/ :See UNLICENSE or http://unlicense.org/ for public domain notice. """ from google.appengine.api import users from tipfy import RequestHandler from tipfy.ext.jsonrpc import JSONRPCMixin fr...
unlicense
Python
7bf93097498399cecdcd5d175c0525fa649ed182
add tests for sloccount stats
zacchiro/debsources,vivekanand1101/debsources,Debian/debsources,vivekanand1101/debsources,sophiejjj/debsources,oorestisime/debsources,matthieucan/debsources,oorestisime/debsources,clemux/debsources,devoxel/debsources,vivekanand1101/debsources,sophiejjj/debsources,clemux/debsources,devoxel/debsources,Debian/debsources,z...
web/tests/test_stats.py
web/tests/test_stats.py
# Copyright (C) 2013 Stefano Zacchiroli <zack@upsilon.cc> # # This file is part of Debsources. # # Debsources 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 License, or (at you...
# Copyright (C) 2013 Stefano Zacchiroli <zack@upsilon.cc> # # This file is part of Debsources. # # Debsources 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 License, or (at you...
agpl-3.0
Python
ef617d4e98d9c029225a32098cc81aeab1d6deb5
Add link to gnu coreutils
hatchery/Genepool2,hatchery/genepool
genes/gnu_coreutils/commands.py
genes/gnu_coreutils/commands.py
#!/usr/bin/env python from genes.posix.traits import only_posix from genes.process.commands import run @only_posix() def chgrp(path, group): run(['chgrp', group, path]) @only_posix() def chown(path, user): run(['chown', user, path]) @only_posix() def groupadd(*args): run(['groupadd'] + list(*args)) ...
#!/usr/bin/env python from genes.posix.traits import only_posix from genes.process.commands import run @only_posix() def chgrp(path, group): run(['chgrp', group, path]) @only_posix() def chown(path, user): run(['chown', user, path]) @only_posix() def groupadd(*args): run(['groupadd'] + list(*args)) ...
mit
Python
e8e7a113d1d9cdbd0e1859ac5f0d1c5e372ba940
bump version
radhermit/pychroot
chroot/_version.py
chroot/_version.py
__version__ = '0.9.12'
__version__ = '0.9.11'
bsd-3-clause
Python
16e52597c0a2c4f4b0e261c71bb634d615c56334
add scope choice list in clients admin
lafranceinsoumise/api-django,lafranceinsoumise/api-django,lafranceinsoumise/api-django,lafranceinsoumise/api-django
src/clients/admin.py
src/clients/admin.py
from django.contrib import admin from django import forms from django.shortcuts import reverse from django.utils.translation import ugettext_lazy as _ from api.admin import admin_site from . import models from .scopes import scopes class ClientForm(forms.ModelForm): scopes = forms.MultipleChoiceField(choices=[(s...
from django.contrib import admin from django.shortcuts import reverse from django.utils.translation import ugettext_lazy as _ from api.admin import admin_site from . import models @admin.register(models.Client, site=admin_site) class ClientAdmin(admin.ModelAdmin): fieldsets = ( (None, { 'field...
agpl-3.0
Python
49c20c9217f57eb5d853613d325a4572051ee499
use correct field
xaedes/canopen_301_402
src/canopen_301_402/canopen_msgs/msg.py
src/canopen_301_402/canopen_msgs/msg.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import can from canopen_301_402.constants import * from canopen_301_402.canopen_301.cob import CanOpenId class CanOpenMessage(object): def __init__(self, function_code, node_id, service, data, request=False): ''' @summary: Represents a higher level i...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import can from canopen_301_402.constants import * from canopen_301_402.canopen_301.cob import CanOpenId class CanOpenMessage(object): def __init__(self, function_code, node_id, service, data, request=False): ''' @summary: Represents a higher level i...
mit
Python
9ac36bb7462e26b5da9834a42af4ecd1be127d62
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
8ff9f79cc3705fb55c692eca811db97feb7b55e9
Replace all TLSSocket implementations with the new OpenSSL one
freevo/kaa-base,freevo/kaa-base
src/net/tls/__init__.py
src/net/tls/__init__.py
# -* -coding: iso-8859-1 -*- # ----------------------------------------------------------------------------- # tls/__init__.py - TLS support for the Kaa Framework # ----------------------------------------------------------------------------- # Copyright 2008-2012 Dirk Meyer, Jason Tackaberry # # Please see the file AU...
# -* -coding: iso-8859-1 -*- # ----------------------------------------------------------------------------- # tls/__init__.py - TLS support for the Kaa Framework # ----------------------------------------------------------------------------- # $Id$ # # This module wraps TLS for client and server based on tlslite. See ...
lgpl-2.1
Python
2df4c5e812f89e8194691415f75434f608577daa
Make redis_process.py point at the correct directory
prophile/compd,prophile/compd
src/redis_process.py
src/redis_process.py
from twisted.internet import reactor, protocol import sys import config class RedisDataReceiver(protocol.ProcessProtocol): def __init__(self, on_started): self.on_started = on_started def outReceived(self, data): print >>sys.stderr, data, if 'now ready to accept connections' in data: ...
from twisted.internet import reactor, protocol import sys import config class RedisDataReceiver(protocol.ProcessProtocol): def __init__(self, on_started): self.on_started = on_started def outReceived(self, data): print >>sys.stderr, data, if 'now ready to accept connections' in data: ...
mit
Python
8ac142af2afc577a47197fe9bc821cb796883f38
Check for autoincrement before executing the instruction
darbaga/simple_compiler
virtual_machine.py
virtual_machine.py
class VirtualMachine: def __init__(self, bytecodes, ram_size=256, executing=True): self.bytecodes = bytecodes self.data = [None]*ram_size self.stack = [] self.executing = executing self.pc = 0 def push(self, value): """Push something onto the stack.""" se...
class VirtualMachine: def __init__(self, bytecodes, ram_size=256, executing=True): self.bytecodes = bytecodes self.data = [None]*ram_size self.stack = [] self.executing = executing self.pc = 0 def push(self, value): """Push something onto the stack.""" se...
bsd-3-clause
Python
b944e86ed4a4d854a4a084dd1af52e4da2fa8090
Update logging_conf.py added attributes to docstring
JoseALermaIII/clashcallerbot-reddit,JoseALermaIII/clashcallerbot-reddit
logging_conf.py
logging_conf.py
#! python3 # -*- coding: utf-8 -*- """Defines logging dictionary. Module defines dictionary for logging.config.dictConfig() Attributes: LOGGING (dict): Dictionary containing definitions for the loggers, handlers, and formatters. """ LOGGING = { 'version': 1, 'disable_existing_loggers': False, ...
#! python3 # -*- coding: utf-8 -*- """Defines logging dictionary. Module defines dictionary for logging.config.dictConfig() """ LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'detailed': { 'format': 'F1 %(asctime)s %(name)-15s %(levelname)-8s %(message)s',...
mit
Python
450b72dd97534c7317a6256ec2b2cd30bc0a0e59
Change API for parsing httplib cookies
p/ocookie
ocookie/httplibadapter.py
ocookie/httplibadapter.py
from . import CookieParser, CookieDict def parse_cookies(httplib_set_cookie_headers): cookies = [] for header in httplib_set_cookie_headers: header = header.strip() name, value = header.split(' ', 1) value = value.strip() cookie = CookieParser.parse_set_cookie_value(value) ...
from . import CookieParser, CookieDict def parse_cookies(httplib_headers): cookies = [ CookieParser.parse_set_cookie_value( header[1] ) for header in httplib_headers if header[0].lower() == 'set-cookie' ] return cookies
bsd-2-clause
Python
fb6a7a8684977af49bab96580a5c07c254ba164f
Clarify SubDagOperator exception
sekikn/incubator-airflow,rishibarve/incubator-airflow,saguziel/incubator-airflow,caseyching/incubator-airflow,zack3241/incubator-airflow,gilt/incubator-airflow,Tagar/incubator-airflow,wangtuanjie/airflow,andrewmchen/incubator-airflow,jfantom/incubator-airflow,wndhydrnt/airflow,wndhydrnt/airflow,owlabs/incubator-airflow...
airflow/operators/subdag_operator.py
airflow/operators/subdag_operator.py
from airflow.utils import AirflowException from airflow.models import BaseOperator from airflow.utils import apply_defaults from airflow.executors import DEFAULT_EXECUTOR class SubDagOperator(BaseOperator): template_fields = tuple() ui_color = '#555' ui_fgcolor = '#fff' @apply_defaults def __ini...
from airflow.utils import AirflowException from airflow.models import BaseOperator from airflow.utils import apply_defaults from airflow.executors import DEFAULT_EXECUTOR class SubDagOperator(BaseOperator): template_fields = tuple() ui_color = '#555' ui_fgcolor = '#fff' @apply_defaults def __ini...
apache-2.0
Python
6af60de30657619398cd0890e4efaf7eb4692bc9
Fix issue with mod_time
konrad/annotation_helper_web_app
annotate.py
annotate.py
from flask import Flask, url_for, render_template, redirect import json app = Flask(__name__) data_file = "list_annotation.json" @app.route("/") def hello(): return "Welcome!\n" @app.route("/show/<entity_id>") def show(entity_id): features = _get_features(entity_id) return render_template( 'show.h...
from flask import Flask, url_for, render_template, redirect import json app = Flask(__name__) data_file = "list_annotation.json" @app.route("/") def hello(): return "Welcome!\n" @app.route("/show/<entity_id>") def show(entity_id): features = _get_features(entity_id) return render_template( 'show.h...
isc
Python
e301384ecec88a5277aef87b74a16100d1f42be4
Bump to version 0.11.0
reubano/ckanny,reubano/ckanny
ckanny/__init__.py
ckanny/__init__.py
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ ckanny ~~~~~~ Miscellaneous CKAN utility scripts Examples: literal blocks:: python example_google.py Attributes: module_level_variable1 (int): Module level variables may be documented in """ from __future__ import ( absolute_import, divisi...
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ ckanny ~~~~~~ Miscellaneous CKAN utility scripts Examples: literal blocks:: python example_google.py Attributes: module_level_variable1 (int): Module level variables may be documented in """ from __future__ import ( absolute_import, divisi...
mit
Python
de60844c82c9b569228aa830d36235b5a377859d
Fix descriptor module to support assimilation
sassoftware/rpath-tools,sassoftware/rpath-tools
rpath_tools/client/sysdisco/descriptors.py
rpath_tools/client/sysdisco/descriptors.py
#!/usr/bin/python from xml.etree import cElementTree as etree from conary import conarycfg from conary import conaryclient from rpath_tools.client.utils.config_descriptor_cache import ConfigDescriptorCache class Descriptors(object): def __init__(self): self.cfg = conarycfg.ConaryConfiguration(True) ...
#!/usr/bin/python from xml.etree import cElementTree as etree from conary import conarycfg from conary import conaryclient from rpath_tools.client.utils.config_descriptor_cache import ConfigDescriptorCache class Descriptors(object): def __init__(self): self.cfg = conarycfg.ConaryConfiguration(True) ...
apache-2.0
Python
a0868ffe9c4ec18768626538dd687dfdb3536b23
Deal with empty config values properly
sassoftware/rpath-tools,sassoftware/rpath-tools
rpath_tools/client/sysdisco/parsevalues.py
rpath_tools/client/sysdisco/parsevalues.py
#!/usr/conary/bin/python2.6 # # Copyright (C) 2010 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at htt...
#!/usr/conary/bin/python2.6 # # Copyright (C) 2010 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at htt...
apache-2.0
Python
45ad104ce72748b7ca580be79fad89261068ebb2
Use ImportError instead of ModuleNotFoundError to support python3.5 (#110)
mjpost/sacreBLEU,mjpost/sacreBLEU
sacrebleu/tokenizers/tokenizer_ja_mecab.py
sacrebleu/tokenizers/tokenizer_ja_mecab.py
# -*- coding: utf-8 -*- try: import MeCab import ipadic except ImportError: # Don't fail until the tokenizer is actually used MeCab = None from .tokenizer_none import NoneTokenizer FAIL_MESSAGE = """ Japanese tokenization requires extra dependencies, but you do not have them installed. Please install ...
# -*- coding: utf-8 -*- try: import MeCab import ipadic except ModuleNotFoundError: # Don't fail until the tokenizer is actually used MeCab = None from .tokenizer_none import NoneTokenizer FAIL_MESSAGE = """ Japanese tokenization requires extra dependencies, but you do not have them installed. Please ...
apache-2.0
Python
7efcdb0ab12e733451e16f4ae24009e39fcd1c0c
add column api
syaning/zhihuapi-py
zhihuapi/column.py
zhihuapi/column.py
from .request import req from .urls import column_url class Column: def __init__(self, slug): self.slug = slug def info(self): """Get column information""" url = '%s/api/columns/%s' % (column_url, self.slug) return req.get(url) def pins(self): """Pin top posts.""...
from .request import req class Column: def __init__(self, column_id): self.id = column_id
mit
Python
3fc596db32e1c39e223c35e6a80a2f6c23321201
Bump version to v1.12.3
Cal-CS-61A-Staff/ok-client
client/__init__.py
client/__init__.py
__version__ = 'v1.12.3' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
__version__ = 'v1.12.2' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
apache-2.0
Python
971e723f0b5b62a6170784e0d812f4566e1301a9
Update __init__.py
mitodl/django-server-status,mitodl/django-server-status
server_status/__init__.py
server_status/__init__.py
# -*- coding: utf-8 -*- # pylint: disable=missing-docstring __version__ = '0.5.0'
# -*- coding: utf-8 -*- # pylint: disable=missing-docstring __version__ = '0.6.0'
agpl-3.0
Python
de8f0c504fd49eef93c7b3c356fefefec23ea7f8
Remove usage of private '_url' property from OSC
openstack/python-mistralclient,StackStorm/python-mistralclient,openstack/python-mistralclient,StackStorm/python-mistralclient
mistralclient/osc/plugin.py
mistralclient/osc/plugin.py
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribut...
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribut...
apache-2.0
Python
b72b001ff79fe12370b70fe99b3c344a09a03110
Fix #19: ResourceWarning on test_encoding (test_big5.txt unclosed)
ordbogen/html5lib-python,gsnedders/html5lib-python,mindw/html5lib-python,alex/html5lib-python,mgilson/html5lib-python,mgilson/html5lib-python,mindw/html5lib-python,gsnedders/html5lib-python,dstufft/html5lib-python,alex/html5lib-python,ordbogen/html5lib-python,dstufft/html5lib-python,html5lib/html5lib-python,mgilson/htm...
html5lib/tests/test_encoding.py
html5lib/tests/test_encoding.py
from __future__ import absolute_import, division, unicode_literals import re import os import unittest try: unittest.TestCase.assertEqual except AttributeError: unittest.TestCase.assertEqual = unittest.TestCase.assertEquals from .support import get_data_files, TestData, test_dir, errorMessage from html5lib i...
from __future__ import absolute_import, division, unicode_literals import re import os import unittest try: unittest.TestCase.assertEqual except AttributeError: unittest.TestCase.assertEqual = unittest.TestCase.assertEquals from .support import get_data_files, TestData, test_dir, errorMessage from html5lib i...
mit
Python
6969d33e85d95db917a07c57a3ec1d4c547a5ed4
update python producer POC
gtfierro/cs262-project,gtfierro/cs262-project,gtfierro/cs262-project
client/producer.py
client/producer.py
import sys import msgpack import socket import uuid as uuidlib class Client: def __init__(self, host, port, uuid=None): self.uuid = uuid if uuid is not None else uuidlib.uuid4() self.uuid = str(self.uuid) # coerce to string self.host = str(host) self.port = int(port) self....
import msgpack import socket import uuid as uuidlib class Client: def __init__(self, host, port, uuid=None): self.uuid = uuid if uuid is not None else uuidlib.uuid4() self.uuid = str(self.uuid) # coerce to string self.host = str(host) self.port = int(port) self.metadata = ...
bsd-3-clause
Python
67050468e1c2801e0aa0c7896cd8e5ffb5046f8f
optimize code test=develop
chengduoZH/Paddle,tensor-tang/Paddle,luotao1/Paddle,tensor-tang/Paddle,tensor-tang/Paddle,chengduoZH/Paddle,tensor-tang/Paddle,luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,tensor-tang/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,luotao1/Paddle,chengduoZH/Paddle,baidu/Paddle,chengduoZH/Paddle,PaddlePaddle/Paddle,Paddl...
python/paddle/fluid/transpiler/details/distribute_lookuptable_utils.py
python/paddle/fluid/transpiler/details/distribute_lookuptable_utils.py
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
Python
3c218dff3e00ece3a84de727fa217d2d7d01b82d
Add 'gym' prefix to URL in email app
wger-project/wger,rolandgeider/wger,wger-project/wger,petervanderdoes/wger,DeveloperMal/wger,DeveloperMal/wger,rolandgeider/wger,kjagoo/wger_stark,petervanderdoes/wger,wger-project/wger,rolandgeider/wger,kjagoo/wger_stark,kjagoo/wger_stark,petervanderdoes/wger,DeveloperMal/wger,wger-project/wger,DeveloperMal/wger,rolan...
wger/email/urls.py
wger/email/urls.py
# -*- coding: utf-8 -*- # This file is part of wger Workout Manager. # # wger Workout Manager 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 License, or # (at your option) any ...
# -*- coding: utf-8 -*- # This file is part of wger Workout Manager. # # wger Workout Manager 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 License, or # (at your option) any ...
agpl-3.0
Python
8c191e8c985323f29ff6081b31cb4721f7841383
fix lint
pvizeli/hassio,pvizeli/hassio
hassio/api/supervisor.py
hassio/api/supervisor.py
"""Init file for HassIO supervisor rest api.""" import logging import voluptuous as vol from .util import api_process, api_process_hostcontroll, api_validate from ..const import ATTR_VERSION, ATTR_CURRENT, ATTR_BETA, HASSIO_VERSION _LOGGER = logging.getLogger(__name__) SCHEMA_OPTIONS = vol.Schema({ # pylint: di...
"""Init file for HassIO supervisor rest api.""" import logging import voluptuous as vol from .util import api_process, api_process_hostcontroll, api_validate from ..const import ATTR_VERSION, ATTR_CURRENT, ATTR_BETA, HASSIO_VERSION _LOGGER = logging.getLogger(__name__) SCHEMA_OPTIONS = vol.Schema({ vol.Optional...
bsd-3-clause
Python
853744e82f2740a47a3f36e003ea8d2784bafff6
Fix bare datetime.now() in factory
masschallenge/django-accelerator,masschallenge/django-accelerator
accelerator/tests/factories/user_deferrable_modal_factory.py
accelerator/tests/factories/user_deferrable_modal_factory.py
import swapper from datetime import ( datetime, timedelta, ) from factory import SubFactory from factory.django import DjangoModelFactory from pytz import utc from simpleuser.tests.factories.user_factory import UserFactory from .deferrable_modal_factory import DeferrableModalFactory UserDeferrableModal = swa...
import swapper from datetime import ( datetime, timedelta, ) from factory import SubFactory from factory.django import DjangoModelFactory from simpleuser.tests.factories.user_factory import UserFactory from .deferrable_modal_factory import DeferrableModalFactory UserDeferrableModal = swapper.load_model('accel...
mit
Python
aac38613719ea514823848095e7df9fd24fac353
Align output_regex
coala-analyzer/coala-bears,Asnelchristian/coala-bears,incorrectusername/coala-bears,yash-nisar/coala-bears,seblat/coala-bears,naveentata/coala-bears,ku3o/coala-bears,chriscoyfish/coala-bears,Asnelchristian/coala-bears,gs0510/coala-bears,mr-karan/coala-bears,refeed/coala-bears,srisankethu/coala-bears,horczech/coala-bear...
bears/verilog/VerilogLintBear.py
bears/verilog/VerilogLintBear.py
from coalib.bearlib.abstractions.Linter import linter @linter(executable='verilator', output_format='regex', use_stderr=True, output_regex=r'\%(?:(?P<severity>Error|Warning.*?).*?):' r'.+?:(?P<line>.+?): (?P<message>.+)') class VerilogLintBear: """ Analyze Verilog ...
from coalib.bearlib.abstractions.Linter import linter @linter(executable='verilator', output_format='regex', use_stderr=True, output_regex=r'\%(?:(?P<severity>Error|Warning.*?).*?):' r'.+?:(?P<line>.+?): ' r'(?P<message>.+)') class VerilogLintBear: """ Analyze Verilog c...
agpl-3.0
Python
24892e1242469a43585f4efc8caa60d1cc50c1a0
rework the logic here
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
scripts/dbutil/unknown_hads.py
scripts/dbutil/unknown_hads.py
""" I look at the unknown HADS table and see if any of these stations exist in the mesosite database, if so, then I set online to true! """ import iemdb HADS = iemdb.connect('hads') MESOSITE = iemdb.connect('mesosite') hcursor = HADS.cursor() hcursor2 = HADS.cursor() mcursor = MESOSITE.cursor() # look for unknown ...
""" I look at the unknown HADS table and see if any of these stations exist in the mesosite database, if so, then I set online to true! """ import iemdb HADS = iemdb.connect('hads') MESOSITE = iemdb.connect('mesosite') hcursor = HADS.cursor() hcursor2 = HADS.cursor() mcursor = MESOSITE.cursor() # look for unknown ...
mit
Python
000039812308a4352e652d9423b8fd20defb1f7f
Update version
MissiaL/hikvision-client
hikvisionapi/__init__.py
hikvisionapi/__init__.py
from .hikvisionapi import Client __title__ = 'hikvisionapi' __version__ = '0.1.8' __author__ = 'Petr Alekseev' __license__ = 'MIT' __copyright__ = 'Copyright 2017 Petr Alekseev'
from .hikvisionapi import Client __title__ = 'hikvisionapi' __version__ = '0.1.7' __author__ = 'Petr Alekseev' __license__ = 'MIT' __copyright__ = 'Copyright 2017 Petr Alekseev'
mit
Python
11a329ee1b35621c77a36b9f742403e7194d0418
Fix for invalid timestamps in rate limit headers
housecanary/hc-api-python
housecanary/utilities.py
housecanary/utilities.py
"""Utility functions for hc-api-python""" from datetime import datetime def get_readable_time_string(seconds): """Returns human readable string from number of seconds""" seconds = int(seconds) minutes = seconds / 60 seconds = seconds % 60 hours = minutes / 60 minutes = minutes % 60 days = ...
"""Utility functions for hc-api-python""" from datetime import datetime def get_readable_time_string(seconds): """Returns human readable string from number of seconds""" seconds = int(seconds) minutes = seconds / 60 seconds = seconds % 60 hours = minutes / 60 minutes = minutes % 60 days = ...
mit
Python
e3f3fd8ff029f3a4b35e986014fac7875ebd0d9e
fix django deprecation warning
unbit/davvy
davvy/admin.py
davvy/admin.py
from django.contrib import admin from davvy.models import * from django import forms class PropInline(admin.TabularInline): fields = ['resource', 'name'] model = Prop class ResourceAdminForm(forms.ModelForm): class Meta: model = Resource exclude = [] widgets = { 'file': forms.TextInput(attrs={'size': '...
from django.contrib import admin from davvy.models import * from django import forms class PropInline(admin.TabularInline): model = Prop class ResourceAdminForm(forms.ModelForm): class Meta: model = Resource widgets = { 'file': forms.TextInput(attrs={'size': '64'}) } c...
mit
Python
5ed29c78837620eb8f2b41db7f4d35c8893a114e
Update version.py
VUIIS/dax,VUIIS/dax
dax/version.py
dax/version.py
VERSION = '2.9.4'
VERSION = '2.9.3-dev0'
mit
Python
385442560251d47fc09a9115b4ccd49b92c94926
Update version.py
VUIIS/dax,VUIIS/dax
dax/version.py
dax/version.py
VERSION = '0.9.1'
VERSION = '0.9.dev'
mit
Python
42ab1b76c065b2886f475b1aace6580ed0860da3
update version to 0.7.1
fsantini/python-e3dc
e3dc/__init__.py
e3dc/__init__.py
"""E3DC Library for Python. Python class to connect to an E3/DC system. Copyright 2017 Francesco Santini <francesco.santini@gmail.com>. Licensed under a MIT license. See LICENSE for details. """ from ._e3dc import E3DC, AuthenticationError, PollError from ._e3dc_rscp_local import CommunicationError, RSCPAuthenticatio...
"""E3DC Library for Python. Python class to connect to an E3/DC system. Copyright 2017 Francesco Santini <francesco.santini@gmail.com>. Licensed under a MIT license. See LICENSE for details. """ from ._e3dc import E3DC, AuthenticationError, PollError from ._e3dc_rscp_local import CommunicationError, RSCPAuthenticatio...
mit
Python
592eb945d4f3f46f70457609da2c94d50b7e5dcd
Fix test_consolidate_tarballs_job to pass a dictionary
jpfeil/toil-scripts,jpfeil/toil-scripts,BD2KGenomics/toil-scripts,BD2KGenomics/toil-scripts
src/toil_scripts/lib/test/test_files.py
src/toil_scripts/lib/test/test_files.py
import os import tarfile from toil.job import Job def test_mkdir_p(tmpdir): import os from toil_scripts.lib.files import mkdir_p work_dir = str(tmpdir) dir_path = os.path.join(work_dir, 'test') assert os.path.exists(work_dir) mkdir_p(work_dir) mkdir_p(dir_path) assert os.path.isdir(dir...
import os import tarfile from toil.job import Job def test_mkdir_p(tmpdir): import os from toil_scripts.lib.files import mkdir_p work_dir = str(tmpdir) dir_path = os.path.join(work_dir, 'test') assert os.path.exists(work_dir) mkdir_p(work_dir) mkdir_p(dir_path) assert os.path.isdir(dir...
apache-2.0
Python
f1b00e67df3ffe6a14ae5e0584547770c780715a
Remove unused import
fontify/fontify,fontify/fontify,fontify/fontify,fontify/fontify
hello.py
hello.py
import os import subprocess from time import sleep from flask import Flask from flask import request from flask import url_for from flask import send_from_directory from flask import make_response from flask import render_template from flask import jsonify from pdfkit import from_string from data import get_chars from ...
import os import subprocess from time import sleep from flask import Flask from flask import request from flask import redirect from flask import url_for from flask import send_from_directory from flask import make_response from flask import render_template from flask import jsonify from pdfkit import from_string from ...
mit
Python
0bf0a2d06cca9440e3ddc5df796a7b8464816007
Add trac.nci
ScottWales/mosrs-setup
mosrs/access.py
mosrs/access.py
#!/usr/bin/env python """ Copyright 2016 ARC Centre of Excellence for Climate Systems Science author: Scott Wales <scott.wales@unimelb.edu.au> 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 h...
#!/usr/bin/env python """ Copyright 2016 ARC Centre of Excellence for Climate Systems Science author: Scott Wales <scott.wales@unimelb.edu.au> 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 h...
apache-2.0
Python
5bc8a73a7a080109abc642c3fc1908e0709a6a47
refactor urls
dubirajara/django_my_ideas_wall,dubirajara/django_my_ideas_wall,dubirajara/django_my_ideas_wall,dubirajara/django_my_ideas_wall
myideas/urls.py
myideas/urls.py
"""myideas URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
"""myideas URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
agpl-3.0
Python
e0b7217caaf4b94c879f43f2ee95584c469687db
Fix o8d importer to read card IDs to make the sanitized cards
mrroach/CentralServer,mrroach/CentralServer,mrroach/CentralServer
csrv/model/read_o8d.py
csrv/model/read_o8d.py
# Read an OCTGN deck from xml.etree import ElementTree def read_file(filename): filedata = open(filename).read() return read(filedata) def read(filedata): root = ElementTree.fromstring(filedata) identity = [] cards = [] for section in root.getchildren(): if len(section) == 1: dest = identity ...
# Read an OCTGN deck from xml.etree import ElementTree def read_file(filename): filedata = open(filename).read() return read(filedata) def read(filedata): root = ElementTree.fromstring(filedata) identity = [] cards = [] for section in root.getchildren(): if len(section) == 1: dest = identity ...
apache-2.0
Python
bc2aee65bf486691f25081e2ca2c319a4e18af33
simplify `examples.pn_diode`
scott-maddox/obpds
src/examples/pn_diode.py
src/examples/pn_diode.py
# # Copyright (c) 2015, Scott J Maddox # # This file is part of Open Band Parameters Device Simulator (OBPDS). # # OBPDS 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...
# # Copyright (c) 2015, Scott J Maddox # # This file is part of Open Band Parameters Device Simulator (OBPDS). # # OBPDS 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
365d0b9ed1b9669964b4dbaead82098af793a8ad
Return empty list for get_service_tasks() rather than None
dcos/shakedown
shakedown/dcos/service.py
shakedown/dcos/service.py
from dcos import mesos def get_service(service_name, inactive=False, completed=False): """ Returns a dictionary describing a service, or None """ services = mesos.get_master().frameworks(inactive=inactive, completed=completed) for service in services: if service['name'] == service_name: ...
from dcos import mesos def get_service(service_name, inactive=False, completed=False): """ Returns a dictionary describing a service, or None """ services = mesos.get_master().frameworks(inactive=inactive, completed=completed) for service in services: if service['name'] == service_name: ...
apache-2.0
Python
fe84b70fc8d61e59ba76aa0fffe6fba018c34272
Add CRUD functionnal tests to service
stackforge/solum,devdattakulkarni/test-solum,ed-/solum,ed-/solum,gilbertpilz/solum,openstack/solum,gilbertpilz/solum,ed-/solum,openstack/solum,stackforge/solum,gilbertpilz/solum,devdattakulkarni/test-solum,gilbertpilz/solum,ed-/solum
functionaltests/api/v1/test_service.py
functionaltests/api/v1/test_service.py
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # 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 applic...
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # 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 applic...
apache-2.0
Python
5d054a20205d03bbc4e7c3acd9bc97bc25b989e8
change migration dependency
praekelt/molo-gem,praekelt/molo-gem,praekelt/molo-gem
gem/migrations/0020_profiledatarule.py
gem/migrations/0020_profiledatarule.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2017-08-03 14:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtail_personalisation', '0013_...
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2017-08-03 14:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtail_personalisation', '0013_...
bsd-2-clause
Python
1c982d906d28b817e6dd1567f11f8f88ccbdf90c
handle post query API calls
biothings/biothings_explorer,biothings/biothings_explorer
biothings_explorer/dispatcher.py
biothings_explorer/dispatcher.py
# -*- coding: utf-8 -*- """ biothings_explorer.dispatcher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains code that biothings_explorer use to communicate to and receive from APIs. It serves as a glue between "apicall" module and "api_output_parser" module. """ from collections import defaultdict from .registry im...
# -*- coding: utf-8 -*- """ biothings_explorer.dispatcher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains code that biothings_explorer use to communicate to and receive from APIs. It serves as a glue between "apicall" module and "api_output_parser" module. """ from collections import defaultdict from .registry im...
apache-2.0
Python
b257c33d114faf719c3a5d6fa78c6f1654d7bcc3
Change GAM overlapped knots unit test assert
michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-3
h2o-py/tests/testdir_algos/gam/pyunit_PUBDEV_7798_overlapped_knots.py
h2o-py/tests/testdir_algos/gam/pyunit_PUBDEV_7798_overlapped_knots.py
import h2o import numpy as np from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator from tests import pyunit_utils def knots_error(): # load and prepare California housing dataset np.random.seed(1234) data = h2o.H2OFrame( python_obj={'C1': list(np.random.randint(0, 9, size=1000)), ...
import h2o import numpy as np from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator from tests import pyunit_utils def knots_error(): # load and prepare California housing dataset np.random.seed(1234) data = h2o.H2OFrame( python_obj={'C1': list(np.random.randint(0, 9, size=1000)), ...
apache-2.0
Python
d9b283647cfb4909faf161090012d21699b313e8
Improve mail sending logic.
cjluo/money-monkey
email_sender.py
email_sender.py
import os import smtplib import logging from email.mime.text import MIMEText from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart class EmailSender: def __init__(self, address): self._address = address def send_email(self, title, image_pairs, delete=True): fro...
import os import smtplib from email.mime.text import MIMEText from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart class EmailSender: def __init__(self, address): self._address = address def send_email(self, title, image_pairs, delete=True): from_address = 'mo...
mit
Python
62bff21a5931fb55a41de893ad59c90202dcb84f
Hide dimagi users
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
auditcare/management/commands/generate_request_report.py
auditcare/management/commands/generate_request_report.py
import csv import re from optparse import make_option from django.contrib.auth.models import User from django.core.management.base import LabelCommand from corehq.apps.users.models import WebUser from dimagi.utils.couch.database import iter_docs from auditcare.models import NavigationEventAudit def navigation_even...
import csv import re from optparse import make_option from django.contrib.auth.models import User from django.core.management.base import LabelCommand from corehq.apps.users.models import WebUser from dimagi.utils.couch.database import iter_docs from auditcare.models import NavigationEventAudit def navigation_even...
bsd-3-clause
Python
5e96f80047205112f54c9798584d42a07560086d
Handle invalid hash
django-blog-zinnia/zinnia-url-shortener-hashids
zinnia_hashids/views.py
zinnia_hashids/views.py
"""Views for Zinnia Hashids""" from django.http import Http404 from django.shortcuts import get_object_or_404 from django.views.generic.base import RedirectView from zinnia.models.entry import Entry from zinnia_hashids.factory import hashids class EntryHashids(RedirectView): """ View for handling the hashid...
"""Views for Zinnia Hashids""" from django.shortcuts import get_object_or_404 from django.views.generic.base import RedirectView from zinnia.models.entry import Entry from zinnia_hashids.factory import hashids class EntryHashids(RedirectView): """ View for handling the hashids of an Entry, simply do a r...
bsd-3-clause
Python
b81cf1def5027f6a905ba5f47ca137bed1cf83e4
Add service tests
infOpen/ansible-role-elasticsearch
tests/testinfra/test_installation.py
tests/testinfra/test_installation.py
""" Role tests """ import pytest # pytestmark = pytest.mark.docker_images( pytestmark = pytest.mark.docker_images('infopen/ubuntu-xenial-ssh-py27:0.2.0') def test_packages(Package): """ Tests about packages installed on all systems """ packages = [ 'python-apt-common', 'python-apt', 'elasti...
""" Role tests """ import pytest # pytestmark = pytest.mark.docker_images( pytestmark = pytest.mark.docker_images('infopen/ubuntu-xenial-ssh-py27:0.2.0') def test_packages(Package): """ Tests about packages installed on all systems """ packages = [ 'python-apt-common', 'python-apt', 'elasti...
mit
Python
ffd530c147c0ab5aa503c273a25438335ee39474
Add a basic raid model (copying off of Firebase).
bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv
avalonstar/apps/broadcasts/models.py
avalonstar/apps/broadcasts/models.py
# -*- coding: utf-8 -*- from django.db import models from apps.games.models import Game class Series(models.Model): name = models.CharField(max_length=200) class Meta: ordering = ['name'] verbose_name_plural = u'series' def __unicode__(self): return u'%s' % self.name @stati...
# -*- coding: utf-8 -*- from django.db import models from apps.games.models import Game class Series(models.Model): name = models.CharField(max_length=200) class Meta: ordering = ['name'] verbose_name_plural = u'series' def __unicode__(self): return u'%s' % self.name @stati...
apache-2.0
Python
a1f5585ac9b50d4ae61278d5c66bc141c7929fa9
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/01e5021627fcdfd0fcae3456606df43764dae69b.
Intel-tensorflow/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "01e5021627fcdfd0fcae3456606df43764dae69b" TFRT_SHA256 = "06053bb593f95542bdb0ce5d8cd5...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "28bd500e25ee9535bf35aba5913761331654246e" TFRT_SHA256 = "6c27234b671fdb97635e443c9013...
apache-2.0
Python
e49ca700f94991d9e8f55ba0326f03f58662db87
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/75fd5a749fc9a17b438ff73143f3270069341730.
karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "75fd5a749fc9a17b438ff73143f3270069341730" TFRT_SHA256 = "d3a51600e7dcb992f0bdccabc5f0...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "efb0edfc9451adb9b6db659866c36226163ead2f" TFRT_SHA256 = "3fa412c5a202c0008f0b358366fd...
apache-2.0
Python
1ba3ce3410f6b15195adf1512b06f4be42b80624
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/98379ff657e2c7c14d7008c750de6c6cd7b19224.
paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,gau...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "98379ff657e2c7c14d7008c750de6c6cd7b19224" TFRT_SHA256 = "24e9d0f2af0d7c1ab4b939cb155112496950b97bf47d91...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "4bac11449d3f91c1a63620538ec22ff26ba626b2" TFRT_SHA256 = "fd2366a9cfce4ec4a495196b911105d90f84e5e7b4725f...
apache-2.0
Python
1d836a832bc4f5263be8918f903d3e5d446c9c8f
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/5bc3e29b4c5a01fdad04bd973a82dc0c1400edec.
tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-e...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "5bc3e29b4c5a01fdad04bd973a82dc0c1400edec" TFRT_SHA256 = "d373392efc65bf624149d2cd8f5a0895b68c63025416f6...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "64633c22f096f63117104a5ccf88c2ec2ec1022a" TFRT_SHA256 = "9fb3bd426daf66c0f8f8cd81c4392548bd971d460f36c5...
apache-2.0
Python
7eb5dbd50a3790e8bfd821ac06d74427619e09f4
generalize detection of a C compiler for use as the preprocessor of the legion C header file for python bindings
StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion
bindings/python/legion_cffi_build.py
bindings/python/legion_cffi_build.py
#!/usr/bin/env python3 # Copyright 2021 Stanford University # # 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...
#!/usr/bin/env python3 # Copyright 2021 Stanford University # # 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...
apache-2.0
Python
1df54f205b6f88a5760ea57476527d25826d932d
Revert of Revert "[Telemetry] Remove power metric from jsgamebench benchmark" (https://codereview.chromium.org/199333006/)
Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,Just-D/chromium-1,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,cros...
tools/perf/benchmarks/jsgamebench.py
tools/perf/benchmarks/jsgamebench.py
# Copyright (c) 2012 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. """Runs Facebook's JSGameBench benchmark.""" import os from telemetry import test from telemetry.page import page_measurement from telemetry.page impor...
# Copyright (c) 2012 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. """Runs Facebook's JSGameBench benchmark.""" import os from metrics import power from telemetry import test from telemetry.page import page_measurement...
bsd-3-clause
Python
d4e44429c49a0aa3523ec27a20484a71d92b4ddf
Update tests to use sparse tensor
nolanliou/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,manipopopo/tensorflow,hsaputra/tensorflow,ZhangXinNan/tensorflow,gunan/tensorflow,gojira/tensorflow,jbedorf/tensorflow,snnn/tensorflow,lakshayg/tensorflow,gautam1858/tensorflow,ravindrapanda/tensorflow,davidzchen/tensorflow,Bismarrck/tensorflow,davidzchen...
tensorflow/contrib/libsvm/python/kernel_tests/decode_libsvm_op_test.py
tensorflow/contrib/libsvm/python/kernel_tests/decode_libsvm_op_test.py
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
Python
d058c6dd08e2cd740094c5ceff265d215c9a0d7f
Bump version number to 0.3
ftobia/ham,ftobia/ham
ham/_version.py
ham/_version.py
__version__ = '0.3'
__version__ = '0.2'
mit
Python
537eb2d0b067cf4c87b334ee6a3b9c883a37b25c
Bump version to 1.0.1-machtfit-58
machtfit/django-oscar,machtfit/django-oscar,machtfit/django-oscar
src/oscar/__init__.py
src/oscar/__init__.py
import os # Use 'dev', 'beta', or 'final' as the 4th element to indicate release type. VERSION = (1, 0, 1, 'machtfit', 58) def get_short_version(): return '%s.%s' % (VERSION[0], VERSION[1]) def get_version(): return '{}.{}.{}-{}-{}'.format(*VERSION) # Cheeky setting that allows each template to be acces...
import os # Use 'dev', 'beta', or 'final' as the 4th element to indicate release type. VERSION = (1, 0, 1, 'machtfit', 57) def get_short_version(): return '%s.%s' % (VERSION[0], VERSION[1]) def get_version(): return '{}.{}.{}-{}-{}'.format(*VERSION) # Cheeky setting that allows each template to be acces...
bsd-3-clause
Python
c2b0d54aebb795f37541936c73f7b82aebe46763
Add --strace option to tests.
grandquista/rethinkdb,AntouanK/rethinkdb,jfriedly/rethinkdb,ayumilong/rethinkdb,bpradipt/rethinkdb,victorbriz/rethinkdb,wkennington/rethinkdb,4talesa/rethinkdb,marshall007/rethinkdb,alash3al/rethinkdb,mbroadst/rethinkdb,urandu/rethinkdb,KSanthanam/rethinkdb,ayumilong/rethinkdb,dparnell/rethinkdb,rrampage/rethinkdb,yako...
test/common/scenario_common.py
test/common/scenario_common.py
import shlex, random from vcoptparse import * import driver import workload_runner def prepare_option_parser_mode_flags(opt_parser): opt_parser["wrapper"] = ChoiceFlags(["--valgrind", "--strace"], None) opt_parser["valgrind-options"] = StringFlag("--valgrind-options", "--leak-check=full --track-origins=yes --c...
import shlex, random from vcoptparse import * import driver import workload_runner def prepare_option_parser_mode_flags(opt_parser): opt_parser["valgrind"] = BoolFlag("--valgrind") opt_parser["valgrind-options"] = StringFlag("--valgrind-options", "--leak-check=full --track-origins=yes --child-silent-after-fork...
apache-2.0
Python
b56badbe1923b6aa08a0c10590643fb829e882a7
Add regimen_changed -> Switched to CAT4 to treatment outcomes
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/enikshay/integrations/nikshay/field_mappings.py
custom/enikshay/integrations/nikshay/field_mappings.py
gender_mapping = { 'male': 'M', 'female': 'F', 'transgender': 'T', } disease_classification = { 'pulmonary': 'P', 'extra_pulmonary': 'EP', } patient_type_choice = { 'new': '1', 'recurrent': '2', 'other_previously_treated': '3', 'treatment_after_failure': '4', 'other_previously_...
gender_mapping = { 'male': 'M', 'female': 'F', 'transgender': 'T', } disease_classification = { 'pulmonary': 'P', 'extra_pulmonary': 'EP', } patient_type_choice = { 'new': '1', 'recurrent': '2', 'other_previously_treated': '3', 'treatment_after_failure': '4', 'other_previously_...
bsd-3-clause
Python
a0af301105226053a0543e055cc1e01cee33a820
Fix scrub_query_jobs
aipescience/django-daiquiri,aipescience/django-daiquiri,aipescience/django-daiquiri
daiquiri/query/management/commands/scrub_query_jobs.py
daiquiri/query/management/commands/scrub_query_jobs.py
from django.conf import settings from django.contrib.auth.models import User from django.core.management.base import BaseCommand from django.db.utils import ProgrammingError from rest_framework.exceptions import ValidationError from daiquiri.core.adapter import DatabaseAdapter from daiquiri.query.models import QueryJ...
from django.conf import settings from django.contrib.auth.models import User from django.core.management.base import BaseCommand from django.db.utils import ProgrammingError from rest_framework.exceptions import ValidationError from daiquiri.core.adapter import DatabaseAdapter from daiquiri.query.models import QueryJ...
apache-2.0
Python
19ab98023470fe0320d28afb8d246d2eac096d12
Use `assertRaisesRegex`
gs0510/coala-bears,coala-analyzer/coala-bears,vijeth-aradhya/coala-bears,refeed/coala-bears,kaustubhhiware/coala-bears,shreyans800755/coala-bears,incorrectusername/coala-bears,refeed/coala-bears,coala/coala-bears,coala/coala-bears,kaustubhhiware/coala-bears,srisankethu/coala-bears,Shade5/coala-bears,Asnelchristian/coal...
tests/dart/DartLintBearTest.py
tests/dart/DartLintBearTest.py
from queue import Queue from bears.dart.DartLintBear import DartLintBear from coalib.settings.Section import Section from coalib.settings.Setting import Setting from coalib.testing.LocalBearTestHelper import verify_local_bear from coalib.testing.LocalBearTestHelper import LocalBearTestHelper from coalib.testing.BearTe...
from queue import Queue from bears.dart.DartLintBear import DartLintBear from coalib.settings.Section import Section from coalib.settings.Setting import Setting from coalib.testing.LocalBearTestHelper import verify_local_bear from coalib.testing.LocalBearTestHelper import LocalBearTestHelper from coalib.testing.BearTe...
agpl-3.0
Python
2f0681a33cebe5bb676959a5a7fd47296b0199e6
check for lack of 'version' key for initial full table
singer-io/tap-mysql
tap_mysql/sync_strategies/full_table.py
tap_mysql/sync_strategies/full_table.py
#!/usr/bin/env python3 # pylint: disable=duplicate-code import copy import singer import tap_mysql.sync_strategies.common as common LOGGER = singer.get_logger() def sync_table(connection, catalog_entry, state, columns): bookmark = state.get('bookmarks', {}).get(catalog_entry.tap_stream_id, {}) version_exist...
#!/usr/bin/env python3 # pylint: disable=duplicate-code import copy import singer import tap_mysql.sync_strategies.common as common LOGGER = singer.get_logger() def sync_table(connection, catalog_entry, state, columns): bookmark_is_empty = state.get('bookmarks', {}).get(catalog_entry.tap_stream_id) is None ...
agpl-3.0
Python
0ed7107cd791dc32edbe70cdd847be44b07cb883
remove unused import
muhammad-ammar/python-social-auth,chandolia/python-social-auth,alrusdi/python-social-auth,duoduo369/python-social-auth,ononeor12/python-social-auth,lneoe/python-social-auth,MSOpenTech/python-social-auth,clef/python-social-auth,JerzySpendel/python-social-auth,lamby/python-social-auth,wildtetris/python-social-auth,robbie...
social/backends/taobao.py
social/backends/taobao.py
import json from social.exceptions import AuthFailed from social.backends.oauth import BaseOAuth2 # taobao OAuth base configuration TAOBAO_OAUTH_HOST = 'oauth.taobao.com' # TAOBAO_OAUTH_ROOT = 'authorize' #Always use secure connection TAOBAO_OAUTH_AUTHORIZATION_URL = 'https://%s/authorize' % (TAOBAO_OAUTH_HOST) TAOBAO_...
import urllib2,urllib from urllib2 import Request, urlopen, HTTPError from urllib import urlencode from urlparse import urlsplit import json from social.exceptions import AuthFailed from social.backends.oauth import BaseOAuth2 # taobao OAuth base configuration TAOBAO_OAUTH_HOST = 'oauth.taobao.com' # TAOBAO_OAUTH_ROOT ...
bsd-3-clause
Python
d24fb97341a2c87f743a98a5c771f81b6436f563
Add an announcement command
MaT1g3R/YasenBaka
cogs/owner_only.py
cogs/owner_only.py
from discord import Forbidden, TextChannel from discord.embeds import Embed from discord.ext.commands import Context, command from bot import Yasen from scripts.checks import is_owner class OnwerOnly: __slots__ = ('bot',) def __init__(self, bot: Yasen): self.bot = bot async def __local_check(se...
from discord.ext.commands import Context from bot import Yasen from scripts.checks import is_owner class OnwerOnly: __slots__ = ('bot',) def __init__(self, bot: Yasen): self.bot = bot async def __local_check(self, ctx: Context): return await is_owner(ctx)
apache-2.0
Python
ef05da1272413645c5b1b37b82aefd5f143645fd
Add cdict converter.
nens/colormaps
colormaps/utils.py
colormaps/utils.py
# -*- coding: utf-8 -*- # (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst. from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from __future__ import division import numpy as np def cdict2config(cdict): """ Return dictionary suitable to...
# -*- coding: utf-8 -*- # (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst. from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from __future__ import division # import numpy as np def cdict2kwargs(cdict): """ Return dictionary suitable ...
mit
Python
eac2211956d49d9da957492bbac1bcdc85b1e40d
Add extra development data so the All England page loads
ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing
openprescribing/frontend/management/commands/load_development_data.py
openprescribing/frontend/management/commands/load_development_data.py
from django.core.management import call_command from django.core.management.base import BaseCommand from frontend.models import ImportLog, PPUSaving from frontend.tests.test_api_spending import ApiTestBase, TestAPISpendingViewsPPUTable class Command(BaseCommand): help = 'Loads sample data intended for use in lo...
from django.core.management import call_command from django.core.management.base import BaseCommand from frontend.tests.test_api_spending import TestAPISpendingViewsPPUTable class Command(BaseCommand): help = 'Loads sample data intended for use in local development' def handle(self, *args, **options): ...
mit
Python
0f7b9a9e3cead1bf5695c6fb601c2b9a7aff974f
remove whitespace
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
src/syft/core/common/object.py
src/syft/core/common/object.py
# external class/method imports (sorted by length) from ...proto.core.common.common_object_pb2 import ObjectWithID as ObjectWithID_PB # syft imports (sorted by length) from .serializable import Serializable from .uid import UID class AbstractObjectWithID(Serializable): """This exists to allow us to typecheck on ...
# external class/method imports (sorted by length) from ...proto.core.common.common_object_pb2 import ObjectWithID as ObjectWithID_PB # syft imports (sorted by length) from .serializable import Serializable from .uid import UID class AbstractObjectWithID(Serializable): """This exists to allow us to typecheck on...
apache-2.0
Python
accebd9321bcbd2404fa19ba4b584b622cc4d95b
Fix test name
titipata/pubmed_parser
tests/test_pubmed_oa_parser.py
tests/test_pubmed_oa_parser.py
import os import pytest import pubmed_parser as pp def test_parse_pubmed_xml(): """ Test parsing metadata from a PubMed XML file """ parsed_xml = pp.parse_pubmed_xml(os.path.join("data", "pone.0046493.nxml")) assert isinstance(parsed_xml, dict) assert len(parsed_xml.get("abstract")) > 0 a...
import os import pytest import pubmed_parser as pp def test_parse_pubmed_xml(): """ Test parse captions and figure ID from an XML file """ parsed_xml = pp.parse_pubmed_xml(os.path.join("data", "pone.0046493.nxml")) assert isinstance(parsed_xml, dict) assert len(parsed_xml.get("abstract")) > 0...
mit
Python
4043c7d72cd15c50763c40e4e3669c7967bc8a3d
Split test into two
zhouyuan/teuthology,michaelsevilla/teuthology,SUSE/teuthology,dreamhost/teuthology,t-miyamae/teuthology,zhouyuan/teuthology,ceph/teuthology,michaelsevilla/teuthology,yghannam/teuthology,dmick/teuthology,ivotron/teuthology,dmick/teuthology,ktdreyer/teuthology,robbat2/teuthology,t-miyamae/teuthology,yghannam/teuthology,t...
teuthology/test/test_config.py
teuthology/test/test_config.py
from .. import config class TestConfig(object): def test_get_ceph_git_base_default(self): conf_obj = config.Config() conf_obj.teuthology_yaml = '' conf_obj.load_files() assert conf_obj.ceph_git_base_url == "https://github.com/ceph/" def test_set_ceph_git_base_via_private(self)...
from .. import config class TestConfig(object): def setup(self): pass def teardown(self): pass def test_get_and_set(self): conf_obj = config.Config() conf_obj.teuthology_yaml = '' conf_obj.load_files() assert conf_obj.ceph_git_base_url == "https://github.c...
mit
Python
3e8e18354dde1681e10d8926f1902688464f071e
mark tg_pos_enhanced hidden
it-projects-llc/pos-addons,it-projects-llc/pos-addons,it-projects-llc/pos-addons
tg_pos_enhanced/__openerp__.py
tg_pos_enhanced/__openerp__.py
# -*- coding: utf-8 -*- { 'name': 'TG POS enhanced', 'version': '1.0.0', 'category': 'Hidden', 'author': 'Thierry Godin', 'summary': 'POS modifications', 'description': """ It's a fork of TG_POS_ENHANCED module. It was not publish on github by author Related links: * http://thierry-godin.devel...
# -*- coding: utf-8 -*- { 'name': 'TG POS enhanced', 'version': '1.0.0', 'category': 'Point Of Sale', 'author': 'Thierry Godin', 'summary': 'POS modifications', 'description': """ It's a fork of TG_POS_ENHANCED module. It was not publish on github by author Related links: * http://thierry-godi...
mit
Python
2efcd8dad6f3008660b47c0f216fc2fdcbdd80a6
Integrate LLVM at llvm/llvm-project@9c8f888f5fca
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "9c8f888f5fcafe8a9b69e7d652dc7328612f8ec6" LLVM_SHA256 = "979bfd8651c02ef211059f59e54773ca1d1f25961f4932f1bdc11f8c8e6ecccf" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "970129a2ddbef1f4f21977fa364248797576fa5a" LLVM_SHA256 = "c98ac72ae99cdd7cbd09f1ce87407a3d1229f01a1e698f1682ab4cc802fd4251" tfrt_http_archive( ...
apache-2.0
Python
c63d1fad13dcbfd9d75e4dc80fced716ce784934
Integrate LLVM at llvm/llvm-project@4bb60c285cb3
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "4bb60c285cb3090e5fa91f585714a63618e08b4f" LLVM_SHA256 = "b0cb96c73cf7186e69069a773dc789a05b3f647a3e84d55c70991b9f4be6a141" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "9430efa18b02e7a3f453793e48c96d5c954ed751" LLVM_SHA256 = "9000f71135ac5c520c269823b493f05a45098dbbe2230b3562e826bdcca766f7" tfrt_http_archive( ...
apache-2.0
Python
0e02b9f622c5d6d1dd5ef006093e43b337c936da
Integrate LLVM at llvm/llvm-project@dbed14d215fe
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "dbed14d215fed740e0e26784e7b8b00b68f5e680" LLVM_SHA256 = "0cbcfb2c0fa145f1cf54d3c53752a9cb22521fad34c304d3e1d8e59d33384118" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "ffe8720aa060d66297500f30bb8ad02114e40326" LLVM_SHA256 = "40cd1f69f314f1ce5ab520333b58993181524cd580b58f3ceb68c4a81ffa7ebe" tfrt_http_archive( ...
apache-2.0
Python
78369d47265d78af9e171e85825343006311a054
Integrate LLVM at llvm/llvm-project@ff1374785f82
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "ff1374785f82c2c184df7ca09a923acf62e4c277" LLVM_SHA256 = "01d45f9a6ab6dc44ff1dad953ebace1b9819867749a7767c777485bb3199e844" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "0ecbb683a2faf0ec5bcb9eb472ebd9921cbe683a" LLVM_SHA256 = "a4a9d16986411836e09ab6d6cf8b41ea2956fbce7000392feb6187c08f6725ae" tfrt_http_archive( ...
apache-2.0
Python
713d0a113371744219e4f10dbd1575aa224e54c8
Bump development version
lpomfrey/django-taggit-machinetags
taggit_machinetags/__init__.py
taggit_machinetags/__init__.py
# -*- coding: utf-8 -*- from distutils import version __version__ = '0.7.1' version_info = version.StrictVersion(__version__).version
# -*- coding: utf-8 -*- from distutils import version __version__ = '0.7.0' version_info = version.StrictVersion(__version__).version
bsd-2-clause
Python
501fa785e5bbcb98c476a81c07acb9ee6ea9d386
add filter functionality and move loging to process_change
qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq
corehq/apps/change_feed/consumer/pillow.py
corehq/apps/change_feed/consumer/pillow.py
from casexml.apps.case.models import CommCareCase from corehq.apps.change_feed import topics from corehq.apps.change_feed.consumer.feed import KafkaChangeFeed from pillowtop.checkpoints.manager import PillowCheckpoint, PillowCheckpointEventHandler, \ get_django_checkpoint_store from pillowtop.couchdb import CachedC...
from casexml.apps.case.models import CommCareCase from corehq.apps.change_feed import topics from corehq.apps.change_feed.consumer.feed import KafkaChangeFeed from pillowtop.checkpoints.manager import PillowCheckpoint, PillowCheckpointEventHandler, \ get_django_checkpoint_store from pillowtop.couchdb import CachedC...
bsd-3-clause
Python
54062a3abdc1516fe854a7b3b8ab86e74364f8cf
update test for min_zoom
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
integration-test/1695-turning-circles-turning-loops.py
integration-test/1695-turning-circles-turning-loops.py
# -*- encoding: utf-8 -*- import dsl from . import FixtureTest # test turning circles and loops class TurningCirclesAndLoops(FixtureTest): def turning_circle(self): self.generate_fixtures( dsl.point(106186562, (-0.3544854, 51.5785667), {u'source': u'openstreetmap.org', ...
# -*- encoding: utf-8 -*- import dsl from . import FixtureTest # test turning circles and loops class TurningCirclesAndLoops(FixtureTest): def turning_circle(self): self.generate_fixtures( dsl.point(106186562, (-0.3544854, 51.5785667), {u'source': u'openstreetmap.org', ...
mit
Python
0a2cdcfc4f9409e586290aff06d27d848fd46fe7
Integrate LLVM at llvm/llvm-project@9b81d2fae8c0
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "9b81d2fae8c05ea611578137101e46a7b61fbaed" LLVM_SHA256 = "68cbb89c244c4db566181d37b465e84dd1676f5f391a5049ab3a12907857b077" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "64b918852c09db6461d4c4c97df288c7b7fee865" LLVM_SHA256 = "a0bca89fbbdfd08c258d98f02ba685690938a46b9a6568017904a4a606abad47" tfrt_http_archive( ...
apache-2.0
Python
d79d726a0e7748f7e63f18592c5de776d4bb0982
Integrate LLVM at llvm/llvm-project@0277a24f4bba
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "0277a24f4bbac284ba7a2ace7eeefdf6305e7f69" LLVM_SHA256 = "f14a9666c78a7829e06ad8d1b6dc86f1f4a9a092eb0b9708f14a5e9e8d4f566f" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "bfb9c749c02402ba082e81bfdadb15fb331c59ae" LLVM_SHA256 = "ccf8590120b44d2a0d8fb960f4009935ab1cee72bb3c5d1314d75bfd03915f92" tfrt_http_archive( ...
apache-2.0
Python
15c540dd5934e5e49fbf6d142bfe66415117ad80
Update raw.py
jlanga/smsk_popoolation,jlanga/smsk_popoolation,jlanga/smsk_popoolation,jlanga/smsk_popoolation,jlanga/smsk_popoolation
src/snakefiles/raw.py
src/snakefiles/raw.py
rule raw_make_links_pe_sample: """ Make a link to the original file, with a prettier name than default. """ input: forward= lambda wildcards: config["samples_pe"][wildcards.sample][wildcards.library]["forward"], reverse= lambda wildcards: config["samples_pe"][wildcards.sample][wildcards....
rule raw_make_links_pe_sample: """ Make a link to the original file, with a prettier name than default. """ input: forward= lambda wildcards: config["samples_pe"][wildcards.sample][wildcards.library]["forward"], reverse= lambda wildcards: config["samples_pe"][wildcards.sample][wildcards....
mit
Python
40f7f49a9ff91966da9157f2305ba04f725106fc
Fix spelling typo
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/enikshay/integrations/bets/const.py
custom/enikshay/integrations/bets/const.py
# BETS event names SUCCESSFUL_TREATMENT_EVENT = "SUCCESSFUL_TREATMENT_EVENT" # TODO: Get this from BETS # e-Voucher payout to chemists (reimbursement of drug cost + additional x% top up) CHEMIST_VOUCHER_EVENT = '101' # e-Voucher payout to labs (reimbursement of lab test cost - partial or in full) LAB_VOUCHER_EVENT =...
# BETS event names SUCCESSFUL_TREATMENT_EVENT = "SUCCESSFUL_TREATMENT_EVENT" # TODO: Get this from BETS # e-Voucher payout to chemists (reimbursement of drug cost + additional x% top up) CHEMIST_VOUCHER_EVENT = '101' # e-Voucher payout to labs (reimbursement of lab test cost - partial or in full) LAB_VOUCHER_EVENT =...
bsd-3-clause
Python
846113236fdcf54339a4ee41e75de743fcb7a8e4
Rework Heavens-Above scraper to use requests instead of urllib2
bgottula/track,bgottula/track
track/heavens_above_scraper.py
track/heavens_above_scraper.py
#!/usr/bin/env python from bs4 import BeautifulSoup import requests import re import track def urlify(s): # Remove all non-word characters (everything except numbers and letters) s = re.sub(r"[^\w\s]", '', s) # Replace all runs of whitespace with a single underscore s = re.sub(r"\s+", '_', s) r...
#!/usr/bin/env python from bs4 import BeautifulSoup import urllib2 import re import track def urlify(s): # Remove all non-word characters (everything except numbers and letters) s = re.sub(r"[^\w\s]", '', s) # Replace all runs of whitespace with a single underscore s = re.sub(r"\s+", '_', s) re...
mit
Python
6c6410495a2f64cb769f4e4d6c9981d9fb7d723c
Add a delete rule test
yaybu/touchdown
touchdown/tests/test_aws_waf_rule.py
touchdown/tests/test_aws_waf_rule.py
# Copyright 2015 Isotoma Limited # # 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 2015 Isotoma Limited # # 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...
apache-2.0
Python