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 |
|---|---|---|---|---|---|---|---|
3b7328dd7d9d235bf32b3cfb836b49e50b70be77 | Allow for non-ascii characters in password_hash | oz/plugins/redis_sessions/__init__.py | oz/plugins/redis_sessions/__init__.py | from __future__ import absolute_import, division, print_function, with_statement, unicode_literals
import os
import binascii
import hashlib
import oz.app
from .middleware import *
from .options import *
from .tests import *
def random_hex(length):
"""Generates a random hex string"""
return binascii.hexlify(o... | Python | 0.000016 | @@ -498,16 +498,82 @@
_salt%22%5D%0A
+ salted_password = %22%22.join(%5Bunicode(password_salt), password%5D)%0A
retu
@@ -575,17 +575,16 @@
return
-u
%22sha256!
@@ -589,16 +589,24 @@
6!%25s%22 %25
+unicode(
hashlib.
@@ -616,49 +616,38 @@
256(
-unicode(password_salt) + unicode(password
+salted_password.e... |
03e905287732f2de7daf9ae6423de7e6b8a015d2 | Fix plugin handler. | rplugin/python3/cmake/__init__.py | rplugin/python3/cmake/__init__.py | import neovim
import json
from pathlib import Path
import subprocess
@neovim.plugin
class CMakeRTagsProject(object):
def __init__(self, vim):
self.vim = vim
if self.vim.vars.get("loaded_fzf") == 1:
self.selectionUI = "fzf"
else:
self.selectionUI = "location-list"
... | Python | 0 | @@ -61,16 +61,29 @@
bprocess
+%0Aimport cmake
%0A%0A@neovi
@@ -460,16 +460,55 @@
%7D%0A
+ self.util = CMakeRTagsPlugin()%0A
%0A%0A de
@@ -1564,24 +1564,34 @@
f):%0A
+self.util.
removeOldCMa
@@ -1663,16 +1663,26 @@
+self.util.
removeDi
@@ -1818,16 +1818,26 @@
+self.util... |
d514558e6f229abbd34392bf34235db8ebf1b0d9 | allow local users too | srv/salt/jupyterhub/jupyterhub_config.py | srv/salt/jupyterhub/jupyterhub_config.py | c.Authenticator.admin_users = {'{{ pillar.jupyterhub.admin_user }}',}
c.JupyterHub.confirm_no_ssl = True
c.JupyterHub.ip = '0.0.0.0'
c.JupyterHub.cookie_secret_file = '{{ zz.guest_cookie }}'
c.JupyterHub.proxy_auth_token = '{{ pillar.jupyterhub.proxy_auth_token }}'
c.JupyterHub.authenticator_class = 'oauthenticator.Git... | Python | 0 | @@ -255,24 +255,82 @@
h_token %7D%7D'%0A
+# Allow both local and GitHub users; Useful for bootstrap%0A
c.JupyterHub
@@ -368,16 +368,21 @@
ticator.
+Local
GitHubOA
|
af4963961f22367b5383101a46178770ccb6aad7 | fix bytes2frame test | gr-rstt/python/qa_bytes2frames.py | gr-rstt/python/qa_bytes2frames.py | #!/usr/bin/env python
from gnuradio import gr, gr_unittest, blocks
from rstt_swig import bytes2frames
class qa_bytes2frames(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_block ()
def tearDown(self):
self.tb = None
def do(self, data_src, data_exp, test_block):
src = bl... | Python | 0.000001 | @@ -749,32 +749,32 @@
(0x
-3D
+67
, 0x
-94
+3D
, ) + (0, )*
@@ -847,32 +847,50 @@
(0xff, 0x02,
+ 0x02, 0x00, 0x02,
) + (0, )*28%0A
@@ -877,33 +877,33 @@
x02, ) + (0, )*2
-8
+5
%0A data_ex
@@ -1198,16 +1198,16 @@
(0x
-3D
+67
, 0x
-94
+3D
, )
@@ -1292,24 +1292,42 @@
(0xff, 0x02,
+ 0x02... |
8f78194e7c11a43e79cbbd43830da053d959babf | remove lint | pymt/framework/bmi_docstring.py | pymt/framework/bmi_docstring.py | #! /usr/bin/env python
import jinja2
import six
from model_metadata import MetadataNotFoundError
from .bmi_metadata import PluginMetadata
# {{ desc|trim|wordwrap(70) if desc }}
_DOCSTRING = u"""
Basic Model Interface for {{ name }}.
{{ desc|trim if desc }}
{% if author -%}
Author:
{%- for name in author %}
{{"- " +... | Python | 0.000094 | @@ -41,16 +41,65 @@
ort six%0A
+from landlab.core.messages import format_message%0A
from mod
@@ -1154,59 +1154,8 @@
)%0A%0A%0A
-from landlab.core.messages import format_message%0A%0A%0A
def
|
03940d2cce7044c3e186b18727ad58563a5e6a98 | check the hostname on StatusReporter | tsuru/tests/plugins/test_status_reporter.py | tsuru/tests/plugins/test_status_reporter.py | # Copyright 2014 tsuru-circus 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 unittest
import mock
from tsuru.plugins import StatusReporter
class StatusReporterTestCase(unittest.TestCase):
def test_init(self):
s... | Python | 0 | @@ -156,16 +156,30 @@
file.%0A%0A
+import socket%0A
import u
@@ -310,32 +310,72 @@
est_init(self):%0A
+ hostname = socket.gethostname()%0A
status_r
@@ -637,32 +637,93 @@
_reporter.apprc)
+%0A self.assertEqual(hostname, status_reporter.hostname)
%0A%0A def test_i
|
45213bf399b4055102f439ba951977e9b9371df3 | Fix premature channel marker issue | lucidreader.py | lucidreader.py | # Module to parse raw LUCID data files
import os
from binascii import hexlify
import numpy as np
from datetime import datetime
import Image
def tohex(binary):
return hexlify(binary).upper()
def get_channel_id(marker):
if marker == "C1":
return 0
elif marker == "C2":
return 1
elif marker == "C4":
return 2
... | Python | 0.000001 | @@ -216,16 +216,30 @@
arker):%0A
+%09print marker%0A
%09if mark
@@ -1207,16 +1207,21 @@
own%22%0A%09%09%09
+self.
num_acti
@@ -1236,24 +1236,29 @@
tors = 3%0A%09%09%09
+self.
active_detec
@@ -2211,16 +2211,36 @@
ad(1)))%0A
+%09%09%09print channel_id%0A
%09%09%09pixel
@@ -2550,24 +2550,41 @@
%5By%5D = pixel%0A
... |
115a366eee7c9678c3488640f6a39b696db6ef5b | Add API endpoint for retrieving webhooks by name. | st2api/st2api/controllers/v1/webhooks.py | st2api/st2api/controllers/v1/webhooks.py | # Licensed to the StackStorm, Inc ('StackStorm') 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 th... | Python | 0 | @@ -856,24 +856,48 @@
ort
-pecan%0A
+six%0Aimport pecan%0Afrom pecan
import
-six
+abort
%0Afro
@@ -2363,16 +2363,208 @@
ooks)%5D%0A%0A
+ @jsexpose()%0A def get_one(self, name):%0A hook = self._hooks.get(name, None)%0A%0A if not hook:%0A abort(http_client.NOT_FOUND)%0A re... |
ce806001b0bc93d37faa3b255e907fb3d0a9bef6 | Fix doc for `numbered` arg with `TempPathFactory.mktemp` (#7014) | src/_pytest/tmpdir.py | src/_pytest/tmpdir.py | """ support for providing temporary directories to test functions. """
import os
import re
import tempfile
from typing import Optional
import attr
import py
import pytest
from .pathlib import ensure_reset_dir
from .pathlib import LOCK_TIMEOUT
from .pathlib import make_numbered_dir
from .pathlib import make_numbered_... | Python | 0 | @@ -2022,20 +2022,24 @@
If
+%60%60
True
+%60%60
, ensure
@@ -2081,16 +2081,18 @@
a number
+ed
%0A
@@ -2096,19 +2096,19 @@
-pre
+suf
fix grea
@@ -2149,16 +2149,17 @@
ame=%22foo
+-
%22%60%60 and
|
abc2b65fdad5095dc9c5aa9ec19ff26c61fe1020 | Fix find_resourceid_by_name call for address scopes | neutronclient/neutron/v2_0/subnetpool.py | neutronclient/neutron/v2_0/subnetpool.py | # Copyright 2015 OpenStack Foundation.
# 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 requ... | Python | 0.000016 | @@ -3109,33 +3109,33 @@
ient(), 'address
--
+_
scope',%0A
@@ -4860,25 +4860,25 @@
(), 'address
--
+_
scope',%0A
|
e01c990aa095b28cd72be14917fec4e8e5253729 | support specifying custom runner file name | atest/genrunner.py | atest/genrunner.py | #!/usr/bin/env python
"""Script to generate atest runners based on plain text data files.
Usage: %s path/to/data.txt
"""
from __future__ import with_statement
from os.path import abspath, basename, dirname, exists, join, splitext
import os
import sys
if len(sys.argv) != 2 or splitext(sys.argv[1])[1] != '.txt':
... | Python | 0 | @@ -100,24 +100,30 @@
%25s
+testdata/
path/
-to/
data.txt
%0A%22%22%22
@@ -122,51 +122,37 @@
.txt
-%0A%22%22%22%0A%0Afrom __future__ import with_statement
+ %5Brobot/path/runner.txt%5D%0A%22%22%22%0A
%0Afro
@@ -262,25 +262,61 @@
gv)
-!= 2 or splitext(
+not in %5B2, 3%5D or not all(a.endswith('.txt') for a in ... |
d4a4fd7fd5565276dabd7990721210bf9df6dd42 | fix busy cursor nesting | pyqtgraph/widgets/BusyCursor.py | pyqtgraph/widgets/BusyCursor.py | from ..Qt import QtGui, QtCore
__all__ = ['BusyCursor']
class BusyCursor(object):
"""Class for displaying a busy mouse cursor during long operations.
Usage::
with pyqtgraph.BusyCursor():
doLongOperation()
May be nested.
"""
active = []
def __enter__(self):
QtGui.... | Python | 0.000001 | @@ -464,33 +464,24 @@
-BusyCursor.active.pop(-1)
+if self._active:
%0A
@@ -489,15 +489,12 @@
-if len(
+
Busy
@@ -510,15 +510,16 @@
tive
-) == 0:
+.pop(-1)
%0A
|
9c9bce25526d82182f0924244db5f6a89283429e | comment styling for l10n_ch_sepa | l10n_ch_sepa/base_sepa/pain_001.py | l10n_ch_sepa/base_sepa/pain_001.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Yannick Vaucher
# Copyright 2011 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | Python | 0 | @@ -3595,16 +3595,17 @@
#
+
Check ea
|
bf8367367e8ff813d6c9b5ef205ce517edb62678 | fix download.py empty line, test=develop (#19870) | python/paddle/dataset/common.py | python/paddle/dataset/common.py | # Copyright (c) 2016 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 applic... | Python | 0 | @@ -1989,24 +1989,114 @@
save_name)%0A%0A
+ if os.path.exists(filename) and md5file(filename) == md5sum:%0A return filename%0A%0A
retry =
|
ea332cb3142986455de4c4992952a1df2541dad0 | Add __all__ attribute so help(phonenumbers) includes everything visible. | python/phonenumbers/__init__.py | python/phonenumbers/__init__.py | """Python phone number parsing and formatting library
Examples of use:
>>> import phonenumbers
>>> x = phonenumbers.parse("+442083661177", None)
>>> print x
Country Code: 44 National Number: 2083661177 Leading Zero: False
>>> type(x)
<class 'phonenumbers.phonenumber.PhoneNumber'>
>>> phonenumbers.format_number(x, pho... | Python | 0 | @@ -2728,16 +2728,1561 @@
niency%0A%0A
+__all__ = %5B'PhoneNumber', 'CountryCodeSource'%0A 'NumberFormat', 'PhoneNumberDesc', 'PhoneMetadata'%0A 'AsYouTypeFormatter',%0A 'COUNTRY_CODE_TO_REGION_CODE', 'SUPPORTED_REGIONS', 'UNKNOWN_REGION',%0A 'MatchType', 'NumberParseException',... |
7cc436d0c232a769168c86ee12c24b7a4a8b317d | Add proper exception for missing plugins | exdir/core/dataset.py | exdir/core/dataset.py | import os
import numpy as np
import exdir
from . import exdir_object as exob
def _prepare_write(data):
attrs = {}
meta = {}
for plugin in exdir.core.plugin.dataset_plugins:
data, plugin_attrs, plugin_meta = plugin.prepare_write(data)
attrs.update(plugin_attrs)
if plugin_meta["requ... | Python | 0.000003 | @@ -1995,16 +1995,17 @@
+(
%22Plugin
@@ -2038,10 +2038,8 @@
', %22
- +
%0A
@@ -2076,16 +2076,17 @@
nabled.%22
+)
.format(
@@ -2098,16 +2098,21 @@
n_name,
+self.
name)%0A
|
d8399ccccd8656beaf403925ab113209689ef1b0 | Fix mypy mistake | python/tests/t_headerrouting.py | python/tests/t_headerrouting.py | # import json
from typing import ClassVar
from kat.harness import variants, Query
from abstract_tests import AmbassadorTest, MappingTest, ServiceType, HTTP
class HeaderRoutingTest(MappingTest):
parent: AmbassadorTest
target: ServiceType
target2: ServiceType
weight: int
@classmethod
def vari... | Python | 0.000245 | @@ -2370,32 +2370,33 @@
est):%0A target
+1
: ServiceType%0A
|
f391b3bffb99a76631159e161b14b3d0303c4e5d | Add get_absolute_url methods in models | main/models.py | main/models.py | from django.db import models
from django.contrib.auth.models import User
from django.db.models import Sum
from django.core.validators import MinValueValidator, RegexValidator
class Group(models.Model):
name = models.CharField('название', max_length=100)
def __str__(self):
return self.name
class ... | Python | 0.000001 | @@ -168,16 +168,61 @@
lidator%0A
+from django.core.urlresolvers import reverse%0A
%0A%0Aclass
@@ -1043,16 +1043,107 @@
pend()%0A%0A
+ def get_absolute_url(self):%0A return reverse('user', args=%5Bself.user.username%5D)%0A%0A
def
@@ -2110,32 +2110,119 @@
e, blank=True)%0A%0A
+ def get_absolute_ur... |
3f6956bbed78b7d0240d14256d8b869c10bd50a6 | check if switch_key is valid before using it | experiments/models.py | experiments/models.py | from django.core.urlresolvers import reverse
from django.db import models
from django.core.serializers.json import DjangoJSONEncoder
from django.conf import settings
from jsonfield import JSONField
import waffle
from waffle import Flag
import random
import json
from experiments import counters, conf
from experiment... | Python | 0.000002 | @@ -5725,16 +5725,36 @@
if
+self.switch_key and
conf.SWI
@@ -5766,12 +5766,12 @@
UTO_
-DELE
+CREA
TE:%0A
|
94df8e8c3a5836dea5f1ac148d2ed73b9bbdde6f | Handle deep copies properly. | jsonmapping/visitor.py | jsonmapping/visitor.py |
class SchemaVisitor(object):
""" A schema visitor traverses a JSON schema with associated data and
allows the user to perform any transformations on the data that they
wish. """
def __init__(self, schema, resolver, name=None, parent=None, scope=None):
self.cls = type(self)
self.name =... | Python | 0 | @@ -1,8 +1,34 @@
+from copy import deepcopy%0A
%0A%0Aclass
@@ -548,16 +548,99 @@
$ref'))%0A
+ schema = deepcopy(schema)%0A schema.pop('$ref', None)%0A
|
1eaa0701dc44db25b46180d7523c046288fdd415 | Change analysis to run from 2003 - 2007. | stormtracks/pyro_cluster/pyro_manager.py | stormtracks/pyro_cluster/pyro_manager.py | #!/usr/bin/python
from __future__ import print_function
import socket
import time
import copy
import Pyro4
from Pyro4.errors import ConnectionClosedError
from stormtracks.load_settings import pyro_settings
from stormtracks.pyro_cluster.pyro_task import PyroTaskSchedule, PyroResultsAnalysis
from stormtracks.logger im... | Python | 0 | @@ -1514,14 +1514,25 @@
in
-%5B2006%5D
+range(2003, 2008)
:%0A
|
4f2a93b3ae868c1711463a4a4aa532931a0891f3 | fix flash message types | adhocracy/lib/helpers/__init__.py | adhocracy/lib/helpers/__init__.py | """Helper functions
Consists of functions to typically be used within templates, but also
available to Controllers. This module is available to templates as 'h'.
"""
import cgi
import hashlib
import urllib
from pylons import tmpl_context as c, config, request
from pylons.i18n import _
from webhelpers.pylonslib import... | Python | 0.000027 | @@ -2001,20 +2001,22 @@
cess', '
-info
+notice
'%5D%0A s
|
3c06788eef9ddfa8cc628c1d7c628073ec7fd50b | Set APK size limit to 5 MB. (#1523) | tools/metrics/apk_size.py | tools/metrics/apk_size.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Check APK file size for limit
from os import path, listdir, stat
from sys import exit
SIZE_LIMIT = 4500000
PATH = pa... | Python | 0 | @@ -300,14 +300,14 @@
T =
-450000
+524288
0%0APA
|
ff6940ea114c151fdfad6837d252b59a4523b679 | Fix root directory listing | Artifactorial/views.py | Artifactorial/views.py | # -*- coding: utf-8 -*-
# vim: set ts=4
from django.db.models import Q
from django.core.exceptions import PermissionDenied
from django.forms import ModelForm
from django.http import Http404, HttpResponse
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from ... | Python | 0.000001 | @@ -1868,24 +1868,129 @@
en(dirname)%0A
+ # Special case for the root directory%0A if dirname == '/':%0A dirname_length = 0%0A%0A
dir_
|
06e703290640ed6326bf70e172c25be92799591f | Exclude extmod/vfs_fat_fileio.py test. | tools/tinytest-codegen.py | tools/tinytest-codegen.py | #! /usr/bin/env python3
import os, sys
from glob import glob
from re import sub
def escape(s):
lookup = {
'\0': '\\0',
'\t': '\\t',
'\n': '\\n\"\n\"',
'\r': '\\r',
'\\': '\\\\',
'\"': '\\\"',
}
return "\"\"\n\"{}\"".format(''.join([lookup[x] if x in lookup else x for x in s]))
def chew_... | Python | 0 | @@ -1659,16 +1659,44 @@
isk.py',
+ 'extmod/vfs_fat_fileio.py',
%0A)%0A%0Aoutp
|
19c97e2d109a0ceaaf2a7ed38a16d621e9b7535d | Fix help print for modules. | viper/common/abstracts.py | viper/common/abstracts.py | # This file is part of Viper - https://github.com/viper-framework/viper
# See the file 'LICENSE' for copying permission.
import argparse
import viper.common.out as out
class ArgumentErrorCallback(Exception):
def __init__(self, message, level=''):
self.message = message.strip() + '\n'
self.level ... | Python | 0 | @@ -1405,17 +1405,17 @@
print
-
+(
out.tabl
@@ -1457,16 +1457,17 @@
'rows'%5D)
+)
%0A
@@ -1469,17 +1469,28 @@
el
-s
+if event_typ
e:%0A
@@ -1552,16 +1552,60 @@
nt_data)
+%0A else:%0A print(event_data)
%0A%0A de
|
26045596e95832c500bcdd9ef8273e6b07cb06c2 | fix unit test when sping is not present | rdkit/Chem/Draw/UnitTestDraw.py | rdkit/Chem/Draw/UnitTestDraw.py | # $Id$
#
# Copyright (C) 2011 greg Landrum
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
""" unit testing code for molecule drawing
"""
from ... | Python | 0 | @@ -3952,24 +3952,121 @@
ue54(self):%0A
+ try:%0A from rdkit.Chem.Draw.aggCanvas import Canvas%0A except ImportError:%0A return%0A
os.envir
|
72a0250096b1fd3f1d498f1ecc346cf806c9271a | Test get_position_occupier | finem_imperii/organization/tests.py | finem_imperii/organization/tests.py | from django.test import TestCase
from organization.models import Organization, Capability
from world.models import Character, Tile
class TestOrganizationModel(TestCase):
fixtures = ["simple_world"]
def test_get_descendants_excluding_self(self):
kingdom = Organization.objects.get(name="Small Kingdom"... | Python | 0.000027 | @@ -910,35 +910,8 @@
ue)%0A
- print(descendants)%0A
@@ -5885,32 +5885,33 @@
bilities_to_this
+2
(self):%0A
@@ -6218,12 +6218,374 @@
).exists())%0A
+%0A def test_get_position_occupier(self):%0A organization = Organization.objects.get(name=%22Small King%22)%0A self.assertEqual(or... |
5516fdee86fe0ffcd34381985ebe798f9fbda1af | Fix incorrect check for `self.log` | voctogui/lib/uibuilder.py | voctogui/lib/uibuilder.py | import gi
import logging
from gi.repository import Gtk, Gst
class UiBuilder(object):
def __init__(self, uifile):
if not self.log:
self.log = logging.getLogger('UiBuilder')
self.uifile = uifile
self.builder = Gtk.Builder()
self.builder.add_from_file(self.uifile)
... | Python | 0.000008 | @@ -128,24 +128,36 @@
if not
+hasattr(
self
-.
+, '
log
+')
:%0A
|
aaab0505fe1547a01a096d5612597f74f9534b29 | Send credentials only when they are provided | savannaclient/api/data_sources.py | savannaclient/api/data_sources.py | # Copyright (c) 2013 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | Python | 0.000001 | @@ -856,16 +856,21 @@
ial_user
+=None
, creden
@@ -878,16 +878,21 @@
ial_pass
+=None
):%0A
@@ -1063,16 +1063,106 @@
': %7B
-'
+%7D%0A %7D%0A self._copy_if_defined(data%5B'credentials'%5D,%0A
user
-':
+=
cred
@@ -1206,17 +1206,18 @@
-'
+
password
': c
@@... |
824fbe8dc51d4f7f75df5e393be9a5ce878052ff | add new datacenter header support | libcloud_rest/api/parser.py | libcloud_rest/api/parser.py | # -*- coding:utf-8 -*-
import inspect
from collections import defaultdict
from itertools import takewhile
import re
from libcloud_rest.utils import LastUpdatedOrderedDict
from libcloud_rest.errors import MethodParsingException
#map between request header name and libcloud's internal attribute name
XHEADERS_TO_ARGS_DI... | Python | 0 | @@ -659,16 +659,59 @@
ecure',%0A
+ 'x-provider-datacenter': 'datacenter',%0A
%7D%0A%0A#FIXM
|
3312eadd2b1dd06e29a531e70414eb0503fef5ea | correct movement in multiline cells | media/Hello.py | media/Hello.py | import pyjd # this is dummy in pyjs.
from pyjamas.ui.RootPanel import RootPanel
from pyjamas.ui.Button import Button
from pyjamas.ui.HTML import HTML
from pyjamas.ui.Label import Label
from pyjamas import Window
from pyjamas.ui.TextArea import TextArea
from pyjamas.ui import KeyboardListener
from pyjamas import DOM
d... | Python | 0 | @@ -3848,96 +3848,434 @@
-self._worksheet.move_to_prev_cell()%0A elif key_code == KeyboardListener.KEY_DOWN:%0A
+x, y = self.cursor_coordinates()%0A if y == 0:%0A event = DOM.eventGetCurrentEvent()%0A event.preventDefault()%0A self._worksheet.move_to_... |
b79ec0544b44d73f616b40c6b886967623ba5e51 | Fix some typoes | waterbutler/providers/contrib/cloudfiles.py | waterbutler/providers/contrib/cloudfiles.py | import os
import hmac
import json
import time
import asyncio
import hashlib
import functools
import furl
from waterbutler import streams
from waterbutler import exceptions
from waterbutler.providers import core
TEMP_URL_SECS = 100
def ensure_connection(func):
"""Runs ``_ensure_connection`` before continuing t... | Python | 0.999999 | @@ -5562,21 +5562,26 @@
Response
-Wrapp
+StreamRead
er (Stre
@@ -5775,37 +5775,42 @@
:rtype Response
-Wrapp
+StreamRead
er:%0A :rai
@@ -6211,21 +6211,26 @@
Response
-Wrapp
+StreamRead
er strea
@@ -6350,37 +6350,42 @@
:rtype Response
-Wrapp
+StreamRead
er:%0A %22%22%22%0A
@@ -6857,13 +6857,18 @@
... |
b1eafae0b56abc652f884cec78a885669ab78986 | Update class name | drupdates/tests/behavioral/test_multiple_working_directories_multiple_sites.py | drupdates/tests/behavioral/test_multiple_working_directories_multiple_sites.py | """ Test running Drupdates on multiple repos, multiple working Directories. """
"""
note: The second working directory will have it's own settings file.
"""
from drupdates.tests.behavioral.behavioral_utils import BehavioralUtils
from drupdates.tests import Setup
class TestMultipleWorkingDirectoriesMultipleSites(o... | Python | 0.000002 | @@ -302,20 +302,24 @@
ries
-MultipleSite
+OneCustomSetting
s(ob
|
ba519e86a2c3f5c5bb4ac3364db835e127506148 | Remove unused import | keyring/core.py | keyring/core.py | """
core.py
Created by Kang Zhang on 2009-07-09
"""
import os
import sys
import warnings
import logging
from .py27compat import configparser
from . import logger
from . import backend
from .util import platform_ as platform
log = logging.getLogger(__name__)
_keyring_backend = None
def set_keyring(keyring):
""... | Python | 0.000001 | @@ -71,24 +71,8 @@
sys%0A
-import warnings%0A
impo
|
1152181e0d91cdbe9f7f6fa7ef4398d4f3f3def5 | Fix for idiokit-3000, room.room_jid -> room.jid.bare(). | contrib/archivebot/archivebot.py | contrib/archivebot/archivebot.py | # A bot that joins channels and archives the events is sees. Creates
# files into the given archive directory, one file per channel and
# named after the channel. Each event takes one line, and the format
# is as follows:
# 2010-12-09 15:11:34 a=1,b=2,b=3
# 2010-12-09 17:12:32 a=4,a=5,b=6
import re
import os
import cs... | Python | 0.000001 | @@ -1804,16 +1804,18 @@
oom.
-room_jid
+jid.bare()
))%0A
|
8f55d6724718b42e632c0ad26e9ca248985fe86d | fix templatetags/notification_tags.generate_html if there's no notification | notify/templatetags/notification_tags.py | notify/templatetags/notification_tags.py | from django import template
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from .. import notify_settings
from ..utils import render_notification
register = template.Library()
class RenderNotificationsNode(template.Node):
"""
Template node to parse the token ... | Python | 0.000004 | @@ -1782,36 +1782,50 @@
d(html)%0A
-else
+if not html_chunks
:%0A ht
|
022137faa5de368c5a586ea264e26c86f20ce933 | Fix python3 buildbot error. | examples/undocumented/python/evaluation_cross_validation_mkl_weight_storage.py | examples/undocumented/python/evaluation_cross_validation_mkl_weight_storage.py | #!/usr/bin/env python
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Written (W) 2012 Heiko Strathmann
# Copyrigh... | Python | 0 | @@ -3264,24 +3264,25 @@
print
-
+(
weights
+)
%0A%0Aif __n
|
780b25b724991ccfca20f649d0e4902cb94c4885 | Use static JSONEncoders (#7) | canonicaljson.py | canonicaljson.py | # -*- coding: utf-8 -*-
# Copyright 2014 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | Python | 0 | @@ -50,16 +50,48 @@
ket Ltd%0A
+# Copyright 2018 New Vector Ltd%0A
#%0A# Lice
@@ -633,92 +633,680 @@
e.%0A%0A
-%0Aimport simplejson as json%0A%0Afrom frozendict import frozendict%0A%0A__version__ = '1.0.0'
+# using simplejson rather than regular json gives approximately a 25%25%0A# performance improvement (as measur... |
0b93ece6ef3038cdbe517c97e4f964c9d2e5a9fc | Generate type-specific objects based on string response (i.e. datetime objects) | canvas_object.py | canvas_object.py | class CanvasObject(object):
"""
Base class for all classes representing objects returned by the API.
"""
def __init__(self, requester, headers, attributes):
"""
:param requester: Requester
:param headers: dict
"""
self._requester = requester
self._headers = headers
# Initialize object attributes
... | Python | 0.998805 | @@ -1,12 +1,138 @@
+from datetime import datetime%0Aimport re%0A%0ADATE_PATTERN = re.compile('%5B0-9%5D%7B4%7D-%5B0-9%5D%7B2%7D-%5B0-9%5D%7B2%7DT%5B0-9%5D%7B2%7D:%5B0-9%5D%7B2%7D:%5B0-9%5D%7B2%7DZ')%0A%0A
class Canvas
@@ -525,8 +525,222 @@
, value)
+%0A%0A%09%09%09# Generate extra attributes (i.e. datetime attributes... |
442f21bfde16f72d4480fa7fd9dea2eac741a857 | Include analysis detail view URL in message | src/analyses/views.py | src/analyses/views.py | from django.contrib import messages
from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import LoginRequiredMixin
from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView, TemplateView
from .forms import AbstractAnalysisCreateForm
from .pipelines i... | Python | 0 | @@ -1260,16 +1260,33 @@
_(
+%0A
'You jus
@@ -1328,80 +1328,276 @@
sis!
-') %25 %7B%0A 'analysis_type': self.analysis_type%0A %7D
+ '%0A 'View its detail %3Ca href=%22%25(analysis_detail_url)s%22%3Ehere%3C/a%3E.'%0A ) %25 %7B%0A ... |
9283c745e510add1748c579020e87fa18459ee6f | Fix (hide) blacklist integrity error | recruit_app/blacklist/models.py | recruit_app/blacklist/models.py | # -*- coding: utf-8 -*-
from recruit_app.database import Column, db, Model, ReferenceCol, relationship, SurrogatePK, TimeMixin
from flask import current_app
import requests
import datetime as dt
class BlacklistCharacter(SurrogatePK, TimeMixin, Model):
__tablename__ = 'blacklist_character'
# __searchable__ = [... | Python | 0.000001 | @@ -2110,20 +2110,354 @@
-entry.save()
+try:%0A entry.save()%0A except:%0A # It's possible that multiple people are viewing the same new app at the same time, causing multiple threads to make the same cache object,%0A # which throws an IntegrityError. In th... |
6356cc557e392d3d28886e2d930aa7faa8bb0ac7 | switch to repr | recruit_app/blacklist/models.py | recruit_app/blacklist/models.py | # -*- coding: utf-8 -*-
from recruit_app.extensions import bcrypt
from recruit_app.database import (
Column,
db,
Model,
ReferenceCol,
relationship,
SurrogatePK,
TimeMixin,
)
import flask_whooshalchemy as whooshalchemy
from sqlalchemy_searchable import make_searchable
from sqlalchemy_utils.... | Python | 0.00001 | @@ -1054,18 +1054,19 @@
def __
-st
+rep
r__(self
|
d07530e309936f686c0d05eb9df257e5c89e16c7 | Update submission | scripts/one_vs_rest_classifier.py | scripts/one_vs_rest_classifier.py | #!/usr/bin/env python
import pandas as pd
import numpy as np
import datetime
from sklearn.preprocessing import LabelEncoder
from sklearn.multiclass import OneVsRestClassifier
from xgboost.sklearn import XGBClassifier
def generate_submission(y_pred, test_users_ids, label_encoder):
ids = []
cts = []
for i ... | Python | 0 | @@ -717,26 +717,16 @@
path + '
-processed_
train_us
@@ -776,18 +776,8 @@
+ '
-processed_
test
@@ -1924,14 +1924,17 @@
m-%25d
-_
+-
%25H:%25M
+:%25S
%22)%0A
@@ -1951,16 +1951,30 @@
__file__
+.split('.')%5B0%5D
+ '_' +
@@ -2015,16 +2015,45 @@
.to_csv(
+'../datasets/submissions/' +
name, in
|
bf62f4620dc137034eb277ba22adbe551b5ee0ef | Enhance simulate test | openfisca_web_api/tests/test_simulate.py | openfisca_web_api/tests/test_simulate.py | # -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redistribute it and/or modify... | Python | 0 | @@ -945,16 +945,42 @@
rt_equal
+, assert_in, assert_not_in
%0Afrom we
@@ -1273,17 +1273,23 @@
assert
-
+_equal(
res.stat
@@ -1299,15 +1299,14 @@
code
- ==
+,
400
+)
%0A%0A%0Ad
@@ -2814,12 +2814,133 @@
_code, 200)%0A
+ res_body_json = json.loads(res.body)%0A assert_not_in('error', res_body_json)%0A ... |
df7f0ec1a13e1fd386b7899113590dee4b8afcbd | Debug to true for errors. | searchlist/searchlist/settings.py | searchlist/searchlist/settings.py | """
Django settings for searchlist project.
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import... | Python | 0 | @@ -801,52 +801,12 @@
G =
-bool(eval(os.environ.get('DEBUG', 'False')))
+True
%0A%0AAL
|
494dba5187c00bd74a0d13cd3578775b4b2eec68 | Allow networks to be created publicly by ndex_client | indra/databases/ndex_client.py | indra/databases/ndex_client.py | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import io
import os
import json
import time
import requests
import logging
import ndex2.client
from ndex2.niceCXNetwork import NiceCXNetwork
from indra import get_config
logger = logging.getLogger('ndex_client')
nd... | Python | 0 | @@ -2690,32 +2690,46 @@
x_str, ndex_cred
+, private=True
):%0A %22%22%22Create
@@ -3868,16 +3868,79 @@
/')%5B-1%5D%0A
+ if not private:%0A nd.make_network_public(network_id)%0A
logg
|
e64fea302aab4849e03e1b592b9db779be96371c | Fix documentation for ndex_cred | indra/databases/ndex_client.py | indra/databases/ndex_client.py | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import io
import json
import time
import requests
import logging
import ndex
import ndex.client
logger = logging.getLogger('ndex_client')
ndex_base_url = 'http://52.37.175.128'
def send_request(ndex_service_url, p... | Python | 0.000001 | @@ -3805,71 +3805,113 @@
-Credentials dict containing two keys, %22username%22, and %22
+A dictionary with the following entries:%0A 'user': NDEx user name%0A 'password': NDEx
password
%22.%0A
@@ -3910,10 +3910,8 @@
word
-%22.
%0A
|
2bc95d90db15160f9c4869c03f9dadb6cd8d56fa | Add another proxy server example string | seleniumbase/config/proxy_list.py | seleniumbase/config/proxy_list.py | """
Proxy Server "Phone Book".
Simplify running browser tests through a proxy server
by adding your frequently-used proxies here.
Now you can do something like this on the command line:
"pytest SOME_TEST.py --proxy=proxy1"
Format of PROXY_LIST server entries:
* "ip_address:port" OR "username:password@ip_address:po... | Python | 0.000001 | @@ -749,16 +749,92 @@
xy here%0A
+ %22example2%22: %22158.69.138.8:1080%22, # (Example) - set your own proxy here%0A
%22pro
|
c0d3922b38a12e9de4bbca0935b7089e8156cf5c | Update three-words.py | CheckiO/three-words.py | CheckiO/three-words.py | def checkio(words):
return '111' in ''.join('1' if w.isalpha() else '0' for w in words.split())
| Python | 0.000005 | @@ -93,8 +93,127 @@
plit())%0A
+%0A%0A# alt%0Afrom re import findall, I%0Adef checkio(words):%0A return bool(findall('(%5Ba-z%5D+ +)%7B2,%7D%5Ba-z%5D+', words, flags=I))%0A
|
66d3873a87cd458e1abe7b5c568c87981b3dad45 | resolve notification reverse accessor clash | website/models.py | website/models.py | from django.contrib import admin
from django.db import models
from django.utils import timezone
import datetime
class NL(models.Model):
"""
Natural language command.
"""
str = models.TextField(primary_key=True)
class Command(models.Model):
"""
Command line.
"""
str = models.TextField(... | Python | 0 | @@ -4441,72 +4441,210 @@
er,
-on_delete=models.CASCADE)%0A receiver = models.ForeignKey(User,
+related_name='notification_sender',%0A on_delete=models.CASCADE)%0A receiver = models.ForeignKey(User, related_name='notification_receiver',%0A
on_
|
c319e388b5318584db76a23a9be1d0b32e4d0ad8 | Fix errors in perturbed potential energy equations. | external_stability.py | external_stability.py | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 08 20:42:30 2014
@author: Jens von der Linden
"""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future.builtins import (ascii, bytes, chr, dict, filter, hex, input,
int, map,... | Python | 0.000015 | @@ -2595,25 +2595,25 @@
eturn k*b_z
-+
+-
m*b_theta/a
@@ -2693,33 +2693,33 @@
return k*b_z
--
++
m*b_theta/a%0A%0A%0Ad
@@ -3178,17 +3178,17 @@
params)
-+
+-
%0A
@@ -3586,27 +3586,36 @@
bar*
-b_z
+*2*b_z**2
- m*
+*2*
b_theta
-)
**2
+)
/(k_
|
4f2653a89018fa4d24bd2a551832a7410b682600 | Use deterministic chain in utxo set hash test | test/functional/feature_utxo_set_hash.py | test/functional/feature_utxo_set_hash.py | #!/usr/bin/env python3
# Copyright (c) 2020-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test UTXO set hash value calculation in gettxoutsetinfo."""
import struct
from test_framework.message... | Python | 0 | @@ -711,494 +711,8 @@
ue%0A%0A
- def test_deterministic_hash_results(self):%0A self.log.info(%22Test deterministic UTXO set hash results%22)%0A%0A # These depend on the setup_clean_chain option, the chain loaded from the cache%0A assert_equal(self.nodes%5B0%5D.gettxoutsetinfo()%5B'hash_serializ... |
f825f2378f9546bb415282635955e31075a1405e | remove print statements | feather/dispatcher.py | feather/dispatcher.py | from collections import defaultdict
from multiprocessing import Queue
class Dispatcher(object):
"""Recieve messages from Plugins and send them to the Plugins that listen
for them.
"""
def __init__(self):
"""Create our set of listeners, communication Queue, and empty set of
plugins.
... | Python | 0.999999 | @@ -1279,62 +1279,8 @@
ns:%0A
- print 'shutting down %25s' %25 plugin%0A
@@ -1322,16 +1322,16 @@
TDOWN')%0A
+
@@ -1473,131 +1473,8 @@
e):%0A
- print 'got %25s %25s' %25 (message, payload)%0A print 'have %25d listeners to send to' %25 len(self.listeners%5Bmessage%5D)%0... |
e2af3ff1f28db11ee05e471a6f14f5a04244a69a | bump to next dev version | ulmo/version.py | ulmo/version.py | # set version number
__version__ = '0.7.1'
| Python | 0 | @@ -37,7 +37,11 @@
0.7.
-1
+2-dev
'%0A
|
34256a3a7a5e56e6ebf74fa86861a176d6bf02cd | Update hsi_evaluate.py | HSI_evaluate/hsi_evaluate.py | HSI_evaluate/hsi_evaluate.py | import numpy as np
from numpy.linalg import norm
from skimage.measure import compare_psnr, compare_ssim, compare_mse
def psnr(x_true, x_pred):
"""
:param x_true:
:param x_pred:
:return:
References
----------
.. [1] https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio
"""
n_ban... | Python | 0.000001 | @@ -169,40 +169,101 @@
rue:
-%0A :param x_pred:%0A :return:
+ %E9%AB%98%E5%85%89%E8%B0%B1%E5%9B%BE%E5%83%8F%EF%BC%9A%E6%A0%BC%E5%BC%8F%EF%BC%9A(H, W, C)%0A :param x_pred: %E9%AB%98%E5%85%89%E8%B0%B1%E5%9B%BE%E5%83%8F%EF%BC%9A%E6%A0%BC%E5%BC%8F%EF%BC%9A(H, W, C)%0A :return: %E8%AE%A1%E7%AE%97%E5%8E%9F%E5%A7... |
12e68786488daf1a1d60681ed9800f9951cdd618 | Create handler object, add write functionality | store_data.py | store_data.py | from google.cloud import datastore
import datetime
class data_writer():
def __init__(self, project_id='sentientcnc-1'):
self.project = datastore.Client(project_id)
pass
def create_client(project_id):
'''
Creates an authorized service object to make authenticated
requests to Google C... | Python | 0.000001 | @@ -61,180 +61,484 @@
ata_
-writ
+handl
er():%0A
-%0A def __init__(self, project_id='sentientcnc-1'):%0A self.project = datastore.Client(project_id)%0A pass%0A%0A%0Adef create_client(project_id):%0A '''%0A
+ %22%22%22%0A Object designed to handle storage of incoming sensor data.%0A Arg... |
1a15a08abd7c7b5313402be4574ca6811044fd75 | Fix HardwareDevice constructor to provide 'description' argument | launch_control/models/hw_device.py | launch_control/models/hw_device.py | """
Module with the HardwareDevice model.
"""
from launch_control.utils.json import PlainOldData
class HardwareDevice(PlainOldData):
"""
Model representing any HardwareDevice
A device is just a "device_type" attribute with a bag of properties
and a human readable description. Individual device types... | Python | 0.000013 | @@ -1288,16 +1288,23 @@
pe, desc
+ription
, attrib
|
f510c2a43381cb3fb7542dc27dac04ee1fb219e8 | improve logging from review | lbrynet/core/HTTPBlobDownloader.py | lbrynet/core/HTTPBlobDownloader.py | from random import choice
import logging
from twisted.internet import defer
import treq
from twisted.internet.task import LoopingCall
log = logging.getLogger(__name__)
class HTTPBlobDownloader(object):
def __init__(self, blob_manager, blob_hashes=None, servers=None, client=None):
self.blob_manager = blo... | Python | 0 | @@ -1384,20 +1384,8 @@
- blob_hash =
yie
@@ -1417,107 +1417,8 @@
ob)%0A
- if blob_hash:%0A log.debug('Mirror completed download for %25s', blob_hash)%0A
@@ -2007,21 +2007,21 @@
log.
-error
+debug
('%5BMirro
@@ -2052,32 +2052,91 @@
blob.blob_hash)%0A
+ if bl... |
8e7b8af180dc3153df3e5fa4c21e1fb5c1e8dd4b | call blob_completed when is_validated is true | lbrynet/reflector/server/server.py | lbrynet/reflector/server/server.py | import logging
from twisted.python import failure
from twisted.internet import error, defer
from twisted.internet.protocol import Protocol, ServerFactory
import json
from lbrynet.core.utils import is_valid_blobhash
log = logging.getLogger(__name__)
class ReflectorServer(Protocol):
def connectionMade(self):
... | Python | 0.997324 | @@ -3109,35 +3109,129 @@
-return %7B'send_blob': False%7D
+d = self.blob_manager.blob_completed(blob)%0A d.addCallback(lambda _: %7B'send_blob': False%7D)%0A return d
%0A
@@ -3387,103 +3387,8 @@
er)%0A
- self.blob_finished_d.addCallback(lambda _: self.blob_manager.blob_comple... |
7740ff244e1519097ee0a7fcae1bf75fadbe16bf | REGISTRATION_OPEN is optional in django-registration-redux | wafer/registration/sso.py | wafer/registration/sso.py | # coding: utf-8
import logging
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
from django.db import IntegrityError
import requests
from wafer.kv.models import ... | Python | 0.999976 | @@ -642,24 +642,32 @@
if not
+getattr(
settings
.REGISTR
@@ -658,17 +658,19 @@
settings
-.
+, '
REGISTRA
@@ -678,16 +678,24 @@
ION_OPEN
+', True)
:%0A
|
ef117e291f84623036504d604e4bee0a34a54980 | Add a ckeck on whether the file is a folder | src/btc_reorganize.py | src/btc_reorganize.py | # Brain Tumor Classification
# Script for Reorganizing
# Author: Qixun Qu
# Create on: 2017/09/12
# Modify on: 2017/10/26
# ,,, ,,,
# ;" '; ;' ",
# ; @.ss$$$$$$s.@ ;
# `s$$$$$$$$$$$$$$$'
# $$$$$$$$$$$$$$$$$$
# $$$$P""Y$$$Y""W$$$$$
# $$$$ p"$$$"q $$$$$
# $$$$ .$$$$$. $$$$'
# $$$Da... | Python | 0.000004 | @@ -114,12 +114,12 @@
17/1
-0/26
+1/28
%0A%0A#
@@ -3319,32 +3319,175 @@
(from_path, fd)%0A
+%0A # Skip one iteration if it is not a folder%0A if not os.path.isdir(sub_from_path):%0A continue%0A%0A
@@ -5218,38 +5218,85 @@
-input_dir = %22/home/... |
7d03acba8b4ac820bd4e9e1719b5dbe0dd7166c0 | Fix %matplotlib | IPython/core/magics/pylab.py | IPython/core/magics/pylab.py | """Implementation of magic functions for matplotlib/pylab support.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 The IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distri... | Python | 0.000036 | @@ -1530,21 +1530,17 @@
port%22%22%22%0A
-
%0A
+
@ski
@@ -1850,25 +1850,17 @@
tively.%0A
-
%0A
+
@@ -2034,33 +2034,25 @@
namespace.%0A
-
%0A
+
If y
@@ -2193,25 +2193,17 @@
owing::%0A
-
%0A
+
@@ -2265,29 +2265,17 @@
formats%0A
-
%0A
+
... |
2e0012146ea7d8c62ad10c33c404cf1ac75d1e9c | Improve type hint formatting for tan hyperbolic command | Discord/cogs/matrix.py | Discord/cogs/matrix.py |
from discord.ext import commands
import ast
import numpy
import scipy
from utilities import checks
def setup(bot):
bot.add_cog(Matrix())
class Matrix(commands.Cog):
# TODO: move to converters file
class Matrix(commands.Converter):
async def convert(self, ctx, argument):
return ast.literal_eval(argument)
... | Python | 0 | @@ -4758,33 +4758,32 @@
, ctx, *, matrix
-
: Matrix):%0A%09%09'''
|
38e47b0da6f169e97ac57aacefe001c77c14b2a3 | Fix broken tests that changed when docstring parsing changed. | IPython/core/tests/test_magic_arguments.py | IPython/core/tests/test_magic_arguments.py | #-----------------------------------------------------------------------------
# Copyright (C) 2010-2011, IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#---------------------------------------------... | Python | 0 | @@ -2124,32 +2124,33 @@
oo1 %5B-f FOO%5D%5Cn%5Cn
+
A docstring.%5Cn%5Cn
@@ -2199,32 +2199,32 @@
an argument%5Cn')%0A
-
yield assert
@@ -2517,24 +2517,25 @@
, '%25foo2%5Cn%5Cn
+
A docstring.
@@ -2868,24 +2868,25 @@
%5B-z BAZ%5D%5Cn%5Cn
+
A docstring.
@@ -3420,32 +3420,33 @@
oo4 %5B-f FOO%5D%5Cn%5Cn
+
A... |
c04ac04ea93c514d8aac36501dface92f71b156f | Standardize inline comment spacing in matrix power command | Discord/cogs/matrix.py | Discord/cogs/matrix.py |
from discord.ext import commands
import ast
import numpy
import scipy
from utilities import checks
def setup(bot):
bot.add_cog(Matrix())
class Matrix(commands.Cog):
# TODO: move to converters file
class Matrix(commands.Converter):
async def convert(self, ctx, argument):
return ast.literal_eval(argument)
... | Python | 0 | @@ -3209,16 +3209,17 @@
or as e:
+
# If no
|
91cb22ccd63ef84a4ae4aef9250197cf688f35a2 | use random_expand | chainercv/links/model/ssd/train_transformer.py | chainercv/links/model/ssd/train_transformer.py | import numpy as np
import random
from chainercv.links.model.ssd import encode_with_default_bbox
from chainercv import transforms
from chainercv import utils
def _random_crop(img, bbox, label):
if len(bbox) == 0:
return img, bbox, label
constraints = (
(0.1, None),
(0.3, None),
... | Python | 0.000106 | @@ -2153,12 +2153,13 @@
#
-m
+col
or
-e
aug
@@ -2175,16 +2175,262 @@
s here%0A%0A
+ if random.randrange(2):%0A img, param = transforms.random_expand(%0A img, fill=self.mean, return_param=True)%0A bbox = transforms.translate_bbox(%0A bbox, param%5B'x_off... |
671ac31638af41b7e38889dd81c7cc58489422e3 | Improve generic factory test runner | infcommon/generic_factory_test.py | infcommon/generic_factory_test.py | # -*- coding: utf-8 -*-
import sys
import types
import importlib
import traceback
import os
import fnmatch
import re
from datetime import datetime
TOTALS_TESTS_PASSED = 0
LAST_CALL = None
GREEN_COLOR = "\033[0;32m"
WHITE_COLOR = "\033[0;39m"
RED_COLOR = "\033[91m"
def find_and_call_functions_from():
global TOT... | Python | 0 | @@ -900,447 +900,47 @@
-if (sys.version_info %3E (3, 0)):%0A file_to_import = re.sub('%5C./', '', factory_file).replace('/', '.').replace('.py', '')%0A else:%0A file_to_import = re.sub('%5C./.+?/', '', factory_file).replace('/', '.').replace('.py', '')%0A%0A #https://stackoverf... |
41af56f00c2d4aae2433c314c312d8f4671f658b | Move versions out of instance memory | util/builder.py | util/builder.py | import os
import subprocess
import zipfile
import hashlib
import re
import glob
from zipfile import ZipFile
from StringIO import StringIO
class RainbowBuilder(object):
VERSIONS = {
'c': '1.0.1',
'css': '1.0.6',
'generic': '1.0.6',
'html': '1.0.4',
'javascript': '1.0.5',
... | Python | 0 | @@ -167,25 +167,104 @@
t):%0A
+%0A
-VERSIONS
+def __init__(self, js_path, closure_path, theme_path=None):%0A%0A self.versions
= %7B%0A
+
@@ -289,16 +289,20 @@
+
+
'css': '
@@ -301,32 +301,36 @@
'css': '1.0.6',%0A
+
'generic
@@ -349,16 +349,20 @@
+
'h... |
f20c62b663cb35cb60e26884000d47e8c9b712a3 | Include thread name in log output | lib/log.py | lib/log.py | # Copyright 2015 ETH Zurich
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | Python | 0 | @@ -762,16 +762,17 @@
rrors.%0A%0A
+%0A
class _S
@@ -1687,16 +1687,67 @@
ame)s%5D%5Ct
+'%0A '(%25(threadName)s)
%25(messag
@@ -1753,16 +1753,17 @@
ge)s')%0A%0A
+%0A
def log_
|
27fb102b99684bea5c5c2d04e92fcc6ddfe8d457 | Make sure subprocess errors get logged | lib/log.py | lib/log.py | """Common logging functions."""
from os.path import basename, splitext
import sys
import logging
import tempfile
import subprocess
from . import db
LOGGER = None # Global logger so we can switch between queries & blast DBs
FORMATTER = logging.Formatter('%(asctime)s %(levelname)s: %(message)s',
... | Python | 0 | @@ -2342,16 +2342,128 @@
output)%0A
+ except Exception as err: # pylint: disable=broad-except%0A error('Exception: %7B%7D'.format(err))%0A
|
f4c66c87683587145f06fd332609152faa62ea00 | Fix filters config loading | trackingtermites/utils.py | trackingtermites/utils.py | """Utilitary shared functions."""
boolean_parameters = ['show_labels', 'highlight_collisions',
'show_bounding_box', 'show_frame_info',
'show_d_lines', 'show_trails']
tuple_parameters = ['video_source_size', 'arena_size']
integer_parameters = ['n_termites', 'box_size', 'sca... | Python | 0.000001 | @@ -1257,22 +1257,21 @@
-filter
+value
s.append
|
2b487bfe85d87dda6e7e89fd8f950d708db9fe52 | Revert Essentia from build test | test_build.py | test_build.py | # This script should run without errors whenever we update the
# kaggle/python container. It checks that all our most popular packages can
# be loaded and used without errors.
import numpy as np
print("Numpy imported ok")
print("Your lucky number is: " + str(np.random.randint(100)))
import pandas as pd
print("Pandas ... | Python | 0 | @@ -1534,42 +1534,4 @@
k%22)%0A
-%0Aimport essentia%0Aprint(%22Essentia ok%22)%0A
|
34498257768b10dbb13f967498a0916050260de4 | remove f-string cached_property backport compat; follow 67f0a1c404bfc890b868751478a14cf3f7bbd1e4 | charset_normalizer/cached_property/__init__.py | charset_normalizer/cached_property/__init__.py | """Backport of python 3.8 functools.cached_property.
cached_property() - computed once per instance, cached as attribute
"""
__all__ = ("cached_property",)
# Standard Library
from sys import version_info
if version_info <= (3, 5):
from cached_property import cached_property
elif version_info >= (3, 8):
# St... | Python | 0.000006 | @@ -1578,44 +1578,50 @@
-f
%22(%7B
-self.attrname!r%7D and %7Bname!r%7D).%22
+%7D and %7B%7D).%22.format(self.attrname, name)
%0A
@@ -2359,17 +2359,16 @@
-f
%22No '__d
@@ -2392,33 +2392,8 @@
on %7B
-type(instance).__name__!r
%7D %22%0A
@@ -2412,17 +2412,16 @@
-f
%22instanc
@@ -2436,35... |
7a627ebb4fa5cade9bab9611a3746141e71a5865 | fix tests | test_dosca.py | test_dosca.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import dosca
SIMPLE_TYPES = '''
kwd1 = and
kwd2 = [1, 2, 4]
kwd3 = "now something"
kwd4 = 'completely different'
kwd5 = 42
kwd6 = true
kwd7 =
'''
SECTIONS = '''
kwd1 = value1
[section1]
kwd2 = value2
[section2]
kwd3 = value3
[[section3]]
kwd4 = value4
[[... | Python | 0.000001 | @@ -40,16 +40,32 @@
-8 -*-%0A%0A
+import StringIO%0A
import u
|
b956f5d8c4c9329d4fae448358b5d3169939fcfb | Fix when packages not exist | shipyard/rules/java/java/build.py | shipyard/rules/java/java/build.py | """Set up Java runtime environment."""
from pathlib import Path
from foreman import define_parameter, rule
from garage import scripts
from templates import common
(define_parameter.path_typed('jre')
.with_doc('Path to JRE.')
.with_default(Path('/usr/local/lib/java/jre')))
(define_parameter.path_typed('package... | Python | 0.000027 | @@ -1777,38 +1777,40 @@
ootfs'%5D%0A
-jre
+srcs
=
+%5B
parameters%5B'jre'
@@ -1802,32 +1802,33 @@
arameters%5B'jre'%5D
+%5D
%0A package
@@ -1850,24 +1850,88 @@
'packages'%5D%0A
+ if packages.exists():%0A srcs.append(packages)%0A
scri
@@ -1944,23 +1944,12 @@
ync(
-%5Bjr... |
3983d7a205766526364c64158f10c0d931190d93 | Use update | readthedocs/projects/migrations/0025_show-version-warning-existing-projects.py | readthedocs/projects/migrations/0025_show-version-warning-existing-projects.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-05-07 19:25
from __future__ import unicode_literals
from django.db import migrations
def show_version_warning_to_existing_projects(apps, schema_editor):
Project = apps.get_model('projects', 'Project')
for project in Project.objects.all():
p... | Python | 0 | @@ -270,23 +270,8 @@
-for project in
Proj
@@ -291,26 +291,16 @@
ll()
-:%0A project.
+.update(
show
@@ -319,37 +319,13 @@
ning
- =
+=
True
-%0A project.save(
)%0A%0A%0A
|
e8af38e9f34dd1915bf5e1c3459301ff32f8f026 | add entrepreneur profile url to impact | web/impact/impact/urls.py | web/impact/impact/urls.py | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from django.apps import apps
from django.conf import settings
from django.conf.urls import (
include,
url,
)
from django.conf.urls.static import static
from django.contrib import admin
from django.views.decorators.csrf import csrf_exempt
from django.views.... | Python | 0 | @@ -4168,24 +4168,162 @@
llocator%22),%0A
+ url(r'%5Epeople/(?P%3Cpk%3E%5B0-9%5D+)/$', TemplateView.as_view(%0A template_name='directory.html'),%0A name=%22entreprenuer_profile%22),%0A
url(r'%5Eo
|
e4d818072e72492df6275c1ca43d06165c113a49 | Implement size method | webdav_storage/backend.py | webdav_storage/backend.py |
from django.conf import settings
from django.core.files.storage import Storage
import requests
from urlparse import urljoin
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
WEBDAV_ROOT = settings.WEBDAV_ROOT
WEBDAV_PULIC = getattr(settings, 'WEBDAV_PUBLIC', WEBDAV_ROOT)
... | Python | 0.000004 | @@ -2050,16 +2050,115 @@
%22%22%22
+%0A resp = self.session.head(self._build_url(name))%0A return int(resp%5B'content-lenght'%5D)
%0A%0A de
|
f086f4362f1043535805291a01babb447ee1c5ea | Make testrunner return exit code 1 in case of failures. | testrunner.py | testrunner.py | #------------------------------------------------------------------------------
# Name: runtest.py
# Purpose: testrunner for unittest, doctest and examples test
#
# Author: Kai Muehlbauer
#
# Created: 03.03.2014
# Copyright: (c) Kai Muehlbauer 2014
# Licence: The MIT License
#-----------------... | Python | 0 | @@ -471,16 +471,219 @@
nspect%0A%0A
+# This import has to be done in order to return correct exit codes%0A# see http://stackoverflow.com/questions/14354496/python-returns-wrong-exit-code%0A# for details on this weird fix%0Aimport scipy.weave%0A%0A
VERBOSE
@@ -5659,16 +5659,36 @@
te()))%0A%0A
+ all_success = 1... |
3c9504efecf0f5e14a3922e0f33f812851837bc7 | Add test to handle errors from extract_topics | tests/app/na_celery/test_upload_tasks.py | tests/app/na_celery/test_upload_tasks.py | from app.models import MAGAZINE
from app.na_celery.upload_tasks import upload_magazine
from tests.db import create_email
class WhenUploadingMagazinePdfs:
def it_uploads_a_magazine_pdf_and_sends_email(self, db_session, mocker, sample_magazine, sample_user):
mocker.patch('app.na_celery.upload_tasks.Storage... | Python | 0 | @@ -1891,8 +1891,983 @@
s%5B0%5D%5B0%5D%0A
+%0A def it_handles_error_from_extract_topics(self, app, db_session, mocker, sample_magazine, sample_user):%0A mocker.patch('app.na_celery.upload_tasks.extract_topics', side_effect=Exception('Unknown'))%0A mocker.patch('app.na_celery.upload_tasks.Storage')%0A... |
674a19c3d78829135a39dda34e468413bd72364b | Add description of work todo (so I don't forget). | mlsmath/mls.py | mlsmath/mls.py | from polynomial import *
from modtwo import *
"""
mls defines make_mls, which creates a maximum length sequence from a given
degree.
The top of the file contains some parsing functions to read the generator
polynomial definitions.
"""
GENERATOR_FILE = "generators.text"
def _strip_after_pound(string):
"""
... | Python | 0 | @@ -1866,27 +1866,8 @@
E)%0A%0A
-# TODO: Test this.%0A
def
@@ -2178,16 +2178,93 @@
degree%5D%0A
+ # Very wrong -- correct approach is to convert to an LFSR and then eval.%0A
retu
|
f6520705453a0c64c30252c0e4b8312620df4f69 | Change in comment | bin/deploy_branch.py | bin/deploy_branch.py | #!/usr/bin/python
#
# Modules Import
#
import os, sys, socket, json, requests, cgi, cgitb, subprocess, yaml
#
# Main
#
# For execution through HTTP request
print "Content-Type: text/html\n"
# Jenkins Configuration Import
jenkins_config_file = '../conf/jenkins.yaml'
if os.path.isfile(jenkins_config_file):
file =... | Python | 0 | @@ -1814,16 +1814,20 @@
e%0A%0A# If
+the
webhook
|
9c668a12a021ed0e3698699cd36506f10a0fa486 | add coreview: user.json_list | abilian/web/coreviews/users.py | abilian/web/coreviews/users.py | # coding=utf-8
"""
"""
from __future__ import absolute_import
import hashlib
from flask import Blueprint, make_response, request, g, Response
from werkzeug.exceptions import NotFound
from abilian.core.models.subjects import User
bp = Blueprint('users', __name__, url_prefix='/users')
@bp.url_value_preprocessor
de... | Python | 0.000003 | @@ -72,16 +72,64 @@
ashlib%0A%0A
+from sqlalchemy.sql.expression import or_, func%0A
from fla
@@ -273,16 +273,94 @@
rt User%0A
+from abilian.web import url_for%0Afrom abilian.web.views import JSONModelSearch%0A
%0A%0Abp = B
@@ -1623,8 +1623,738 @@
eturn r%0A
+%0A%0A# JSON search%0Aclass UserJsonListing(JSONModelSe... |
bda064e02ff17c26b17ed4b7a069b9e03b4d9ac4 | Make it work on REL7. | addie/mantid_ipython_widget.py | addie/mantid_ipython_widget.py | import threading
import types
import inspect
import sys
import os
sys.path.append('/opt/mantid38/bin/')
# sys.path.append('/opt/mantidnightly/bin/')
# sys.path.append(os.path.join(os.path.expanduser('~/MantidBuild/debug/bin/')))
sys.path.append('/Users/wzz/MantidBuild/debug-stable/bin/')
# IPython monkey patches the ... | Python | 0 | @@ -655,40 +655,9 @@
ed%0A%0A
-wz_linux = True%0Aif wz_linux:%0A
+#
fro
@@ -718,27 +718,25 @@
ythonWidget%0A
-
+#
from IPytho
@@ -782,26 +782,16 @@
Manager%0A
-else:%0A
from qtc
@@ -842,20 +842,16 @@
nWidget%0A
-
from qtc
|
d00430b82519e9162b7b7c4115d737052d1c5a77 | Update example sectors | situational/apps/sectors/forms.py | situational/apps/sectors/forms.py | from django import forms
from django.forms.forms import BoundField
from localflavor.gb.forms import GBPostcodeField
from .helpers import LMIForAllClient
from .fields import MultiCharField
class FieldSet(object):
"""
Taken from stackoverflow.com/questions/10366745/django-form-field-grouping
Helper class ... | Python | 0 | @@ -1349,16 +1349,35 @@
%22 (eg
+ customer services,
securit
|
f1fab0dbb25104213359c8da5aacb1bbed290a6b | Call match() instead of copying its body | thefuck/rules/git_flag_after_filename.py | thefuck/rules/git_flag_after_filename.py | import re
from thefuck.specific.git import git_support
error_pattern = "fatal: bad flag '(.*?)' used after filename"
@git_support
def match(command):
return re.search(error_pattern, command.output)
@git_support
def get_new_command(command):
command_parts = command.script_parts[:]
# find the bad flag
... | Python | 0.000001 | @@ -331,47 +331,21 @@
g =
-re.search(error_pattern, command.output
+match(command
).gr
|
6c4492b2809357157150e76462876fabb97a5827 | Fix for auto reconnect #284 | thingsboard_gateway/gateway/tb_client.py | thingsboard_gateway/gateway/tb_client.py | # Copyright 2020. ThingsBoard
#
# 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 ... | Python | 0 | @@ -1179,17 +1179,16 @@
elay = 1
-0
%0A
@@ -3077,32 +3077,78 @@
rotected-access%0A
+ if self.client._client != client:%0A
log.info
@@ -3267,50 +3267,8 @@
t))%0A
- if self.client._client != client:%0A
@@ -3287,32 +3287,36 @@
nt.disconnect()%0A
+
self.__i
@@ -3327... |
c9b5998372b99140b0c9032af0ba6590d68ad6d6 | Bump version to 0.10.3 | simpleflow/__init__.py | simpleflow/__init__.py | # -*- coding: utf-8 -*-
import logging.config
from .activity import Activity # NOQA
from .workflow import Workflow # NOQA
from . import settings
__version__ = '0.10.2'
__author__ = 'Greg Leclercq'
__license__ = "MIT"
logging.config.dictConfig(settings.base.load()['LOGGING'])
| Python | 0 | @@ -169,9 +169,9 @@
.10.
-2
+3
'%0A__
|
24ed93c38ca8d7f9e568272941ceb452b7079db4 | Add delay for no abusing Dell API. | Files/warranty_dell.py | Files/warranty_dell.py | import sys
import time
import random
import requests
import shared as config
from uploader import Device42
try:
requests.packages.urllib3.disable_warnings()
except:
pass
class DELL():
def __init__(self, url, api_key, debug, retry, order_no):
self.url = url
self.api_key = api_ke... | Python | 0 | @@ -878,32 +878,62 @@
try:%0A
+ time.sleep(1)%0A
|
ae961874f3c8ed1982a747b7b6868598c6887570 | Clean up json/test_compression.py (#19331) | pandas/tests/io/json/test_compression.py | pandas/tests/io/json/test_compression.py | import pytest
import pandas as pd
from pandas import compat
import pandas.util.testing as tm
import pandas.util._test_decorators as td
from pandas.util.testing import assert_frame_equal, assert_raises_regex
COMPRESSION_TYPES = [None, 'bz2', 'gzip',
pytest.param('xz', marks=td.skip_if_no_lzma)]
... | Python | 0 | @@ -32,34 +32,8 @@
pd%0A
-from pandas import compat%0A
impo
@@ -65,50 +65,8 @@
tm%0A
-import pandas.util._test_decorators as td%0A
from
@@ -139,733 +139,8 @@
x%0A%0A%0A
-COMPRESSION_TYPES = %5BNone, 'bz2', 'gzip',%0A pytest.param('xz', marks=td.skip_if_no_lzma)%5D%0A%0A%0Adef decompress_file(... |
928ea07e1e38b8e9bf9d4536f01163bbb981c1e8 | Update login resource | api/resources/LoginResource.py | api/resources/LoginResource.py | """LoginResource.py - contains the code for the /login API endpoint."""
# Python standard library
import json
import urllib.parse
import uuid
# Third Party modules
import requests
from flask import request, redirect, session, current_app
from flask.ext.restful import Resource
from api.utils import social_config
from... | Python | 0.000001 | @@ -451,37 +451,8 @@
e):%0A
- redirect_uri = None%0A%0A
@@ -528,16 +528,16 @@
llback'%0A
+
@@ -1617,24 +1617,31 @@
current_app.
+logger.
error('could
@@ -1771,24 +1771,31 @@
current_app.
+logger.
error('id no
@@ -2307,24 +2307,31 @@
current_app.
+logger.
error('Loadi
@@ -2791,16 +2791,23 ... |
b7b0e85cb309821a695fc268650e5d18ba9098ac | Fix debug statements | api/resources/LoginResource.py | api/resources/LoginResource.py | """LoginResource.py - contains the code for the /login API endpoint."""
# Python standard library
import json
import urllib.parse
import uuid
# Third Party modules
import requests
from flask import request, redirect, session, current_app
from flask.ext.restful import Resource
from api.utils import social_config
from... | Python | 0.002609 | @@ -232,16 +232,23 @@
rent_app
+, abort
%0Afrom fl
@@ -2956,51 +2956,8 @@
e):%0A
- current_app.logger.error('In GET')%0A
@@ -3006,37 +3006,37 @@
rent_app.logger.
-error
+debug
('Session state:
@@ -3094,21 +3094,21 @@
.logger.
-error
+debug
('Sessio
@@ -6726,76 +6726,18 @@
-return %7B'message':... |
77c15b91325e43c7c28d83c8b97130b31facd2ea | Update post and add put method for User api endpoint. | app/api_1_0/resources/users.py | app/api_1_0/resources/users.py | from flask_restful import Resource, reqparse, fields, marshal_with
from ... import db
from ...models import User
# flask_restful fields usage:
# note that the 'Url' field type takes the 'endpoint' for the arg
user_fields = {
'username': fields.String,
'uri': fields.Url('.user', absolute=True)
}
# List of us... | Python | 0 | @@ -1,12 +1,32 @@
+from flask import g%0A
from flask_r
@@ -80,16 +80,86 @@
al_with%0A
+from .authentication import auth%0Afrom .machines import machine_fields%0A
from ...
@@ -195,16 +195,25 @@
ort User
+, Machine
%0A%0A%0A# fla
@@ -395,16 +395,130 @@
te=True)
+,%0A 'last_seen': fields.DateTime(dt_format='rfc82... |
e02c4a9b39a11af0dad6312abcd20855744d5344 | update Ashford import script for parl.2017-06-08 (closes #946) | polling_stations/apps/data_collection/management/commands/import_ashford.py | polling_stations/apps/data_collection/management/commands/import_ashford.py | from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = 'E07000105'
addresses_name = 'Ashford_Democracy_Club__04May2017.CSV'
stations_name = 'Ashford_Democracy_Club__04May2017.CSV'
elections = [
'local.ke... | Python | 0 | @@ -175,32 +175,58 @@
ses_name = '
+parl.2017-06-08/Version 1/
Ashford
-_
+
Democracy_Cl
@@ -226,36 +226,37 @@
racy_Club__0
-4May
+8June
2017.
-CSV
+tsv
'%0A statio
@@ -270,16 +270,42 @@
= '
+parl.2017-06-08/Version 1/
Ashford
-_
+
Demo
@@ -321,20 +321,21 @@
b__0
-4May
+8June
2017.
-CSV
+tsv
'%0A
@@... |
5f70996680418c4c5b35ecf88a1bf3bb3b718c1f | Bump max API to 2. #485 #486 | pscheduler-server/pscheduler-server/api-server/pschedulerapiserver/admin.py | pscheduler-server/pscheduler-server/api-server/pschedulerapiserver/admin.py | #
# Administrative Information
#
import datetime
import pscheduler
import pytz
import socket
import tzlocal
from pschedulerapiserver import application
from .access import *
from .args import arg_integer
from .dbcursor import dbcursor_query
from .response import *
from .util import *
from .log import log
@applicati... | Python | 0.000004 | @@ -499,17 +499,17 @@
x_api =
-1
+2
%0A%0A%0A@appl
|
ee95ad0fa585b8ec9f2a5b7cf17cf54d90c02191 | Fix logic error with repo dependencies | chaser/chaser.py | chaser/chaser.py | import io
import tarfile
import subprocess
import json
import re
import os
from pkg_resources import parse_version
import requests
from toposort import toposort_flatten
import ccr
from chaser import pacman, prompt
BUILD_DIR = "/tmp/chaser"
def get_source_files(args, workingdir=None):
"""Download the source tarb... | Python | 0.000051 | @@ -1937,20 +1937,14 @@
man.
-is_installed
+exists
(dep
@@ -3688,11 +3688,8 @@
epkg
- -i
%0A
@@ -3804,16 +3804,17 @@
pkg%22, %22-
+s
i%22%5D)%0A
|
a412c1c9ec32fc75e69981f2420c77ebf04bd9be | Make benchmark callable from profile / cProfile module | Lib/cu2qu/benchmark.py | Lib/cu2qu/benchmark.py | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Python | 0 | @@ -742,24 +742,31 @@
%25s%0Afrom
-__main__
+cu2qu.benchmark
import
|
bdc59c65dacbc7576134cdb56659dda0705ced2e | Correct spelling of print_target_list function | kubos/target.py | kubos/target.py | # Kubos SDK
# Copyright (C) 2016 Kubos 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
#
# Unless required by applicable law or ... | Python | 0.001206 | @@ -1382,16 +1382,17 @@
p
+r
int_targ
@@ -2784,16 +2784,17 @@
)%0A%0Adef p
+r
int_targ
|
cd1d8f5a52b775dcad0e5c9c7acb45335544b283 | Add some info to the failure messages | Lib/test/test_errno.py | Lib/test/test_errno.py | #! /usr/bin/env python
"""Test the errno module
Roger E. Masse
"""
import errno
from test import test_support
import unittest
errors = ['E2BIG', 'EACCES', 'EADDRINUSE', 'EADDRNOTAVAIL', 'EADV',
'EAFNOSUPPORT', 'EAGAIN', 'EALREADY', 'EBADE', 'EBADF',
'EBADFD', 'EBADMSG', 'EBADR', 'EBADRQC', 'EBA... | Python | 0 | @@ -2316,16 +2316,47 @@
, value)
+, 'no %25s attr in errno' %25 value
)%0A%0A%0Aclas
@@ -2598,16 +2598,90 @@
rrorcode
+,%0A 'no %25s attr in errno.errorcode' %25 attribute
)%0A%0A%0Adef
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.