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 |
|---|---|---|---|---|---|---|---|
64800aacf8b6ddc129e4f2259de6d56bb6d47173 | Put short docstring on one line and add a period at the end. | runipy/notebook_runner.py | runipy/notebook_runner.py | from __future__ import print_function
try:
# python 2
from Queue import Empty
except ImportError:
# python 3
from queue import Empty
import platform
from time import sleep
import logging
import os
try:
# IPython 3
from IPython.nbformat import NotebookNode
except ImportError:
from IPython.... | Python | 0 | @@ -7321,25 +7321,16 @@
%22%22%22
-%0A
Return t
@@ -7368,25 +7368,17 @@
notebook
-%0A
+.
%22%22%22%0A
|
1cbf462ceb1067f9aa70270f6c94e8683e19c245 | format yang max-value w/o quotes | pyang/translators/yang.py | pyang/translators/yang.py | """YANG output plugin"""
import optparse
import re
from .. import plugin
from .. import util
from .. import grammar
def pyang_plugin_init():
plugin.register_plugin(YANGPlugin())
class YANGPlugin(plugin.PyangPlugin):
def add_output_format(self, fmts):
fmts['yang'] = self
self.handle_comments ... | Python | 0.000001 | @@ -1283,16 +1283,52 @@
nteger',
+ 'max-value',%0A
'date',
|
c123e0b14dba7e893471a82e9c52b970b9884843 | Fix py2.6 unicode output test cases | pywikibot/userinterfaces/terminal_interface_unix.py | pywikibot/userinterfaces/terminal_interface_unix.py | # -*- coding: utf-8 -*-
#
# (C) Pywikibot team, 2003-2014
#
# Distributed under the terms of the MIT license.
#
__version__ = '$Id$'
from . import terminal_interface_base
unixColors = {
'default': chr(27) + '[0m', # Unix end tag to switch back to default
'black': chr(27) + '[30m', # Black sta... | Python | 0.999986 | @@ -127,16 +127,27 @@
'$Id$'%0A%0A
+import sys%0A
from . i
@@ -1672,18 +1672,150 @@
-if
+# .encoding does not mean we can write unicode%0A # to the stream pre-2.7.%0A if sys.version_info %3E= (2, 7) and %5C%0A
hasattr
@@ -1845,16 +1845,29 @@
g') and
+%5C%0A
targetSt
|
0bfe75bddc7c5ff8e20b509dd4dc77c646775be5 | fix abort() (#140) | tests/MenderAPI/deployments.py | tests/MenderAPI/deployments.py | #!/usr/bin/python
# Copyright 2016 Mender Software AS
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | Python | 0 | @@ -4660,14 +4660,13 @@
%22: %22
-finish
+abort
ed%22%7D
|
0835e52fc950bd58be066c179f2bdf1f74da3c71 | move to cloudstorage api | server/scripts/insertname.py | server/scripts/insertname.py | # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
import logging
import re
from webapp2 import *
from google.appengine.api import files, memcache
from redir... | Python | 0 | @@ -290,15 +290,8 @@
port
- files,
mem
@@ -329,16 +329,36 @@
dir_pkgs
+%0Aimport cloudstorage
%0A%0A# When
|
dc8bed4e91b53d1dcae87125e7c1c766da5ba3f6 | Add some new InvItem types. | pycoin/message/InvItem.py | pycoin/message/InvItem.py | import functools
from pycoin.serialize import b2h_rev
from pycoin.serialize.bitcoin_streamer import parse_struct, stream_struct
ITEM_TYPE_TX, ITEM_TYPE_BLOCK, ITEM_TYPE_MERKLEBLOCK = (1, 2, 3)
@functools.total_ordering
class InvItem(object):
def __init__(self, item_type, data, dont_check=False):
if not ... | Python | 0 | @@ -127,34 +127,37 @@
ct%0A%0AITEM_TYPE_TX
-,
+= 1%0A
ITEM_TYPE_BLOCK,
@@ -147,34 +147,37 @@
%0AITEM_TYPE_BLOCK
-,
+= 2%0A
ITEM_TYPE_MERKLE
@@ -188,17 +188,89 @@
K =
-(1, 2, 3)
+3%0AINV_CMPCT_BLOCK = 4%0A%0AINV_WITNESS_FLAG = 1 %3C%3C 30%0AINV_TYPE_MASK = 0xffffffff %3E%3E 2
%0A%0A%0A@
|
371a2bd328ed021bf1857e003b32e3cdbc281ded | wrong signature | pyethereum/peermanager.py | pyethereum/peermanager.py | import time
import socket
import logging
from dispatch import receiver
from common import StoppableLoopThread
import signals
from peer import Peer
logger = logging.getLogger(__name__)
class PeerManager(StoppableLoopThread):
max_silence = 5 # how long before pinging a peer
max_ping_wait = 1. # how long t... | Python | 0.99983 | @@ -5294,16 +5294,24 @@
sender,
+request_
data, **
|
709bbfa8548839ec097f92df3e3bb79c59f5fc1f | switch year for year_start in lookup test | tests/framework/test_lookup.py | tests/framework/test_lookup.py | import numpy as np
import pandas as pd
from vivarium.testing_utilities import build_table, TestPopulation
from vivarium.interface.interactive import setup_simulation
import pytest
@pytest.mark.skip(reason='only order 0 interpolation with age bin edges currently supported')
def test_interpolated_tables(base_config):
... | Python | 0 | @@ -4060,16 +4060,22 @@
ars.year
+_start
.unique(
|
08d55f173db22968b490db4c1f96f13479d0f645 | make it a little more pythonic | pyexcelerate/Worksheet.py | pyexcelerate/Worksheet.py | from . import Range
from . import Style
from . import Format
from .DataTypes import DataTypes
from . import six
from datetime import datetime
class Worksheet(object):
def __init__(self, name, workbook, data=None):
self._columns = 0 # cache this for speed
self._name = name
self._cells = {}
self._cell_cache = {... | Python | 0.000057 | @@ -2947,24 +2947,71 @@
y, style):%0A
+%09%09if cell is None:%0A%09%09%09return %22%22 # no cell data%0A
%09%09if cell no
@@ -4229,34 +4229,8 @@
%5By%5D%0A
-%09%09%09%09if cell is not None:%0A%09
%09%09%09%09
|
59e51a64ef4cc361e76f5146ce1052b80fc6b2a7 | Bump version to 15.0.0a3 | resolwe_bio/__about__.py | resolwe_bio/__about__.py | """Central place for package metadata."""
# NOTE: We use __title__ instead of simply __name__ since the latter would
# interfere with a global variable __name__ denoting object's name.
__title__ = 'resolwe-bio'
__summary__ = 'Bioinformatics pipelines for the Resolwe platform'
__url__ = 'https://github.com/genial... | Python | 0 | @@ -494,17 +494,17 @@
'15.0.0a
-2
+3
'%0A%0A__aut
|
0657814e32ad550d62ae4ee90af12cc593592c61 | fix import logic in pid kill | conda_build/windows.py | conda_build/windows.py | from __future__ import absolute_import, division, print_function
import os
import sys
import shutil
from os.path import dirname, isdir, isfile, join, exists
import conda.config as cc
from conda.compat import iteritems
from conda_build.config import config
from conda_build import environ
from conda_build import sour... | Python | 0.000002 | @@ -3518,23 +3518,16 @@
or n in
-psutil.
get_pid_
|
966879586456b5f6a615368c2193e599955d2bef | Use repo.get_teams() instead of org.get_teams() | conda_smithy/github.py | conda_smithy/github.py | from __future__ import absolute_import, print_function
import os
import random
from random import choice
import git
from git import Repo
import github
from github import Github
from github.GithubException import GithubException
from github.Organization import Organization
from github.Team import Team
from . import ... | Python | 0.000001 | @@ -3691,27 +3691,23 @@
team in
-user_or_org
+gh_repo
.get_tea
|
a566b5dc1d9aea00bcd965ed79409e53b15eee3f | Fix visibility logic on survey menu item | indico/modules/events/surveys/__init__.py | indico/modules/events/surveys/__init__.py | # This file is part of Indico.
# Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | Python | 0 | @@ -783,17 +783,8 @@
port
- session,
ren
@@ -795,16 +795,25 @@
template
+, session
%0A%0Afrom i
@@ -2246,17 +2246,16 @@
return
-(
event.ha
@@ -2282,81 +2282,35 @@
and
-%0A Survey.query.with_parent(event).filter(Survey.is_visible
+ query_active_surveys(event
).ha
@@ -2317,17 +2317,16 @@
s_row... |
91ce1b86efd3df44ffaee90fd3f66f87dd02ad60 | Fix how dates are compared | pygotham/events/models.py | pygotham/events/models.py | """Events models."""
import arrow
from sqlalchemy_utils.types.arrow import ArrowType
from pygotham.core import db
__all__ = 'Event',
class Event(db.Model):
"""Event."""
__tablename__ = 'events'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(255), unique=True, nullable=Fa... | Python | 0.000019 | @@ -1515,32 +1515,38 @@
erica/New_York')
+.naive
%0A if not
@@ -1595,16 +1595,22 @@
ls_begin
+.naive
:%0A
@@ -1680,16 +1680,22 @@
sals_end
+.naive
%3C now:%0A
|
9043231a620a1fad26732ba9802fbc16458f785d | Create default config file if none found | pyinstalive/initialize.py | pyinstalive/initialize.py | import argparse
import configparser
import logging
import os.path
import sys
import auth, downloader, logger
def check_config_validity(config):
username = config['pyinstalive']['username']
password = config['pyinstalive']['password']
if not (len(username) > 0):
logger.log("[E] Invalid setting detected for 'user... | Python | 0.000002 | @@ -984,33 +984,33 @@
%0A%09%09logger.log(%22%5B
-E
+W
%5D Could not find
@@ -1028,18 +1028,529 @@
ion file
-.%22
+, creating a default one ...%22, %22YELLOW%22)%0A%09%09try:%0A%09%09%09config_template = %22%5Bpyinstalive%5D%5Cnusername = johndoe%5Cnpassword = grapefruits%5Cnsave_path = %5C%5C%5Cnshow_cookie_expiry ... |
5bffdf7ec68934595c394910aafc25fe634b10b2 | Update pylsy_test.py | pylsy/tests/pylsy_test.py | pylsy/tests/pylsy_test.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import unittest
from pylsy import PylsyTable
class PylsyTableTests(unittest.TestCase):
def setUp(self):
attributes = ["name", "age"]
self.table = PylsyTable(attributes)
def tearDown(self):
self.table = None
def test... | Python | 0 | @@ -573,24 +573,25 @@
+#
import io%0A
@@ -600,16 +600,17 @@
+#
from con
@@ -652,16 +652,17 @@
+#
with io.
@@ -718,16 +718,17 @@
+#
print(se
@@ -735,22 +735,25 @@
lf.table
-)%0A
+,end='')%0A
@@ -769,27 +769,29 @@
t =
-buf.getvalue()%0A
+self.table.__... |
a9a98603d0170128dab627a17a6d525083f48c6a | change forever semantics; instead make it something run by crontab, so is much more robust than a daemon can possibly be. | salvus/scripts/forever.py | salvus/scripts/forever.py | #!/usr/bin/env python
# Ensure that system-wide daemons stays running.
# If <service> is not running, do "service <service> restart".
# We do NOT just do "service <service> start" since that does
# not work (it's just an observerable fact).
import os, sys, time
SERVICES = sys.argv[1:]
if len(SERVICES) == 0 or len([x... | Python | 0 | @@ -54,13 +54,11 @@
ons
-stays
+are
run
@@ -232,16 +232,184 @@
e fact).
+%0A#%0A# Put this in a crontab, e.g.,%0A#%0A# * * * * * /home/salvus/forever.py rethinkdb %3E%3E /home/salvus/.forever_rethinkdb.log 2%3E%3E /home/salvus/.forever_rethinkdb.err%0A#
%0A%0Aimport
@@ -874,91 +874,9 @@
ce)%0A
- tim... |
25d2b4fe4e5e2e225a8b33d504e556cff5eb0f74 | remove L specifier as it is not python3 compatible | pyoram/tests/test_util.py | pyoram/tests/test_util.py | import unittest
import pyoram.util
class Test(unittest.TestCase):
def test_log2floor(self):
self.assertEqual(pyoram.util.log2floor(1), 0)
self.assertEqual(pyoram.util.log2floor(2), 1)
self.assertEqual(pyoram.util.log2floor(3), 1)
self.assertEqual(pyoram.util.log2floor(4), 2)
... | Python | 0.000002 | @@ -1556,33 +1556,32 @@
3123123123123123
-L
,%0A 12
@@ -1626,17 +1626,16 @@
23123123
-L
), 1)%0A
@@ -1737,33 +1737,32 @@
3123123123123123
-L
,%0A 12
@@ -1799,33 +1799,32 @@
3123123123123123
-L
), 2)%0A se
@@ -1926,17 +1926,16 @@
23123123
-L
+ 1,%0A
@@ -1992,17 +1992,16 @@
23... |
13bd933e3fac64556c7a75837208eac9301c64b8 | Make clean function better match docs | pypi_package_downloads.py | pypi_package_downloads.py | #!/usr/bin/env python
import re
import os
import sys
import xmlrpclib
PYPI_CACHE = os.environ.get("PYPI_CACHE", "/tmp/pypi_package_downloads_cache.txt")
PYPI_USERNAME = os.environ.get("PYPI_USERNAME")
SHOW_PAST_VERSIONS = os.environ.get("SHOW_PAST_VERSIONS", True)
if not PYPI_USERNAME:
sys.stdout.write("Need a P... | Python | 0.000561 | @@ -1514,16 +1514,127 @@
ean(s):%0A
+ # http://munin-monitoring.org/wiki/notes_on_datasource_names%0A s = re.sub('%5E%5B%5EA-Za-z_%5D', '_', s)%0A
|
3d1f56bd608aedb13517629d3878739bed62c67b | Fix the bidict tests | pyrad/tests/testBidict.py | pyrad/tests/testBidict.py | import operator
import unittest
from pyrad.bidict import BiDict
class BiDictTests(unittest.TestCase):
def setUp(self):
self.bidict=BiDict()
def testStartEmpty(self):
self.assertEqual(len(self.bidict), 0)
self.assertEqual(len(self.bidict.forward), 0)
self.assertEqual(len(self.... | Python | 0.997749 | @@ -1527,25 +1527,26 @@
t.GetForward
-(
+,
%22missing%22))%0A
@@ -1535,33 +1535,32 @@
ward, %22missing%22)
-)
%0A%0A%0A def testB
@@ -1922,33 +1922,34 @@
dict.GetBackward
-(
+,
%22missing%22))%0A%0A%0A
@@ -1942,17 +1942,16 @@
issing%22)
-)
%0A%0A%0A d
|
4a81aa28b7987e12f9a0261b0d5a936f95802595 | Remove SECURE_SSL_REDIRECT option, already provided by NGINX anyways | src/api/settings.py | src/api/settings.py | """
Django settings for src project.
Generated by 'django-admin startproject' using Django 1.11.
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 os
impor... | Python | 0 | @@ -6102,16 +6102,18 @@
know%0A
+ #
SECURE_
@@ -6128,24 +6128,108 @@
RECT = True%0A
+ # removed because it created problems with direct HTTP connections on localhost%0A
SESSION_
@@ -6281,17 +6281,16 @@
True%0A%0A%0A
-%0A
if DEBUG
|
3e51bd52fe0c8e5b9d0a9b34e56f7780b2625b08 | send system stats on first flush of windows agent | win32/agent.py | win32/agent.py | import win32serviceutil
import win32service
import win32event
import servicemanager
import sys
import logging
import tornado.httpclient
import threading
import modules
import time
from optparse import Values
from checks.common import checks
from emitter import http_emitter
from win32.common import handle_exe_click
imp... | Python | 0 | @@ -409,16 +409,34 @@
ert_path
+, get_system_stats
%0Afrom wi
@@ -2538,23 +2538,81 @@
-firstRun = True
+systemStats = get_system_stats()%0A chk.doChecks(True, systemStats)%0A
%0A
@@ -2665,46 +2665,9 @@
cks(
-firstRun)%0A firstRun = False
+)
%0A
|
261328507e494683a33b74c3218788cb31cb4fab | update document __init__ | mongoext/document.py | mongoext/document.py | from __future__ import absolute_import
import mongoext.collection
import mongoext.fields
import mongoext.exc
class MetaDocument(type):
def __new__(cls, name, bases, attrs):
fields = {}
for base in bases:
for attr, obj in vars(base).iteritems():
if issubclass(type(obj),... | Python | 0.000001 | @@ -1043,44 +1043,125 @@
name
-, field in self.FIELDS.iteritems():%0A
+ in self.FIELDS:%0A validate = self.FIELDS%5Bname%5D%0A value = kw.get(name)%0A if value:%0A
@@ -1173,16 +1173,20 @@
try:%0A
+
@@ -1217,50 +1217,29 @@
me,
-field(kw.get(name, mongoext.e... |
a6b2b528f200125dd87f0dc6ec429ecd92186d48 | Fix signatures of exception classes | api/base/exceptions.py | api/base/exceptions.py | import httplib as http
from rest_framework import status
from rest_framework.exceptions import APIException, ParseError
def json_api_exception_handler(exc, context):
""" Custom exception handler that returns errors object as an array """
# Import inside method to avoid errors when the OSF is loaded without D... | Python | 0.000001 | @@ -811,82 +811,18 @@
e':
-%7B%0A 'parameter': exc.parameter%0A %7D
+exc.source
,%0A
@@ -2177,25 +2177,22 @@
l=None,
-parameter
+source
=None):%0A
@@ -2270,29 +2270,23 @@
elf.
-parameter = parameter
+source = source
%0A%0A#
@@ -2715,16 +2715,194 @@
EQUEST%0A%0A
+ ... |
3c2f83f6a6a9a378ea1dbcbce578659c89460fbf | Replace Gst.URI_SRC with Gst.URIType.SRC | mopidy/audio/scan.py | mopidy/audio/scan.py | from __future__ import (
absolute_import, division, print_function, unicode_literals)
import collections
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst, GstPbutils
from mopidy import exceptions
from mopidy.audio import utils
from mopidy.internal import encoding
_Result = colle... | Python | 0.001284 | @@ -2380,17 +2380,21 @@
(Gst.URI
-_
+Type.
SRC, uri
|
793e42531476667db6b670d799b5baf3ebc8365f | Make buffer conversion work on older GStreamer installs | mopidy/audio/tags.py | mopidy/audio/tags.py | from __future__ import absolute_import, unicode_literals
import collections
import datetime
import logging
import numbers
from mopidy import compat
from mopidy.internal import log
from mopidy.internal.gi import GLib, Gst
from mopidy.models import Album, Artist, Track
logger = logging.getLogger(__name__)
def conve... | Python | 0 | @@ -2219,172 +2219,48 @@
-found, mapinfo = buf.map(Gst.MapFlags.READ)%0A if not found:%0A return None%0A try:%0A return bytes(mapinfo.data)%0A finally:%0A buf.unmap(mapinfo
+return buf.extract_dup(0, buf.get_size()
)%0A%0A%0A
|
f2f141ede2d3d36aabfc4b9e1cf987c1a81be2b2 | Remove unused function | config/pin_proxy_ca.py | config/pin_proxy_ca.py | #!/usr/bin/env python
# encoding: utf-8
import json
import requests
import fileinput
import sys
def pretty_print_json(js):
print json.dumps(js, indent=4, separators=(',', ': '))
def build_ca_proxied_json(js):
"Return json with master pinning and ca_proxy enabled"
id = js["id"]
js["classes"]["puppet_en... | Python | 0.000004 | @@ -922,85 +922,8 @@
de%0A%0A
-def update_puppet_console(id, js):%0A %22Updates PE ENC to enable_ca_proxy%22%0A%0A%0A
def
|
06a8fdf72b2ad99797a60f282338d5a983e7dbcf | add ilb hc to tested resource count | tests/samples/test_ilb_mtls.py | tests/samples/test_ilb_mtls.py | # Copyright 2021 Google 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 by applicable law or agreed to in writing, ... | Python | 0 | @@ -1102,17 +1102,17 @@
es) == 4
-0
+1
%0A%0A%0Adef t
|
f0f47af345cb4b2049bfa4f057627a5a056afbb7 | Remove leading newline from lines2unicode conversion | confopy/model/lines.py | confopy/model/lines.py | # coding: utf-8
'''
File: lines.py
Author: Oliver Zscheyge
Description:
Utility methods to handle lines (list of unicode strings).
'''
import operator
import re
def lines2unicode(lines=[], strip=False, sep=u"\n"):
"""Converts a list of strings to a single unicode string.
Args:
lines: The list of u... | Python | 0.000002 | @@ -643,16 +643,20 @@
es, u%22%22)
+%5B1:%5D
%0A%0Adef is
@@ -3043,34 +3043,32 @@
l1_expected = u%22
-%5Cn
Hello World!%22%0A
@@ -3156,18 +3156,16 @@
ted = u%22
-%5Cn
Hello Wo
|
8f4114f2999c52eabfb268b172b161d7067be034 | Revert "Fix: users see each others graphs" | api/v2/views/metric.py | api/v2/views/metric.py | """
Instance metrics stored in graphite
"""
import json
from django.conf import settings
import redis
import requests
from rest_framework.exceptions import NotFound
from rest_framework.response import Response
from rest_framework.viewsets import GenericViewSet
from api import permissions
from core.models import Ins... | Python | 0 | @@ -322,36 +322,8 @@
ance
-%0Afrom threepio import logger
%0A%0A#
@@ -758,16 +758,21 @@
ution%7D,
+func=
'avg')%22%0A
@@ -1539,60 +1539,8 @@
%5D)%0A%0A
- logger.info(%22metrics endpoint: %22 + request_uri)%0A
@@ -2892,24 +2892,21 @@
y(self,
-instance
+alias
, params
@@ -2920,46 +2920,40 @@
-inp... |
94307da339d586aca85af975cbd49d6f46d35f8a | add security | control_dashboard/__openerp__.py | control_dashboard/__openerp__.py | # -*- coding: utf-8 -*-
##############################################################################
#
# by Bortolatto Ivan (ivan.bortolatto at didotech.com)
# Copyright (C) 2013 Didotech Inc. (<http://www.didotech.com>)
# All Rights Reserved.
#
# WARNING: This program as such is intend... | Python | 0.000066 | @@ -2226,16 +2226,57 @@
ata.xml%22
+,%0A %22security/ir.model.access.csv%22,
%0A %5D,%0A
|
8ae35fc63bd2cc7e6e07b68ace455147e1b2e1f1 | clean code | tests/test_binaryclassifier.py | tests/test_binaryclassifier.py |
import numpy as np
from sklearn import svm, datasets
from darwin.pipeline import ClassificationPipeline
def test_binary_classification_with_classification_pipeline():
# generate the dataset
n_samples=100
n_features=20
x, y = datasets.make_gaussian_quantiles(mean=None, cov=1.0, n_samples=n_samples,
... | Python | 0.000008 | @@ -204,17 +204,19 @@
_samples
-=
+ =
100%0A
@@ -225,17 +225,19 @@
features
-=
+ =
20%0A x
@@ -319,52 +319,8 @@
les,
-%0A
n_f
@@ -431,117 +431,8 @@
1)%0A%0A
- # another way to generate the data%0A # x, y = datasets.make_hastie_10_2(n_samples=10, random_s... |
1bfa368c425a6d53d336bfde8cdadd1f1f9166e9 | Modify MFWdb to insert values effectively | MFWdb.py | MFWdb.py | #-*- coding:utf-8 -*-
import MySQLdb
import MFWurl
import re
def MFWConnect():
conn = MySQLdb.connect(host = 'localhost',user = 'root',passwd='12345678',db='mafengwo',charset='utf8')
return conn
def insertUrls(urls, table):
try:
conn = MFWConnect()
cur = conn.cursor()
insertValues =... | Python | 0 | @@ -54,16 +54,134 @@
port re%0A
+%0Adef getUserID(userUrl):%0A match = re.search(r'/u/(.*)%5C.html',userUrl)%0A if match:%0A return match.group(1)%0A%0A
def MFWC
@@ -323,30 +323,129 @@
def
-i
+getI
nsert
-Urls(urls, table
+Value(userUrl):%0A uid = getUserID(userUrl)%0A return value = (uid,userUr... |
f098ed1dbd1e65b319e3a2584e34d3aa20a81d97 | fix dbwipes | src/browser/urls.py | src/browser/urls.py | from django.conf.urls import patterns, include, url
import dbwipes
urlpatterns = patterns('',
url(r'^login', 'browser.auth.login'),
url(r'^register', 'browser.auth.register'),
url(r'^logout', 'browser.auth.logout'),
url(r'^forgot', 'browser.auth.forgot'),
url(r'^reset/(\w+)', 'browser.auth.reset')... | Python | 0.000001 | @@ -59,16 +59,22 @@
dbwipes
+.views
%0A%0Aurlpat
|
364aafa4f6c4ac249812c36b2b428c176cddb364 | Replace the call to format_exception to format_exc | MTPot.py | MTPot.py | #!/usr/bin/env python2.7
import argparse
import logging
import gevent, gevent.server
from telnetsrv.green import TelnetHandler, command
import traceback
from config import HoneyConfig, MissingConfigField
from syslog_logger import get_syslog_logger
COMMANDS = {}
COMMANDS_EXECUTED = {}
BUSY_BOX = "/bin/busybox"
MIRAI_... | Python | 0.999965 | @@ -3522,42 +3522,9 @@
_exc
-eption(exc_type, exc_param, exc_tb
+(
))%0A
|
9768b38ffcceacbb912e2f1594d7a9687f356fd7 | handle errors with xenstore access during VM shutdown | core-modules/005QubesNetVm.py | core-modules/005QubesNetVm.py | #!/usr/bin/python2
#
# The Qubes OS Project, http://www.qubes-os.org
#
# Copyright (C) 2010 Joanna Rutkowska <joanna@invisiblethingslab.com>
# Copyright (C) 2013 Marek Marczykowski <marmarek@invisiblethingslab.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GN... | Python | 0 | @@ -947,16 +947,39 @@
os.path
+%0Aimport xen.lowlevel.xs
%0A%0Afrom q
@@ -3987,16 +3987,33 @@
rue %7D)%0A%0A
+ try:%0A
@@ -4112,14 +4112,197 @@
+
perms)
+%0A except xen.lowlevel.xs.Error as e:%0A print %3E%3Esys.stderr, %22WARNING: failed to update external IP %22 %... |
4401af077384b83c54f5e9563e75698d4e5afcf7 | fix typo | copy_socrata_data_to_bigquery.py | copy_socrata_data_to_bigquery.py | import rethinkdb as r
import os
r.connect( "localhost", 28015).repl()
try:
r.db_create('queryplayground').run()
r.db('queryplayground').table_create('socrata_datasets').run()
r.db('queryplayground').table_create('third_party_creds').run()
socrata_app_token = raw_input('Your Socrata app token\n')
r.d... | Python | 0.999991 | @@ -887,63 +887,15 @@
t =
-r.db('queryplayground').table('socrata_datasets').run()
+dataset
%5B'so
@@ -950,20 +950,23 @@
ed_at =
-r.db
+dataset
('queryp
|
b4d4f7e61d93c0170a2d011aaa95c13fc634c2fe | Update test_nmi_interrupt.py | tempest/lis/nmi/test_nmi_interrupt.py | tempest/lis/nmi/test_nmi_interrupt.py | # Copyright 2016 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | Python | 0.000003 | @@ -3930,32 +3930,70 @@
.instance_name)%0A
+ self.start_vm(self.server_id)%0A
self._in
|
552b9a561b8b21a58df11833a2839058aab03b45 | Update parser.py | dojo/tools/veracode/parser.py | dojo/tools/veracode/parser.py | __author__ = 'jay7958'
from xml.dom import NamespaceErr
from defusedxml import ElementTree
from datetime import datetime
from dojo.models import Finding
class VeracodeXMLParser(object):
def __init__(self, filename, test):
vscan = ElementTree.parse(filename)
root = vscan.getroot()
if 'ht... | Python | 0.000001 | @@ -3682,59 +3682,8 @@
'%5D,%0A
- false_p = false_p,%0A
%09%09%09%09
|
0ecb08ec83dea1a7781274c63e119c5060a3b22a | remove redundant comments --skip-ci-- | corehq/form_processor/management/commands/archive_all_forms_for_user_in_domain.py | corehq/form_processor/management/commands/archive_all_forms_for_user_in_domain.py | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from io import open
from django.core.management.base import BaseCommand
from casexml.apps.case.cleanup import rebuild_case_from_forms
from casexml.apps.case.xform import get_case_updates
from corehq.a... | Python | 0.000002 | @@ -4119,32 +4119,8 @@
))%0A%0A
- # archive forms%0A
@@ -4195,47 +4195,8 @@
()%0A%0A
- # removing ledger transactions%0A
@@ -4299,32 +4299,8 @@
()%0A%0A
- # rebuild cases%0A
|
ad864016ecde67b0b2fb6381e5d9db8b9cb4bbf0 | add directory option | interface/management/commands/set_copyright.py | interface/management/commands/set_copyright.py | from django.core.management.base import BaseCommand, CommandError, NoArgsCommand
from emma.interface.models import *
import os, sys
from optparse import make_option
class Command(BaseCommand):
help = """
Set all copyrights to a certain value. Will optionally filter on category.
"""
args = "copyright [... | Python | 0.000002 | @@ -279,16 +279,35 @@
category
+ and / or directory
. %0A %22
@@ -371,16 +371,27 @@
ration%5D,
+ directory,
action%22
@@ -1113,32 +1113,252 @@
'),%0A
+%0A make_option('-d', '--dir',%0A action='store',%0A dest='directory',%0A default='',%0A ... |
1036199d2d886d85cdf2c77477332d7f2f66f505 | Handle rename | rabbitmqStats/__init__.py | rabbitmqStats/__init__.py | from rabbitmqStats import *
| Python | 0.000005 | @@ -2,16 +2,16 @@
rom
-r
+R
abbit
-mq
+MQ
Stat
|
fcbb89db90f531e242a9ac13ecff55321155c37e | make global dbus object | bumblebee_status/modules/contrib/spotify.py | bumblebee_status/modules/contrib/spotify.py | """Displays the current song being played and allows pausing, skipping ahead, and skipping back.
Requires the following library:
* python-dbus
Parameters:
* spotify.format: Format string (defaults to '{artist} - {title}')
Available values are: {album}, {title}, {artist}, {trackNumber}
* spotify.la... | Python | 0 | @@ -1199,24 +1199,63 @@
%0A )%0A%0A
+ self.__bus = dbus.SessionBus()%0A
self
@@ -2892,33 +2892,26 @@
bus =
-dbus.SessionBus()
+self.__bus
%0A
@@ -3721,33 +3721,26 @@
-dbus.SessionBus()
+self.__bus
.get_obj
|
4102e4220c3ead9e566ab1c143b22fb90b6386b5 | change the port number to higher number in case python environment is not set by root | monk/roles/executor_service.py | monk/roles/executor_service.py | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 19 16:20:55 2014
@author: pacif_000
"""
import os
import simplejson
import logging
from bson.objectid import ObjectId
from twisted.web import server
from twisted.internet import reactor
from defferedResource import DefferedResource
import monk.core.api as monkapi
import ... | Python | 0.000003 | @@ -3138,16 +3138,18 @@
enTCP(80
+80
, site)%0A
|
0462984dd51ba9b4deb515aa63746d2b3cb0c5c2 | fix tests | workers/data_refinery_workers/processors/janitor.py | workers/data_refinery_workers/processors/janitor.py | import os
import random
import shutil
import string
import subprocess
import time
import warnings
from django.utils import timezone
from nomad import Nomad
from nomad.api.exceptions import BaseNomadException, URLNotFoundNomadException
from typing import Dict
from data_refinery_common.logging import get_and_configure_... | Python | 0.000001 | @@ -3269,17 +3269,16 @@
listdir(
-%22
to_delet
@@ -3278,17 +3278,16 @@
o_delete
-%22
)))%0A
|
70f1b9dffb55c9349290b84b23acd5d2e68fc0a2 | add repositories source for Grails apps | core/deployers/grailsdeployer.py | core/deployers/grailsdeployer.py | import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))
import logging
import re
import time
from basedeployer import BaseDeployer
from library.models import *
from cmudbac.settings import *
import utils
## =====================================================================
## LOGGING CO... | Python | 0 | @@ -1454,16 +1454,145 @@
6%0A%7D%7D%0A%22%22%22
+%0AREPOSITORIES_SETTINGS = %22%22%22%0AmavenRepo %22http://repo.grails.org/grails/core%22%0AmavenRepo %22http://repo.grails.org/grails/plugins%22%0A%22%22%22
%0A%0A## ===
@@ -3199,16 +3199,548 @@
lass))%0A%0A
+ with open(os.path.join(self.setting_path, 'grails-... |
e3f4b2f66e55c293c20296b8857adb46c93cd46d | fix cron cmd | scripts/send_waterleak.py | scripts/send_waterleak.py | #!/usr/bin/python
#run this script on reboot, add it to the cron job
# nohup
#@reboot sudo nohup python /home/pi/magicaespeculo/scripts/send_waterleak.py
import sys
import RPi.GPIO as GPIO
import time
import datetime
import schedule
import paho.mqtt.publish as publish
import json
import requests
import config
GPIO.set... | Python | 0.000059 | @@ -66,16 +66,8 @@
job%0A
-# nohup%0A
#@re
@@ -138,16 +138,33 @@
rleak.py
+ %3E /dev/null 2%3E&1
%0Aimport
|
3ca96508dafd88854d0062a802ed73b6043d7f34 | Undo accidental spacing change. | refcycle/__init__.py | refcycle/__init__.py | # Copyright 2013 Mark Dickinson
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | Python | 0 | @@ -859,17 +859,16 @@
e_gc():%0A
-%0A
%22%22%22%0A
|
1dc1bb91fffd8175898ff920cc9497c7b45c912a | Make sure the `type hints` support is working for FastAPI | rollbar/test/test_fastapi.py | rollbar/test/test_fastapi.py | import sys
try:
from unittest import mock
except ImportError:
import mock
import unittest2
from rollbar.test import BaseTest
ALLOWED_PYTHON_VERSION = sys.version_info[0] >= 3 and sys.version_info[1] >= 6
@unittest2.skipUnless(ALLOWED_PYTHON_VERSION, "FastAPI requires Python3.6+")
class FastAPIMiddlewareTe... | Python | 0 | @@ -1385,28 +1385,381 @@
c_value, ZeroDivisionError)%0A
+%0A def test_should_support_type_hints(self):%0A from starlette.types import ASGIApp, Receive, Scope, Send%0A import rollbar.contrib.fastapi%0A%0A self.assertDictEqual(%0A rollbar.contrib.fastapi.FastAPIMiddleware.__call__.__an... |
c3b1f8c97f89e5b9e8b8e74992631bac33bdde5f | Implement a test if read_user_choice raises on invalid options | tests/test_read_user_choice.py | tests/test_read_user_choice.py | # -*- coding: utf-8 -*-
import click
import pytest
from cookiecutter.compat import read_user_choice
OPTIONS = ['hello', 'world', 'foo', 'bar']
EXPECTED_PROMPT = """Select varname:
1 - hello
2 - world
3 - foo
4 - bar
Choose from 1, 2, 3, 4!"""
@pytest.mark.parametrize('user_choice, expected_value', enumerate(OPTI... | Python | 0.998168 | @@ -753,8 +753,274 @@
'%0A )%0A
+%0A%0A@pytest.fixture(params=%5B1, True, False, None, %5B%5D, %7B%7D%5D)%0Adef invalid_options(request):%0A return %5B'foo', 'bar', request.param%5D%0A%0A%0Adef test_raise_on_non_str_options(invalid_options):%0A with pytest.raises(TypeError):%0A read_user_choice('foo', ... |
9e5664a1a474981e563d268e4e77b29ca7ef3033 | Fix iguala's WS | works/views.py | works/views.py | from rest_framework.decorators import detail_route
from django.shortcuts import get_object_or_404
from rest_framework.response import Response
from rest_framework import status
from . import models, serializers
from balarco import utils
class WorkTypeViewSet(utils.GenericViewSet):
"""ViewSet for WorkType CRUD RE... | Python | 0.00337 | @@ -3297,62 +3297,8 @@
as:%0A
- art_iguala%5B'iguala'%5D = updated_obj.id%0A
@@ -3704,32 +3704,118 @@
data=art_iguala
+,%0A partial=True
)%0A
|
08d83f6999d8e5442acf8683bd8348baca386331 | Revert wsgi keep alive as well | wsgi/config.py | wsgi/config.py | # see http://docs.gunicorn.org/en/latest/configure.html#configuration-file
from os import getenv
bind = f'0.0.0.0:{getenv("PORT", "8000")}'
workers = getenv('WEB_CONCURRENCY', 2)
accesslog = '-'
errorlog = '-'
loglevel = getenv('LOGLEVEL', 'info')
# Larger keep-alive values maybe needed when directly talking to ELB... | Python | 0 | @@ -411,11 +411,9 @@
E%22,
-118
+2
)%0Awo
|
636c731a7a410bbd92eebb35f91748f4129d362a | Add type_name for new types | cosmic/types.py | cosmic/types.py | import json
from collections import OrderedDict
from werkzeug.urls import url_decode, url_encode
from werkzeug.datastructures import MultiDict
from werkzeug.datastructures import Headers as WerkzeugHeaders
from teleport import standard_types, ParametrizedWrapper, BasicWrapper, required, optional, Box, ValidationError... | Python | 0.000001 | @@ -884,32 +884,63 @@
(BasicWrapper):%0A
+ type_name = %22cosmic.Model%22%0A
schema = Str
@@ -1158,24 +1158,54 @@
edWrapper):%0A
+ type_name = %22cosmic.Link%22%0A
param_sc
|
a7c44d89e1aee08239f2da95ccd59643a3896092 | Fix Tuya integration for climate devices (#60229) | homeassistant/components/tuya/base.py | homeassistant/components/tuya/base.py | """Tuya Home Assistant Base Device Model."""
from __future__ import annotations
from dataclasses import dataclass
import json
import logging
from typing import Any
from tuya_iot import TuyaDevice, TuyaDeviceManager
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entit... | Python | 0 | @@ -619,16 +619,44 @@
e = None
+%0A type: str %7C None = None
%0A%0A @p
|
9e9869713e4c2241df78836bdaad30b725b8b3be | Make our GlobalResourceInjection widget global, so we don't have to create it for each request. | myfedora/lib/base.py | myfedora/lib/base.py | """The base Controller API
Provides the BaseController class for subclassing.
"""
from tg import TGController, tmpl_context
from pylons.templating import render_genshi as render
from pylons import tmpl_context, request
import pylons
import myfedora.model as model
from pylons.i18n import _, ungettext, N_
from tw.api ... | Python | 0 | @@ -351,97 +351,158 @@
ora.
-widgets import GlobalResourceInjectionWidget%0Afrom myfedora.lib.appbundle import AppBundle
+lib.appbundle import AppBundle%0Afrom myfedora.widgets import GlobalResourceInjectionWidget%0A%0Aglobal_resource_injection = GlobalResourceInjectionWidget()
%0A%0Ade
@@ -1146,21 +1146,17 @@
rolle... |
a428a64ec6c84d58b85d443e2b881545a5d0e6f1 | increase version to 0.9.3 | referral/__init__.py | referral/__init__.py | __version__ = '0.9.2'
| Python | 0.008542 | @@ -16,7 +16,7 @@
0.9.
-2
+3
'%0A
|
4c055d095460ef32a290cfcac051b3039b6632ca | Fix variable cost constraint | calliope/backend/pyomo/constraints/costs.py | calliope/backend/pyomo/constraints/costs.py | """
Copyright (C) 2013-2017 Calliope contributors listed in AUTHORS.
Licensed under the Apache 2.0 License (see LICENSE file).
costs.py
~~~~~~~~
Cost constraints.
"""
import pyomo.core as po # pylint: disable=import-error
from calliope.backend.pyomo.util import \
param_getter, \
get_timestep_weight
def ... | Python | 0.000051 | @@ -5382,38 +5382,32 @@
resource_eff', (
-cost,
loc_tech, timest
@@ -5813,17 +5813,16 @@
y') and
-
loc_tech
@@ -5933,30 +5933,24 @@
ergy_eff', (
-cost,
loc_tech, ti
|
79530c6bbfb32e8988d40d7739bcb3c887a98b1e | add option to check for preexisting invoices before generating | corehq/apps/accounting/tasks.py | corehq/apps/accounting/tasks.py | from urllib import urlencode
from celery.schedules import crontab
from celery.task import periodic_task
from celery.utils.log import get_task_logger
import datetime
from django.conf import settings
from django.http import HttpRequest, QueryDict
from django.template.loader import render_to_string
from corehq import Doma... | Python | 0 | @@ -563,16 +563,25 @@
cription
+, Invoice
%0Afrom co
@@ -1980,32 +1980,54 @@
sed_on_date=None
+, check_existing=False
):%0A %22%22%22%0A G
@@ -2571,16 +2571,217 @@
in_doc)%0A
+ if (check_existing and%0A Invoice.objects.filter(%0A subscription__subscriber__domain=domain,%0A ... |
9b7326637e0318d546657489c4bd18d5a2d80794 | Use transform accessors | drillion/physics_component.py | drillion/physics_component.py | from drillion.component import Component
from drillion.maths import Vector2
class PhysicsComponent(Component):
def __init__(self, transform_component, update_phase, position=(0.0, 0.0),
velocity=(0.0, 0.0), acceleration=(0.0, 0.0), angle=0.0,
angular_velocity=0.0, angular_accelera... | Python | 0 | @@ -60,16 +60,28 @@
s import
+ Transform2,
Vector2
@@ -1142,16 +1142,28 @@
sform =
+Transform2(*
self.tra
@@ -1188,16 +1188,17 @@
ransform
+)
%0A
|
77a9e0ec137a883ba380d3d57fd01cd1a29499dc | Add competitor to selections | project/api/models/selection.py | project/api/models/selection.py | from django.db import models
import uuid
from model_utils import Choices
from django.contrib.postgres.fields import ArrayField
class Selection(models.Model):
id = models.UUIDField(
primary_key=True,
default=uuid.uuid4,
editable=False,
)
mark = models.BooleanField(
default=F... | Python | 0 | @@ -3831,16 +3831,191 @@
,%0A )%0A
+%0A competitor = models.ForeignKey(%0A 'Competitor',%0A related_name='selections',%0A null=True,%0A blank=True,%0A on_delete=models.SET_NULL,%0A )%0A%0A
clas
|
e9ef64a037ecc1329f3d4f7885ee0ac1f5d1fd37 | make test_MassAnalysis use airfoilcoords fixture | tests/test_structuresection.py | tests/test_structuresection.py | import pytest
from wingstructure.structure import section, material, MassAnalysis
@pytest.fixture
def airfoilcoords():
import numpy as np
# load airfoil coordinates
return np.loadtxt('docs/usage/FX 61-184.dat', skiprows=1, delimiter=',')
def test_structurecreation(airfoilcoords):
# create material
... | Python | 0 | @@ -822,16 +822,29 @@
nalysis(
+airfoilcoords
):%0A #
@@ -1000,18 +1000,16 @@
ilcoords
-()
)%0A %0A
|
7ef6ed7c8ad66f08ca69c767a2a4bdbaf1088fdf | update script to be runnalbe in prod env | reset-dev-farmland.py | reset-dev-farmland.py | import os
import json
import execjs
import urllib2
from sqlalchemy import create_engine
from farmsList.settings import DevConfig
engine = create_engine(DevConfig().SQLALCHEMY_DATABASE_URI)
conn = engine.connect()
parcels = [{
'geometry': '{"type":"Polygon","coordinates":[[[-121.51367978210449,38.58853235229309],[-12... | Python | 0 | @@ -123,16 +123,131 @@
Config%0A%0A
+if os.environ.get(%22FARMSLIST_ENV%22) == 'prod':%0A%09engine = create_engine(ProdConfig().SQLALCHEMY_DATABASE_URI)%0Aelse:%0A%09
engine =
|
4eac4d313b88abb61a26dd2be446d394e339e77e | Fix the missing \t shortcut. | mycli/packages/special/main.py | mycli/packages/special/main.py | import sys
from . import export
from .iocommands import toggle_timing, stub
from .dbcommands import change_db
@export
def show_help(*args): # All the parameters are ignored.
headers = ['Command', 'Shortcut', 'Description']
result = []
for command, value in sorted(COMMANDS.items()):
if value[1]:
... | Python | 0.001098 | @@ -404,32 +404,186 @@
EN_COMMANDS = %7B%0A
+ '%5C%5Ct': (toggle_timing, %5B'%5C%5Ctiming', '(%5C%5Ct)', 'Toggle timing of commands.'%5D),%0A '?': (show_help, %5B'?', '(%5C%5C?)', 'Show this help.'%5D),%0A
%7D%0A%0AC
@@ -738,73 +738,8 @@
%5D),%0A
- '?': (show_help, %5B'?'... |
7a22fcc04ec32d4eaba9416cf815bb3ac99c648a | Revert "[13.0][FIX] sale_multi_fix: add filter by company in _get_advance_details methdo" | sale_multic_fix/wizards/sale_advance_payment_inv.py | sale_multic_fix/wizards/sale_advance_payment_inv.py | ##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from odoo import models, fields, _
class SaleAdvancePaymentInv(models.T... | Python | 0 | @@ -486,693 +486,8 @@
)%0A%0A
-%0A def _get_advance_details(self, order):%0A #TODO borrar en v15 porque Odoo ya lo arregl%C3%B3%0A context = %7B'lang': order.partner_id.lang%7D%0A if self.advance_payment_method == 'percentage':%0A if self.product_id.taxes_id.filtered(lambda r: not o... |
a9cd93d3756c800b34a39af0ec5f1938bafeeab9 | update %s notation to new .format syntax | securedrop/crypto_util.py | securedrop/crypto_util.py | # -*- coding: utf-8 -*-
import os
import subprocess
from base64 import b32encode
from Crypto.Random import random
import gnupg
import scrypt
import config
import store
# to fix gpg error #78 on production
os.environ['USERNAME'] = 'www-data'
GPG_KEY_TYPE = "RSA"
if os.environ.get('SECUREDROP_ENV') == 'test':
# O... | Python | 0 | @@ -2535,15 +2535,22 @@
ut:
-%25s%22 %25 s
+%7B0%7D%22.format(s)
)%0A
|
e4ab382aa9463cc0fed49a6fc7e2af6f61a3557b | Use single quotes consistently | wrapweb/app.py | wrapweb/app.py | # Copyright 2015 The Meson development team
#
# 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 ... | Python | 0 | @@ -608,16 +608,17 @@
ort os%0A%0A
+%0A
# Create
@@ -687,17 +687,17 @@
_object(
-%22
+'
wrapweb.
@@ -721,15 +721,15 @@
nfig
-%22
+'
)%0Aif
-%22
+'
WRAP
@@ -737,17 +737,17 @@
B_CONFIG
-%22
+'
in os.e
@@ -781,17 +781,17 @@
_envvar(
-%22
+'
WRAPDB_C
@@ -795,11 +795,11 @@
B_CONFIG
-%22
+'
)%0A
|
47e79b3a01ca4541d79412cdab856f84871e68f8 | Add auth protocol for keystone connection in vnc_api | templates/vnc_api_lib_ini_template.py | templates/vnc_api_lib_ini_template.py | import string
template = string.Template("""
[global]
;WEB_SERVER = 127.0.0.1
;WEB_PORT = 9696 ; connection through quantum plugin
WEB_SERVER = 127.0.0.1
WEB_PORT = 8082 ; connection to api-server directly
BASE_URL = /
;BASE_URL = /tenants/infra ; common-prefix for all URLs
; Authentication settings (optional)
[aut... | Python | 0 | @@ -338,16 +338,38 @@
eystone%0A
+AUTHN_PROTOCOL = http%0A
AUTHN_SE
|
a73078ed938fb82e9a71708ec883c563ad8095ea | update _init_ipython_session() for ipython 0.12 with wx threading | sfepy/interactive/session.py | sfepy/interactive/session.py | """
Functions for setting up interactive sessions.
"""
from sfepy.base.base import output, sfepy_config_dir
preexec_source = """\
from sfepy.base.base import *
from sfepy.fem import *
from sfepy.applications import pde_solve
try:
import matplotlib as mpl
mpl.use('WXAgg')
from matplotlib.pyplot import *
exc... | Python | 0.000001 | @@ -2568,83 +2568,8 @@
1':%0A
- if is_wx:%0A raise NotImplementedError%0A%0A else:%0A
@@ -2616,20 +2616,16 @@
t ipapp%0A
-
@@ -2688,20 +2688,16 @@
-
-
app = ip
@@ -2721,20 +2721,16 @@
onApp()%0A
-
@@ -2784,28 +2784,24 @@
on:%0A
- ... |
24d7e3ae08c8f81e95a6292bcc8668a1a3a0ece2 | Add homo-binning | python/fate_client/pipeline/component/__init__.py | python/fate_client/pipeline/component/__init__.py | from pipeline.component.column_expand import ColumnExpand
from pipeline.component.data_statistics import DataStatistics
from pipeline.component.dataio import DataIO
from pipeline.component.data_transform import DataTransform
from pipeline.component.evaluation import Evaluation
from pipeline.component.hetero_data_split... | Python | 0.000011 | @@ -1171,32 +1171,103 @@
HomoSecureBoost%0A
+from pipeline.component.homo_feature_binning import HomoFeatureBinning%0A
from pipeline.co
@@ -2198,16 +2198,38 @@
eBoost%22,
+ %22HomoFeatureBinning%22,
%22Inters
|
02f4597f83b5bc515b5d583fa737863ba314f8ff | fix typo | Install/toolbox/scripts/utils.py | Install/toolbox/scripts/utils.py | # -*- coding: utf-8 -*-
import csv
import collections
import sys
import re
import os
import binascii
def parameters_from_args(defaults_tuple=None, sys_args=None):
"""Provided a set of tuples for default values, return a list of mapped
variables."""
defaults = collections.OrderedDict(defaults_... | Python | 0.999991 | @@ -885,24 +885,28 @@
+
print except
|
2197c067c79d1464eb957764f8edd120693dcdf6 | Fix setup.py for Eigen headers Change: 114173506 | tensorflow/tools/pip_package/setup.py | tensorflow/tools/pip_package/setup.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 | @@ -3044,20 +3044,17 @@
/include
- and
+,
%0A # t
@@ -3116,16 +3116,69 @@
evision%3E
+,%0A # and tensorflow/include/eigen-eigen-%3Crevision%3E
.%0A #
@@ -3484,21 +3484,94 @@
_dir
+s
=
+%5B
re.sub(
-r
'/
+external/eigen_archive', '', install_dir),%0A re.sub(r'
exte
@@ -3632,24 +36... |
6afd022e784ecf6069542c796bbf53ccca05bdc1 | Fix deprecation warning | core/tests/test_template_tags.py | core/tests/test_template_tags.py | from django.template import Context, Template
from bs4 import BeautifulSoup
from core.tests.utils import *
from core.models import *
class TemplateTagsTestCase(WagtailTest):
def setUp(self):
super(TemplateTagsTestCase, self).setUp()
self.home_page = HomePage.objects.all()[0]
def test_set_v... | Python | 0.000099 | @@ -1096,32 +1096,44 @@
fulSoup(rendered
+, 'html5lib'
)%0A%0A self.
@@ -1686,16 +1686,28 @@
rendered
+, 'html5lib'
)%0A%0A
|
20717a44fce087103dd92aa4e333fde4c9187f0e | Increment minor version to 0.4 | cpp/__init__.py | cpp/__init__.py | __version__ = '0.3'
| Python | 0.999189 | @@ -14,7 +14,7 @@
'0.
-3
+4
'%0A
|
e3a994bff7a43968fcea53eee49b540b57c6e7f6 | Update supply_systems_database.py | cea/technologies/supply_systems_database.py | cea/technologies/supply_systems_database.py | """
This module provides an interface to the "supply_systems.xls" file (locator.get_database_supply_systems()) - the point
is to avoid reading this data (which is constant during the lifetime of a script) again and again.
"""
from __future__ import print_function
from __future__ import division
import pandas as pd
imp... | Python | 0.000002 | @@ -711,173 +711,340 @@
-all_worksheets = self.read_excel(locator)%0A%0A self.ALL_IN_ONE_SYSTEMS = all_worksheets%5B%22ALL_IN_ONE_SYSTEMS%22%5D%0A self.FEEDSTOCKS = all_worksheets%5B%22FEEDSTOCK
+conversion_systems_worksheets,%5C%0A distribution_systems_worksheets,%5C%0A feedstocks_wor... |
ff40b6b22fe6193e1c8a89824042415fd537aad9 | Replace string statements with comments | path_initializer.py | path_initializer.py | import os.path
import sublime
# own dependencies
from . import logger
from .path.program_path_provider import get_cached_program_path
from .path.setting_path_provider import get_cached_setting_path
from .path.program_drive_provider import get_cached_program_drive
from .path.plugin_path_provider import get_cached_plu... | Python | 0.999999 | @@ -2268,27 +2268,17 @@
-%22%22%22%0A
+#
Open di
@@ -2304,24 +2304,25 @@
m path.%0A
-%0A
+ #
Due to
@@ -2357,16 +2357,18 @@
%0A
+ #
since I
@@ -2398,16 +2398,18 @@
%0A
+ #
before
@@ -2453,16 +2453,18 @@
%0A
+ #
or just
@@ -2480,28 +2480,16 @@
e cache.
-%0A... |
e56e53fa3c56160c190b3074a7de9fbcb5c29ee3 | Revert "cache function lists" because it didn't result in an appreciable speed improvement | LiSE/funlist.py | LiSE/funlist.py | # coding: utf-8
# This file is part of LiSE, a framework for life simulation games.
# Copyright (c) 2013-2014 Zachary Spector, zacharyspector@gmail.com
from collections import MutableSequence, Callable
from json import dumps as jsonned
from json import loads as unjsonned
class FunList(MutableSequence):
"""Persis... | Python | 0 | @@ -335,16 +335,39 @@
unctions
+ associated with a rule
.%0A%0A S
@@ -2151,19 +2151,17 @@
def _se
-nd_
+t
list(sel
@@ -2159,32 +2159,102 @@
tlist(self, l):%0A
+ %22%22%22Update the rule's record with this new list of strings.%22%22%22%0A
self.eng
@@ -2524,33 +2524,33 @@
)%0A%0A def _
-s... |
e8b50a70fc7de1842ebe8bc796736459bf154432 | Add the new cluster validity methods in the module. | dyconnmap/cluster/__init__.py | dyconnmap/cluster/__init__.py | # -*- coding: utf-8 -*-
"""
"""
# Author: Avraam Marimpis <avraam.marimpis@gmail.com>
from .ng import NeuralGas
from .mng import MergeNeuralGas
from .rng import RelationalNeuralGas
from .gng import GrowingNeuralGas
from .som import SOM
from .umatrix import umatrix
__all__ = [
"NeuralGas",
"MergeNeuralGas",... | Python | 0 | @@ -261,16 +261,63 @@
umatrix%0A
+from .validity import ray_turi, davies_bouldin%0A
%0A%0A__all_
@@ -438,10 +438,48 @@
atrix%22,%0A
+ %22ray_turi%22,%0A %22davies_bouldin%22,%0A
%5D%0A
|
347e3f1a1d16569ab86ea1a35e2345f0d095c139 | remove double import | tensorflow_datasets/image/__init__.py | tensorflow_datasets/image/__init__.py | # coding=utf-8
# Copyright 2019 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | Python | 0.000012 | @@ -4833,114 +4833,4 @@
007%0A
-from tensorflow_datasets.image.lost_and_found import LostAndFound # TODO(lost_and_found) Sort alphabetically%0A
|
8f606522a724ffad68fd5650310e5d5a68c1cbf0 | Change staticfile directory | sendcertified/settings.py | sendcertified/settings.py | """
Django settings for sendcertified project.
Generated by 'django-admin startproject' using Django 1.11.1.
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/
"""
imp... | Python | 0.000001 | @@ -3315,17 +3315,16 @@
= True%0A%0A
-%0A
# Static
@@ -3390,26 +3390,25 @@
ct.com/en/1.
-11
+8
/howto/stati
@@ -3416,16 +3416,17 @@
-files/%0A
+%0A
STATIC_R
@@ -3496,16 +3496,72 @@
static/'
+%0A%0A# Extra places for collectstatic to find static files.
%0ASTATICF
@@ -3602,24 +3602,32 @@
JECT_ROOT, '
+../main/
... |
bfb26e4704dc5303593936eec3c33c56e88334ed | test new sharedMemory feature | unittest/python/test_return_by_ref.py | unittest/python/test_return_by_ref.py | from return_by_ref import Matrix, RowMatrix, Vector
import numpy as np
def test(mat):
m_ref = mat.ref()
m_ref.fill(0)
m_copy = mat.copy()
assert np.array_equal(m_ref,m_copy)
m_const_ref = mat.const_ref()
assert np.array_equal(m_const_ref,m_copy)
assert np.array_equal(m_const_ref,m_ref)
m_ref.fill(1)... | Python | 0.000003 | @@ -1,8 +1,29 @@
+import return_by_ref%0A
from ret
@@ -90,24 +90,31 @@
np%0A%0Adef test
+_shared
(mat):%0A%0A m_
@@ -503,16 +503,454 @@
t True%0A%0A
+def test_not_shared(mat):%0A%0A m_ref = mat.ref()%0A m_ref.fill(100.)%0A m_copy = mat.copy()%0A assert not np.array_equal(m_ref,m_copy)%0A%0A m_const_ref = mat.... |
609f4a6bb7e92c9a5d5e095191dc78b2a43c9701 | fix tests | sacrud/tests/test_pyramid.py | sacrud/tests/test_pyramid.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 uralbash <root@uralbash.ru>
#
# Distributed under terms of the MIT license.
"""
Test for sacrud.common
"""
import os
import unittest
from pyramid import testing
from sacrud.common.pyramid_helpers import get_obj_from_settings
from s... | Python | 0.000001 | @@ -463,16 +463,21 @@
xt.views
+.CRUD
import
|
3e92aac756581de951259d20f08c1dec14e86ecd | Add test capturing expectation. Ref #372. | tests/backends/test_chainer.py | tests/backends/test_chainer.py | import pytest
import keyring.backends.chainer
from keyring import backend
@pytest.fixture
def two_keyrings(monkeypatch):
def get_two():
class Keyring1(backend.KeyringBackend):
priority = 1
def get_password(self, system, user):
return 'ring1-{system}-{user}'.format... | Python | 0 | @@ -1055,8 +1055,437 @@
-bravo'%0A
+%0A def test_chainer_defers_to_fail(self, monkeypatch):%0A %22%22%22%0A The Chainer backend should defer to the Fail backend when there are%0A no backends to be chained.%0A %22%22%22%0A monkeypatch.setattr('keyring.backend.get_all_keyring', tupl... |
6cc203ba68889b36ed31a35270ac5833c7fab1c3 | Make Menu._end_directory() private | resources/lib/menu.py | resources/lib/menu.py | import os
import sys
import time
from datetime import datetime
import xbmcaddon
import xbmcgui
import xbmcplugin
class Menu(object):
_plugin_url = sys.argv[0]
_handle = int(sys.argv[1])
_addon_path = None
def __init__(self, sort_methods=[]):
addon = xbmcaddon.Addon(id="plugin.video.nfl-teams... | Python | 0.000043 | @@ -2660,16 +2660,17 @@
def
+_
end_dire
@@ -2841,16 +2841,17 @@
self.
+_
end_dire
|
e3fd56d0ec0f21cacc211d9894c2dffa597f93c6 | Remove NO_MOCK | tests/unit/modules/test_xml.py | tests/unit/modules/test_xml.py | # -*- coding: utf-8 -*-
'''
Tests for xml module
'''
from __future__ import absolute_import, print_function, unicode_literals
import os
import tempfile
from salt.modules import xml
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import TestCase, skipIf
from tests.support.mock impo... | Python | 0.012741 | @@ -288,75 +288,8 @@
ipIf
-%0Afrom tests.support.mock import (%0A NO_MOCK,%0A NO_MOCK_REASON%0A)
%0A%0AXM
@@ -790,41 +790,8 @@
'%0A%0A%0A
-@skipIf(NO_MOCK, NO_MOCK_REASON)%0A
clas
|
8eaaa4e480ab4b771a51dbe46016fa186e860e22 | fix bug in nbio.django.views | nbio/django/views.py | nbio/django/views.py | __license__ = "Apache 2.0"
__copyright__ = "Copyright 2008 nb.io"
__author__ = "Randy Reddig - ydnar@nb.io"
from nbio.django.shortcuts import render_response
from django.http import Http404
DEFAULT_CONTENT_TYPE = 'text/html'
def null():
return
def auto(request, **kwargs):
try:
t = kwargs['te... | Python | 0 | @@ -383,12 +383,21 @@
esponse(
+request,
t)%0A%0A
|
8b8b07daa5742dc8411958e840b78aa36ceec57f | Support missing bounds variable (#93) | cosima_cookbook/date_utils.py | cosima_cookbook/date_utils.py |
#!/usr/bin/env python
"""
Copyright 2018 ARC Centre of Excellence for Climate Systems Science
author: Aidan Heerdegen <aidan.heerdegen@anu.edu.au>
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
... | Python | 0 | @@ -1898,32 +1898,53 @@
ariable as such%0A
+ try:%0A
set_
@@ -1982,16 +1982,135 @@
%5D%5D,name)
+%0A except KeyError:%0A # Ignore if bounds variable not present%0A pass%0A
%0A%0Adef un
@@ -6096,16 +6096,41 @@
bounds%5D%0A
+ ... |
eca2cf86ca180b2f32f2e305649bec8161fc8d54 | fix #366 | saga/utils/pty_exceptions.py | saga/utils/pty_exceptions.py |
__author__ = "Andre Merzky"
__copyright__ = "Copyright 2013, The SAGA Project"
__license__ = "MIT"
import saga.exceptions as se
# ----------------------------------------------------------------
#
def translate_exception (e, msg=None) :
"""
In many cases, we should be able to roughly infer the exceptio... | Python | 0.000001 | @@ -1189,32 +1189,150 @@
nFailed (cmsg)%0A%0A
+ elif 'man-in-the-middle' in lmsg :%0A e = se.AuthenticationFailed (%22ssh key mismatch detected: %25s%22 %25 cmesg)%0A%0A
elif 'pass'
|
2a4d9339c9762ce6b0c1eaf4d830e8ed3e5ecf7b | Improve get_juju_api_url documentation. | server/guiserver/utils.py | server/guiserver/utils.py | # This file is part of the Juju GUI, which lets users view and manage Juju
# environments within a graphical interface (https://launchpad.net/juju-gui).
# Copyright (C) 2013 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public Lice... | Python | 0 | @@ -2449,16 +2449,287 @@
uju GUI.
+ For instance, path is a string representing the path used by the%0A client to connect to the GUI server (like %22/ws/api/1.2.3.4/17070/uuid%22).%0A The template specifies where in the path relevant information can be found:%0A for instance %22/api/$server/$port/$uuid%22.%0A... |
ef6896da9793d04add6bf7d9e77fffc09411dfe1 | Fix issue with restarting... | country_segment/dat_getter.py | country_segment/dat_getter.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import urllib
import gzip
import sched, time
from random import randint
from datetime import datetime, timedelta
class DatGetter(object):
path = ''
filename = 'GeoIP.dat'
# TODO: This should probably be a configuration option.
... | Python | 0 | @@ -115,16 +115,50 @@
, time%0A%0A
+from django.conf import settings%0A%0A
from ran
@@ -176,16 +176,16 @@
randint%0A
-
from dat
@@ -1067,24 +1067,356 @@
.filename)%0A%0A
+ #%0A # To have this automaticaly schedule itself, set ALDRYN=True in%0A # settings. However, using this elsewhere will lik... |
1408f1d63c7ef849a839a243398d68f088b57436 | Fix importing tf.* from config | neuralmonkey/config/builder.py | neuralmonkey/config/builder.py | """Configuration Object Builder.
This module is responsible for instantiating objects
specified by the experiment configuration.
"""
import collections
import importlib
from inspect import signature, isclass, isfunction
from typing import Any, Dict, Set
from neuralmonkey.logging import debug, warn
from neuralmonkey.... | Python | 0 | @@ -1187,25 +1187,174 @@
-module = getattr(
+if len(class_parts) %3C= 2:%0A module = tensorflow%0A else:%0A module = getattr(%0A
tens
|
3849d77c61c65d84059bce9662f43157c003f269 | Add degree column for book-keeping | cg-static-condensation/3d-helmholtz-prob.py | cg-static-condensation/3d-helmholtz-prob.py | from firedrake import *
from mpi4py import MPI
from argparse import ArgumentParser
import numpy as np
import pandas as pd
import sys
parser = ArgumentParser(description=("""Convergence test for the 3D Helmholtz."""),
add_help=False)
parser.add_argument("--verify",
default=... | Python | 0.000019 | @@ -4442,16 +4442,54 @@
, '---')
+%0A degrees = %5Bdegree%5D*len(l2_errors)
%0A%0A da
@@ -4729,16 +4729,47 @@
um_cells
+,%0A %22Degree%22: degrees
%7D%0A%0A d
|
111139b44e9aadc78b442cdfb710292dfd9ef846 | Use do_change_is_admin. | zerver/management/commands/initialize_voyager_db.py | zerver/management/commands/initialize_voyager_db.py |
from argparse import ArgumentParser
from typing import Any, Iterable, Tuple, Optional
from django.conf import settings
from django.core.management.base import BaseCommand
from zerver.lib.bulk_create import bulk_create_users
from zerver.models import Realm, UserProfile, \
email_to_username, get_client, get_system... | Python | 0 | @@ -167,16 +167,66 @@
ommand%0A%0A
+from zerver.lib.actions import do_change_is_admin%0A
from zer
@@ -2208,82 +2208,79 @@
-email_gateway_bot.is_api_super_user = True%0A email_gateway_bot.save(
+do_change_is_admin(email_gateway_bot, True, permission=%22api_super_user%22
)%0A%0A
|
47ad99c7f0ea3df5d6a5dbfd5b690e1e4e2e39e1 | Allow extra run conditions for NM tests | tests/ensure_provider_tests.py | tests/ensure_provider_tests.py | #!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
""" Check that there is a playbook to run all role tests with both providers
"""
# vim: fileencoding=utf8
import glob
import os
import sys
GET_NM_VERSION = """
- block:
- name: Install NetworkManager
package:
name: Netwo... | Python | 0 | @@ -736,16 +736,55 @@
')%0A%22%22%22%0A%0A
+EXTRA_RUN_CONDITION_PREFIX = %22 - %22%0A%0A
RUN_PLAY
@@ -1575,16 +1575,37 @@
n_check%7D
+%7Bextra_run_condition%7D
%22%22%22%0A%0AMIN
@@ -1637,16 +1637,60 @@
ersion%22%0A
+EXTRA_RUN_CONDITION = %22extra_run_condition%22%0A
NM_ONLY_
@@ -2735,16 +2735,268 @@
ERSION)%... |
146118834948dd9c4ff6dbc6a94990633a97b84c | Revert "Allow wptrunner to enable prefs for Servo." | tests/wpt/harness/wptrunner/executors/executorservo.py | tests/wpt/harness/wptrunner/executors/executorservo.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/.
import base64
import hashlib
import json
import os
import subprocess
import tempfile
import threading
import urlparse
im... | Python | 0 | @@ -2204,102 +2204,8 @@
et%5D%0A
-%0A for pref in test.environment.get('prefs', %7B%7D):%0A args += %5B%22--pref%22, pref%5D%0A%0A
@@ -6611,116 +6611,8 @@
eet%5D
-%0A for pref in test.environment.get('prefs', %7B%7D):%0A self.command += %5B%22--pref%22, pref%5D
%0A%0... |
75707282893a1d6e577302f3a8b8e3706c1c8aa4 | Fix The wrong population of the list in case any markup language is given. Only split the option if there is something to parse, otherwise default to None. | pelican/__init__.py | pelican/__init__.py | import argparse
import os
from pelican.settings import read_settings
from pelican.utils import clean_output_dir
from pelican.writers import Writer
from pelican.generators import (ArticlesGenerator, PagesGenerator,
StaticGenerator, PdfGenerator)
def init_params(settings=None, path=None... | Python | 0.000203 | @@ -3347,10 +3347,12 @@
ult=
-''
+None
, de
@@ -3382,16 +3382,24 @@
lp='the
+list of
markup l
@@ -3425,16 +3425,72 @@
or md).
+ Please indicate them'%0A 'separated by commas
')%0A p
@@ -3885,16 +3885,130 @@
e_args()
+%0A%0A # Split the markup languages only if some have been given. Otherwise... |
d213f97127cfd5512f13ece89170f3c62d28c3d1 | Update dev settings. | server/server/settings.py | server/server/settings.py | """
Django settings for server project.
Generated by 'django-admin startproject' using Django 1.8.6.
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/
"""
# Build paths... | Python | 0 | @@ -3747,21 +3747,19 @@
NAME = '
-stage
+dev
-upload'
@@ -4008,13 +4008,11 @@
= %22
-stage
+dev
-sta
|
dbeee3616f2160736af6df9d8d720a4f3fee7727 | version 1.12.0 | rhcephpkg/__init__.py | rhcephpkg/__init__.py | import os
from .log import log
from .build import Build
from .checkout_from_patches import CheckoutFromPatches
from .clone import Clone
from .download import Download
from .gitbz import Gitbz
from .hello import Hello
from .list_builds import ListBuilds
from .localbuild import Localbuild
from .merge_patches import Merge... | Python | 0.000001 | @@ -667,17 +667,17 @@
_ = '1.1
-1
+2
.0'%0A%0A# A
|
4b7791ae4488f85952efe7f613a1fd2bbbcf41a1 | Exclude editnotice pages for redirects | enwiki/editnotice-deployer.py | enwiki/editnotice-deployer.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Task : EditnoticeDeployer
Author : JJMC89
The following parameters are supported:
-editnoticeTemplate Title of the editnotice template
-subjectOnly Restrict to subject pages
-talkOnly Restrict to talk pages
-toSubject Add each talk page's sub... | Python | 0 | @@ -2514,16 +2514,30 @@
existing
+, non-redirect
pages f
@@ -2539,32 +2539,36 @@
ges from another
+%0A
generator.%22%22%22%0A
@@ -2609,32 +2609,62 @@
if page.exists()
+ and not page.isRedirectPage()
:%0A ti
|
fe310330c39dad56b69a3b394ce5cbbea83824db | Fix typo | tests/integration/test_orgs.py | tests/integration/test_orgs.py | # -*- coding: utf-8 -*-
"""Integration tests for methods implemented on Organization."""
import github3
from .helper import IntegrationHelper
class TestOrganization(IntegrationHelper):
"""Organization integration tests."""
betamax_kwargs = {'match_requests_on': ['method', 'uri', 'json-body']}
def test... | Python | 0.999999 | @@ -2857,10 +2857,10 @@
st t
-e
h
+e
abi
|
ef21a9aacc305df069635399bfd6dcb9a9da25b6 | Integrate LLVM at llvm/llvm-project@7dde2a59e61a | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "674729813e3be02af7bda02cfe577398763f58b9"
LLVM_SHA256 = "4abe4c3617c12b35db6b00c870bc5438c9f9cb487a79caa15cccb9a0fc029424"
tf_http_archive(
... | Python | 0.000001 | @@ -160,133 +160,133 @@
= %22
-674729813e3be02af7bda02cfe577398763f58b9%22%0A LLVM_SHA256 = %224abe4c3617c12b35db6b00c870bc5438c9f9cb487a79caa15cccb9a0fc029424
+7dde2a59e61ad669b52a93b0259ce2ad20d642fa%22%0A LLVM_SHA256 = %229710cf0d5a3076036c86a452b5f4e71812e4d9e0d8cd72f7bcb73db6b723216f
%22%0A%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.