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 |
|---|---|---|---|---|---|---|---|
7d1a903845db60186318575db11a712cd62d884d | Fix mypy import errors due to removed services | win-installer/gaphor-script.py | win-installer/gaphor-script.py | if __name__ == "__main__":
import gaphor
from gaphor import core
from gaphor.services.actionmanager import ActionManager
from gaphor.plugins.alignment import Alignment
from gaphor.services.componentregistry import ComponentRegistry
from gaphor.ui.consolewindow import ConsoleWindow
from gapho... | Python | 0 | @@ -70,119 +70,8 @@
ore%0A
- from gaphor.services.actionmanager import ActionManager%0A from gaphor.plugins.alignment import Alignment%0A
@@ -134,16 +134,16 @@
egistry%0A
+
from
@@ -248,82 +248,8 @@
ice%0A
- from gaphor.services.diagramexportmanager import DiagramExportManager%0A
@@ -522,64... |
c9d9375db1a70e6095d76344773699cb5189fa43 | Update rasa_core/policies/mapping_policy.py | rasa_core/policies/mapping_policy.py | rasa_core/policies/mapping_policy.py | import logging
import os
from typing import Any, List, Text
from rasa_core.actions.action import ACTION_LISTEN_NAME
from rasa_core import utils
from rasa_core.domain import Domain
from rasa_core.policies.policy import Policy
from rasa_core.trackers import DialogueStateTracker
from rasa_core.constants import MAPPING_S... | Python | 0 | @@ -475,17 +475,16 @@
ed actio
-i
ns in th
|
cf011d9c8018a0ceba732c5fbb3fc7bdd58a3011 | Upgrade step small fix | bika/lims/upgrade/to318.py | bika/lims/upgrade/to318.py | from Acquisition import aq_inner
from Acquisition import aq_parent
from Products.CMFCore.utils import getToolByName
from bika.lims.permissions import AddMultifile
from Products.Archetypes.BaseContent import BaseContent
from bika.lims.upgrade import stub
from bika.lims import logger
def upgrade(tool):
"""Upgrade st... | Python | 0 | @@ -1578,120 +1578,8 @@
l)%0A%0A
- qi = portal.portal_quickinstaller%0A setup.setLastVersionForProfile(%22profile-bika.lims:default%22, %223.1.8%22)%0A%0A
@@ -1864,14 +1864,19 @@
if
+(
not p
-%5B
+.get(
'sep
@@ -1882,17 +1882,24 @@
parator'
-%5D
+, None))
else p%5B
|
3646aba05566631f07695b2b5e6ad2fe0ece309b | Patch version bump to 29.3.1 | notifications_utils/version.py | notifications_utils/version.py | __version__ = '29.3.0'
| Python | 0 | @@ -17,7 +17,7 @@
9.3.
-0
+1
'%0A
|
1c4854329a0eb15c62f4c3be5457337452cf18a4 | Make the log easier to follow for queue messages. | imgfac/BuildJob.py | imgfac/BuildJob.py | # Copyright 2011 Red Hat, 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 t... | Python | 0 | @@ -4011,41 +4011,16 @@
-ReservationManager().enter_queue(
+qname =
self
@@ -4051,32 +4051,198 @@
der, new_status)
+%0A self.log.debug(%22%25s for %25s about to enter %25s queue...%22 %25 (builder.new_image_id, builder.target, qname))%0A ReservationManager().enter_queue(qname
)%0A ... |
153b749f7b71fd7c443090812178bcb60d442bfd | fix problem_id length | anytask/anycontest/common.py | anytask/anycontest/common.py | # -*- coding: utf-8 -*-
import requests
import logging
import os
from time import sleep
from django.conf import settings
from issues.model_issue_field import IssueField
from django.contrib.auth.models import User
logger = logging.getLogger('django.request')
class FakeResponse(object):
def __init__(self):
... | Python | 0.000029 | @@ -82,17 +82,16 @@
t sleep%0A
-%0A
from dja
@@ -1050,39 +1050,9 @@
on)%0A
- for i in range(3):%0A
+%0A
@@ -1173,36 +1173,32 @@
-
headers=%7B'Author
@@ -1241,20 +1241,16 @@
OAUTH%7D)%0A
-
@@ -1271,28 +1271,24 @@
one%0A
-
for problem
@@ -1336,36 +1... |
c93b8ed05664c396de6c459695a4b9bca803aa0d | Fix a spell typo | magnumclient/v1/client.py | magnumclient/v1/client.py | # Copyright 2014
# The Cloudscaling Group, 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 agre... | Python | 0.999999 | @@ -3132,17 +3132,17 @@
s compat
-a
+i
bility f
|
263959254016f78ba6ed53289577b2f3be669e16 | Revert "[include-fixer] Don't throw exception when parsing unknown arguments in vim script." | include-fixer/find-all-symbols/tool/run-find-all-symbols.py | include-fixer/find-all-symbols/tool/run-find-all-symbols.py | #!/usr/bin/env python
#
#=- run-find-all-symbols.py - Parallel find-all-symbols runner -*- python -*-=#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===--------------------------------------... | Python | 0.000009 | @@ -2559,11 +2559,8 @@
args
-, _
= p
@@ -2575,14 +2575,8 @@
rse_
-known_
args
|
512544ea9f137a5ef92f74e87d952fa736a79fff | Add fix for @inject decorator with classes on PyPy and Py3 | dependency_injector/injections.py | dependency_injector/injections.py | """Injections module."""
import six
from .utils import is_provider
from .utils import ensure_is_injection
from .utils import get_injectable_kwargs
from .errors import Error
class Injection(object):
"""Base injection class."""
__IS_INJECTION__ = True
__slots__ = ('name', 'injectable')
def __init_... | Python | 0 | @@ -19,16 +19,27 @@
le.%22%22%22%0A%0A
+import sys%0A
import s
@@ -182,16 +182,219 @@
Error%0A%0A%0A
+IS_PYPY = '__pypy__' in sys.builtin_module_names%0Aif IS_PYPY or six.PY3: # pragma: no cover%0A OBJECT_INIT = six.get_unbound_function(object.__init__)%0Aelse: # pragma: no cover%0A OBJECT_INIT = None%0A%0A%... |
1c2b06829c597d2287b7546b1a28661be44735c6 | Remove unnecessary try catch | frappe/desk/form/save.py | frappe/desk/form/save.py | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe, json
from frappe.desk.form.load import run_onload
@frappe.whitelist()
def savedocs(doc, action):
"""save / submit / update doclist"""
try:
doc = frappe.get_doc... | Python | 0.000096 | @@ -493,17 +493,8 @@
se:%0A
-%09%09%09try:%0A%09
%09%09%09d
@@ -506,108 +506,8 @@
ve()
-%0A%09%09%09except frappe.NameError as e:%0A%09%09%09%09# Duplicate Error message already shown on db_insert%0A%09%09%09%09raise
%0A%0A%09%09
|
db02b2cc2b8de947511fa0e750697a3b89a88714 | Remove some more unused code. | openquake/utils/db/__init__.py | openquake/utils/db/__init__.py | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010-2011, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenQuak... | Python | 0.9999 | @@ -956,969 +956,4 @@
%22%22%22%0A
-%0A# Tablespaces%0AHZRDI_TS = 'hzrdi'%0AADMIN_TS = 'admin'%0AEQCAT_TS = 'eqcat'%0A%0A%0A# Table/column dicts.%0A# These can be used as a template for doing db inserts.%0ASIMPLE_FAULT = dict.fromkeys(%5B%0A # required:%0A 'owner_id', 'gid', 'dip', 'upper_depth', 'lower_depth', ... |
34e9ff0bd40d7fd03038fed21f9c353cf34411e3 | add seen alerts counter | bin/usmqe_alerts_logger.py | bin/usmqe_alerts_logger.py | #!/usr/bin/env python2
"""Tendrl Notifier REST API logger."""
import argparse
import ConfigParser
import logging
import os
import json
import time
import requests
class TendrlAuth(requests.auth.AuthBase):
"""
Implementation of Tendrl Auth Method (Bearer Token) for requests
library, based on upstream doc... | Python | 0 | @@ -4318,103 +4318,431 @@
-for alert in alerts:%0A if alert not in last_alerts:%0A logger.info(alert
+# how many alerts in current alert list we have already seen last time%0A seen_count = 0%0A for alert in alerts:%0A if alert not in last_alerts:%0A ... |
e859e6621ac43b9f903e1deda76a03b07959ef15 | Use a different resolution for preview and real image | photobooth/controls/camera.py | photobooth/controls/camera.py | # -*- coding: utf-8 -*-
import io
import picamera
from PIL import Image
class PtbCamera(object):
"""Camera management
"""
def __init__(self, size, camera_iso=200, high_resolution=True):
self._cam = picamera.PiCamera()
self._cam.video_stabilization = True
self._cam.vflip = False
... | Python | 0 | @@ -553,17 +553,18 @@
= (
-1296, 972
+3280, 2464
)%0A
@@ -953,16 +953,39 @@
preview(
+resolution=(1440, 1080)
)%0A%0A d
@@ -2350,17 +2350,18 @@
definiti
-f
+ve
.%0A
|
e86f338df77bab019bcc0157559dc56cc83c04d4 | Add spaces around (branch) to have HipChat display the emoticon correctly | hipstudio.py | hipstudio.py | #!/usr/bin/env python3
from bottle import get, post, run, request, template
import simplejson as json
from smartchat import SmartChat
from dateutil.parser import parse
import configparser
from sys import exit
PRODUCT = 'HipStudio'
VERSION = '0.0.2'
COPYRIGHT = 'Copyright (C) 2014-2015 Ross Nelson'
LICENSE = 'MIT'
# R... | Python | 0.000004 | @@ -3157,32 +3157,33 @@
' + id + ' (
+
(branch)
' + source +
@@ -3162,32 +3162,33 @@
d + ' ( (branch)
+
' + source + ' =
@@ -3189,32 +3189,33 @@
+ ' =%3E (branch)
+
' + destination
@@ -3851,24 +3851,25 @@
id + ' (
+
(branch)
' + sour
@@ -3856,24 +3856,25 @@
' ( (branch)
+
' + source +
@@ -3887,16 +38... |
c88a2ec8c0c828c0d2ab9c8d019405397ac7609f | add some comments | things.py | things.py | from generic import Point, is_child
from random import randint
MAX_RARITY = 100
GOD_RARITY = MAX_RARITY + 1
LIGHT_WEAR_RATE = 0.05
class Thing(object):
"""
Things are not aware of their position,
only the area is aware of their position
"""
COLOR = (0, 0, 0)
EMPTY = False
def __init__(self):
self.element ... | Python | 0 | @@ -1620,12 +1620,13 @@
TY%0A%09
-MOVE
+CROSS
ABLE
@@ -1676,21 +1676,20 @@
red1,)%0A%09
-CROSS
+OPEN
ABLE = F
@@ -1692,34 +1692,57 @@
= False
-%0A%09OPENABLE = False
+ # False, True or (required0, required1,)
%0A%09def __
@@ -2123,24 +2123,55 @@
ABILITY = 1%0A
+%09CROSSABLE = True # (Axe, ...)%0A
%0A%0Aclass L... |
5aca39cef15ea4381b30127b8ded31ec37ffd273 | Add image to ifff request | script/notification/ifttt.py | script/notification/ifttt.py | from logs import *
import requests
class Ifttt(object):
"""
"""
def __init__(self, config, packpub_info, upload_info):
self.__packpub_info = packpub_info
self.__url = "https://maker.ifttt.com/trigger/{eventName}/with/key/{apiKey}".format(
eventName=config.get('ifttt', 'ifttt.ev... | Python | 0 | @@ -446,32 +446,45 @@
.__url, data = %7B
+%0A
'value1':self.__
@@ -521,16 +521,28 @@
utf-8'),
+%0A
'value2
@@ -593,16 +593,80 @@
'utf-8')
+,%0A 'value3':self.__packpub_info%5B'url_image'%5D%0A
%7D)%0A
|
754af1b3b06c489929c302ee1ec2a17bbf681cd1 | Remove unused import time | server/download.py | server/download.py | #!/usr/bin/env python
from __future__ import print_function
import argparse
import logging
import os
import sys
import time
import pysftp
LOG_FORMAT = '%(asctime)-15s %(name)-10s %(levelname)-7s %(message)s'
# max number of files to download per sftp connection - not getting them all at
# once helps avoid lockups/h... | Python | 0 | @@ -109,20 +109,8 @@
sys
-%0Aimport time
%0A%0Aim
|
c85de76742b8d15b65ea83b18f25158ac8dab4a2 | Add logs for webhook receives | members/webhooks/views.py | members/webhooks/views.py | # -*- coding: utf-8 -*-
from datetime import datetime
from flask import Blueprint, request, current_app
from members.member.models import Member, StripePayment
blueprint = Blueprint('webhooks', __name__, url_prefix='/webhooks')
@blueprint.route('/stripe', methods=['POST'])
def stripe_hook():
expected_handshake =... | Python | 0.000001 | @@ -731,24 +731,98 @@
%22OK%22, 200%0A%0A
+ current_app.logger.info(%22Received Stripe webhook action: %22 + action)%0A%0A
if actio
@@ -4197,32 +4197,103 @@
f wufoo_hook():%0A
+ current_app.logger.info(%22Received Wufoo webhook: %22 + request.form)%0A
expected_han
|
adcf84095785879f9ac1677cd03c68062c16c9b9 | remove unused import | pi2graphite/wifi_collector.py | pi2graphite/wifi_collector.py | """
The latest version of this package is available at:
<http://github.com/jantman/pi2graphite>
##################################################################################
Copyright 2016 Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com>
This file is part of pi2graphite, also known as pi2gra... | Python | 0.000001 | @@ -1842,32 +1842,8 @@
me%0A%0A
-import pythonwifi.flags%0A
from
|
00538e5b938f18294a0d9cb91df7b4dc37c84500 | Initialize trigger of snapshot and snapshot_object. | chainer/training/extensions/_snapshot.py | chainer/training/extensions/_snapshot.py | import os
import shutil
import tempfile
from chainer.serializers import npz
from chainer.training import extension
def snapshot_object(target, filename, savefun=npz.save_npz):
"""Returns a trainer extension to take snapshots of a given object.
This extension serializes the given object and saves it to the o... | Python | 0 | @@ -169,16 +169,58 @@
save_npz
+,%0A trigger=(1, 'epoch')
):%0A %22
@@ -1040,16 +1040,218 @@
rialize.
+%0A trigger: Trigger that decides when to take snapshot. If it is a tuple%0A in the form %60%60%3Cint%3E, 'epoch'%60%60 or %60%60%3Cint%3E, 'iteration'%60%60, it is%0A ... |
392aeb99891ff9949c9e9e205743937d8e9cb632 | Use threading.local() to store a requests.Session object per-thread and use it to perform the requests, allowing connections to be reused, speeding bot replies a lot | bot/api/telegram.py | bot/api/telegram.py | import requests
class TelegramBotApi:
"""This is a threading-safe API. Avoid breaking it by adding state."""
def __init__(self, auth_token, debug: bool):
self.base_url = "https://api.telegram.org/bot" + auth_token + "/"
self.debug = debug
def __getattr__(self, item):
return self.... | Python | 0 | @@ -1,8 +1,26 @@
+import threading%0A%0A
import r
@@ -27,16 +27,16 @@
equests%0A
-
%0A%0Aclass
@@ -276,16 +276,55 @@
= debug
+%0A self.local = threading.local()
%0A%0A de
@@ -614,24 +614,36 @@
quest =
-requests
+self.__get_session()
.get(sel
@@ -897,16 +897,16 @@
tion%22%5D)%0A
-
@@ -932,... |
56cea385b0f16056d3a164676bd8d135ecf370cb | Allow access from rawgit.com | bot/game/api/api.py | bot/game/api/api.py | import http.server
import json
import socketserver
import ssl
from tools import config
LISTEN_ADDRESS = ("", 4343)
API_PATH = "/cgbapi/"
RESPONSE_ENCODING = "utf-8"
class ApiServer(socketserver.ThreadingMixIn, http.server.HTTPServer):
def server_bind(self):
super().server_bind()
self.socket = s... | Python | 0 | @@ -1437,16 +1437,94 @@
e_code)%0A
+ self.send_header(%22Access-Control-Allow-Origin%22, %22https://rawgit.com%22)%0A
|
dded693277c9028e6aa7fc2f4fc991258ead9601 | Initialize keys_updated | ansible/modules/hashivault/hashivault_k8s_auth_config.py | ansible/modules/hashivault/hashivault_k8s_auth_config.py | #!/usr/bin/env python
from ansible.module_utils.hashivault import hashivault_argspec
from ansible.module_utils.hashivault import hashivault_auth_client
from ansible.module_utils.hashivault import hashivault_init
from ansible.module_utils.hashivault import hashiwrapper
from ansible.module_utils.hashivault import get_key... | Python | 0.000015 | @@ -3087,10 +3087,28 @@
d =
-%5B%5D
+desired_state.keys()
%0A
|
0bc3cc9bd927540915cd99dfe351da56c37d71d2 | Fix a ResourceWarning in setuptools_build | pip/utils/setuptools_build.py | pip/utils/setuptools_build.py | # Shim to wrap setup.py invocation with setuptools
SETUPTOOLS_SHIM = (
"import setuptools, tokenize;__file__=%r;"
"exec(compile(getattr(tokenize, 'open', open)(__file__).read()"
".replace('\\r\\n', '\\n'), __file__, 'exec'))"
)
| Python | 0 | @@ -120,21 +120,10 @@
%22
-exec(compile(
+f=
geta
@@ -163,22 +163,29 @@
e__)
+;%22%0A %22code=f
.read()
-%22%0A %22
.rep
@@ -205,16 +205,58 @@
, '%5C%5Cn')
+;%22%0A %22f.close();%22%0A %22exec(compile(code
, __file
|
41c52ce62f6ee725eb0b8de1062849848b09484c | Update export_srf.py | export_srf.py | export_srf.py | import os
import bpy
import bmesh
import mathutils
from bpy.props import (BoolProperty, FloatProperty, StringProperty, EnumProperty)
from bpy_extras.io_utils import (ImportHelper, ExportHelper, unpack_list, unpack_face_list, axis_conversion)
# Infomation
bl_info = {
'name' : 'YSFS 2.0 - SRF file',
'descr... | Python | 0 | @@ -419,12 +419,10 @@
ian9
-'
,
-'
Mr M
|
5e7cf63d33f000a6022e8ec7830a2166a29e5175 | Fix context if value is None | froide/helper/widgets.py | froide/helper/widgets.py | from django import forms
from django.conf import settings
from taggit.forms import TagWidget
class BootstrapChoiceMixin(object):
def __init__(self, *args, **kwargs):
kwargs.setdefault('attrs', {})
kwargs['attrs'].update({'class': 'form-check-input'})
super(BootstrapChoiceMixin, self).__in... | Python | 1 | @@ -1894,16 +1894,46 @@
ete_url%0A
+ if value is None:%0A
@@ -1974,16 +1974,59 @@
value%5D%0A
+ else:%0A ctx%5B'tags'%5D = %5B%5D%0A
|
b8b2e268f028fafbf5b20d609f3286d29324482b | make sure snapshot is valid | ethereum/snapshot.py | ethereum/snapshot.py | import rlp
from ethereum import blocks
from ethereum.blocks import Account, BlockHeader, Block, CachedBlock
from ethereum.utils import is_numeric, is_string, encode_hex, decode_hex, zpad, scan_bin, big_endian_to_int
from ethereum.securetrie import SecureTrie
from ethereum.trie import BLANK_NODE, BLANK_ROOT
from ethereu... | Python | 0.00219 | @@ -1394,24 +1394,77 @@
= chain.env%0A
+ assert recent %3E env.config%5B'MAX_UNCLE_DEPTH'%5D+2%0A%0A
head_blo
@@ -6736,12 +6736,13 @@
ode_hex(val)
+%0A
|
92fb6bd815d9bb62c22da6c1ef338b936934563a | update docstring | evegenie/evegenie.py | evegenie/evegenie.py | """
EveGenie class for building Eve settings and schemas.
"""
import json
import os.path
from jinja2 import Environment, PackageLoader
class EveGenie(object):
template_env = Environment(loader=PackageLoader('evegenie', 'templates'))
def __init__(self, data=None, filename=None):
"""
Initiali... | Python | 0.000001 | @@ -2703,21 +2703,16 @@
m source
-_type
: value
|
619d934b8742eece8ed8670016994c6133428218 | test fix: merge subtests, expected by jar tests | interp_asm_test.py | interp_asm_test.py | import sys
import subprocess
sys.path.append('/Users/dmlockhart/vc/git-brg/parc/pymtl')
from inspect import getmembers, ismodule, isfunction
import pisa.pisa_inst_addu_test
import pisa.pisa_inst_subu_test
import pisa.pisa_inst_and_test
import pisa.pisa_inst_or_test
import pisa.pisa_inst_xor_test
import pisa.pisa_inst... | Python | 0 | @@ -1439,42 +1439,9 @@
c()%0A
- if isinstance( test, str ):%0A
+%0A
@@ -1482,26 +1482,24 @@
_name )%0A
-
test_names.a
@@ -1512,20 +1512,53 @@
name )%0A
+%0A
+if isinstance( test, str ):%0A
tests.
@@ -1585,144 +1585,8 @@
lse:
-%0A names = %5B '%7B%7D.%7B%7D_%7B%7D'.format( mname,... |
b99719e71282a3e6a9766932b294a0ed6a7479ff | Bump version | invoke/_version.py | invoke/_version.py | __version_info__ = (0, 3, 0)
__version__ = '.'.join(map(str, __version_info__))
| Python | 0 | @@ -20,9 +20,9 @@
(0,
-3
+4
, 0)
|
c629867f825dcb461371e9e3a8f55aa371b244bf | fix for eps estimation | broca/cluster/parameter.py | broca/cluster/parameter.py | import numpy as np
from sklearn.cluster import KMeans
def estimate_eps(dist_mat, n_closest=5):
"""
Estimates possible eps values (to be used with DBSCAN)
for a given distance matrix by looking at the largest distance "jumps"
amongst the `n_closest` distances for each item.
Tip: the value for `n_c... | Python | 0 | @@ -1151,20 +1151,16 @@
didate)%0A
-
retu
|
91850392129c1e5073a26ff89cf9da3625832648 | remove debug output | helper.py | helper.py | import cStringIO
import os
import pickle
import shlex
import shutil
import subprocess
import sys
import time
import globals
import settings
# Windows or not
def iswindows ():
return sys.platform.startswith('win')
# Safely copy files
def copy (src, dest):
try:
shutil.copy(src, dest)
return T... | Python | 0.000101 | @@ -1472,22 +1472,8 @@
1)%0A
- print cmd%0A
|
700c45f929c7b3c4763c7e6dde1136e78e89a36e | update seo_url_level when seo_url_parent changes | website_seo/models/ir_ui_view.py | website_seo/models/ir_ui_view.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, an open source suite of business apps
# This module copyright (C) 2015 bloopark systems (<http://bloopark.de>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | Python | 0 | @@ -2665,369 +2665,96 @@
api.
-multi%0A def writeToDo(self, vals):%0A # ToDo: add automatically setup of the field seo_url_level when the%0A # seo_url_parent is changed, maybe use an onchange event instead of the%0A # write() function%0A # old_seo_url_parent = False%0A # check_vie... |
1b3a1d18e7a66c7067ab9d4aacddfabe33d29ca1 | add scheme (if missing) via urlparse.scheme check | shortener/views.py | shortener/views.py | from django.http import HttpResponse,Http404
from django import forms
from shortener.models import stumps
from django.utils.encoding import smart_str
from django.shortcuts import get_object_or_404,get_list_or_404,render_to_response,redirect
import hashlib
import urlparse
from django.db.models import Sum,Count
from djan... | Python | 0 | @@ -1850,237 +1850,8 @@
###%0A
-%09# Another hack - urls that don't have http(s)/ftp etc%0A%09# are legit and get in but the redirect breaks?!%0A%09if not stump_split%5B1%5D:%0A%09%09this_stump = %22http://%22+this_stump%0A%09############################################################%0A
%09###
@@ -2116,16 +2116,8... |
7238b32af518e5a21e34967bb2505c18092d3da1 | Add ezdashboard compatible save | ezhc/_plot.py | ezhc/_plot.py |
import os
import uuid
import pandas as pd
import datetime as dt
from IPython.display import HTML
from copy import deepcopy as copy
from ._config import JS_LIBS_ONE, JS_LIBS_TWO, JS_SAVE
from ._hc_versions import get_hc_versions
from .scripts import JS_JSON_PARSE
def opt_to_dict(options, chart_id='chart_id'):
""... | Python | 0 | @@ -5831,24 +5831,150 @@
html + js)%0A%0A
+ with open(os.path.join(save_path, tag + dated + '-for-ezdashboard.html'), 'w') as f:%0A f.write(html + js)%0A%0A%0A
if noteb
|
127860c8feee3b4bdaee1bad6c76ff1c8a8acaf1 | remove remove by try_remove closes #525 | weboob/backends/lefigaro/pages/article.py | weboob/backends/lefigaro/pages/article.py | "ArticlePage object for inrocks"
# -*- coding: utf-8 -*-
# Copyright(C) 2011 Julien Hebert
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distr... | Python | 0 | @@ -1387,71 +1387,8 @@
1)%0A
- toolsbar = select(element_body, %22#toolsbar%22, 1)%0A
@@ -1762,16 +1762,62 @@
r_long%22)
+%0A try_remove(element_body, %22#toolsbar%22)
%0A%0A
|
c4cb486f80c1283afbf70a70d3d7cfd4d59ec25e | add missing states and changable name attribute | hue/light.py | hue/light.py | # -*- coding: utf-8 -*-
import logging
log = logging.getLogger(__name__)
class Light(object):
def __init__(self, light_id, bridge):
self.bridge = bridge
self.id = int(light_id)
self.name = None
self.json = None
self._update()
def __str__(self):
return '<%s %s ... | Python | 0.000001 | @@ -197,33 +197,8 @@
id)%0A
- self.name = None%0A
@@ -218,16 +218,16 @@
= None%0A
+
@@ -456,38 +456,8 @@
id)%0A
- self.name = j%5B'name'%5D%0A
@@ -504,24 +504,47 @@
elf, name):%0A
+ self._update()%0A
if n
@@ -853,16 +853,212 @@
data)%0A%0A
+ @property%0A ... |
2fca0582d6590def19f3788e0b804a2ec85ca42d | Fix logging | src/nodeconductor_openstack/log.py | src/nodeconductor_openstack/log.py | from nodeconductor.logging.loggers import EventLogger, event_logger
class BackupEventLogger(EventLogger):
resource = 'structure.Resource'
class Meta:
event_types = ('resource_backup_creation_scheduled',
'resource_backup_creation_succeeded',
'resource_back... | Python | 0 | @@ -1143,22 +1143,8 @@
= '
-nodeconductor_
open
|
958fdc2a0683794df881800559bf5ff5801e0821 | FIX vat report | l10n_ar_account_vat_ledger/account.py | l10n_ar_account_vat_ledger/account.py | # -*- coding: utf-8 -*-
from openerp import models, fields, api
class afip_document_class(models.Model):
_inherit = 'afip.document_class'
amount_untaxed = fields.Float(
string='Untaxed',
compute='_get_amounts',)
amount_tax = fields.Float(
string='Tax',
compute='_get_amount... | Python | 0 | @@ -2449,16 +2449,64 @@
+ ('tax_code_id.id', '=', self.id)%5D%0A #
('tax_c
|
f171cd79fbee3cf9cfd378f9b34bf8fef351a292 | return the gravity comp response correctly | hlpr_kinesthetic_interaction/src/hlpr_kinesthetic_interaction/jaco_arm.py | hlpr_kinesthetic_interaction/src/hlpr_kinesthetic_interaction/jaco_arm.py | #!/usr/bin/env python
import rospy
from hlpr_manipulation_utils.manipulator import Gripper
from wpi_jaco_msgs.srv import GravComp
from kinova_msgs.srv import Start, Stop
"""
jaco_arm.py
Simple wrapper that abstracts out the arm class so that other arms
can use kinesthetic_interaction
"""
class Arm():
GRAVITY_C... | Python | 0.999998 | @@ -1410,32 +1410,39 @@
le:%0A
+return
self.enableGravC
@@ -1465,32 +1465,39 @@
se:%0A
+return
self.disableGrav
|
de6976d03ee184bd7e921ccafec41059339e7e5b | Implement method stub | hug/route.py | hug/route.py | """hug/route.py
Defines user usable routers
Copyright (C) 2016 Timothy Edmund Crosley
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
the right... | Python | 0.000002 | @@ -5151,16 +5151,52 @@
wargs)%0A%0A
+ def get(self, *karg, **kwargs)%0A%0A
%0Afor met
|
dfd1aeba24c8373b64a073f5f779a22311db8c42 | add price | website_sale_quantity_hide/__openerp__.py | website_sale_quantity_hide/__openerp__.py | # -*- coding: utf-8 -*-
{
'name': "Hide quantity field in web shop",
'summary': "Allows to sale only 1 item at once",
'author': 'IT-Projects LLC, Ivan Yelizariev',
'license': 'GPL-3',
'category': 'Website',
'website': 'https://twitter.com/yelizariev',
'version': '1.0.0',
'depends': ['web... | Python | 0.000002 | @@ -193,16 +193,59 @@
GPL-3',%0A
+ %22price%22: 20.00,%0A %22currency%22: %22EUR%22,%0A
'cat
|
b69a52a024364f49871d4493580ddf8a3d8d19b5 | Generate some frequent rules | src/observation_basket_analysis.py | src/observation_basket_analysis.py | '''
Analyse observation basket
'''
DATA_DIR = '../data/'
import Orange
data = Orange.data.Table(DATA_DIR + 'observation.basket')
inducer = Orange.associate.AssociationRulesSparseInducer(support=0.4, store_examples=True)
itemsets = inducer.get_itemsets(data)
for itemset in itemsets:
print ', '.join([data.domain[... | Python | 0.999999 | @@ -50,16 +50,43 @@
./data/'
+%0ARESULT_DIR = '../results/'
%0A%0Aimport
@@ -94,16 +94,30 @@
Orange%0A%0A
+minsup = 0.5%0A%0A
data = O
@@ -235,11 +235,14 @@
ort=
-0.4
+minsup
, st
@@ -258,12 +258,34 @@
les=
-True
+False, max_item_sets=10**7
)%0Ait
@@ -325,107 +325,1273 @@
a)%0A%0A
-for itemset in itemsets:%0A ... |
26a410b972ad72e58319a3064b3791ec3701ab72 | Improve category group filter for activities | webtool/server/filters/client/activity.py | webtool/server/filters/client/activity.py | # -*- coding: utf-8 -*-
import datetime
from django.db.models import F, Q
from django_filters import rest_framework as filters, STRICTNESS
from server.models import Event, Category, Reference, Tour, State, Guide, CategoryGroup
class ActivityFilter(filters.FilterSet):
ACTIVITY_CHOICES = (
('tour', 'tour'... | Python | 0.000001 | @@ -3235,32 +3235,37 @@
except Category
+Group
.DoesNotExist:%0A
|
6b4f37b6ab0fd8fcc8a0d66043167df0fbe0a055 | Update app.py | fabric/app.py | fabric/app.py | """
This module contains controller application to manage
a set of OpenFlow switches
"""
from ryu.base import app_manager
from ryu.controller import ofp_event
from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER, DEAD_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofpr... | Python | 0.000002 | @@ -2392,24 +2392,15 @@
msg.
-match%5B'
in
--
+_
port
-'%5D
%0A
@@ -2438,16 +2438,19 @@
datapath
+.id
,in_port
@@ -2451,16 +2451,24 @@
n_port)%0A
+
%0A
@@ -2525,32 +2525,39 @@
arp:%0A
+ descr=
pack.parse_arp(d
@@ -2567,32 +2567,33 @@
r,msg.data)%0A
+%09
return%0A
... |
a018da55959b438f803e0ede7855f34a1a0712c4 | Load security data | l10n_es_ticketbai_api/__manifest__.py | l10n_es_ticketbai_api/__manifest__.py | # Copyright 2021 Binovo IT Human Project SL
# Copyright 2021 Landoo Sistemas de Informacion SL
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "TicketBAI - API",
"version": "14.0.2.2.1",
"category": "Accounting & Finance",
"website": "https://github.com/OCA/l10n-spain",
"... | Python | 0 | @@ -823,16 +823,67 @@
s.csv%22,%0A
+ %22security/l10n_es_ticketbai_security.xml%22,%0A
|
f832bd54dd293c9b76d46d48e00ba1430eab5566 | Fix usage message | examples/user_playlists_contents.py | examples/user_playlists_contents.py | # shows a user's playlists (need to be authenticated via oauth)
import sys
import os
import spotipy
import spotipy.util as util
def show_tracks(results):
for i, item in enumerate(tracks['items']):
track = item['track']
print(" %d %32.32s %s" % (i, track['artists'][0]['name'], track['name']))
i... | Python | 0.000014 | @@ -494,16 +494,25 @@
laylists
+_contents
.py %5Buse
|
7eed70e671e612a9360724c3be1bc96de8f6f697 | Update app.py | fabric/app.py | fabric/app.py | """
This module contains controller application to manage
a set of OpenFlow switches
"""
from ryu.base import app_manager
from ryu.controller import ofp_event
from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER, DEAD_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofpr... | Python | 0.000002 | @@ -4544,33 +4544,39 @@
:param d
-p
+atapath
: datapath objec
@@ -4623,33 +4623,39 @@
%0A :type d
-p
+atapath
: %60ryu.controlle
|
1731c605f827a453c494de00825a1ac3541ac9a8 | FIX l10n_it_account/models/account_tax.py:24: [W0402(deprecated-module), ] Uses of a deprecated module 'openerp.osv' | l10n_it_account/models/account_tax.py | l10n_it_account/models/account_tax.py | # -*- coding: utf-8 -*-
#
#
# Copyright (C) 2013 Associazione OpenERP Italia
# (<http://www.openerp-italia.org>).
# Copyright (C) 2015 Agile Business Group <http://www.agilebg.com>
# Copyright (C) 2015 Link It Spa <http://www.linkgroup.it/>
#
# This program is free software: you can redistribute it and/o... | Python | 0 | @@ -954,20 +954,16 @@
nerp
-.osv
import
orm%0A
@@ -962,37 +962,21 @@
ort
-orm%0Afrom openerp import fi
+fields, mod
el
-d
s%0Afr
@@ -1076,19 +1076,22 @@
TaxCode(
-orm
+models
.Model):
@@ -1521,19 +1521,22 @@
ountTax(
-orm
+models
.Model):
|
257ace722c04c1448f2e178330d51b9a11925b9f | Correct the reconstruction loss (#3383) | examples/variational_autoencoder.py | examples/variational_autoencoder.py | '''This script demonstrates how to build a variational autoencoder with Keras.
Reference: "Auto-Encoding Variational Bayes" https://arxiv.org/abs/1312.6114
'''
import numpy as np
import matplotlib.pyplot as plt
from keras.layers import Input, Dense, Lambda
from keras.models import Model
from keras import backend as K... | Python | 0.000002 | @@ -1240,16 +1240,31 @@
t_loss =
+ original_dim *
objecti
|
78232ed4b075bc66ecd52108df22362c453b4da7 | Update vuln-39.py | examples/webgoat/vuln-39/vuln-39.py | examples/webgoat/vuln-39/vuln-39.py | import requests
import json
loginurl = 'http://127.0.0.1:8080/WebGoat/login.mvc'
authurl = 'http://127.0.0.1:8080/WebGoat/j_spring_security_check'
menuurl = 'http://127.0.0.1:8080/WebGoat/service/lessonmenu.mvc'
attackurl = 'http://127.0.0.1:8080/WebGoat/'
login = {"username":"guest", "password":"guest"}
purchase = {"P... | Python | 0.000001 | @@ -1058,17 +1058,16 @@
link'%5D%0A%0A
-%0A
fourth =
@@ -1091,18 +1091,16 @@
ckurl)%0A%0A
-%0A%0A
fifth =
|
83a64961b11213f0874bc33b7919da9879501125 | Fix one more bug | pollirio/modules/erepublik.py | pollirio/modules/erepublik.py | # -*- coding: utf-8 -*-
from pollirio.modules import expose
from pollirio.dbutils import *
from pollirio import choose_dest
from pollirio import conf
import cjson as json
from urllib2 import urlopen
from datetime import datetime
class UsersDb:
def __init__(self):
self.db = db_init('erep_users')
def search(self,... | Python | 0.000001 | @@ -1810,14 +1810,22 @@
urn
+int(
ret%5B
+0%5D%5B
2%5D
+)
%0A%09da
|
a760d60ec2b37613c621508001b57dc81b464b5c | add precision | experiments/exp_20170722_01/main.py | experiments/exp_20170722_01/main.py | import xgboost as xgb
# Accuracy on test set: 63%
# read in data
dtrain = xgb.DMatrix('../../data/data_20170722_01/train_data.txt')
dtest = xgb.DMatrix('../../data/data_20170722_01/test_data.txt')
# specify parameters via map, definition are same as c++ version
param = {'max_depth':22, 'eta':0.1, 'silent':0, 'object... | Python | 0.022495 | @@ -812,28 +812,197 @@
els%5Bi%5D) /float(len(preds))))
+%0A%0Aprint ('precision=%25f' %25 ( sum(1 for i in range(len(preds)) if int(preds%5Bi%5D%3E0.5)==labels%5Bi%5D and labels%5Bi%5D==1) /float(sum(1 for i in range(len(preds)) if preds%5Bi%5D==1))))
|
99baef55bc5e2d2311ba356ccf29bd8c16b99f64 | add watchlist | experiments/exp_20170722_01/main.py | experiments/exp_20170722_01/main.py | import xgboost as xgb
# read in data
dtrain = xgb.DMatrix('../../data/data_20170722_01/train_data.txt')
dtest = xgb.DMatrix('../../data/data_20170722_01/test_data.txt')
# specify parameters via map
param = {'max_depth':2, 'eta':1, 'silent':1, 'objective':'binary:logistic' }
num_round = 2
bst = xgb.train(param, dtrain,... | Python | 0 | @@ -163,16 +163,17 @@
a.txt')%0A
+%0A
# specif
@@ -192,16 +192,52 @@
via map
+, definition are same as c++ version
%0Aparam =
@@ -255,16 +255,17 @@
h':2
+2
, 'eta':
1, '
@@ -260,16 +260,18 @@
, 'eta':
+0.
1, 'sile
@@ -274,17 +274,17 @@
silent':
-1
+0
, 'objec
@@ -310,10 +310,138 @@
tic'
- %7D
+,'min_child_... |
0dbcc4c1604cca0e77b0cd3c1a812398c1d4bc56 | Implement read_data and write_data in curate_data_parse.py. translate_to_parse unfinished. | scripts/curate_data_parse.py | scripts/curate_data_parse.py | """
This script curates the Places data in a format compatible with the Place class
in the Parse Rice Maps Data store.
Input File: places_data.json
Output File: places_data_parse.json
"""
def read_data(f_name):
"""
Given an input file name f_name, reads the JSON data inside returns as
Python data object.
"""... | Python | 0.000001 | @@ -182,16 +182,28 @@
son%0A%22%22%22%0A
+import json%0A
%0A%0Adef re
@@ -324,28 +324,94 @@
ct.%0A %22%22%22%0A
-pass
+f = open(f_name)%0A json_data = json.loads(f.read())%0A return json_data
%0A%0Adef write_
@@ -530,28 +530,59 @@
me.%0A %22%22%22%0A
-pass
+json_data = json.dump(data, f_name)
%0A%0Adef tr... |
37c35db753425dfcd14be4e72b8aea95afaf7762 | Fix KeyError of OS_AUTH_URL | functest/cli/commands/cli_os.py | functest/cli/commands/cli_os.py | #!/usr/bin/env python
#
# jose.lausuch@ericsson.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
# pylint: disable=missin... | Python | 0.000007 | @@ -551,9 +551,13 @@
iron
-%5B
+.get(
'OS_
@@ -569,9 +569,15 @@
URL'
-%5D
+, None)
%0A
|
92e728a1a1c2f770adeb175a61433da125571198 | fix todo path | fuzzers/056-rempips/generate.py | fuzzers/056-rempips/generate.py | #!/usr/bin/env python3
from prjxray.segmaker import Segmaker
verbose = 1
segmk = Segmaker("design.bits")
tiledata = dict()
pipdata = dict()
ignpip = set()
todo = set()
print("Loading todo from ../todo.txt.")
with open("../todo.txt", "r") as f:
for line in f:
line = tuple(line.strip().split("."))
... | Python | 0.000003 | @@ -220,16 +220,19 @@
pen(%22../
+../
todo.txt
|
966cedb8df972615d279b88c027fc2369ecda5fe | Remove server side parts of biicode | ciscripts/setup/project/configure_bii.py | ciscripts/setup/project/configure_bii.py | # /ciscripts/setup/project/configure_bii.py
#
# A script which configures and activates a bii installation
#
# See /LICENCE.md for Copyright information
"""A script which configures and activates a bii installation."""
import os
import os.path
import platform
import shutil
from collections import defaultdict
def ... | Python | 0 | @@ -3715,24 +3715,573 @@
code_repo):%0A
+ # Remove the server-side parts%0A util.execute(container,%0A util.output_on_fail,%0A %22git%22,%0A %22submodule%22,%0A ... |
fc4b1e3f03fefd0108ced28b78240650ba453ca6 | update imports in utils.py | utils_plus/utils.py | utils_plus/utils.py | import os
from django.urls import reverse_lazy
from django.apps import apps
IP_ADDRESS_HEADERS = ('HTTP_X_REAL_IP', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR')
def get_ip_address(request):
for header in IP_ADDRESS_HEADERS:
addr = request.META.get(header)
if addr:
return ... | Python | 0.000001 | @@ -4,20 +4,22 @@
ort os%0A%0A
-from
+import
django.
@@ -26,53 +26,23 @@
urls
-
+%0A
import
-reverse_lazy%0Afrom django.apps import
+django.
apps
@@ -606,16 +606,28 @@
return
+django.urls.
reverse_
@@ -985,16 +985,28 @@
onfig =
+django.apps.
apps.get
|
e46a09e4edd24ad295b3d6843cc55f054a02619b | Fix lambda_cron | lambda_src/runcmd_cron/runcmd_cron.py | lambda_src/runcmd_cron/runcmd_cron.py | import logging
import time
import re
import boto3
from boto3.dynamodb.conditions import Key
from io import StringIO
import json
from os import environ
from os.path import join, dirname, realpath
LOG = logging.getLogger()
LOG.setLevel(logging.WARN)
KEY_PREFIX = "s/solutions"
COMMANDS_TABLE_NAME = environ.get("COMMANDS_... | Python | 0.999995 | @@ -1317,32 +1317,98 @@
b.client('s3')%0A
+ table = b.resource('dynamodb').Table(COMMANDS_TABLE_NAME)%0A
slugs =
@@ -1468,44 +1468,8 @@
- slugs = slug_slice(challenges)%0A%0A
@@ -1469,32 +1469,36 @@
table = b
+oto3
.resource('dynam
@@ -1530,16 +1530,56 @@
E_NAME)%0A
+ ... |
c74f599d361f6f79d406b47377c6a5bb9478d699 | Handle too many redirects | src/checker/net.py | src/checker/net.py | import requests
from requests.exceptions import InvalidSchema, ConnectionError
from requests.exceptions import MissingSchema, Timeout
from urllib.parse import urlparse, urlencode
import os
import tempfile
import magic
import logging
import math
import time
requests.packages.urllib3.disable_warnings()
class NetworkEr... | Python | 0.000011 | @@ -2253,16 +2253,202 @@
O: data%0A
+ except TooManyRedirects as e:%0A log.exception(%22Error while downloading: too many redirects%22, e)%0A raise NetworkError(%22Too many redirects%22) from e%0A
|
f3671b774c8042ae9a33416cbe606f21ec4329bc | Fix _hasStopInDirection when direction is DOWN | www/app/utils/elevator_engine_baptiste.py | www/app/utils/elevator_engine_baptiste.py | # -*- coding: utf-8 -*-
import Queue
import web
from app.utils.waiting_person import WaitingPerson
class ElevatorEngine:
ACTION_NOTHING = "NOTHING"
ACTION_OPEN = "OPEN"
ACTION_CLOSE = "CLOSE"
ACTION_UP = "UP"
ACTION_DOWN = "DOWN"
DIRECTION_NONE = None
DIRECTION_UP = "UP"
DIRECTION_DOWN = "DOWN"
... | Python | 0.998766 | @@ -1340,34 +1340,36 @@
ct = self._stops
-Up
+Down
.intersection(ra
|
5de5bb74a3e329305ba07ffce6551fa99b9b705f | bump rest retries to 3 | resttools/dao_implementation/live.py | resttools/dao_implementation/live.py | """
Provides access to the http connection pools and
connections for live data from a web service
"""
import logging
import ssl
import time
import socket
from urlparse import urlparse
from urllib3 import connection_from_url
import urllib3
# temporary during testing
urllib3.disable_warnings()
logging.captureWarnings(... | Python | 0 | @@ -1355,17 +1355,17 @@
retries=
-1
+3
,%0A
|
9b0e221c2a45e71159c782db43b0d371fec0debb | Add methods | lazyblacksmith/models/eve_sde/item.py | lazyblacksmith/models/eve_sde/item.py | from . import db
class Item(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=False)
name = db.Column(db.String(100), nullable=True)
max_production_limit = db.Column(db.Integer, nullable=True)
# foreign keys
activities = db.relationship('Activity', backref='blueprint',... | Python | 0.000012 | @@ -10,16 +10,74 @@
port db%0A
+from .activity import Activity%0Afrom flask import url_for%0A%0A
%0Aclass I
@@ -282,20 +282,16 @@
e=True)%0A
-
%0A # f
@@ -1212,16 +1212,457 @@
erial_id')%0A %0A
+ def icon_32(self):%0A static_url = %22ccp/Types/%25d_32.png%22 %25 self.id%0A return url_for... |
9b7ad63a5fe1ff27255db207e71be802bdf656f8 | Make sure credentials checkers are stored | exponent/test/auth/test_password.py | exponent/test/auth/test_password.py | from axiom import errors as ae, store
from exponent.auth import password, user
from twisted.cred import credentials, error as ce
from twisted.internet import defer
from twisted.trial import unittest
from zope import interface
class GetUserTests(unittest.TestCase):
"""
Tests for getting a user by username.
... | Python | 0.000001 | @@ -1330,32 +1330,67 @@
ef setUp(self):%0A
+ self.store = store.Store()%0A
self.che
@@ -1424,16 +1424,32 @@
Checker(
+store=self.store
)%0A
@@ -1479,28 +1479,25 @@
(store=s
-tore.S
+elf.s
tore
-()
, uid=%22u
|
df3deb1bb2505f0d313363bcdab7f4a6626f644d | Return default statistics if no crawldb | app/crawls.py | app/crawls.py | # IMPORTS
# =========
# Standard Library
# ----------------
import os
from subprocess import Popen, PIPE
import shlex
from datetime import datetime
from abc import ABCMeta, abstractmethod, abstractproperty
# Local Imports
# -------------
from .config import SEED_FILES, MODEL_FILES, CONFIG_FILES, CRAWLS_PATH, LANG... | Python | 0.000027 | @@ -5013,16 +5013,173 @@
awldb')%0A
+ if not os.path.exists(crawl_db_dir):%0A ret = %7B%7D%0A ret%5B'num_crawled'%5D = 0%0A ret%5B'nutch'%5D = True%0A return ret%0A%0A
|
4370b3385f53fbfe1fa1a5ac80087b51426032c2 | Add dlpack backend support | jax/_src/dlpack.py | jax/_src/dlpack.py | # Copyright 2020 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | Python | 0 | @@ -2422,16 +2422,194 @@
= None%0A
+%0A # Try ROCm if CUDA backend not found%0A if gpu_backend is None: %0A try:%0A gpu_backend = xla_bridge.get_backend(%22rocm%22)%0A except RuntimeError:%0A gpu_backend = None%0A%0A
buf =
|
589127b9d854d096e325b02b187a6ebc85950837 | Allow string replaced paths when specifying path with regexp plugin, refs #634 | flexget/plugins/filter_regexp.py | flexget/plugins/filter_regexp.py | import logging
import re
from flexget.plugin import *
log = logging.getLogger('regexp')
class FilterRegexp(object):
"""
All possible forms.
regexp:
[operation]: # operation to perform on matches
- [regexp] # simple regexp
- [regexp]:... | Python | 0.000004 | @@ -1303,24 +1303,48 @@
y_key('path'
+, allow_replacement=True
)%0A
@@ -1497,16 +1497,40 @@
y='path'
+, allow_replacement=True
)%0A
|
314a1e7bffba467b57a885cc80eb16904692fe44 | Fix invalid framework status error message | app/main/views/frameworks.py | app/main/views/frameworks.py | from flask import jsonify, abort, request
from sqlalchemy.types import String
from sqlalchemy.exc import IntegrityError
from sqlalchemy import func, orm, case, cast
import datetime
from dmapiclient.audit import AuditTypes
from dmutils.config import convert_to_boolean
from .. import main
from ...models import (
db,... | Python | 0 | @@ -390,32 +390,16 @@
nt, Lot,
- ValidationError
%0A)%0Afrom
@@ -1968,17 +1968,16 @@
except
-(
Integrit
@@ -1986,26 +1986,8 @@
rror
-, ValidationError)
as
@@ -2043,18 +2043,16 @@
0, %22
-Validation
+Database
Err
|
49396182e4200ce673cee3647eaa9da58242540e | Set a default return value to `statuses` | flexget/plugins/input/anilist.py | flexget/plugins/input/anilist.py | from loguru import logger
from flexget import plugin
from flexget.config_schema import one_or_more
from flexget.entry import Entry
from flexget.event import event
from flexget.utils.cached_input import cached
from flexget.utils.requests import RequestException
logger = logger.bind(name='anilist')
LIST_STATUS = ['cur... | Python | 0.000001 | @@ -4687,16 +4687,20 @@
tatuses'
+, %5B%5D
):%0A
|
5f3e951c60da55ca5a031fd7d33b64977275672e | Remove missing test | flocker/node/test/test_script.py | flocker/node/test/test_script.py | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Tests for :module:`flocker.node.script`.
"""
from twisted.trial.unittest import SynchronousTestCase
from twisted.python.usage import UsageError
from yaml import safe_dump
from ...testtools import FlockerScriptTestsMixin, StandardOptionsTestsMixin
from .... | Python | 0.000117 | @@ -3050,358 +3050,8 @@
)%0A%0A
- def test_missing_hostname(self):%0A %22%22%22%0A %60%60UsageError%60%60 is raised if a hostname is not supplied.%0A %22%22%22%0A options = self.options()%0A e = self.assertRaises(%0A UsageError, options.parseOptions, %5Bb'%7B%7D', b'%7... |
b95014fc8a6d1da50a72f97e5180dcd3481a9bb0 | Raise TypeError when invoking `fd.socket` for non-sockets | filedes/fd.py | filedes/fd.py | from __future__ import absolute_import
import stat
import os
import fcntl
import socket
import _filedes
get_open_fds = _filedes.get_open_fds
if hasattr(_filedes, "stat_pid_fd"):
stat_pid_fd = _filedes.stat_pid_fd
else:
def stat_pid_fd(pid, fd):
return os.stat("/proc/%d/fd/%d" % (pid, fd))
def get_f... | Python | 0 | @@ -2549,32 +2549,148 @@
socket is None:%0A
+ if self.typecode != stat.S_IFSOCK:%0A raise TypeError(%22%25s is not a socket%22 %25 self.typestr)%0A
self
|
d3a7b65596d5d089f11e8e854f535385a2e8d9c5 | Check for HADOOP_CONF_DIR env var | yarn_api_client/hadoop_conf.py | yarn_api_client/hadoop_conf.py | # -*- coding: utf-8 -*-
import os
import xml.etree.ElementTree as ET
try:
from httplib import HTTPConnection, OK
except ImportError:
from http.client import HTTPConnection, OK
CONF_DIR = '/etc/hadoop/conf'
def _get_rm_ids(hadoop_conf_path):
rm_ids = parse(os.path.join(hadoop_conf_path, 'yarn-site.xml'), ... | Python | 0 | @@ -188,16 +188,45 @@
NF_DIR =
+ os.getenv('HADOOP_CONF_DIR',
'/etc/h
@@ -236,16 +236,17 @@
op/conf'
+)
%0A%0A%0Adef _
|
361be2ee7ee5ca2282b6dd5d7423ec8b7df79cdc | fix dll path | extractors/vgextractors/__init__.py | extractors/vgextractors/__init__.py | # -*- coding: utf-8 -*-
# (C) Copyright 2014 Voyager Search
#
# 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.000003 | @@ -1088,71 +1088,8 @@
4'%0A%0A
-dll_path = r%22C:%5CVoyager%5Cserver_1.9.9.502%5Capp%5Carch%5Cwin32_x86%22%0A#
dll_
|
68c008f990928fca4af8fd48674c9720a4eb7942 | Version bump. | export.py | export.py | from __future__ import print_function, unicode_literals
__version__ = "0.1.0"
# TODO: come up with something less lame
print("import export")
| Python | 0 | @@ -69,17 +69,17 @@
= %220.1.
-0
+1
%22%0A%0A# TOD
|
87a892a2326fab442639241ca180bff66e022112 | Use str as base class for PluginVersion | jenkins/plugins.py | jenkins/plugins.py | # Software License Agreement (BSD License)
#
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
# 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 ... | Python | 0.000002 | @@ -2558,22 +2558,19 @@
Version(
-object
+str
):%0A '
|
7bf15179df744e2bb98157eb33b1e383d2c1f804 | Update SafeConfigParser to ConfigParser | clients/discord_client/discord_client.py | clients/discord_client/discord_client.py | import asyncio
import discord
import threading
import time
from configparser import SafeConfigParser
import importlib
from . import discord_commands
from . import config
import os
import common
version = '0.9.2.8'
discord_client = discord.Client()
discordpy_legacy = discord.version_info[0] < 1
ready = False
markov = ... | Python | 0 | @@ -81,12 +81,8 @@
ort
-Safe
Conf
|
1ae90e4a1dda2d600cff7a0b5b0d85f6d0fdfc62 | Update docstring for Travis | pylearn2/train_extensions/tests/test_roc_auc.py | pylearn2/train_extensions/tests/test_roc_auc.py | import unittest
from pylearn2.config import yaml_parse
from pylearn2.testing.skip import skip_if_no_sklearn
class TestRocAucChannel(unittest.TestCase):
"""Train a simple model and calculate ROC AUC for monitoring datasets."""
def setUp(self):
skip_if_no_sklearn()
def test_roc_auc(self):
... | Python | 0 | @@ -1,12 +1,39 @@
+%22%22%22%0ATests for ROC AUC.%0A%22%22%22%0A
import unitt
|
adaa2bb4db06db52e0ab7754c4a00b453d68014d | Stop stats task | app/na_celery/stats_tasks.py | app/na_celery/stats_tasks.py | from bs4 import BeautifulSoup
from datetime import datetime, timedelta
from flask import current_app
import json
import pytz
import re
import requests
from app import celery
from app.comms.stats import send_ga_event
from app.dao.users_dao import dao_get_admin_users
from app.dao.members_dao import dao_get_active_member... | Python | 0.000104 | @@ -1491,16 +1491,18 @@
iled'%0A%0A%0A
+#
@celery.
|
2f95e0e2dab0bbddf5d7fcde7dbc489bfb95d056 | fix compatibility issue | admin_views/templatetags/admin_views.py | admin_views/templatetags/admin_views.py | import sys
from django import template
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.admin import site
from ..admin import AdminViews
register = template.Library()
if sys.version_info < (3,):
import codecs
def u(x):
return codecs.unicode_escape_dec... | Python | 0 | @@ -522,27 +522,80 @@
-if app%5B'app_label'%5D
+app_name = app.get('app_label', app%5B'name'%5D.lower())%0A if app_name
not
|
3430824c2dc98de5f68aace5fa2a606e71fed962 | Make synclegalacts command less stric to populate database with initial data. (fixed syntax error..) | manoseimas/legislation/management/commands/synclegalacts.py | manoseimas/legislation/management/commands/synclegalacts.py | # coding: utf-8
import datetime
from django.core.management.base import BaseCommand
from couchdbkit.exceptions import ResourceNotFound, ResourceConflict
from manoseimas.legal_acts.models import LegalAct
from manoseimas.legislation.models import Law, LawChange, LawProject
from manoseimas.legislation.utils import nor... | Python | 0 | @@ -2833,32 +2833,30 @@
-continue
+return
%0A
@@ -3049,16 +3049,14 @@
-continue
+return
%0A
|
ba6c83bcf0e053e654b018274d41775c4b4a98ed | implement dumpy me command | src/commander.py | src/commander.py | import os
import click
from utils.config import DumpyConfig
from utils.reader import DumpyReader
@click.group()
def dumpy():
"""Command Line package to get dumps"""
@dumpy.command()
def init():
"""Create dumpfile to user"""
if init:
dumpy_conf = DumpyConfig()
we_file = os.path.join(os.pa... | Python | 0.000007 | @@ -91,16 +91,105 @@
yReader%0A
+from tasks.executor import DumpyExecutor%0Afrom utils.supported_databases import SUPPORTED%0A
%0A%0A@click
@@ -255,16 +255,17 @@
mps%22%22%22%0A%0A
+%0A
@dumpy.c
@@ -717,24 +717,25 @@
irectory%22)%0A%0A
+%0A
@dumpy.comma
@@ -1040,19 +1040,17 @@
ice(
-%5B'mongodb'%5D
+SUPPORTED
)... |
d70f7e838d9dcd3fce5ece228e94a3028e9e5293 | add Category model | app/models.py | app/models.py | #!/usr/bin/env python3.5
from tools.column import Column
from tools.field import String,Int,Float,Text,Boolean
from tools.model import Model
from tools.database import *
from tools.log import *
import time
class User(Model):
__table__='users'
id=Column(Int(4,unsigned=True),primary_key=True... | Python | 0.000001 | @@ -1188,16 +1188,323 @@
egorys'%0A
+%09id=Column(Int(4,unsigned=True),primary_key=True,auto_increment=True)%0A%09uid=Column(Int(4,unsigned=True))%0A%09cate_text=Column(String(100))%0A%09cate_image=Column(String(200))%0A%09creat_at=Column(Flot(),default=time.time())%0A%09article_num=Column(Int(4,unsigned=True),default... |
91141713b672f56a8c45f0250b7e9216a69237f8 | Increase splinter wait time to 15 seconds | features/support/splinter_client.py | features/support/splinter_client.py | import logging
from pymongo import MongoClient
from splinter import Browser
from features.support.http_test_client import HTTPTestClient
from features.support.support import Api
class SplinterClient(object):
def __init__(self, database_name):
self.database_name = database_name
self._write_api =... | Python | 0.000003 | @@ -506,16 +506,30 @@
antomjs'
+, wait_time=15
)%0A%0A d
|
362ee482c03ca29186c856fc0b2d964eb1c2eebb | Remove any occurrences of `alias`. | zerver/management/commands/realm_alias.py | zerver/management/commands/realm_alias.py | from __future__ import absolute_import
from __future__ import print_function
from typing import Any
from argparse import ArgumentParser
from django.core.exceptions import ValidationError
from django.core.management.base import BaseCommand
from django.db.utils import IntegrityError
from django.utils.translation import... | Python | 0 | @@ -573,14 +573,14 @@
age
-aliase
+domain
s fo
@@ -1466,21 +1466,22 @@
gument('
-alias
+domain
', metav
@@ -1485,21 +1485,22 @@
tavar='%3C
-alias
+domain
%3E', type
@@ -1550,21 +1550,22 @@
help=%22
-alias
+domain
to add
@@ -1762,14 +1762,14 @@
nt(%22
-Aliase
+Domain
s fo
@@ -1813,21 +1813,28 @@
for ... |
64b80c4fa86d4ab927d6b6edb257de5eeb779146 | lowercase relation | app/models.py | app/models.py | from werkzeug.security import check_password_hash, generate_password_hash
from flask_login import UserMixin
from . import db
class Login(db.Model, UserMixin):
__tablename__ = 'login'
uid = db.Column(db.Integer, primary_key=True, autoincrement=True)
_rollno = db.Column(db.String, unique=True)
_email = ... | Python | 0.999779 | @@ -2168,39 +2168,8 @@
l):%0A
- __tablename__ = 'subjects'%0A
|
e6f5e1524242bbb96227acc04a24d46efc3a7402 | Add date_modified to BuckerList model. | app/models.py | app/models.py | """Models for bucketlist API V1."""
from . import db
from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
class BucketListItem(db.Model):
"""Defines the items in a user's bucketlist."""
__tablename__ = "bucketlistitems"
id = db.Column(db.Integer, primary... | Python | 0 | @@ -563,18 +563,16 @@
now)%0A
- #
date_mo
@@ -597,52 +597,58 @@
(db.
-TIMESTAMP, server_default=db.func.now
+DateTime, default=db.func.current_timestamp()
,%0A
- #
@@ -671,9 +671,8 @@
-#
o
@@ -1288,24 +1288,63 @@
'users.id'))
+%0A created_by = db.Column(db.Integer)
%0A%0A def __
|
10056290136e8613340016d74b7efb382a5b67d7 | Revert "Add --no-commit option to apply_issue for use with git on the bots." | apply_issue.py | apply_issue.py | #!/usr/bin/env python
# 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.
"""Applies an issue from Rietveld.
"""
import getpass
import logging
import optparse
import os
import subprocess
import sys
import... | Python | 0.000015 | @@ -1762,123 +1762,8 @@
r')%0A
- parser.add_option('--no-commit', action='store_true',%0A help='Do not try to commit patch to SCM (git only)')%0A
op
@@ -4423,43 +4423,8 @@
dir)
-%0A%0A # FIXME: re-enable --no-commit.
%0A i
@@ -4616,18 +4616,18 @@
cm_type
-is
+==
None:%0A
|
0056399c614e507fe7717d21a605ba875f23b184 | fix the line numbers again | pikos/tests/test_cfunction_monitor.py | pikos/tests/test_cfunction_monitor.py | # -*- coding: utf-8 -*-
#----------------------------------------------------------------------------
# Package: Pikos toolkit
# File: tests/test_c_function_monitor.py
# License: LICENSE.TXT
#
# Copyright (c) 2014, Enthought, Inc.
# All rights reserved.
#------------------------------------------------------------... | Python | 0.000022 | @@ -1719,18 +1719,18 @@
all gcd
-32
+41
%7B0%7D%22.fo
@@ -1780,10 +1780,10 @@
gcd
-36
+45
%7B0%7D
@@ -4884,17 +4884,17 @@
nacci 11
-5
+6
%7B0%7D%22.fo
|
a945c97b610a45c3422d3a225824d22c7107883c | Fix version exists check for platform specific builds | update.py | update.py | #!/usr/bin/env python3
import argparse
import json
import os
import re
from datetime import datetime
from jinja2 import Environment, FileSystemLoader
from typing import NamedTuple, Optional, Tuple
from urllib.error import URLError
from urllib.request import urlopen, Request
from urllib.parse import urljoin
RELEASE_UR... | Python | 0 | @@ -2351,16 +2351,22 @@
platform
+ + '/'
), crate
@@ -2635,16 +2635,25 @@
tarball%7D
+ at %7Burl%7D
')%0A%0A%0Adef
|
e51c0600adab99454deb1d5ee0d99ac2a982a515 | fix tests | pillowtop/tests/test_elasticsearch.py | pillowtop/tests/test_elasticsearch.py | import uuid
from django.test import SimpleTestCase
from pillowtop.feed.interface import Change
from pillowtop.listener import AliasedElasticPillow
from pillowtop.pillow.interface import PillowRuntimeContext
from .utils import require_explicit_elasticsearch_testing, get_doc_count
class TestElasticPillow(AliasedElastic... | Python | 0.000001 | @@ -757,24 +757,41 @@
%7D%0A %7D%0A%0A
+ @classmethod%0A
def calc
@@ -796,20 +796,19 @@
lc_meta(
-self
+cls
):%0A
@@ -884,20 +884,19 @@
return
-self
+cls
.es_inde
|
e63f21796f16ae1afdc11eaffd53046e2319fece | Fix migration again | pinax/blog/migrations/0001_initial.py | pinax/blog/migrations/0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.utils import timezone
from django.conf import settings
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('taggit', '0001_initial'),
migrations.swappa... | Python | 0 | @@ -170,31 +170,8 @@
ngs%0A
-import taggit.managers%0A
%0A%0Acl
@@ -212,139 +212,8 @@
):%0A%0A
- dependencies = %5B%0A ('taggit', '0001_initial'),%0A migrations.swappable_dependency(settings.AUTH_USER_MODEL),%0A %5D%0A%0A
@@ -2710,179 +2710,8 @@
)),%0A
- ('tags', taggit.mana... |
88818c048e32aa9e7b49488dcf5f2a663c6a296f | dont eval input on py2 | upload.py | upload.py | #!/usr/bin/env python
# Upload files named on ARGV as Slack emoji.
# https://github.com/smashwilson/slack-emojinator
import os
import re
import sys
import requests
from bs4 import BeautifulSoup
team_name = os.getenv('SLACK_TEAM')
if not team_name:
team_name = input("Please enter the team name: ")
cookie = os.ge... | Python | 0.998896 | @@ -191,16 +191,76 @@
ulSoup%0A%0A
+try:%0A raw_input%0Aexcept NameError:%0A raw_input = input%0A%0A
team_nam
@@ -317,24 +317,28 @@
team_name =
+raw_
input(%22Pleas
@@ -426,16 +426,20 @@
ookie =
+raw_
input(%22P
|
5a36943988088027e13c1499a90be7a0cf9ee8e2 | Enable colors only for supported | coalib/output/printers/ConsolePrinter.py | coalib/output/printers/ConsolePrinter.py | from coalib.output.printers.ColoredLogPrinter import ColoredLogPrinter
from coalib.output.printers.LOG_LEVEL import LOG_LEVEL
class ConsolePrinter(ColoredLogPrinter):
"""
A simple printer for the console that supports colors and logs.
Note that pickling will not pickle the output member.
"""
def ... | Python | 0 | @@ -1,28 +1,45 @@
+import platform%0A%0A
from coalib.output.printers.
@@ -466,12 +466,39 @@
red=
-True
+platform.system() in (%22Linux%22,)
):%0A
|
97a2b1149cd571604c85ecc7a16c39538f65b6e3 | update test_api.py | test_api.py | test_api.py | #!/usr/bin/env python3
from netsnmp import *
from netsnmp._api import SNMPError
import sys, time
if __name__ == '__main__':
ips = ['archt01', 'archt02', 'archt03', 'archt04', 'archt05']
ips6 = ['udp6:[fe80::c67:bb2b:dbb4:8c63]', 'udp6:[fe80::ce0b:fd3a:ac06:26a9]', 'udp6:[fe80::b97d:dda5:1b0e:dd2e]', 'udp6:[fe... | Python | 0.000003 | @@ -1860,34 +1860,41 @@
print(%22
-error%22, st
+%5B%25s%5D%22 %25 host, rep
r(e))%0A
@@ -2852,34 +2852,41 @@
print(%22
-error%22, st
+%5B%25s%5D%22 %25 host, rep
r(e))%0A
@@ -3727,18 +3727,25 @@
nt(%22
-error%22, st
+%5B%25s%5D%22 %25 host, rep
r(e)
|
305804d45a581f1baec4e65c02c83ad59998ca19 | Fix path channel template | opps/articles/views.py | opps/articles/views.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib.sites.models import get_current_site
from django.core.paginator import Paginator, InvalidPage
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from django.shortcuts import get_object_or_404
from django.ut... | Python | 0 | @@ -989,24 +989,29 @@
r, long_slug
+%5B:-1%5D
)%0A%0A @prop
|
b45261c3dc66e7089e016ebad1121f72fe7ffb80 | Change initial debug configuration to: reset/halt, load, init break points | platformio/commands/debug/initcfgs.py | platformio/commands/debug/initcfgs.py | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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.000002 | @@ -769,35 +769,36 @@
$DEBUG_PORT%0A
-$INIT_BREAK
+monitor init
%0Apio_reset_h
@@ -823,42 +823,19 @@
MDS%0A
-monitor init%0Apio_reset_halt_target
+$INIT_BREAK
%0A%22%22%22
@@ -1263,36 +1263,24 @@
$DEBUG_PORT%0A
-$INIT_BREAK%0A
pio_reset_ha
@@ -1300,16 +1300,28 @@
AD_CMDS%0A
+$INIT_BREAK%0A
%22%22%22%0A%0AGDB
@@... |
468468369b4ce3058f0958169d8a1df04a1655a6 | Describe constant | src/constants.py | src/constants.py | #!/usr/bin/env python
DELTA_T = 0.1
SIMULATION_TIME_IN_SECONDS = 40
STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T)
K_V = 0.90
K_W = 0.90
| Python | 0.999989 | @@ -19,22 +19,8 @@
hon%0A
-DELTA_T = 0.1%0A
SIMU
@@ -47,16 +47,58 @@
DS = 40%0A
+DELTA_T = 0.1 # this is the sampling time%0A
STEPS =
|
bd1af5f3f063dede8d2c2dbfe3e9a01770192bd5 | Check for parent before adding it | scripts/update_taxonomies.py | scripts/update_taxonomies.py | import os
import json
import logging
import sys
from modularodm import Q, storage
from modularodm.exceptions import NoResultsFound
from framework.mongo import set_up_storage
from framework.transactions.context import TokuTransaction
from scripts import utils as script_utils
from website import settings
from website.p... | Python | 0 | @@ -1783,16 +1783,27 @@
parent
+and parent
not in s
|
26f0e15092507c2a8ed2995d3129911dd1cf8c4a | Allow conversion from v4 to v3 for all packages (#1146) | scripts/validate-packages.py | scripts/validate-packages.py | #!/usr/bin/env python3
import json
import jsonschema
import os
import sys
from distutils.version import LooseVersion
SCRIPTS_DIR = os.path.dirname(os.path.realpath(__file__))
UNIVERSE_DIR = os.path.join(SCRIPTS_DIR, "..")
PKG_DIR = os.path.join(UNIVERSE_DIR, "repo/packages")
SCHEMA_DIR = os.path.join(UNIVERSE_DIR, "r... | Python | 0 | @@ -2430,205 +2430,609 @@
-sys.exit(%0A %22%5CtERROR%5Cn%5CnIf upgradesFrom or downgradesTo fields are set to a %22%0A %22non-empty list, then minDcosReleaseVersion must be greater than %22%0A %22or equal to 1.10%22
+# Note: We are going to allow this package state and as a result... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.