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 |
|---|---|---|---|---|---|---|---|
832391803816ac39766fa5dad929d6b0a9e56561 | Fix POST calls with new requests | taiga/requestmaker.py | taiga/requestmaker.py | import json
import requests
import time
from . import exceptions, utils
from requests.exceptions import RequestException
class RequestCacheException(Exception):
pass
class RequestCacheMissingException(RequestCacheException):
pass
class RequestCacheInvalidException(RequestCacheException):
pass
class ... | Python | 0 | @@ -3238,20 +3238,22 @@
ation':
+'
True
+'
%0A
|
1dd9295c0e6269ed60eb10e5f6cb3570233f63ac | Increase default job size. | lobster/cmssw/job.py | lobster/cmssw/job.py | import imp
import os
import pickle
import shutil
import sqlite3
import time
import lobster.job
import sandbox
from dataset import DASInterface, FileInterface
from jobit import SQLInterface as JobitStore
from ProdCommon.CMSConfigTools.ConfigAPI.CfgInterface import CfgInterface
class JobProvider(lobster.job.JobProvide... | Python | 0 | @@ -2981,17 +2981,17 @@
bits, (%5B
-1
+3
0%5D * num
|
0c9f2f51778b26bb126eccfbef0b098da3db2877 | normalize version numbers | asynchronous_batch_mailings/__openerp__.py | asynchronous_batch_mailings/__openerp__.py | # -*- coding: utf-8 -*-
##############################################################################
#
# This file is part of asynchronous_batch_mailings, an Odoo module.
#
# Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>)
#
# asynchronous_batch_mailings is free software:
# you can redistribute i... | Python | 0.000673 | @@ -1138,17 +1138,23 @@
sion': '
-1
+8.0.1.0
.0',%0A
|
dafc54e782c5ee9bda3cf1817df92ae16ed26979 | fix website url in manifest | attachment_base_synchronize/__openerp__.py | attachment_base_synchronize/__openerp__.py | # coding: utf-8
# @ 2015 Florian DA COSTA @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Attachment Base Synchronize',
'version': '9.0.1.0.0',
'author': 'Akretion,Odoo Community Association (OCA)',
'website': 'www.akretion.com',
'license': 'AGPL-3',
'... | Python | 0.000001 | @@ -264,16 +264,23 @@
site': '
+http://
www.akre
@@ -287,16 +287,17 @@
tion.com
+/
',%0A '
|
1c652fa17df8b1e10b7faf815992c0c7956afd8f | Use the right path for the Raven Django app | normandy/settings.py | normandy/settings.py | import os
from configurations import Configuration, values
class Core(Configuration):
"""Settings that will never change per-environment."""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Application de... | Python | 0.000001 | @@ -584,16 +584,44 @@
'raven
+.contrib.django.raven_compat
',%0A%0A
|
a007f80dc2182787eca521c84f37aeedc307645a | Remove base64 padding | encrypted_id/__init__.py | encrypted_id/__init__.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
try:
basestring
except NameError:
basestring = str
from Crypto.Cipher import AES
import base64
import binascii
import struct
from djang... | Python | 0.000001 | @@ -1069,17 +1069,16 @@
b%22=%22, b%22
-.
%22)%0A%0A%0Adef
@@ -1162,32 +1162,74 @@
ii%22))%0A%0A try:%0A
+ padding = (3 - len(e) %25 3) * b%22=%22%0A
e = base
@@ -1254,28 +1254,18 @@
de(e
-.replace(b%22.%22, b%22=%22)
+ + padding
)%0A
|
7ca1448e0d4afe0b3abf91ba2cd895df681ae3ba | Add initial migrations | apps/careers/migrations/0001_initial.py | apps/careers/migrations/0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-20 14:46
from __future__ import unicode_literals
import cms.apps.media.models
import cms.models.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies... | Python | 0 | @@ -62,15 +62,15 @@
06-2
-0 14:46
+2 08:42
%0Afro
@@ -332,40 +332,35 @@
('
-pages
+media
', '000
-6_auto_20151002_1655
+3_file_alt_text
'),%0A
@@ -373,35 +373,40 @@
('
-media
+pages
', '000
-3_file_alt_text
+6_auto_20151002_1655
'),%0A
@@ -4296,32 +4296,171 @@
description')),%0A
+ ('slug', m... |
038c256a3bb4d2b2b56c1bc8b60cd6c2149a1a22 | fix wrong type_id for challenge | novaideo/content/interface.py | novaideo/content/interface.py | # Copyright (c) 2014 by Ecreall under licence AGPL terms
# avalaible on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
from zope.interface import Interface
from dace.interfaces import (
Attribute, IUser, IEntity as IEntityO, IApplication,
IMachine)
from pontus.interfaces import... | Python | 0.000002 | @@ -2495,36 +2495,41 @@
config(type_id='
-idea
+challenge
')%0Aclass IChalle
|
887b0aa2263366fb18689b2ac92acb75be57c0b3 | Fix output of export-csv.py | export-csv.py | export-csv.py | #!/usr/bin/env python3
#
# Program for exporting patient records from PhenoTips in CSV format
#
# Copyright 2016 University of Utah
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; eithe... | Python | 0.999999 | @@ -3298,95 +3298,8 @@
s):%0A
- print('Available studies:')%0A print('* ' + '%5Cn* '.join(studies))%0A
@@ -3451,24 +3451,119 @@
%5B0%5D == 'y':%0A
+ print('Available studies:')%0A print('* ' + '%5Cn* '.join(studies))%0A
@@ -4108,16 +4108,20 @@
t... |
9be80df72954c05193fc6ded0998b28de182a699 | Add _validate method to Client.auth interface. | objectrocket/auth.py | objectrocket/auth.py | """Authentication operations."""
import logging
import requests
from objectrocket import bases
from objectrocket import errors
logger = logging.getLogger(__name__)
class Auth(bases.BaseAuthLayer):
"""Authentication operations.
:param objectrocket.client.Client base_client: An objectrocket.client.Client ins... | Python | 0 | @@ -4069,16 +4069,591 @@
= new_username%0A
+%0A def _verify(self, token):%0A %22%22%22Verify that the given token is valid.%0A%0A :param str token: The API token to verify.%0A :returns: The token's corresponding user model as a dict, or None if invalid.%0A :rtype: dict%0A %22%22%... |
a20a275ef5cae1b38ead1c3191dd96a042eb2070 | Fix AttributeError in the project instance detail view | openstack_dashboard/api/_nova.py | openstack_dashboard/api/_nova.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
# d... | Python | 0.000074 | @@ -3481,16 +3481,22 @@
lf, attr
+, None
) for at
|
d88e03ccb99a21566f18a75147c121ecaef010be | use timezone instead of naive | oauth2_provider/views/base.py | oauth2_provider/views/base.py | import logging
import datetime
from django.http import HttpResponse, HttpResponseRedirect
from django.views.generic import View, FormView
from oauthlib.oauth2 import Server
from braces.views import LoginRequiredMixin, CsrfExemptMixin
from ..settings import oauth2_settings
from ..exceptions import OAuthToolkitError
... | Python | 0.000055 | @@ -11,24 +11,8 @@
ging
-%0Aimport datetime
%0A%0Afr
@@ -115,16 +115,50 @@
FormView
+%0Afrom django.utils import timezone
%0A%0Afrom o
@@ -5359,24 +5359,15 @@
_gt=
-datetime.datetim
+timezon
e.no
|
269747cff17e7f509d16044859f1e51a1d02ccf7 | Split responsibility into the three endpoints | oauthlib/oauth2/ext/django.py | oauthlib/oauth2/ext/django.py | from __future__ import unicode_literals
from django.http import HttpResponseRedirect, HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
import functools
import logging
from oauthlib.common import urlencode
from oauthlib.oauth2.draft25 import errors
log = logging.getLogger('oauthl... | Python | 0.999997 | @@ -387,50 +387,301 @@
lf,
-server, error_uri):%0A self._server =
+error_uri, server=None, authorization_endpoint=None,%0A token_endpoint=None, resource_endpoint=None):%0A self._authorization_endpoint = authorization_endpoint or server%0A self._token_endpoint = token_endpoint or server... |
c42ffe540b30da5dbf29d557a01503ecad246afb | Fix changelog for newer OSes | etc/scripts/changelog.py | etc/scripts/changelog.py | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Compiler Explorer Authors
# 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 code must retain the above copyright not... | Python | 0.000001 | @@ -1541,18 +1541,18 @@
late = '
-
+''
%3Cdiv c
@@ -1579,89 +1579,37 @@
ry%22%3E
-%5Cn' %5C%0A ' %3Cdiv class=%22col-sm-12%22%3E%5Cn' %5C%0A '
+%0A %3Cdiv class=%22col-sm-12%22%3E%0A
@@ -1684,80 +1684,28 @@
%3C/a%3E
-%5Cn' %5C%0A ' %3C/div%... |
391d69f4ce485ff02a3844b4cf5a54f23125c477 | test presab | partBreaker.py | partBreaker.py | #!/usr/bin/env python
import argparse
import Get_fasta_from_Ref as GFR
import re
from sys import argv
import os
def Subsetfromto(FastaDict, outFile, start,end):
"""Writes a subsect multifast file, boud at sequence indeces start and end, form sequence stored in a dictioanry"""
with open(outFile, 'w') as out... | Python | 0.000001 | @@ -108,16 +108,26 @@
mport os
+%0Apresab=%7B%7D
%0A%0Adef Su
@@ -368,16 +368,45 @@
keys():%0A
+ presab%5BseqID%5D=%5B%5D%0A
@@ -489,17 +489,156 @@
D,seq))%0A
-%0A
+ if set(seq) in set('-','?'):%0A presab%5BseqId%5D.append(0)%0A else: %0A pre... |
7399dfa45c9b5a563798f504e9eb4054faf2aa30 | print a more meaningful description of EventAct | open_municipio/events/models.py | open_municipio/events/models.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
from open_municipio.acts.models import Act
from open_municipio.events.managers import EventManager
from open_municipio.people.models import Institution
from datetime import datetime, date
class Event(models.Model):
"""
This ... | Python | 0.999999 | @@ -2666,16 +2666,105 @@
('act','event')%0A
+%0A def __unicode__(self):%0A return %22%25s (%25s)%22 %25 (self.act.title, self.event.date)%0A
|
a9373c3e4c65160bc04e56edbc356e086d2dae71 | Tweak division display | opencivicdata/admin/division.py | opencivicdata/admin/division.py | from django.contrib import admin
from opencivicdata.models import division as models
@admin.register(models.Division)
class DivisionAdmin(admin.ModelAdmin):
pass
| Python | 0 | @@ -160,10 +160,76 @@
-pass
+list_display = ('display_name', 'id')%0A search_fields = list_display
%0A%0A
|
21c2daf95e7352932346dec2c570cfefce867ed1 | Add some convenience properties to Node | odlclient/v2/node.py | odlclient/v2/node.py | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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/lice... | Python | 0 | @@ -648,16 +648,59 @@
icense.%0A
+from datetime import datetime%0Aimport time%0A%0A
from odl
@@ -944,16 +944,355 @@
type'%5D%0A%0A
+ @property%0A def description(self):%0A data = self._info%5B'properties'%5D%5B'description'%5D%5B'value'%5D%0A return None if data == 'None' else data%0A%0A @prop... |
b6f698f5fd6faf90b36bbb560ba4df13192cff42 | Update _settings.py | templates/root/appfiles/_settings.py | templates/root/appfiles/_settings.py | """
Django settings for template project.
Generated by 'django-admin startproject' using Django 1.8.2.
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 pat... | Python | 0 | @@ -1023,24 +1023,46 @@
aticfiles',%0A
+ 'rest_framework',%0A
'%3C%25= app
|
281eda574c6ed3d0d9b333b67f53a13ea3c17398 | Remove `tfds.core.builder_from_directory` alias | tensorflow_datasets/core/__init__.py | tensorflow_datasets/core/__init__.py | # coding=utf-8
# Copyright 2022 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 | @@ -1751,87 +1751,8 @@
te%0A%0A
-from tensorflow_datasets.core.read_only_builder import builder_from_directory%0A%0A
from
@@ -3067,38 +3067,8 @@
g%22,%0A
- %22builder_from_directory%22,%0A
|
a39cbaf22401c466f02e5b12e3ebdd46fa8eef0c | Fix issue refs in test_numpy_piecewise_regression | sympy/printing/tests/test_numpy.py | sympy/printing/tests/test_numpy.py | from sympy import Piecewise
from sympy.abc import x
from sympy.printing.lambdarepr import NumPyPrinter
def test_numpy_piecewise_regression():
"""
NumPyPrinter needs to print Piecewise()'s choicelist as a list to avoid
breaking compatibility with numpy 1.8. This is not necessary in numpy 1.9+.
See gh-9... | Python | 0 | @@ -313,23 +313,41 @@
See
-gh-9747 and gh-
+sympy/sympy#9747 and sympy/sympy#
9749
|
1addeefdf51713d562788018ebfb6549b215f55b | Fix C typo error in a test | test/option/tree-lib.py | test/option/tree-lib.py | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
... | Python | 0.000144 | @@ -1935,16 +1935,17 @@
c, char
+*
*argv)%0A%7B
|
53cc757e02b55d7689b9fd9e6331ac0e1a466643 | Fix hanging highlight in window | tekka/lib/general_output_buffer.py | tekka/lib/general_output_buffer.py | # coding: UTF-8
"""
Copyright (c) 2009 Marian Tietz
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
notice, this list of conditions a... | Python | 0.000001 | @@ -3106,209 +3106,80 @@
%0A%0A%09%09
-# FIXME: this does not cover all exists%0A%09%09widget.connect(%22motion-notify-event%22, outer_cb)%0A%09%09widget.parent.connect(%22motion-notify-event%22, outer_cb)%0A%09%09widget.parent.parent.connect(%22motion-notify-event%22,
+gui.widgets.get_object(%22main_window%22).conne... |
25dc03c3db7e224463f11e513f94fb9cb15ed250 | Fix check_service_client_function doc typo | tempest/tests/lib/services/base.py | tempest/tests/lib/services/base.py | # Copyright 2015 Deutsche Telekom AG. 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 requi... | Python | 0.000001 | @@ -1785,13 +1785,14 @@
r re
-quest
+sponse
.%0A
|
df9ff4f13fc7da111bc11cf5f390efe94352b6e6 | Fix Setting class | src/wikicurses/__init__.py | src/wikicurses/__init__.py | import os
import json
import pkgutil
from enum import Enum
_data = pkgutil.get_data('wikicurses', 'interwiki.list').decode()
wikis = dict([i.split('|')[0:2] for i in _data.splitlines() if i[0]!='#'])
default_configdir = os.environ['HOME'] + '/.config'
configpath = os.environ.get('XDG_CONFIG_HOME', default_configdir) ... | Python | 0.000001 | @@ -513,16 +513,35 @@
from ()%0A
+ return%0A
|
afedc41fd4e573f4db38f2fde38b2286d623b4c4 | Remove obsolete property | src/zeit/campus/article.py | src/zeit/campus/article.py | import zope.interface
import zeit.cms.content.reference
import zeit.campus.interfaces
class TopicpageLink(zeit.cms.related.related.RelatedBase):
zope.interface.implements(zeit.campus.interfaces.ITopicpageLink)
topicpagelink = zeit.cms.content.reference.SingleResource(
'.head.topicpagelink', 'relat... | Python | 0.000216 | @@ -323,200 +323,8 @@
')%0A%0A
- topicpagelink_label = zeit.cms.content.dav.mapProperties(%0A zeit.campus.interfaces.ITopicpageLink,%0A zeit.cms.interfaces.DOCUMENT_SCHEMA_NS,%0A ('topicpagelink_label',))%0A%0A
|
e60a05886c52574227b1a73fe02575ede81ffa5e | mark out-of-date tests with a @skip | staff/tests/tests_views.py | staff/tests/tests_views.py | from django.core import mail
from django.test import Client, TestCase
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.http import urlencode
class StaffAddView(TestCase):
fixtures = ['ophasebase.json', 'staff.json', 'students.json']
def test_redirect(s... | Python | 0.000004 | @@ -1,20 +1,47 @@
+from unittest import skip%0A%0A
from django.core imp
@@ -708,16 +708,26 @@
e=302)%0A%0A
+ @skip%0A
def
@@ -812,22 +812,8 @@
%22%22%0A%0A
- pass%0A%0A
@@ -845,28 +845,16 @@
n test%0A%0A
- %22%22%22%0A
@@ -2251,17 +2251,4 @@
m%3E')
-%0A %22%22%22%0A
|
42ec06aa5e2034266f817dc6465cd8bf4fea6ead | fix migration | corehq/apps/linked_domain/migrations/0005_migrate_linked_app_toggle.py | corehq/apps/linked_domain/migrations/0005_migrate_linked_app_toggle.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-02-01 15:00
from __future__ import unicode_literals
from couchdbkit import ResourceNotFound
from django.db import migrations
from corehq.toggles import LINKED_DOMAINS
from toggle.models import Toggle
def _migrate_linked_apps_toggle(apps, schema_editor):
... | Python | 0.000001 | @@ -428,16 +428,110 @@
else:%0A
+ try:%0A Toggle.get(LINKED_DOMAINS.slug)%0A except ResourceNotFound:%0A
@@ -562,16 +562,20 @@
Toggle(%0A
+
@@ -659,18 +659,26 @@
-)%0A
+ )%0A
|
7c62ae1c337348086cb14f1ec8c1d97a23b33f30 | remove debug case | custom/icds_reports/management/commands/stale_data_in_household_ucr.py | custom/icds_reports/management/commands/stale_data_in_household_ucr.py |
import inspect
import dateutil
from django.core.management.base import BaseCommand, CommandError
from datetime import datetime
from corehq.apps.hqadmin.management.commands.stale_data_in_es import RunConfig, get_sql_case_data_for_db
from corehq.apps.userreports.models import StaticDataSourceConfiguration, get_datasou... | Python | 0.000287 | @@ -3139,65 +3139,8 @@
s')%0A
- case_ids += %5B'4adf255e-5200-4189-8952-852c57ecd493'%5D%0A
|
ee0100f0a0f79491216cabe3fb2089c33238f57d | Set active device number | chainer/functions/theano/theano_function.py | chainer/functions/theano/theano_function.py | import collections
import numpy
import six
try:
import theano
import theano.sandbox.cuda as theano_cuda
_available = True
except ImportError:
_available = False
from chainer import cuda
from chainer import function
from chainer.utils import type_check
def _to_var_tuple(vs):
msg = ('inputs and o... | Python | 0.000003 | @@ -2632,32 +2632,96 @@
if gpu:%0A
+ device = theano.sandbox.cuda.active_device_number()%0A
outp
@@ -2749,32 +2749,40 @@
_to_cupy_array(x
+, device
) for x in outpu
@@ -3105,32 +3105,96 @@
if gpu:%0A
+ device = theano.sandbox.cuda.active_device_number()%0A
... |
7545ce166cbad8fcd2fe628fcac236355b345714 | add new config option for using predefined networks (from graph-tool); fix for graph tool GTK command (deprecatd option?); increase callback time during simulation run (slows down simulation, but necessary to buy time for img export for simulation with large groups of speakers) | pdiffsim_gt.py | pdiffsim_gt.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
author: Luzius Thöny
lucius.antonius@gmail.com
"""
import sys, os, os.path, math
from numpy.random import *
from distutils.dir_util import mkpath
import configparser
from graph_tool.all import *
# We need some Gtk and gobject functions
from gi.repository import Gt... | Python | 0 | @@ -736,16 +736,62 @@
akers')%0A
+network = config.get('simulation', 'network')%0A
simManag
@@ -1414,16 +1414,41 @@
uns')%0A%0A%0A
+if network == %22random%22:%0A%09
myGraph,
@@ -1560,16 +1560,118 @@
layout%0A
+else:%0A%09myGraph = collection.data%5Bnetwork%5D #~ %22netscience%22, %22dolphins%22, ...%0A%09pos = m... |
d282e1e6dbaa596f4d78a503ed4c23ac993e3554 | change to non-test | astropy/coordinates/tests/test_sites.py | astropy/coordinates/tests/test_sites.py | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from ...tests.helper import pytest, assert_quantity_allclose, remote_data, quantity_allclose
from ... import units as u
from .. import Longitude, Latitude, EarthLocation
from ..sites import get_builtin_sites, g... | Python | 0.999326 | @@ -4305,37 +4305,25 @@
atory'%0A%0A
-@remote_data%0Adef test
+def check
_builtin
@@ -4358,16 +4358,368 @@
=True):%0A
+ %22%22%22%0A This function checks that the builtin sites registry is consistent with the%0A remote registry (or a registry at some other location). %0A%0A Note that current this is *no... |
d3d25e127592356d6b678dc8d013f83f53803f67 | update mordred.tests to check hidden modules | mordred/tests/__main__.py | mordred/tests/__main__.py | import os
import nose
def main():
base = os.path.dirname(os.path.dirname(__file__))
tests = [base, os.path.join(base, "_base")]
os.environ["NOSE_WITH_DOCTEST"] = "1"
nose.main(
defaultTest=",".join(tests),
)
if __name__ == "__main__":
main()
| Python | 0 | @@ -84,16 +84,162 @@
ile__))%0A
+ hidden = %5B%0A os.path.join(base, n)%0A for n in os.listdir(base)%0A if n%5B:1%5D == %22_%22 and os.path.splitext(n)%5B1%5D == %22.py%22%0A %5D%0A%0A
test
@@ -277,16 +277,25 @@
_base%22)%5D
+ + hidden
%0A%0A os
|
e61b1f40ff9e39d38257e9883b4cb51f6f1c9d2a | Clarify docstrings on TimeSeries | bokeh/charts/builder/timeseries_builder.py | bokeh/charts/builder/timeseries_builder.py | """This is the Bokeh charts interface. It gives you a high level API to build
complex plot is a simple way.
This is the TimeSeries class which lets you build your TimeSeries charts just
passing the arguments to the Chart class and calling the proper functions.
"""
#-----------------------------------------------------... | Python | 0.00001 | @@ -1611,16 +1611,21 @@
erable):
+ a 2d
iterabl
@@ -1630,66 +1630,215 @@
ble
-2d representing the data series%0A values matrix.
+containing the values. Can be anything that %0A can be converted to a 2d array, and which is the x (time) axis is determined%0A by %60%60index%60%60, wh... |
d1e9a1ed54cae9b0b10ab89c06d6d7f9b53af3a1 | Update forward compatibility horizon to 2018-09-21 | tensorflow/python/compat/compat.py | tensorflow/python/compat/compat.py | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0 | @@ -1138,17 +1138,17 @@
18, 9, 2
-0
+1
)%0A%0A%0A@tf_
|
b7cc99565fc692e42fd9bf209b1addbe31b3d583 | Update forward compatibility horizon to 2022-03-24 | tensorflow/python/compat/compat.py | tensorflow/python/compat/compat.py | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0 | @@ -1335,17 +1335,17 @@
22, 3, 2
-3
+4
)%0A_FORWA
|
3b061fce8b9a1c867f2798d51b5375ea3a03b385 | Update forward compatibility horizon to 2018-08-11 | tensorflow/python/compat/compat.py | tensorflow/python/compat/compat.py | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0 | @@ -1120,17 +1120,17 @@
18, 8, 1
-0
+1
)%0A%0A%0A@tf_
|
5f5b7f0bf60b58b91c501bc44dd6803c1892bc05 | Update forward compatibility horizon to 2019-03-20 | tensorflow/python/compat/compat.py | tensorflow/python/compat/compat.py | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0 | @@ -1138,18 +1138,18 @@
019, 3,
-19
+20
)%0A%0A%0A@tf_
|
cff5052f94738942bfd18d745660a975a170ca4b | Fix build on non-git source | build-tools/code_generator/utils/common.py | build-tools/code_generator/utils/common.py | # Copyright (c) 2017 Sony Corporation. 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 applicabl... | Python | 0 | @@ -1673,16 +1673,26 @@
dir)%0A
+ version =
default
|
784012b11b6c11584b0c8696874137eebe7260c0 | Update forward compatibility horizon to 2021-02-08 | tensorflow/python/compat/compat.py | tensorflow/python/compat/compat.py | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0 | @@ -1448,9 +1448,9 @@
2,
-7
+8
)%0A_F
|
12bb4e28862bed103ff6c8a2262e014bb2ae3915 | Add more unit tests [WAL-1666] | src/waldur_mastermind/invoices/tests/test_downtime.py | src/waldur_mastermind/invoices/tests/test_downtime.py | from django.core.exceptions import ValidationError
from dateutil import parser
from django.utils.timezone import get_current_timezone
from freezegun import freeze_time
from rest_framework import test
from waldur_mastermind.packages.tests import fixtures as packages_fixtures
from .. import models
def parse_datetime(... | Python | 0 | @@ -3541,32 +3541,31 @@
-self.assertTrue(
+compensation =
models.G
@@ -3648,32 +3648,240 @@
f.item.end).
-exists()
+get()%0A self.assertEqual(compensation.price, -1 * self.item.price)%0A self.assertEqual(compensation.details%5B'name'%5D,%0A 'Compensation for downtime. ... |
f4cb18d5e204ba44b75bebece69e8a7322cabb49 | fix mailgun test | muckrock/mailgun/tests.py | muckrock/mailgun/tests.py | """
Tests for mailgun
"""
from django.core import mail
from django.core.urlresolvers import reverse
from django.test import TestCase
import hashlib
import hmac
import nose.tools
import os
import time
from foia.models import FOIARequest
from settings import MAILGUN_ACCESS_KEY
# allow methods that could be functions ... | Python | 0.000001 | @@ -4795,32 +4795,38 @@
.exists('static/
+media/
foia_files/data.
@@ -4866,16 +4866,22 @@
'static/
+media/
foia_fil
|
f1ad74fa852de191787e7c7467675e390647fdcf | Add a missing "import glob". | build/config/win/get_visual_studio_path.py | build/config/win/get_visual_studio_path.py | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import errno
import os
import re
import subprocess
import sys
"""
This script searches for Visual Studio versions on the current system.
Pass in the pr... | Python | 0.999205 | @@ -173,16 +173,28 @@
t errno%0A
+import glob%0A
import o
|
7ce597b5e8467cb662c9ae9a968e1ff10741f734 | Update forward compatibility horizon to 2021-05-25 | tensorflow/python/compat/compat.py | tensorflow/python/compat/compat.py | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0 | @@ -1449,9 +1449,9 @@
5, 2
-4
+5
)%0A_F
|
9e4ad9a04ad911cc9375b3ceeb2428b034758518 | Update forward compatibility horizon to 2020-02-14 | tensorflow/python/compat/compat.py | tensorflow/python/compat/compat.py | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0 | @@ -1383,17 +1383,17 @@
20, 2, 1
-3
+4
)%0A_FORWA
|
8b0d9378a1e48c010fb028395811d3f3720af3e9 | Translate language names from settings.LANGUAGES. | multilingual/languages.py | multilingual/languages.py | """
Django-multilingual: language-related settings and functions.
"""
# Note: this file did become a mess and will have to be refactored
# after the configuration changes get in place.
#retrieve language settings from settings.py
from django.conf import settings
LANGUAGES = settings.LANGUAGES
from multilingual.excep... | Python | 0.999999 | @@ -290,16 +290,72 @@
GUAGES%0A%0A
+from django.utils.translation import ugettext_lazy as _%0A
from mul
@@ -742,32 +742,34 @@
id):%0A return
+_(
LANGUAGES%5B(int(l
@@ -814,16 +814,17 @@
- 1%5D%5B1%5D
+)
%0A%0Adef ge
|
a68bb0d268861d30c26647523991ed215853cdfe | add Reeve post | ca_ab_grande_prairie_county_no_1/people.py | ca_ab_grande_prairie_county_no_1/people.py | from pupa.scrape import Scraper
from utils import lxmlize, CanadianLegislator as Legislator
import re
COUNCIL_PAGE = 'http://www.countygp.ab.ca/EN/main/government/council.html'
class GrandePrairieCountyNo1PersonScraper(Scraper):
# @todo The Reeve is also a Councillor.
def get_people(self):
page = lxmlize(C... | Python | 0.000001 | @@ -172,16 +172,102 @@
l.html'%0A
+REEVE_URL = 'http://www.countygp.ab.ca/EN/main/government/council/reeve-message.html'%0A
%0A%0Aclass
@@ -379,16 +379,116 @@
(self):%0A
+ reeve_page = lxmlize(REEVE_URL)%0A reeve_name = reeve_page.xpath('string(//b)').split(',')%5B0%5D%0A%0A
page
@@ -687,16 +687,27 @@
)... |
efa53a61d067d42d3dd6f9f3e5d08f89b836f92b | Test split_paragraphs functions. | landlab/core/tests/test_messager.py | landlab/core/tests/test_messager.py | #! /usr/bin/env python
import os
from nose.tools import assert_equal, assert_raises
from landlab.core.utils import (format_message, error_message,
warning_message, assert_or_print)
LOREM_IPSUM = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidi... | Python | 0 | @@ -206,16 +206,66 @@
or_print
+,%0A split_paragraphs
)%0A%0A%0ALORE
@@ -586,16 +586,1261 @@
s.%0A%22%22%22%0A%0A
+%0Adef test_split_paragraphs_cr():%0A %22%22%22Test splitting paragraphs with carriage returns.%22%22%22%0A text = %22%22%22%0APharetra pharetra massa massa ultricie... |
a6b41e855b84ed9971096090a2c38783526ac087 | check if null for mode of payments (#12264) | erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py | erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py | # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import cstr
def execute(filters=None):
columns, data = [], []
columns=get_columns()
data=get_sales_payme... | Python | 0 | @@ -2420,32 +2420,40 @@
,a.posting_date,
+ ifnull(
b.mode_of_paymen
@@ -2445,32 +2445,37 @@
.mode_of_payment
+, '')
%0A%09%09%09from %60tabSal
@@ -2627,16 +2627,24 @@
ng_date,
+ ifnull(
b.mode_o
@@ -2652,16 +2652,21 @@
_payment
+, '')
%0A%09%09%09from
|
883ef42a4a02a98bbbec7a2a3c20938853805fb0 | Fix update_host API response schema | tempest/lib/api_schema/response/compute/v2_1/hosts.py | tempest/lib/api_schema/response/compute/v2_1/hosts.py | # Copyright 2014 NEC Corporation. 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 ... | Python | 0.000269 | @@ -3629,32 +3629,102 @@
False,%0A
+'anyOf': %5B%0A %7B'required': %5B'host', 'status'%5D%7D,%0A %7B
'required': %5B'ho
@@ -3746,26 +3746,27 @@
ce_mode'
-, 'status'
+%5D%7D%0A
%5D%0A %7D%0A
|
1e28b43c8a02bd3e506fbd33012b4dcd7b193433 | Fix string-bools not translated | compose-v2/galaxy-configurator/customize.py | compose-v2/galaxy-configurator/customize.py | import os
def j2_environment_params():
""" Extra parameters for the Jinja2 Environment
Add AnsibleCoreFiltersExtension for filters known in Ansible
like `to_nice_yaml`
"""
return dict(
extensions=('jinja2_ansible_filters.AnsibleCoreFiltersExtension',),
)
def alter_context(context):
... | Python | 0.000001 | @@ -1638,26 +1638,27 @@
alue in
-os.environ
+new_context
.items()
|
9c7dda9f55369109831eb53f4ed1da5fe82cfc7b | Fix test for observation_aggregator | tests/chainermn_tests/extensions_tests/test_observation_aggregator.py | tests/chainermn_tests/extensions_tests/test_observation_aggregator.py | import unittest
import numpy as np
import chainer
import chainer.testing
from chainer.training import extension
import chainermn
from chainermn.extensions.observation_aggregator import observation_aggregator
class DummyChain(chainer.Chain):
def __init__(self):
super(DummyChain, self).__init__()
de... | Python | 0.000002 | @@ -1687,16 +1687,18 @@
- 1) / 2
+.0
%0A
|
88be8370e6ede34cb01240a6621923b1ddea370f | remove retval before starting the completion service job if it exists | studio/completion_service/completion_service_client.py | studio/completion_service/completion_service_client.py | import importlib
import shutil
import pickle
import os
import sys
import six
from studio import fs_tracker, model, logs
logger = logs.getLogger('completion_service_client')
try:
logger.setLevel(model.parse_verbosity(sys.argv[1]))
except BaseException:
logger.setLevel(10)
def main():
logger.debug('copyin... | Python | 0 | @@ -1066,24 +1066,64 @@
t('retval')%0A
+ if os.path.exists(retval_path):%0A
shutil.r
|
cdc75e576aaa3054ed9cc4bde07e5e85d68c8d9f | MANAGE on TestSuite inherits from MANAGE on problem. | satori.core/satori/core/entities/TestSuite.py | satori.core/satori/core/entities/TestSuite.py | # vim:ts=4:sts=4:sw=4:expandtab
from django.db import models
from satori.core.dbev import Events
from satori.core.models import Entity
@ExportModel
class TestSuite(Entity):
"""Model. A group of tests, with dispatch and aggregation algorithm.
"""
parent_entity = models.OneToOneField(Entity, parent_link=... | Python | 0 | @@ -1379,12 +1379,14 @@
', '
-EDIT
+MANAGE
')%0A
|
c3a251588868ace81e8e4e0bbe29828495d759d9 | fix command line arguments | ThingThree/Code/Dotstar/strandtest.py | ThingThree/Code/Dotstar/strandtest.py | #!/usr/bin/python
import time, math, sys
from dotstar import Adafruit_DotStar
numPixels = 24
dataPin = 17
clockPin = 27
strip = Adafruit_DotStar(numPixels, dataPin, clockPin)
strip.begin()
strip.setBrightness(255)
def scale(color, brightness):
str_hex = hex(color)[2:].zfill(6)
r,g,b = (int(str_hex[2*x:2*x... | Python | 0.000803 | @@ -2166,17 +2166,17 @@
ys.argv%5B
-0
+1
%5D,0),int
@@ -2185,13 +2185,13 @@
ys.argv%5B
-1
+2
%5D))%0A
|
cfe9c0f3d4155924bd330378ab846da014c4d2cb | Remove fixed TODO comment | beetsplug/absubmit.py | beetsplug/absubmit.py | """Calculate acoustic information and submit to AcousticBrainz.
"""
from __future__ import division, absolute_import, print_function
import hashlib
import json
import os
import subprocess
import tempfile
import distutils
import requests
from beets import plugins
from beets import util
from beets import ui
class A... | Python | 0 | @@ -1396,56 +1396,8 @@
ath%0A
- # TODO how to check for on Windows?%0A
|
a171595f029b43af27d14a125e68647e2206c6d5 | Update __init__.py | tendrl/commons/objects/node_alert_counters/__init__.py | tendrl/commons/objects/node_alert_counters/__init__.py | from tendrl.commons import objects
class NodeAlertCounters(objects.BaseObject):
def __init__(
self,
warn_count=0,
node_id=None,
*args,
**kwargs
):
super(NodeAlertCounters, self).__init__(*args, **kwargs)
self.warning_count = warn_count
self.node_... | Python | 0.000072 | @@ -724,16 +724,116 @@
.node_id
+,%0A integration_id=NS.tendrl_context.integration_id
).save()
|
dd7e0d18a15195cf67af44af8c15918a5cf068e4 | add header information | douban_book_api.py | douban_book_api.py | from douban_client.api.error import DoubanAPIError
import requests
import simplejson
from douban_client import DoubanClient
__author__ = 'owen2785'
baseurl = 'https://api.douban.com/v2/book/isbn/'
def getbyisbn_without_auth(isbn):
r = requests.get(baseurl+str(isbn))
return r.json() | Python | 0 | @@ -194,18 +194,16 @@
/isbn/'%0A
-%0A%0A
def getb
@@ -266,17 +266,81 @@
tr(isbn)
-)
+,headers=headers)%0A print r.headers%0A print r.request.headers
%0A ret
@@ -351,8 +351,9 @@
r.json()
+%0A
|
72eeb2ddb1f1be2e0c475f730461c3f195759fea | add task start time to loghub | dpark/utils/log.py | dpark/utils/log.py | import os.path
import sys
import logging
import re
from datetime import datetime
LOG_FORMAT = '{GREEN}%(asctime)-15s{RESET}' \
' [%(levelname)s] [%(threadName)s] [%(name)-9s:%(lineno)d] %(message)s'
DATE_FORMAT = '%Y-%m-%d %H:%M:%S'
RESET = "\033[0m"
BOLD = "\033[1m"
BLACK, RED, GREEN, YELLOW, BLUE, MAGE... | Python | 0.000001 | @@ -2,21 +2,16 @@
mport os
-.path
%0Aimport
@@ -3750,118 +3750,8 @@
h)%0A%0A
- dpark_mtime = datetime.fromtimestamp(os.stat(dpark.__file__).st_mtime).strftime('%25Y-%25m-%25dT%25H:%25M:%25S')%0A%0A
@@ -3890,30 +3890,70 @@
(%22
-DPARK%22, dpark.__file__
+CTIME%22, datetime.strftime(datetime.now(), %2... |
08a51723539dbeba08cd23d8942d393ae3f8535c | Add test for have_term and get_term methods | tests/grammar_term-nonterm_test/TerminalAddingTest.py | tests/grammar_term-nonterm_test/TerminalAddingTest.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import TestCase
from grammpy import Grammar
from grammpy.Terminal import Terminal
class TempClass:
pass
class TerminalAddingTest(TestCase):
def test_correctAddOne(self):
gr =... | Python | 0.000001 | @@ -267,16 +267,410 @@
tCase):%0A
+%0A def test_haveTermEmpty(self):%0A gr = Grammar()%0A self.assertFalse(gr.have_term(TempClass))%0A self.assertFalse(gr.have_term(1))%0A self.assertFalse(gr.have_term('asdf'))%0A%0A def test_getTermEmpty(self):%0A gr = Grammar()%0A self... |
396ab20874a0c3492482a8ae03fd7d61980917a5 | Update closest match adapter docstring. | chatterbot/adapters/logic/closest_match.py | chatterbot/adapters/logic/closest_match.py | # -*- coding: utf-8 -*-
from fuzzywuzzy import fuzz
from .base_match import BaseMatchAdapter
class ClosestMatchAdapter(BaseMatchAdapter):
"""
The ClosestMatchAdapter logic adapter creates a response by
using fuzzywuzzy's process class to extract the most similar
response to the input. This adapter s... | Python | 0 | @@ -45,17 +45,16 @@
rt fuzz%0A
-%0A
from .ba
@@ -187,17 +187,23 @@
ter
-creates a
+selects a known
res
@@ -211,215 +211,98 @@
onse
- by
%0A
-using fuzzywuzzy's process class to extract the most similar%0A response to the input. This adapter selects a response to an%0A input statement by selecting the... |
2947fe97d466872de05ada289d9172f41895969c | Update GOV.UK Frontend/Jinja lib test | tests/templates/components/test_radios_with_images.py | tests/templates/components/test_radios_with_images.py | import json
def test_govuk_frontend_jinja_overrides_on_design_system_v3():
with open("package.json") as package_file:
package_json = json.load(package_file)
assert package_json["dependencies"]["govuk-frontend"].startswith("3."), (
"After upgrading the Design System, manually validate that "
... | Python | 0 | @@ -5,16 +5,86 @@
rt json%0A
+from importlib import metadata%0A%0Afrom packaging.version import Version%0A
%0A%0Adef te
@@ -238,20 +238,49 @@
le)%0A
-%0A assert
+ govuk_frontend_version = Version(
pack
@@ -325,25 +325,615 @@
nd%22%5D
-.startswith(%223.%22)
+)%0A%0A govuk_frontend_jinja_version = Vers... |
f4a80c720d0164eb8a942e3ad1b5244d30800e5a | Add --allow-nacl-socket-api for the chromoting functional test. | chrome/test/functional/chromoting_basic.py | chrome/test/functional/chromoting_basic.py | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import pyauto_functional # Must come before chromoting and pyauto.
import chromoting
import pyauto
class ChromotingBa... | Python | 0.000047 | @@ -400,16 +400,361 @@
ng.%22%22%22%0A%0A
+ _EXTRA_CHROME_FLAGS = %5B%0A '--allow-nacl-socket-api=*',%0A %5D%0A%0A def ExtraChromeFlags(self):%0A %22%22%22Ensures Chrome is launched with some custom flags.%0A%0A Overrides the default list of extra flags passed to Chrome. See%0A ExtraChromeFlags() in py... |
0b366a3f4c23b644f885ed649edc577242ae90ee | Fix genreflex rootmap files to not contain stray spaces after "string" Corrsponds to v5-22-00-patches r27408 | cint/reflex/python/genreflex/genrootmap.py | cint/reflex/python/genreflex/genrootmap.py | # Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose is hereby granted without fee, provided that this copyright and
# permissions notice appear in all copies and derivatives.
#
# This software is provided "as is" withou... | Python | 0.000014 | @@ -1632,16 +1632,107 @@
stable)%0A
+ # also remove possible seperator ' ', or set%3Cbasic_string%3Cchar%3E %3E becomes set%3Cstring %3E%0A
nc =
@@ -1766,16 +1766,18 @@
ng%3Cchar%3E
+-?
%22, 'stri
|
b2e6a7a8df1ede0118838ce494e1679eea0eb578 | Decrease cert expiration alerting threshold from 2 years to 1 year. (#1002) | scripts/check-bundled-ca-certs-expirations.py | scripts/check-bundled-ca-certs-expirations.py | #!/usr/bin/env python
# Copyright 2014-2020 Scalyr 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 ... | Python | 0.000007 | @@ -1018,15 +1018,14 @@
in
-2
+1
year
-s
or
@@ -1103,17 +1103,17 @@
* 30 *
-2
+1
))%0A%0A%0Adef
|
686f0e21de510a12ee3d6af410448eb405d3e7b6 | add 1.4.0 release and 1.5 stable branch (#16261) | var/spack/repos/builtin/packages/libunwind/package.py | var/spack/repos/builtin/packages/libunwind/package.py | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Libunwind(AutotoolsPackage):
"""A portable and efficient C programming interface (API) to ... | Python | 0 | @@ -650,37 +650,295 @@
('1.
-4-head', branch='v1.4-stable'
+5-head', branch='v1.5-stable')%0A version('1.5-rc1', sha256='3e0cbc6dee326592097ef06e97cf76ef597987eddd0df8bea49b0594e587627a')%0A version('1.4-head', branch='v1.4-stable')%0A version('1.4.0', sha256='df59c931bd4d7ebfd83ee481c943edf015138089b8e50ab... |
1be539f68019435b2d09b1a46e4786a09e59edf2 | Allow for multiple SEPA payment methods with different versions (#493) (#496) | account_banking_pain_base/models/account_payment_method.py | account_banking_pain_base/models/account_payment_method.py | # -*- coding: utf-8 -*-
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields, api, _
from odoo.exceptions import UserError
class AccountPaymentMethod(models.Model):
_inherit = 'account.payment.meth... | Python | 0 | @@ -921,8 +921,294 @@
f.name)%0A
+%0A _sql_constraints = %5B(%0A # Extending this constraint from account_payment_mode%0A 'code_payment_type_unique',%0A 'unique(code, payment_type, pain_version)',%0A 'A payment method of the same type already exists with this code'%0A ' and PAIN v... |
4697bb9bb7a3708f1c35b795c02db329d3142703 | Add script to collect metrics in samples of a case into a single vector | src/rgbd_benchmark_tools/h5_collectSamples.py | src/rgbd_benchmark_tools/h5_collectSamples.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 17 09:02:31 2015
@author: jesus
"""
import argparse
import numpy as np
import h5py
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='''
This script collects the metrics and results from several samples of an experiment ... | Python | 0 | @@ -926,17 +926,23 @@
if 'eval
-'
+/'+unit
in main
@@ -982,24 +982,35 @@
xisting eval
+/%22+unit + %22
group in%22 +
@@ -1054,17 +1054,23 @@
up%5B'eval
-'
+/'+unit
%5D%0A nu
@@ -1177,24 +1177,74 @@
roup.keys()%0A
+ samples = %5Bx for x in samples if x != 'eval'%5D%0A
eval_gro
@@ -1281,27 +1281,16 @@... |
0f295d0ee8c29361bd4f80dbc947da65dd7fbbe6 | move raindrops | Exercism/python/raindrops/raindrops.py | Exercism/python/raindrops/raindrops.py | raindrops = ((3, "Pling"), (5, "Plang"), (7, "Plong"))
def convert(number):
raindrop_result = [raindrop[1] for raindrop in raindrops if number % raindrop[0] == 0]
return "".join(raindrop_result) or str(number) | Python | 0.000759 | @@ -1,16 +1,41 @@
+def convert(number):%0A
raindrops = ((3,
@@ -73,36 +73,20 @@
long%22))%0A
-def convert(number):
+
%0A rai
|
15ae458f7cf1a8257967b2b3b0ceb812547c4766 | Test more edge cases of the highlighting parser | IPython/utils/tests/test_pycolorize.py | IPython/utils/tests/test_pycolorize.py | """Test suite for our color utilities.
Authors
-------
* Min RK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING.txt, distributed as pa... | Python | 0 | @@ -1,8 +1,24 @@
+# coding: utf-8%0A
%22%22%22Test
@@ -691,16 +691,26 @@
t Parser
+%0Aimport io
%0A%0A#-----
@@ -879,16 +879,442 @@
------%0A%0A
+sample = u%22%22%22%0Adef function(arg, *args, kwarg=True, **kwargs):%0A '''%0A this is docs%0A '''%0A pass is True%0A False == None%0A%0A with io.open... |
1eee9dfa6f7ea359f0dc4d0bf7450b3c96d3731d | Remove unnecessary var | reunition/apps/reunions/management/commands/setalumniusersfromrsvps.py | reunition/apps/reunions/management/commands/setalumniusersfromrsvps.py | from django.core.management.base import NoArgsCommand
from django.db.models.fields import related
from reunition.apps.alumni import models as alumni_m
from reunition.apps.reunions import models as reunions_m
class Command(NoArgsCommand):
help = 'Associate reunions.Rsvp.created_by to alumni.Person.user when not ... | Python | 0.000007 | @@ -545,11 +545,8 @@
xist
-, e
:%0A
|
4308b5f351aef2339a2166a12b02ecc74e58d1d7 | Remove too far away points (filtering by time) | server/lib/python/cartodb_services/cartodb_services/mapbox/isolines.py | server/lib/python/cartodb_services/cartodb_services/mapbox/isolines.py | '''
Python implementation for Mapbox services based isolines.
Uses the Mapbox Time Matrix service.
'''
import json
from cartodb_services.tools import Coordinate
from cartodb_services.tools.spherical import (get_angles,
calculate_dest_location)
from cartodb_services.mapbox.... | Python | 0.000001 | @@ -7009,10 +7009,9 @@
f c
-!=
+%3C
iso
@@ -7015,16 +7015,34 @@
isorange
+ * (1 + tolerance)
:%0A
|
5fc54a2120fbc9151073c9b247e3fd7e8e79a9fa | Remove premature attribute from migration script (Fixes #283) | src/adhocracy/migration/versions/054_add_hierachical_categorybadges.py | src/adhocracy/migration/versions/054_add_hierachical_categorybadges.py | from datetime import datetime
from sqlalchemy import Column, ForeignKey, MetaData, Table
from sqlalchemy import Boolean, Integer, DateTime, String, Unicode, LargeBinary
metadata = MetaData()
#table to update
badge_table = Table(
'badge', metadata,
#common attributes
Column('id', Integer, primary_key=True)... | Python | 0 | @@ -962,111 +962,8 @@
e),%0A
- # attributes for ThumbnailBadges%0A Column('thumbnail', LargeBinary, default=None, nullable=True)%0A
)%0A%0A%0A
|
a1bf5aaf3866eea7370c1a401a5e3d5791f97539 | Add exception for inline encoded images. | better_figures_and_images/better_figures_and_images.py | better_figures_and_images/better_figures_and_images.py | """
Better Figures & Images
------------------------
This plugin:
- Adds a style="width: ???px; height: auto;" to each image in the content
- Also adds the width of the contained image to any parent div.figures.
- If RESPONSIVE_IMAGES == True, also adds style="max-width: 100%;"
- Corrects alt text: if alt == imag... | Python | 0 | @@ -1598,13 +1598,16 @@
-break
+continue
%0A
|
b06687b1e78645a055a314be4b1af693e2c3be05 | remove obsolete arguments | RatS/filmaffinity/filmaffinity_site.py | RatS/filmaffinity/filmaffinity_site.py | import time
from RatS.base.base_site import Site
from selenium.webdriver.common.by import By
class FilmAffinity(Site):
def __init__(self, args):
login_form_selector = "//form[@id='login-form']"
self.LOGIN_USERNAME_SELECTOR = login_form_selector + "//input[@name='username']"
self.LOGIN_PAS... | Python | 0.005914 | @@ -1066,33 +1066,16 @@
ELECTOR,
- By.CSS_SELECTOR,
%22div.qc
@@ -1416,45 +1416,8 @@
OR,%0A
- By.CSS_SELECTOR,%0A
|
cd17eba08cbb898b1cf6d0bb622315d851b4eeec | The main parameter object is a list | ocradmin/ocr/tools/manager.py | ocradmin/ocr/tools/manager.py | """
Plugin manager.
"""
import os
import sys
class PluginManager(object):
"""
Class for managing OCR tool plugins.
"""
def __init__(self):
pass
@classmethod
def get_plugins(cls):
"""
List available OCR plugins.
"""
engines = []
plugdir = os.pa... | Python | 0.999856 | @@ -836,21 +836,19 @@
type=%22
-objec
+lis
t%22,%0A
|
c79c3b7f920f4bcf5fb69cf74b224e6ff37a709b | test triggering travis | fabre_test.py | fabre_test.py | #!/usr/bin/env python
# coding=UTF-8
import pytest
import sys
sys.exit(0)
| Python | 0.000001 | @@ -61,16 +61,115 @@
s%0A%0A%0A
-sys.exit(0
+# content of test_assert1.py%0Adef f():%0A return 3%0A%0Adef test_function():%0A assert f() == 4%0A%0A%0Atest_function(
)%0A
|
0fb800cd42f1545e8d5e744af1ff81922c930448 | Add Google analytics ID | pelicanconf.py | pelicanconf.py | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
from datetime import datetime
import os
import sys
BASE_DIR = os.path.dirname(__file__)
# Clone the official plugin repo to the `official_plugins` dir
# (https://github.com/getpelican/pelican-plugins)
sys.path.append(os.path.join(... | Python | 0.000002 | @@ -901,16 +901,51 @@
z'),%0A)%0A%0A
+GOOGLE_ANALYTICS = %22UA-42951023-1%22%0A
%0ALOCALE
|
df40b12248bfac18d6b0c2c247b67d101f4a0635 | revise last_day | muxiwebsite/book/views.py | muxiwebsite/book/views.py | # coding: utf-8
"""
views.py
~~~~~~~~
木犀图书视图函数
url func
/book 主页 ; 显示:1.最近录入(6条), 2.最近借阅
/book/logout 登出
/bookin 录入新书(只有管理员可见)
/search ... | Python | 0.000325 | @@ -3493,16 +3493,17 @@
_page =
+(
len(book
@@ -3510,16 +3510,19 @@
_result)
+-1)
/app.con
@@ -3549,16 +3549,17 @@
LTS'%5D+1%0A
+%0A
for
|
94edba9f203d11b9ede8cf32eced2b409f9ce491 | Fix bug with * | rs.py | rs.py | #!/usr/bin/env python
from __future__ import print_function
import re, string, sys
# XXX: this sucks
import sre_parse
orig_expand_template = sre_parse.expand_template
def wrap_expand_template(template, match):
class MatchWrapper(object):
def __init__(self):
self.string = match.string
d... | Python | 0 | @@ -804,16 +804,20 @@
e.IGNORE
+CASE
%0A for
|
24ea0a43ef21a33c3f3f2f526530d23ad3ff7d90 | fix code style | tensorflow_text/python/ops/hub_module_splitter_test.py | tensorflow_text/python/ops/hub_module_splitter_test.py | # coding=utf-8
# Copyright 2020 TF.Text Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | Python | 0.000022 | @@ -4495,17 +4495,17 @@
litter,
-'
+%22
ram://sa
@@ -4513,17 +4513,17 @@
ed_model
-'
+%22
)%0A se
@@ -4560,17 +4560,17 @@
ists_v2(
-'
+%22
ram://sa
@@ -4582,9 +4582,9 @@
odel
-'
+%22
), T
|
6a1176d547694b535bc581d5a0af87230d533caf | set to version 3.305.533 | base/pythonvideoannotator/pythonvideoannotator/__init__.py | base/pythonvideoannotator/pythonvideoannotator/__init__.py | # !/usr/bin/python3
# -*- coding: utf-8 -*-
__version__ = "3.305.532"
__author__ = ["Ricardo Ribeiro", "Carlos Mao de Ferro", "Hugo Cachitas"]
__credits__ = ["Ricardo Ribeiro", "Carlos Mao de Ferro", "Hugo Cachitas"]
__license__ = "Attribution-NonCommercial-ShareAlike 4.0 International"
__maintainer__ = ["Ricardo... | Python | 0.000001 | @@ -65,9 +65,9 @@
5.53
-2
+3
%22%0A__
|
4af80f4a72618482135f388c3bc424fa12e1ccc4 | refactor filter structure | shot_detector/filters/dsl/dsl_filter_mixin.py | shot_detector/filters/dsl/dsl_filter_mixin.py | # -*- coding: utf8 -*-
"""
This is part of shot detector.
Produced by w495 at 2017.05.04 04:18:27
"""
from __future__ import absolute_import, division, print_function
import collections
import logging
from shot_detector.utils.dsl import BaseDslOperatorMixin
from shot_detector.utils.dsl.dsl_kwargs import dsl_... | Python | 0.000001 | @@ -530,32 +530,105 @@
orator(*
-args, **kwargs):
+dsl_rules):%0A %22%22%22%0A %0A :param dsl_rules: %0A :return: %0A %22%22%22
%0A
@@ -660,19 +660,17 @@
tor(
-args, kwarg
+*dsl_rule
s)%0A%0A
|
6e2997ba8a551e1a93b086b7eabc7b73f0d7aeb0 | Remove extra blank line | test/data/observatory/repository/test_category_repo.py | test/data/observatory/repository/test_category_repo.py | import unittest
from cartoframes.data.observatory.category import Category
from cartoframes.exceptions import DiscoveryException
from cartoframes.data.observatory.entity import CatalogList
from cartoframes.data.observatory.repository.category_repo import CategoryRepository
from cartoframes.data.observatory.repository... | Python | 0.99854 | @@ -2125,17 +2125,16 @@
gories%0A%0A
-%0A
@pat
|
d82c37a85e3522f7cf7e26a220eb5946aec66ffe | Create docs from numpy | test/test_data_utils.py | test/test_data_utils.py | from cStringIO import StringIO
from nose.tools import raises
from microscopes.lda import utils
def test_docs_from_document_term_matrix():
dtm = [[2, 1], [3, 2]]
docs = [[0, 0, 1], [0, 0, 0, 1, 1]]
assert utils.docs_from_document_term_matrix(dtm) == docs
def test_docs_from_ldac_simple():
stream = Str... | Python | 0 | @@ -1,12 +1,32 @@
+import numpy as np%0A%0A
from cString
@@ -279,24 +279,196 @@
) == docs%0A%0A%0A
+def test_docs_from_numpy_dtp():%0A dtm = np.array(%5B%5B2, 1%5D, %5B3, 2%5D%5D)%0A docs = %5B%5B0, 0, 1%5D, %5B0, 0, 0, 1, 1%5D%5D%0A assert utils.docs_from_document_term_matrix(dtm) == docs%0A%0A%0A
def test... |
4cc3fe30e676c31cc6af9cb3a75de10b47ff2adc | Add % to date format | door/views.py | door/views.py | from django.shortcuts import render
from django.http import HttpResponse
from .models import DoorStatus, OpenData
from django.views.decorators.csrf import csrf_exempt
from django.utils import timezone
from website import settings
from datetime import datetime
import json
# Create your views here.
@csrf_exempt
def doo... | Python | 0.000007 | @@ -1279,34 +1279,40 @@
+timeStart,%22
+%25
Y-
+%25
m-
+%25
d.
+%25
H:
+%25
i:
+%25
s%22)%0A
@@ -2071,26 +2071,32 @@
eStart,%22
+%25
Y-
+%25
m-
+%25
d.
+%25
H:
+%25
i:
+%25
s%22)%0A
@@ -2171,18 +2171,24 @@
nd,%22
+%25
Y-
+%25
m-
+%25
d.
+%25
H:
+%25
i:
+%25
s%22)%0A
|
36ed44e94916d6abe3458645c957dd9715cbc532 | set STATIC_ROOT | myproj/myproj/settings.py | myproj/myproj/settings.py | """
Django settings for myproj project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | Python | 0.000008 | @@ -2011,16 +2011,71 @@
atic/'%0A%0A
+STATIC_ROOT = os.path.join(BASE_DIR, 'web', 'static')%0A%0A
TEMPLATE
|
825c1ba04bb2374020025de18e1cb17b5479ee7f | Fix document | chainer/functions/activation/log_softmax.py | chainer/functions/activation/log_softmax.py | import numpy
from chainer import cuda
from chainer import function
from chainer.utils import type_check
if cuda.cudnn_enabled:
cudnn = cuda.cudnn
libcudnn = cudnn.cudnn
_algorithm = libcudnn.CUDNN_SOFTMAX_LOG
_mode = libcudnn.CUDNN_SOFTMAX_MODE_CHANNEL
_cudnn_version = libcudnn.getVersion()
def ... | Python | 0.000004 | @@ -2919,16 +2919,37 @@
tes the
+logarithm of%0A the
probabil
@@ -2951,20 +2951,16 @@
bability
-%0A
:math:%60
@@ -2981,27 +2981,39 @@
ined as%0A
+%0A
-:
+..
math:
-%60
+:%0A
p(x) = %7B
@@ -3039,18 +3039,17 @@
%5C%5Csum_%7Bx
-_2
+'
%7D %5C%5Cexp(
@@ -3055,29 +3055,38 @@
(f(x
+'
))%7D
-... |
c929cd9ba2718175e79906f836780e47d4793d75 | enable test for SQL | corehq/apps/commtrack/tests/test_rebuild.py | corehq/apps/commtrack/tests/test_rebuild.py | from django.test import TestCase
from casexml.apps.case.cleanup import rebuild_case_from_forms
from casexml.apps.case.mock import CaseFactory
from casexml.apps.case.models import CommCareCase
from corehq.apps.commtrack.helpers import make_product
from corehq.apps.commtrack.processing import rebuild_stock_state
from cor... | Python | 0.000001 | @@ -4501,24 +4501,51 @@
, form_id)%0A%0A
+ @run_with_all_backends%0A
def test
@@ -4568,32 +4568,32 @@
s_simple(self):%0A
-
initial_
@@ -4860,32 +4860,42 @@
y)%0A%0A case
+_accessors
= CaseAccessors
@@ -4899,32 +4899,62 @@
ors(self.domain)
+%0A case = case_accessors
.get_case(self.c... |
566ceb81a14685c201f3c92668dc0530a1a91176 | fix path | organization/projects/management/commands/project_inject_content.py | organization/projects/management/commands/project_inject_content.py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016-2017 Ircam
# Copyright (c) 2016-2017 Guillaume Pellerin
# Copyright (c) 2016-2017 Emilie Zawadzki
# This file is part of mezzanine-organization.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | Python | 0.000001 | @@ -1338,16 +1338,126 @@
ions):%0A%0A
+ json_path = '/srv/lib/mezzanine-organization/organization/projects/management/commands/projects.json'%0A
@@ -1490,23 +1490,17 @@
son(
-'projects.json'
+json_path
)%0A%0A
|
898dbbbda66b842b9477d473788e929bd18f8572 | Add --pdb flag and fix --no-discover flag | os_testr/os_testr.py | os_testr/os_testr.py | #!/usr/bin/env python2
# Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | Python | 0 | @@ -2177,16 +2177,125 @@
tests%22)%0A
+ parser.add_argument('--pdb',%0A help='Run a single test that has pdb traces added')%0A
opts
@@ -4059,24 +4059,210 @@
d, env=env)%0A
+ return_code = proc.communicate()%5B0%5D%0A return return_code%0A%0Adef call_testtools_run(test_id):%0A c... |
05f00ab66df27e56921b30dde0691a176ba829fa | delete comments | chainer/functions/normalization/layer_normalization.py | chainer/functions/normalization/layer_normalization.py | from chainer import cuda
from chainer import function
from chainer.utils import type_check
def _broadcast_to(xp, x, shape):
if hasattr(xp, 'broadcast_to'):
return xp.broadcast_to(x, shape)
else:
# numpy 1.9 doesn't support broadcast_to method
dummy = xp.empty(shape)
bx, _ = xp.... | Python | 0 | @@ -1944,152 +1944,42 @@
-# = g_inv_std * (- 1. / (self.std ** 2))%0A%0A g_var = g_std * 0.5 * self.inv_std%0A # = g_std * 0.5 * 1. / xp.sqrt(self.var + self.eps)
+g_var = g_std * 0.5 * self.inv_std
%0A%0A
@@ -2158,16 +2158,16 @@
_x_mu_2%0A
+
@@ -2222,80 +2222,8 @@
1.)
-%0A # ... |
70004e7caf332e55d40b4f1f757138c4cd35a3fe | fix path | organization/projects/management/commands/project_inject_content.py | organization/projects/management/commands/project_inject_content.py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016-2017 Ircam
# Copyright (c) 2016-2017 Guillaume Pellerin
# Copyright (c) 2016-2017 Emilie Zawadzki
# This file is part of mezzanine-organization.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | Python | 0.000001 | @@ -1338,16 +1338,126 @@
ions):%0A%0A
+ json_path = '/srv/lib/mezzanine-organization/organization/projects/management/commands/projects.json'%0A
@@ -1490,23 +1490,17 @@
son(
-'projects.json'
+json_path
)%0A%0A
|
a1e4cfba6c184c76986d8bb0a11e0a5f1ea07ad1 | Fix test | mapentity/tests/test_attachments.py | mapentity/tests/test_attachments.py | import mock
from django.test import TestCase, RequestFactory
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from django.core.files.uploadedfile import SimpleUploadedFile
from paperclip.models import Attachment, FileType
from paperclip.views import add_url_for_... | Python | 0.000004 | @@ -615,16 +615,26 @@
eturn %7B'
+paperclip.
add_atta
|
2e4ec0fea35722fbdbab36ce326e664249e3eaf7 | Add support jinja2 | nacho/controllers/base.py | nacho/controllers/base.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from cyclone.web import RequestHandler
class ApplicationController(RequestHandler):
pass
| Python | 0 | @@ -48,15 +48,15 @@
rom
-cyclone
+tornado
.web
@@ -83,59 +83,970 @@
er%0A%0A
-%0Aclass ApplicationController(RequestHandler):%0A pass
+from jinja2 import Environment, FileSystemLoader, TemplateNotFound%0A%0A%0Aclass ApplicationController(RequestHandler):%0A def render(self, template_name, **kwargs):%0A ... |
fde4cf7b025255bdc5c63f1d2c84a1f45dc6068c | Make tests more robust | mailme/core/tests.py | mailme/core/tests.py | from uuid import uuid4
from datetime import datetime
import requests
from django.test import TestCase
from django.utils import unittest
from django.utils.timezone import utc
import pytz
from mailme.core.models import (
Feed,
Post,
Category,
Enclosure,
FEED_GENERIC_ERROR,
FEED_TIMEDOUT_ERROR,
... | Python | 0.001098 | @@ -100,42 +100,8 @@
ase%0A
-from django.utils import unittest%0A
from
@@ -134,16 +134,16 @@
ort utc%0A
+
%0Aimport
@@ -416,25 +416,16 @@
ategory(
-unittest.
TestCase
@@ -679,25 +679,16 @@
closure(
-unittest.
TestCase
@@ -986,24 +986,24 @@
str(en))%0A%0A%0A
+
class TestPo
@@ -1005,25 +1005,16 @@
estPost(
-... |
caddce9b9c77a09b8ea6e3af5f4815afe8e7b908 | Use correct file handle for writing ancestor simulated sequences to fasta. | test/simulations/sample_genomes.py | test/simulations/sample_genomes.py | """
Create genome alignment by random sampling columns from INDELible simulation outputs.
"""
from collections import OrderedDict
import Utility
import csv
import sys
import os
import random
import ctypes
from collections import deque
BASES_PER_CODON = 3
scaling_factors = sys.argv[1].split(",")
output_... | Python | 0 | @@ -4719,32 +4719,36 @@
%0A fh_out_
+anc_
fasta.write('%3E%25s
|
d2683b12f10eea662ae5bbad9e8a49857bcab599 | version bump to 0.4 | luigi_swf/__init__.py | luigi_swf/__init__.py |
# Exports
from .executor import LuigiSwfExecutor
from .tasks import SwfHeartbeatCancel
__version__ = '0.3'
| Python | 0 | @@ -104,7 +104,7 @@
'0.
-3
+4
'%0A
|
7f3a93dea0eb683bf2d35110fbe921b88646c579 | debug spacy init time | nalaf/features/parsing.py | nalaf/features/parsing.py | from textblob import TextBlob
from textblob.en.taggers import NLTKTagger
from textblob.en.np_extractors import FastNPExtractor
from nalaf.features import FeatureGenerator
from spacy.en import English
#import time
class SpacyPosTagger(FeatureGenerator):
"""
POS-tag a dataset using the Spacy Pos Tagger
"""
... | Python | 0 | @@ -193,16 +193,46 @@
English%0A
+from nalaf import print_debug%0A
#import
@@ -379,27 +379,125 @@
-self.nlp = English(
+print_debug(%22SpacyPosTagger: INIT START%22)%0A self.nlp = English()%0A print_debug(%22SpacyPosTagger: INIT END%22
)%0A%0A
|
beec55986440c5c7a4afdd556c743dd0d6bc3aa9 | fix citation in random_expand | chainercv/transforms/image/random_expand.py | chainercv/transforms/image/random_expand.py | import numpy as np
import random
def random_expand(img, max_ratio=4, fill=0, return_param=False):
"""Expand an image randomly.
This method randomly place the input image on a larger canvas. The size of
the canvas is :math:`(rW, rH)`, where :math:`(W, H)` is the size of the
input image and :math:`r` i... | Python | 0.001224 | @@ -547,18 +547,19 @@
effect %5B
-1%5D
+#%5D_
.%0A%0A .
@@ -561,17 +561,17 @@
.. %5B
-1
+#
%5D Wei Li
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.