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
45c86ade944d9afe7bc8e627e25fa861489cd4b6
fix a typo so that email is sent to the correct host
crate_project/settings/production/gondor.py
crate_project/settings/production/gondor.py
import os from .base import * from local_settings import * # Instance specific settings (in deploy.settings_[INSTANCE_NAME])) # Fix Email Settings SERVER_EMAIL = "server@crate.io" DEFAULT_FROM_EMAIL = "support@crate.io" CACHES = { "default": { "BACKEND": "redis_cache.RedisCache", "LOCATION": ":...
Python
0.999541
@@ -1100,33 +1100,24 @@ %5B%22EMAIL_HOST -_PASSWORD %22%5D%0AEMAIL_POR
490ff333d7410f284be36ec938146dc3f36aa7dc
Change ordering of subreddits
main/gen_features.py
main/gen_features.py
__author__ = 'sharvey' import multiprocessing from corpus.mysql.reddit import RedditMySQLCorpus from feature import ngram from feature import lexical import cred import pprint import re def gen_feature(atuple): text = re.sub(r'https?://([a-zA-Z0-9\.\-_]+)[\w\-\._~:/\?#@!\$&\'\*\+,;=%%]*', '\\1...
Python
0.000002
@@ -1537,16 +1537,8 @@ ws', - 'news', 'qu @@ -1576,16 +1576,37 @@ 'gaming' +, 'news', 'AskReddit' %5D:%0A
b3bfc6e3949fcca58cbf84232432c966f5f5d8c6
fix indentation
analyzer/darwin/lib/dtrace/apicalls.py
analyzer/darwin/lib/dtrace/apicalls.py
#!/usr/bin/env python # Copyright (C) 2015 Dmitry Rodionov # This file is part of my GSoC'15 project for Cuckoo Sandbox: # http://www.cuckoosandbox.org # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. import os import json from common import * from...
Python
0.000005
@@ -1740,23 +1740,26 @@ - # If w +# When we'r e us -e +ing %60su @@ -1815,20 +1815,16 @@ to%0A - - # exclud @@ -1829,12 +1829,18 @@ ude -it's +sudo's own out @@ -1860,20 +1860,16 @@ results%0A - sudo
2a1407b34187cfba6c968a7b95e58ec1c115a8f6
Print functions
datacommons/examples/population_analysis.py
datacommons/examples/population_analysis.py
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
0.00001
@@ -1113,17 +1113,17 @@ ax_rows= -2 +3 )%0A stat @@ -1462,33 +1462,33 @@ 100):%0A print - +( state_table%0A%0A s @@ -1474,32 +1474,33 @@ rint(state_table +) %0A%0A state_table @@ -1777,33 +1777,33 @@ 100):%0A print - +( state_table%0A%0A s @@ -1789,32 +1789,33 @@ rint(state_table +) %0A%0A sta...
d74b15485a0756ac1702fafd640f616f022b3f58
bump verions
equals/__init__.py
equals/__init__.py
from __future__ import absolute_import __version__ = '0.0.2' import numbers import collections from equals.equals import Equals as instance_of from equals.constraints.anything_true import AnythingTrue from equals.constraints.anything_false import AnythingFalse anything = instance_of() try: any_string = instance...
Python
0.000001
@@ -53,16 +53,17 @@ = '0.0.2 +1 '%0A%0Aimpor
9c2d1e9e841014dbc986b6e509b19f7f881969c4
Fix silly typo
openspending/lib/csvexport.py
openspending/lib/csvexport.py
import csv import sys from datetime import datetime from openspending import model from openspending.mongo import DBRef, ObjectId def write_csv(entries, response): response.content_type = 'text/csv' # NOTE: this should be a streaming service but currently # I see no way to know the full set of keys with...
Python
0.999999
@@ -999,12 +999,14 @@ -self +writer .wri
ab35f508375c760770884882acaea79079a1a976
remove unnesecary print
erlang/__init__.py
erlang/__init__.py
from __future__ import division def extended_b_lines(usage, blocking): ''' Uses the Extended Erlang B formula to calcluate the ideal number of lines for the given usage in erlangs and the given blocking rate. Usage: extended_b_lines(usage, blocking) ''' line_count = 1 while extended_b(usage, line_count) > b...
Python
0.999922
@@ -879,22 +879,8 @@ 1):%0A -%09%09%09print(PBR)%0A %09%09%09P
3a79a0f16635eab998debdb9be66154ab4db84f5
add a newline after quoted messages
pybb/contrib/quotes/views.py
pybb/contrib/quotes/views.py
from django.shortcuts import get_object_or_404 from django.http import Http404, HttpResponse from django.contrib import messages from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.shortcuts import redirect from django.core.exceptions import Permiss...
Python
0
@@ -2502,38 +2502,12 @@ -form_kwargs%5B'initial'%5D%5B' body -'%5D = ' @@ -2560,36 +2560,79 @@ - +for post_id, post in post_quoted.iteritems()%5D)%0A @@ -2623,36 +2623,45 @@ - +body += '%5Cn'%0A @@ -2667,51 +2667,42 @@ for - post...
c40a07e4ba1bfefd977bc9eea71abe5fcaf97370
Use custom exception in place of NotImplemented
manifestos/twitter.py
manifestos/twitter.py
import re from django.conf import settings import tweepy TWITTER_CONSUMER_KEY = settings.TWITTER_CONSUMER_KEY TWITTER_CONSUMER_SECRET = settings.TWITTER_CONSUMER_SECRET TWITTER_ACCESS_KEY = settings.TWITTER_ACCESS_KEY TWITTER_ACCESS_SECRET = settings.TWITTER_ACCESS_SECRET class TwitterBot(object): """ Creat...
Python
0.000001
@@ -270,16 +270,65 @@ ECRET%0A%0A%0A +class TwitterBotException(Exception):%0A pass%0A%0A%0A class Tw @@ -728,24 +728,77 @@ elf, text):%0A + # Make sure we have legitimate text to tweet%0A if n @@ -845,22 +845,27 @@ ise -NotImplemented +TwitterBotException ('Ca @@ -888,16 +888,128 @@ ings.')%0...
4b4b689463c0e6d0db783a10fcf74b21fea60a68
Fix double repr.
pygments/formatters/other.py
pygments/formatters/other.py
# -*- coding: utf-8 -*- """ pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: 2006 by Georg Brandl, Armin Ronacher. :license: BSD, see LICENSE for more details. """ from pygments.formatter import Formatter __all__ = ['NullFormatt...
Python
0.000001
@@ -1928,33 +1928,33 @@ write(%22%25s%5Ct%25 -r +s %5Cn%22 %25 (lasttype, @@ -2049,17 +2049,17 @@ e(%22%25s%5Ct%25 -r +s %5Cn%22 %25 (l
a3a1d478a3f68209cab144b8c15f78327f0fbbdd
Indent the text wrap lines hanging
dox/runner.py
dox/runner.py
# Copyright (c) 2014 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 # # Unless required by applica...
Python
0.000586
@@ -2427,24 +2427,28 @@ ent_indent=' + ')%0A
23d2284e477a9e85b7e7a0d4adc8e7e216995450
Add a test for xarray grid shading (#581)
pygmt/tests/test_grdimage.py
pygmt/tests/test_grdimage.py
""" Test Figure.grdimage """ import numpy as np import pytest import xarray as xr from .. import Figure from ..datasets import load_earth_relief from ..exceptions import GMTInvalidInput from ..helpers.testing import check_figures_equal @pytest.fixture(scope="module", name="grid") def fixture_grid(): "Load the gr...
Python
0
@@ -1729,16 +1729,604 @@ n fig%0A%0A%0A +@pytest.mark.xfail(reason=%22Upstream bug in GMT 6.1.1%22)%0A@check_figures_equal()%0Adef test_grdimage_xarray_shading(grid, fig_ref, fig_test):%0A %22%22%22%0A Test that shading works well for xarray.%0A See https://github.com/GenericMappingTools/pygmt/issues/364%0A ...
3c9b50d028919beefc9611f85a6ced2fe2362e3e
revert partial change from commit 2397 that should not have gone through - need to find cleaner way of shutting down server
bin/openerp-server.py
bin/openerp-server.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it ...
Python
0
@@ -6450,17 +6450,16 @@ n()%0A -# sys.exit @@ -6465,24 +6465,8 @@ t(0) -%0A os._exit(0) %0A%0Afo
07b586ba0d2c8dfac6c344c8020be7e029fbdd11
fix `IPRouteRequest` to work with MPLS dst
pyroute2/netlink/rtnl/req.py
pyroute2/netlink/rtnl/req.py
from socket import AF_INET6 from pyroute2.common import basestring from pyroute2.netlink.rtnl.ifinfmsg import ifinfmsg from pyroute2.netlink.rtnl.rtmsg import rtmsg class IPRequest(dict): def __init__(self, obj=None): dict.__init__(self) if obj is not None: self.update(obj) def u...
Python
0
@@ -887,24 +887,119 @@ if +isinstance(value, dict):%0A dict.__setitem__(self, 'dst', value)%0A elif value != 'de
2a7aee189dff539fe3cf8049319a2b09c6a0fbb1
add new filter to dataset config
pysaliency/dataset_config.py
pysaliency/dataset_config.py
from .datasets import read_hdf5 from .filter_datasets import filter_fixations_by_number, filter_stimuli_by_number, train_split, validation_split, test_split from schema import Schema, Optional dataset_config_schema = Schema({ 'stimuli': str, 'fixations': str, Optional('filters', default=[]): [{ '...
Python
0
@@ -54,16 +54,22 @@ import +(%0A filter_f @@ -87,16 +87,20 @@ _number, +%0A filter_ @@ -117,16 +117,48 @@ _number, +%0A filter_stimuli_by_size,%0A train_s @@ -162,16 +162,20 @@ n_split, +%0A validat @@ -184,16 +184,20 @@ n_split, +%0A test_sp @@ -199,16 +199,18 @@ st_split +%0A) %0A...
46e21ff57d47f1860d639972dc4eed1994a6cd50
remove print statements
scholars/authentication/pipeline.py
scholars/authentication/pipeline.py
import hashlib from social_core.exceptions import AuthAlreadyAssociated, AuthException def auto_logout(*args, **kwargs): """Do not compare current user with new one""" return {'user': None} def check_email_present(backend, uid, user=None, *args, **kwargs): if not kwargs['details'].get('email'): ...
Python
0.999999
@@ -673,49 +673,8 @@ ly)%0A - print user%0A print social%0A%0A
28917935e5086ff6a03964babbb5c2e09957b582
Bump version
pytablewriter/__version__.py
pytablewriter/__version__.py
# encoding: utf-8 from datetime import datetime __author__ = "Tsuyoshi Hombashi" __copyright__ = "Copyright 2016-{}, {}".format(datetime.now().year, __author__) __license__ = "MIT License" __version__ = "0.46.3" __maintainer__ = __author__ __email__ = "tsuyoshi.hombashi@gmail.com"
Python
0
@@ -207,11 +207,11 @@ %220.4 -6.3 +7.0 %22%0A__
a1d88ff0da34300f0417a9c4679d65b6d38f8bd6
修复#64,task无法删除的bug
app/controller/backend/TasksController.py
app/controller/backend/TasksController.py
#!/usr/bin/env python2 # coding: utf-8 # file: TasksController.py import datetime from flask import redirect, render_template, request, jsonify from . import ADMIN_URL from app import web, db from app.CommonClass.ValidateClass import ValidateClass from app.models import CobraTaskInfo from utils import config __auth...
Python
0
@@ -138,16 +138,59 @@ jsonify +%0Afrom sqlalchemy.exc import SQLAlchemyError %0A%0Afrom . @@ -286,16 +286,32 @@ ateClass +, login_required %0Afrom ap @@ -499,24 +499,40 @@ ds=%5B'GET'%5D)%0A +@login_required%0A def tasks(pa @@ -539,94 +539,8 @@ ge): -%0A if not ValidateClass.check_login():%0A return r...
f5b8b4bafabc06504e2ee2e0571f2d8571db17bb
Update for v1.5.4
maxminddb/__init__.py
maxminddb/__init__.py
# pylint:disable=C0111 import os import maxminddb.reader try: import maxminddb.extension except ImportError: maxminddb.extension = None from maxminddb.const import ( MODE_AUTO, MODE_MMAP, MODE_MMAP_EXT, MODE_FILE, MODE_MEMORY, MODE_FD, ) from maxminddb.decoder import InvalidDatabaseEr...
Python
0
@@ -1942,17 +1942,17 @@ = %221.5. -3 +4 %22%0A__auth
5f9da62f28e61636f33495058f3ea4a98a9d3c19
add invalid separators to test
tests/inside_worker_test/cast_to_float_or_null_test.py
tests/inside_worker_test/cast_to_float_or_null_test.py
import pytest import sqlalchemy from tests.inside_worker_test.conftest import slow @pytest.fixture(params=[2, 2.2, 3.898986, "3.898986", "6", "0.2", 0.6]) def valid_float_representation(request): return request.param @pytest.fixture(params=["a2", "10b", "3.898986k", "3k.898986", "l6.9"]) def invalid_floats(req...
Python
0.000002
@@ -125,35 +125,14 @@ 86, -%223.898986%22, %226%22, %220.2%22, 0.6 +, 0 %5D)%0Ad @@ -248,15 +248,15 @@ 8986 -k +c %22, %223 -k +d .898 @@ -266,13 +266,68 @@ %22, %22 -l +e 6.9%22 +, %22f0,9%22 %220,g9%22 %220,9h%22, %220,6%22, %22123'456%22, %221 290%22, None %5D)%0Ad
d13d7f0e950554f443e75d27d049a0fee683b822
Make a call to "wait" on Popen
test/bluebird_test.py
test/bluebird_test.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from bluebird import * import re import os from time import sleep from subprocess import Popen from elftools.elf import elffile as elf def parse_proc_status(pid, field): proc_pid_path = '/proc/{}/status'.format(pid) with open(proc_pid_path) as f...
Python
0.000014
@@ -1475,24 +1475,54 @@ proc.kill()%0A + self.test_proc.wait()%0A os.u
b3e1b6bd9f79427142ebfe4b57892d1cf3a89e86
Implement the latest test spec for update which requires most of the parameters found in an example usage of mlab-ns against npad.
mlab-ns-simulator/mlabsim/update.py
mlab-ns-simulator/mlabsim/update.py
""" This approximates the mlab-ns slice information gathering. The actual system uses nagios and we're not certain about the details. This much simplified version is just a web URL anyone may PUT data into. Warning: This doesn't have any security properties! We need a way to prevent the addition of malicious entrie...
Python
0
@@ -413,16 +413,131 @@ E_YET%0A%0A%0A +DBEntryNames = %5B%0A 'city',%0A 'country',%0A 'fqdn',%0A 'ip',%0A 'port',%0A 'site',%0A 'tool_extra',%0A %5D%0A%0A class Up @@ -792,74 +792,206 @@ -%5Bfqdn, tool_extra_json%5D = self._parse_args(request.args)%0A%0A +dbentry = %7B%7D%0A%0A fo...
fd1425345606c8a5e9ea87177b710b05fb057ce8
fix typo in clinicaltrials search url parameter
scrapi/harvesters/clinicaltrials.py
scrapi/harvesters/clinicaltrials.py
""" API harvester for ClinicalTrials.gov for the SHARE Notification Service http://clinicaltrials.gov/ct2/results?lup_s=04%2F26%2F2015%2F&lup_e=04%2F27%2F2015&displayxml=true iindividual result: http://ClinicalTrials.gov/show/NCT02425332?displayxml=true """ from __future__ import unicode_literals import time import...
Python
0.000019
@@ -4713,19 +4713,16 @@ F%7B%7D%252F%7B%7D -%252F &lup_e=%7B
ff19498444c7897896d5b2a623f6876f5dd39528
Fix broken import
scrapi/harvesters/clinicaltrials.py
scrapi/harvesters/clinicaltrials.py
""" API harvester for ClinicalTrials.gov for the SHARE Notification Service http://clinicaltrials.gov/ct2/results?lup_s=04%2F26%2F2015%2F&lup_e=04%2F27%2F2015&displayxml=true iindividual result: http://ClinicalTrials.gov/show/NCT02425332?displayxml=true """ from __future__ import unicode_literals import time import...
Python
0.000006
@@ -598,22 +598,22 @@ pi.base. -schema +helper s import @@ -617,59 +617,13 @@ ort -default_name_parser%0Afrom scrapi.base.helpers import +(%0A com @@ -628,16 +628,21 @@ ompose, +%0A single_r @@ -648,16 +648,21 @@ result, +%0A build_pr @@ -671,16 +671,21 @@ erties, +%0A datetime @@ -694,16 ...
45a24fae9f5e1ee24c2e0283746224e51f718cc2
Remove redundant test of permissions parameter
planex/tree.py
planex/tree.py
""" In-memory 'filesystem' library """ import os class Tree(object): """ An in-memory 'filesystem' which accumulates file changes to be written later. """ def __init__(self): self.tree = {} def append(self, filename, contents=None, permissions=None): """ Append conten...
Python
0
@@ -412,16 +412,17 @@ me, %7B%7D)%0A +%0A @@ -493,32 +493,33 @@ '') + contents%0A +%0A if permi @@ -709,41 +709,8 @@ me)%0A -%0A if permissions:%0A @@ -755,69 +755,8 @@ ons%0A - else:%0A node%5B'permissions'%5D = 0o644 %0A
df80f5c2ae1bbf67a832e6e8b641799c5b54dc53
fix typo
scripts/construct_bakeoff_graphs.py
scripts/construct_bakeoff_graphs.py
#!/usr/bin/python """ Locally regenerate all the bakeoff regions graphs and indexes that are found here s3://cgl-pipeline-inputs/vg_cgl/bakeoff/ The input fasta's and vcf's are expected to be there already """ import os, sys, subprocess region_to_bed_hg38 = { 'BRCA1':('17', 43044293, 43125482), 'BRCA2':('13'...
Python
0.999991
@@ -2464,17 +2464,16 @@ '.gcsa.l -s cp'%0A
d4257ea870a665f7d52fbedc225b56f6607d439d
fix parameters string
python_terraform/__init__.py
python_terraform/__init__.py
import subprocess import os import json import logging log = logging.getLogger(__name__) class Terraform: def __init__(self, targets=None, state='terraform.tfstate', variables=None): self.targets = [] if targets is None else targets self.variables = dict() if variables is None else variables ...
Python
0.99972
@@ -1294,32 +1294,62 @@ kargs.items():%0A + if not value:%0A para @@ -1356,16 +1356,17 @@ ms += %5B' +- %25s=%25s' %25 @@ -1380,16 +1380,74 @@ value)%5D%0A + else:%0A params += %5B'-%25s' %25 key%5D%0A
7ad7f0231bc50c58f9b606cbab36d6cd98e141ec
Make the error message clearer (#944)
pyvista/plotting/__init__.py
pyvista/plotting/__init__.py
"""Plotting routines.""" from .colors import (color_char_to_word, get_cmap_safe, hex_to_rgb, hexcolors, string_to_rgb, PARAVIEW_BACKGROUND) from .export_vtkjs import export_plotter_vtkjs, get_vtkjs_url from .helpers import plot, plot_arrows, plot_compare_four, plot_itk from .itkplotter import Plot...
Python
0.003492
@@ -976,16 +976,116 @@ istaqt%60%0A + Then import it via: %60from pyvistaqt import %7B%7D%60%0A %60%7B%7D%60 is no longer accessible by %60pyvista.%7B%7D%60%0A See @@ -1243,16 +1243,18 @@ .format( +*%5B feature_ @@ -1257,16 +1257,21 @@ ure_name +%5D * 4 ))%0A%0A%0Acla
fe08db2713cb35e1424034d58d750ebdc52cedbc
Remove explicit < 400 check as apparently this is confusing
synapse/util/retryutils.py
synapse/util/retryutils.py
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -4760,83 +4760,8 @@ ode -%3C 400:%0A valid_err_code = True%0A elif exc_val.code == 4
f53e7452676e6ee903a4d8c350fa356a718a5fcc
Add a test for file: and path: searches for non-ASCII things.
tests/test_path_file_filters/test_path_file_filters.py
tests/test_path_file_filters/test_path_file_filters.py
from nose.tools import raises from dxr.testing import DxrInstanceTestCase class PathAndFileFilterTests(DxrInstanceTestCase): """Basic tests for functionality of the 'path:' and 'file:' filters""" def test_basic_path_results(self): """Check that a 'path:' result includes both file and folder matches....
Python
0.000001
@@ -1,12 +1,36 @@ +# -*- coding: utf-8 -*-%0A from nose.to @@ -1937,28 +1937,339 @@ %5B'fish1', 'folder/fish4'%5D)%0A +%0A def test_unicode(self):%0A %22%22%22Make sure searching for non-ASCII names works.%22%22%22%0A self.found_files_eq(u'file:fre%5Cu0301mium*', %5Bu'fre%5Cu0301mium.txt'%5D)%0A%0A ...
d22bd8970b973fb58f1358b62cf8c27f826aa407
update example
example/gravity.py
example/gravity.py
from pgmagick import Image, Geometry, Color, TypeMetric, \ DrawableText, DrawableList, DrawableGravity, GravityType im = Image(Geometry(600, 600), Color("transparent")) im.fontPointsize(30) im.fillColor(Color("#f010f0")) im.strokeColor(Color("transparent")) im.font("Vera.ttf") dl = DrawableList()...
Python
0.000001
@@ -775,24 +775,68 @@ 0, %22east%22)) +%0Adl.append(DrawableText(0, 20, %22east-long%22)) %0A%0Adl.append(
73e99078b3bce587e059b1a15dbb7f94be70dd8d
enable the possibility of success
testcases/OpalMsglog.py
testcases/OpalMsglog.py
#!/usr/bin/python2 # OpenPOWER Automated Test Project # # Contributors Listed Below - COPYRIGHT 2017 # [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License...
Python
0
@@ -842,16 +842,60 @@ MC_CONST +%0Afrom common.Exceptions import CommandFailed %0A%0Aclass @@ -1124,24 +1124,41 @@ etup_test()%0A + try:%0A log_ @@ -1239,16 +1239,20 @@ + msg = '%5C @@ -1290,24 +1290,28 @@ s))%0A + + self.assertT @@ -1379,16 +1379,173 @@ %22 %25 msg...
6cb0822aade07999d54e5fcd19eb2c7322abc80a
Improve performance @ Measurement Admin
measurement/admin.py
measurement/admin.py
from django.contrib import admin from .models import Measurement admin.site.register(Measurement)
Python
0
@@ -59,16 +59,221 @@ rement%0A%0A +%0Aclass MeasurementAdmin(admin.ModelAdmin):%0A model = Measurement%0A%0A def get_queryset(self, request):%0A return super(MeasurementAdmin, self).get_queryset(request).select_related('patient__user')%0A%0A admin.si @@ -295,10 +295,28 @@ surement +, MeasurementAdmin )...
24b2509b1605dfd6d3eb325ed946c3d23441b969
use Python's QT stuff
demo/quicktime.py
demo/quicktime.py
#!/usr/bin/env python """Display quicktime movie.""" import os import VisionEgg from VisionEgg.Core import * from VisionEgg.Text import * from VisionEgg.Textures import * from VisionEgg.QuickTime import * screen = get_default_screen() screen.set(bgcolor=(0,0,0)) filename = os.path.join(VisionEgg.config.VISIONEGG_SYS...
Python
0.000002
@@ -56,16 +56,21 @@ mport os +, sys %0Aimport @@ -202,17 +202,53 @@ import -* +new_movie_from_filename, MovieTexture %0A%0Ascreen @@ -300,16 +300,75 @@ ,0,0))%0A%0A +if len(sys.argv) %3E 1:%0A filename = sys.argv%5B1%5D%0Aelse:%0A filename @@ -453,49 +453,80 @@ e = -Movie(filename)%0A%0Aleft, bottom, ...
c92caa1f00c984cf839ccf7c645d207e100eb874
Add test_invalid_image to test_image_validation module
test/server/test_image_validation.py
test/server/test_image_validation.py
from urlparse import urljoin from clientlib import ( make_example_shot, make_random_id, screenshots_session, example_images ) import random # Hack to make this predictable: random.seed(0) def test_invalid_image_url(): with screenshots_session() as user: shot_id = make_random_id() + "/test...
Python
0.000001
@@ -148,16 +148,24 @@ t random +, string %0A%0A%0A# Hac @@ -941,213 +941,288 @@ hot_ -url = user.create_shot(docTitle=%22TEST_JPEG%22, image_content_type=%22application/pdf%22, image_index=0)%0A shot_page = user.read_shot(shot_url)%0A assert shot_page%5B%22clip_content_type%22%5D != %22image/jpeg%22%0A...
2942f39534ca7b309e32268697350afaacad7274
TEST : Added small integrity test for sct_get_centerline
testing/test_sct_get_centerline.py
testing/test_sct_get_centerline.py
#!/usr/bin/env python ######################################################################################### # # Test function for sct_get_centerline script # # replace the shell test script in sct 1.0 # # --------------------------------------------------------------------------------------- # Copyright (c) 2014 ...
Python
0
@@ -561,16 +561,140 @@ ommands%0A +from msct_image import Image%0Afrom sct_get_centerline import ind2sub%0Aimport math%0Aimport sct_utils as sct%0Aimport numpy as np%0A%0A %0Adef tes @@ -837,16 +837,40 @@ .nii.gz' +, 't2_seg_manual.nii.gz' %5D%0A%0A o @@ -1377,32 +1377,1752 @@ %0A output += o +%0A # small...
149452b0d571adc16ae97aabd6a3266ba001a854
Call `_update_conditionally` from `_append_conditionally`
app/main/services/process_request_json.py
app/main/services/process_request_json.py
import hashlib from itertools import chain import six from flask import request from werkzeug.exceptions import abort def _ensure_value_list(json_string_or_list): if isinstance(json_string_or_list, list): return json_string_or_list else: return [json_string_or_list] def _update_conditionall...
Python
0
@@ -294,22 +294,22 @@ %0A%0A%0Adef _ -update +append _conditi @@ -385,15 +385,21 @@ hat -updates +generates new fie @@ -518,76 +518,88 @@ are -converting awarded, unsuccessful or cancelled brief status to closed +adding parent categories, whenever any one of their subcategories%0A is present .%0A @@ -778,...
fcc5f3a8847dbbb7fc4f9b939dacacd340a314a2
Load top level dicts in init
medleydb/__init__.py
medleydb/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Python tools for using MedleyDB """ import logging from os import path from os import environ import warnings from medleydb.version import __version__ __all__ = ["__version__", "sql"] logging.basicConfig(level=logging.CRITICAL) if "MEDLEYDB_PATH" in environ and pat...
Python
0
@@ -153,16 +153,40 @@ warnings +%0Aimport yaml%0Aimport json %0A%0Afrom m @@ -1486,142 +1486,8 @@ ory%0A -INST_TAXONOMY = path.join(path.dirname(__file__), 'taxonomy.yaml')%0ATRACK_LIST = path.join(path.dirname(__file__), 'tracklist_v1.txt')%0A ANNO @@ -1624,23 +1624,330 @@ a')%0A -INST_F0_TYPE = +%0ATRACK_LIST =...
33121b74419e9913e46e183914805d4a9db8f742
fix test to look for email instead of username
meetuppizza/tests.py
meetuppizza/tests.py
from django.test import TestCase from django.contrib.auth.models import User from django.test import Client from meetuppizza.forms import RegistrationForm import pdb class Test(TestCase): def setUp(self): self.params = { 'username':'Bjorn', 'email':'bjorn@bjorn.com', 'password1':'bjornbjor...
Python
0
@@ -1255,17 +1255,27 @@ ponse, %22 -B +b jorn +@bjorn.com %22)%0A%0A
9e202e78a5737d8609dfc193b35797b2f5f4a7bb
Corrige le groupage des fichiers statiques saisies plusieurs fois.
static_grouper/templatetags/static_grouper.py
static_grouper/templatetags/static_grouper.py
from collections import defaultdict from compressor.templatetags.compress import CompressorNode from django.template import Library, Node, Template, TemplateSyntaxError register = Library() CONTEXT_VARIABLE_NAME = 'static_grouper_dict' class AddStaticNode(Node): def __init__(self, parser, token): con...
Python
0
@@ -1071,16 +1071,53 @@ i -f output +tem = (self.compress, output)%0A if item not @@ -1220,48 +1220,12 @@ end( -%0A (self.compress, output) +item )%0A
40e295ddf91bb746ac3f743d675c6117d183340d
Allow scanning for clients when using GDM.all()
plexapi/gdm.py
plexapi/gdm.py
""" Support for discovery using GDM (Good Day Mate), multicast protocol by Plex. # Licensed Apache 2.0 # From https://github.com/home-assistant/netdisco/netdisco/gdm.py Inspired by: hippojay's plexGDM: https://github.com/hippojay/script.plexbmc.helper/resources/lib/plexgdm.py iBaa's PlexConnect: https://github.co...
Python
0
@@ -644,24 +644,48 @@ def all(self +, scan_for_clients=False ):%0A %22 @@ -790,32 +790,48 @@ self.scan( +scan_for_clients )%0A return
bf4cf008fb8eadd5a0b8b23a330a49fdea272314
Convert exception to string
tests/cases/cloud_provider_test.py
tests/cases/cloud_provider_test.py
import unittest import os from cumulus.ansible.tasks.providers import CloudProvider, EC2Provider class CloudProviderTestCase(unittest.TestCase): def setup(self): pass def tearDown(self): pass def test_empty_profile(self): with self.assertRaises(AssertionError) as context: ...
Python
0.999979
@@ -443,16 +443,20 @@ in +str( context. @@ -465,16 +465,17 @@ ception) +) %0A%0A de
49da0ed5340bac53a953618bb684f2525a70c8d8
improve output
systest_manager/handlers/openstack_handler.py
systest_manager/handlers/openstack_handler.py
import time import keystoneclient.v2_0.client as keystone_client import neutronclient.v2_0.client as neutron_client import cinderclient.v1.client as cinder_client import novaclient.v2.client as nova_client class CleanupHandler(object): def __init__(self, configuration): self.should_delete_keypairs = con...
Python
0.999999
@@ -2667,32 +2667,34 @@ print %22 +%5Ct Deleting port %7B0 @@ -2709,32 +2709,32 @@ t(port%5B'name'%5D)%0A - self @@ -2953,32 +2953,34 @@ print %22 +%5Ct Deleting network @@ -3271,32 +3271,34 @@ print %22 +%5Ct Deleting securit @@ -3535,32 +3535,34 @@ print %22 +%...
0ac1cdfd59199d3c36ddbccc7c5004261b57f7be
Add api.python.failing_step
recipe_modules/python/api.py
recipe_modules/python/api.py
# Copyright 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. from slave import recipe_api from slave import recipe_util import textwrap class PythonApi(recipe_api.RecipeApi): def __call__(self, name, script, args=N...
Python
0.000053
@@ -1088,12 +1088,427 @@ turn result%0A +%0A def failing_step(self, name, text):%0A %22%22%22Return a failng step (correctly recognized in expectations).%22%22%22%0A try:%0A self.inline(name,%0A 'import sys; sys.exit(1)',%0A add_python_log=False,%0A step_t...
ad4fd2ce424cb4b4f9ffbd11b5caa1d41d7ccf0c
Support for with statement for backpropagation class
tensor_network/neural_net/back_propagation.py
tensor_network/neural_net/back_propagation.py
import logging import tempfile import tensorflow as tf def initialize_weight(input_count, output_count): return tf.Variable(tf.truncated_normal([input_count, output_count]), name='W') def initialize_bias(output): return tf.Variable(tf.zeros([output]), name='B') def initialize_layer(layer_info, name='laye...
Python
0
@@ -2194,26 +2194,290 @@ -self.session.close +tf.reset_default_graph()%0A self.session.close()%0A%0A def __enter__(self):%0A self.session.__enter__()%0A return self%0A%0A def __exit__(self, exec_type, exec_value, exec_tb):%0A self.session.__exit__(exec_type, exec_value, exec_tb)%...
b1653d7a9589766a86141034865d9023b1f75fad
Fix as_tensor_test
tests/as_tensor_test.py
tests/as_tensor_test.py
import unittest from as_tensor import as_tensor class AsTensorTest(unittest.TestCase): pass _FIXTURES = [ ('string', 'string', [], 'string'), ('list', ['string'], [None], ['string']), ('list', ['string'], [1], ['string']), ('generator', (s for s in ['string']), [1], ['string']), ('emptylist',...
Python
0.999412
@@ -15,16 +15,20 @@ t%0A%0Afrom +tfi. as_tenso @@ -47,16 +47,53 @@ tensor%0A%0A +from functools import partialmethod%0A%0A class As @@ -175,16 +175,21 @@ ng', %5B%5D, + str, 'string @@ -224,16 +224,21 @@ %5BNone%5D, + str, %5B'strin @@ -268,24 +268,29 @@ ring'%5D, %5B1%5D, + str, %5B'string'%5D) @@ -338,...
55726db079313570fb9889ae91a4664f2e2daa98
add buttons to choose task
methods/homeworks.py
methods/homeworks.py
from enum import Enum, auto from telegram.ext import CommandHandler, MessageHandler, Filters from telegram.ext.conversationhandler import ConversationHandler from telegram.message import Message from telegram.update import Update from lyceum_api import get_check_queue from lyceum_api.issue import QueueTask from method...
Python
0.000017
@@ -189,16 +189,77 @@ Message%0A +from telegram.replykeyboardmarkup import ReplyKeyboardMarkup%0A from tel @@ -702,59 +702,10 @@ s = -('%D0%97%D0%B0%D0%B4%D0%B0%D0%BD%D0%B8%D1%8F %D0%BD%D0%B0 %D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D1%83:%5Cn' +%0A '%5Cn'.join( +%5B%5B '%7B%7D @@ -747,16 +747,17 @@...
fd61f3cfbcd520b1b5fc9208c553ee946cced517
Remove duplicates from compression levels tests
tests/frame/conftest.py
tests/frame/conftest.py
import pytest # import random import lz4.frame as lz4frame @pytest.fixture( params=[ (lz4frame.BLOCKSIZE_DEFAULT), (lz4frame.BLOCKSIZE_MAX64KB), (lz4frame.BLOCKSIZE_MAX256KB), (lz4frame.BLOCKSIZE_MAX1MB), (lz4frame.BLOCKSIZE_MAX4MB), ] ) def block_size(request): retu...
Python
0.000001
@@ -1124,16 +1124,20 @@ or i in +set( compress @@ -1146,16 +1146,17 @@ n_levels +) %0A%5D%0A@pyte
f6861a57069306046f4d9b40daaede06d3618a53
Lowercase for consistency
tests/generate_tests.py
tests/generate_tests.py
from __future__ import print_function from subprocess import check_output from os import listdir from os.path import join from time import sleep from utils import Colour, FoundError, getCurrentAbsolutePath, existsIn, EXEC, WHITE_LISTED_EXTENSIONS dir_path = getCurrentAbsolutePath(__file__) # (path/to/tests, infrared...
Python
0.998717
@@ -1736,12 +1736,12 @@ + %22 -DONE +done %22 + @@ -1845,12 +1845,12 @@ + %22 -FAIL +fail %22 + @@ -2039,13 +2039,13 @@ + %22 -ERROR +error %22 +
59fcdd60b9d612609e49890b868aaee9347616a9
Version bump.
pelican_flickrtag/__init__.py
pelican_flickrtag/__init__.py
__title__ = 'pelican-flickrtag' __version__ = '0.3.1' __author__ = 'Chris Streeter' __license__ = 'MIT' __copyright__ = 'Copyright 2013' from pelican_flickrtag.plugin import register
Python
0
@@ -44,17 +44,17 @@ = '0.3. -1 +2 '%0A__auth
83edbf1bd6807eca8cdf30db1b1e4493881104d4
Modify splash container to listen only locally
detectem/utils.py
detectem/utils.py
import hashlib import json import logging import pprint import time from contextlib import contextmanager import docker import requests from detectem.exceptions import DockerStartError from detectem.settings import ( CMD_OUTPUT, DOCKER_SPLASH_IMAGE, JSON_OUTPUT, SETUP_SPLASH, SPLASH_MAX_TIMEOUT, ...
Python
0
@@ -2109,60 +2109,200 @@ ts=%7B -%225023/tcp%22: 5023, %228050/tcp%22: 8050, %228051/tcp%22: 8051 +%0A %225023/tcp%22: (%22127.0.0.1%22, 5023),%0A %228050/tcp%22: (%22127.0.0.1%22, 8050),%0A %228051/tcp%22: (%22127.0.0.1%22, 8051),%0A ...
ce628425aab91195cdcb35c048162b7fed240381
check for instagram_access_token settings before accessing it to fix failing unit tests
redwind/plugins/instagram.py
redwind/plugins/instagram.py
from .. import app from .. import db from .. import util from ..models import Post, Setting, get_settings, Context from .. import hooks from .. import queue from flask.ext.login import login_required from flask import request, redirect, url_for, render_template, flash,\ has_request_context import requests import ...
Python
0
@@ -5298,16 +5298,17 @@ %7D)%0A%0A +%0A def is_i @@ -5341,16 +5341,83 @@ return +(hasattr(get_settings(), 'instagram_access_token')%0A and get_sett @@ -5433,21 +5433,22 @@ stagram_access_token +) %0A
f6a4a8245c2b88614c7e182021d16503fdc6feab
Fix lint errors in the trigger_reindex script
reindexer/trigger_reindex.py
reindexer/trigger_reindex.py
#!/usr/bin/env python # -*- encoding: utf-8 """ Create/update reindex shards in the reindex shard tracker table. Usage: trigger_reindex.py --source=<SOURCE_NAME> --reason=<REASON> trigger_reindex.py -h | --help Options: --source=<SOURCE_NAME> Name of the source you want to reindex. --reason=<REASON> ...
Python
0.000004
@@ -512,36 +512,8 @@ son%0A -import os%0Aimport subprocess%0A impo @@ -770,909 +770,261 @@ )%0A%0A%0A -# Reindex shards are added by a %22reindex_shard_generator%22 Lambda.%0A# Import the utility code that assigns reindex shards.%0AROOT = subprocess.check_output(%0A %5B'git', 'rev-parse', '--show-toplevel'%5D).de...
1c6ed4130baacf0d0f662b6aa056630dd7fd383d
Fix vocab splitting
spraakbanken/s5/spr_local/make_recog_vocab.py
spraakbanken/s5/spr_local/make_recog_vocab.py
#!/usr/bin/env python3 import sys import collections def main(in_vocab, size, out_vocab,): counter = collections.Counter() size = int(size) for line in open(in_vocab, encoding='utf-8'): word, count = line.strip().split() if any(x.isdigit() for x in word): continue p...
Python
0.003701
@@ -227,22 +227,27 @@ ine. +r strip( +%22%5Cn%22 ).split( )%0A @@ -242,16 +242,19 @@ ).split( +%22 %22 )%0A
7be728d551d7d2becd70b575f95facbbd561e69b
Add latest version of libsigsegv (#3449)
var/spack/repos/builtin/packages/libsigsegv/package.py
var/spack/repos/builtin/packages/libsigsegv/package.py
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0
@@ -1474,17 +1474,17 @@ segv-2.1 -0 +1 .tar.gz%22 @@ -1532,24 +1532,80 @@ n='@2.10')%0A%0A + version('2.11', 'a812d9481f6097f705599b218eea349f')%0A version(
20a89ca326712058f3f22621eed725c0f510bee3
Add branch with bugfix (#8355)
var/spack/repos/builtin/packages/meraculous/package.py
var/spack/repos/builtin/packages/meraculous/package.py
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0
@@ -1562,16 +1562,155 @@ ar.gz%22%0A%0A + version('2.2.5.1',%0A git=%22https://bitbucket.org/berkeleylab/genomics-meraculous2.git%22,%0A branch=%22release-2.2.5.1%22)%0A vers
5d608a855132f0a378e44b3c0c7dbba1f4f4dace
fix corehq.messaging.smsbackends.twilio.tests.test_log_call:TwilioLogCallTestCase.test_log_call
corehq/messaging/smsbackends/twilio/tests/test_log_call.py
corehq/messaging/smsbackends/twilio/tests/test_log_call.py
from __future__ import absolute_import from __future__ import unicode_literals import corehq.apps.ivr.tests.util as util from corehq.apps.ivr.models import Call from corehq.messaging.smsbackends.twilio.models import SQLTwilioBackend from corehq.messaging.smsbackends.twilio.views import IVR_RESPONSE from django.test imp...
Python
0.000002
@@ -1543,16 +1543,32 @@ .content +.decode('utf-8') , IVR_RE
968f0f3d41a546c4c6614d24be3e077ba1ee37b9
Reorganiza imports de xml_utils
packtools/sps/utils/xml_utils.py
packtools/sps/utils/xml_utils.py
import logging import re from lxml import etree from dsm.utils.files import read_file logger = logging.getLogger(__name__) class LoadToXMLError(Exception): ... def fix_xml(xml_str): return fix_namespace_prefix_w(xml_str) def fix_namespace_prefix_w(content): """ Convert os textos cujo padrão é `...
Python
0
@@ -17,16 +17,43 @@ mport re +%0A%0Afrom copy import deepcopy %0Afrom lx @@ -72,28 +72,68 @@ ree%0A -%0A from -dsm.utils.f +packtools.sps import exceptions%0Afrom packtools.sps.ut il -e s im @@ -137,25 +137,26 @@ import -read_file +file_utils %0A%0A%0Alogge
4671e4a1f8f18ec26180a5b4093d70e7d3913302
fix for mk language
plugins/tts.py
plugins/tts.py
import aiohttp from plugin_system import Plugin plugin = Plugin('Голос', usage="скажи [выражение] - бот сформирует " "голосовое сообщение на основе текста") try: from gtts import gTTS import langdetect except ImportError: plugin.log('gTTS или langdetect не установлены, плаги...
Python
0.000001
@@ -754,16 +754,169 @@ +lang = langdetect.detect(text)%0A if lang == 'mk':%0A # %D0%98%D0%BD%D0%BE%D0%B3%D0%B4%D0%B0 langdetect %D0%B4%D0%B5%D1%82%D0%B5%D0%BA%D1%82%D0%B8%D1%82 %D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9 %D0%BA%D0%B0%D0%BA %D0%BC%D0%B0%D0%BA%D0%B5%D0%B4%D0%BE%D0%BD%D1%81%D0%B...
713fd67b4aa0d3a614ca149f86deeb2d5e913d12
fix installation on linux (#24706)
var/spack/repos/builtin/packages/py-keyring/package.py
var/spack/repos/builtin/packages/py-keyring/package.py
# Copyright 2013-2021 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 PyKeyring(PythonPackage): """The Python keyring library provides an easy way to access the...
Python
0
@@ -852,24 +852,193 @@ d', 'run'))%0A + depends_on('py-secretstorage@3.2:', type=('build', 'run'), when='platform=linux')%0A depends_on('py-jeepney@0.4.2:', type=('build', 'run'), when='platform=linux')%0A%0A # TODO: @@ -1057,17 +1057,33 @@ ependenc -i +y on pywin32-ctyp es requi @@ -1101,11 +1101,5 @@ ...
e11f99e43ff9d909bf97f050c560663d38fb1388
Add fixture/result subdirectory.
test/unit/staging/test_link_dicom.py
test/unit/staging/test_link_dicom.py
from nose.tools import * import os, glob, shutil import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..')) from qipipe import staging # The test parent directory. ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')) # The test fixture. FIXTURE = os.path.join(ROOT...
Python
0
@@ -147,23 +147,40 @@ pipe - import staging +.staging import link_dicom_files %0A%0A# @@ -345,32 +345,46 @@ ures', 'staging' +, 'link_dicom' )%0A# The test res @@ -438,16 +438,30 @@ staging' +, 'link_dicom' )%0A# The
f06a4689fab32d7d2f4c848019978665656a5cdf
Implement hexfile record types used by GNU ld
mikroeuhb/hexfile.py
mikroeuhb/hexfile.py
import struct, logging from binascii import unhexlify from util import bord logger = logging.getLogger(__name__) def load(f, devkit): """Load a Intel HEX File from a file object into a devkit. The devkit must implement a write(address,data) method.""" lineno = 0 base_addr = 0 for line in f.xread...
Python
0
@@ -1439,11 +1439,228 @@ el -se: +if record_type == 0x02: # extended segment address record%0A base_addr, = struct.unpack('%3EH', data)%0A base_addr %3C%3C= 4%0A elif record_type not in %5B0x03, 0x05%5D: # used for the initial PC (ignored) %0A
b9b3837937341e6b1b052bbfdd979e3bb57d87c4
Fix SSL security provider integration tests
tests/integration/test_with_ssl.py
tests/integration/test_with_ssl.py
from . import base class SSLTestCase(base.IntegrationTestCase): '''RabbitMQ integration test case.''' CTXT = { 'plugin.activemq.pool.1.port': 61614, 'plugin.activemq.pool.1.password': 'marionette', 'plugin.ssl_server_public': 'tests/fixtures/server-public.pem', 'plugin.ssl_clie...
Python
0
@@ -1,22 +1,114 @@ -from . import base +import os%0A%0Afrom pymco.test import ctxt%0Afrom . import base%0A%0AFIXTURES_PATH = os.path.join(ctxt.ROOT, 'fixtures') %0A%0A%0Ac @@ -523,24 +523,250 @@ ublic.pem',%0A + 'plugin.ssl_server_private': os.path.join(FIXTURES_PATH,%0A ...
30bd0a8b50545e24ec69ecc4c720c508c318e008
Remove pdb
tests/mock_vws/utils.py
tests/mock_vws/utils.py
""" Utilities for tests for the VWS mock. """ from string import hexdigits from typing import Optional from urllib.parse import urljoin from requests.models import Response from common.constants import ResultCodes class Endpoint: """ Details of endpoints to be called in tests. """ def __init__(sel...
Python
0.000004
@@ -2623,42 +2623,8 @@ %22%22%22%0A - # import pdb; pdb.set_trace()%0A
dcc07355786f94da36d938239c5c60d5302e4d42
test for identity link
testapp/tests/test_renderer_infer.py
testapp/tests/test_renderer_infer.py
#!/usr/bin/env python # encoding: utf-8 from django.test import TestCase from collection_json import Collection from testapp.models import Person class DictionaryTest(TestCase): """tests when the response contains a dictionary""" def test_no_serializer_view(self): with self.assertRaises(TypeError): ...
Python
0
@@ -141,16 +141,114 @@ Person%0A%0A +try:%0A from urlparse import urlparse%0Aexcept ImportError:%0A from urllib.parse import urlparse%0A%0A %0Aclass D @@ -739,16 +739,51 @@ .save()%0A + self.url = %22/infer/person%22%0A @@ -809,31 +809,24 @@ ent.get( -%22/infer/person%22 +self.url )%0A ...
943ecc39af2b152bc8d5fed55bdafe5332a33d75
remove xfail (#4458)
testing/kfctl/endpoint_ready_test.py
testing/kfctl/endpoint_ready_test.py
import datetime import json import logging import os import subprocess import tempfile import uuid from retrying import retry import pytest from kubeflow.testing import util from testing import deploy_utils from testing import gcp_util # TODO(https://github.com/kubeflow/kfctl/issues/42): # Test is failing pretty con...
Python
0.000009
@@ -236,119 +236,8 @@ il%0A%0A -# TODO(https://github.com/kubeflow/kfctl/issues/42):%0A# Test is failing pretty consistently.%0A@pytest.mark.xfail%0A # Th
291681041f434a981a54371bb7f9f1fa9637afb7
improve comment collapse
polls/admin.py
polls/admin.py
from django.contrib import admin from polls.models import Choice, Question class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question_text']}), ('Date information', {'fields': ['pub_date'...
Python
0.000002
@@ -340,16 +340,26 @@ llapse'%5D +%0A %09 %7D),%0A
21ecd9a319c5e0dceed36fcf9cabdc864f735c2c
Write test for nearley include
tests/test_nearley/test_nearley.py
tests/test_nearley/test_nearley.py
from __future__ import absolute_import import unittest import logging import os import sys logging.basicConfig(level=logging.INFO) from lark.tools.nearley import create_code_for_nearley_grammar NEARLEY_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), 'nearley')) BUILTIN_PATH = os.path.join(NEARLEY_PAT...
Python
0
@@ -2280,16 +2280,380 @@ %5D == 3%0A%0A + def test_include(self):%0A fn = os.path.join(NEARLEY_PATH, 'test/grammars/folder-test.ne')%0A with open(fn) as f:%0A grammar = f.read()%0A%0A code = create_code_for_nearley_grammar(grammar, 'main', BUILTIN_PATH, os.path.dirname(fn))%0A ...
69770ecc4715788837f5f769e0d2f1e6690a153f
Allow test_core to run as a test program
tests/test_splauncher/test_core.py
tests/test_splauncher/test_core.py
from __future__ import print_function __author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>" __date__ = "$May 18, 2015 22:08:21 EDT$" import os import shutil import tempfile import time import unittest from splauncher.core import main class TestCore(unittest.TestCase): def setUp(self): self.cwd = os...
Python
0.000002
@@ -2424,28 +2424,102 @@ %0A assert s == %22%22%0A +%0A%0Aif __name__ == '__main__':%0A import sys%0A sys.exit(unittest.main())%0A
534a21e8d664a4216af14db95415dafa0508b3b9
Remove test
tests/integration/client/standard.py
tests/integration/client/standard.py
# -*- coding: utf-8 -*- # Import python libs from __future__ import absolute_import import os # Import Salt Testing libs from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs import integration import salt.utils class StdTest(integration.ModuleCase): ''' Test stan...
Python
0
@@ -2545,670 +2545,8 @@ %5D)%0A%0A - ret = self.client.cmd_full_return(%0A 'minion',%0A 'test.pong',%0A )%0A self.assertIn('minion', ret)%0A%0A if self.master_opts%5B'transport'%5D == 'zeromq':%0A self.assertEqual(%0A %7B%0A ...
3a968153d71f9d0876cdd058482463353eddbd74
fix remaining regexs to account for mismatched results in output files
tests/regression_tests/regression.py
tests/regression_tests/regression.py
import re import os import shutil import numpy import pickle from pygbe.main import main as pygbe ITER_REGEX = re.compile('Converged after (\d*) iterations') N_REGEX = re.compile('Total elements : (\d*)') ESOLV_REGEX = re.compile('Esolv = (\-*\d*\.\d*)\ kcal\/mol') ESURF_REGEX = re.compile('[^: ]Esurf = (\-*\d*\.\d*...
Python
0.00004
@@ -227,16 +227,21 @@ ompile(' +%5B%5E: %5D Esolv = @@ -267,16 +267,16 @@ %5C/mol')%0A - ESURF_RE @@ -359,16 +359,21 @@ ompile(' +%5B%5E: %5D Ecoul = @@ -1365,24 +1365,24 @@ group(1))%0A%0A%0A - return N @@ -1423,16 +1423,1260 @@ Time%0A%0A%0A +def report_results(error, N, iterations, Einter, analytical...
05e496de4f6ebbb9e77c6cb1796cc1050a41a181
Adjust whitespace for pep8
pratchett/__init__.py
pratchett/__init__.py
HEADER = ("X-Clacks-Overhead", "GNU Terry Pratchett") class GNUTerryPratchett(object): def __init__(self, app): self.app = app def __call__(self, environ, start_response): def clacker(status, headers, *args, **kwargs): if HEADER not in headers: headers.append(HEADE...
Python
0.9998
@@ -428,16 +428,17 @@ acker)%0A%0A +%0A def make
ddb4ed6701808ed5c4e928d042b84e0c84490e58
Bump version 0.0.4
memsource/__init__.py
memsource/__init__.py
__author__ = 'Gengo' __version__ = '0.0.3' __license__ = 'MIT'
Python
0
@@ -37,9 +37,9 @@ 0.0. -3 +4 '%0A__
949c7b55e295b4d87f2d7a1bb98242cb055129d1
Solve No.140 in Python with problems
140.py
140.py
class Solution: """ @param a, b, n: 32bit integers @return: An integer """ def fastPower(self, a, b, n): ans = 1 while b > 0: if b % 2==1: ans = ans * a % n a = a * a % n b = b / 2 return ans % n # WA
Python
0.005724
@@ -300,8 +300,42 @@ # WA + because of lintcode %0A # AC
86f33d7c88c728bb5ce0c885543dd54d942e2962
Fix strings broken by 1393650
tests/steps/snapshot.py
tests/steps/snapshot.py
# -*- coding: UTF-8 -*- from __future__ import unicode_literals from behave import step from dogtail.rawinput import typeText, pressKey from time import sleep from utils import get_showing_node_name @step('Add Snapshot named "{name}"') def add_snapshot(context, name): wait = 0 while len(context.app.findChildr...
Python
0.004521
@@ -855,16 +855,17 @@ == 'Men +u ')) == 0 @@ -858,32 +858,32 @@ 'Menu')) == 0:%0A - sleep(1) @@ -1192,32 +1192,33 @@ d x.name == 'Men +u ')%5B-1%5D.click()%0A%0A @@ -1529,16 +1529,17 @@ == 'Men +u ')%5B-1%5D.c @@ -2443,32 +2443,33 @@ arent.child('Men +u ').click()%0A d @@ -3104,32 +3104,32 @@ d...
9221d42cda7ba7a44d1462de75c0c53412998fb4
Remove unused code.
mysite/missions/tar/view_helpers.py
mysite/missions/tar/view_helpers.py
# This file is part of OpenHatch. # Copyright (C) 2010 Jack Grigg # Copyright (C) 2010 John Stumpo # Copyright (C) 2010, 2011 OpenHatch, Inc. # # This program 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 Foundat...
Python
0
@@ -1123,2128 +1123,8 @@ %7D%0A%0A - @classmethod%0A def check_tarfile(cls, tardata):%0A %22%22%22%0A Validate that tardata is gzipped and contains the correct files in a wrapper directory.%0A %22%22%22%0A try:%0A tfile = tarfile.open(fileobj=StringIO(tardata), mode='r:gz'...
abe44ff58d61376db95c57d87dadc77a3cee8735
version bump
mesos/cli/__init__.py
mesos/cli/__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.000001
@@ -802,7 +802,7 @@ 0.1. -3 +4 '%0A
3c529c7c4f666488e3eadb6a4dd06b881e0ebb3e
Fix wrong assert function name
tests/unit/common/db/test_types.py
tests/unit/common/db/test_types.py
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
Python
0.000061
@@ -1830,16 +1830,17 @@ ds.asser +t _called_ @@ -1853,24 +1853,26 @@ ith( +%22%5B %5B -( 2, 1 -), ( +%5D, %5B 1, 2 -) %5D +%5D%22 )%0A%0A
91fe55c6d6c8e49dcc18cef44bc24d6aa8a1d85b
Add more futher dependancies
clubs/migrations/0050_change_city_fields.py
clubs/migrations/0050_change_city_fields.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ # We manusally added these dependencies because all of them # store city code instead of the full city name. So they have # to...
Python
0.000002
@@ -487,30 +487,25 @@ '00 -17_add_2017_bulb_clubs +27_readathon_team '),%0A
68eeda85605fa84d7bea69dfeab97b3b1278b4d4
fix typo
examples/wordcloud_cn.py
examples/wordcloud_cn.py
# - * - coding: utf - 8 -*- """ create wordcloud with chinese ============================= Wordcloud is a very good tools, but if you want to create Chinese wordcloud only wordcloud is not enough. The file shows how to use wordcloud with Chinese. First, you need a Chinese word segmentation library jieba, jieba is now...
Python
0.999991
@@ -115,17 +115,16 @@ ood tool -s , but if
63667e0d492c16e0c3bc4a398044a60df695cc61
Add more side effects
tests/unit/states/ssh_auth_test.py
tests/unit/states/ssh_auth_test.py
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>` ''' # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from salttesting import skipIf, TestCase from salttesting.mock import ( NO_MOCK, NO_MOCK_REASON, MagicMock, patch ) fro...
Python
0
@@ -2613,16 +2613,174 @@ esent',%0A + 'User authorized keys file not present',%0A 'User authorized keys file not present',%0A
ca31cc946de68bc7eb9a5b03601134a70e4b1564
Add SET to blacklisted keywords (#475)
explorer/app_settings.py
explorer/app_settings.py
from django.conf import settings from pydoc import locate # The 'correct' configuration for Explorer looks like: # EXPLORER_CONNECTIONS = { # 'Original Database': 'my_important_database_readonly_connection', # 'Client Database 2': 'other_database_connection' # } # EXPLORER_DEFAULT_CONNECTION = 'my_important_datab...
Python
0
@@ -823,16 +823,31 @@ WNER TO' +,%0A 'SET' %0A )%0A)
d10bb3695ee93ffd8b91d4d82adaf484de9e9bf1
Rename NeuronNetwork to NeuralNetwork
ANN.py
ANN.py
from random import uniform class Neuron: def __init__(self, parents=[]): self.parents = [{ 'neuron': parent, 'weight': uniform(-1, 1), 'slope': uniform(-1, 1), } for parent in parents] def calculate(self, increment=0): self.output = sum([parent['neu...
Python
0.99959
@@ -597,18 +597,18 @@ ass Neur -on +al Network:
74935550f886edfefa26298a98874e4c2dd2ab53
Fold a line
extenteten/util.py
extenteten/util.py
import functools import numpy import tensorflow as tf def static_shape(tensor): return tf.convert_to_tensor(tensor).get_shape().as_list() def static_shapes(*tensors): return _map_to_list(static_shape, tensors) def static_rank(tensor): return len(static_shape(tf.convert_to_tensor(tensor))) def static...
Python
0.999989
@@ -708,16 +708,51 @@ _name__, +%0A initial
952d70244f885dc194d83d5bb598fa9ebcdfceb2
Add no store command-line option to trends util script
app/utils/insert/trendsCountryAndTowns.py
app/utils/insert/trendsCountryAndTowns.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Utility to get trend data and add to the database. Expects a single country name and uses the country and child town WOEIDs to get trend data. Run file directly (not as a module) and with `--help` flag in order to see usage instructions. """ import time # Allow impo...
Python
0
@@ -1632,16 +1632,49 @@ %7C--fast%5D +' %5C%0A ' %5B-n%7C--no-store%5D %5B-h%7C--h @@ -2646,16 +2646,77 @@ tryName) +%0A delete = bool(set(args) & set(('-n', '--no-store'))) %0A%0A @@ -2817,16 +2817,31 @@ id(woeid +, delete=delete )%0A
d6a58142810c0729f15220a9933ace66881d8403
Fix the test
tests/test_callbacks.py
tests/test_callbacks.py
import pytest import random from aiotg import Bot, Chat, InlineQuery from aiotg import MESSAGE_TYPES from testfixtures import LogCapture API_TOKEN = "test_token" bot = Bot(API_TOKEN) def custom_msg(msg): template = { "message_id": 0, "from": {"first_name": "John"}, "chat": {"id": 0, "typ...
Python
0.999999
@@ -3152,16 +3152,236 @@ )%0A%0A + def edit_message_text(self, chat_id, message_id, text, **kwargs):%0A return self.api_call(%0A %22editMessageText%22,%0A message_id=message_id,%0A text=text,%0A **kwargs%0A )%0A%0A %0Adef tes @@ -4436,32 +4436,54 @@ ha...
14d1cbae9323e3ff7d80480b39a96b76cada94b0
Add a clear_requested signal
pyqode/core/frontend/widgets/menu_recents.py
pyqode/core/frontend/widgets/menu_recents.py
""" Provides a menu that display the list of recent files and a RecentFilesManager which use your application's QSettings to store the list of recent files. """ import os from pyqode.qt import QtCore, QtWidgets class RecentFilesManager: """ Manages a list of recent files. The list of files is stored in your ...
Python
0.000001
@@ -2035,16 +2035,54 @@ nal(str) +%0A clear_requested = QtCore.Signal() %0A%0A de @@ -3495,32 +3495,68 @@ update_actions() +%0A self.clear_requested.emit() %0A%0A def _on_ac
fdd8e33b58f8ffba50dff86931a47daf396903e8
Revert tweak to TokenPermissions.has_permission()
netbox/netbox/api/authentication.py
netbox/netbox/api/authentication.py
from django.conf import settings from rest_framework import authentication, exceptions from rest_framework.permissions import BasePermission, DjangoObjectPermissions, SAFE_METHODS from users.models import Token class TokenAuthentication(authentication.TokenAuthentication): """ A custom authentication scheme ...
Python
0
@@ -2149,117 +2149,8 @@ ):%0A%0A - # User must be authenticated%0A if not request.user.is_authenticated:%0A return False%0A%0A
f2cc74d79abf42c0f199c48ef9110bce6cec45b4
Update alcatel_sros_ssh.py
netmiko/alcatel/alcatel_sros_ssh.py
netmiko/alcatel/alcatel_sros_ssh.py
''' Alcatel-Lucent SROS support ''' from netmiko.ssh_connection import SSHConnection class AlcatelSrosSSH(SSHConnection): ''' SROS support ''' def session_preparation(self): self.disable_paging(command="\environment no more\n") def enable(self): pass
Python
0
@@ -222,17 +222,16 @@ ommand=%22 -%5C environm
91ff2ed96dc3ba197f71be935ac23796d40ef5dc
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/812a20bfa97f7b56eb3340c2f75358db58483974.
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "c442a283246c2060d139d4cadb0f8ff59ee7e7da" TFRT_SHA256 = "649107aabf7a242678448c44d4a51d5355904222de7d45...
Python
0.000002
@@ -210,132 +210,132 @@ = %22 -c442a283246c2060d139d4cadb0f8ff59ee7e7da%22%0A TFRT_SHA256 = %22649107aabf7a242678448c44d4a51d5355904222de7d454a376ad511c803cf0 +812a20bfa97f7b56eb3340c2f75358db58483974%22%0A TFRT_SHA256 = %228235d34c674a842fb08f5fc7f7b6136a1af1dbb20a2ec7213dd99848b884878 f%22%0A%0A
90597ba2e70ce73a7531a27f851bdbb27424d04f
Update nbtest.py
newB_in_progress/test/arj/nbtest.py
newB_in_progress/test/arj/nbtest.py
#.*.F means function #see line 28 adding to dict not working import re operators = ['+','-'] conditionals = ['if','when'] #then replaces the : as in if x=3 : with open('txt.nub','r+') as f: filecontent = f.read()+' <EOF> ' values={} #global so as to be accessible from funcs def parseF(textlist): data=textlist i...
Python
0.000001
@@ -53,16 +53,43 @@ working +%0A#resolved just wrong debug %0A%0Aimport
49ad9b8162a9113f3c4c69818553de2cb6bf66df
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/da541333433f74881d8f44947369756d40d5e7fe.
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "bdb99de6e7e5fcd5a7e55895bb1c658ea0336136" TFRT_SHA256 = "a251c274cf0bbd805e221677cf49...
Python
0.000001
@@ -228,133 +228,133 @@ = %22 -bdb99de6e7e5fcd5a7e55895bb1c658ea0336136%22%0A TFRT_SHA256 = %22a251c274cf0bbd805e221677cf4988c27156af54655b906eab11d9e3ee37d0b5 +da541333433f74881d8f44947369756d40d5e7fe%22%0A TFRT_SHA256 = %22df492c902908141405e88af81c4bb72580e3a5615bd91448b7c44a2c0d29009a %22%0A%0A
be0e9cf9a195f44a033bb8b3aeb13febf3cea9cf
Remove check in token credential (#14134)
src/azure-cli/azure/cli/command_modules/storage/oauth_token_util.py
src/azure-cli/azure/cli/command_modules/storage/oauth_token_util.py
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
Python
0
@@ -356,16 +356,80 @@ reading%0A +from knack.log import get_logger%0A%0Alogger = get_logger(__name__)%0A %0A%0Aclass @@ -1486,24 +1486,64 @@ cessToken'%5D%0A + expire = token%5B'expiresOn'%5D%0A @@ -1576,34 +1576,22 @@ trptime( -token%5B' expire -sOn'%5D , %22%25Y-%25m @@ -1799,32 +1799,...
a8a0e24d9ee90676601a52c564eadb7ff264d5cd
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/356740e3a2bf884abd27b2ca362fe8108a7cd257.
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "b570a1921c9e55ac53c8972bd2bfd37cd0eb510d" TFRT_SHA256 = "01295fc2a90aa2d665890adbe8701e2ae2372028d3b826...
Python
0.000003
@@ -210,133 +210,133 @@ = %22 -b570a1921c9e55ac53c8972bd2bfd37cd0eb510d%22%0A TFRT_SHA256 = %2201295fc2a90aa2d665890adbe8701e2ae2372028d3b8266cba38ceddccb42af6 +356740e3a2bf884abd27b2ca362fe8108a7cd257%22%0A TFRT_SHA256 = %22c5c806b5f5acb345eca8db4bc49053df60d0b368193f5b78346cf6acdc4bc3e8 %22%0A%0A
ce977d24d49b7e03b6db5b5590e8fc0ddf8e9127
fix the deploy order in the daemon. closes #862
fabfile/daemons.py
fabfile/daemons.py
#!/usr/bin/env python from time import sleep, time from fabric.api import execute, task, env import app_config import sys import traceback def safe_execute(*args, **kwargs): """ Wrap execute() so that all exceptions are caught and logged. """ try: execute(*args, **kwargs) except: ...
Python
0.000201
@@ -750,22 +750,19 @@ 'deploy_ -slides +bop ')%0A @@ -827,19 +827,22 @@ 'deploy_ -bop +slides ')%0A%0A
7e95e0b8adb4315c8f8a0c5aa8c6ccc588cbee18
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/0d8bae2de531db2e4e4efd3a4e168b39795458b9.
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "4b2fe81ea82e4c33783b5b62973fbe84dbc6f484" TFRT_SHA256 = "f0e6e0fd3e5245d993cd4146d824...
Python
0.000001
@@ -228,133 +228,133 @@ = %22 -4b2fe81ea82e4c33783b5b62973fbe84dbc6f484%22%0A TFRT_SHA256 = %22f0e6e0fd3e5245d993cd4146d8245e130e724d0070401a25f730b02c7296d1c4 +0d8bae2de531db2e4e4efd3a4e168b39795458b9%22%0A TFRT_SHA256 = %22fa7cd1e72eec99562bf916e071222df2e72e90c67dcb14137ffbef07a4fcac5f %22%0A%0A
e2d066811a5e943600c170aba0cf797c104d1588
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/5f6e52142a3592d0cfa058dbfd140cad49ed451a.
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "736eeebfb56c6d0de138f4a29286140d8c26d927" TFRT_SHA256 = "b584ee5ce5ecaadf289b0997987d...
Python
0
@@ -228,133 +228,133 @@ = %22 -736eeebfb56c6d0de138f4a29286140d8c26d927%22%0A TFRT_SHA256 = %22b584ee5ce5ecaadf289b0997987dfb5eec6cf3623f30b83028923cad20914e61 +5f6e52142a3592d0cfa058dbfd140cad49ed451a%22%0A TFRT_SHA256 = %228e1efbd7df0fdeb5186b178d7c8b90c33ba80cef54999e988097bd1ff0f4e8fe %22%0A%0A
9f47b0cf3d7e26339aaf51dce912db30cc50c587
Debug values
promgen/prometheus.py
promgen/prometheus.py
import collections import json import logging import subprocess import tempfile import requests from django.conf import settings from django.template.loader import render_to_string from promgen import models logger = logging.getLogger(__name__) def check_rules(rules): with tempfile.NamedTemporaryFile(mode='w',...
Python
0.000001
@@ -1734,24 +1734,78 @@ e_config():%0A + print(settings.PROMGEN)%0A print('write config')%0A with ope @@ -1909,24 +1909,55 @@ r_config())%0A + print('send notification')%0A for targ
a70e0abdf409d770ddbb9faf3cc66c26fc03b076
fix fbproject tests following new pystan version
tests/test_fbprophet.py
tests/test_fbprophet.py
import unittest import numpy as np import pandas as pd from fbprophet import Prophet class TestFbProphet(unittest.TestCase): def test_fit(self): train = pd.DataFrame({ 'ds': np.array(['2012-05-18', '2012-05-20']), 'y': np.array([38.23, 21.25]) }) forecaster = Prop...
Python
0
@@ -361,10 +361,44 @@ it(train +, control=%7B'adapt_engaged': False%7D )%0A
7461c7b6b729c38194ebb5e88b33e7bcc73b4c9c
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/53604b1779bdbea70bed75fe1695b503e06be323.
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "1c915c952cea8e5d290d241b3a0178856a9ec35b" TFRT_SHA256 = "97f8ad0010b924f8489ca04e8e5aa5aea4a69013293e65...
Python
0.000002
@@ -210,133 +210,133 @@ = %22 -1c915c952cea8e5d290d241b3a0178856a9ec35b%22%0A TFRT_SHA256 = %2297f8ad0010b924f8489ca04e8e5aa5aea4a69013293e6575137176a6a8d80168 +53604b1779bdbea70bed75fe1695b503e06be323%22%0A TFRT_SHA256 = %22b2ce14585f2707ec56b013323fde0ff10ddecdf608854dcf332c46244e0dbd20 %22%0A%0A