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 |
|---|---|---|---|---|---|---|---|
4501d32134bbed4c7a7616f51e74bf6c4444c96f | Fix too long line in soc.views.models.sponsor module. | app/soc/views/models/sponsor.py | app/soc/views/models/sponsor.py | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange 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... | Python | 0.000001 | @@ -1938,32 +1938,65 @@
LinkIdAsScope',
+%0A
host_logic)%5D%0A
|
50b1e27fd0d3ae2dfff74e271b86d2a7147b2b03 | fix bug in user permission view | shuup/admin/modules/users/views/permissions.py | shuup/admin/modules/users/views/permissions.py | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django import forms
... | Python | 0.000001 | @@ -4822,24 +4822,97 @@
uperuser%22):%0A
+ if field not in self.cleaned_data:%0A continue%0A%0A
|
c8976b0bc61f08b6dc50194b62abb4d82ef70301 | version bump | mhcflurry/version.py | mhcflurry/version.py | __version__ = "1.4.1"
| Python | 0.000001 | @@ -12,11 +12,11 @@
= %221.4.
-1
+2
%22%0A
|
a2753124d89689dcfd3f90e050417d38a17bdd60 | Fix redis caching when multiple GitDox instances share a Redis instance | modules/redis_cache.py | modules/redis_cache.py | import redis
r = redis.Redis()
GITDOX_PREFIX = "__gitdox"
SEP = "|"
REPORT = "report"
TIMESTAMP = "timestamp"
def make_key_base(doc_id, validation_type):
"""Keys for this cache have the form, e.g., __gitdox|123|ether|report
This function formats the first three pieces of this string."""
if validation_type... | Python | 0 | @@ -1,20 +1,86 @@
import
-redis
+os%0Aimport platform%0Aimport redis%0Afrom modules.configobj import ConfigObj
%0A%0Ar = re
@@ -171,16 +171,382 @@
stamp%22%0A%0A
+if platform.system() == %22Windows%22:%0A prefix = %22transc%5C%5C%22%0Aelse:%0A prefix = %22%22%0Arootpath = os.path.dirname(os.path.dirna... |
5ddae0e29591c1fd4afa2cd08c73168868a4721e | Handle bad certificate dates and other issues. | modules/sfp_sslcert.py | modules/sfp_sslcert.py | # -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# Name: sfp_sslcert
# Purpose: Gather information about SSL certificates behind HTTPS sites.
#
# Author: Steve Micallef <steve@binarypool.com>
#
# Created: 23/08/2013
# Copyright: (c) Steve ... | Python | 0 | @@ -5688,32 +5688,49 @@
f, cert, sevt):%0A
+ try:%0A
exp = in
@@ -5801,16 +5801,20 @@
+
+
expstr =
@@ -5880,16 +5880,20 @@
%25M:%25S%22)%0A
+
@@ -5923,16 +5923,20 @@
+
warnexp
@@ -5980,16 +5980,146 @@
* 86400
+%0A except ValueError as e:%0A ... |
72df22e62806e64e05b3bbb6eca0efd958c7c8bb | make btcnet_wrapper fail in a more instructive manner | btcnet_wrapper.py | btcnet_wrapper.py | from git import Repo
try:
repo = Repo("btcnet_info")
except:
repo = Repo.init("btcnet_info")
repo = repo.clone("git://github.com/c00w/btcnet_info.git")
origin = repo.create_remote('origin', 'git://github.com/c00w/btcnet_info.git')
origin = repo.remotes.origin
origin.fetch()
origin.pull('master')
... | Python | 0.000001 | @@ -313,16 +313,25 @@
ster')%0A%0A
+try:%0A
import b
@@ -341,8 +341,118 @@
et_info%0A
+except:%0A print 'Install pythongit! See the readme for detailed instructions'%0A import os%0A os._exit(2)%0A
|
1ac423e9127631eeb78868c47cf6fee12bf36a12 | Fix bug in handling get/post, should work now | test_utils/middleware/testmaker.py | test_utils/middleware/testmaker.py | from django.conf import settings
from django.test import Client
from django.test.utils import setup_test_environment
import logging, re
from django.utils.encoding import force_unicode
log = logging.getLogger('testmaker')
print "Loaded Testmaker Middleware"
#Remove at your own peril
debug = getattr(settings, 'DEBUG', ... | Python | 0 | @@ -876,24 +876,49 @@
if r.context
+ and r.status_code != 404
:%0A
@@ -1170,17 +1170,17 @@
for di
-c
+k
t in req
@@ -1218,17 +1218,17 @@
rg in di
-c
+k
t:%0A
@@ -1261,14 +1261,13 @@
'%25s'
-,
%22 %25
+(
arg,
@@ -1287,16 +1287,17 @@
EST%5Barg%5D
+)
%0A requ
@@ -2105,17 +2105,26 @@
ept
-... |
46268cb2cf5e4570ef3e08440291e802d9e16b05 | Fix variable name conflict | modules/networking/page.py | modules/networking/page.py | import http.client
import socket
import subprocess
import tempfile
import urllib
from nemubot import __version__
from nemubot.exception import IRCException
from nemubot.tools import web
def load(CONF, add_hook):
# check w3m exists
pass
def headers(url):
"""Retrieve HTTP header for the given URL
Ar... | Python | 0.00001 | @@ -2788,18 +2788,16 @@
_, head
-er
s = head
@@ -2944,18 +2944,16 @@
in head
-er
s:%0A
|
e4a5dd51829df198a07232afc06afdff6089ae6c | fix wmt datatype checking (#1259) | parlai/tasks/wmt/agents.py | parlai/tasks/wmt/agents.py | #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
fr... | Python | 0 | @@ -437,14 +437,11 @@
, dt
-=''
):%0A
+
@@ -497,68 +497,8 @@
pt)%0A
- if dt == '':%0A dt = opt%5B'datatype'%5D.split(':')%5B0%5D%0A
@@ -738,43 +738,32 @@
-task = opt.get('task', 'wmt:
+self.task_name = '
en_de'
-)
%0A
@@ -771,71 +771,42 @@
-self.task_name = task.split(':')%5B1%... |
542bb81e68975d52c23fa3829233cbff9ead39a7 | Use json for PUT | mnubo/api_manager.py | mnubo/api_manager.py | import requests
import json
import base64
import datetime
def authenticate(func):
def authenticate_and_call(*args):
if not args[0].is_access_token_valid():
args[0].access_token = args[0].fetch_access_token()
return func(*args)
return authenticate_and_call
class APIManager(object)... | Python | 0.000002 | @@ -2929,17 +2929,16 @@
aders)%0A%0A
-%0A
@aut
@@ -3296,28 +3296,28 @@
ts.put(url,
-data
+json
=body, heade
|
226b27ad6e66c7d512ce6cad300b7f96de5ccfa7 | Introduce cache feature to GoogleDrive base logic. | model/googledrive.py | model/googledrive.py | # -*- encoding:utf8 -*-
import os
import httplib2
from oauth2client.client import SignedJwtAssertionCredentials
from apiclient.discovery import build
class GoogleDrive(object):
@classmethod
def retrieve_content(cls, **kwargs):
document_id = kwargs.get('document_id')
export_type = kwargs.get(... | Python | 0 | @@ -144,16 +144,46 @@
t build%0A
+from model.cache import Cache%0A
%0A%0Aclass
@@ -544,32 +544,161 @@
return None%0A%0A
+ # Check document cache exists%0A content = Cache().get(document_id)%0A if content:%0A return content%0A%0A
try:%0A
@@ -1586,16 +1586,103 @@
wnload... |
2ab36d3f98a3b909801b557df39742ef3a09d561 | Remove unused flag on autodiscover and handle_translation_registrations() | modeltrans/models.py | modeltrans/models.py |
def autodiscover(create_virtual_fields=True):
'''
Auto-discover INSTALLED_APPS translation.py modules and fail silently when
not present. This forces an import on them to register.
Also import explicit modules.
'''
import os
import sys
import copy
from django.utils.module_loading i... | Python | 0 | @@ -16,34 +16,8 @@
ver(
-create_virtual_fields=True
):%0A
@@ -368,94 +368,8 @@
or%0A%0A
- if not create_virtual_fields:%0A translator.disable_create_virtual_fields()%0A%0A
@@ -2080,34 +2080,8 @@
ons(
-create_virtual_fields=True
):%0A
@@ -2819,27 +2819,6 @@
ver(
-create_virtual_fields
)%0A
|
4c4499dcb86ae16a7d3822feab4390adca89d348 | Bump version to 0.12.1 | pingparsing/__version__.py | pingparsing/__version__.py | # encoding: utf-8
from datetime import datetime
__author__ = "Tsuyoshi Hombashi"
__copyright__ = "Copyright {}, {}".format(datetime.now().year, __author__)
__license__ = "MIT License"
__version__ = "0.12.0"
__maintainer__ = __author__
__email__ = "tsuyoshi.hombashi@gmail.com"
| Python | 0 | @@ -200,17 +200,17 @@
= %220.12.
-0
+1
%22%0A__main
|
0b94543d605ad64149faa6df2e3d8bf2e4b5c08c | remove print statement | plots/gender_by_country.py | plots/gender_by_country.py | from __future__ import print_function
from collections import OrderedDict
import csv
import numpy as np
import pandas
import world_countries as wc
from bokeh.models import HoverTool, ColumnDataSource
from bokeh.plotting import figure
from bokeh.resources import CDN
from bokeh.embed import autoload_static
import os
de... | Python | 0.999999 | @@ -1680,26 +1680,8 @@
))%5D%0A
- print(colors)%0A
|
12995be9490bde60c92e6f962b748832c083fe45 | use API and HTTP HEAD instead | modules/subreddit.py | modules/subreddit.py | import re
import urllib.request as req
class SubredditModule:
subre = re.compile(r"^(?:.* )?/r/([A-Za-z0-9][A-Za-z0-9_]{2,20})")
def __init__(self, circa):
self.circa = circa
self.events = {
"message": [self.findsub]
}
def findsub(self, fr, to, msg, m):
for sub in self.subre.findall(msg):
url = "htt... | Python | 0 | @@ -31,16 +31,45 @@
t as req
+%0Aimport urllib.error as err
%0A%0Aclass
@@ -336,22 +336,41 @@
%0A%09%09%09
-url =
+try:%0A%09%09%09%09r = req.Request(
%22http://
www.
@@ -369,11 +369,11 @@
p://
-www
+api
.red
@@ -389,24 +389,61 @@
/%22 + sub
-%0A%09%09%09try:
+ + %22.json%22)%0A%09%09%09%09r.get_method = la... |
06f7a1d99156ae64ab70aab84dcdcf902d85b676 | update keys() | mongoext/document.py | mongoext/document.py | from __future__ import absolute_import
import weakref
from . import scheme
class FieldDescriptor(object):
def __init__(self, field):
self.field = field
self.data = weakref.WeakKeyDictionary()
def __get__(self, instance, owner):
return self.data[instance]
def __set__(self, insta... | Python | 0 | @@ -3840,20 +3840,13 @@
urn
-(k for k in
+iter(
self
|
c1e84bd196f28c35b032a609a3edb5f596216f71 | fix for document.iter | mongoext/document.py | mongoext/document.py | from __future__ import absolute_import
import collections
import mongoext.collection
import mongoext.scheme
import mongoext.exc
class MetaDocument(type):
def __new__(cls, name, bases, attrs):
fields = {}
for base in bases:
for name, obj in vars(base).iteritems():
if i... | Python | 0.000001 | @@ -37,28 +37,8 @@
rt%0A%0A
-import collections%0A%0A
impo
@@ -1215,16 +1215,22 @@
lf, name
+, None
)%0A%0A d
|
cd60e12bb8858fb242264ffdb8b17f115836c767 | Use shlex for command splitting. | zoocli/cli.py | zoocli/cli.py | import os
import atexit
import warnings
import readline
import traceback
from zoocli.args import Args
from zoocli.config import config
from zoocli.exceptions import UnknownCommand, CLIException
from zoocli.zookeeper import ZooKeeper
from zoocli.completer import Completer
from zoocli.paths import ROOT_PATH, format_path... | Python | 0 | @@ -3,16 +3,29 @@
port os%0A
+import shlex%0A
import a
@@ -1611,22 +1611,27 @@
ute(
+shlex.split(
command
-.split(
))%0A
|
15c2595e126689d184a5de52b8f209b4e3e6eb67 | add a test for json | zq_gen/str.py | zq_gen/str.py | '''
Helper functions for string related operation
'''
import unittest
def cmd_str2dic(cmd_str):
words = cmd_str.split()
rst = {}
if len(words) >= 1:
begin = 0;
if words[0][0:1] != '-': # the first one could be the the name of the command
rst['cmd_name'] = words[0]... | Python | 0.000023 | @@ -419,32 +419,61 @@
quoted = False%0A
+ curly_braced = False%0A
for word
@@ -544,18 +544,8 @@
#
- currently
exp
@@ -687,16 +687,180 @@
rd%5B:-1%5D%0A
+ elif curly_braced: # expecting the reverse curly brace%0A if word.endswith('%7D'):%0A ... |
8bbb160cc742fa04c7aace678afa0d226c0d1407 | fix sample script | resources/examples/ClickToCall.py | resources/examples/ClickToCall.py | import string, cgi, time, thread
import sys, urllib, urllib2
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
number1 = ""
number2 = ""
listeningPort = 8081
listeningIp = "127.0.0.1"
bluescaleIp = "127.0.0.1"
bluescalePort = 8080
class MyHandler(BaseHTTPRequestHandler):
def do_GET(self)... | Python | 0.000001 | @@ -2021,16 +2021,28 @@
%22Url%22 :
+ %22http://%22 +
(listen
|
7cd3c0449b05e75ffbe5ba346bab3ff389f63b9d | clean up map_async_bench | tests/benchmark/map_async_bench.py | tests/benchmark/map_async_bench.py | import threading
import random
import time
import logging
import sys
from os.path import dirname
sys.path.append(dirname(dirname(dirname(__file__))))
import hazelcast
REQ_COUNT = 20000
ENTRY_COUNT = 10 * 1000
VALUE_SIZE = 10000
GET_PERCENTAGE = 40
PUT_PERCENTAGE = 40
logging.basicConfig(format='%(asctime)s%(msecs... | Python | 0.000018 | @@ -177,17 +177,17 @@
COUNT =
-2
+5
0000%0AENT
@@ -692,20 +692,8 @@
ct):
-%0A ops = 0
%0A%0A
@@ -702,22 +702,21 @@
def
-get_cb
+__init__
(self
-, _
):%0A
@@ -723,36 +723,74 @@
self.ops
-+
=
-1
+0%0A self.event = threading.Event()
%0A%0A def put_cb
@@ -783,22 +783,20 @@
def
-pu... |
8dd0a904d2572c5d2368a78401c8b935d197b532 | use the full network name in prefixes | plugins/relay_clientbot.py | plugins/relay_clientbot.py | # relay_clientbot.py: Clientbot extensions for Relay
import string
from pylinkirc import utils, conf, world
from pylinkirc.log import log
default_styles = {'MESSAGE': '\x02[$colored_netname]\x02 <$colored_nick> $text',
'KICK': '\x02[$colored_netname]\x02 -$colored_nick$identhost has kicked $target_n... | Python | 0.000006 | @@ -3062,16 +3062,186 @@
guser%5B0%5D
+%0A try: # Try to get the full network name%0A netname = conf.conf%5B'servers'%5D%5Bnetname%5D%5B'netname'%5D%0A except KeyError:%0A pass
%0A%0A
|
29315213a8503de018a76badc71da3737d2b54c7 | Fix spiffsgen example test | examples/storage/spiffsgen/example_test.py | examples/storage/spiffsgen/example_test.py | from __future__ import print_function
import os
import hashlib
import ttfw_idf
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
def test_examples_spiffsgen(env, extra_data):
# Test with default build configurations
dut = env.get_dut('spiffsgen', 'examples/storage/spiffsgen', dut_class=ttfw_idf.ESP32DUT)... | Python | 0 | @@ -599,16 +599,25 @@
t.read()
+.rstrip()
)%0A%0A #
|
7c762733311c6a52f0a7605a9495f8234c1d6ff2 | put portLo..Hi as arg | predictor/server/server.py | predictor/server/server.py | #!/usr/bin/python
import sys
from datetime import datetime
from server_thread import ServerThread as Server
from config import serverConfig as scfg
def main():
if len(sys.argv)!=2:
print 'USAGE: phyton prediction_server.py [serverId]'
return
serverId = sys.argv[1]
if serverId not in scfg[... | Python | 0.000001 | @@ -105,48 +105,8 @@
rver
-%0Afrom config import serverConfig as scfg
%0A%0Ade
@@ -112,16 +112,20 @@
ef main(
+argv
):%0A i
@@ -145,9 +145,9 @@
v)!=
-2
+4
:%0A
@@ -204,16 +204,34 @@
erverId%5D
+ %5BportLo%5D %5BportHi%5D
'%0A
@@ -248,192 +248,95 @@
-serverId = sys.argv%5B1%5D%0A if serverId ... |
87ca8475f58b057e8043f8b398bd76123a89a733 | Revert "parsing html" | moz/minutes/helpers.py | moz/minutes/helpers.py | #!/usr/bin/env python
# encoding: utf-8
"""
helpers.py
Some modules to help with this project
Created by Karl Dubost on 2016-02-24.
Copyright (c) 2016 La Grange. All rights reserved.
MIT License
"""
import io
import sys
import lxml.html
import requests
def fetch_content(uri):
'''Fetch the URI and returns the ... | Python | 0 | @@ -197,48 +197,8 @@
%0A%22%22%22
-%0A%0Aimport io%0Aimport sys%0A%0Aimport lxml.html
%0Aimp
@@ -210,18 +210,16 @@
equests%0A
-%0A%0A
def fetc
@@ -335,16 +335,16 @@
et(uri)%0A
+
retu
@@ -381,210 +381,8 @@
ing%0A
-%0A%0Adef html_parse(content):%0A '''returns a parsed HTML content'''%0A html = ''%0A t... |
2158f0049134fb044c7d8606bb63a0c64cfacbf5 | fix cancelling jobs on a subqueue | mrq/basetasks/utils.py | mrq/basetasks/utils.py | from __future__ import print_function
from future.utils import itervalues
from future.builtins import str
from mrq.task import Task
from mrq.queue import Queue
from bson import ObjectId
from mrq.context import connections, get_current_config, get_current_job
from mrq.job import set_queues_size
from collections import d... | Python | 0.000001 | @@ -4011,16 +4011,59 @@
%22queue%22%5D
+ and isinstance(query%5B%22queue%22%5D, basestring)
:%0A
|
90b75ba76c5f98abf3d6484cc9c51119042b7812 | Fix issues with the tethys manage sync command. | tethys_apps/cli/manage_commands.py | tethys_apps/cli/manage_commands.py | """
********************************************************************************
* Name: manage_commands.py
* Author: Nathan Swain
* Created On: 2015
* Copyright: (c) Brigham Young University 2015
* License: BSD 2-Clause
********************************************************************************
"""
import os... | Python | 0 | @@ -3513,62 +3513,69 @@
pps.
-utilities import sync_tethys_db%0A sync_tethys_db
+harvester import SingletonHarvester%0A harvester.harvest
()%0A%0A
|
c5a548730064acfaa6fa81c0754a3fa8976b014f | update commands for django | suarm/server/project.py | suarm/server/project.py | from __future__ import unicode_literals
import os
import click
import sys
from fabric.api import *
from fabric.contrib.files import upload_template, exists
from ..server.config import (
get_project_src, make_user, make_app, get_user_home)
class Project(object):
@staticmethod
def config_settings():
... | Python | 0.000001 | @@ -263,16 +263,124 @@
object):
+%0A python = %22DJANGO_SETTINGS_MODULE=config.settings.production ./env/bin/python%22%0A pip = %22./env/bin/pip%22
%0A%0A @s
@@ -654,124 +654,8 @@
%22%22%22
-%0A python = %22DJANGO_SETTINGS_MODULE=config.settings.production ./env/bin/python%22%0A pip = %22./en... |
a123663004f96e845659be019c2e5970cfa2be98 | use tempfile instead of /tmp | thinc/linear/tests/test_avgtron.py | thinc/linear/tests/test_avgtron.py | from __future__ import division
import pytest
import pickle
import io
from thinc.linear.avgtron import AveragedPerceptron
from thinc.extra.eg import Example
def assert_near_eq(float1, float2):
assert abs(float1 - float2) < 0.001
def test_basic():
nr_class = 3
model = AveragedPerceptron(((1,), (2,), (3... | Python | 0.000001 | @@ -63,16 +63,32 @@
mport io
+%0Aimport tempfile
%0A%0Afrom t
@@ -3801,25 +3801,26 @@
c =
-'/tmp/test_model'
+tempfile.mkdtemp()
%0A
|
8ecc26cffabb5a4c80b9a5574b102cc5c63312d3 | Update accounts.py | myuw/views/accounts.py | myuw/views/accounts.py | from myuw.views.page import page
from myuw.util.page_view import page_view
@page_view
def accounts(request):
return page(request, {}, template='accounts.html') | Python | 0.000001 | @@ -158,8 +158,9 @@
s.html')
+%0A
|
affb8417c7592158fbfd62c4cd49608a368ccabf | Switch update flag for full flag | nap/dataviews/views.py | nap/dataviews/views.py |
from collections import defaultdict
from inspect import classify_class_attrs
from django.db.models.fields import NOT_PROVIDED
from django.forms import ValidationError
from django.utils.functional import cached_property
from .fields import field
from .utils import DictObject
class DataView(object):
def __init__... | Python | 0 | @@ -1020,16 +1020,8 @@
pply
-(update)
usi
@@ -1059,40 +1059,8 @@
view
-%0A%0A Note: sets update=True
%0A
@@ -1104,21 +1104,8 @@
ther
-, update=True
)%0A%0A
@@ -1365,22 +1365,20 @@
, data,
-update
+full
=False):
@@ -1453,22 +1453,19 @@
If
-update is Fals
+full is Tru
e, a
@@ -1883,31 +1883,25 @@... |
9eebf1d43b93a6e1001186693d3a15ce2b5d568e | Add Bank and BankAccount models, add some fields to Supplier model | nbs/models/supplier.py | nbs/models/supplier.py | # -*- coding: utf-8 -*-
from nbs.models import db
from nbs.models.entity import Entity
from nbs.models.misc import FiscalDataMixin
class Supplier(Entity, FiscalDataMixin):
__tablename__ = 'supplier'
__mapper_args__ = {'polymorphic_identity': u'supplier'}
supplier_id = db.Column(db.Integer, db.ForeignKey... | Python | 0 | @@ -268,376 +268,2080 @@
-supplier_id = db.Column(db.Integer, db.ForeignKey('entity.id'),%0A primary_key=True)%0A name = Entity._name_1%0A fancy_name = Entity._name_2%0A%0A payment_term = db.Column(db.Integer)%0A%0A @property%0A def full_name(self):%0A fn = u%22 (%... |
e1a7262bc4fc841b95ee6fb45c1bb0da5cc3f2c1 | add an option for fallback style in vimrc | tools/clang-format/clang-format.py | tools/clang-format/clang-format.py | # This file is a minimal clang-format vim-integration. To install:
# - Change 'binary' if clang-format is not on the path (see below).
# - Add to your .vimrc:
#
# map <C-I> :pyf <path-to-this-file>/clang-format.py<cr>
# imap <C-I> <c-o>:pyf <path-to-this-file>/clang-format.py<cr>
#
# The first line enables clang-fo... | Python | 0.000099 | @@ -1468,16 +1468,140 @@
= 'file'
+%0Aif vim.eval('exists(%22g:clang_format_fallback_style%22)') == %221%22:%0A fallback_style = vim.eval('g:clang_format_fallback_style')
%0A%0Adef ma
@@ -2382,16 +2382,93 @@
ursor)%5D%0A
+ if fallback_style:%0A command.extend(%5B'-fallback-style', fallback_style%5D)%0A
if vi... |
f57294c59e197c989536638776738b0ed0bcee1d | disable scheduler.tough_pepper_cases | tools/perf/benchmarks/scheduler.py | tools/perf/benchmarks/scheduler.py | # Copyright 2014 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.
from telemetry import benchmark
from measurements import smoothness
import page_sets
class SchedulerToughSchedulingCases(benchmark.Benchmark):
"""Measure... | Python | 0.000031 | @@ -690,16 +690,23 @@
', 'win'
+, 'mac'
) # crb
|
4fb1ad11add4436395f775a12f0d4e90b99d6594 | add ignore filtering | psutil_mon/psutil_alarm.py | psutil_mon/psutil_alarm.py |
#
# Hubblemon - Yet another general purpose system monitor
#
# Copyright 2015 NAVER Corp.
#
# 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
#
# U... | Python | 0.000001 | @@ -1201,16 +1201,115 @@
ey, k):%0A
+%09%09%09%09if 'IGNORE' in v:%0A%09%09%09%09%09if fnmatch.fnmatch(key, v%5B'IGNORE'%5D): # skip IGNORE case%0A%09%09%09%09%09%09continue%0A
%09%09%09%09retu
@@ -1315,14 +1315,9 @@
urn
-map%5Bk%5D
+v
%0A%0A%09%09
|
58a1a3f014387c5358f08b8706a91a18c07bae68 | remove print, change subject | pubsublogger/subscriber.py | pubsublogger/subscriber.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
:mod:`subscriber` -- Subscribe to a redis channel and gather logging messages.
To use this module, you have to define at least a channel name.
"""
import redis
from logbook import Logger
import ConfigParser
from logbook import NestedSetup, NullHandler, FileHandler, Mail... | Python | 0.000001 | @@ -2391,23 +2391,44 @@
-print from_mail
+subject = 'Error in %7B%7D'.format(name)
%0A
@@ -2606,16 +2606,37 @@
t_mails,
+ subject,%0A
level='
@@ -2642,28 +2642,16 @@
'ERROR',
-%0A
bubble=
|
7a66989b62d1776e72229ac36c0ed77235549b1d | Add a data timeout to ensure that we aren't blocked waiting on data for a connection that the pusher server does not think exists. This occurs when the network cable has been unplugged for an extended period of time and then reconnected. | pusherclient/connection.py | pusherclient/connection.py | import websocket
try:
import simplejson as json
except:
import json
from threading import Thread
import time
import logging
CONNECTION_EVENTS_NEW = [
'initialized',
'connecting',
'connected',
'unavailable',
... | Python | 0 | @@ -98,17 +98,24 @@
t Thread
+, Timer
%0A
-
import t
@@ -1301,16 +1301,664 @@
Level)%0A%0A
+ # From Martyn's comment at: https://pusher.tenderapp.com/discussions/problems/36-no-messages-received-after-1-idle-minute-heartbeat%0A # %22We send a ping every 5 minutes in an attempt to keep connections %0... |
5cd9499fcc0c1f9b48216aeca11a7adcd8995a47 | Fix for MRV failing to enter enable mode | netmiko/mrv/mrv_ssh.py | netmiko/mrv/mrv_ssh.py | """MRV Communications Driver (OptiSwitch)."""
from __future__ import unicode_literals
import time
import re
from netmiko.cisco_base_connection import CiscoSSHConnection
class MrvOptiswitchSSH(CiscoSSHConnection):
"""MRV Communications Driver (OptiSwitch)."""
def session_preparation(self):
"""Prepare ... | Python | 0 | @@ -433,22 +433,31 @@
self.
-enable
+set_base_prompt
()%0A
@@ -460,39 +460,30 @@
self.
-set_base_prompt
+enable
()%0A s
@@ -608,16 +608,47 @@
factor)%0A
+ self.set_base_prompt()%0A
|
a813f7dc391834d695b513ec6acd0dede49291de | Add text and path to FileNotFound exception. | pyedgar/utilities/forms.py | pyedgar/utilities/forms.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Utilities for interacting with edgar forms.
"""
import os
import re
import logging
from . import plaintext
from .htmlparse import RE_HTML_TAGS, convert_html_to_text, html_ent_re_sub
from .. import exceptions as EX
__logger = logging.getLogger(__name__)
RE_DOC_TAG_OP... | Python | 0 | @@ -1941,16 +1941,61 @@
NotFound
+(%22File %7B%7D does not exist.%22.format(file_path))
%0A%0A wi
|
d24a8db471cc9a415e3e2081e702199990bd6ac4 | Add option to configure plot's linewidth | pyexperiment/utils/plot.py | pyexperiment/utils/plot.py | """Provides setup for matplotlib figures
Written by Peter Duerr.
"""
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
import matplotlib
from matplotlib import pyplot as plt
def setup_matplotlib(font_size=14,
... | Python | 0.000001 | @@ -374,16 +374,50 @@
tex=True
+,%0A linewidth=2
):%0A %22
@@ -718,16 +718,64 @@
use_tex)
+%0A matplotlib.rc('lines', linewidth=linewidth)
%0A%0A la
|
9c40fa22c395b3d1dba800f0826606ecf314ddb2 | test update | apps/pypi/tests/test_slurper.py | apps/pypi/tests/test_slurper.py | from django.template.defaultfilters import slugify
from django.test import TestCase
from package.models import Package, Version
from pypi.slurper import Slurper
TEST_PACKAGE_NAME = 'Django'
TEST_PACKAGE_VERSION = '1.2.5'
TEST_PACKAGE_REPO_NAME = 'django-uni-form'
class SlurpAllTests(TestCase):
def t... | Python | 0.000001 | @@ -215,11 +215,9 @@
'1.
-2.5
+3
'%0ATE
|
fe797b35d4e9b3f623d60b42f38efe3bf9ac3705 | test para vistas de charlas | apps/votos/tests/tests_views.py | apps/votos/tests/tests_views.py | # -*- coding: utf-8 -*-
import unittest
from test_plus.test import TestCase
from ..factories.user import UserFactory
class ViewsTestCase(TestCase):
def setUp(self):
self.user = UserFactory()
def test_posibles_eventos(self):
self.get('index')
self.response_200()
def test_agend... | Python | 0 | @@ -113,16 +113,115 @@
Factory%0A
+from ..factories.charla import CharlaFactory%0A%0Afrom .. import constants%0Afrom ..models import Charla%0A
%0A%0Aclass
@@ -319,16 +319,13 @@
est_
-posibles
+index
_eve
@@ -1026,312 +1026,8 @@
e)%0A%0A
- @unittest.expectedFailure%0A def test_fail_post_registrar_charla(self... |
fe3bb9440a46ae626c9bfd34882f3ad5823d7396 | drop unnecessary conn assignment | python/libvirt-override.py | python/libvirt-override.py | #
# Manually written part of python bindings for libvirt
#
# On cygwin, the DLL is called cygvirtmod.dll
try:
import libvirtmod
except ImportError, lib_e:
try:
import cygvirtmod as libvirtmod
except ImportError, cyg_e:
if str(cyg_e).count("No module named"):
raise lib_e
import ... | Python | 0 | @@ -474,245 +474,8 @@
):%0A%0A
- if dom is not None:%0A conn = dom._conn%0A elif net is not None:%0A conn = net._conn%0A elif pool is not None:%0A conn = pool._conn%0A elif vol is not None:%0A conn = vol._conn%0A%0A
|
a961e11c5b3666f2504cf2a0d46028b5957cb9bf | Fix doctest | qnet/misc/testing_tools.py | qnet/misc/testing_tools.py | """Collection of routines needed for testing. This includes proto-fixtures,
i.e. routines that should be imported and then turned into a fixture with the
pytest.fixture decorator.
See <https://pytest.org/latest/fixture.html>
"""
import os
from glob import glob
from collections import OrderedDict
from distutils import ... | Python | 0.000002 | @@ -718,32 +718,38 @@
net.misc.testing
+_tools
%0A %3E%3E%3E datadir
@@ -775,32 +775,38 @@
net.misc.testing
+_tools
.datadir)%0A ''
@@ -1419,16 +1419,75 @@
.testing
+_tools%0A %3E%3E%3E from qnet.misc.testing_tools import qsd_traj
%0A %3E%3E%3E
@@ -1529,16 +1529,22 @@
.testing
+_tools
.datadir
|
f18e26b37f06ff1d591b51351da07fca6c3c3d00 | Enable gzip | rnacentral/rnacentral/settings.py | rnacentral/rnacentral/settings.py | # Django settings for rnacentral project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', ... | Python | 0.000002 | @@ -3310,24 +3310,69 @@
CLASSES = (%0A
+ 'django.middleware.gzip.GZipMiddleware',%0A
'django.
|
a6b49b92bd942655c0fe9a1c745e53ea19e070b5 | create a new django custom tag to replace a substring in a global string | src/alfanous-django/wui/templatetags/custom_filters.py | src/alfanous-django/wui/templatetags/custom_filters.py | '''
Created on Dec 29, 2012
@author: assem
'''
from django.template import Library
register = Library()
@register.filter
def get_range( value ):
""" make a range from a number starting of 1 """
return range( 1, value + 1 )
@register.filter
def space_split( str ):
""" split a string counting on spaces """
r... | Python | 0.000777 | @@ -332,16 +332,205 @@
plit()%0A%0A
+%0A@register.simple_tag%0Adef string_replace( string, oldword, newword ):%0A %22%22%22 replace all occurrences of oldword in string by newword %22%22%22%0A return string.replace( oldword, newword )%0A%0A%0A
@registe
@@ -1135,16 +1135,17 @@
rams )%0A%0A
+%0A
def buil
|
65e412bae8fed010048815f1ab0007aae2a214af | refactor report format to return array of the issue format | mythril/analysis/report.py | mythril/analysis/report.py | """This module provides classes that make up an issue report."""
import logging
import json
import operator
from jinja2 import PackageLoader, Environment
import _pysha3 as sha3
import hashlib
from mythril.solidity.soliditycontract import SolidityContract
from mythril.analysis.swc_data import SWC_TO_TITLE
from mythril.... | Python | 0.000006 | @@ -5736,16 +5736,17 @@
esult =
+%5B
%7B%0A
@@ -5930,32 +5930,33 @@
%22: %7B%7D,%0A %7D
+%5D
%0A%0A return
|
728cfe8e3c40ecd4e0128030d1d66864816626c8 | use single pipe to avoid problems with Jenkins reading them concurrently (#552) | ros_buildfarm/catkin_workspace.py | ros_buildfarm/catkin_workspace.py | # Copyright 2014-2016 Open Source Robotics Foundation, 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 applicabl... | Python | 0 | @@ -2631,16 +2631,25 @@
ss.call(
+%0A
cmd, cwd
@@ -2675,10 +2675,36 @@
ell=True
+, stderr=subprocess.STDOUT
)%0A
|
61ae89684c8eb916823d7a54ae4278df00e64459 | Update plugin to v1.2.0 compatibility | flexget/plugins/metainfo/assume_quality.py | flexget/plugins/metainfo/assume_quality.py | from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import register_plugin, priority, PluginError
from collections import namedtuple
import logging
import flexget.utils.qualities as qualities
log = logging.getLogger('assume_quality')
class AssumeQuality(object):
"""
Applies... | Python | 0 | @@ -64,74 +64,8 @@
ort%0A
-from flexget.plugin import register_plugin, priority, PluginError%0A
from
@@ -153,16 +153,75 @@
ualities
+%0Afrom flexget import plugin%0Afrom flexget.event import event
%0A%0Alog =
@@ -3139,32 +3139,39 @@
except: raise
+plugin.
PluginError('%25s
@@ -3304,16 +3304,23 @@
: raise
+... |
8369d189e822fa7496864cac4ddc906bf7c05fe3 | Convert gaphor/UML/classes/tests/test_interface.py to pytest | gaphor/UML/classes/tests/test_interface.py | gaphor/UML/classes/tests/test_interface.py | """Test classes."""
from gaphor import UML
from gaphor.tests import TestCase
from gaphor.UML.classes.interface import Folded, InterfaceItem
class InterfaceTestCase(TestCase):
def test_interface_creation(self):
"""Test interface creation."""
iface = self.create(InterfaceItem, UML.Interface)
... | Python | 0.999999 | @@ -41,42 +41,8 @@
UML%0A
-from gaphor.tests import TestCase%0A
from
@@ -108,16 +108,20 @@
%0A%0Aclass
+Test
Interfac
@@ -125,26 +125,8 @@
face
-TestCase(TestCase)
:%0A
@@ -155,24 +155,30 @@
reation(self
+, case
):%0A %22
@@ -215,36 +215,36 @@
iface =
+ca
se
-lf
.create(Interfac
@@ -368,16... |
43cd47077b60ecb70b73883b635b9b06a7f873ac | add check against double redirects | glottolog3/scripts/check_db_consistency.py | glottolog3/scripts/check_db_consistency.py | #!/usr/bin/env python
# check_db_consistency.py - test for some application-specific db invariants
import itertools
import sqlalchemy as sa
import six
from clld.scripts.util import parsed_args
from clld.db.meta import DBSession
from glottolog3.models import Languoid, LanguoidLevel, LanguoidStatus,\
TreeClosureT... | Python | 0 | @@ -223,16 +223,50 @@
BSession
+%0Afrom clld.db.models import Config
%0A%0Afrom g
@@ -3752,16 +3752,578 @@
d.id)%0A%0A%0A
+class RefRedirects(Check):%0A %22%22%22Redirects of reference ids target an unredirected id.%22%22%22%0A%0A def invalid_query(self, session):%0A return session.query(%0A ... |
03734b5f42a448e20f5926dd6ffc24cc40dc004e | Remove unused methods | src/foremast/pipeline/construct_pipeline_block_datapipeline.py | src/foremast/pipeline/construct_pipeline_block_datapipeline.py | # Foremast - Pipeline Tooling
#
# Copyright 2016 Gogo, 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
#
# Unless required... | Python | 0.000034 | @@ -765,36 +765,8 @@
port
- generate_encoded_user_data,
get
|
a842439edb47524b64345d3a893199f3b92f2b14 | Fix top-level domain extraction from site name. | google_analytics/templatetags/analytics.py | google_analytics/templatetags/analytics.py | from django import template
from django.db import models
from django.contrib.sites.models import Site
from django.template import Context, loader
register = template.Library()
Analytics = models.get_model('google_analytics', 'analytic')
def do_get_analytics(parser, token):
try:
# split_contents() knows ... | Python | 0 | @@ -1494,16 +1494,17 @@
it('.')%5B
+-
2:%5D)%0A
|
0d2f35ddc27cf4c7155a4d1648c0bbfe0ff3a528 | Fix the bool name in the array API namespace | numpy/_array_api/dtypes.py | numpy/_array_api/dtypes.py | from .. import int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64, bool
__all__ = ['int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64', 'float32', 'float64', 'bool']
| Python | 0.99996 | @@ -82,17 +82,69 @@
float64
-,
+%0A# Note: This name is changed%0Afrom .. import bool_ as
bool%0A%0A_
|
ff611c4a41cdbaf9b3306650a3d1bc4177b23bad | Update sst.py | banpei/sst.py | banpei/sst.py | import numpy as np
from banpei.base.model import Model
class SST(Model):
def __init__(self):
pass
def _extract_matrix(self, data, start, end, w):
row = w
column = end - start + 1
matrix = np.empty((row, column))
i = 0
for t in range(start, end+1):
m... | Python | 0.000001 | @@ -110,290 +110,8 @@
ss%0A%0A
- def _extract_matrix(self, data, start, end, w):%0A row = w%0A column = end - start + 1%0A matrix = np.empty((row, column))%0A i = 0%0A for t in range(start, end+1):%0A matrix%5B:, i%5D = data%5Bt-1:t-1+row%5D%0A i += 1%0A%0A ... |
ff268941bfc588e21a2f460c034e3c0a99837d23 | Fix migration order (post-rebase) | migrations/versions/201502111317_233928da84b2_create_video_conference_rooms.py | migrations/versions/201502111317_233928da84b2_create_video_conference_rooms.py | """Create video conference rooms
Revision ID: 233928da84b2
Revises: 50c2b5ee2726
Create Date: 2015-02-11 13:17:44.365589
"""
import sqlalchemy as sa
from alembic import op
from indico.core.db.sqlalchemy import PyIntEnum
from indico.core.db.sqlalchemy import UTCDateTime
from indico.modules.vc.models.vc_rooms import VC... | Python | 0 | @@ -470,27 +470,27 @@
ion = '5
-0c2b5ee2726
+583f647dff5
'%0A%0A%0Adef
|
d7cf4b8becbb0176872f0fc3feceaa097147ab9c | Update poly_dynamo.py | grassroot-nlu/databases/poly_dynamo.py | grassroot-nlu/databases/poly_dynamo.py | from __future__ import print_function
import boto3
import json
import decimal
from boto3.dynamodb.conditions import Key, Attr
from botocore.exceptions import ClientError
class DynamoDB(object):
def db_find(self, table):
x = []
for i in table.find():
x.append(i)
return x
de... | Python | 0.000001 | @@ -442,23 +442,16 @@
ne(self,
- table,
doc):%0A
@@ -468,21 +468,25 @@
ate_new(
-table
+'entries'
, doc)%0A
@@ -5295,8 +5295,9 @@
leansed)
+%0A
|
63c3a302d32ca85148703642d618a4f8c5f50f83 | update debug settings | PhotoManagementSystem/PhotoManagementSystem/settings.py | PhotoManagementSystem/PhotoManagementSystem/settings.py | """
Django settings for PhotoManagementSystem project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""... | Python | 0.000001 | @@ -902,16 +902,59 @@
OSTS = %5B
+%0A 'localhost',%0A 'pmsys.sinaapp.com',%0A
%5D%0A%0A%0A# Ap
|
071a2840fa6d7cbdb679c9564260ccc1dbe54559 | Handle the case where there can be a blank line between a decorator and the function definition. | djangae/contrib/security/commands_utils.py | djangae/contrib/security/commands_utils.py | import re, inspect
from django.core.exceptions import ViewDoesNotExist
from django.core.urlresolvers import RegexURLPattern, RegexURLResolver
def extract_views_from_urlpatterns(urlpatterns, base='', namespace=None, ignored_modules=None):
"""
Return a list of views from a list of urlpatterns.
Each object ... | Python | 0 | @@ -4649,122 +4649,495 @@
-while k.startswith('@'):%0A decorators.append(k.strip().split('(')%5B0%5D)%0A j += 1
+# decorators can be defined on the previous line(s), but can have blank lines before them%0A # blank lines are '%5Cn', hence we strip() them to see ... |
bf13f5403dc505ec93b44e2861dc6ce53ffde9b7 | Update rv_transformation_tests.py | GPy/testing/rv_transformation_tests.py | GPy/testing/rv_transformation_tests.py | # Written by Ilias Bilionis
"""
Test if hyperparameters in models are properly transformed.
"""
import unittest
import numpy as np
import scipy.stats as st
import GPy
class TestModel(GPy.core.Model):
"""
A simple GPy model with one parameter.
"""
def __init__(self, theta=1.):
GPy.core.Model.... | Python | 0.000002 | @@ -2164,16 +2164,33 @@
omize()%0A
+ print(m)%0A
|
8d40cd3dab606d558806fa00b0ed5df73c457045 | Fix for issue #2. | bgui/frame.py | bgui/frame.py | from .gl_utils import *
from .widget import Widget, BGUI_DEFAULT
class Frame(Widget):
"""Frame for storing other widgets"""
theme_section = 'Frame'
theme_options = {
'Color1': (0, 0, 0, 0),
'Color2': (0, 0, 0, 0),
'Color3': (0, 0, 0, 0),
'Color4': (0, 0, 0, 0),
'BorderSize': 0,
'BorderColor... | Python | 0 | @@ -1336,32 +1336,58 @@
ound the frame.%0A
+%09%09if border is not None:%0A%09
%09%09self.border =
@@ -1396,23 +1396,33 @@
rder
- if
+%0A%09%09else:%0A%09%09%09self.
border
-else
+=
sel
|
7a0560d8bd9dcb421b54522df92618d439941e69 | Change bill detail page to use session and identifier | bills/urls.py | bills/urls.py | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^by_topic/', views.bill_list_by_topic),
url(r'^by_location', views.bill_list_by_location),
url(r'^latest_activity/', views.latest_bill_activity),
url(r'^latest/', views.latest_bill_actions),
url(r'^detail/(?P<bill_id>(.*))/... | Python | 0 | @@ -308,10 +308,41 @@
ill_
-id
+session%3E(.*))/(?P%3Cbill_identifier
%3E(.*
|
14e2d2282b7c95a1bb6d475faa6d827d90609e16 | Define PostAdmin list_display. | blog/admin.py | blog/admin.py | from django.contrib import admin
from .models import Post
admin.site.register(Post)
| Python | 0 | @@ -57,19 +57,16 @@
st%0A%0A
+%0A@
admin.
-site.
regi
@@ -76,8 +76,84 @@
r(Post)%0A
+class PostAdmin(admin.ModelAdmin):%0A list_display = ('title', 'pub_date')%0A
|
0d389018353f03d79332a1b40d6dc1881df91cd0 | Fix sorting of items in RSS feed | blog/views.py | blog/views.py | from django.contrib.syndication.views import Feed
from django.utils.feedgenerator import Atom1Feed
from .models import BlogIndexPage, BlogPage, BlogCategory
from django.shortcuts import get_object_or_404
from django.conf import settings
def tag_view(request, tag):
index = BlogIndexPage.objects.first()
return ... | Python | 0 | @@ -1226,16 +1226,48 @@
ndants()
+.order_by('-first_published_at')
%5B:num%5D%0A%0A
|
3e2cbd52a916b767473335427702ecf3bae5a51d | create dir if image_filter not exist | CapturePictures.py | CapturePictures.py | #!/usr/bin/env python
import cv2
import sys
import argparse
def capturePicturesByCamera(num = 300, saveDir = "./image_filter/"):
"""
Capture pictures with faces detected.
Args:
num (int): The number of pictures to capture. Default: 300.
saveDir (str): The directory to save the captured p... | Python | 0.000008 | @@ -38,10 +38,9 @@
ort
-sy
+o
s%0Aim
@@ -2239,24 +2239,112 @@
rse_args()%0A%0A
+ if not os.path.exists(%22./image_filter%22):%0A os.makedirs('image_filter/after')%0A%0A
# Start
|
d9f623baaa8e1d1075f9132108ed7bb11eea39b0 | Replace dask.get from core.get to async.get_sync | dask/__init__.py | dask/__init__.py | from __future__ import absolute_import, division, print_function
from .core import istask, get
from .context import set_options
try:
from .imperative import do, value
except ImportError:
pass
__version__ = '0.7.3'
| Python | 0 | @@ -87,13 +87,8 @@
task
-, get
%0Afro
@@ -117,16 +117,50 @@
options%0A
+from .async import get_sync as get
%0Atry:%0A
|
de4f02fff4b23a442abe3062c2da4c52d8823627 | Fix spurious deprecation warning for fatal_warnings (#6237) | src/python/pants/backend/jvm/subsystems/zinc_language_mixin.py | src/python/pants/backend/jvm/subsystems/zinc_language_mixin.py | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import object
from pants.base.deprecated import deprecated
class ZincLan... | Python | 0 | @@ -2430,16 +2430,30 @@
nd self.
+get_options().
fatal_wa
|
93b752a251b43c268a6becb53ab298e958a46aeb | add Category Field in template | awesomepose/posts/forms/post.py | awesomepose/posts/forms/post.py | from django import forms
from django_summernote.widgets import SummernoteWidget, SummernoteInplaceWidget
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Layout, Field, Fieldset, Button
from crispy_forms.bootstrap import (
PrependedText, PrependedAppendedText, FormActions)
from po... | Python | 0 | @@ -18,16 +18,66 @@
t forms%0A
+from django.forms import ModelMultipleChoiceField%0A
from dja
@@ -262,16 +262,21 @@
, Button
+, Div
%0Afrom cr
@@ -364,73 +364,249 @@
ns)%0A
-%0Afrom posts.models import Post%0A%0A%0Aclass PostForm(forms.ModelForm):
+from mptt.forms import TreeNodeChoiceField%0A%0Afrom posts.models ... |
33b3f10de563f2871ac00b113fe1ec9507e62c17 | Update ChatterBot.py | Cogs/ChatterBot.py | Cogs/ChatterBot.py | import asyncio
import discord
import time
import requests
import urllib
import os
from aiml import Kernel
from os import listdir
from discord.ext import commands
from Cogs import Nullify
from pyquery import PyQuery as pq
from Cogs import FuzzySearch
class ChatterBot:
# Init with the bot reference, and a reference to... | Python | 0 | @@ -4157,14 +4157,15 @@
%09%0A%09%09
+#
try:%0A
-%09
%09%09me
@@ -4210,16 +4210,19 @@
rip()%0A%09%09
+'''
except E
@@ -4307,24 +4307,27 @@
%22)%0A%09%09%09return
+'''
%0A%0A%09%09msg = se
|
8a26eddf5c8d0913f15722a59542cd1dccfbbad4 | fix reference to instance var | Conficat/Config.py | Conficat/Config.py | #!/usr/bin/env python
"""
Conficat internal configuration class
"""
import os
import re
import sys
import logging
from Cheetah.ImportHooks import install as cheetah_import_install
from TemplateRegistry import TemplateRegistry
from CSVDataSource import CSVDataSource
from ConfigError import ConfigError
class Config(obj... | Python | 0.000001 | @@ -823,16 +823,21 @@
%22%22%22%0A
+self.
data.loa
|
ad2944a49b357494ff09a729b468f2fb19934909 | remove vertically-aligned assignments, per PEP8 | guestbook/__init__.py | guestbook/__init__.py | # coding: utf-8
import shelve
from datetime import datetime
from flask import Flask, request, render_template, redirect, escape, Markup
application = Flask(__name__)
DATA_FILE = 'guestbook.dat'
def save_data(name, comment, create_at):
database = shelve.open(DATA_FILE)
if 'greeting_list' not in database:
... | Python | 0.000006 | @@ -958,21 +958,16 @@
name
-
= reques
@@ -997,18 +997,16 @@
comment
-
= reques
|
90689c38f7b76b47df1b8259aa14e3c0b604f233 | Fix netdata system_load and add disk_free. (#9091) | homeassistant/components/sensor/netdata.py | homeassistant/components/sensor/netdata.py | """
Support gathering system information of hosts which are running netdata.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.netdata/
"""
import logging
from datetime import timedelta
from urllib.parse import urlsplit
import requests
import volupt... | Python | 0 | @@ -1510,28 +1510,22 @@
tem.
-processes', 'running
+load', 'load15
', 2
@@ -1798,16 +1798,83 @@
t', 0%5D,%0A
+ 'disk_free': %5B'Disk Free', 'GiB', 'disk_space._', 'avail', 2%5D,%0A
%7D%0A%0APLATF
|
1c6a2f87ebd75d69857590ec3918d65ee6468b81 | Add link to docs | homeassistant/components/feedreader.py | homeassistant/components/feedreader.py | """RSS/Atom feed reader for Home Assistant."""
from datetime import datetime
from logging import getLogger
import voluptuous as vol
from homeassistant.helpers.event import track_utc_time_change
REQUIREMENTS = ['feedparser==5.2.1']
_LOGGER = getLogger(__name__)
DOMAIN = "feedreader"
EVENT_FEEDREADER = "feedreader"
# py... | Python | 0 | @@ -1,11 +1,24 @@
%22%22%22
+%0ASupport for
RSS/Atom
@@ -26,35 +26,136 @@
feed
- reader for Home Assistant.
+.%0A%0AFor more details about this component, please refer to the documentation at%0Ahttps://home-assistant.io/components/feedreader/%0A
%22%22%22%0A
|
f6efb0ff31ae8d0db5682cd7ad5b0921e3a4e924 | Bump version for new release. | openstack_auth/__init__.py | openstack_auth/__init__.py | # following PEP 386
__version__ = "1.0.6"
| Python | 0 | @@ -32,11 +32,11 @@
= %221.0.
-6
+7
%22%0A
|
8da7edb1311b73013dcf497c293212df5e0041c7 | use new nfw potential | ophiuchus/potential/oph.py | ophiuchus/potential/oph.py | # coding: utf-8
# cython: boundscheck=False
# cython: nonecheck=False
# cython: cdivision=True
# cython: wraparound=False
# cython: profile=False
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Third-party
from gala.units import galactic
from gala.potential import (CCo... | Python | 0.000001 | @@ -403,25 +403,16 @@
ential,
-Flattened
NFWPoten
@@ -417,16 +417,16 @@
ential)%0A
+
%0A# Proje
@@ -1071,25 +1071,16 @@
tential.
-Flattened
NFWPoten
@@ -1474,11 +1474,9 @@
0.,
-q_z
+c
=0.9
@@ -1713,32 +1713,33 @@
for k,
+
v in default_dis
@@ -1909,32 +1909,33 @@
for k,
+
v in default... |
a66ff915dcaee3e1db370196a3b40b612eb43d19 | Add support to template_name_suffix in get_template_names methods | opps/views/generic/list.py | opps/views/generic/list.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.list import ListView as DjangoListView
from django.contrib.sites.models import get_current_site
from django.utils import timezone
from django.conf import settings
from opps.views.generic.base import View
from opps.containers.models import Contain... | Python | 0 | @@ -624,16 +624,131 @@
'list'%0A%0A
+ if self.template_name_suffix:%0A list_name = %22%7B%7D%7B%7D%22.format(list_name, self.template_name_suffix)%0A%0A
|
7a99ade694c5844727ca33461dd3ad5271b61f14 | Improve q_n tests. | hic/test/test_flow.py | hic/test/test_flow.py | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
from .. import flow
def test_qn():
assert flow.qn(2, 0) == 1+0j, \
'Single-particle q_n.'
assert np.allclose(flow.qn(3, np.arange(-np.pi, np.pi, 10)), -1+0j), \
'Isotropic q_n.'
def test_flow_cumulant():
pass
| Python | 0.000012 | @@ -109,21 +109,44 @@
_qn(
-):%0A assert
+seed=1248):%0A # q_n(0) = 1%0A q =
flo
@@ -155,16 +155,29 @@
qn(2, 0)
+%0A assert q
== 1+0j
@@ -193,9 +193,19 @@
'
-S
+Incorrect s
ingl
@@ -222,111 +222,628 @@
q_n
-.'%0A%0A assert np.allclose(flow.qn(3, np.arange(-np.pi, np.pi, 10)), -1+0j), %5C%0A ... |
7c10feeed640f4d1a66bb3207ade980733409ad9 | improve unit test | witica/test_source.py | witica/test_source.py | # coding=utf-8
import os
import unittest
import pkg_resources
from witica.source import Source, SourceItemList
from witica.log import *
from witica.metadata import extractor
class TestSourceItemList(unittest.TestCase):
def setUp(self):
Logger.start(verbose=False)
self.resource_path = pkg_resources.resource_fi... | Python | 0.000002 | @@ -595,16 +595,52 @@
rs = %5B%5D%0A
+%09%09pkg_resources.cleanup_resources()%0A
%09%09Logger
@@ -644,24 +644,25 @@
ger.stop()%0A%0A
+%0A
%09def test_ma
@@ -1158,16 +1158,100 @@
tems))%0A%0A
+%09def test_item_exists(self):%0A%09%09self.assertTrue(self.source.items%5B%22simple%22%5D.exists)%0A%0A
%0Aclass F
|
1b7e6d41a6832ef7a8f9dafe0cd8580356f8e9da | check regex match before access in flickr module | mygpo/data/flickr.py | mygpo/data/flickr.py | #
# This file is part of gpodder.net.
#
# my.gpodder.org is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# my.gpodder.org is d... | Python | 0 | @@ -1090,28 +1090,17 @@
)$'%0A
-resp_content
+m
= re.ma
@@ -1120,25 +1120,48 @@
e, resp)
-.group(1)
+%0A if not m:%0A return %5B%5D
%0A%0A re
@@ -1184,20 +1184,18 @@
ads(
-resp_content
+m.group(1)
)%0A%0A
|
de257f7b1703d0df3da24d475c52bfb4292a9d8b | correctly sort _futureevents | myhdl/_Simulation.py | myhdl/_Simulation.py | # This file is part of the myhdl library, a Python package for using
# Python as a Hardware Description Language.
#
# Copyright (C) 2003-2008 Jan Decaluwe
#
# The myhdl library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as
# published by t... | Python | 0.999998 | @@ -1040,16 +1040,48 @@
port os%0A
+from operator import itemgetter%0A
from war
@@ -5156,16 +5156,33 @@
ts.sort(
+key=itemgetter(0)
)%0A
|
963481958af78655e02a5d7d01e156f9b6ee506e | Correct HStoreField code | hs_core/hydro_realtime_signal_processor.py | hs_core/hydro_realtime_signal_processor.py | from django.db import models
from haystack.signals import RealtimeSignalProcessor
from haystack.exceptions import NotHandled
import logging
import types
from haystack.query import SearchQuerySet
from haystack.utils import get_identifier
logger = logging.getLogger(__name__)
class HydroRealtimeSignalProcessor(Realtime... | Python | 0.000041 | @@ -1097,16 +1097,80 @@
eAccess%0A
+ from django.contrib.postgres.fields import HStoreField%0A%0A
%0A
@@ -3945,49 +3945,45 @@
el
-se: # could be extended metadata element
+if isinstance(instance, HStoreField):
%0A
|
81d01175a7403b3e627738056ef9436e8172e51e | Enforce python 3.6 | shared_infra/lambdas/common/setup.py | shared_infra/lambdas/common/setup.py | import os
from setuptools import find_packages, setup
def local_file(name):
return os.path.relpath(os.path.join(os.path.dirname(__file__), name))
SOURCE = local_file('src')
setup(
name='wellcome_lambda_utils',
packages=find_packages(SOURCE),
package_dir={'': SOURCE},
version='1.0.0',
insta... | Python | 0.000187 | @@ -359,16 +359,18 @@
res='%3E=3
+.6
',%0A d
|
1eca1b11492b009990900a0e35dcf223ca22cffc | create .hokusai-tmp if not exists | hokusai/lib/config.py | hokusai/lib/config.py | import os
import sys
from collections import OrderedDict
import yaml
from packaging.specifiers import SpecifierSet, InvalidSpecifier
from packaging.version import Version, InvalidVersion
from hokusai import CWD
from hokusai.lib.constants import YAML_HEADER
from hokusai.lib.exceptions import HokusaiError
from hokusa... | Python | 0.000001 | @@ -648,16 +648,114 @@
bject):%0A
+ def __init__(self):%0A if not os.path.isdir(HOKUSAI_TMP_DIR):%0A os.mkdir(HOKUSAI_TMP_DIR)%0A%0A
def cr
|
3abe25d2272e2a0111511b68407da0ef3c53f59e | Use wizard settings during samba provision | nazs/samba/module.py | nazs/samba/module.py | from nazs import module
from nazs.commands import run
from nazs.sudo import root
import os
import logging
logger = logging.getLogger(__name__)
class Samba(module.Module):
"""
Samba 4 module, it deploys samba AD and file server
"""
ETC_FILE = '/etc/samba/smb.conf'
install_wizard = 'samba:instal... | Python | 0 | @@ -101,16 +101,52 @@
ogging%0A%0A
+from .models import DomainSettings%0A%0A
%0Alogger
@@ -501,32 +501,80 @@
ain%0A %22%22%22%0A
+ domain_settings = DomainSettings.get()%0A%0A
with roo
@@ -666,16 +666,65 @@
_FILE)%0A%0A
+ if domain_settings.mode == 'ad':%0A
@@ -774,2... |
2383497f25e400aa27c600d3a30526d118e2a6dc | fix scan, follow new scan chain | host/test_register.py | host/test_register.py | from scan.scan import ScanBase
class TestRegisters(ScanBase):
def __init__(self, config_file, definition_file = None, bit_file = None, device = None, scan_identifier = "test_register", scan_data_path = None):
super(TestRegisters, self).__init__(config_file = config_file, definition_file = definition_fi... | Python | 0 | @@ -439,100 +439,28 @@
ef s
-tart
+can
(self,
-configure = True):%0D%0A super(TestRegisters, self).start(configure)%0D%0A
+**kwargs):
%0D%0A
@@ -477,35 +477,35 @@
er_of_errors = s
-can
+elf
.register_utils.
@@ -637,27 +637,27 @@
f_errors = s
-can
+elf
.register_ut
@@ -781,19 +781,19 @@
sn = ... |
576a4b88637cf3bb9231ee3d2cbce75c547d934a | update error message to be within 80 chars | numba/core/funcdesc.py | numba/core/funcdesc.py | """
Function descriptors.
"""
from collections import defaultdict
import sys
from numba.core import types, itanium_mangler
from numba.core.utils import _dynamic_modname, _dynamic_module
def default_mangler(name, argtypes):
return itanium_mangler.mangle(name, argtypes)
def qualifying_prefix(modname, qualname):... | Python | 0 | @@ -3535,16 +3535,37 @@
ndError(
+%0A
f%22can't
@@ -3589,16 +3589,40 @@
lname%7D:
+%22%0A f%22
import o
|
63ed4199e5cb3f8eb9a6b294ac8c6df12f9b5f56 | Add last_request function to httprequest module | httpretty/__init__.py | httpretty/__init__.py | # #!/usr/bin/env python
# -*- coding: utf-8 -*-
# <HTTPretty - HTTP client mock for Python>
# Copyright (C) <2011-2013> Gabriel Falcão <gabriel@nacaolivre.org>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to d... | Python | 0.000002 | @@ -1661,8 +1661,63 @@
attr))%0A
+%0Adef last_request():%0A return httpretty.last_request%0A
|
2e4a934203b4d736a4180a970cacca508400ea7e | Update runcrons Command() to timezone.now() | django_cron/management/commands/runcrons.py | django_cron/management/commands/runcrons.py | from django.core.management.base import BaseCommand
from django.conf import settings
from django.core.cache import cache
from django_cron import CronJobManager
from datetime import datetime
from optparse import make_option
DEFAULT_LOCK_TIME = 15*60
def get_class( kls ):
"""TODO: move to django-common app.
C... | Python | 0.000001 | @@ -114,16 +114,49 @@
t cache%0A
+from django.utils import timezone
%0Afrom dj
@@ -1286,23 +1286,23 @@
name__,
-datetim
+timezon
e.now(),
|
abbe9b391ed32a07c5e912e3683ff7668e12eeb5 | bump to new version | octbrowser/__init__.py | octbrowser/__init__.py | __version__ = '0.4'
| Python | 0 | @@ -11,10 +11,12 @@
_ = '0.4
+.1
'%0A
|
f34a82735bb2d58effa2b8570ba69a67c7527ec9 | update to utilities | netmiko/utilities.py | netmiko/utilities.py | """Miscellaneous utility functions."""
from __future__ import print_function
from __future__ import unicode_literals
import sys
import io
import os
# Dictionary mapping 'show run' for vendors with different command
SHOW_RUN_MAPPER = {
'juniper': 'show configuration',
'juniper_junos': 'show configuration',
... | Python | 0 | @@ -1766,24 +1766,55 @@
iko.yml.%22%22%22%0A
+ base_file = '.netmiko.yml'%0A
check_fi
@@ -1829,30 +1829,25 @@
-'.netmiko.yml'
+base_file
,%0A
@@ -1876,29 +1876,29 @@
~') + '/
-.netmiko.yml'
+' + base_file
,%0A %5D%0A
@@ -2081,11 +2081,9 @@
r(%22%7B
-%7D f
+F
ile
@@ -2128,19 +2128,19 @@... |
5fb03068113ccdaebb2496f127146617f8931c02 | Add depth users to user summary | scripts/analytics/user_summary.py | scripts/analytics/user_summary.py | import pytz
import logging
from dateutil.parser import parse
from datetime import datetime, timedelta
from modularodm import Q
from website.app import init_app
from website.models import User
from scripts.analytics.base import SummaryAnalytics
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.IN... | Python | 0.00001 | @@ -186,17 +186,26 @@
ort User
+, NodeLog
%0A
-
from scr
@@ -327,16 +327,637 @@
.INFO)%0A%0A
+LOG_THRESHOLD = 11%0A%0A%0A# Modified from scripts/analytics/depth_users.py%0Adef count_user_logs(user):%0A logs = NodeLog.find(Q('user', 'eq', user._id))%0A length = logs.count()%0A if length %3E 0:%0A ite... |
ca77c9a91ea52334aca244abfd01c4595074eb04 | Fix PEP8 | tests/chainer_tests/functions_tests/loss_tests/test_triplet.py | tests/chainer_tests/functions_tests/loss_tests/test_triplet.py | import unittest
import numpy
import six
import chainer
from chainer import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
from chainer.testing import condition
@testing.parameterize(
*testing.product({
'batchsize': [5, 1... | Python | 0.000294 | @@ -205,46 +205,8 @@
ttr%0A
-from chainer.testing import condition%0A
%0A%0A@t
|
3582191d79646041ec589e2f1928c4cc560f5eaa | Add model, iOS, id to underlevel script. | scripts/my_export_accounts_csv.py | scripts/my_export_accounts_csv.py | #!/usr/bin/env python3
import csv
import sys
from datetime import datetime
from pathlib import Path
monocle_dir = Path(__file__).resolve().parents[1]
sys.path.append(str(monocle_dir))
from monocle.shared import ACCOUNTS
accounts_file = monocle_dir / 'accounts.csv'
try:
now = datetime.now().strftime("%Y-%m-%d-%... | Python | 0 | @@ -2776,32 +2776,54 @@
ord', 'provider'
+, 'model', 'iOS', 'id'
))%0A for a
|
0c1952c70358494cafcd5b6d2bbee31bdd1a5cb1 | update post code detector documentation | scrubadub/detectors/postalcode.py | scrubadub/detectors/postalcode.py | import re
from .base import RegionLocalisedRegexDetector
from ..filth.postalcode import PostalCodeFilth
class PostalCodeDetector(RegionLocalisedRegexDetector):
"""Detects british postcodes."""
filth_cls = PostalCodeFilth
name = 'postalcode'
region_regex = {
'GB': re.compile(r"""
(... | Python | 0 | @@ -171,17 +171,46 @@
Detects
-b
+postal codes, currently only B
ritish p
@@ -212,21 +212,36 @@
ish post
+
codes
+ are supported
.%22%22%22%0A
|
0f7505876a70be3942b938a4e2fdeb97918c5ad1 | version 0.9.0 | bulbs/__init__.py | bulbs/__init__.py | __version__ = "0.8.12"
| Python | 0.000002 | @@ -14,10 +14,9 @@
%220.
-8.12
+9.0
%22%0A
|
3a7798b46878e0938d1291642ec093cca34a7557 | Stop accessing self_fd direct and go through helper to enforce santify checks for eventfd | butter/eventfd.py | butter/eventfd.py | #!/usr/bin/env python
"""eventfd: maintain an atomic counter inside a file descriptor"""
from __future__ import print_function
from os import write as _write, read as _read, close as _close
from cffi import FFI as _FFI
import errno as _errno
_ffi = _FFI()
_ffi.cdef("""
#define EFD_CLOEXEC ...
#define EFD_NONBLOCK ..... | Python | 0 | @@ -3103,19 +3103,24 @@
te(self.
-_fd
+fileno()
, packed
@@ -3358,19 +3358,24 @@
ad(self.
-_fd
+fileno()
, 8)%0A
@@ -3571,151 +3571,28 @@
-if self._fd:%0A _close(self._fd)%0A self._fd = None%0A else:%0A raise ValueError(%22I/O operation on closed file%22
+_close(self... |
6eff7f5d614a89a298fd31f83e0a514193b1d73a | add plot for cot_globale | c2cstats/plots.py | c2cstats/plots.py | #!/usr/bin/env python2
# -*- coding:utf-8 -*-
import datetime
import string
import os.path
import numpy as np
import matplotlib.pyplot as plt
from collections import Counter
OUTPUT_DIR = "_output"
FILE_EXT = ".svg"
MONTHS = {u'janvier': 1, u'février': 2, u'mars': 3, u'avril': 4, u'mai': 5,
u'juin': 6, u'ju... | Python | 0.000002 | @@ -414,16 +414,189 @@
': 12%7D%0A%0A
+%0ACOTATION_GLOBALE = ('F', 'PD-', 'PD', 'PD+', 'AD-', 'AD', 'AD+', 'D-', 'D', 'D+',%0A 'TD-', 'TD', 'TD+', 'ED-', 'ED', 'ED+', 'ED4', 'ED5', 'ED6', 'ED7')%0A%0A%0A
def plot
@@ -689,16 +689,55 @@
ta.area)
+%0A plot_cot_globale(data.cot_globale)
%0A%0Adef ... |
59c9b7925d89e409e36ae15e3add38d2ded58692 | make modernize notice print_function import | custom/enikshay/management/commands/data_dumps_person_case.py | custom/enikshay/management/commands/data_dumps_person_case.py | from __future__ import (
absolute_import,
unicode_literals,
)
from __future__ import print_function
from corehq.apps.users.models import CommCareUser
from corehq.form_processor.interfaces.dbaccessors import CaseAccessors
from corehq.apps.es import queries
from custom.enikshay.case_utils import (
CASE_TYP... | Python | 0.000001 | @@ -16,22 +16,16 @@
import
-(%0A
absolute
@@ -31,21 +31,39 @@
e_import
-,%0A
+%0Afrom __future__ import
unicode
@@ -71,19 +71,16 @@
literals
-,%0A)
%0Afrom __
|
1d2ea0c72d8700687761125e4eaf90ec52f419be | Fix ORM call and add progress check | custom/icds_reports/management/commands/update_aadhar_date.py | custom/icds_reports/management/commands/update_aadhar_date.py | from __future__ import absolute_import, print_function
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from django.db import connections
from corehq.apps.locations.models import SQLLocation
from corehq.sql_db.routers import db_for_read_write
from custom.icds_reports.model... | Python | 0 | @@ -1130,16 +1130,21 @@
.values
+_list
('locati
@@ -1149,26 +1149,93 @@
tion_id'
-)%0A
+, flat=True)%0A )%0A count = 0%0A num_ids = len(supervisor_ids
)%0A%0A
@@ -1391,8 +1391,121 @@
up_id%7D)%0A
+ count += 1%0A%0A if count %25 100 == 0:%0A pr... |
e2d8a32590c0865b2a8339d86af4eb9b34ea5d20 | Update __init__.py | tendrl/node_agent/objects/cluster_message/__init__.py | tendrl/node_agent/objects/cluster_message/__init__.py | from tendrl.commons import etcdobj
from tendrl.commons.message import Message as message
from tendrl.commons import objects
class ClusterMessage(objects.BaseObject, message):
internal = True
def __init__(self, **cluster_message):
self._defs = {}
message.__init__(self, **cluster_message)
... | Python | 0.000072 | @@ -451,16 +451,92 @@
geEtcd%0A%0A
+ def save(self):%0A super(ClusterMessage, self).save(update=False)%0A%0A
class _C
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.