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 |
|---|---|---|---|---|---|---|---|
98fad1af84abe13eb64baad58c8a2faf3cd6cccb | Fix every single async task was broken | tt_dailyemailblast/tasks.py | tt_dailyemailblast/tasks.py | from celery.task import task
from . import models
from . import send_backends
@task
def send_daily_email_blasts(blast_pk):
blast = models.DailyEmailBlast.objects.get(pk=blast_pk)
send_backends.sync_daily_email_blasts(blast)
@task
def send_recipients_list(recipients_list_pk, blast_pk):
blast = models.Da... | Python | 0.000127 | @@ -50,24 +50,16 @@
s%0Afrom .
- import
send_bac
@@ -63,16 +63,28 @@
backends
+ import sync
%0A%0A%0A@task
@@ -184,36 +184,27 @@
st_pk)%0A s
-end_backends
+ync
.sync_daily_
@@ -426,36 +426,27 @@
st_pk)%0A s
-end_backends
+ync
.sync_recipi
@@ -757,28 +757,19 @@
k)%0A s
-end_backends
+ync
.sync_re
|
e0716585b34bb22f70e16609a0071228f317cc3e | Use correct pen up position | xy/device.py | xy/device.py | import serial
import time
PORT = '/dev/tty.wchusbserial640'
BAUD = 115200
UP = 10
DOWN = 40
class Device(object):
def __init__(self, port=PORT, baud=BAUD, up=UP, down=DOWN, verbose=False):
self.serial = serial.Serial(port, baud) if port else None
self.up = up
self.down = down
sel... | Python | 0 | @@ -1452,16 +1452,43 @@
elf.pen(
+self.up if up is None else
up)%0A
|
d33a624fa6aedb93ae43ba1d2c0f6a76d90ff4a6 | Allow directory of files to be indexed | foldermd5sums.py | foldermd5sums.py | #!/usr/bin/env python
"""Script to read data files in a directory, compute their md5sums, and output
them to a JSON file."""
import json
import os
import sys
import hashlib
def get_md5sums(directory):
md5sums = []
for filename in os.listdir(directory):
md5 = hashlib.md5()
with open(os.path.jo... | Python | 0 | @@ -169,16 +169,369 @@
ashlib%0A%0A
+def get_relative_filepaths(base_directory):%0A %22%22%22 Return a list of file paths without the base_directory prefix%22%22%22%0A file_list = %5B%5D%0A for root, subFolders, files in os.walk('Data'):%0A relative_path=%22/%22.join(root.split('/')%5B1:%5D)%0A ... |
5b709764e4efd79165765bd4a26a1a49f40d2cb6 | rename function for better understanding | examples/unsubscribe_not_mutually_followers.py | examples/unsubscribe_not_mutually_followers.py | #!/usr/bin/env python
import pandas as pd
import datetime, time
import random
import sys, os
sys.path.append(os.path.join(sys.path[0],'../'))
from instabot import API
def unsubscribe_not_mutually_followers(api):
""" Unsubscribes from people that don't follow you.
I know that the name of this example and f... | Python | 0 | @@ -170,32 +170,37 @@
def unsubscribe_
+from_
not_mutually_fol
@@ -1571,16 +1571,21 @@
bscribe_
+from_
not_mutu
|
4e3aa43a6364a17ff5b4e8cf7e391b488b8c760a | Check for the existence of the typeRoot when returning the principalList, this fixes problems where some directories are not provisioned, (such as resources) and we don't want the exception to stop printing of all the statistics. | twistedcaldav/admin/util.py | twistedcaldav/admin/util.py | ##
# Copyright (c) 2006-2007 Apple 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 l... | Python | 0.000003 | @@ -733,17 +733,16 @@
rt ical%0A
-
%0Adef pre
@@ -1541,21 +1541,47 @@
pl = %5B%5D%0A
+%0A
-%0A
+if typeRoot.exists():%0A
for
@@ -1609,32 +1609,36 @@
tdir():%0A
+
+
if child not in
@@ -1653,16 +1653,20 @@
lite'%5D:%0A
+
@@ -1708,16 +1708,20 @@
+
if disab
@... |
4de30a8e385d0795aa787466f429a15991f5ccdd | Test Issue #514: Serialization fails after adding a new entity label. | spacy/tests/serialize/test_serialization.py | spacy/tests/serialize/test_serialization.py | from __future__ import unicode_literals
import pytest
from spacy.tokens import Doc
import spacy.en
from spacy.serialize.packer import Packer
def equal(doc1, doc2):
# tokens
assert [ t.orth for t in doc1 ] == [ t.orth for t in doc2 ]
# tags
assert [ t.pos for t in doc1 ] == [ t.pos for t in doc2 ]
... | Python | 0 | @@ -2832,8 +2832,520 @@
d) == 0%0A
+%0A%0Adef test_serialize_after_adding_entity():%0A # Re issue #514%0A vocab = spacy.en.English.Defaults.create_vocab()%0A entity_recognizer = spacy.en.English.Defaults.create_entity()%0A%0A doc = Doc(vocab, words=u'This is a sentence about pasta .'.split())%0A entity_... |
e07c34603385563515e5c438bd575f91a8e9dd1b | Upgrade gitiles-servlet to 0.2-7 | external_plugin_deps.bzl | external_plugin_deps.bzl | load("//tools/bzl:maven_jar.bzl", "GERRIT", "MAVEN_CENTRAL", "MAVEN_LOCAL", "maven_jar")
COMMONMARK_VERSION = "0.10.0"
def external_plugin_deps():
maven_jar(
name = "gitiles-servlet",
artifact = "com.google.gitiles:gitiles-servlet:0.2-6",
sha1 = "74a3b22c9283adafafa1e388d62f693e5e2fab2b",
... | Python | 0.000001 | @@ -250,17 +250,17 @@
let:0.2-
-6
+7
%22,%0A
@@ -274,48 +274,48 @@
= %22
-74a
+f2
3b22c
-9283adafafa1e388d62f693e5e2fab2b
+b27fe5c4a78f761492082159d17873f57
%22,%0A
|
e850fe2ec9676ba1c3006a56af46d868ecbf2887 | validate email before blacklist create | djcelery_ses/views.py | djcelery_ses/views.py | # coding: utf-8
import json
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.core.mail import mail_admins
from .models import Blacklist
@csrf_exempt
def sns_notification(request):
"""
Receive AWS SES bounce SNS notification
"""... | Python | 0.000001 | @@ -20,16 +20,26 @@
ort json
+%0Aimport re
%0A%0Afrom d
@@ -186,16 +186,117 @@
l_admins
+%0Afrom django.core.validators import validate_email%0Afrom django.core.exceptions import ValidationError
%0A%0Afrom .
@@ -1180,16 +1180,263 @@
n'%5D%5B0%5D%0A%0A
+ try:%0A validate_email(email)%0A except Validati... |
33bcf1c4953bf318d4581b9f7da2ec4b5770b7fe | bump to 0.1.14 | ffn/__init__.py | ffn/__init__.py | from . import core
from . import data
from .data import get
#from .core import year_frac, PerformanceStats, GroupStats, merge
from .core import *
core.extend_pandas()
__version__ = (0, 1, 13)
| Python | 0.000007 | @@ -189,7 +189,7 @@
1, 1
-3
+4
)%0A
|
d20969aec0c312a6d60d8263e970a01c9b3b0d01 | bump 0.2.1 | ffn/__init__.py | ffn/__init__.py | from . import core
from . import data
from .data import get
#from .core import year_frac, PerformanceStats, GroupStats, merge
from .core import *
core.extend_pandas()
__version__ = (0, 2, 0)
| Python | 0.000015 | @@ -184,11 +184,11 @@
(0, 2,
-0
+1
)%0A
|
d42e2460a411f5dbd57822df87a502866d0f9e1c | Fix _log to work on python 2 & 3 | jsonrpcserver/log.py | jsonrpcserver/log.py | """Logging"""
import logging
def _configure_logger(logger, fmt):
"""Set up a logger, if no handler has been configured for it"""
if not logging.root.handlers and logger.level == logging.NOTSET:
logger.setLevel(logging.INFO)
handler = logging.StreamHandler()
handler.setFormatter(logging... | Python | 0.000001 | @@ -414,27 +414,8 @@
rgs,
- fmt='%25(message)s',
**k
@@ -453,24 +453,67 @@
logging%22%22%22%0A
+ fmt = kwargs.pop('fmt', '%25(message)s')%0A
_configu
|
85f913ae391831258556dcc34b0d8ce45eca7559 | Make pwned_password support bytestrings (#783) | judge/utils/pwned.py | judge/utils/pwned.py | """Based on https://github.com/ubernostrum/pwned-passwords-django.
Original license:
Copyright (c) 2018, James Bennett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source c... | Python | 0 | @@ -1,11 +1,12 @@
%22%22%22
+%0A
Based on
@@ -1637,19 +1637,8 @@
ging
-%0Aimport sys
%0A%0Aim
@@ -3012,25 +3012,28 @@
ssword,
-text
+string
_type
+s
):%0A
@@ -3089,24 +3089,16 @@
be
-Unicode
strings.
')%0A
@@ -3093,16 +3093,100 @@
strings.
+')%0A if isinstance(password, text_type):%0A pas... |
7d25d91851a177619e15322fa311e7d0c5020167 | Fix cron job; fix log removal on every update | install.py | install.py | #!/usr/bin/env python3
import os, getpass
# You can change these settings to your own preference
package_url = 'https://clients2.google.com/service/update2/crx?response=redirect&prodversion=999&x=id%3Dbikioccmkafdpakkkcpdbppfkghcmihk%26installsource%3Dondemand%26uc'
icon_url = 'https://drive.google.com/uc?export=vie... | Python | 0 | @@ -449,16 +449,46 @@
sktop')%0A
+log_file_name = 'install.log'%0A
%0A%0A# Do n
@@ -781,29 +781,29 @@
ath%5B0%5D,
-'install.log'
+log_file_name
), forma
@@ -1382,24 +1382,65 @@
cher_file):%0A
+ logging.info('----------------')%0A
logg
@@ -1605,16 +1605,149 @@
r_file%0A%0A
+ self.icon_file_... |
493007fea95a8d3f54f5bd1e783d95a58ac02b8f | Fix typo | install.py | install.py | #!/usr/bin/env python
# Copyright 2014 Marc-Antoine Ruel. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Installs git pre-commit hook on the repository one directory above."""
import os
import shutil
import subprocess
import... | Python | 0.999999 | @@ -867,17 +867,17 @@
ecommit_
-t
+d
est):%0A
|
cbefb84542d9dfddd0f2fdf8bd0cb2fc89d5b824 | Allow "jupyter nbextension install/enable --py jupytext" | jupytext/__init__.py | jupytext/__init__.py | """Read and write Jupyter notebooks as text files"""
from .jupytext import readf, writef, writes, reads
from .formats import NOTEBOOK_EXTENSIONS, guess_format, get_format_implementation
from .version import __version__
try:
from .contentsmanager import TextFileContentsManager
except ImportError as err:
class ... | Python | 0 | @@ -472,16 +472,523 @@
lf.err%0A%0A
+def _jupyter_nbextension_paths():%0A %22%22%22Allows commands like%0A jupyter nbextension install --py jupytext%0A jupyter nbextension enable --py jupytext%0A jupyter labextension install jupyterlab-jupytext%22%22%22%0A return %5Bdict(%0A section=%22noteboo... |
c6f8153f9163e421a0684b3667c6b5425c9c2168 | add form | ggit_platform/forms.py | ggit_platform/forms.py | from django import forms
from .models import Track
from .models import Region
from .models import Member
from .models import Event
from .models import Story
class TrackForm(forms.ModelForm):
class Meta:
model = Track
fields = '__all__'
class MemberForm(forms.ModelForm):
class Meta:
... | Python | 0.000001 | @@ -431,16 +431,127 @@
all__'%0A%0A
+class RegionForm(forms.ModelForm):%0A%0A class Meta:%0A model = Region%0A fields = '__all__'%0A%0A
%0A%0Aclass
|
520d4e1c6c8a80223915ff753af110e6bc5d7db6 | Add function for ls, in lib/datasets.py as datasets | retriever/__main__.py | retriever/__main__.py | """Data Retriever Wizard
Running this module directly will launch the download wizard, allowing the user
to choose from all scripts.
The main() function can be used for bootstrapping.
"""
from __future__ import print_function
from __future__ import absolute_import
from builtins import input
from imp import reload
im... | Python | 0 | @@ -1017,16 +1017,60 @@
ilename%0A
+from retriever.lib.datasets import datasets%0A
%0A%0Adef ma
@@ -4082,1010 +4082,121 @@
n%22)%0A
- script_list = SCRIPT_LIST()%0A%0A all_scripts = %5B%5D%0A%0A for script in script_list:%0A if script.name:%0A if... |
de5899d60736f555f975713810d5e1936d823794 | Remove ternary expressions | strfrag.py | strfrag.py | __version__ = '11.5.9'
import sys
import warnings
class StringFragment(object):
"""
Represents a fragment of a string. Used to avoid copying, especially in
network protocols.
DO NOT adjust the attributes of the object after you instantiate it; this
is faux-immutable.
You can slice a L{StringFragment}, which ... | Python | 0.999845 | @@ -2057,21 +2057,8 @@
:%0A%09%09
-return False
if t
@@ -2073,37 +2073,58 @@
) != type(other)
- else
+:%0A%09%09%09return False%0A%09%09return
self.as_buffer(
@@ -2180,20 +2180,8 @@
:%0A%09%09
-return True
if t
@@ -2208,13 +2208,33 @@
her)
- else
+:%0A%09%09%09return True%0A%09%09return
sel
|
812d17c6fcf97cc1c493f2489c92af24006ea0a8 | Fix pep8 error. | src/armet/resources/resource/__init__.py | src/armet/resources/resource/__init__.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals, division
import six
from .base import Resource as BaseResource
from .meta import ResourceBase
__all__ = [
'Resource'
]
class Resource(six.with_metaclass(ResourceBase, BaseResource)):
"""Implements the RESTful resource protocol f... | Python | 0.000001 | @@ -200,16 +200,17 @@
rce'%0A%5D%0A%0A
+%0A
class Re
|
8cbc9498b03b68e15b1698211997b773ec263a3f | Update __init__.py | keras_cv/__init__.py | keras_cv/__init__.py | # Copyright 2022 The KerasCV Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | Python | 0.000072 | @@ -933,10 +933,13 @@
= %220.2.4
+dev
%22%0A
|
e911bf6156e25f2f2da86a63fe54b9bac6ba0544 | fix #191 remove_limit.py | utils/remove_limit.py | utils/remove_limit.py | #!/usr/bin/env python
"""
Utility to remove limit warnings from Filter API output.
If --warnings was used, you will have the following in output:
{"limit": {"track": 2530, "timestamp_ms": "1482168932301"}}
This utility removes any limit warnings from output.
Usage:
remove_limit.py aleppo.jsonl > aleppo_no_warni... | Python | 0.000003 | @@ -407,16 +407,52 @@
einput%0A%0A
+limitbreaker = '%7B%22limit%22:%7B%22track%22:'%0A
limit_br
@@ -520,16 +520,45 @@
%0A if
+limitbreaker not in line and
limit_br
|
3623f00026dc10c55e4bdb2500ffe7fe29557380 | Update CassandraCachingServer to use redis, because PageGetter requires it now | hiispider/servers/cassandracaching.py | hiispider/servers/cassandracaching.py | from datetime import datetime
import urllib
from uuid import uuid4
from twisted.internet.defer import DeferredList
from twisted.internet import reactor
from telephus.protocol import ManagedCassandraClientFactory
from telephus.client import CassandraClient
from telephus.cassandra.ttypes import ColumnPath, ColumnParent, ... | Python | 0 | @@ -1,155 +1,21 @@
-from datetime import datetime%0Aimport urllib%0Afrom uuid import uuid4%0Afrom twisted.internet.defer import DeferredList%0Afrom twisted.internet import reactor
+import txredisapi
%0Afro
@@ -125,72 +125,89 @@
om t
-elephus.cassandra.ttypes import ColumnPath, ColumnParent, Column
+wisted.internet im... |
85da6c435c0fd3c6a62d405c948ce716505e9d4d | use disconnect_conn helper | tests/twisted/connect/test-nonblocking-tls.py | tests/twisted/connect/test-nonblocking-tls.py |
"""
Test connecting to a server with 2 accounts. Check one account does not block
the second account.
"""
import os
import sys
import dbus
import servicetest
from twisted.words.xish import domish
from twisted.words.protocols.jabber import xmlstream
from gabbletest import (
make_connection, make_stream, XmppAuth... | Python | 0.000003 | @@ -337,16 +337,37 @@
mlStream
+,%0A disconnect_conn
)%0A%0ANS_XM
@@ -2699,31 +2699,25 @@
ction 2%0A
-conn2.D
+d
isconnect()%0A
@@ -2717,92 +2717,32 @@
nect
-()%0A q.expect('dbus-signal', signal='StatusChanged', args=%5B2, 1%5D)%0A%0A return True
+_conn(q, conn2, stream2)
%0A%0Aif
|
ea68cb39b59fa0713e5b6141129f07d566c1cdcb | Fix protection of files with special characters | rm_protection/rm_p.py | rm_protection/rm_p.py | from sys import argv, exit
from os.path import expanduser as expu, expandvars as expv
from os.path import basename, dirname, abspath, isdir, exists
from subprocess import Popen, PIPE
from builtins import input
from rm_protection.config import Config
c = Config()
evaledpaths = []
def pprint(msg):
global c
pr... | Python | 0 | @@ -2723,109 +2723,8 @@
gs:%0A
- for sym in %22%5C%5C#;,%5C'%5C%22%7C%7B%7D%5B%5D() *&?@~+-%3C%3E=!%22:%0A arg = (%22%5C%5C%22+sym).join(arg.split(sym))%0A
@@ -4141,35 +4141,46 @@
args +=
+bash_path(
arg
+)
+ ' '%0A Popen
@@ -4384,24 +4384,34 @@
iles +=
+bash_path(
evalpath
... |
8e0c8dce48a427ee59db54a0cc98eb9c264feb35 | Remove zookeeper_connect and log_dir options for KafkaBroker | tyr/servers/kafka/broker.py | tyr/servers/kafka/broker.py | from tyr.servers.server import Server
VOLUME_TYPES = ['standard', 'io1', 'gp2', 'sc1', 'st1']
class KafkaBroker(Server):
SERVER_TYPE = 'kafka'
CHEF_RUNLIST = ['role[RoleKafka]']
IAM_ROLE_POLICIES = [
'allow-describe-instances',
'allow-describe-tags',
'allow-volume-control'
... | Python | 0.000001 | @@ -176,13 +176,13 @@
ole%5B
-RoleK
+rolek
afka
@@ -883,99 +883,20 @@
one,
-%0A volume_type=None, logdir_root=None,%0A zookeeper_connection
+ volume_type
=Non
@@ -1098,104 +1098,8 @@
type
-%0A self.logdir_root = logdir_root%0A self.zookeeper_connection = zookeeper_conn... |
9d9095574101862171f3a0cc5ee3fc4b4dd552e1 | allow strings to be used for Numeric inputs; hack to deal with JS sending us strings for this | src/biokbase/narrative/common/kbtypes.py | src/biokbase/narrative/common/kbtypes.py | """
KBase data types
"""
__author__ = 'Dan Gunter <dkgunter@lbl.gov>'
__date__ = '11/15/13'
## Imports
import json
import re
# Third-party
from IPython.utils.traitlets import HasTraits, TraitType, TraitError
from IPython.utils import traitlets as tls
class TypeMeta(object):
"""Mix-in so type metadata is easy to ... | Python | 0 | @@ -2997,24 +2997,306 @@
%22a number%22%0A%0A
+ def validate(self, obj, value):%0A %22%22%22Silently coerce strings to numbers.%0A %22%22%22%0A if isinstance(value, basestring):%0A try:%0A value = float(value)%0A except ValueError:%0A self.err... |
5aeab439a081d7bb06777072f912d9443181aac9 | Fix dhcp_build | cyder/management/commands/dhcp_build.py | cyder/management/commands/dhcp_build.py | from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from cyder.cydhcp.build.builder import DHCPBuilder
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
### action options ###
make_option('-p', '--push',
dest=... | Python | 0.000002 | @@ -1,12 +1,26 @@
+import syslog%0A
from optpars
|
eed6cc0918c2fdcc7282c1a3a66653b0c3faa5fd | allow new qvm connections to be passed into max_cut | grove/pyqaoa/maxcut_qaoa.py | grove/pyqaoa/maxcut_qaoa.py | ##############################################################################
# Copyright 2016-2017 Rigetti Computing
#
# 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... | Python | 0 | @@ -1107,16 +1107,33 @@
eed=None
+, connection=None
):%0A %22
@@ -1653,16 +1653,68 @@
.0)%5D))%0A%0A
+ if connection is None:%0A connection = CXN%0A
qaoa
@@ -1726,19 +1726,26 @@
= QAOA(
-CXN
+connection
, len(gr
|
d3b374a705a72ef3d0ad2da332f056f04063ae92 | Add -t alias to --tag flag for preprocess command. | grow/commands/preprocess.py | grow/commands/preprocess.py | from grow.common import utils
from grow.pods import pods
from grow.pods import storage
import click
import os
@click.command()
@click.argument('pod_path', default='.')
@click.option('--all', '-A', 'run_all', is_flag=True, default=False,
help='Whether to run all preprocessors, even if a preprocessor'
... | Python | 0 | @@ -593,18 +593,16 @@
ag', '-t
-ag
', type=
|
b04322051ff932f018a96f417fb5fdb7b10b657f | Test to rebuilt | gameTestScene.py | gameTestScene.py | import sys
import pygame
from buffalo import utils
from buffalo.scene import Scene
from buffalo.label import Label
from saves import Saves
from chunk import Chunk
from camera import Camera
from mapManager import MapManager
from pluginManager import PluginManager
from inventoryUI import InventoryUI
from inventory impo... | Python | 0 | @@ -837,16 +837,17 @@
c_name):
+
%0A
|
bbc97d650d1731c1e89587183f58652e254bb7bb | Tag new release: 3.9.4 | floo/version.py | floo/version.py | PLUGIN_VERSION = '3.9.3'
# The line above is auto-generated by tag_release.py. Do not change it manually.
try:
from .common import shared as G
assert G
except ImportError:
from common import shared as G
G.__VERSION__ = '0.11'
G.__PLUGIN_VERSION__ = PLUGIN_VERSION
| Python | 0 | @@ -15,17 +15,17 @@
= '3.9.
-3
+4
'%0A# The
|
1be1200b94b852b84eb8e8a7e95cbc528f5ec114 | Tag new release: 3.5.1 | floo/version.py | floo/version.py | PLUGIN_VERSION = '3.5.0'
# The line above is auto-generated by tag_release.py. Do not change it manually.
try:
from .common import shared as G
assert G
except ImportError:
from common import shared as G
G.__VERSION__ = '0.11'
G.__PLUGIN_VERSION__ = PLUGIN_VERSION
| Python | 0 | @@ -15,17 +15,17 @@
= '3.5.
-0
+1
'%0A# The
|
91cb7b80f12ebb8d8f7b1b4110dea8ec6a0c0d71 | Bump version number to 0.0.4 | gapy/__init__.py | gapy/__init__.py | __title__ = "gapy"
__version__ = "0.0.3"
__author__ = "Rob Young"
from .error import GapyError
from .client import client_from_private_key, client_from_secrets_file
| Python | 0.000168 | @@ -35,9 +35,9 @@
0.0.
-3
+4
%22%0A__
|
fbf014285baa61b8294ef5dd27ea3e61c964e9b0 | add depend product_uom_qty in missing_quantity | mrp_shipment/models/sale_order_line.py | mrp_shipment/models/sale_order_line.py | # -*- coding: utf-8 -*-
# © <YEAR(S)> <AUTHOR(S)>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import _, api, fields, models
class SaleOrderLine(models.Model):
_inherit = 'sale.order.line'
quantity_shipped = fields.Float(
string=_(u'Quantity shipped'),
co... | Python | 0.000029 | @@ -1137,32 +1137,51 @@
uantity_shipped'
+, 'product_uom_qty'
)%0A def _missi
|
918163759c878acf4da256f964cf5722abd2eebd | Bump TF toolchains | tensorflow/workspace3.bzl | tensorflow/workspace3.bzl | """TensorFlow workspace initialization. Consult the WORKSPACE on how to use it."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//third_party:tf_runtime/workspace.bzl", tf_runtime = "repo")
load("//third_party/llvm:workspace.bzl", llvm = "repo")
def workspace():
http_archive(
... | Python | 0.000001 | @@ -909,72 +909,72 @@
= %22
-43a2e1805a2099c18555ae78dad7a3729c581386847d992a3f02077fc07c5fa2
+d550e6260b7bd8a7f2c2e3a20ba3c4b6c519985f5a164a1bf3601dd96852a05b
%22,%0A
@@ -1011,17 +1011,17 @@
ins-1.4.
-3
+6
%22,%0A
@@ -1112,33 +1112,33 @@
ns/archive/v1.4.
-3
+6
.tar.gz%22,%0A
@@ -1198,17 +1198,17 @@
... |
bf72c89a13f0df2ee8da68315e1aaa72b0dd51ef | Fix dictionary key name | ir/view.py | ir/view.py | from anki.hooks import addHook
from aqt import mw
from .util import isIrCard, loadJsFile, viewingIrText
class ViewManager:
def __init__(self):
self.scrollScript = loadJsFile('scroll')
self.textScript = loadJsFile('text')
self.widthScript = loadJsFile('width')
self.zoomFactor = 1
... | Python | 0.999957 | @@ -564,19 +564,16 @@
imit
-Global
Width
+All
'%5D):
|
a4c5ac99b09d578bcc95584c09fedf94302c63db | Fix to sidebar | src/chime_dash/app/components/sidebar.py | src/chime_dash/app/components/sidebar.py | """components/sidebar
Initializes the side bar containing the various inputs for the model
#! _INPUTS should be considered for moving else where
"""
import dash_html_components as dhc
from typing import List, Dict, Any, Tuple
from collections import OrderedDict
from dash.development.base_component import ComponentMe... | Python | 0 | @@ -4037,16 +4037,17 @@
e_model(
+*
input_va
@@ -4052,16 +4052,18 @@
values,
+**
kwargs):
|
7901a43b6d64a87d06af834a2ad90cb54c2d6c4b | Make sure to store original bridge and fall back on it when appropriate | ir/view.py | ir/view.py | # Copyright 2013 Tiago Barroso
# Copyright 2013 Frank Kmiec
# Copyright 2013-2016 Aleksej
# Copyright 2017-2019 Joseph Lorimer <joseph@lorimer.me>
#
# Permission to use, copy, modify, and distribute this software for any purpose
# with or without fee is hereby granted, provided that the above copyright
# notice and thi... | Python | 0 | @@ -1248,16 +1248,50 @@
tor = 1%0A
+ self.origBridgeCmd = None%0A
@@ -1784,24 +1784,76 @@
('review'):%0A
+ self.origBridgeCmd = mw.web.onBridgeCmd%0A
@@ -2666,32 +2666,108 @@
ck%0A )
+%0A elif self.origBridgeCmd:%0A return self.origBridgeCmd(cmd)... |
2f9e49d486a307406c72ef5f3fedb8ab97081096 | Add files via upload | form_backend.py | form_backend.py | #!/usr/bin/python
import mysql.connector
from mysql.connector import errorcode
# Import modules for CGI handling
import cgi, cgitb
# Create instance of FieldStorage
form = cgi.FieldStorage()
cnn=mysql.connector.connect(user = "root", password = "", host = "localhost", database = "shouut")
cursor=cnn.cursor()
name ... | Python | 0 | @@ -447,16 +447,39 @@
obile')%0A
+id=form.getvalue('id')%0A
print %22C
@@ -595,19 +595,25 @@
/head%3E%22%0A
-sql
+registers
= 'SELE
@@ -636,16 +636,17 @@
seats'%0A
+%0A
cursor.e
@@ -652,19 +652,25 @@
execute(
-sql
+registers
)%0A# Fetc
@@ -710,17 +710,25 @@
.%0Aresult
-s
+_register
= curso
@@ -740,16 +740,... |
167ab912ee1ec48068d7e146deb2788b1774447d | validate webmention endpoint | ronkyuu/webmention.py | ronkyuu/webmention.py | #!/usr/bin/env python
"""
:copyright: (c) 2013 by Mike Taylor and Kartik Prabhu
:license: MIT, see LICENSE for more details.
IndieWeb Webmention Tools
"""
import os
import sys
import requests
import re
from urlparse import urlparse
from bs4 import BeautifulSoup, SoupStrainer
from validators import URLValidator
#... | Python | 0 | @@ -59,26 +59,8 @@
ylor
- and Kartik Prabhu
%0A:li
@@ -1343,21 +1343,16 @@
a post.
-%0A%0A
Only sc
@@ -2039,17 +2039,16 @@
%22%22%22%0A
-%0A
if t
@@ -2165,16 +2165,17 @@
atus':
+
requests
@@ -2213,16 +2213,17 @@
eaders':
+
None,%0A
@@ -2249,16 +2249,17 @@
ontent':
+
content
@@ -2255,24 ... |
d1e7e74bd779d815ea10fa38569e6a701eb8fedc | add new contract methods to storage backend | src/ipynbsrv/backends/storage_backends.py | src/ipynbsrv/backends/storage_backends.py | from ipynbsrv.common.utils import FileSystem
from ipynbsrv.contract.backends import StorageBackend
from ipynbsrv.contract.errors import DirectoryNotFoundError, StorageBackendError
class LocalFileSystem(StorageBackend):
"""
Storage backend implementation using the local filesystem as the underlaying backend.
... | Python | 0 | @@ -738,32 +738,368 @@
ckendError(ex)%0A%0A
+ def get_dir_gid(self, dir_name, **kwargs):%0A %22%22%22%0A :inherit.%0A %22%22%22%0A if not self.dir_exists(dir_name):%0A raise DirectoryNotFoundError(%22Directory does not exist.%22)%0A%0A try:%0A return self._fs... |
7dbd90bd95f46115d29c83dd5057b98ce546095e | Add option to trigger one generation per week (#2156) | src/codecoverage/bot/tools/covdir_gen.py | src/codecoverage/bot/tools/covdir_gen.py | # -*- coding: utf-8 -*-
import argparse
import os
from datetime import datetime
import requests
from taskcluster.utils import slugId
from cli_common import taskcluster
from code_coverage_bot.github import GitHubUtils
from code_coverage_bot.secrets import secrets
CODECOV_URL = 'https://codecov.io/api/gh/marco-c/gecko... | Python | 0 | @@ -774,19 +774,12 @@
ique
-_dates=Fals
+=Non
e, s
@@ -852,24 +852,67 @@
cov%0A '''%0A
+ assert unique in (None, 'week', 'day')%0A
params =
@@ -1019,17 +1019,18 @@
0%0A da
-y
+te
s = set(
@@ -1293,16 +1293,24 @@
hat day
+or week
has alre
@@ -1437,23 +1437,67 @@
-if unique_dates
+week = day.... |
d4e7f49f25b7ab4bf83b273cc08e002e7e7f6c7f | Use the animator module in framebuilder | framebuilder.py | framebuilder.py | import audiovisualizer
import PIL.Image
import PIL.ImageDraw
import pylab
import scipy
import scipy.io
import scipy.signal
# The sample rate of the input matrix (Hz)
SAMPLE_RATE=44100
# Frequency range to display (audible is 16-16384Hz)
DISPLAY_FREQ=(16, 1000)
# FPS of output (Hz)
OUT_FPS = 30
# Size of the moving ave... | Python | 0.000001 | @@ -370,17 +370,17 @@
SIZE = (
-4
+8
00, 400)
@@ -508,32 +508,16 @@
E_RATE)%0A
-print(mf.shape)%0A
mf = aud
@@ -605,24 +605,8 @@
IME)
-%0Aprint(mf.shape)
%0A%0Adr
@@ -706,16 +706,392 @@
_TIME)%0A%0A
+FC=10/(0.5*SAMPLE_RATE)%0AN=1001%0Aa=1%0Ab=scipy.signal.firwin(N, cutoff=FC, window='hamming')%0A#lowpassed = sci... |
0e26296367ea3ecccfe8e9fc94cb577a9cb4bbb8 | fix waiting for processes when we hit MAX_PROCS | van/static/testing.py | van/static/testing.py | """Static resources testing support."""
import os
import subprocess
import tempfile
MAX_PROCS = 4
try:
import multiprocessing
MAX_PROCS = multiprocessing.cpu_count() * 2
except ImportError:
pass
except NotImplementedError:
pass
def assert_jslint_dir(path, failfast=False):
"""Run jslint on all .js ... | Python | 0 | @@ -1631,16 +1631,19 @@
ues()%5B0%5D
+%5B0%5D
.wait()%0A
|
913985dec32feadc84428b48cf463d8589ed1396 | Test zero_momentum after attaching | hoomd/md/pytest/test_zero_momentum.py | hoomd/md/pytest/test_zero_momentum.py | import hoomd
import numpy as np
import pytest
def test_before_attaching():
trigger = hoomd.trigger.Periodic(100)
zm = hoomd.md.update.ZeroMomentum(trigger)
assert zm.trigger is trigger
trigger = hoomd.trigger.Periodic(10, 30)
zm.trigger = trigger
assert zm.trigger is trigger
| Python | 0 | @@ -276,28 +276,751 @@
sert zm.trigger is trigger%0A%0A
+%0Adef test_after_attaching(simulation_factory,%0A two_particle_snapshot_factory):%0A brownian = hoomd.md.methods.Brownian(filter=hoomd.filter.All(),%0A kT=hoomd.variant.Constant(2.0),%0A ... |
e16773e236ff4ec0557310ce072d975759e5c70c | add new test | verification/tests.py | verification/tests.py | """
TESTS is a dict with all you tests.
Keys for this will be categories' names.
Each test is dict with
"input" -- input data for user function
"answer" -- your right answer
"explanation" -- not necessary key, it's using for additional info in animation.
"""
from random import choice, random
BASIC_TESTS = ... | Python | 0.000001 | @@ -1804,16 +1804,248 @@
,%0A ),
+%0A (%0A %22.....XX..2%22,%0A %22.........3%22,%0A %22..X......X%22,%0A %22..XXXXXXXX%22,%0A %22..........%22,%0A %22..........%22,%0A %22XXXXXXX...%22,%0A %221.......F4%22,%0A %22X.XXXXXX..%22,%0A %22........... |
c98879268c01a67abe88c2f8e15bff9d93d587cc | Remove test skipping since #1396954 was fixed | horizon/test/jasmine/jasmine_tests.py | horizon/test/jasmine/jasmine_tests.py | # 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, software
# distributed under t... | Python | 0 | @@ -543,42 +543,8 @@
e.%0A%0A
-from django.utils import unittest%0A
%0Afro
@@ -587,65 +587,8 @@
t%0A%0A%0A
-@unittest.skip(%22Temporarily disabled, see bug #1396954%22)%0A
clas
|
20d21b851d02bbcf8c6a0f065b9f05f5e0bfc662 | Use format=5 in YT search to prevent "embedding disabled" | geodj/youtube.py | geodj/youtube.py | from gdata.youtube.service import YouTubeService, YouTubeVideoQuery
from django.utils.encoding import smart_str
import re
class YoutubeMusic:
def __init__(self):
self.service = YouTubeService()
def search(self, artist):
query = YouTubeVideoQuery()
query.vq = artist
query.orderb... | Python | 0 | @@ -360,16 +360,43 @@
xclude'%0A
+ query.format = '5'%0A
|
29076f5d1f93601bbab4783e38d2df82badf4891 | Add sources to sub-objects. | pupa/scrape/helpers.py | pupa/scrape/helpers.py | """ these are helper classes for object creation during the scrape """
from larvae.person import Person
from larvae.organization import Organization
from larvae.membership import Membership
class Legislator(Person):
_is_legislator = True
__slots__ = ('district', 'party', 'chamber', '_contact_details')
de... | Python | 0 | @@ -909,16 +909,51 @@
e=role)%0A
+ org.sources = self.sources%0A
@@ -1297,32 +1297,70 @@
**kwargs)%0A
+ member.sources = self.sources%0A
self._re
|
69da3366c1fe48dac3a624bc3e5f0dfa22012a73 | Define paths for coadd files under bricks/ | py/desispec/io/meta.py | py/desispec/io/meta.py | #
# See top-level LICENSE file for Copyright information
#
# -*- coding: utf-8 -*-
import os
import os.path
import datetime
import glob
import re
def findfile(filetype, night=None, expid=None, camera=None, brickid=None, band=None, specprod=None):
"""
Returns location where file should be
Args:
... | Python | 0 | @@ -1413,24 +1413,171 @@
kid%7D.fits',%0A
+ coadd = '%7Bspecprod%7D/bricks/%7Bbrickid%7D/coadd-%7Bband%7D-%7Bbrickid%7D.fits',%0A coadd_all = '%7Bspecprod%7D/bricks/%7Bbrickid%7D/coadd-%7Bbrickid%7D.fits',%0A
)%0A lo
|
78d24efff349d70d9eb2d766617374c25865ab18 | Add some spaces in Student.__str__ | student.py | student.py | from major import Major
from concentration import Concentration
from course import Course, getCourse
from standing import Standing
from ID import ID
from yaml import load, dump
try:
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
from yaml import Loader, Dumper
from helpers import ge... | Python | 0.999874 | @@ -3584,13 +3584,8 @@
%5Cn'%0A
-%09%09%09%09%0A
%0A%0A%09%09
@@ -4278,16 +4278,17 @@
= '%5Cn'%0A%0A
+%0A
%09%09output
|
822b119e770f3494cd622f7723350faa518bf984 | Simplify redirect code and make it easier to read | views/inbox/delete.py | views/inbox/delete.py | ##
# Copyright (C) 2013 Jessica Tallon & Matt Molyneaux
#
# This file is part of Inboxen.
#
# Inboxen is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, o... | Python | 0.000001 | @@ -1079,16 +1079,82 @@
(%22@%22, 1)
+%0A daes = alias == %22support%22 #daes = does alias equal support :P
%0A%0A tr
@@ -1193,34 +1193,20 @@
aff and
-alias == %22support%22
+daes
:%0A
@@ -1521,106 +1521,15 @@
-# todo: could this be done better?%0A if request.META%5B%22HTTP_REFERER%22%5D.endsw... |
855ae722340cfaaef6a6e9cc1be91e43bc46f0c8 | Add inclusion of jasyhelper from appcache in unify | unify/support/jasy/unify.py | unify/support/jasy/unify.py | import webbrowser, http.server, os, multiprocessing
def unify_source():
# Permutation independend config
jsFormatting.enable("comma")
jsFormatting.enable("semicolon")
jsOptimization.disable("privates")
jsOptimization.disable("variables")
jsOptimization.disable("declarations")
jsOptimization... | Python | 0 | @@ -44,16 +44,237 @@
ocessing
+%0Afrom jasy.core import Project%0A%0Aappcache_project = Project.getProjectByName(%22appcache%22)%0Aexec(compile(open(os.path.realpath(os.path.abspath(appcache_project.getPath() + %22/jasyhelper.py%22))).read(), %22jasyhelper.py%22, 'exec'))
%0A%0Adef un
|
2e8f6d4daf72d5612d1e18b5ef997710bb6ddf79 | Fix tests by returning get_service() method | pycloudflare/models.py | pycloudflare/models.py | from property_caching import (
cached_property, clear_property_cache, set_property_cache)
from six import iteritems, itervalues
from pycloudflare.services import (
CloudFlareHostService, CloudFlarePageIterator, CloudFlareService)
class User(object):
def __init__(self, email, api_key):
self.email ... | Python | 0.000007 | @@ -375,27 +375,26 @@
rvice =
-CloudFlareS
+self.get_s
ervice(a
@@ -453,24 +453,24 @@
rvice(cls):%0A
-
retu
@@ -493,24 +493,147 @@
tService()%0A%0A
+ @classmethod%0A def get_service(cls, email, api_key):%0A return CloudFlareService(email=email, api_key=api_key)%0A%0A
@classme
|
83c05deb9fd824abe3f48d3b4a9992ad80bb0816 | Add helpful warning for `.contains(None)` | pycroft/model/types.py | pycroft/model/types.py | # Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
from datetime import datetime
from decimal import Decimal
from numbers import Number
from typing import Optional... | Python | 0.000033 | @@ -5182,16 +5182,145 @@
%22%22%22%0A
+ if other is None:%0A raise PycroftModelException('You cannot use %60.contains()%60 with %60null%60 (%60None%60)!')%0A%0A
@@ -5358,25 +5358,24 @@
rison=True)%0A
-%0A
|
07702a4bee3238e74878c964c2fab2f3ba34efb6 | Add value to TsTzRange error message | pycroft/model/types.py | pycroft/model/types.py | # Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
from datetime import datetime
from decimal import Decimal
from numbers import Number
from typing import Optional... | Python | 0 | @@ -4221,16 +4221,26 @@
ge value
+ %7Bvalue!r%7D
of type
|
b7aef5fe6ddfced35cb7546e73b6a256f9de79d9 | use requests instead of urllib | iRODS/scripts/python/validate_json.py | iRODS/scripts/python/validate_json.py | from __future__ import print_function
import json
import sys
try:
# python 3+
from urllib.request import urlopen
except ImportError:
# python 2
from urllib2 import urlopen
if len(sys.argv) != 3:
sys.exit('Usage: {0} configuration_file schema_url'.format(sys.argv[0]))
def print_error(*args, **kwarg... | Python | 0 | @@ -58,134 +58,23 @@
sys%0A
-try:%0A # python 3+%0A from urllib.request import urlopen%0Aexcept ImportError:%0A # python 2%0A from urllib2 import urlopen
+import requests
%0A%0Aif
@@ -119,16 +119,17 @@
ge: %7B0%7D
+%3C
configur
@@ -138,17 +138,19 @@
ion_file
-
+%3E %3C
schema_u
@@ -151,16 +151,17 @@... |
57186d4cd86927d44cb1122cae216f53ff821a2c | command delta can be none | unlock/model/scope_state.py | unlock/model/scope_state.py | # Copyright (c) James Percent, Byron Galbraith and Unlock contributors.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notic... | Python | 0.999999 | @@ -2423,32 +2423,74 @@
self, command):%0A
+ if command.delta is not None:%0A
self.ela
@@ -2503,32 +2503,36 @@
= command.delta%0A
+
if self.
@@ -2565,32 +2565,36 @@
te:%0A
+
+
self.state_chang
@@ -2594,32 +2594,36 @@
e_change = True%0A
+
self
@@ -48... |
b416f7bb0d713d5b6949b0bd3b70d802ffd528fa | test many | test/test_init.py | test/test_init.py | import unittest
import sys
import datetime
import time
import random
from threading import Thread
from PyQt4 import QtCore, QtGui
from dp.src.utils.utils import Utils
from dp.src.rpc.peer import Peer
from dp.src.ui.stroke import Stroke
from dp.src.rpc.clerk import Clerk
class TestSimple(unittest.TestCase):
""... | Python | 0.00001 | @@ -3665,16 +3665,394 @@
qual()%0A%0A
+ def test_manypeers(self):%0A self.addMultipleServers(2)%0A cks = %5B%5D%0A for i in range(self.peers):%0A cks.append(Clerk(self.peers%5Bi%5D.state));%0A s = self.genRandomStrokes(12)%0A for stroke in s:%0A i = random.ra... |
fb352cc94bceba227b3c20a45e26f90af38409d7 | Add remount function, clean up mount function | salt/modules/mount.py | salt/modules/mount.py | '''
Salt module to manage unix mounts and the fstab file
'''
# Import python libs
import os
def active():
'''
List the active mounts.
CLI Example:
salt '*' mount.active
'''
ret = {}
for line in __salt__['cmd.run_stdout']('mount').split('\n'):
comps = line.split()
if not len... | Python | 0.000001 | @@ -4079,17 +4079,17 @@
Moun
-d
+t
a devic
@@ -4161,24 +4161,89 @@
rue%0A '''%0A
+ if type(opts) == type(str()):%0A opts = opts.split(',')%0A
if not o
@@ -4422,24 +4422,51 @@
edirs(name)%0A
+ lopts = ','.join(opts)%0A
cmd = 'm
@@ -4494,16 +4494,17 @@
.format(
+l
opts, de
@@ -4616,16... |
cc1e2e85d86f728d2d90599c752a9d52ca3b756f | Add connection pytest fixture | test_journal.py | test_journal.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import pytest
from sqlalchemy import create_engine
from sqlalchemy.exc import IntegrityError
TEST_DATABASE_URL = os.environ.get(
'DATABASE_URL',
'postgresql://jonathan:@localhost:5432/test-learning-journal'
)
os.environ['DATABASE_URL'] =... | Python | 0 | @@ -379,8 +379,400 @@
journal%0A
+%0A%0A@pytest.fixture(scope='session')%0Adef connection(request):%0A engine = create_engine(TEST_DATABASE_URL)%0A journal.Base.metadata.create_all(engine)%0A connection = engine.connect()%0A journal.DBSession.registry.clear()%0A journal.DBSession.configure(bind=connecti... |
175f32ea419e43766216b7692436d5614405a7b2 | remove print statements | synthia.py | synthia.py | """
Synthia
~~~~~~
The Synthetic Intelligent Assistant for your home
"""
from flask import Flask
import weather, requests, json, play_audio
app = Flask(__name__)
# Calls a function to get a customer morning message, then plays it
def play_morning_message():
message = get_morning_message()
play_aud... | Python | 0.999999 | @@ -941,116 +941,8 @@
r)%0A%0A
- print(current_weather)%0A print(weather.RAIN)%0A print(current_weather_reminder_message)%0A%0A
|
85de1ef62b6e2a6e6eeefff482c09b8bb7bdd635 | Fix lm_pwc | openliveq/features/textual_features.py | openliveq/features/textual_features.py | from math import log
def tf_sum(q, d, c):
"""
ID 1 for OHSUMED
"""
result = 0.0
for w in set(q) & set(d):
result += d[w]
return result
def log_tf_sum(q, d, c):
"""
ID 2 for OHSUMED
"""
result = 0.0
for w in set(q) & set(d):
result += log(d[w] + 1)
return... | Python | 0.002489 | @@ -2691,27 +2691,36 @@
n float(c.cf
-%5Bw%5D
+.get(w, 0.0)
+ 1.0) / (c
|
ba2c8da7567b30fae085b1c38f2939969463c2c5 | Fix primitive onluy for cif. | pymatgen/io/smartio.py | pymatgen/io/smartio.py | #!/usr/bin/env python
"""
This class implements smart io classes that performs intelligent io based on
file extensions.
"""
from __future__ import division
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Shyue Ping Ong"
__email__ = "shyuep@g... | Python | 0 | @@ -1339,33 +1339,42 @@
cell
-. Defaults to%0A
+ for cifs.%0A Defaults to
Fal
@@ -2473,66 +2473,8 @@
!%22)%0A
- if primitive:%0A s = s.get_primitive_structure()%0A
|
1d6bb5e7ce706c8f54599f98744f3a5d62ce104e | Replace get_base_dir and set_base_dir with more abstract methods get and set | src/config.py | src/config.py | import os
import ConfigParser as configparser
class Config(object):
def __init__(self):
self.config = configparser.RawConfigParser()
self.configfile = os.path.expanduser('~/.mmetering-clirc')
if not os.path.isfile(self.configfile):
# setup a new config file
self.ini... | Python | 0.000001 | @@ -688,25 +688,199 @@
def
-get_base_dir(self
+set(self, section, name, value):%0A val = os.path.expanduser(value)%0A%0A self.read()%0A self.config.set(section, name, val)%0A self.write()%0A%0A def get(self, section, name
):%0A
@@ -946,39 +946,29 @@
fig.get(
-'mmetering', 'base_dir'
... |
26dc2aaa97d043efe4c82516afe1e5b09d49bd8a | add remove_subtitle | subfind/utils/subtitle.py | subfind/utils/subtitle.py | # Credit to https://github.com/callmehiphop/subtitle-extensions/blob/master/subtitle-extensions.json
subtitle_extensions = [
"aqt",
"gsub",
"jss",
"sub",
"ttxt",
"pjs",
"psb",
"rt",
"smi",
"slt",
"ssf",
"srt",
"ssa",
"ass",
"usf",
"idx",
"vtt"
]
def ... | Python | 0.000123 | @@ -94,16 +94,61 @@
ns.json%0A
+import os%0A%0Afrom os.path import join, exists%0A%0A
subtitle
@@ -161,16 +161,20 @@
sions =
+set(
%5B%0A %22a
@@ -355,16 +355,17 @@
%22vtt%22%0A%5D
+)
%0A%0A%0Adef g
@@ -524,16 +524,16 @@
rn ext%0A%0A
-
retu
@@ -524,24 +524,240 @@
rn ext%0A%0A return None%0A
+%0A%0A... |
1b5e2c9b312d215a9c506064f90a010af6510c86 | fix monitor_disk_usage error | utils/monitor_disk_usage.py | utils/monitor_disk_usage.py | #!/usr/local/bin/python3
import sys
sys.path.append('/srv/newsblur')
import subprocess
import requests
from newsblur_web import settings
import socket
def main():
df = subprocess.Popen(["df", "/"], stdout=subprocess.PIPE)
output = df.communicate()[0]
device, size, used, available, percent, mountpoint = ou... | Python | 0.000002 | @@ -253,16 +253,32 @@
ate()%5B0%5D
+.decode('utf-8')
%0A dev
|
730e55c6ba1696c57af780b2b93724e128ab7d19 | Set custom logging format | pyproteome/__init__.py | pyproteome/__init__.py |
from .utils import DEFAULT_DPI
from .analysis import (
correlation, tables, volcano,
)
from .motifs import (
logo, motif, phosphosite,
)
from . import (
analysis, bca, data_sets, discoverer, levels,
loading, modification, motifs, paths, pride, protein, sequence,
utils, version,
)
from . import clus... | Python | 0.000001 | @@ -1234,24 +1234,58 @@
, Counter%22,%0A
+ %22import logging%22,%0A
@@ -1977,33 +1977,124 @@
%22
-import logging
+formatter = logging.Formatter('%25(asctime)s - %25(name)s - %22%0A %22%25(levelname)s - %25(message)s')
%22,%0A
+%0A
@@ -2127,24 +2127,25 @@
... |
73fcd0997ae18f1a26984f65ced6147ba268658e | update intersphinx links | documentation/conf.py | documentation/conf.py | # -*- coding: utf-8 -*-
#
# six documentation build configuration file
import os
import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like ... | Python | 0 | @@ -6921,16 +6921,18 @@
hon.org/
+2/
%22, None)
@@ -6993,12 +6993,9 @@
org/
-py3k
+3
/%22,
|
6b31df80021a7d781fddcaece109dc3d1ab72c2c | Made a grammar change: 'this branches' -> 'these branches' | gitless/cli/gl_init.py | gitless/cli/gl_init.py | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git
# Licensed under MIT
"""gl init - Create an empty repo or make a clone."""
from __future__ import unicode_literals
import os
from gitless import core
from . import pprint
def parser(subparsers, _):
"""Adds the init parser to the ... | Python | 0.999993 | @@ -902,10 +902,11 @@
t th
-is
+ese
bra
|
a9c86f97a5de88501b1e4938e33638c25f947541 | Exit script if there are no files to change | download_cars_gtas.py | download_cars_gtas.py | import boto3
import datetime
import os
import re
import argparse
import pandas as pd
# if the contents of the row aren't empty and "null" is in it, delete the contents of the row
def replace_null(row, column_name):
if row[column_name] and 'null' in row[column_name]:
return None
return row[column_name]
... | Python | 0.000001 | @@ -2857,17 +2857,19 @@
oading '
-+
+ +
todays_g
@@ -3240,16 +3240,32 @@
m:%25S%22)))
+%0A exit(0)
%0A%0Aif __n
|
baa5500606b404cd8b270a12c9ec8995af8910ec | Remove debug prints | verellen/retailers/views.py | verellen/retailers/views.py | from django.shortcuts import render, redirect
from django.db.models import Q
import re
from retailers.models import Retailer
def home(request):
all = Retailer.objects.all()
matches = all
showing_all = True
query = ""
if 'query' in request.GET.keys():
showing_all = False
query = re... | Python | 0.000001 | @@ -546,27 +546,8 @@
(s)%0A
- print array
%0A
|
b2edd97e40bb233b11b75a2c10a61672b0afe94c | Add a doc diff fallback | tests/common.py | tests/common.py | import operator
from pathlib import Path
from typing import Dict, Iterable
import pytest
import rapidjson
from click.testing import CliRunner, Result
from deepdiff import DeepDiff
from deepdiff.model import DiffLevel
from ruamel import yaml
from shapely.geometry.base import BaseGeometry
from eodatasets3 import serial... | Python | 0 | @@ -6217,16 +6217,139 @@
t.t1)%7D%22)
+%0A # Anything we missed from the (sometimes changing) diff api?%0A if len(out) == 1:%0A out.append(repr(doc_diffs))
%0A%0A #
|
7771fd90ea49c81a375c3a8601b7568924e67078 | add o binary probs to be sure | bin/bootstrapModel.py | bin/bootstrapModel.py | #!/usr/bin/env python
#Copyright (C) 2014 by Glenn Hickey
#
#Released under the MIT license, see LICENSE.txt
import unittest
import sys
import os
import argparse
import logging
import random
import numpy as np
from teHmm.common import myLog, EPSILON, initBedTool, cleanBedTool
from teHmm.common import addLoggingOption... | Python | 0 | @@ -6018,16 +6018,173 @@
inary%22:%0A
+ efile.write(%22%25s%5Ct%25s%5Ct%25s%5Ct%25e%5Cn%22 %25 (trackName, stateName,%220%22,%0A emProbs%5BtrackNo%5D%5BstateNo%5D%5B1%5D))%0A
|
49c81dde99d2cd387e61667c000a2f1352f8b38e | version updated, 0.9.4.13 | dp_tornado/version.py | dp_tornado/version.py | __version_info__ = (0, 9, 4, 12)
__version__ = '.'.join(map(str, __version_info__))
| Python | 0.000001 | @@ -27,9 +27,9 @@
4, 1
-2
+3
)%0A__
|
c5ed1b2d6ae94c88c20ff34937f20a3267f0eb98 | fix bug | python-cgi/savefile.py | python-cgi/savefile.py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import cgi, os,sys, urllib
import cgitb; cgitb.enable()
import xml.etree.ElementTree as ET
import json
import string
########################################################################
def is_dictionary_word(word):
word_without_punctuation = word.encode('utf-8').transla... | Python | 0.000001 | @@ -1751,26 +1751,20 @@
ee = ET.
-ElementTre
+pars
e(file =
@@ -1817,22 +1817,21 @@
in
-tree.iter(tag=
+root.findall(
'Val
|
416e4a4db29beeb143333064c945e889b0fa739b | version updated, 0.9.4.14 | dp_tornado/version.py | dp_tornado/version.py | __version_info__ = (0, 9, 4, 13)
__version__ = '.'.join(map(str, __version_info__))
| Python | 0.000001 | @@ -27,9 +27,9 @@
4, 1
-3
+4
)%0A__
|
abc1300e103a521fab14690b095ed651ce9fe327 | move SOAP request method back to service class, refs #9 | python-upnp/service.py | python-upnp/service.py | # Elisa - Home multimedia server
# Copyright (C) 2006 Fluendo, S.A. (www.fluendo.com).
# All rights reserved.
#
# This software is available under three license agreements.
#
# There are various plugins and extra modules for Elisa licensed
# under the MIT license. For instance our upnp module uses this license.
#
# ... | Python | 0 | @@ -2281,24 +2281,277 @@
_actions()%0A%0A
+ def _get_client(self, name):%0A url = self.get_control_url()%0A namespace = self.get_type()%0A action = %22%25s#%25s%22 %25 (namespace, name)%0A client = SOAPProxy( url, namespace=(%22u%22,namespace), soapaction=action)%0A return client%... |
546322c384de78254b166c32f994bbb3de85e248 | Revert "Make sure Cassandra is started only once" | hecuba_py/tests/__init__.py | hecuba_py/tests/__init__.py | import atexit
import ccmlib.cluster
import os
import sys
import tempfile
import logging
from distutils.util import strtobool
class TestConfig:
n_nodes = int(os.environ.get('TEST_CASSANDRA_N_NODES', '2'))
ccm_cluster = None
TEST_DEBUG = strtobool(os.environ.get("TEST_DEBUG", "False").lower())
if TEST_DEBUG:
... | Python | 0 | @@ -142,16 +142,62 @@
ig:%0A
+pass%0A%0A%0Atest_config = TestConfig()%0Atest_config.
n_nodes
@@ -253,33 +253,8 @@
'))%0A
- ccm_cluster = None%0A%0A%0A
TEST
@@ -569,29 +569,53 @@
ster():%0A
-TestC
+global test_config%0A test_c
onfig.ccm_cl
@@ -827,22 +827,56 @@
-if TestC
+global test_config%0A... |
c3c05e13035801a234ab6c3501228bf5a5d00b1a | Write to FilesIDs | src/MCPClient/lib/clientScripts/identifyFileFormat.py | src/MCPClient/lib/clientScripts/identifyFileFormat.py | #!/usr/bin/python2
import argparse
import os
import sys
import uuid
sys.path.append("/usr/lib/archivematica/archivematicaCommon")
from executeOrRunSubProcess import executeOrRun
from databaseFunctions import insertIntoEvents
from databaseInterface import getUTCDate
path = '/usr/share/archivematica/dashboard'
if path... | Python | 0 | @@ -219,17 +219,37 @@
toEvents
+, insertIntoFilesIDs
%0A
-
from dat
@@ -2159,24 +2159,609 @@
e=format)%0A%0A%0A
+def write_file_id(file_uuid, format=None, output=''):%0A if format.pronom_id:%0A format_registry = 'PRONOM'%0A key = format.pronom_id%0A else:%0A format_registry = 'Archivemati... |
a2f452e1dac2b1986c8ae06d3601a4044b959799 | fix typo | tests/domain.py | tests/domain.py | #!/usr/bin/env python
import os
import sys
import unittest
dirname = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(dirname, ".."))
from oshift import *
class TestUser(unittest.TestCase):
"""
Test domain get REST API, under /broker/rest/dodmains
The available actions are:
... | Python | 0.999991 | @@ -270,17 +270,16 @@
/rest/do
-d
mains%0A
|
99df87e5ee17605e8d3d05243e7ec50bb0aa1bb9 | Update __init__.py | vkontakte_viomg/__init__.py | vkontakte_viomg/__init__.py | from vkontakte_viomg.api import API, VKError, signature
| Python | 0.000072 | @@ -49,8 +49,53 @@
gnature%0A
+from vkontakte_viomg.lock import LockTimeout%0A
|
e966ddd804eee2f1b053de6f0bbf943d80dccc59 | Fix get value more safe | django_elastipymemcache/client.py | django_elastipymemcache/client.py | from pymemcache.client.hash import HashClient
class Client(HashClient):
def get_many(self, keys, gets=False, *args, **kwargs):
# pymemcache's HashClient may returns {'key': False}
end = super(Client, self).get_many(keys, gets, args, kwargs)
return {key: end[key] for key in end if end[key]... | Python | 0.000001 | @@ -281,21 +281,25 @@
key: end
-%5Bkey%5D
+.get(key)
for key
@@ -316,13 +316,17 @@
end
-%5Bkey%5D
+.get(key)
%7D%0A%0A
|
d67e4328585e14cfc7222d46f65fd9c4231fbddc | Set unknown for any error, (ie attribute error when __float__ is missing) | python/nagcat/trend.py | python/nagcat/trend.py | # Copyright 2008-2009 ITA Software, 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 ... | Python | 0 | @@ -5828,19 +5828,8 @@
cept
- ValueError
:%0A
|
e382b1687e5528fcb3e19e3f0d8b589e10bcb6ad | Remove unintentional pytest dependency. Fix #6398 (#6399) | python/tvm/__init__.py | python/tvm/__init__.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | Python | 0 | @@ -1628,45 +1628,8 @@
te%0A%0A
-# tvm.testing%0Afrom . import testing%0A%0A
# tv
|
25b755c68b8f87b16adf55c7003f55aca947d39c | Update parser.py | intelmq/bots/parsers/openbl/parser.py | intelmq/bots/parsers/openbl/parser.py | from datetime import datetime
from intelmq.lib.bot import Bot, sys
from intelmq.lib.event import Event
from intelmq.bots import utils
class OpenBLParserBot(Bot):
def process(self):
report = self.receive_message()
if report:
for row in report.split('\n'):
... | Python | 0.000001 | @@ -793,41 +793,10 @@
%25S')
-%0A value
+
-=
%22 U
|
27a0af0328f288cd8a3c59ccb1640aada9ec4c4f | Fix multiple values for the same param in apiproxy | bin/utils/apiProxy.py | bin/utils/apiProxy.py | # This file is part of Indico.
# Copyright (C) 2002 - 2015 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.000016 | @@ -725,31 +725,8 @@
%3E.%0A%0A
-#!/usr/bin/env python%0A%0A
impo
@@ -898,16 +898,62 @@
e, abort
+%0Afrom werkzeug.datastructures import MultiDict
%0A%0Aapp =
@@ -1581,19 +1581,13 @@
urn
-dict(
items
-)
%0A%0A%0Ad
@@ -1618,25 +1618,16 @@
%0A
- params =
request
.val
@@ -1626,28 +1626,42 @@
uest
-.
+_
v... |
b781278fa6c7906f47c4f42371fe7f513c7bc2c6 | Add version info of Python | python_starter/util.py | python_starter/util.py | # -*- coding: utf-8 -*-
import os
import sys
import argparse
import subprocess
from python_starter.core import Project
from python_starter.template.license_tmpl import candidate
from python_starter import __version__
class PythonStarterParser(argparse.ArgumentParser):
def error(self, message):
self.print_... | Python | 0 | @@ -72,16 +72,52 @@
process%0A
+from platform import python_version%0A
from pyt
@@ -4049,16 +4049,23 @@
)s %7B
-version%7D
+0%7D (python %7B1%7D)
'.fo
@@ -4073,27 +4073,92 @@
mat(
+__
version
-=
__
+,%0A python_
version
-__
+()
))%0A
|
78d628b463a0c9e898aa318efe017d27c1ff47e7 | Support for patching pythons | tests/matrix.py | tests/matrix.py | import os.path, urllib, subprocess, shutil
python_versions = ['2.4.6', '2.5.6', '2.6.8', '2.7.5']
libcurl_versions = ['7.19.0', '7.32.0']
class in_dir:
def __init__(self, dir):
self.dir = dir
def __enter__(self):
self.oldwd = os.getcwd()
os.chdir(self.dir)
def __exit__(se... | Python | 0 | @@ -133,16 +133,147 @@
32.0'%5D%0A%0A
+python_meta = %7B%0A '2.5.6': %7B%0A 'patches': %5B'python25.patch'%5D,%0A %7D,%0A%7D%0A%0Aroot = os.path.abspath(os.path.dirname(__file__))%0A%0A
class in
@@ -916,16 +916,27 @@
, prefix
+, meta=None
):%0A i
@@ -1076,24 +1076,260 @@
n_dir(dir):%0A
+ ... |
31a01dc5836cb25bb120dbbbb01896f3aa5503fe | Fix style issues in soc.models.survey module. | app/soc/models/survey.py | app/soc/models/survey.py | #!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | Python | 0.000001 | @@ -2514,16 +2514,17 @@
osition,
+
key in s
|
4a5325db469dbcdcc0fdcd90dc2f9c3ab6a240bb | Fix for UnsupportedNamespace exception. | lastcast/__init__.py | lastcast/__init__.py | from __future__ import print_function
import os.path
import sys
import time
import pylast
import pychromecast
import click
import toml
# TODO: ...and probably other things...
APP_WHITELIST = [u'Spotify', u'Google Play Music']
SCROBBLE_THRESHOLD_PCT = 0.50
SCROBBLE_THRESHOLD_SECS = 120
class ScrobbleListener(objec... | Python | 0 | @@ -283,16 +283,57 @@
S = 120%0A
+UNSUPPORTED_MODES = %5Bu'MultizoneLeader'%5D%0A
%0A%0Aclass
@@ -938,32 +938,372 @@
return%0A%0A
+ # Certain operating modes do not support the%0A # media_controller.update_status() call. Placing a device into a cast%0A # group is one such case. When run... |
91e459a0baf240429d40e47e46dc4e1b11350f68 | Add command processing decorator | taskbug.py | taskbug.py | history = []
class Track:
def __init__(self, task=None):
self.tasks = []
self.push(task)
def push(self, task):
if task:
self.tasks.append(task)
def pop(self):
return self.tasks.pop()
def top(self):
if self.count() > 0:
return self.task... | Python | 0.000001 | @@ -1,16 +1,57 @@
-history = %5B%5D
+import os%0Aimport readline%0Ahistory = %5B%5D%0A%0Acommands = %7B%7D
%0A%0Acl
@@ -814,17 +814,16 @@
pass%0A%0A
-%0A
tc = Tra
@@ -838,16 +838,687 @@
tion()%0A%0A
+def command(keyword, helptext=None):%0A def decorator(f):%0A assert keyword not in commands%0A co... |
1978b7ba1568114a8fbabdb96b06ad712db9f54f | Add comments describing base command class. | flow/commands/command.py | flow/commands/command.py | import abc
import subprocess
import json
import logging
class Command(object):
__metaclass__ = abc.ABCMeta
# logging.basicConfig(level=logging.DEBUG)
#
# Create a new Command base class.
#
def __init__(self, flow, cmd_name, params):
self.flow = flow
self.cmd_name = cmd... | Python | 0 | @@ -50,16 +50,215 @@
ogging%0A%0A
+#%0A# This is a base command class.%0A# Subclasses can override the exec_impl method for handling messages.%0A# Messages responses are automatically sent and the base class can%0A# do some error handling.%0A#%0A
class Co
|
abb8b574395f1f4ab8be08887b7bcf54a42bb254 | Revert HTTPS | fluiddbexplorer/utils.py | fluiddbexplorer/utils.py | # -*- coding: utf-8 -*-
"""
fluiddbexplorer.utils
~~~~~~~~~~~~~~~~~~~~~
Utility functions
:copyright: 2010 by Fluidinfo Explorer Authors
:license: MIT, see LICENSE for more information
"""
import os
from flask import current_app, url_for
INSTANCE_URLS = {
'main': 'https://fluiddb.fluidinfo.... | Python | 0.000002 | @@ -283,33 +283,32 @@
'main': 'http
-s
://fluiddb.fluid
@@ -332,33 +332,32 @@
luidinfo': 'http
-s
://fluiddb.fluid
@@ -387,17 +387,16 @@
': 'http
-s
://fluid
@@ -434,17 +434,16 @@
': 'http
-s
://sandb
|
26a5f363522adaa07eb4c2cfc1682b7847a33b4b | Remove api in laboratory server config | server/launch/sample/main_machine/main_instance/laboratory1/server_config.py | server/launch/sample/main_machine/main_instance/laboratory1/server_config.py | ##################################
# Laboratory Server configuration #
##################################
laboratory_assigned_experiments = {
'exp1:ud-fpga@FPGA experiments':
{
'coord_address': 'experiment_fpga:main_instance@main_machine',
'checkers': ()
... | Python | 0 | @@ -868,38 +868,8 @@
(),%0A
- 'api' : '1',%0A
@@ -871,32 +871,32 @@
%0A %7D,%0A
+
'exp1:ud
@@ -1068,38 +1068,8 @@
(),%0A
- 'api' : '1',%0A
@@ -1268,38 +1268,8 @@
(),%0A
- 'api' : '1',%0A
@@ -1406,32 +1406,32 @@
@main_machine',%0A... |
e67c66d75b6e6ec866e49b2e8113d326984c7475 | fix cross domain origin | alerta/app/auth.py | alerta/app/auth.py |
import jwt
import json
import requests
from datetime import datetime, timedelta
from functools import wraps
from flask import g, request, jsonify
from jwt import DecodeError, ExpiredSignature
from base64 import urlsafe_b64decode
from urlparse import parse_qsl
from alerta.app import app, db
from alerta.app.utils impo... | Python | 0.000004 | @@ -2446,32 +2446,17 @@
origin='
-http://localhost
+*
', heade
@@ -4166,24 +4166,9 @@
in='
-http://localhost
+*
', h
|
40aabbd5272fef635240e28b1f550bd1707e34f4 | Update edit route | journal.py | journal.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import os
from cryptacular.bcrypt import BCRYPTPasswordManager
from pyramid.authentication import AuthTktAuthenticationPolicy
from pyramid.authorization import ACLAuthorizationPolicy
from pyramid.config import Configurator
from pyramid.htt... | Python | 0.000001 | @@ -6057,25 +6057,35 @@
te('
-create', '/create
+edit', '/edit/%7Bentry_id:%5Cd%7D
')%0A
@@ -6105,29 +6105,33 @@
_route('
-edit', '/edit
+create', '/create
')%0A c
|
9af58ff2a6209a9658d4afa5d772abbf3975f072 | Replace ugettext with gettext | hermes/models.py | hermes/models.py | import os
import operator
from functools import reduce
from django.contrib.postgres.fields import ArrayField
try:
from itertools import ifilter as filter
except:
pass # Must be python 3
from django.conf import settings as django_settings
from django.db import models
from django.urls import reverse
from djan... | Python | 0.999999 | @@ -390,17 +390,16 @@
import
-u
gettext
|
7701168f5ee1746d612b035d0e20b5693593db63 | test bugfix | tests/test_t.py | tests/test_t.py | # -*- coding: utf-8 -*-
"""
@author: Federico Cerchiari <federicocerchiari@gmail.com>
"""
import os
import html
import unittest
from tempy import T, Tag, VoidTag
from tempy.tempy import DOMElement
from tempy.tags import Div, A, Br
class TestTag(unittest.TestCase):
def test_getattr(self):
# Test T tempt ... | Python | 0.000001 | @@ -5460,16 +5460,24 @@
f.read()
+.strip()
, result
|
d708a8eab70f3eedf542d34579723b3a91fae747 | kill the unused partial import in the tests | test_hgdistver.py | test_hgdistver.py | from hgdistver import _data_from_archival, \
_archival_to_version
import os
import hgdistver
import py
from subprocess import call, Popen, PIPE
from functools import partial
def get_version(path, method='get_version', **kw):
call = getattr(hgdistver, method)
root = str(path)
return call(root=root, **kw... | Python | 0 | @@ -144,38 +144,8 @@
PIPE
-%0Afrom functools import partial
%0A%0Ade
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.