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 |
|---|---|---|---|---|---|---|---|
d6a8e42cb3bd963632500541b5e4e71c700c246e | Fix migration | nodeconductor/cost_tracking/migrations/0006_add_pricelist_backend_ids.py | nodeconductor/cost_tracking/migrations/0006_add_pricelist_backend_ids.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0001_initial'),
('cost_tracking', '0005_expand_item_type_size'),
]
operations = [
migrations.RenameF... | Python | 0 | @@ -1314,17 +1314,17 @@
default=
-0
+1
, to='co
|
3d8f627a25cb83a202878897607e5095270c332d | Convert ruuvi_rx beacon timestamp to UTC time. (#54) | ruuvitag_sensor/ruuvi_rx.py | ruuvitag_sensor/ruuvi_rx.py | from datetime import datetime
from multiprocessing import Manager
from threading import Thread
import time
from concurrent.futures import ProcessPoolExecutor
from rx.subjects import Subject
from ruuvitag_sensor.ruuvi import RuuviTagSensor, RunFlag
def _run_get_data_background(macs, queue, shared_data, bt_device):
... | Python | 0.999997 | @@ -539,12 +539,8 @@
%5D =
-str(
date
@@ -548,13 +548,27 @@
ime.
+utc
now()
+.isoformat(
)%0A
|
0b14f93121f3feaa4433eaf8275f5ad40c646b48 | Update NumberPathShuffled.py | _includes/NumberPathShuffled.py | _includes/NumberPathShuffled.py | from random import shuffle
N = 100
shufflePeriod = 10000000
print(N)
connected = [[]]
for i in range(N):
connected.append([])
for m in range(1,N+1):
# for n in range(1,N+1):
for n in range(N,0,-1):
if ((not m == n) and (m%n == 0 or n%m == 0)):
connected[m].append(n)
def explore(path):
global longestLength, l... | Python | 0.000001 | @@ -499,17 +499,49 @@
Shuffled
-%22
+ still%22,longestLength,longestPath
%0A%0A%09isExt
|
936382b1744c2a9b5f3082abe9a3e0f2fbba58d0 | Return None when an error while reading config occurs | src/config.py | src/config.py | import yaml
SECTION_APP = "app"
SECTION_DEVICE = "device"
KEY_DEFAULT = "default"
def read_value(section, key):
with open(".adbons.yml", 'r') as ymlfile:
config = yaml.safe_load(ymlfile)
try:
return config[section][key]
except:
return ""
def write_value(section, key, value):
... | Python | 0.000002 | @@ -108,16 +108,29 @@
, key):%0A
+ try:%0A
with
@@ -167,32 +167,36 @@
mlfile:%0A
+
config = yaml.sa
@@ -212,25 +212,16 @@
mlfile)%0A
- try:%0A
@@ -272,17 +272,12 @@
-return %22%22
+pass
%0A%0A%0Ad
|
4b5cc8e2c75ae191bc134a7b3c62aa9c67ebe837 | Use six.iteritems instead of iteritems() in psutil_compat | salt/utils/psutil_compat.py | salt/utils/psutil_compat.py | # -*- coding: utf-8 -*-
'''
Version agnostic psutil hack to fully support both old (<2.0) and new (>=2.0)
psutil versions.
The old <1.0 psutil API is dropped in psutil 3.0
Should be removed once support for psutil <2.0 is dropped. (eg RHEL 6)
Built off of http://grodola.blogspot.com/2014/01/psutil-20-porting.html
''... | Python | 0 | @@ -316,16 +316,37 @@
ml%0A'''%0A%0A
+# Import Python libs%0A
from __f
@@ -377,16 +377,63 @@
import%0A%0A
+# Import Salt libs%0Aimport salt.ext.six as six%0A%0A
# No exc
@@ -3523,16 +3523,30 @@
old in
+six.iteritems(
_PROCESS
@@ -3558,27 +3558,16 @@
TION_MAP
-.iteritems(
):%0A
|
89a1a37e91ace4af2983e63ef68ff1d22811aa32 | Fix syntax error | hackeriet/cardreaderd/__init__.py | hackeriet/cardreaderd/__init__.py | #!/usr/bin/env python
from hackeriet import mifare
from hackeriet.mqtt import MQTT
from hackeriet.door import users
import os, logging
logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(message)s')
door_name = os.getenv("DOOR_NAME", 'hackeriet')
door_topic = "hackeriet/door/%s/open" % door_name
door_tim... | Python | 0.000585 | @@ -1053,16 +1053,17 @@
else
+:
%0A l
|
0d0ca65120927c0a2585800fb1602f282719c40d | Remove a few unused things in test | flavio/physics/bdecays/formfactors/b_v/test_btov.py | flavio/physics/bdecays/formfactors/b_v/test_btov.py | import unittest
from math import sqrt,radians,asin
from flavio.physics.bdecays.formfactors.b_v import btov, bsz_parameters, lattice_parameters
import numpy as np
from flavio.classes import Constraints, Implementation
from flavio.parameters import default_parameters
import copy
par = {
'm_B0': 5.27961,
'm_Bs': ... | Python | 0 | @@ -185,21 +185,8 @@
port
- Constraints,
Imp
@@ -263,153 +263,8 @@
py%0A%0A
-par = %7B%0A 'm_B0': 5.27961,%0A 'm_Bs': 5.36679,%0A 'm_K*0': 0.89166,%0A 'm_rho0': 0.077526,%0A 'm_omega': 0.78265,%0A 'm_phi': 1.019461,%0A%7D%0A
%0Acla
|
857a251c7491b626bf948b58806b917ab20e3d1b | Make concat_example always choose the device on to_gpu | chainer/dataset/convert.py | chainer/dataset/convert.py | import numpy
import six
from chainer import cuda
def concat_examples(batch, device=None, padding=None):
"""Concatenates a list of examples into array(s).
Dataset iterator yields a list of examples. If each example is an array,
this function concatenates them along the newly-inserted first axis (called
... | Python | 0.000016 | @@ -2355,32 +2355,42 @@
to_device =
+ lambda x:
cuda.to_gpu%0A%0A
@@ -2385,16 +2385,27 @@
a.to_gpu
+(x, device)
%0A%0A fi
|
f67e0a8d5f06e8d6834050cf007bf2e4674aad12 | Improve the Updater docstring | chainer/trainer/updater.py | chainer/trainer/updater.py | import six
from chainer.dataset import iterator as iterator_module
from chainer.dataset import convert
from chainer import optimizer as optimizer_module
from chainer import variable
class Updater(object):
"""Interface of updater objects for trainers.
TODO(beam2d): document it.
"""
@property
de... | Python | 0.00006 | @@ -2473,16 +2473,59 @@
behavior
+ besides setting a custom%0A loss function
. One is
@@ -2537,20 +2537,16 @@
etting a
-%0A
custom
@@ -2568,16 +2568,20 @@
via the
+%0A
%60%60updat
@@ -2615,20 +2615,16 @@
r one is
-%0A
by inhe
@@ -2644,16 +2644,20 @@
lass and
+%0A
overrid
@@ -2689,20 +2689... |
b7f790d03511c30bfab87f1db0afb30317a7ff2e | Add retry logic for 50x responses | acapi/resources/acquiadata.py | acapi/resources/acquiadata.py | """ Acquia Cloud API data resource. """
import json
import logging
import requests
import requests_cache
from platform import python_version
from pprint import pformat
from ..version import __version__
LOGGER = logging.getLogger('acapi.resources.acquiadata')
class AcquiaData(object):
"""Acquia Cloud API abstra... | Python | 0.000001 | @@ -98,16 +98,28 @@
ts_cache
+%0Aimport time
%0A%0Afrom p
@@ -2506,32 +2506,92 @@
GET' == method:%0A
+ attempt = 0%0A while attempt %3C= 5:%0A
resp
@@ -2660,16 +2660,451 @@
arams)%0A%0A
+ if resp.status_code not in range(500, 505):%0A # No nee... |
15403668edf9b81b9dbb2c3b0075416e422ce55c | bump version to dev55 | symposion/__init__.py | symposion/__init__.py | __version__ = "1.0b1.dev54"
| Python | 0 | @@ -22,7 +22,7 @@
dev5
-4
+5
%22%0A
|
c25cf82668817996b45d824cff59eed3b37b9686 | Allow QVR Pro port to be optional on config (#33901) | homeassistant/components/qvr_pro/__init__.py | homeassistant/components/qvr_pro/__init__.py | """Support for QVR Pro NVR software by QNAP."""
import logging
from pyqvrpro import Client
from pyqvrpro.client import AuthenticationError, InsufficientPermissionsError
from requests.exceptions import ConnectionError as RequestsConnectionError
import voluptuous as vol
from homeassistant.components.camera import DOMA... | Python | 0 | @@ -638,24 +638,45 @@
_RECORD,%0A)%0A%0A
+DEFAULT_PORT = 8080%0A%0A
SERVICE_CHAN
@@ -1011,16 +1011,38 @@
ONF_PORT
+, default=DEFAULT_PORT
): cv.po
@@ -1560,13 +1560,9 @@
conf
-.get(
+%5B
CONF
@@ -1566,17 +1566,17 @@
ONF_PORT
-)
+%5D
%0A exc
|
c06d92900a6f0bacd09e06ae5475a7731fb88f93 | Align away state tag with device_trackers (#9884) | homeassistant/components/sensor/mqtt_room.py | homeassistant/components/sensor/mqtt_room.py | """
Support for MQTT room presence detection.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.mqtt_room/
"""
import asyncio
import logging
import json
from datetime import timedelta
import voluptuous as vol
from homeassistant.core import callback... | Python | 0 | @@ -480,16 +480,32 @@
_TIMEOUT
+, STATE_NOT_HOME
)%0Afrom h
@@ -1052,29 +1052,8 @@
e'%0A%0A
-STATE_AWAY = 'away'%0A%0A
PLAT
@@ -2227,20 +2227,24 @@
= STATE_
-AWAY
+NOT_HOME
%0A
@@ -4882,20 +4882,24 @@
= STATE_
-AWAY
+NOT_HOME
%0A%0A%0Adef _
|
508dca3ee509b1a7b8a5c79a0b00ade6dc959bb8 | Disable user related views for now | hubology/__init__.py | hubology/__init__.py | from flask import Flask
from flask import request, jsonify
from flask import render_template, current_app
from functools import wraps
import logging
import json
import urllib
import urllib2
import uuid
from flask.ext.login import LoginManager, current_user
from hubology.models import HubUser
def geocode_location(loc... | Python | 0 | @@ -251,16 +251,18 @@
t_user%0A%0A
+#
from hub
@@ -1167,16 +1167,18 @@
p(app)%0A%0A
+#
@login_m
@@ -1196,16 +1196,18 @@
_loader%0A
+#
def load
@@ -1221,16 +1221,18 @@
serid):%0A
+#
retu
@@ -2778,16 +2778,18 @@
ews.map%0A
+#
import h
@@ -2839,16 +2839,18 @@
profile%0A
+#
import h
|
ec14293f02de84a12ce602d6a0dfbb3c21203bc4 | fix data types from ENV | channelstream/cli/utils.py | channelstream/cli/utils.py | import argparse
import copy
import logging
import json
import pkg_resources
import jinja2
import os
from channelstream.cli import CONFIGURABLE_PARAMS, SHARED_DEFAULTS
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
def main():
config = copy.deepcopy(SHARED_DEFAULTS)
parser = argparse.ArgumentP... | Python | 0.000002 | @@ -160,16 +160,65 @@
DEFAULTS
+%0Afrom channelstream.utils import set_config_types
%0A%0Alog =
@@ -1128,16 +1128,58 @@
nf_value
+%0A config = set_config_types(config)
%0A%0A if
|
63b6c523bf1d19747cf8dfbb0693dc306b880aa4 | Enable 1-time correlation test again | skxray/core/tests/test_correlation.py | skxray/core/tests/test_correlation.py | # ######################################################################
# Copyright (c) 2014, Brookhaven Science Associates, Brookhaven #
# National Laboratory. All rights reserved. #
# #
# Redistribution and use in ... | Python | 0 | @@ -2977,23 +2977,8 @@
ll?%0A
-@skip_if(True)%0A
def
@@ -3837,16 +3837,105 @@
mal=2)%0A%0A
+%0Adef test_image_stack_correlation():%0A num_levels = 1%0A num_bufs = 2 # must be even%0A
coin
@@ -3993,19 +3993,17 @@
n range(
-500
+2
):%0A
|
ac1f44247a2c3b943641e076154bacab3299ceec | Remove unused user.(show|hide)PastEvents (jsonrpc) | indico/MaKaC/services/implementation/user.py | indico/MaKaC/services/implementation/user.py | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico 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; either version 3 of the
# License, or (a... | Python | 0.000001 | @@ -2179,315 +2179,8 @@
)%0A%0A%0A
-class UserShowPastEvents(UserModifyBase):%0A def _getAnswer(self):%0A self._target.getPersonalInfo().setShowPastEvents(True)%0A return True%0A%0A%0Aclass UserHidePastEvents(UserModifyBase):%0A def _getAnswer(self):%0A self._target.getPersonalInfo().setShow... |
ae780b08e27f8567b028dd3411de8829f4f1bfed | Add an option for the number of dimensions in the external FSI config. | SU2_PY/FSI/io/FSI_config.py | SU2_PY/FSI/io/FSI_config.py | #!/usr/bin/env python
# -*-coding:utf-8 -*
# \file FSI_config.py
# \brief Python class for handling configuration file for FSI computation.
# \author THOMAS David, University of Liege, Belgium. Department of Aerospace and Mechanical Engineering
# \version BETA
# ------------------------------------------... | Python | 0 | @@ -1899,17 +1899,16 @@
lues%0D%0A%09%09
-#
if case(
|
23fd2953a41d8b087fa5252df2de0baf36244e43 | remove stupid debug string | doc/readthedoc/conf.py | doc/readthedoc/conf.py | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | Python | 0.001727 | @@ -681,33 +681,8 @@
))%0A%0A
-print(%22sage sage sage%22)%0A%0A
# --
|
51e5aadd1db42d2f1aa4a69df89a57e7e7954a7c | simplify formdata type infering. #111 | scrapy/http/request/form.py | scrapy/http/request/form.py | """
This module implements the FormRequest class which is a more covenient class
(than Request) to generate Requests based on form data.
See documentation in docs/topics/request-response.rst
"""
import urllib
import lxml.html
from scrapy.http.request import Request
from scrapy.utils.python import unicode_to_str
cla... | Python | 0.000026 | @@ -1252,259 +1252,8 @@
ent%0A
- if not hasattr(formdata, %22items%22):%0A try:%0A formdata = dict(formdata) if formdata else %7B%7D%0A except (ValueError, TypeError):%0A raise ValueError('formdata should be a dict or iterable of tuples')%0A%0A
@@ -2627,... |
f2181d50fb17be9e1db6129300d720139ca00636 | use absolute imports for compatibility with python 2.5 | scrapy/selector/__init__.py | scrapy/selector/__init__.py | """
XPath selectors
Two backends are currently available: libxml2 and lxml
To select the backend explicitly use the SELECTORS_BACKEND variable in your
project. Otherwise, libxml2 will be tried first. If libxml2 is not available,
lxml will be used.
"""
from scrapy.conf import settings
if settings['SELECTORS_BACKEND'... | Python | 0 | @@ -327,32 +327,47 @@
lxml':%0A from
+scrapy.selector
.lxmlsel import
@@ -418,32 +418,47 @@
xml2':%0A from
+scrapy.selector
.libxml2sel impo
@@ -510,32 +510,47 @@
ummy':%0A from
+scrapy.selector
.dummysel import
@@ -696,16 +696,31 @@
from
+scrapy.selector
.dummyse
@@ -761,16 +761,31 @@
from... |
e5e60ed15b4da27087883c811d0a6ac8af74fccd | Don't repeat sentences in summary | hnSummarized/sentenceSelection.py | hnSummarized/sentenceSelection.py | """
Author: Nicholas Rutherford
License: MIT
"""
import nltk
import networkx as nx
from nltk.corpus import stopwords
import re
def word_tokenize(s, stop_words):
"""Convert a sentence into a list of words, excluding stop words
Args:
s (str) - A sentence to split into words
stop_words ([str])... | Python | 0.999843 | @@ -3615,16 +3615,79 @@
res%5B:K%5D%5D
+%0A count_check = dict(zip(good_sent, %5B0 for x in good_sent%5D))
%0A%0A #
@@ -3908,16 +3908,83 @@
d_sent:%0A
+ if count_check%5Bsentence%5D %3E 0:%0A continue%0A
|
f3da704e0c603574d7ff56b8b4d66ac2c34d015a | Output image fix | Server/src/server/reporters/tiled_brick_position_reporter.py | Server/src/server/reporters/tiled_brick_position_reporter.py | import cv2
from reporter import Reporter
class TiledBrickPositionReporter(Reporter):
def __init__(self, valid_locations, board_recognizer, board_descriptor, tile_brick_detector, camera):
"""
:param valid_locations Locations to search for brick in
:param board_recognizer Board recognizer
... | Python | 0.999992 | @@ -1623,45 +1623,8 @@
g%22,
-self.board_descriptor.snapshot.board_
imag
|
d2cadcb9be08730f5ccefec5f3e0316265ebf307 | Check request ID value | integration-tests/features/src/json_utils.py | integration-tests/features/src/json_utils.py | """Functions for handling JSON responses returned by various API endpoints."""
import string
from src.attribute_checks import *
def get_value_using_path(obj, path):
"""Get the attribute value using the XMLpath-like path specification.
Return any attribute stored in the nested object and list hierarchy using... | Python | 0 | @@ -1363,24 +1363,553 @@
imestamp)%0A%0A%0A
+def check_request_id_value_in_json_response(context, attribute_name):%0A %22%22%22Check the request ID attribute in the JSON response.%0A%0A Check if ID is stored in a format like: '71769af6-0a39-4242-94be-1f84f04c8a56'%0A %22%22%22%0A response = context.respons... |
de4e5a34aaa322b2ce83161dd4bce7897953ab73 | add Unix socket support to API collector | intelmq/bots/collectors/api/collector_api.py | intelmq/bots/collectors/api/collector_api.py | # SPDX-FileCopyrightText: 2018 tavi.poldma
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
API Collector bot
"""
from threading import Thread
from intelmq.lib.bot import CollectorBot
from intelmq.lib.exceptions import MissingDependencyError
try:
import tornado.web
from tornado.iolo... | Python | 0 | @@ -162,16 +162,68 @@
t Thread
+%0Afrom typing import Optional%0Aimport os%0Aimport socket
%0A%0Afrom i
@@ -382,16 +382,111 @@
IOLoop%0A
+ from tornado.netutil import bind_unix_socket%0A from tornado.httpserver import HTTPServer%0A
except I
@@ -1146,16 +1146,177 @@
= False
+%0A use_socket = False%0A ... |
73eba2f87efc52e97f7559f9b3eeab7ed00ae567 | disable feed_fetch_unit_test | python/paddle/fluid/tests/unittests/test_parallel_executor_fetch_feed.py | python/paddle/fluid/tests/unittests/test_parallel_executor_fetch_feed.py | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | Python | 0.000003 | @@ -3287,24 +3287,64 @@
m(ret%5Bi%5D))%0A%0A
+ @unittest.skip(reason=%22CI timeout%22)%0A
def test
@@ -5385,16 +5385,56 @@
break%0A%0A
+ @unittest.skip(reason=%22CI timeout%22)%0A
def
|
16e8c5ad4adf31def560fc98ce943a878ffadb6c | Fix inst_var_0 column not found issue | rsqueakvm/model/database.py | rsqueakvm/model/database.py | from rsqueakvm.model.pointers import W_PointersObject
from rpython.rlib import jit
from rsqueakvm.plugins.database_plugin import dbm, SQLConnection
from rsqueakvm.error import PrimitiveFailedError
class DBType(object): pass
NIL = DBType()
TEXT = DBType()
INTEGER = DBType()
REAL = DBType()
BLOB = DBType()
ALTER_SQL =... | Python | 0.000001 | @@ -3976,20 +3976,16 @@
if
-not
W_DBObje
@@ -4016,32 +4016,39 @@
(class_name, n0)
+ is NIL
:%0A #
|
5b9c9ab8f8aef01c53b761714bb6b7072fa01aa4 | clean up commandArgs construction for HadoopJob in Python client | genie-client/src/main/python/pygenie/jobs/hadoop.py | genie-client/src/main/python/pygenie/jobs/hadoop.py | """
genie.jobs.hadoop
This module implements creating Hadoop jobs.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import os
from .core import GenieJob
from .utils import (add_to_repr,
arg_string)
logger = logging.getLogger('com.netflix.g... | Python | 0 | @@ -1386,16 +1386,22 @@
._script
+ or ''
) %5C%0A
|
3d15d6c416a7de7d8c38e0794c01e758a82ace85 | Fix test reference | tests/oxford_tests/TestFace.py | tests/oxford_tests/TestFace.py | import inspect
import json
import os
import unittest
import uuid
from test import test_support
import sys, os, os.path
rootDirectory = os.path.dirname(os.path.realpath('__file__'))
if rootDirectory not in sys.path:
sys.path.append(os.path.join(rootDirectory, '..'))
from oxford.Face import Face
from oxford.Perso... | Python | 0.000001 | @@ -314,16 +314,21 @@
d.Person
+Group
import
@@ -333,16 +333,21 @@
t Person
+Group
%0A%0A# loca
@@ -969,16 +969,21 @@
rson
+Group
, Person
)%0A%0A
@@ -978,16 +978,21 @@
, Person
+Group
)%0A%0A d
|
7dc01fa4593e81448db2749d460737cbfa57b63d | Return normalized version | wger/__init__.py | wger/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
"""
VERSION = (1, 9, 0, 'beta', 1)
RELEASE = False
def get_version(version=None, release=None):
"""Derives a PEP386-compliant version number from VERS... | Python | 0.000005 | @@ -994,12 +994,13 @@
+= '
--
+.
dev
+0
'%0A%0A
|
a7a14619f7662ccb510b6a0031a58647cf0b34e7 | Remove duplicated path for build script | whack/builder.py | whack/builder.py | import os
import subprocess
from . import downloads
from .tempdir import create_temporary_dir
from .common import WHACK_ROOT
from .files import mkdir_p, write_file
from .errors import FileNotFoundError
def build(package_request, package_dir):
with create_temporary_dir() as build_dir:
_build_in_dir(packag... | Python | 0.000001 | @@ -523,16 +523,54 @@
script =
+ %22whack/build%22%0A build_script_path =
os.path
@@ -586,29 +586,28 @@
ld_dir,
-%22whack/build%22
+build_script
)%0A if
@@ -638,16 +638,21 @@
d_script
+_path
):%0A
@@ -665,27 +665,19 @@
sage = %22
-whack/build
+%7B0%7D
script
@@ -705,17 +705,17 @@
source %7B
-0
+... |
b2b137b0566ffb601f96c95a20acfae9bd0ae97c | Bump due to pypi issues. | win/gstreamer.py | win/gstreamer.py | from __future__ import absolute_import, print_function
import sys
from os.path import join, sep
from shutil import rmtree
from os import walk, listdir
from .common import *
__version__ = '0.1.8'
gst_ver = '1.10.2'
def get_gstreamer(cache, build_path, arch, pyver, package, output, compiler='mingw'):
data = []
... | Python | 0 | @@ -186,17 +186,17 @@
= '0.1.
-8
+9
'%0A%0Agst_v
|
4c017462c41ad080c1f6a98f8be7ef843f379253 | Fix test name | tests/search_backend_sphinx.py | tests/search_backend_sphinx.py | from wolis.test_case import WolisTestCase
from wolis import utils
class SearchBackendMysqlTest(WolisTestCase):
@utils.restrict_database('mysql*', 'postgres')
@utils.restrict_phpbb_version('>=3.1.0')
def test_set_search_backend(self):
self.login('morpheus', 'morpheus')
self.acp_login('morphe... | Python | 0.001029 | @@ -83,13 +83,14 @@
kend
-Mysql
+Sphinx
Test
|
58c6cf44fd73aa4d33d48f1defe2ec65e6f20c50 | Add debugging info. | docs/src/conf.py | docs/src/conf.py | # -*- coding: utf-8 -*-
import os
import shutil
from datetime import datetime
from subprocess import call, Popen, PIPE
try:
import simplejson as json
except ImportError:
import json
def prepare(globs, locs):
git = Popen('which git 2> %s' % os.devnull, shell=True, stdout=PIPE
).stdout.rea... | Python | 0 | @@ -42,16 +42,31 @@
shutil%0A
+import logging%0A
from dat
@@ -129,16 +129,51 @@
, PIPE%0A%0A
+log = logging.getLogger(__name__)%0A%0A
try:%0A
@@ -236,16 +236,163 @@
t json%0A%0A
+def fake_ignore(cwd, contents):%0A for entry in contents:%0A log.info('Copying %25s/%25s to its final destination...', cwd... |
e721511a24f98e57e8bfeb45a953d7d42cf78f33 | increase the max length of a link that is to be shortenend to 500 characters | teeny_weeny/models.py | teeny_weeny/models.py | from django.db import models
from django.utils import timezone
class ShortLink(models.Model):
short = models.CharField(max_length=128, unique=True)
link = models.URLField()
hit = models.BigIntegerField(default=0)
date = models.DateTimeField(default=timezone.now)
def __unicode__(self):
retu... | Python | 0.000061 | @@ -173,16 +173,30 @@
RLField(
+max_length=500
)%0A hi
@@ -350,8 +350,9 @@
f.short)
+%0A
|
517ffe9a3d2ca3608b8044e88d74d16fe5e65db1 | Use new Sphinx Autodoc mock import path (#17634) | docs/exts/docroles.py | docs/exts/docroles.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | Python | 0 | @@ -922,17 +922,52 @@
t_module
-,
+%0Afrom sphinx.ext.autodoc.mock import
mock%0A%0A%0A
|
027c9d24ecf00a8435ad012fdab9e64b4201ed42 | fix migration conflict, re #7128 | arches/app/models/migrations/7128_resource_instance_filter.py | arches/app/models/migrations/7128_resource_instance_filter.py | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('models', '7262_report_template_data_fetch_bool'),
]
operations = [
migrations.RunSQL("""
UPDATE d_data_types
SET defaultconfig = defaultconfig || '{"searchString": "... | Python | 0 | @@ -122,43 +122,40 @@
, '7
-262_report_template_data_fetch_bool
+442_delete_manifest_images_table
'),%0A
|
e987a010f2242735ad60008774d25c00b7f89f76 | Tweak CI report | CI/CITests.py | CI/CITests.py | import os
from OMPython import OMCSessionZMQ
class CITests():
'''
Python class used to run CI tests
'''
def __init__(self, rootPath):
'''
Constructor starts omc and loads MSL
'''
self.rootPath = rootPath
self.omc = OMCSessionZMQ()
os.chdir(self.rootPath)
... | Python | 0 | @@ -387,24 +387,33 @@
oadLib(self,
+ libName,
libPath):%0A
@@ -554,21 +554,20 @@
nt %22
-%25s is
+Load
success
full
@@ -566,32 +566,23 @@
cess
-fully loaded.
+: %25s
%22 %25 lib
-Path
+Name
%0A
@@ -616,20 +616,20 @@
sg = lib
-Path
+Name
+ %22 was
@@ -663,18 +663,30 @@
ary path
-.%22
+:%5Cn%22 + libPat... |
94405e6c4911669532b3648e91f2f5c5b58e5d26 | Bump up dataflow python container version to beam-master-20220914 (#23238) | sdks/python/apache_beam/runners/dataflow/internal/names.py | sdks/python/apache_beam/runners/dataflow/internal/names.py | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | Python | 0 | @@ -1644,19 +1644,19 @@
er-20220
-811
+914
'%0A# Upda
@@ -1845,11 +1845,11 @@
0220
-811
+914
'%0A%0AD
|
31a607f13536fcaefa8decffe1769d1dc66e78e4 | Use empty dict for default package description | whack/sources.py | whack/sources.py | import os
import json
import shutil
import tempfile
import uuid
import blah
from .hashes import Hasher
from .files import mkdir_p, copy_dir
class PackageSourceNotFound(Exception):
def __init__(self, package_name):
message = "Could not find source for package: {0}".format(package_name)
Exception.... | Python | 0 | @@ -2702,74 +2702,38 @@
- return DictBackedPackageDescription(whack_json)%0A else:%0A
+else:%0A whack_json = %7B%7D%0A
@@ -2740,22 +2740,25 @@
return D
-efault
+ictBacked
PackageD
@@ -2772,110 +2772,37 @@
ion(
-)%0A %0A %0Aclass DefaultPackageDescription(object):%0A def ... |
4f83984c518a55feac88cbe70cc19a6945b02b59 | fix doc-gen (#1151) | python/dllib/src/bigdl/dllib/feature/dataset/mnist.py | python/dllib/src/bigdl/dllib/feature/dataset/mnist.py | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | Python | 0 | @@ -1116,24 +1116,19 @@
%5D.%0A%0A
-%0A
-Args:%0A
+:param:
f:
@@ -1184,28 +1184,20 @@
er.%0A
-%0A%0A
-R
+:r
eturn
-s:%0A
+:
dat
@@ -1248,27 +1248,19 @@
h%5D.%0A
-%0A%0A
-R
+:r
aise
-s:%0A
+:
Val
@@ -1313,17 +1313,16 @@
2051.%0A%0A
-%0A
%22%22%22%0A
@@ -2480,16 +2480,1... |
7725821156795b613340bd8098583fdbb189a6d3 | fix minor bug and update response msg | wildlife/rest.py | wildlife/rest.py | from wildlife import WildApp
import os
from flask import jsonify, make_response
from wildlife import kz_exceptions
import logging
import json
import exceptions
import functools
# change to current directory
os.chdir(os.path.dirname(os.path.realpath(__file__)))
conf_path = "./config/wildlife.yml"
app = WildApp("wildl... | Python | 0 | @@ -485,16 +485,23 @@
+return
func(clu
@@ -845,26 +845,28 @@
ith Cluster
+%5B
%25s
+%5D
.%5Cn%22 %25 clust
@@ -952,20 +952,24 @@
.NoNodeE
-rror
+xception
:%0A
@@ -1010,26 +1010,28 @@
Find Znode
+%5B
%25s
+%5D
in Cluster%22
@@ -1065,18 +1065,20 @@
%22
+%5B
%25s
+%5D
.%5Cn%22 %25 (... |
08516e8cc202e19d5dd144048ede0c04d2c27f4a | add patch_ssl after patch_socket | source/jormungandr/jormungandr/api.py | source/jormungandr/jormungandr/api.py | #!/usr/bin/env python
# coding=utf-8
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help u... | Python | 0.000027 | @@ -1819,16 +1819,42 @@
socket()
+%0Agevent.monkey.patch_ssl()
%0A%0A@rest_
|
c11c2a65b3662ca9dacac2b57fef2590432a958f | Update src/compas_rhino/interop/primitives.py | src/compas_rhino/interop/primitives.py | src/compas_rhino/interop/primitives.py | from compas.geometry import Point
from compas.geometry import Vector
from compas.geometry import Line
from compas.geometry import Plane
from compas.geometry import Frame
from compas.geometry import Circle
from compas.geometry import Ellipse
from compas.geometry import Polyline
from compas.geometry import Polygon
from ... | Python | 0 | @@ -5542,38 +5542,39 @@
compas.geometry.
-Ellips
+Polylin
e%60%0A %22%22%22%0A r
|
33c51e6a0612aece239bf01236f110ef9fb40c86 | Add some uncovered code | wordcount_lib.py | wordcount_lib.py | def consume(filename):
chars = 0
words = 0
lines = 0
with open(filename, 'rt') as fp:
for line in fp:
lines += 1
words += len(line.strip().split())
chars += len(line)
return chars, words, lines
| Python | 0.000002 | @@ -253,8 +253,161 @@
, lines%0A
+%0Adef daaaangerous(param=0):%0A print(%22I'm the most dangerous function West of the Missippi, no test %22%5C%0A %22will cover me!%22)%0A return 3 / param%0A
|
491fdd17768c8de2b547fb74071368858a9a30a6 | add 'show_ids' flag | Synopsis/Formatters/Dump.py | Synopsis/Formatters/Dump.py | # $Id: Dump.py,v 1.6 2003/11/25 04:52:26 stefan Exp $
#
# Copyright (C) 2003 Stefan Seefeld
# All rights reserved.
# Licensed to the public under the terms of the GNU LGPL (>= 2),
# see the file COPYING for details.
#
"""
Verbose attribute-oriented xml dump of AST, useful for validation,
introspection, and debugging.
... | Python | 0.000154 | @@ -12,17 +12,17 @@
.py,v 1.
-6
+7
2003/11
@@ -26,19 +26,19 @@
/11/
-25 04:52:26
+30 01:28:57
ste
@@ -621,16 +621,81 @@
ssor):%0A%0A
+ show_ids = Parameter(True, 'output object ids as attributes')%0A
show_
@@ -2614,16 +2614,46 @@
key(i):%0A
+ if self.show_ids:%0A
@@ -2692,16 +2692,16 ... |
610446ee84b02372bdd98e4530e9be9e6898c3ec | Fix #3 issue. | textmagic/rest/models/chats.py | textmagic/rest/models/chats.py | from . import Model, CollectionModel
class ChatMessage(Model):
"""
A Chat Message object model
.. attribute:: id
.. attribute:: direction
.. attribute:: sender
.. attribute:: messageTime
.. attribute:: text
.. attribute:: receiver
.. attribute:: deleted
.. attribute:: u... | Python | 0 | @@ -1939,10 +1939,8 @@
hone
-=0
, **
|
39326adf06e675766fa28d6508052196cf99f0a3 | Fix global name 'cls' is not defined | rx/linq/observable/timer.py | rx/linq/observable/timer.py | import logging
from datetime import datetime
from six import add_metaclass
from rx.observable import Observable
from rx.anonymousobservable import AnonymousObservable
from rx.disposables import CompositeDisposable, \
SingleAssignmentDisposable, SerialDisposable
from rx.concurrency import timeout_scheduler, Schedul... | Python | 0.999172 | @@ -2748,38 +2748,37 @@
ubscribe)%0A%0A @
-static
+class
method%0A def o
@@ -2805,32 +2805,37 @@
span_and_period(
+cls,
duetime, period,
|
05cb079fd4e6b7a9bfd32c1470c9c638af5b7bc9 | Add comments clarifying implementation choices | importlib_metadata/_py39compat.py | importlib_metadata/_py39compat.py | """
Compatibility layer with Python 3.8/3.9
"""
from typing import TYPE_CHECKING, Any, Optional, Tuple
if TYPE_CHECKING:
from . import Distribution, EntryPoint
else:
Distribution = EntryPoint = Any
def normalized_name(dist: Distribution) -> Optional[str]:
"""
Honor name normalization for distributio... | Python | 0 | @@ -97,17 +97,16 @@
Tuple%0A%0A
-%0A
if TYPE_
@@ -114,16 +114,59 @@
HECKING:
+ # -%3E prevent circular imports on runtime.
%0A fro
@@ -510,16 +510,57 @@
Prepared
+ # -%3E delay to prevent circular imports.
%0A%0A
@@ -1513,16 +1513,57 @@
tryPoint
+ # -%3E delay to prevent circular imports.
%0A%0A ... |
faaffde191fe3b8a4d12a94878835d6f80f92548 | Add --show-score option to rebalance | kafka_utils/kafka_cluster_manager/cmds/rebalance.py | kafka_utils/kafka_cluster_manager/cmds/rebalance.py | # -*- coding: utf-8 -*-
# Copyright 2016 Yelp 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 ... | Python | 0.000001 | @@ -656,16 +656,120 @@
agerCmd%0A
+from kafka_utils.kafka_cluster_manager.cluster_info.display %5C%0A import display_cluster_topology_stats%0A
from kaf
@@ -3772,32 +3772,201 @@
er.',%0A )%0A
+ subparser.add_argument(%0A '--show-stats',%0A action='store_true',%0A help... |
4bd53d96be49c01c04a30d2c064774bac23fc20a | Rewrite entry update in DatabaseStorage without explicit update call | speedinfo/storage/database/storage.py | speedinfo/storage/database/storage.py | # coding: utf-8
from django.db import IntegrityError
from django.db.models import ExpressionWrapper, F, FloatField, IntegerField
from django.forms import model_to_dict
from speedinfo.models import ViewProfiler
from speedinfo.storage.base import AbstractStorage
from speedinfo.storage.database.models import Storage
c... | Python | 0 | @@ -828,61 +828,11 @@
-Storage.objects.filter(pk=vp.pk).update(%0A
+vp.
anon
@@ -837,17 +837,19 @@
on_calls
-=
+ =
F(%22anon_
@@ -875,33 +875,32 @@
call and 1 or 0)
-,
%0A cac
@@ -884,36 +884,35 @@
1 or 0)%0A
-
+vp.
cache_hits=F(%22ca
@@ -905,17 +905,19 @@
che_hits
-=
+... |
f1de47de39129642e748977392c2e348c1d0218c | replace SPasswordScimUserV3Controller by SPasswordUserV3Controller | keystone_spassword/contrib/spassword/controllers.py | keystone_spassword/contrib/spassword/controllers.py | #
# Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you unde... | Python | 0.000008 | @@ -4399,36 +4399,32 @@
super(SPassword
-Scim
UserV3Controller
@@ -4444,36 +4444,32 @@
e_user(context,%0A
-
|
5cd0ad7e865794401506dbc9358261b5fa020704 | Move and name region_lookup | saau/sections/age/median.py | saau/sections/age/median.py | import logging
from operator import itemgetter
from matplotlib.cm import get_cmap
import matplotlib as mpl
import cartopy.crs as ccrs
from ...utils.download.abs import get_generic_data, abs_data_to_dataframe
from ..image_provider import ImageProvider
from ...utils.header import render_header_to
DATASETID = 'ABS_CENS... | Python | 0.000001 | @@ -1084,16 +1084,112 @@
data)%0A%0A
+ def region_lookup(self, sa3):%0A return self.services.sa3.get('SA3_CODE11', int(sa3))%0A%0A
def
@@ -1316,114 +1316,8 @@
E))%0A
-%0A region_lookup = lambda sa3: self.services.sa3.get(%0A 'SA3_CODE11', int(sa3)%0A )%0A%0A
@@ -1363,16... |
953d83119005075b9bc59d040389c209208263d5 | Integrate LLVM at llvm/llvm-project@7354a73945f1 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "7f2b016b820487f2fb69b93e784fff5d8297dea0"
LLVM_SHA256 = "348e586173038ab248e76be34d4a3e5667d56429350150a4a8130fba5a318e05"
tfrt_http_archive(
... | Python | 0.000001 | @@ -163,132 +163,132 @@
= %227
-f2b016b820487f2fb69b93e784fff5d8297dea0%22%0A LLVM_SHA256 = %22348e586173038ab248e76be34d4a3e5667d56429350150a4a8130fba5a318e05
+354a73945f1c123d66b01f51374ecbdba18fab3%22%0A LLVM_SHA256 = %2273a86e6f9d263a812bfdda5120b8f08467bd8ee39564b75da752854328a72803
%22%0A%0A
|
509a542fd5e3171979fb74aec9226c057d289623 | Integrate LLVM at llvm/llvm-project@04a5ca862bb9 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "b3a0bed5fb8766dcf27583ab1f73edc6e7232657"
LLVM_SHA256 = "0ee751d5754af930e05cea8b54b061e819e4254e06f64d211e07f2faf3395adf"
tfrt_http_archive(
... | Python | 0.000001 | @@ -162,133 +162,133 @@
= %22
-b3a0bed5fb8766dcf27583ab1f73edc6e7232657%22%0A LLVM_SHA256 = %220ee751d5754af930e05cea8b54b061e819e4254e06f64d211e07f2faf3395adf
+04a5ca862bb989acdd2729d0991b4e5a104bf244%22%0A LLVM_SHA256 = %2210a0c150c477a36eff25d49f0f50379fddf626a7d87a2b1846fb101173c742c9
%22%0A%0A
|
94fbcf6224624810a30a17cc9bc8d4c1f3458954 | Integrate LLVM at llvm/llvm-project@5c7b43aa8298 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "9ba661f91276dd8cc728f9b2e82905b78c0119b4"
LLVM_SHA256 = "f89c033b0e8e6d4e6ff5ce3883aadc82a502b063a830cd685672cec4bea3dfb1"
tfrt_http_archive(
... | Python | 0.000001 | @@ -162,133 +162,133 @@
= %22
-9ba661f91276dd8cc728f9b2e82905b78c0119b4%22%0A LLVM_SHA256 = %22f89c033b0e8e6d4e6ff5ce3883aadc82a502b063a830cd685672cec4bea3dfb1
+5c7b43aa8298a389b906d72c792941a0ce57782e%22%0A LLVM_SHA256 = %22e34534a864e2bedaff6811effb757d2eed3a50c9c1e540515ed1568addf1815d
%22%0A%0A
|
fda8088ec3330ec5bc6ea7769c79d2fb9f227728 | Fix bug with valid hostnames with dashes. I added underscores even though they aren't valid just for good measure | salmon/apps/monitor/urls.py | salmon/apps/monitor/urls.py | from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(r'^$', views.dashboard, name="dashboard"),
url(r'^(?P<name>[\w\.]*)$', views.history, name="history"),
)
| Python | 0.000003 | @@ -160,12 +160,14 @@
me%3E%5B
+-
%5Cw%5C.
+_
%5D*)$
|
8c9adeec07e67c7fbb46709933ada2776722c2ed | Remove futile import | sqlalchemy_continuum/model_builder.py | sqlalchemy_continuum/model_builder.py | from copy import copy
import six
import sqlalchemy as sa
from sqlalchemy_utils.functions import primary_keys, declarative_base
from .expression_reflector import ClassExpressionReflector
from .utils import option
from .version import VersionClassBase
class ModelBuilder(object):
"""
VersionedModelBuilder handle... | Python | 0.000004 | @@ -92,22 +92,8 @@
port
- primary_keys,
dec
|
48b79c03b6000cceef1fd16eb478cb77dc461e00 | Implement module lister | salt/modules/ansiblegate.py | salt/modules/ansiblegate.py | # -*- coding: utf-8 -*-
#
# Author: Bo Maryniuk <bo@suse.de>
#
# Copyright 2017 SUSE LLC
# 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
#
# Unles... | Python | 0.000001 | @@ -676,16 +676,31 @@
ort yaml
+%0Aimport fnmatch
%0A%0Afrom s
@@ -732,16 +732,39 @@
derError
+, CommandExecutionError
%0Atry:%0A
@@ -2552,16 +2552,578 @@
rn mod%0A%0A
+ def get_modules_list(self, pattern=None):%0A '''%0A Return module map references.%0A :return:%0A '''%0A i... |
87656428f02134c36c052fe60cfaa25536291cfe | Fix syntax error | upcloud_api/cloud_manager/storage_mixin.py | upcloud_api/cloud_manager/storage_mixin.py | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from upcloud_api import Storage
class StorageManager(object):
"""
Functions for managing Storage disks. Intended to be used as a mixin for CloudManager.
"""... | Python | 0.000004 | @@ -1271,16 +1271,17 @@
e': zone
+,
%0A
|
9a6c74bdb8c7b386f75100ab2fafabae3a5a9997 | Add utility functions to stix.Entity | stix/__init__.py | stix/__init__.py | # Copyright (c) 2014, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
__version__ = "1.0.1.0"
import json
from StringIO import StringIO
class Entity(object):
"""Base class for all classes in the STIX API."""
def to_obj(self, return_obj=None):
"""Export a... | Python | 0.000002 | @@ -3103,8 +3103,388 @@
rn_obj%0D%0A
+%0D%0A @classmethod%0D%0A def object_from_dict(cls, entity_dict):%0D%0A %22%22%22Convert from dict representation to object representation.%22%22%22%0D%0A return cls.from_dict(entity_dict).to_obj()%0D%0A%0D%0A @classmethod%0D%0A def dict_from_object(cls, ... |
dde76066d3c7ecbc4408104cb212c92d532e50ba | Fix undefined info error and accept HTTP 201 response code (#2643) | lib/ansible/modules/extras/notification/campfire.py | lib/ansible/modules/extras/notification/campfire.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of Ansible
#
# Ansible 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, either version 3 of the License, or
# (at your option) any later version.
... | Python | 0 | @@ -4351,32 +4351,36 @@
eaders=headers)%0A
+
if info%5B'sta
@@ -4381,32 +4381,47 @@
o%5B'status'%5D
-!= 200:%0A
+not in %5B200, 201%5D:%0A
modu
@@ -4498,32 +4498,36 @@
+
%22 returned error
@@ -4533,32 +4533,36 @@
r code: '%25s'%22 %25%0A
+
@@ -4746,... |
0efe8e9cfbd3a5d3319553aabf4f0dd17fa53d33 | fix license test | awx/main/tests/functional/api/test_settings.py | awx/main/tests/functional/api/test_settings.py | # Copyright (c) 2016 Ansible, Inc.
# All Rights Reserved.
# Python
import pytest
# Django
from django.core.urlresolvers import reverse
# AWX
from awx.conf.models import Setting
@pytest.mark.django_db
def test_license_cannot_be_removed_via_system_settings(get, put, patch, delete, admin, enterprise_license):
url... | Python | 0 | @@ -74,16 +74,26 @@
t pytest
+%0Aimport os
%0A%0A# Djan
@@ -184,16 +184,205 @@
etting%0A%0A
+'''%0AEnsures that tests don't pick up dev container license file%0A'''%0A@pytest.fixture%0Adef mock_no_license_file(mocker):%0A os.environ%5B'AWX_LICENSE_FILE'%5D = '/does_not_exist'%0A return None%0A
%0A@pytest
@@ -... |
f5e62a0611eca453696d9a8b5fc3ee4f3941a297 | update junos_template module | lib/ansible/modules/network/junos/junos_template.py | lib/ansible/modules/network/junos/junos_template.py | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | Python | 0 | @@ -3626,16 +3626,69 @@
rite%0A%22%22%22
+%0Afrom ansible.module_utils.junos import NetworkModule
%0A%0ADEFAUL
@@ -4185,13 +4185,16 @@
e =
-get_m
+NetworkM
odul
@@ -4224,16 +4224,19 @@
t_spec,%0A
+
@@ -4736,16 +4736,23 @@
(module.
+config.
get_conf
@@ -4784,16 +4784,23 @@
module.
+config.
load_c... |
c91e7dcc969485644d8e26c459c894925b3f0720 | add in fasta format | scripts/dump_biodatabase.py | scripts/dump_biodatabase.py | #!/usr/bin/env python
from getpass import getpass
from BioSQL import BioSeqDatabase
from common import standard_options, generate_placeholders, chunks, extract_feature_sql
def get_seqfeature_for_db(server, biodb):
''' find all seqfeatures that have the given value for the qualifier
returns a list of seqfea... | Python | 0.999986 | @@ -15,16 +15,27 @@
python%0A
+import sys%0A
from get
@@ -760,16 +760,232 @@
sword)%0A%0A
+ if args.output_format == 'fasta':%0A from Bio import SeqIO%0A db = server%5Bargs.database_name%5D%0A for rec in db.values():%0A SeqIO.write(rec, sys.stdout, args.output_format)%0A else:%... |
4a9e34a57476c92a4147f9ecafc357a681f1a19a | Add wrapper for testing fixing functionality | scripts/flaskext_migrate.py | scripts/flaskext_migrate.py | # Script which modifies source code away from the deprecated "flask.ext"
# format. Does not yet fully support imports in the style:
#
# "import flask.ext.foo"
#
# these are converted to "import flask_foo" in the
# main import statement, but does not handle function calls in the source.
#
# Run in the terminal by typing... | Python | 0 | @@ -2685,63 +2685,28 @@
d%0A%0A%0A
-if __name__ == %22__main__%22:%0A input_file = sys.argv%5B1%5D
+def fix(input_file):
%0A
@@ -2793,20 +2793,97 @@
ew_ast, input_file)%0A
+%0Aif __name__ == %22__main__%22:%0A input_file = sys.argv%5B1%5D%0A fix(input_file)%0A
|
5264a58ca8735ee59753a5b621b4559475bfd701 | Allow writing roster file | saltcontainers/factories.py | saltcontainers/factories.py | import os
import py
import yaml
import string
import logging
import tarfile
import factory
import factory.fuzzy
from docker import Client
from models import ContainerModel, MasterModel, MinionModel
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
class BaseFactory(factory.Factory):
class Meta... | Python | 0.000001 | @@ -3585,24 +3585,248 @@
e).read())%0A%0A
+ @factory.post_generation%0A def roster(obj, create, extracted, **kwargs):%0A if extracted:%0A roster = obj%5B'root'%5D / 'roster'%0A roster.write(yaml.safe_dump(extracted, default_flow_style=False))%0A%0A
%0Aclass Conta
|
95d8f915e4aee6fbab4ca741197a3563eb3a5ff2 | bump version to 0.4 | aldryn_bootstrap3/__init__.py | aldryn_bootstrap3/__init__.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
__version__ = '0.3'
| Python | 0 | @@ -96,7 +96,7 @@
'0.
-3
+4
'%0A
|
bf9c2782bde285107960eb2de8d746ec84c68477 | add test | aligot/tests/test_notebook.py | aligot/tests/test_notebook.py | # coding: utf-8
from django.test import TestCase
from django.core.urlresolvers import reverse
from rest_framework.test import APIClient
from rest_framework import status
from ..models import NoteBook, User
import logging
# Get an instance of a logger
logger = logging.getLogger(__name__)
class TestNoteBookApi(TestCa... | Python | 0.000002 | @@ -3877,28 +3877,315 @@
response.data%5B1%5D%5B'title'%5D)%0A
+%0A def test_get(self):%0A notebook = NoteBook.objects.create(title='notebook 1', created_by=self.user2)%0A response = self.client.get(reverse('notebook-detail', args=%5Bnotebook.id%5D))%0A self.assertEquals(status.HTTP_403_FORBID... |
ae652c8078b0cbde57934ffaf9ffce0e4a18e99e | Update generatejson.py | ingest/autoingest/generatejson.py | ingest/autoingest/generatejson.py | # Copyright 2014 Open Connectome Project (http://openconnecto.me)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | Python | 0.000012 | @@ -693,18 +693,17 @@
dio.
-utils.auto
+remote.nd
inge
@@ -708,17 +708,17 @@
gest as
-A
+N
I%0ASITE_H
@@ -770,20 +770,18 @@
-a
+n
i =
-AI.Auto
+NI.ND
Inge
@@ -3108,25 +3108,25 @@
rmation%0A
-a
+n
i.add_datase
@@ -3236,25 +3236,25 @@
rmation%0A
-a
+n
i.add_projec
@@ -3310,25 +3310,25 @@
channe... |
de0fd677d94b7fb8b044fa597b687dba0f3e1c0e | Test coercions for generic type constructors | blaze/datashape/tests/test_type_constructor.py | blaze/datashape/tests/test_type_constructor.py | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
import unittest
from blaze import error
from blaze.datashape import unify_simple, promote, coerce, dshapes, coretypes as T
#------------------------------------------------------------------------
# Test data
#------------------... | Python | 0 | @@ -1405,16 +1405,182 @@
, rt1)%0A%0A
+ def test_coercion(self):%0A self.assertEqual(coerce(t1, t2), 0)%0A self.assertGreater(coerce(t3, t2), 0)%0A self.assertEqual(coerce(rt1, rt2), 0)%0A%0A
%0Aclass T
@@ -1747,63 +1747,8 @@
_':%0A
- # TestTypeConstructors('test_unification').debug()%0A
... |
7da15f2e16c95a4be179a1cc1efd108dbaaa3be9 | Update forward_ZMQ_Angle.py | ProBot_BeagleBone/forward_ZMQ_Angle.py | ProBot_BeagleBone/forward_ZMQ_Angle.py | import zmq
def main():
try:
context = zmq.Context(1)
# Socket facing clients
frontend = context.socket(zmq.SUB)
frontend.bind("tcp://*:5583")
frontend.setsockopt(zmq.SUBSCRIBE, "")
# Socket facing services
backend = context.socket(zmq.PUB)
backend.bi... | Python | 0.000001 | @@ -1,8 +1,27 @@
+#!/usr/bin/python%0A%0A
import z
|
c01f7fb0c9bda24efbd1d1597350a77d03047027 | Add Grid and Align support | wytch/builder.py | wytch/builder.py | # The MIT License (MIT)
#
# Copyright (c) 2015 Josef Gajdusek
#
# 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 rights
# to use, copy, ... | Python | 0 | @@ -1909,16 +1909,309 @@
rn ret%0A%0A
+ def align(self, halign = view.HOR_MID, valign = view.VER_MID):%0A return self.nest(view.Align(halign = halign, valign = valign))%0A%0A def grid(self, width, height):%0A ret = GridBuilder(view.Grid(width, height), parent = self)%0A self.nested.append(re... |
a7ac41830ac0472442069deead739ddd4c137be3 | add future import for print | examples/receive_notify.py | examples/receive_notify.py | #!/usr/bin/env python3
# This is just a toy, real code would check that the received message
# really was a NOTIFY, and otherwise handle errors.
import socket
import dns.flags
import dns.message
import dns.rdataclass
import dns.rdatatype
address = '127.0.0.1'
port = 53535
s = socket.socket(socket.AF_INET, socket.S... | Python | 0 | @@ -140,16 +140,55 @@
rrors.%0A%0A
+from __future__ import print_function%0A%0A
import s
|
6e313af1512de3520f9e6b91487c8a06eb2c5ee2 | Fix copy/paste documentation return type. | yagocd/client.py | yagocd/client.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# The MIT License
#
# Copyright (c) 2016 Grigory Chernyshev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation file... | Python | 0 | @@ -3619,21 +3619,20 @@
sources.
-agent
+user
.UserMan
@@ -3880,21 +3880,24 @@
sources.
-agent
+material
.Materia
@@ -4153,21 +4153,24 @@
sources.
-agent
+pipeline
.Pipelin
@@ -4417,21 +4417,21 @@
sources.
+st
age
-nt
.StageMa
@@ -4695,21 +4695,24 @@
sources.
-agent
+property
.Propert
@@ -4983,21 +4983,29 @@... |
ecf679f5ed805e1286bd6cb8a4bada57c9bb9710 | use ldap sync function | addons/users_ldap/users_ldap.py | addons/users_ldap/users_ldap.py | ##############################################################################
#
# Copyright (c) 2004-2007 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id: account.py 1005 2005-07-25 08:41:42Z nicoe $
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole resp... | Python | 0.000002 | @@ -2614,16 +2614,18 @@
ple_bind
+_s
(res_com
@@ -2854,32 +2854,34 @@
lt_id = l.search
+_s
(base, scope, fi
@@ -3184,32 +3184,34 @@
%09%09%09%09%09%09%09if l.bind
+_s
(dn, passwd):%0A%09%09
@@ -4709,16 +4709,18 @@
ple_bind
+_s
(company
@@ -4940,16 +4940,18 @@
l.search
+_s
(base, s
@@ -5242,16 +5242,18 @@
f l... |
3c28ff454fc2209c2df18e94e5650da35ff86c10 | Remove unused mako option | adhocracy/config/environment.py | adhocracy/config/environment.py | """Pylons environment configuration"""
import os
import time
import traceback
from mako.lookup import TemplateLookup
from paste.deploy.converters import asbool
from pylons import tmpl_context as c
from pylons.error import handle_mako_error
from pylons.configuration import PylonsConfig
import sqlalchemy
from sqlalchemy... | Python | 0 | @@ -2012,87 +2012,8 @@
f-8'
-, default_filters=%5B'escape'%5D,%0A imports=%5B'from markupsafe import escape'%5D
)%0A%0A
|
c8120d91330e1ac2ea023778f25ebab826637388 | fix broken build | internal/rollup/rollup_bundle.bzl | internal/rollup/rollup_bundle.bzl | # Copyright 2017 The Bazel 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 applicable la... | Python | 0.000001 | @@ -2243,17 +2243,16 @@
lugins),
-,
%0A %7D
|
9bbe8057a627ba81282a76de94e57ca0b0e02b89 | change default port | backend/src/gosa/backend/plugins/foreman/gosa_integration.py | backend/src/gosa/backend/plugins/foreman/gosa_integration.py | #!/usr/bin/env python3
"""
Foreman / GOsa3 integration to send hook events data to GOsa3
"""
import hmac
import sys
import requests
import json
#. /etc/sysconfig/foreman-gosa
# Gosa settings
GOSA_SERVER = "http://localhost"
GOSA_PORT = 8000
HTTP_X_HUB_SENDER = "foreman-hook"
SECRET = "e540f417-4c36-4e5d-b78a-4d36f5172... | Python | 0.000001 | @@ -232,17 +232,17 @@
ORT = 80
-0
+5
0%0AHTTP_X
|
94b216fb8c15db7228e54e35058c7143b02d103f | prepare 1.1.1 bugfix release, from now on tests for new features.. | cmsplugin_blog/__init__.py | cmsplugin_blog/__init__.py | # -*- coding: utf-8 -*-
VERSION = (1, 1, 0, 'post', 0)
def get_version(): # pragma: no cover
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
i... | Python | 0 | @@ -35,17 +35,17 @@
(1, 1,
-0
+1
, 'post'
|
a41f4f6554a210da718606b4d438c83d2be5a90a | Add reboot and destroy methods. | libcloud/compute/drivers/ninefold.py | libcloud/compute/drivers/ninefold.py | import base64
import hashlib
import hmac
import urllib
try:
import json
except:
import simplejson as json
from libcloud.common.base import ConnectionUserAndKey, Response
from libcloud.compute.base import Node, NodeDriver, NodeImage, NodeLocation, \
NodeSize
from libcloud.comp... | Python | 0 | @@ -34,16 +34,28 @@
rt hmac%0A
+import time%0A
import u
@@ -60,16 +60,16 @@
urllib%0A
-
%0Atry:%0A
@@ -1710,16 +1710,97 @@
ED%0A %7D
+%0A JOB_STATUS_MAP = %7B%0A 0: None,%0A 1: True,%0A 2: False,%0A %7D
%0A%0A ty
@@ -2327,16 +2327,277 @@
mmand%5D%0A%0A
+ def _job_result(sel... |
dc238c3a2295a440ebeb538b59871b1fef1b5cd7 | fix failing unit test | sass_processor/processor.py | sass_processor/processor.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import io
import os
import json
import subprocess
from django.apps import apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.files.base import ContentFile
from django.template import Context
from... | Python | 0.000001 | @@ -1284,99 +1284,8 @@
s')%0A
- node_modules_dir = dict(getattr(settings, 'STATICFILES_DIRS', %5B%5D)).get('node_modules')%0A
@@ -1399,24 +1399,231 @@
_path = path
+%0A nmd = %5Bd%5B1%5D for d in getattr(settings, 'STATICFILES_DIRS', %5B%5D)%0A if isinstance(d, (list, tuple)) and d%5B0%5... |
5a1212a8239212db71cdd7ec0d67e590df63d982 | Stop sleeping, why ? let system work. | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/GPDBStorageBaseTestCase.py | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/GPDBStorageBaseTestCase.py | """
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the 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
... | Python | 0 | @@ -2596,26 +2596,8 @@
ce))
-%0A sleep(30)
%0A%0A
|
d03513e41ee1cc0edcd696c5ed08274db4f782bd | add editor for page icons | cmsplugin_cascade/admin.py | cmsplugin_cascade/admin.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url
from django.contrib import admin
from django.db.models import Q
from django.http import JsonResponse, HttpResponseForbidden
from django.utils.translation import get_language_from_request
from cms.models.pagemodel import Pa... | Python | 0.000001 | @@ -544,16 +544,91 @@
Admin):%0A
+ def get_fields(self, request, obj=None):%0A return %5B'icon_font'%5D%0A%0A
def
|
0089ed6473d898ee3aa766e78a8e1324f89cd436 | Fix Python 2.5 compatibility issue. | libcloud/loadbalancer/drivers/elb.py | libcloud/loadbalancer/drivers/elb.py | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | Python | 0.999784 | @@ -2702,11 +2702,8 @@
ones
-, 1
):%0A
@@ -2798,17 +2798,23 @@
r.%25d' %25
-i
+(i + 1)
%5D = zone
|
28333726030c99e788480ea334a29ecb5d79e66f | Allow deletion of *.mp4 timelapse files | src/octoprint/server/api/timelapse.py | src/octoprint/server/api/timelapse.py | # coding=utf-8
from __future__ import absolute_import
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import os
from flask import... | Python | 0 | @@ -2091,16 +2091,31 @@
, %5B%22mpg%22
+, %22mpeg%22, %22mp4%22
%5D):%0A%09%09ti
|
77d8f11277e3b006c9f9137a35291892a73156f2 | format python code | alexBot/cogs/games_reposting.py | alexBot/cogs/games_reposting.py | import logging
from typing import Dict
import discord
from discord import PartialEmoji
from discord.ext import commands
from discord.message import Message
from discord.webhook import AsyncWebhookAdapter, WebhookMessage
from emoji_data import EmojiSequence
from ..tools import Cog
log = logging.getLogger(__name__)
... | Python | 0.000174 | @@ -33,17 +33,16 @@
t Dict%0A%0A
-%0A
import d
|
935f094d36ee3a800def4256a4acbf5c795e6071 | Fix a typo. | tensorflow_datasets/testing/mocking.py | tensorflow_datasets/testing/mocking.py | # coding=utf-8
# Copyright 2019 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | Python | 0.999999 | @@ -3158,17 +3158,16 @@
files w
-h
ere not
|
cdb7c87fd133b6e99916919b525e9d277a3913dd | Fix a typo. | libcloud/test/compute/test_ikoula.py | libcloud/test/compute/test_ikoula.py | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | Python | 0.999957 | @@ -971,16 +971,14 @@
ass
-Exoscale
+Ikoula
Node
|
8c70752c87eb0519150e7cf17b146c97847b1460 | add new preview-graylog ip to reversedns.py | modules/nagios/files/reversedns.py | modules/nagios/files/reversedns.py | #!/usr/bin/env python
import socket
import sys
if sys.argv[1] == "ip-10-236-86-54.eu-west-1.compute.internal":
print "frontend.production.alphagov.co.uk"
exit(0)
if sys.argv[1] == "ip-10-250-157-37.eu-west-1.compute.internal":
print "static.production.alphagov.co.uk"
exit(0)
if sys.a... | Python | 0 | @@ -1212,16 +1212,63 @@
nternal'
+, 'ip-10-32-31-104.eu-west-1.compute.internal'
%5D:%0A
|
56c95eff825b58798515c619a101a2435e5d136f | Disable NaCl inbrowser_crash_in_syscall_test | chrome/test/nacl_test_injection/buildbot_nacl_integration.py | chrome/test/nacl_test_injection/buildbot_nacl_integration.py | #!/usr/bin/python
# Copyright (c) 2011 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.
import os
import subprocess
import sys
def Main(args):
pwd = os.environ.get('PWD', '')
is_integration_bot = 'nacl-chrome' in pwd
... | Python | 0.000408 | @@ -2817,16 +2817,242 @@
%5D)%0A%0A
+ # TODO(mcgrathr): Reenable when resolved.%0A # Was seen to fail repeatedly on Windows.%0A # http://code.google.com/p/nativeclient/issues/detail?id=2173%0A tests_to_disable.append('run_inbrowser_crash_in_syscall_test')%0A%0A
if sys
|
0b6f693bd00f01d7e4ff576690bb1a5880fb80d7 | Bump version number | VMEncryption/main/Common.py | VMEncryption/main/Common.py | #!/usr/bin/env python
#
# VM Backup extension
#
# Copyright 2015 Microsoft Corporation
#
# 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
#
# ... | Python | 0.000002 | @@ -798,17 +798,17 @@
.0.99914
-1
+2
'%0A ex
|
b5b4c1f5b72494e00064b36f2ee1c53d1b5c2aca | Revert 83430 - NaCl: Re-enable tests, since they pass on the trybotsBUG=noneTEST=nacl_integrationReview URL: http://codereview.chromium.org/6904067 TBR=mseaborn@chromium.org Review URL: http://codereview.chromium.org/6902132 | chrome/test/nacl_test_injection/buildbot_nacl_integration.py | chrome/test/nacl_test_injection/buildbot_nacl_integration.py | #!/usr/bin/python
# Copyright (c) 2011 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.
import os
import subprocess
import sys
def Main():
script_dir = os.path.dirname(os.path.abspath(__file__))
test_dir = os.path.dir... | Python | 0.000001 | @@ -231,16 +231,560 @@
Main():%0A
+ # TODO(ncbray): figure out why this is failing on windows and enable.%0A if (sys.platform in %5B'win32', 'cygwin'%5D and%0A 'xp-nacl-chrome' not in os.environ.get('PWD', '')): return%0A # TODO(ncbray): figure out why this is failing on mac and re-enable.%0A if (sys.platform... |
bbfa0b6fc8e4bb851528084d147ee898fd5af06a | fix path issues | experimentator/__main__.py | experimentator/__main__.py | """experimentator
Usage:
exp run [options] <exp-file> (--next <level> [--not-finished] | (<level> <n>)...)
exp resume [options] <exp-file> <level> [<n> (<level> <n>)...]
exp export <exp-file> <data-file>
exp -h | --help
exp --version
Options:
--not-finished Run the first <level> that hasn't finished... | Python | 0.000001 | @@ -1745,21 +1745,16 @@
mport os
-.path
%0Aimport
@@ -1965,16 +1965,105 @@
=None):%0A
+ # I can't figure out why but this is necessary.%0A sys.path.insert(0, os.getcwd())%0A%0A
sche
@@ -3853,67 +3853,4 @@
'%5D)%0A
-%0Aif __name__ == '__main__':%0A main(sys.argv)%0A sys.exit(0)%0A
|
ebad0c3f8cc65b372dee5aa2ef4ce41ec03986cd | use CallRecorder in locabuild tests | rhcephpkg/tests/test_localbuild.py | rhcephpkg/tests/test_localbuild.py | import os
import re
import pytest
from rhcephpkg import Localbuild
from rhcephpkg.localbuild import setup_pbuilder_cache
class TestLocalbuild(object):
def setup_method(self, method):
""" Reset last_cmd before each test. """
self.last_cmd = None
def fake_check_call(self, cmd):
""" Sto... | Python | 0 | @@ -118,293 +118,85 @@
che%0A
-%0A%0Aclass TestLocalbuild(object):%0A%0A def setup_method(self, method):%0A %22%22%22 Reset last_cmd before each test. %22%22%22%0A self.last_cmd = None%0A%0A def fake_check_call(self, cmd):%0A %22%22%22 Store cmd, in order to verify it later. %22%22%22%0A ... |
0bf63976303515d0702f0a29d14364825a67053a | use pid for msgid to avoid duplicate message error | mpcontribs-api/mpcontribs/api/notebooks/__init__.py | mpcontribs-api/mpcontribs/api/notebooks/__init__.py | # -*- coding: utf-8 -*-
from tornado.escape import json_encode, json_decode, url_escape
from websocket import create_connection
from notebook.utils import url_path_join
from notebook.gateway.managers import GatewayClient
def run_cells(kernel_id, cid, cells):
print(f"running {cid} on {kernel_id}")
gw_client = ... | Python | 0 | @@ -17,16 +17,26 @@
f-8 -*-%0A
+import os%0A
from tor
@@ -890,16 +890,30 @@
d%7D-%7Bidx%7D
+-%7Bos.getpid()%7D
%22,%0A
@@ -2436,11 +2436,8 @@
(%22-%22
-, 1
)%5B1%5D
|
abb28a62ae8bf6ca95e3cb4419abc6a1bf161f5b | Remove outdated notes | scopus/utils/get_content.py | scopus/utils/get_content.py | import os
import requests
from scopus import exception
from scopus.utils import config
errors = {400: exception.Scopus400Error, 401: exception.Scopus401Error,
404: exception.Scopus404Error, 429: exception.Scopus429Error,
500: exception.Scopus500Error}
def download(url, params=None, accept="xml")... | Python | 0.000002 | @@ -381,16 +381,17 @@
ontent.%0A
+%0A
Para
@@ -1098,255 +1098,8 @@
zed.
-%0A%0A Notes%0A -----%0A Loads the Authentication creditation into scopus namespace on first run.%0A If there is a config file, which must contain InstToken, it is given%0A preference. Alternatively it loads the API key from... |
d7a1b80659995b867c6e0d470a33fce8970ae7c7 | Clean up Last.fm scraper import lines | scrapers/examples/lastfm.py | scrapers/examples/lastfm.py | scheduler = globals()['scheduler']
def scrape_lastfm():
# Scraper config:
# Enter your own Last.fm username here.
USERNAME = 'trickybeta'
# Get your app's API key from http://www.last.fm/api/accounts.
API_KEY = 'c0ffeecafefacade'
# Tracks to retrieve per page request. Max 200.
# Recommend... | Python | 0 | @@ -565,16 +565,17 @@
config%0A
+%0A
impo
@@ -589,16 +589,17 @@
ections%0A
+%0A
impo
|
b8fd3a256062a5f7740480bb5b844560e3a47f6d | Add more log on test_versioning | nuxeo-drive-client/nxdrive/tests/test_versioning.py | nuxeo-drive-client/nxdrive/tests/test_versioning.py | import time
from nxdrive.tests.common import TEST_WORKSPACE_PATH
from nxdrive.tests.common import OS_STAT_MTIME_RESOLUTION
from nxdrive.tests.common_unit_test import UnitTestCase
class TestVersioning(UnitTestCase):
def test_versioning(self):
# Call the Nuxeo operation to set the versioning delay to 30 s... | Python | 0 | @@ -173,16 +173,90 @@
estCase%0A
+from nxdrive.logging_config import get_logger%0A%0Alog = get_logger(__name__)%0A
%0A%0Aclass
@@ -2056,46 +2056,206 @@
-time.sleep(self.versioning_delay + 2.0
+log.debug(%22wait for %25d to end the versioning grace%22, (self.versioning_delay + 2.0))%0A time.sleep(self.ve... |
a1f11605660836c87c47c3f272b4f8471f831eb8 | e.message is depracted | mopidy/frontends/mpd/dispatcher.py | mopidy/frontends/mpd/dispatcher.py | import logging
import re
from pykka import ActorDeadError
from pykka.registry import ActorRegistry
from mopidy import settings
from mopidy.backends.base import Backend
from mopidy.frontends.mpd import exceptions
from mopidy.frontends.mpd.protocol import mpd_commands, request_handlers
# Do not remove the following imp... | Python | 0.999054 | @@ -4902,16 +4902,8 @@
or(e
-.message
)%0A%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.