commit stringlengths 40 40 | subject stringlengths 1 3.25k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | old_contents stringlengths 0 26.3k | lang stringclasses 3
values | proba float64 0 1 | diff stringlengths 0 7.82k |
|---|---|---|---|---|---|---|---|
a41dde152d0cecc9ee9ece77959f51536f9a9ec7 | make sure schema exists as part of database creation process | dataactcore/scripts/databaseSetup.py | dataactcore/scripts/databaseSetup.py | import sqlalchemy
from sqlalchemy.exc import OperationalError
from dataactcore.config import CONFIG_DB
def createDatabase(dbName):
"""Create specified database if it doesn't exist."""
connectString = "postgresql://{}:{}@{}:{}/{}".format(CONFIG_DB["username"],
CONFIG_DB["password"], CONFIG_DB["host"], ... | Python | 0 | @@ -55,16 +55,103 @@
alError%0A
+from sqlalchemy.schema import CreateSchema%0Afrom sqlalchemy.exc import ProgrammingError%0A
from dat
@@ -183,16 +183,16 @@
NFIG_DB%0A
-
%0A%0Adef cr
@@ -559,24 +559,289 @@
b.connect()%0A
+ try:%0A connect.execute(CreateSchema('public'))%0A except Programmin... |
a1f8b63f3fc4ee08af84f4db2168ad1bc393e540 | FIX access error on registration | muskathlon/forms/muskathlon_registration_form.py | muskathlon/forms/muskathlon_registration_form.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2018 Compassion CH (http://www.compassion.ch)
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
#################################################... | Python | 0 | @@ -4986,32 +4986,80 @@
lon_portal').id%0A
+ partner = self.partner_id.sudo(uid)%0A
if s
@@ -5081,32 +5081,32 @@
gistration_fee:%0A
-
@@ -5398,31 +5398,23 @@
er_id':
-self.
partner
-_id
.id,%0A
@@ -5956,31 +5956,23 @@
if not
-self.
partner
-_id
.ambassa
@@ -6007,3... |
a2ebf6222b7bccd333fe4692f43a24c7607a2054 | use uuid instead of time for resource name (#3297) | iot/api-client/gcs_file_to_device/gcs_send_to_device_test.py | iot/api-client/gcs_file_to_device/gcs_send_to_device_test.py | # Copyright 2018 Google, 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 agreed to in writing, ... | Python | 0 | @@ -613,20 +613,20 @@
%0Aimport
-time
+uuid
%0A%0Afrom g
@@ -1136,37 +1136,38 @@
-%7B%7D'.format(
-int(time.time
+str(uuid.uuid4
()))%0Adevice_
@@ -1191,37 +1191,38 @@
-%7B%7D'.format(
-int(time.time
+str(uuid.uuid4
()))%0Aregistr
@@ -1258,21 +1258,22 @@
mat(
-int(time.time
+str(uuid.uuid4
()))
|
3db3d7b74080635a7475a9fc556e5c8577f58aa2 | Fix eta message slightly | lms/djangoapps/open_ended_grading/open_ended_grading_util.py | lms/djangoapps/open_ended_grading/open_ended_grading_util.py | def convert_seconds_to_human_readable(seconds):
if seconds < 60:
human_string = "{0} seconds".format(seconds)
elif seconds < 60 * 60:
human_string = "{0} minutes".format(round(seconds/60,1))
elif seconds < (24*60*60):
human_string = "{0} hours".format(round(seconds/(60*60),1))
el... | Python | 0.000041 | @@ -410,15 +410,11 @@
= %22
-In
%7B0%7D
-.
%22.fo
|
dac0ef5376a3892a486d8158a9aaeeaac1b9add9 | Document the --dry-run option. | p3/management/commands/create_speaker_coupons.py | p3/management/commands/create_speaker_coupons.py | # -*- coding: UTF-8 -*-
""" Create coupons for speakers:
Talk - 25%
Training - 100%
Write the created coupons as CSV data to stdout.
"""
import string
import random
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
f... | Python | 0.000003 | @@ -145,16 +145,61 @@
tdout.%0A%0A
+ Use --dry-run to test drive the script.%0A%0A
%22%22%22%0Aimpo
|
f03611ceb8e0a58a4d264a2d7332391910cf3bdb | Allow tolerance for affines with small 'shear' components. | dipy/tracking/local/localtracking.py | dipy/tracking/local/localtracking.py | import numpy as np
from .localtrack import local_tracker
from dipy.align import Bunch
from dipy.tracking import utils
# enum TissueClass (tissue_classifier.pxd) is not accessible
# from here. To be changed when minimal cython version > 0.21.
# cython 0.21 - cpdef enum to export values into Python-level namespace
# ht... | Python | 0 | @@ -992,16 +992,27 @@
, 1), 0.
+, atol=1e-5
):%0A
|
eed1e42e2a8b37621760b013c53af2a83d441a71 | Use the right model in migration (#190) | server/crashmanager/migrations/0013_init_cachedcrashinfo.py | server/crashmanager/migrations/0013_init_cachedcrashinfo.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
from django.db import migrations
from crashmanager.models import CrashEntry
def create_migration_tool(apps, schema_editor):
for entry in CrashEntry.objects.filter(cachedCrashInfo=None):
entry.save(update_fields=['cachedCrashIn... | Python | 0 | @@ -110,51 +110,8 @@
ions
-%0Afrom crashmanager.models import CrashEntry
%0A%0Ade
@@ -156,16 +156,78 @@
ditor):%0A
+ CrashEntry = apps.get_model(%22crashmanager%22, %22CrashEntry%22)%0A
for
|
1036a1723ffacb889b70e690792ca67b33970da0 | Remove unused code | url_shortener/validation.py | url_shortener/validation.py | # -*- coding: utf-8 -*-
from spam_lists import (
GoogleSafeBrowsing, HpHosts, GeneralizedURLTester, URLTesterChain,
SPAMHAUS_DBL, SPAMHAUS_ZEN, SURBL_MULTI, SortedHostCollection
)
from wtforms.validators import ValidationError
from . import app, custom_config_loaded, __version__, __title__
hp_hosts = HpHosts... | Python | 0 | @@ -335,1788 +335,8 @@
r')%0A
-google_safe_browsing = GoogleSafeBrowsing(%0A 'url-shortener',%0A '0.9',%0A app.config%5B'GOOGLE_SAFE_BROWSING_API_KEY'%5D%0A)%0A%0Aspam_tester = GeneralizedURLTester(%0A URLTesterChain(%0A SPAMHAUS_DBL,%0A SPAMHAUS_ZEN,%0A SURBL_MULTI,%0A hp_hosts... |
d4956ca8fe6d58150cdeb3e9c98dcde8efbec2cb | Update api/researches/help_files/constructor_help.py | api/researches/help_files/constructor_help.py | api/researches/help_files/constructor_help.py | constructor_help_message = [
{"label": "Справка", "param": "", "value": "для ссылочного типа: \"ПОЛЕ ОПИСАТЕЛЬНОГО РЕЗУЛЬТАТА БЕЗ ЗАГОЛОВКА\""},
{"label": "-", "param": "%work_place", "value": "Место работы пациента"},
{"label": "-", "param": "%hospital", "value": "Текущая медицинская организация"},
{"l... | Python | 0 | @@ -303,32 +303,41 @@
%D0%BD%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F%22%7D,%0A %7B
+%0A
%22label%22: %22-%22, %22p
@@ -325,32 +325,40 @@
%22label%22: %22-%22,
+%0A
%22param%22: %22%25pare
@@ -370,16 +370,24 @@
r_data%22,
+%0A
%22value%22
@@ -470,23 +470,16 @@
%D0%B5%D1%80%D1%82%D0%B8%D0... |
44a290cb4c541c98179dcecd0053beffec5c394c | Disable slow test. | spec/puzzle/examples/msp/msp2017_06_21_pride_parade_spec.py | spec/puzzle/examples/msp/msp2017_06_21_pride_parade_spec.py | from data import warehouse
from puzzle.examples.msp import msp2017_06_21_pride_parade
from puzzle.problems import logic_problem
from puzzle.puzzlepedia import prod_config
from spec.mamba import *
with description('msp2017_06_21_pride_parade'):
with before.all:
warehouse.save()
prod_config.init()
self.puz... | Python | 0 | @@ -191,24 +191,25 @@
ort *%0A%0Awith
+_
description(
|
3453414ea2ab283f11c204ef70851731c58bf136 | Improve the django admin a bit. | spotseeker_server/admin.py | spotseeker_server/admin.py | """ Copyright 2012, 2013 UW Information Technology, University of Washington
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 r... | Python | 0 | @@ -1242,24 +1242,50 @@
= (%22name%22,%0A
+ %22id%22,%0A
@@ -1334,13 +1334,20 @@
%22
-floor
+organization
%22,%0A
@@ -1370,17 +1370,13 @@
%22
-room_numb
+manag
er%22,
@@ -1401,26 +1401,92 @@
%22
-capacity%22,%0A
+last_modified%22)%0A list_filter = %5B%22spotty... |
497e569b5fc62227a6b2526204b2befa35d9cb02 | fix validation OGRNIP | russian_fields/ogrn.py | russian_fields/ogrn.py | from django.db import models
from django.core.validators import MinLengthValidator, BaseValidator
from django.core import checks
from .validators import (
ProbablyLengthValidator, IsDigitValidator, ControlNumberValidation
)
from .meta_info import OGRNMeta
class OGRN(str):
def detect_mode(self):
l = le... | Python | 0.000005 | @@ -1740,16 +1740,21 @@
er %25 13
+%25 10
== contr
|
84cdde709dee20dc7496ed48161582079c57212b | Read xos_dir out of config file | xos/openstack_observer/ansible.py | xos/openstack_observer/ansible.py | #!/usr/bin/env python
import jinja2
import tempfile
import os
import json
import pdb
import string
import random
import re
from xos.config import Config
# XXX hardcoded path
# is there any reason why we aren't importing xos.config ?
XOS_DIR="/opt/xos"
try:
step_dir = Config().observer_steps_dir
sys_dir = C... | Python | 0.000001 | @@ -149,111 +149,17 @@
nfig
-%0A%0A# XXX hardcoded path%0A# is there any reason why we aren't importing xos.config ?%0AXOS_DIR=%22/opt/xos%22
+, XOS_DIR
%0A%0Atr
|
11bf9b0e286df595961d17b121d01237b69be85d | Use django.utils.six.iteritems in wagtail.utils.utils.deep_update. | wagtail/utils/utils.py | wagtail/utils/utils.py | from __future__ import absolute_import, unicode_literals
import collections
import sys
def deep_update(source, overrides):
"""Update a nested dictionary or similar mapping.
Modify ``source`` in place.
"""
if sys.version_info >= (3, 0):
items = overrides.items()
else:
items = over... | Python | 0 | @@ -74,16 +74,35 @@
ons%0A
+%0Afrom django.utils
import s
ys%0A%0A
@@ -97,18 +97,18 @@
import s
-ys
+ix
%0A%0A%0Adef d
@@ -242,98 +242,29 @@
i
-f sys.version_info %3E= (3, 0):%0A items = overrides.items()%0A else:%0A
+tems = six.iter
items
- =
+(
over
@@ -268,27 +268,16 @@
verrides
-.ite... |
ffc6e870672784d3514631d99d5c68c6ddd8556b | bump version to 0.2.3 | learntools/__init__.py | learntools/__init__.py | from . import advanced_pandas, core, deep_learning, gans, machine_learning, python
__version__ = '0.2.2'
| Python | 0.000001 | @@ -75,16 +75,29 @@
, python
+, ml_insights
%0A%0A__vers
@@ -109,11 +109,11 @@
= '0.2.
-2
+3
'%0A
|
3591a4422a34b718cd3400266ac6f92c8421e82a | Bump to version 0.1.3 | django_migration_linter/constants.py | django_migration_linter/constants.py | # Copyright 2019 3YOURMIND GmbH
# 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, soft... | Python | 0 | @@ -620,17 +620,17 @@
= %220.1.
-2
+3
%22%0A%0AMIGRA
|
4a1cbdaf266629ad8b45b59e87003658ec32c977 | apply yapf patch | safeoutput/__init__.py | safeoutput/__init__.py | import argparse
import logging
import sys
from builtins import object
from os import rename
from os.path import abspath, dirname
from tempfile import NamedTemporaryFile
LOG = logging.getLogger(__name__)
def open(dst=None, mode="w"):
if dst:
fd = NamedTemporaryFile(dir=dirname(abspath(dst)), mode=mode)
... | Python | 0 | @@ -2065,25 +2065,16 @@
rgument(
-%0A
'--binar
@@ -2077,16 +2077,32 @@
inary',%0A
+
@@ -2114,16 +2114,32 @@
'mode',%0A
+
@@ -2160,16 +2160,32 @@
const',%0A
+
@@ -2196,16 +2196,32 @@
t=%22wb%22,%0A
+
@@ ... |
7ef97823488623d69964548cb43edf7e1730cb9f | Add comments | utils/add_plaso_timeline.py | utils/add_plaso_timeline.py | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Python | 0 | @@ -600,27 +600,32 @@
Add
-Plaso timeline
+ElasticSearch index
to
-t
+T
imes
@@ -634,16 +634,181 @@
tch%22%22%22%0A%0A
+# Note: The reason we need to do some funky import order here is because Django%0A# needs some special setup in order to get it's environment correct.%0Aimport argparse%0A
import o
@@ -819,32 ... |
243056d9f6f61ceb84fca2ea2f578f7a4d9eae68 | add @parse_with flask-restful utility | utils/flaskutils/restful.py | utils/flaskutils/restful.py | from flask import request
from flask.ext.restful import Api
def patched_to_marshallable_type(obj):
"""adds __marshallable__ support; see https://github.com/twilio/flask-restful/pull/32"""
if obj is None:
return None # make it idempotent for None
if hasattr(obj, '__getitem__'):
return obj ... | Python | 0.000004 | @@ -1,16 +1,45 @@
+from functools import wraps%0A%0A
from flask impor
@@ -48,16 +48,17 @@
request%0A
+%0A
from fla
@@ -82,16 +82,69 @@
port Api
+%0Afrom flask.ext.restful.reqparse import RequestParser
%0A%0Adef pa
@@ -1986,8 +1986,957 @@
ror(e)%0A%0A
+def parse_with(*arguments, **kwargs):%0A %22%22%22This deco... |
c5ae31cc7e586945718d516017c12cce4dbc620c | Fix wrong ISO-4217 validation | shuup/core/models/_currencies.py | shuup/core/models/_currencies.py | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
import decimal
import ba... | Python | 0 | @@ -1656,16 +1656,10 @@
renc
-y_symbol
+ie
s:%0A
|
bce6bc91779fe35d5194d224508294387c417b1b | Complete common prefix bit sol | lc0201_bitwise_and_of_numbers_range.py | lc0201_bitwise_and_of_numbers_range.py | """Leetcode 201. Bitwise AND of Numbers Range
Medium
URL: https://leetcode.com/problems/bitwise-and-of-numbers-range/
Given a range [m, n] where 0 <= m <= n <= 2147483647,
return the bitwise AND of all numbers in this range, inclusive.
Example 1:
Input: [5,7]
Output: 4
Example 2:
Input: [0,1]
Output: 0
"""
class ... | Python | 0.999999 | @@ -572,40 +572,108 @@
-if m == 0:%0A return 0%0A
+# Edge case when m = 0.%0A if m == 0:%0A return 0%0A%0A # Apply brute force method.
%0A
@@ -774,16 +774,558 @@
esult%0A%0A%0A
+class SolutionCommonPrefixBit(object):%0A def rangeBitwiseAnd(self, m, n):%0A %22%22%... |
b801354eccae449eb22e5c560426534bfa1a8305 | Disable fetching udev rules by default | lg_pointer/scripts/mouse_to_pointer.py | lg_pointer/scripts/mouse_to_pointer.py | #!/usr/bin/env python
from threading import Lock
import math
from evdev import ecodes
import evdev
import os
import urllib2
import subprocess
from tempfile import mktemp
import rospy
from geometry_msgs.msg import Twist
from sensor_msgs.msg import JoyFeedback, JoyFeedbackArray
from wiimote.msg import State
from lg_mir... | Python | 0 | @@ -1587,83 +1587,53 @@
on',
-%0A 'http://lg-head/lg/external_devices/97-logitech-spotlight.rules')%0A
+ None)%0A if udev_location is not None:%0A
@@ -1686,28 +1686,26 @@
.d/9
-7-logitech-spotlight
+9-mouse_to_pointer
.rul
|
4ded6343e8c28a427af757e9dda2e6a10be40657 | enable custom envs for executed commands | vcstool/clients/vcs_base.py | vcstool/clients/vcs_base.py | import os
import subprocess
class VcsClientBase(object):
type = None
def __init__(self, path):
self.path = path
def __getattribute__(self, name):
if name == 'import':
try:
return self.import_
except AttributeError:
pass
ret... | Python | 0.000001 | @@ -718,16 +718,26 @@
elf, cmd
+, env=None
):%0A
@@ -789,16 +789,25 @@
lf.path)
+, env=env
)%0A%0A d
@@ -1493,19 +1493,29 @@
cmd, cwd
+, env=None
):%0A
-
resu
@@ -1571,32 +1571,20 @@
-result%5B'output'%5D
+proc
= subpr
@@ -1593,20 +1593,13 @@
ess.
-check_output
+Popen
(cmd
@@ -1608,16 +... |
2c73f8492d3d6a16da4efb83b010082cb9b09627 | fix typo | skylines/controllers/tracking.py | skylines/controllers/tracking.py | # -*- coding: utf-8 -*-
from datetime import datetime, timedelta
from math import log
from tg import expose, request
from webob.exc import HTTPNotFound
from sqlalchemy import func, over
from sqlalchemy.sql.expression import and_, desc
from skylines.lib.base import BaseController
from skylines.lib.dbutil import get_req... | Python | 0.000556 | @@ -3676,37 +3676,44 @@
-trace
+other_pilots
.append((pilot,
@@ -4064,21 +4064,28 @@
-trace
+other_pilots
.append(
|
ef5305a23b953765cc3b55bdb764487e4b5b180d | Allow for specifying not using the random module (#32763) | salt/utils/pycrypto.py | salt/utils/pycrypto.py |
# -*- coding: utf-8 -*-
'''
Use pycrypto to generate random passwords on the fly.
'''
# Import python libraries
from __future__ import absolute_import
import re
import string
import random
# Import 3rd-party libs
try:
import Crypto.Random # pylint: disable=E0611
HAS_RANDOM = True
except ImportError:
HAS... | Python | 0 | @@ -559,16 +559,33 @@
ength=20
+, use_random=True
):%0A '
@@ -713,16 +713,31 @@
S_RANDOM
+ and use_random
:%0A
|
5e21a1f8f1c1543faabe65fc9b7272ce53bc4e3c | Update withings endpoints | social_core/backends/withings.py | social_core/backends/withings.py | from .oauth import BaseOAuth1
class WithingsOAuth(BaseOAuth1):
name = 'withings'
AUTHORIZATION_URL = 'https://oauth.withings.com/account/authorize'
REQUEST_TOKEN_URL = 'https://oauth.withings.com/account/request_token'
ACCESS_TOKEN_URL = 'https://oauth.withings.com/account/access_token'
ID_KEY = '... | Python | 0 | @@ -109,38 +109,46 @@
= 'https://
-oauth.withings
+developer.health.nokia
.com/account
@@ -188,38 +188,46 @@
= 'https://
-oauth.withings
+developer.health.nokia
.com/account
@@ -278,22 +278,30 @@
s://
-oauth.withings
+developer.health.nokia
.com
|
00b8805e55a3f76c051cb065b5fe4debd1a4766e | Fix pylint issue. | packs/cubesensors/sensors/measurements_sensor.py | packs/cubesensors/sensors/measurements_sensor.py | import time
from rauth import OAuth1Session
from st2common.util import isotime
from st2reactor.sensor.base import PollingSensor
__all__ = [
'CubeSensorsMeasurementsSensor'
]
BASE_URL = 'https://api.cubesensors.com/v1'
FIELD_CONVERT_FUNCS = {
'temp': lambda value: (float(value) / 100)
}
class CubeSensorsMe... | Python | 0 | @@ -2200,16 +2200,45 @@
uple()))
+ # pylint: disable=no-member
%0A%0A
|
5498167003fcb75d8bc222c6625f755bde640167 | Enhance re-raised TemplateDoesNotExist exception | respite/views/views.py | respite/views/views.py | from django.shortcuts import render
from django.http import HttpResponse
from django.template import TemplateDoesNotExist
from django.conf import settings
from respite.settings import DEFAULT_FORMAT
from respite.utils import parse_http_accept_header
from respite.serializers import serializers
from respite import forma... | Python | 0 | @@ -6618,16 +6618,345 @@
raise
+ TemplateDoesNotExist(%0A %22%25(template)s.%25(extension)s does not exist and no serializer for %25(format)s could be found.%22 %25 %7B%0A 'template': template,%0A 'extension': format.extension,%0A ... |
d5b09f5beb5162fcb7d9751abfe699da53009351 | rewrite plot2rst example. | doc/examples/sphinx/plot_plot2rst.py | doc/examples/sphinx/plot_plot2rst.py | #!/usr/bin/env python
"""
================
Tutorial example
================
Here's a line plot:
"""
import numpy as np
import matplotlib.pyplot as plt
'normal string'
x = np.linspace(0, 2*np.pi)
plt.plot(x, np.sin(x))
def dummy():
"""Dummy docstring"""
pass
"""
.. image:: PLOT2RST.current_figure
Here's a... | Python | 0 | @@ -39,45 +39,974 @@
====
-%0ATutorial example%0A================%0A%0AH
+====%0A%60plot2rst%60 extension%0A====================%0A%0A%60plot2rst%60 is a sphinx extension that converts a normal python file into%0AreStructuredText. All strings in the python file are converted into regular%0AreStructuredText, while all ... |
ebd9ae7f0ed83a328555a330b6565343454d8e4f | Bump to final version 0.7.0 | ricecooker/__init__.py | ricecooker/__init__.py | # -*- coding: utf-8 -*-
__author__ = "Learning Equality"
__email__ = "info@learningequality.org"
__version__ = "0.7.0b6"
import sys
if sys.version_info < (3, 6, 0):
raise RuntimeError("Ricecooker only supports Python 3.6+")
| Python | 0 | @@ -115,10 +115,8 @@
.7.0
-b6
%22%0A%0A%0A
|
16d6dd0ba2b5218d211c25e3e197d65fe163b09a | Fix broken Helsinki OIDC provider links | helusers/providers/helsinki_oidc/views.py | helusers/providers/helsinki_oidc/views.py | import requests
from allauth.socialaccount.providers.oauth2.views import (
OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView
)
from .provider import HelsinkiOIDCProvider
class HelsinkiOIDCOAuth2Adapter(OAuth2Adapter):
provider_id = HelsinkiOIDCProvider.id
access_token_url = 'https://api.hel.fi/sso-test/... | Python | 0.000001 | @@ -299,37 +299,32 @@
//api.hel.fi/sso
--test
/openid/token/'%0A
@@ -358,37 +358,32 @@
//api.hel.fi/sso
--test
/openid/authoriz
@@ -431,13 +431,8 @@
/sso
--test
/ope
|
746e5f4443819e8bd6a56b9bd423db7c99d78d98 | Move task cleanup logic to caller | riko/bado/itertools.py | riko/bado/itertools.py | # -*- coding: utf-8 -*-
# vim: sw=4:ts=4:expandtab
"""
riko.bado.itertools
~~~~~~~~~~~~~~~~~~~
Provides asynchronous ports of various builtin itertools functions
Examples:
basic usage::
>>> from riko import get_path
>>> from riko.bado.itertools import coop_reduce
"""
from __future__ import (
a... | Python | 0.000002 | @@ -876,25 +876,8 @@
if
-reactor.fake and
task
@@ -1338,16 +1338,42 @@
up(task)
+ if reactor.fake else None
%0A ret
|
d4d64b914df3edf8cd7df28faed33032f57012a0 | Use ColorMode enum in senseme (#70533) | homeassistant/components/senseme/light.py | homeassistant/components/senseme/light.py | """Support for Big Ass Fans SenseME light."""
from __future__ import annotations
from typing import Any
from aiosenseme import SensemeDevice
from homeassistant import config_entries
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
COLOR_MODE_BRIGHTNESS,
COLOR_MODE_COLOR_... | Python | 0 | @@ -274,55 +274,16 @@
C
-OLOR_MODE_BRIGHTNESS,%0A COLOR_MODE_COLOR_TEMP
+olorMode
,%0A
@@ -2522,26 +2522,25 @@
des = %7BC
-OLOR_MODE_
+olorMode.
BRIGHTNE
@@ -2576,26 +2576,25 @@
mode = C
-OLOR_MODE_
+olorMode.
BRIGHTNE
@@ -2901,26 +2901,25 @@
des = %7BC
-OLOR_MODE_
+olorMode.
COLOR_TE
@@ -2959,18 +2959,... |
ec77be3676fd2caa20f9c50bcf744828b673f8dc | Update scripts/sct_deepseg.py | scripts/sct_deepseg.py | scripts/sct_deepseg.py | #!/usr/bin/env python
# -*- coding: utf-8
"""
This command-line tool is the interface for the deepseg API that performs segmentation using deep learning from the
ivadomed package.
"""
# TODO: Add link to example image so users can decide wether their images look "close enough" to some of the proposed
# models (e.g., ... | Python | 0 | @@ -2852,20 +2852,9 @@
lp=%22
-Whether to r
+R
emov
@@ -2875,38 +2875,33 @@
les.
- 0 = no, 1 = yes (default:
+%22,%0A choices=(0,
1)
-%22
,%0A
|
7b1fbd678cbfa7c1d98a14a1094316db284ffba2 | Initialize config.instance.logger explicitely (#3290) | tests/integration_tests/resources/scripts/reset_storage.py | tests/integration_tests/resources/scripts/reset_storage.py | ########
# Copyright (c) 2018 Cloudify Platform Ltd. 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 requi... | Python | 0 | @@ -643,16 +643,31 @@
rt json%0A
+import logging%0A
import o
@@ -4688,16 +4688,85 @@
.load(f)
+%0A%0A config.instance.logger = logging.getLogger('integration_tests')
%0A con
|
8f527c8ddba1f0407ab5588f19e7ec2052f610ef | support multichannel input | scripts/sct_deepseg.py | scripts/sct_deepseg.py | #!/usr/bin/env python
# -*- coding: utf-8
"""
This command-line tool is the interface for the deepseg API that performs segmentation using deep learning from the
ivadomed package.
"""
# TODO: Add link to example image so users can decide wether their images look "close enough" to some of the proposed
# models (e.g., ... | Python | 0.000219 | @@ -1361,16 +1361,35 @@
%22-i%22,%0A
+ nargs=%22+%22,%0A
@@ -4273,16 +4273,44 @@
/output%0A
+ for file in args.i:%0A
if n
@@ -4331,17 +4331,19 @@
ile(
-args.i):%0A
+file):%0A
@@ -4397,22 +4397,20 @@
.format(
-args.i
+file
))%0A%0A
|
f8deb063e4482905958f846f6be30b6753944675 | Fix problem with fleissner seeded examples | scripts/seed/seeder.py | scripts/seed/seeder.py | import os
from scytale import create_app
from scytale.models import db, Group, Message
def create_admin():
print("Creating admin group (Billy)")
g = Group()
g.name = "Billy"
g.set_password(os.environ["ADMIN_PASSWORD"])
return g
def create_message(group, cipher, key, plaintext, ciphertext):
... | Python | 0.000001 | @@ -1684,16 +1684,17 @@
CZMMRCNY
+
%22)%0A y
@@ -1834,16 +1834,17 @@
FXSMHMAY
+
%22)%0A%0A
|
84db360ec3542daa63c93011215c341ba047ed62 | remove answers extension line | transformations/redundant_context_for_qa/transformation.py | transformations/redundant_context_for_qa/transformation.py | from typing import Tuple, List
from interfaces.QuestionAnswerOperation import QuestionAnswerOperation
from tasks.TaskTypes import TaskType
"""
Simple perturbation to demonstrate a question answering perturbation. This perturbation repeats the context blindly
and expects the answers still to be the same. Note that thi... | Python | 0.002547 | @@ -1226,71 +1226,8 @@
%5D%5D:%0A
- answers.extend(%5Banswer.upper() for answer in answers%5D)%0A
|
efe8c878d2bf2d31c67427bbc040f58d142458e3 | Use popen method to add user vmmaster and fix copying of vmmaster/home files | vmmaster/core/utils/init.py | vmmaster/core/utils/init.py | import subprocess
import crypt
import os
from os.path import expanduser
from .print_utils import cin, cout, OKGREEN, WARNING, FAIL
from vmmaster import package_dir
from .system_utils import run_command
from .utils import change_user_vmmaster
def files(path):
for path, subdirs, filenames in os.walk(path):
... | Python | 0 | @@ -536,20 +536,30 @@
bvirtd'%0A
-%0A
+ user_add =
subproc
@@ -566,12 +566,13 @@
ess.
-call
+Popen
(%0A
@@ -591,18 +591,8 @@
%22, %22
-/usr/sbin/
user
@@ -606,19 +606,16 @@
-
-
%22--creat
@@ -656,19 +656,16 @@
-
%22--group
@@ -688,19 +688,16 @@
-
-
%22--shell
@@ -... |
bbbeeb0099138730746ce539174d806ab172351f | remove wsgi service | vmthunder/cmd/vmthunderd.py | vmthunder/cmd/vmthunderd.py | #!/usr/bin/env python
import sys
import threading
import time
from oslo.config import cfg
from vmthunder import compute
from vmthunder.common import wsgi
from vmthunder.openstack.common import log as logging
#TODO: Auto determine host ip if not filled in conf file
host_opts = [
cfg.StrOpt('host_ip... | Python | 0 | @@ -129,43 +129,8 @@
te%0D%0A
-from vmthunder.common import wsgi%0D%0A
from
|
4790682bbe2b2dbfeab13282f0abdcc02a4ac8d2 | fix tushare parameter error | QUANTAXIS/QAFetch/QATushare.py | QUANTAXIS/QAFetch/QATushare.py | # coding: utf-8
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2019 yutiansut/QUANTAXIS
#
# 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 restriction, including without limitation t... | Python | 0.000001 | @@ -3929,20 +3929,16 @@
-pro_
api=pro,
|
bca64ef1c34a73005b4faf936eee1a5bee0a4691 | clean weasy/layout/percentages | weasy/layout/percentages.py | weasy/layout/percentages.py | # coding: utf8
# WeasyPrint converts web documents (HTML, CSS, ...) to PDF.
# Copyright (C) 2011 Simon Sapin
#
# 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 t... | Python | 0 | @@ -775,16 +775,100 @@
es/%3E.%0A%0A%0A
+%22%22%22%0AFunctions resolving percentages.%0A%0A%22%22%22%0A%0Afrom ..formatting_structure import boxes%0A
from ..c
@@ -885,16 +885,21 @@
import (
+%0A
get_sing
@@ -937,34 +937,8 @@
lue,
-%0A
get
@@ -967,49 +967,8 @@
ue)%0A
-from ..formatti... |
cde2ef098ee5eb444c16ab96aa00d5ef6390d936 | rename test case | lib/new_xml_parsing/test_xml_driver.py | lib/new_xml_parsing/test_xml_driver.py | #!/usr/bin/env python
import os
import re
import unittest
from xml_driver import XMLElement, XMLHandler
from xml.sax import make_parser, handler
# Directory of test files
xml_files = [x for x in os.listdir('test_xml_files')
if re.match(r"2012_\d.xml", x) != None] # Match fixtures
parsed_xml = []
for xf ... | Python | 0.000162 | @@ -712,16 +712,27 @@
asic_xml
+_tag_counts
(self):%0A
|
5dc9f2f376b5ac918c1872e1270a782a9ef45ac9 | Make sure that auto-detected task only has one sub-task | panoptes_aggregation/extractors/workflow_extractor_config.py | panoptes_aggregation/extractors/workflow_extractor_config.py | def workflow_extractor_config(tasks):
extractor_config = {}
for task_key, task in tasks.items():
if task['type'] == 'drawing':
tools_config = {}
for tdx, tool in enumerate(task['tools']):
if ((tool['type'] == 'polygon') and
(len(tool['details'])... | Python | 0 | @@ -318,11 +318,12 @@
'%5D)
-%3E 0
+== 1
) an
|
401db4ee8c67d065b4383e36d7921f6614e4e2c4 | fix tabs blowing up unit tests that use a test client.. we agree not to have perfect tabs during testing | lib/rapidsms/templatetags/tabs_tags.py | lib/rapidsms/templatetags/tabs_tags.py | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import types
import threading
from functools import wraps
from django import template
from django.conf import settings
from django.core.urlresolvers import get_resolver, reverse, RegexURLPattern
from django.utils.importlib import import_module
from django.template im... | Python | 0 | @@ -1349,54 +1349,281 @@
-request = Variable(%22request%22).resolve(context)
+# try to find a request variable, but don't blow up entirely if we don't find it%0A # (this no blow up property is mostly used during testing)%0A try:%0A request = Variable(%22request%22).resolve(context)%0A ... |
7982edb55ba1052c618664abe1027de7315c5dca | Add log messages | sqlitebiter/sqlitebiter.py | sqlitebiter/sqlitebiter.py | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
import collections
import re
import sys
import click
import dataproperty
import logbook
import path
import simplesqlite
from simplesqlite.loader import ValidationError
from s... | Python | 0.000002 | @@ -1911,16 +1911,98 @@
level%0A%0A%0A
+def _get_format_type_from_path(file_path):%0A return file_path.ext.lstrip(%22.%22)%0A%0A%0A
@click.g
@@ -2877,14 +2877,19 @@
-if not
+file_path =
pat
@@ -2905,16 +2905,41 @@
le_path)
+%0A if not file_path
.isfile(
@@ -3439,26 +3439,137 @@
or, IOError)
+ as ... |
78dea51cb04d6c5bd20dacd1eacae6d9e270dfb6 | allow create registration for Event Manager | website_event_attendee_signup/models/event_registration.py | website_event_attendee_signup/models/event_registration.py | # -*- coding: utf-8 -*-
from odoo import api, models
class EventRegistration(models.Model):
_inherit = "event.registration"
@api.model
def create(self, vals):
res = super(EventRegistration, self).create(vals)
if res.event_id.attendee_signup and res.attendee_partner_id:
login ... | Python | 0.000227 | @@ -511,32 +511,68 @@
v%5B'res.users'%5D%5C%0A
+ .sudo()%5C%0A
|
9a7c51054f52ce845408b99680e8b169a38e5089 | handle struct columns with NA elements | ibis/backends/pandas/execution/structs.py | ibis/backends/pandas/execution/structs.py | """Pandas backend execution of struct fields and literals."""
import collections
import operator
import pandas as pd
from pandas.core.groupby import SeriesGroupBy
import ibis.expr.operations as ops
from ibis.backends.pandas.dispatch import execute_node
@execute_node.register(ops.StructField, collections.abc.Mappin... | Python | 0.000003 | @@ -82,24 +82,25 @@
%0Aimport
-operator
+functools
%0A%0Aimport
@@ -401,16 +401,142 @@
ield%5D%0A%0A%0A
+@execute_node.register(ops.StructField, type(None))%0Adef execute_node_struct_field_none(op, data, **kwargs):%0A return None%0A%0A%0A
@execute
@@ -681,49 +681,186 @@
map(
-operator.itemgetter(field)).rename... |
2edd31a036df62f143718efa5a041046b237d7b6 | fix implementation | zaifbot/bot_common/api/wrapper.py | zaifbot/bot_common/api/wrapper.py | import traceback
from zaifbot.bot_common.logger import logger
from zaifapi.impl import ZaifPrivateApi, ZaifPublicApi
def with_retry(func, exception=None):
def _wrapper(*args, **kwargs):
for i in range(5):
try:
func(*args, **kwargs)
except Exception as e:
... | Python | 0.000001 | @@ -135,27 +135,11 @@
func
-, exception=None
):%0A
+
@@ -229,16 +229,23 @@
+return
func(*ar
@@ -325,16 +325,16 @@
rror(e)%0A
+
@@ -382,110 +382,8 @@
())%0A
- if exception:%0A exception()%0A else:%0A break%0A
|
aa77ba580992b649a5e09c91b79269222cbee598 | allow execution of script | .gitlab-ci.d/download_artifacts.py | .gitlab-ci.d/download_artifacts.py | #!/usr/bin/env python
import os
import json
with open('pipeline_info.json') as json_data:
data = json.load(json_data)
#Find last passed GCC build
for i in range(0, len(data)):
if data[i]['name'] == 'pkg:cc7-gcc':
print "Downloading CC7 GCC build"
os.system("curl -O https://gitlab.cern.ch/allpix-squared/a... | Python | 0.000001 | |
5929e36e1b2c881bb524d8017f30020ae8cc1658 | Remove unused char | airflow/contrib/auth/backends/proxied_auth.py | airflow/contrib/auth/backends/proxied_auth.py | # -*- coding: utf-8 -*-
#
# 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
... | Python | 0.000002 | @@ -2715,93 +2715,121 @@
get
-google verified email (%7B0%7D)'.format(%0A resp.status if resp else 'None
+autheticate used with proxied authentication.%5C%0A This might mean the headers were set incorrectly
'))%0A
|
f7cc06046786d6345cbaa7712eab5038f8fbe9f6 | Remove debug prints | app_builder/app_builder_image/concat_roles.py | app_builder/app_builder_image/concat_roles.py | import glob
import os
import shutil
import subprocess
import yaml
def create_role(role):
ret = subprocess.check_output(
'ansible-galaxy init {}'.format(role).split())
if not ret.strip().endswith('created successfully'):
raise Exception('could not create role "{}"'.format(role))
def get_meta... | Python | 0.000001 | @@ -1292,166 +1292,8 @@
ps:%0A
- print('dep: %7B%7D'.format(dep))%0A print('role: %7B%7D'.format(role))%0A print(' dep.endswith(role)?: %7B%7D'.format(dep.endswith(role)))%0A
|
1c507dfcc816252d3bc988256912f6f6fcf2aeb2 | remove trailing period | appengine/reconciletags/version_check_test.py | appengine/reconciletags/version_check_test.py | """Latest age tests.
Checks the build date of the image marked as latest for a repository and fails
if it's over two weeks old."""
import glob
import json
import logging
import os
import re
import subprocess
import unittest
# This is the only way to import LooseVersion that will actually work
from distutils.version ... | Python | 0.999811 | @@ -7714,17 +7714,16 @@
old: %7B0%7D
-.
'.forma
|
a01e904c3fcbe5a66a18e6861e256d65b580a36d | Make checksums optional | SessionTools/session_merger.py | SessionTools/session_merger.py | import gzip
import os
import random
import time
import sys
VERBOSE = True
def log(s):
if VERBOSE:
print (time.strftime("%Y-%m-%d %H:%M:%S") + " " + str(s))
if len(sys.argv) != 3:
print ("Usage: python session_merger.py PathToInSessions PathToTargetSessions")
exit(1)
inSessionsPath = sys.argv[1]
print(inSe... | Python | 0.000144 | @@ -67,16 +67,33 @@
E = True
+%0ACHECKSUM = False
%0A%0Adef lo
@@ -1352,24 +1352,39 @@
sionsPath)%0A%0A
+if CHECKSUM:%0A
log('Computi
@@ -1410,16 +1410,18 @@
ksums')%0A
+
inChecks
@@ -1451,16 +1451,18 @@
nPaths)%0A
+
outCheck
@@ -1564,16 +1564,107 @@
nPaths:%0A
+ i += 1%0A log ('Moving: ' + str(i) + %2... |
59348e48c05b92149479b708bb9d167e4c68d266 | Converts into absolute import | apps/ivrs/management/commands/fetchgkaivrs.py | apps/ivrs/management/commands/fetchgkaivrs.py | from datetime import datetime, timedelta
from django.core.management.base import BaseCommand
from .models import State
from stories.models import Story, UserType, Questiongroup, Answer
class Command(BaseCommand):
args = ""
help = """Analyzes the GKA IVRS states and saves stories.
./manage.py fetchgkaivr... | Python | 0.999991 | @@ -93,16 +93,20 @@
d%0A%0Afrom
+ivrs
.models
|
347c98ab58d06e826695be0e4d358effe82f41d6 | Calculates and prints the stats of all the senders together | Benchmark/bulkDataNTPerf/src/getStats.py | Benchmark/bulkDataNTPerf/src/getStats.py | #! /usr/bin/env python
#*******************************************************************************
# ALMA - Atacama Large Millimiter Array
# Copyright (c) European Southern Observatory, 2016
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Pu... | Python | 0.997808 | @@ -3895,24 +3895,166 @@
f each file%0A
+ print%0A print %22===============================================================%22%0A totMin=0%0A totAvg=0%0A totMax=0%0A totEntries=0%0A
for file
@@ -4256,16 +4256,396 @@
%5B'Max'%5D%0A
+ totMin = totMin + flowStat%5B'Min'%5D%0A ... |
db8ed04ca6fc76a1ddf0db128a7bc0c6690b483f | Fix copypaste fail in ModifySnapshotAttribute | euca2ools/commands/euca/modifysnapshotattribute.py | euca2ools/commands/euca/modifysnapshotattribute.py | # Copyright 2013 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software in source and binary forms,
# with or without modification, are permitted provided that the following
# conditions are met:
#
# Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | Python | 0 | @@ -1785,16 +1785,31 @@
ed=True,
+ route_to=None,
%0A
|
9555acab739128ed0292ba664f62d82880c77dfb | Disable server-side cursors for pgsql to make dumpdata work | imaginegallery/imaginegallery/settings.py | imaginegallery/imaginegallery/settings.py | """
Django settings for imaginegallery project.
Generated by 'django-admin startproject' using Django 1.10.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
im... | Python | 0 | @@ -3290,16 +3290,97 @@
#%0A
+ 'DISABLE_SERVER_SIDE_CURSORS': True, # dumpdata will not work otherwise%0A
%7D%0Aex
|
3f6913ba6ed110f324d1a0afabe4b68a368f4dd1 | Make get_nndc_data.py compatible with Python 3. | data/get_nndc_data.py | data/get_nndc_data.py | #!/usr/bin/env python
from __future__ import print_function
import os
import shutil
import subprocess
import sys
import tarfile
import urllib2
baseUrl = 'http://www.nndc.bnl.gov/endf/b7.1/aceFiles/'
files = ['ENDF-B-VII.1-neutron-293.6K.tar.gz',
'ENDF-B-VII.1-neutron-300K.tar.gz',
'ENDF-B-VII.1-neut... | Python | 0 | @@ -126,22 +126,104 @@
ile%0A
-import urllib2
+%0Atry:%0A from urllib.request import urlopen%0Aexcept ImportError:%0A from urllib2 import urlopen
%0A%0Aba
@@ -734,16 +734,8 @@
q =
-urllib2.
urlo
@@ -1071,24 +1071,161 @@
else:%0A
+ if sys.version_info%5B0%5D %3C 3:%0A overwrit... |
5bc4e10ac7e31709f12585aad27e4087d36b3607 | Change the range of ss composition plots. | ProteinFeatureAnalyzer/features/StructuralHomologFeature.py | ProteinFeatureAnalyzer/features/StructuralHomologFeature.py | import os
import numpy as np
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
import pandas as pd
import Bio.PDB as PDB
from .Feature import Feature
from . import topology
from . import secondary_structures
class StructuralHomologFeature(Feature):
'''Analyze features of structrual homolo... | Python | 0 | @@ -5329,10 +5329,17 @@
nge(
-20
+max(data)
))%0A%0A
|
366e1def745b372fafccc97ec3dfe3be9e6b944c | remove testing data | buzzmobile/tools/route_mapper/route_mapper.py | buzzmobile/tools/route_mapper/route_mapper.py | #!/usr/bin/env python
import cv2
import requests
import rospy
import datetime as dt
import googlemapskey as gmpskey
import numpy as np
from cv_bridge import CvBridge, CvBridgeError
from sensor_msgs.msg import NavSatFix, Image
from std_msgs.msg import String
# GLOBAL VARS
route = {}
pub = rospy.Publisher('route_map... | Python | 0.00001 | @@ -1974,1578 +1974,8 @@
()%0A%0A
-def test():%0A polyline = ('ezynEhmupUsKbGwJ_JyGkHrAbCk%7C@~iAm~@lhDka@%60%60Bwe@%7Cr@%7Bl@tn@sb@%7CV%7DM%60%5BkJdg@el@bs@k%7D@hc@o%7D@zaA%7Ba@hiA%7Bm@b_@' +%0A 'wo@xo@%7DoAhf@ut@tz@kh@pZgY%7CUim@fF%7BlA%7CTsnBt%5Dep@kHi~CfeDyhBpzA_%7B@%60q@ilA~xAwpBbeBkn@fx@%7Db@tf@ks@%60k... |
4d3d03d40b8956c95756396065fb0536094901e6 | Remove bad prints from seed_db | database/seed_db.py | database/seed_db.py | #!/usr/bin/env python
import os
import csv
from engine import engine
from tables import (
Team,
Cell,
WeaponType,
Weapon,
ArmorType,
Armor,
SpeedMap,
Movement,
Unit,
)
class Seeder:
def __init__(self, session):
self.session = session
try:
self.reso... | Python | 0.000001 | @@ -1583,25 +1583,34 @@
def
+print_
delete_
-me
+count
(x):%0A
@@ -1630,19 +1630,18 @@
t(%22delet
-ing
+ed
%25s%22 %25 x
@@ -1642,28 +1642,25 @@
s%22 %25 x)%0A
-
+%0A
x.delete
@@ -1655,71 +1655,58 @@
-x.delete()%0A%0A '''%0A map(delete_me, Team.objects.all
+print_delete... |
2ce248217625a34810c30f81b7f254feac28e8af | version 0.8 | datacats/version.py | datacats/version.py | __version__ = '0.7'
| Python | 0.000001 | @@ -14,7 +14,7 @@
'0.
-7
+8
'%0A
|
3d3824dc60fd5fa5af620306d78150f50ac74fc4 | Fix missing import in `url.py` | rnacentral/portal/urls.py | rnacentral/portal/urls.py | """
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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... | Python | 0.000538 | @@ -586,16 +586,49 @@
e.%0A%22%22%22%0A%0A
+from django.conf import settings%0A
from dja
|
ec1698c9b9d4d6fe417d80b94ef2c5c88b036de2 | bump version to 0.2.1 for adding an RST readme | root_optimize/__init__.py | root_optimize/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-,
from __future__ import absolute_import
from __future__ import print_function
__version__ = '0.2.0'
__all__ = ['json_encoder',
'utils']
| Python | 0 | @@ -137,17 +137,17 @@
= '0.2.
-0
+1
'%0A__all_
|
23b04f0fd6f2b9192a5572514f96f265b4dd00e1 | move _nextTweet initialization to constructor | TwitterSearch/TwitterSearch.py | TwitterSearch/TwitterSearch.py | import requests
from requests_oauthlib import OAuth1
from .TwitterSearchException import TwitterSearchException
from .TwitterSearchOrder import TwitterSearchOrder
from .utils import py3k
try: from urllib.parse import parse_qs # python3
except ImportError: from urlparse import parse_qs # python2
# determine max int va... | Python | 0.000001 | @@ -2560,16 +2560,44 @@
= maxint
+%0A self._nextTweet = 0
%0A%0A
|
db497aaf64696d530e8a1126d048306436ad67e5 | fix python3 errors | Utils/py/naoth/naoth/math3d.py | Utils/py/naoth/naoth/math3d.py | import math
class Vector3:
def __init__(self, x=0, y=0, z=0):
self.x = x
self.y = y
self.z = z
def __add__(self, other):
return Vector3(self.x + other.x, self.y + other.y, self.z + other.z)
def __sub__(self, other):
return Vector3(self.x - other.x, self.y - other.... | Python | 0.003027 | @@ -644,38 +644,32 @@
her, (int, float
-, long
)):%0A
@@ -970,14 +970,8 @@
loat
-, long
)):%0A
|
75ed8a1296ce791949db5a56a6b8f03e0ab178cf | Improve legend position | projects/sequence_prediction/discrete_sequences/lstm/plot.py | projects/sequence_prediction/discrete_sequences/lstm/plot.py | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2015, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... | Python | 0.000003 | @@ -4296,16 +4296,21 @@
.legend(
+loc=4
)%0A%0A pyp
|
4257b10cabdf5dcc93442322add868d7d1544223 | add +x | lvm/check_lvm_usage.py | lvm/check_lvm_usage.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Florian Lambert <flambert@redhat.com>
#
# 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... | Python | 0.000006 | |
aa64a97c7b4961c0c2e6cf45e70c3b19d1497b8c | fix resolving namespaced service calls | rosbridge_library/src/rosbridge_library/internal/services.py | rosbridge_library/src/rosbridge_library/internal/services.py | # Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain ... | Python | 0.000003 | @@ -1690,16 +1690,45 @@
iceProxy
+, resolve_name, get_namespace
%0D%0Afrom r
@@ -4235,24 +4235,110 @@
t instance%0D%0A
+%0D%0A if not service.startswith('/'):%0D%0A service = get_namespace() + service%0D%0A%0D%0A
service_
|
e743f8003e5c876b0d9c71c201c1058b5bc02340 | update plotting example for new colorbar API | examples/basics/plotting/colorbar.py | examples/basics/plotting/colorbar.py | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# vispy: gallery 1
"""
Plot different styles of ColorBar using vispy.plot
"""
from vispy import plot as vp
fig = vp.Fig(size=(800, 400), show=False)
plot = fig[0, 0]
# note:... | Python | 0 | @@ -379,23 +379,20 @@
th top.%0A
-orienta
+posi
tions =
@@ -398,16 +398,26 @@
%5B%22top%22,
+ %22bottom%22,
%22left%22,
@@ -436,23 +436,20 @@
for
-orienta
+posi
tion in
orie
@@ -444,23 +444,20 @@
tion in
-orienta
+posi
tions:%0A
@@ -462,15 +462,8 @@
%0A
- cbar =
plo
@@ -477,40 +477,27 @@
bar(
-or... |
068c1a2111ec31acdc91e3ac85f5182fc738b4d6 | Add missing pandas import to plotting/server/elements.py | examples/plotting/server/elements.py | examples/plotting/server/elements.py | from bokeh.plotting import *
from bokeh.sampledata import periodic_table
elements = periodic_table.elements
elements = elements[elements['atomic number'] <= 82]
elements = elements[~pd.isnull(elements['melting point'])]
mass = [float(x.strip('[]')) for x in elements['atomic mass']]
elements['atomic mass'] = mass
pale... | Python | 0.000001 | @@ -1,16 +1,37 @@
+import pandas as pd%0A%0A
from bokeh.plott
|
b71ee1ee1a4a2222bf3afcab8aa87f09dea7ef7c | Add data_src attr as URL source in image_extractor (#58) | extraction/content_extractors/image_extractor.py | extraction/content_extractors/image_extractor.py | """This script checks whether DOM has image tag or not and
creates and returns the Image object"""
import bs4
from data_models.image import Image
from extraction.content_extractors.interface_content_extractor import \
IContentExtractor
from extraction.utils import media_extraction_utils as utils
class ImageExtr... | Python | 0 | @@ -943,24 +943,280 @@
nstance%22%22%22%0A%0A
+ '''%0A Prioritizing data-src if present for extracting URL over src%0A as src is used as lazy loading when data-src is present.%0A '''%0A%0A if node.has_attr('data-src'):%0A image_url = node%5B'data-src'%5D%0A else:%0A... |
cf4871f0cd7d395fa3bb46f6c9ebd0aa8183b5f5 | Add a -a option that does nothing. | src/browser/commands/ls.py | src/browser/commands/ls.py | ##
# Copyright (c) 2007-2010 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | Python | 0.999999 | @@ -1068,16 +1068,17 @@
ions), '
+a
l')%0A%0A
@@ -1150,16 +1150,68 @@
name ==
+ %22-a%22:%0A pass%0A elif name ==
%22-l%22:%0A
|
4d690102dde86bc9c2e8e9bf07d7a07ae7dcfb49 | update secret whenever encryptedcontent is specified | src/cfn_secret_provider.py | src/cfn_secret_provider.py | import boto3
import hashlib
import logging
import os
import binascii
import string
from base64 import b64decode
from botocore.exceptions import ClientError
from cfn_resource_provider import ResourceProvider
from past.builtins import basestring
from random import choice
import ssm_parameter_name
log = logging.getLogger... | Python | 0 | @@ -6499,24 +6499,133 @@
cret=True)%0A%0A
+ def refresh_on_update(self):%0A return self.get('RefreshOnUpdate') or self.get('EncryptedContent')%0A%0A
def upda
@@ -6751,38 +6751,33 @@
et=self.
-get('R
+r
efresh
-OnU
+_on_u
pdate
-')
)%0A%0A d
|
9b5af6525c1ec2c187c43b10074709f7a93fcb5e | Save correctly transfer screen | stock_picking_package_info/wizard/stock_transfer_details.py | stock_picking_package_info/wizard/stock_transfer_details.py | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, api
from datetime import dateti... | Python | 0 | @@ -702,16 +702,61 @@
ration'%5D
+.with_context(%0A no_recompute=True)
%0A
@@ -1569,35 +1569,32 @@
-if
prod.packop_id.p
@@ -1596,373 +1596,143 @@
_id.
-product_qty != prod.quantity:%0A qty = prod.packop_id.product_qty - prod.quantity%0A ... |
e8ae5f2c876426547f10a3d0628c7e6b3602826c | Remove mixin Select2FieldMixin | select2rocks/fields.py | select2rocks/fields.py | from django import forms
from select2rocks.widgets import AjaxSelect2Widget
class Select2FieldMixin(object):
widget = AjaxSelect2Widget
def label_from_instance(self, obj):
if self._label_from_instance is not None:
val = self._label_from_instance(obj)
else:
val = super... | Python | 0.000002 | @@ -76,77 +76,8 @@
t%0A%0A%0A
-class Select2FieldMixin(object):%0A widget = AjaxSelect2Widget%0A%0A
def
@@ -87,32 +87,40 @@
el_from_instance
+_with_pk
(self, obj):%0A
@@ -117,202 +117,89 @@
obj
+, val
):%0A
- if self._label_from_instance is not None:%0A val = self._label_from_instanc... |
fdd389742a0e99fbb4a84298f2861bd37effa474 | Add function to get receptor-ligand interactions | indra/sources/omnipath/omnipath_client.py | indra/sources/omnipath/omnipath_client.py | from __future__ import unicode_literals
from builtins import dict, str
import logging
import requests
from collections import Counter
from indra.databases import hgnc_client, uniprot_client
from indra.statements import modtype_to_modclass, Agent, Evidence
logger = logging.getLogger("omnipath")
op_url = 'http://omnipa... | Python | 0 | @@ -95,16 +95,49 @@
equests%0A
+from json import JSONDecodeError%0A
from col
@@ -356,16 +356,101 @@
db.org'%0A
+urls = %7B'interactions': op_url + '/interactions',%0A 'ptms': op_url + '/ptms'%7D%0A%0A
%0Adef _ag
@@ -2774,28 +2774,726 @@
s_from_op_mods(res.json())%0A%0A
+%0Adef get_all_rlint():%0A %22%22%... |
6b82f86343bc07e8bfd536efe63153779b574984 | fix sort paramter deprecated | sequana/demultiplex.py | sequana/demultiplex.py | # -*- coding: utf-8 -*-
#
# This file is part of Sequana software
#
# Copyright (c) 2019 - Sequana Development Team
#
# File author(s):
# Thomas Cokelaer <thomas.cokelaer@pasteur.fr>
#
# Distributed under the terms of the 3-clause BSD license.
# The full license is in the LICENSE file, distributed with this s... | Python | 0.000001 | @@ -4421,18 +4421,19 @@
, total%5D
-,
+) #
sort=Tru
|
df74e7c1f8dad72e5e719bd969121e123cfe6c8b | make sure display_name is different from login_base for nodetest | xos/tosca/tests/nodetest.py | xos/tosca/tests/nodetest.py | from basetest import BaseToscaTest
from core.models import Node, Site, Deployment, SiteDeployment
class NodeTest(BaseToscaTest):
tests = ["create_node_minimal",
"destroy_node",
]
def cleanup(self):
self.try_to_delete(Node, name="testnode")
self.try_to_d... | Python | 0.000001 | @@ -727,16 +727,64 @@
es.Site%0A
+ properties:%0A display_name: My Site%0A
re
|
25c0739e224d8bf3feb89f19da1151267555bbc2 | Mark state final in BinarySensorEntity (#51234) | homeassistant/components/binary_sensor/__init__.py | homeassistant/components/binary_sensor/__init__.py | """Component to interface with binary sensors."""
from __future__ import annotations
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.const import STATE_OFF, STATE_ON
from homeassistant.helpers.config_validation import ( # noqa: F401
PLATFORM_SCHEMA,
PLATFORM_SCHEMA_... | Python | 0 | @@ -124,16 +124,41 @@
logging
+%0Afrom typing import final
%0A%0Aimport
@@ -3910,16 +3910,45 @@
e = None
+%0A _attr_state: None = None
%0A%0A @p
@@ -4078,16 +4078,27 @@
_is_on%0A%0A
+ @final%0A
@pro
|
3e280e64874d1a68b6bc5fc91a8b6b28968b74e3 | Store project and module componentes separately | meinberlin/apps/dashboard2/contents.py | meinberlin/apps/dashboard2/contents.py | class DashboardContents:
_registry = {}
content = DashboardContents()
| Python | 0 | @@ -39,9 +39,812 @@
= %7B
-%7D
+'project': %7B%7D, 'module': %7B%7D%7D%0A%0A def __getitem__(self, identifier):%0A component = self._registry%5B'project'%5D.get(identifier, None)%0A if not component:%0A component = self._registry%5B'module'%5D.get(identifier)%0A return component%0A%... |
087c1c1e66d06e6c91efedde312418d52bab4b3b | Fix format issues | salt/modules/nagios.py | salt/modules/nagios.py | # -*- coding: utf-8 -*-
"""
Run nagios plugins/checks from salt and get the return as data.
"""
# Import python libs
import os
import stat
# Import salt libs
import logging
log = logging.getLogger(__name__)
PLUGINDIR = '/usr/lib/nagios/plugins/'
def __virtual__():
"""
Only load if nagios-plugins are inst... | Python | 0.000008 | @@ -3929,17 +3929,16 @@
rguments
-
%0A
|
0ecadb6459e485eee0e7aae1802ad11aad66eb7a | Update tests | account_cutoff_prepaid/tests/test_account_cutoff_prepaid.py | account_cutoff_prepaid/tests/test_account_cutoff_prepaid.py | # Copyright 2014 ACSONE SA/NV (http://acsone.eu)
# @author Stéphane Bidoul <stephane.bidoul@acsone.eu>
# Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import time
from odoo import fields
from odoo.tests.common import Savepoin... | Python | 0.000001 | @@ -4037,32 +4037,24 @@
off.get_
-prepaid_
lines()%0A
@@ -4037,32 +4037,32 @@
off.get_lines()%0A
+
self.ass
@@ -4230,32 +4230,24 @@
cutoff.get_
-prepaid_
lines()%0A
@@ -4396,32 +4396,32 @@
cutoff(%2201-31%22)%0A
+
cutoff.g
@@ -4419,32 +4419,24 @@
cutoff.get_
-prepaid_
lines()%0... |
4af13edc87fee4083491fcc14197040300b4575f | Remove hardcoded url | frappe/integrations/frappe_providers/__init__.py | frappe/integrations/frappe_providers/__init__.py | # imports - module imports
from frappe.integrations.frappe_providers.frappecloud import frappecloud_migrator
def migrate_to(local_site, frappe_provider):
if frappe_provider in ("frappe.cloud", "frappecloud.com"):
frappe_provider = "staging.frappe.cloud"
return frappecloud_migrator(local_site, frappe_provider)
e... | Python | 0.001331 | @@ -213,51 +213,8 @@
%22):%0A
-%09%09frappe_provider = %22staging.frappe.cloud%22%0A
%09%09re
|
b580f0d30435e5a4f4cfd6026b290a0db5dfc1f6 | function is expired | website/user/models.py | website/user/models.py | import datetime
from django.db import models
from django.db.models.signals import post_save
from django.contrib.auth.models import User
from django.dispatch import receiver
from django.utils import timezone, crypto
from model_utils.models import TimeStampedModel
class Profile(TimeStampedModel, models.Model):
use... | Python | 0.999973 | @@ -676,16 +676,198 @@
False)%0A%0A
+ def is_expired(self):%0A limit = self.created + datetime.timedelta(days=self.NB_DAY_EXPIRE)%0A if limit %3C timezone.now():%0A return True%0A return False%0A%0A
def
|
e5c16c4ba183f968d296455db8832055115cd2e5 | Improve etiquette_flask_dev helptext. | frontends/etiquette_flask/etiquette_flask_dev.py | frontends/etiquette_flask/etiquette_flask_dev.py | '''
This file is the gevent launcher for local / development use.
Simply run it on the command line:
python etiquette_flask_dev.py [port]
'''
import gevent.monkey; gevent.monkey.patch_all()
import argparse
import gevent.pywsgi
import os
import sys
from voussoirkit import pathclass
from voussoirkit import vlogging
l... | Python | 0 | @@ -1,12 +1,52 @@
'''%0A
+etiquette_flask_dev%0A===================%0A
This fil
@@ -104,79 +104,499 @@
e.%0A%0A
-Simply run it on the command line:%0Apython etiquette_flask_dev.py %5Bport%5D
+%3E etiquette_flask_dev port %3Cflags%3E%0A%0Aport:%0A Port number on which to run the server. Default 5000.%0A%0A--https:... |
46ee9dad4030c8628d951abb84a667c7398dd834 | Fix error when multiple objects were returned for coordinators in admin | src/coordinators/models.py | src/coordinators/models.py | from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from locations.models import District
class Coordinator(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
is_manage... | Python | 0.000001 | @@ -895,9 +895,20 @@
*kwargs)
+.distinct()
%0A
|
199d0cdc681675d5e20b2167424becaef8391391 | Fix typo | module/plugins/hoster/ZippyshareCom.py | module/plugins/hoster/ZippyshareCom.py | # -*- coding: utf-8 -*-
import re
from os import path
from urllib import unquote
from urlparse import urljoin
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ZippyshareCom(SimpleHoster):
__name__ = "ZippyshareCom"
__type__ = "hoster"
__version__ = "0.58"
_... | Python | 0.000007 | @@ -304,17 +304,17 @@
_ = %220.5
-8
+9
%22%0A%0A _
@@ -1293,32 +1293,34 @@
elf.html).groups
+()
)%0A c1
@@ -1407,16 +1407,18 @@
).groups
+()
)%0A
|
85b352669bd077ac681cea7a9066065ea85c1cbd | Document DEFAULT_DPI | pyproteome/__init__.py | pyproteome/__init__.py | """
pyproteome is a Python package for interacting with proteomics data.
It includes modules for loading, processing, and analyzing data by mass
spectometry. Currently it only supports data produced by MASCOT / Discoverer
and CAMV.
"""
from . import (
analysis, bca, cluster, correlation, data_sets, discoverer, le... | Python | 0.000071 | @@ -2356,16 +2356,74 @@
PI = 300
+%0A%22%22%22%0AThe DPI to use when generating all image figures.%0A%22%22%22
%0A%0A__all_
|
62a935e6ec35b492bac08f16ce66bf6f20d3aa16 | Fix admin data source creation without passing a user | src/data_sources/models.py | src/data_sources/models.py | import hashlib
import logging
from django import forms
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.validators import (
RegexValidator, MinLengthValidator, MaxLengthValidator
)
from django.db import models
from django.utils.translation import ugettext_lazy as ... | Python | 0.000001 | @@ -2609,16 +2609,44 @@
%22%22%22
+%0A self.clean_fields()
%0A%0A
@@ -2792,22 +2792,16 @@
raise
-forms.
Validati
|
21b53578b90896c358f43339fccdce6df722682d | Remove depractated login view | remo/profiles/views.py | remo/profiles/views.py | from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.contrib.auth.views import login as django_login
from django.views.generic.simple import direct_to_template
from session_csrf import anonymous_csrf
from django.contr... | Python | 0 | @@ -1247,104 +1247,4 @@
me)%0A
-%0A%0A@anonymous_csrf%0Adef login(request):%0A return direct_to_template(request, template='login.html')%0A
|
6c37701e169bbbf032b88580d34ca1bd36568dbb | remove unused function for generating sub menu | modules/vcms/www/templatetags/menus.py | modules/vcms/www/templatetags/menus.py | # encoding: utf-8
# copyright Vimba inc. 2009
# programmer : Francis Lavoie
from django import template
from django.template.loader import render_to_string
from vcms.www.models.page import BasicPage as Page
from vcms.www.models.menu import CMSMenu
from site_language.models import Language
from hwm.tree import helper
... | Python | 0.000001 | @@ -1817,1287 +1817,8 @@
)%0A%0A%0A
-def generate_sub_menu(current_page=None):%0A %22%22%22 return a html version of the submenu%0A %22%22%22%0A l = Language.objects.get_default()%0A %22%22%22 return navigation tree as a list containin tree node dictionary %22%22%22 %0A %0A roots = MainMenu.get_root_... |
d2bff2f612c6d9b32a6a08f3c76f808e3d70d122 | Fix a bug in MultipleDatabaseModelDocument | slideatlas/models/common/multiple_database_model_document.py | slideatlas/models/common/multiple_database_model_document.py | # coding=utf-8
from mongoengine.connection import get_db
from .model_document import ModelDocument, ModelQuerySet
################################################################################
__all__ = ('MultipleDatabaseModelDocument',)
###########################################################################... | Python | 0.000484 | @@ -1063,16 +1063,115 @@
n utils%0A
+ new_cls_dict = dict(cls.__dict__)%0A new_cls_dict%5B'meta'%5D = new_cls_dict.pop('_meta')%0A
@@ -1211,34 +1211,28 @@
ases__,
-dict(
+new_
cls
-._
_dict
-__)
)%0A%0A%0Aclas
|
63c1a1553638aec8da380d41313d0d94b3244163 | update import | datacheck/__init__.py | datacheck/__init__.py | from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
from datacheck.core import validate, Type, List, Required, Optional, Dict
__all__ = [
'validate',
'Type',
'List',
'Required',
'Optional',
'Dict',
]
| Python | 0 | @@ -153,16 +153,17 @@
import
+(
validate
@@ -168,19 +168,58 @@
te,
-Type, List,
+Validator, Type, List,%0A
Req
@@ -239,16 +239,17 @@
al, Dict
+)
%0A%0A%0A__all
@@ -267,24 +267,41 @@
'validate',%0A
+ 'Validator',%0A
'Type',%0A
|
5a05c2fc0e5560463ade239492d5252db3f701be | set maturity to Beta | account_avatax/__manifest__.py | account_avatax/__manifest__.py | {
"name": "Taxes using Avalara Avatax API",
"version": "13.0.1.0.0",
"author": "Open Source Integrators, Fabrice Henrion, Odoo SA,"
" Odoo Community Association (OCA)",
"summary": "Automatic Tax application using the Avalara Avatax Service",
"license": "AGPL-3",
"category": "Accounting",
... | Python | 0.000493 | @@ -1066,10 +1066,44 @@
ara%22%5D%7D,%0A
+ %22development_status%22: %22Beta%22,%0A
%7D%0A
|
448f551f0f07dcf2f4589b5342c4a5cfb8d5aca0 | Add delete command in cmd interface | deduplicated/cmd.py | deduplicated/cmd.py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Eduardo Klosowski
# License: MIT (see LICENSE for details)
#
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import sys
from . import Directory, directory_list, str_size
# Argument parser
parser = argparse.ArgumentParser(... | Python | 0.000002 | @@ -233,16 +233,34 @@
rectory,
+ directory_delete,
directo
@@ -1159,16 +1159,193 @@
s='+')%0A%0A
+# delete command%0Aparser_delete = subparsers.add_parser('delete',%0A help='delete directory')%0Aparser_delete.add_argument('delete', nargs='+')%0A%0A
# indir
@@ -4727,32 +4727,19... |
19183dd5dd50b29ed0ee63f506904d6f693cad21 | Allow the website to be accessed by any host on local server | farmers_api/config/settings/local.py | farmers_api/config/settings/local.py | from .base import *
DEBUG = True
SECRET_KEY = 'local'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
| Python | 0 | @@ -28,16 +28,39 @@
= True%0A%0A
+ALLOWED_HOSTS = %5B'*'%5D%0A%0A
SECRET_K
|
b68371d318d14b811340f7eff45099ba31c0a4a3 | clean up code | federatedml/statistic/union/union.py | federatedml/statistic/union/union.py | #
# Copyright 2019 The FATE 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 appli... | Python | 0 | @@ -1439,481 +1439,8 @@
se%0A%0A
- def _run_data(self, data_sets=None, stage=None):%0A if not self.need_run:%0A return%0A data = %7B%7D%0A for data_key in data_sets:%0A for key in data_sets%5Bdata_key%5D.keys():%0A if data_sets%5Bdata_key%5D.get(key, None):%... |
b1aab2a93cf9088a9c1726a58c38aa1b9ab950e7 | use local logger | scripts/copy_with_deps.py | scripts/copy_with_deps.py | #!/usr/bin/env python
# Copyright 2018-2019 Arm Limited.
# SPDX-License-Identifier: Apache-2.0
#
# 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-... | Python | 0 | @@ -728,16 +728,56 @@
rt sys%0A%0A
+%0Alogger = logging.getLogger(__name__)%0A%0A%0A
RE_INCLU
@@ -2939,19 +2939,18 @@
logg
-ing
+er
.error(%22
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.