content_type stringclasses 8
values | main_lang stringclasses 7
values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
Python | Python | update the dummy driver for all of our api changes | 986cad6b12f850b669650c9952791c76f85486e1 | <ide><path>libcloud/drivers/dummy.py
<ide>
<ide> @note: This driver is out of date
<ide> """
<del>from libcloud.types import Node, NodeState
<ide> from libcloud.interface import INodeDriver
<add>from libcloud.base import ConnectionKey, NodeDriver, NodeSize, NodeLocation
<add>from libcloud.base import NodeImage, Node
<... | 2 |
PHP | PHP | continue loop on wildcards | 7cd65764ae0cd6759353cb1231c421319141caf8 | <ide><path>src/Illuminate/Events/Dispatcher.php
<ide> public function listen($events, $listener, $priority = 0)
<ide> {
<ide> if (str_contains($event, '*'))
<ide> {
<del> return $this->setupWildcardListen($event, $listener);
<add> $this->setupWildcardListen($event, $listener);
<ide> }
<add> else
<add... | 1 |
Python | Python | add test for a wordlevel tokenizer model | 3aa37b945e21019575fc183ce750a37b86efc634 | <ide><path>tests/test_tokenization_common.py
<ide> def test_training_new_tokenizer(self):
<ide> decoded_input = new_tokenizer.decode(inputs["input_ids"][0], skip_special_tokens=True)
<ide> expected_result = "This is the first sentence"
<ide>
<del> # OpenAIGPT always lowercases and has no arg.
<d... | 2 |
Javascript | Javascript | remove string literal message from assertion | 86456bacd85bf508303bd077865d9443ba46bd81 | <ide><path>test/addons-napi/test_general/testFinalizer.js
<ide> test_general.wrap(finalizeAndWrap);
<ide> test_general.addFinalizerOnly(finalizeAndWrap, common.mustCall());
<ide> finalizeAndWrap = null;
<ide> global.gc();
<del>assert.strictEqual(test_general.derefItemWasCalled(), true,
<del> 'finalize... | 1 |
Python | Python | add more tests for rackspace driver | 7952a148ffb21a950e080a324988abc2fe4a950b | <ide><path>libcloud/common/rackspace.py
<ide> def host(self):
<ide> scheme, server, self.request_path, param, query, fragment = (
<ide> urlparse.urlparse(getattr(self, self._url_key)))
<ide>
<del> if scheme is "https" and self.secure is not True:
<del> raise Invali... | 2 |
Python | Python | fix regression for in1d with non-array input | 6d3950c8ac3ad6088a473acc7d68ba405c14267c | <ide><path>numpy/lib/arraysetops.py
<ide> def in1d(ar1, ar2, assume_unique=False):
<ide> array([0, 2, 0])
<ide>
<ide> """
<add> # Ravel both arrays, behavior for the first array could be different
<add> ar1 = np.asarray(ar1).ravel()
<add> ar2 = np.asarray(ar2).ravel()
<add>
<ide> # This code is si... | 2 |
Python | Python | improve error message | 22545c7da2a482ed1b86d9fedd4ef6eba917c13d | <ide><path>libcloud/common/openstack_identity.py
<ide> def _get_unscoped_token_from_oidc_token(self):
<ide> driver=self.driver)
<ide> else:
<ide> raise MalformedResponseError('Malformed response',
<del> driver=self.... | 1 |
PHP | PHP | improve code readability | 5e1faa98da07d317ffd1e2088363bf2db9c1d98c | <ide><path>src/Datasource/QueryTrait.php
<ide> public function eagerLoaded(bool $value)
<ide> */
<ide> public function aliasField(string $field, ?string $alias = null): array
<ide> {
<del> $namespaced = strpos($field, '.') !== false;
<del> $aliasedField = $field;
<del>
<del> if ($names... | 1 |
Ruby | Ruby | expand word_wrap test coverage | 5e71ca3c2166866f7f96b54cb3c85bfd00901078 | <ide><path>actionview/test/template/text_helper_test.rb
<ide> def test_excerpt_with_separator
<ide> excerpt("This is a beautiful morning", "a", separator: nil)
<ide> end
<ide>
<del> def test_word_wrap
<del> assert_equal("my very very\nvery long\nstring", word_wrap("my very very very long string"... | 1 |
PHP | PHP | allow exception mapping | 5a5a3355fa8a987e9a3a6e30c32c9f59e1fefc80 | <ide><path>src/Illuminate/Foundation/Exceptions/Handler.php
<ide>
<ide> namespace Illuminate\Foundation\Exceptions;
<ide>
<add>use Closure;
<ide> use Exception;
<ide> use Illuminate\Auth\Access\AuthorizationException;
<ide> use Illuminate\Auth\AuthenticationException;
<ide> use Illuminate\Support\Traits\ReflectsClosu... | 1 |
PHP | PHP | avoid unneeded variable assignment | aace57acd44c005ef765cac497328d29a390431f | <ide><path>src/ORM/Table.php
<ide> public function belongsToMany(string $associated, array $options = []): BelongsT
<ide> */
<ide> public function find(string $type = 'all', array $options = []): Query
<ide> {
<del> $query = $this->query();
<del> $query->select();
<del>
<del> return $t... | 1 |
Javascript | Javascript | flow strict touchablehighlight | a97d104b44daa068fa3848cc6c3225356f9dc318 | <ide><path>Libraries/Components/AppleTV/TVViewPropTypes.js
<ide> export type TVParallaxPropertiesType = $ReadOnly<{|
<ide> /**
<ide> * If true, parallax effects are enabled. Defaults to true.
<ide> */
<del> enabled: boolean,
<add> enabled?: boolean,
<ide>
<ide> /**
<ide> * Defaults to 2.0.
<ide> */
... | 2 |
Python | Python | change version id to make pypi happy | d35aa7344ed96c8e1e17ea74ba14a760a3c8a418 | <ide><path>spacy/about.py
<ide> # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py
<ide>
<ide> __title__ = 'spacy'
<del>__version__ = '1.0.0+a'
<add>__version__ = '1.0.0-a'
<ide> __summary__ = 'Industrial-strength NLP'
<ide> __uri__ = 'https://spacy.io'
<ide> __author__ = 'Matthew Honnibal' | 1 |
Python | Python | expand initialize/training config validation | 5fb8b7037aa67400a76a0545f85c3c15a2491fb6 | <ide><path>spacy/cli/debug_config.py
<ide>
<ide> from ._util import Arg, Opt, show_validation_error, parse_config_overrides
<ide> from ._util import import_code, debug_cli
<del>from ..schemas import ConfigSchemaTraining
<add>from ..schemas import ConfigSchemaInit, ConfigSchemaTraining
<ide> from ..util import registry... | 2 |
Python | Python | add a new bar class to display bar in curse ui | a6db0977c8495138271b5c473b30100f5157f767 | <ide><path>glances/outputs/glances_bars.py
<add># -*- coding: utf-8 -*-
<add>#
<add># This file is part of Glances.
<add>#
<add># Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com>
<add>#
<add># Glances is free software; you can redistribute it and/or modify
<add># it under the terms of the GNU Lesser General Public ... | 1 |
Text | Text | describe buffer limit of v8.serialize | 14f6c67eda88e6da1ab512f8ff0c305ca20ab1b0 | <ide><path>doc/api/v8.md
<ide> added: v8.0.0
<ide>
<ide> Uses a [`DefaultSerializer`][] to serialize `value` into a buffer.
<ide>
<add>[`ERR_BUFFER_TOO_LARGE`][] will be thrown when trying to
<add>serialize a huge object which requires buffer
<add>larger than [`buffer.constants.MAX_LENGTH`][].
<add>
<ide> ### `v8.des... | 1 |
Python | Python | update version to 1.0b3 | 779dc154b799a6660f7f60ef50c09fc445329999 | <ide><path>numpy/version.py
<del>version='1.0b2'
<add>version='1.0b3'
<ide> release=False
<ide>
<ide> if not release: | 1 |
Javascript | Javascript | note restrictions of addclass and removeclass | cd3673e51430620e91ad1b55e8eb528d4833e979 | <ide><path>src/jqLite.js
<ide> * ## Angular's jqLite
<ide> * jqLite provides only the following jQuery methods:
<ide> *
<del> * - [`addClass()`](http://api.jquery.com/addClass/)
<add> * - [`addClass()`](http://api.jquery.com/addClass/) - Does not support a function as first argument
<ide> * - [`after()`](http://api... | 1 |
Javascript | Javascript | fill empty catch block with comment | 300281fde6d0444cb73f74ea22b549eea534fe4d | <ide><path>packages/ember-glimmer/lib/components/text_field.js
<ide> function canSetTypeOfInput(type) {
<ide>
<ide> try {
<ide> inputTypeTestElement.type = type;
<del> } catch (e) { }
<add> } catch (e) {
<add> // ignored
<add> }
<ide>
<ide> return inputTypes[type] = inputTypeTestElement.type === type;
<... | 1 |
Ruby | Ruby | remove unecessary comment | 1909095aeaad41c227ec4099f58dbb925811822b | <ide><path>activerecord/test/cases/comment_test.rb
<ide> def test_schema_dump_omits_blank_comments
<ide> end
<ide> end
<ide>
<del>end # if ActiveRecord::Base.connection.supports_comments?
<add>end | 1 |
Text | Text | fix typo in release-notes.md | 67e99a29b814af86c7c2544b42d83cdf9cb2d647 | <ide><path>docs/community/release-notes.md
<ide> You can determine your currently installed version using `pip show`:
<ide>
<ide> ### 3.9.0
<ide>
<del>**Date**: [18st October 2018][3.9.0-milestone]
<add>**Date**: [18th October 2018][3.9.0-milestone]
<ide>
<ide> * Improvements to ViewSet extra actions [#5605][gh5605]... | 1 |
Java | Java | replace mvcurls with mvcuricomponentsbuilder | cf5db8362b3b95e2555e4e1600e3c6919e952f01 | <ide><path>spring-web/src/main/java/org/springframework/web/method/support/CompositeUriComponentsContributor.java
<add>/*
<add> * Copyright 2002-2013 the original author or authors.
<add> *
<add> * Licensed under the Apache License, Version 2.0 (the "License");
<add> * you may not use this file except in compliance wit... | 13 |
Javascript | Javascript | use beforerun hook for handle 0 | fe1350a7a2c6fc552d8d8f7e203b1366483966e0 | <ide><path>lib/ProgressPlugin.js
<ide> const median3 = (a, b, c) => {
<ide> };
<ide>
<ide> const createDefaultHandler = (profile, logger) => {
<del> let wasLogged = false;
<ide> /** @type {{ value: string, time: number }[]} */
<ide> const lastStateInfo = [];
<ide>
<ide> const createDefaultHandler = (profile, logger... | 1 |
Ruby | Ruby | move lmutil to homebrew-binary | 4ed9efd99520f96a2db03e9ce861a41e64f16633 | <ide><path>Library/Homebrew/tap_migrations.rb
<ide> 'boost149' => 'homebrew/versions',
<ide> 'aimage' => 'homebrew/boneyard',
<ide> 'cmucl' => 'homebrew/binary',
<add> 'lmutil' => 'homebrew/binary',
<ide> } | 1 |
Go | Go | add support for swarm mode templating | 6212ea669b4e92b3aa3985857f827ee9b95271fd | <ide><path>daemon/cluster/executor/container/container.go
<ide> import (
<ide> "github.com/docker/swarmkit/agent/exec"
<ide> "github.com/docker/swarmkit/api"
<ide> "github.com/docker/swarmkit/protobuf/ptypes"
<add> "github.com/docker/swarmkit/template"
<ide> )
<ide>
<ide> const (
<ide> func (c *containerConfig) set... | 6 |
Javascript | Javascript | change var to const in ./eslint-rules | ea67c27168ad03a89c88503ebea49efb88cabe0f | <ide><path>tools/eslint-rules/required-modules.js
<ide> */
<ide> 'use strict';
<ide>
<del>var path = require('path');
<add>const path = require('path');
<ide>
<ide> //------------------------------------------------------------------------------
<ide> // Rule Definition
<ide> module.exports = function(context) {
<id... | 1 |
PHP | PHP | fix style issue | a7c1bc22549c4450a6c41c638a37eb54261a573c | <ide><path>src/Illuminate/Routing/Middleware/SubstituteBindings.php
<ide> public function handle($request, Closure $next)
<ide>
<ide> $this->router->substituteImplicitBindings($route);
<ide> } catch (ModelNotFoundException $exception) {
<del> if($route->getMissing()) {
<add> i... | 1 |
PHP | PHP | fix method visibility | 43e44f50a931f02ccab063acf2ad4e433af9f9d6 | <ide><path>src/Controller/Component/AuthComponent.php
<ide> public function startup(Event $event)
<ide> * @param \Cake\Event\Event $event Event instance.
<ide> * @return void|\Cake\Network\Response
<ide> */
<del> public function _authCheck(Event $event)
<add> protected function _authCheck(Event $ev... | 2 |
Javascript | Javascript | check symbols in shared lib | ab7c627e5327d621a734a32680cbfc99453f8b20 | <ide><path>test/common/shared-lib-util.js
<del>/* eslint-disable node-core/required-modules */
<ide> 'use strict';
<add>const common = require('../common');
<ide> const path = require('path');
<ide>
<ide> // If node executable is linked to shared lib, need to take care about the
<ide> exports.addLibraryPath = function... | 2 |
PHP | PHP | pass exception variable | fcf13f69ae2b6331b6780e495fe09cf88ebedc6d | <ide><path>src/Illuminate/Foundation/Exceptions/Handler.php
<ide> protected function renderHttpException(HttpException $e)
<ide>
<ide> if (view()->exists("errors.{$status}"))
<ide> {
<del> return response()->view("errors.{$status}", ['e' => $e], $status);
<add> return response()->view("errors.{$status}", ['exc... | 1 |
Python | Python | fix some bugs | 6bb3fb7c9d853dec1c4dc8564debeb426b13cd30 | <ide><path>keras/callbacks/tensorboard_v2.py
<ide> from __future__ import print_function
<ide>
<ide> import tensorflow as tf
<add>import warnings
<ide>
<ide>
<ide> class TensorBoard(tf.keras.callbacks.TensorBoard):
<ide><path>keras/engine/base_layer.py
<ide> def get_losses_for(self, inputs):
<ide> def weights(se... | 4 |
Javascript | Javascript | use endswith instead of regex | f5f2df187bf11d64671dfe40f58084bc93eaea9e | <ide><path>tools/crowdin/utils/strings.js
<ide> const isReservedHeading = (context, str) => {
<ide>
<ide> const isCode = str => /^\/pre\/code|\/code$/.test(str);
<ide>
<del>const isTitle = str => /^(tests\s*->\s*\d+\s*)?->\s*title/.test(str);
<add>const isTitle = str => str.endsWith('title');
<ide>
<ide> const shoul... | 1 |
Python | Python | fix description of ma.average parameter | b58a854359d06dd5a61cf236c328a2aefc8ecce4 | <ide><path>numpy/ma/extras.py
<ide> def average(a, axis=None, weights=None, returned=False):
<ide> Data to be averaged.
<ide> Masked entries are not taken into account in the computation.
<ide> axis : int, optional
<del> Axis along which the variance is computed. The default is to compute
<de... | 1 |
Javascript | Javascript | fix the test | 4024ea956c72f5239545a0485ab6d4d4fd039ebe | <ide><path>spec/git-repository-async-spec.js
<ide> describe('GitRepositoryAsync', () => {
<ide> })
<ide>
<ide> it('returns the old and new lines of the diff', async () => {
<del> const {oldStart, newStart, oldLines, newLines} = await repo.getLineDiffs('a.txt', 'hi there')
<add> const [{oldStart, newS... | 1 |
Text | Text | add solution to match whitespace problem | 13b3e3fa9ba6f5dcbc40e5bdaab48cc57dd3a8f5 | <ide><path>curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/match-whitespace.english.md
<ide> let result = sample.match(countWhiteSpace);
<ide> <section id='solution'>
<ide>
<ide> ```js
<del>// solution required
<add>let sample = "Whitespace is important in separating word... | 1 |
PHP | PHP | allow passing of permissions on local file driver | cf3440799657486757a2e39b077a051cddd7756c | <ide><path>src/Illuminate/Filesystem/FilesystemManager.php
<ide> protected function callCustomCreator(array $config)
<ide> */
<ide> public function createLocalDriver(array $config)
<ide> {
<del> return $this->adapt(new Flysystem(new LocalAdapter($config['root'])));
<add> $permissions = isset(... | 1 |
Text | Text | add link to linear radial axis for radar chart doc | e9f341889fe2e4a43c9ef66b379ec88cf2241415 | <ide><path>docs/charts/radar.md
<ide> The radar chart defines the following configuration options. These options are m
<ide> ## Scale Options
<ide>
<ide> The radar chart supports only a single scale. The options for this scale are defined in the `scale` property.
<add>The options for this scale are defined in the `sca... | 1 |
Ruby | Ruby | initialize @as before plural method is called | bb2f53b4090768e4750af66c6fed15d6596bb11c | <ide><path>actionpack/lib/action_dispatch/routing/mapper.rb
<ide> class SingletonResource < Resource #:nodoc:
<ide> DEFAULT_ACTIONS = [:show, :create, :update, :destroy, :new, :edit]
<ide>
<ide> def initialize(entities, options)
<add> @as = nil
<ide> @name = ent... | 1 |
Ruby | Ruby | avoid need for enumerable#sum extension | 96af8b69a4ca5f5bd349d12783d6eb2724e540d3 | <ide><path>activesupport/lib/active_support/xml_mini/rexml.rb
<ide> def merge_texts!(hash, element)
<ide> hash
<ide> else
<ide> # must use value to prevent double-escaping
<del> merge!(hash, CONTENT_KEY, element.texts.sum(&:value))
<add> texts = ''
<add> element.te... | 1 |
Javascript | Javascript | add legacy methods to buffer | 515f006b6e4ddeb977580037fca6c0fbc27c3ad7 | <ide><path>lib/buffer.js
<ide> Buffer.prototype.slice = function (start, end) {
<ide>
<ide> return new Buffer(this.parent, end - start, +start + this.offset);
<ide> };
<add>
<add>
<add>// Legacy methods for backwards compatibility.
<add>
<add>Buffer.prototype.utf8Slice = function (start, end) {
<add> return this.to... | 1 |
Python | Python | use six.string_types for python3 | 088f68252d1f3c9e5d51a5ea3ab769397a65859f | <ide><path>django/db/models/fields/related.py
<ide> class MyModel(Model):
<ide> else:
<ide> # Look for an "app.Model" relation
<ide>
<del> if isinstance(relation, basestring):
<add> if isinstance(relation, six.string_types):
<ide> try:
<ide> app_label, model_name =... | 1 |
Text | Text | add description field | cd63b740a50d67378b0f25f71c73aa11e27c2754 | <ide><path>share/doc/homebrew/Formula-Cookbook.md
<ide> end
<ide>
<ide> **We don’t accept formulae without homepages!**
<ide>
<del>Homebrew doesn’t have a description field because the homepage is always up to date, and Homebrew is not. That’s way less maintenance for us. Try `brew home qt`.
<del>
<add>Homebrew now h... | 1 |
PHP | PHP | remove duplication where possible | 6e0e15682ffba6bedabefb430cf12d84c034ec86 | <ide><path>lib/Cake/Utility/Set.php
<ide> */
<ide>
<ide> App::uses('String', 'Utility');
<add>App::uses('Hash', 'Utility');
<ide>
<ide> /**
<ide> * Class used for manipulation of arrays.
<ide> class Set {
<ide> */
<ide> public static function merge($arr1, $arr2 = null) {
<ide> $args = func_get_args();
<del>
<de... | 1 |
Javascript | Javascript | add canadian french locale | f2c29d6b04bab66c419f0ac7f13d18a1c6f4a803 | <ide><path>src/locale/fr-CA.js
<add>import "locale";
<add>
<add>var d3_locale_frCA = d3.locale({
<add> decimal: ",",
<add> thousands: "\xa0",
<add> grouping: [3],
<add> currency: ["", "$"],
<add> dateTime: "%a %e %b %Y %X",
<add> date: "%Y-%m-%d",
<add> time: "%H:%M:%S",
<add> periods: ["", ""],
<add> days: ["... | 1 |
Ruby | Ruby | fix strange nomemoryerror on amd64. closes [wrb] | f6d45ce95dae13bce93446b678148327edeaf6b8 | <ide><path>actionpack/lib/action_controller/benchmarking.rb
<ide> def perform_action_with_benchmark
<ide> end
<ide>
<ide> def rendering_runtime(runtime)
<del> " | Rendering: #{sprintf("%.5f", @rendering_runtime)} (#{sprintf("%d", (@rendering_runtime * 100) / runtime)}%)"
<add> percentage = @r... | 1 |
Python | Python | add test for concatenate with none-axis | 7c183a5d03ae31a6369cdcc608b4e4fabf83484f | <ide><path>numpy/core/tests/test_shape_base.py
<del>from numpy.testing import *
<del>from numpy.core import array, atleast_1d, atleast_2d, atleast_3d, vstack, \
<del> hstack, newaxis
<add>import warnings
<add>import numpy as np
<add>from numpy.testing import (TestCase, assert_, assert_raises, assert_equal,
<add>... | 1 |
Javascript | Javascript | invalidate cache for link[preload] in dev | 5a4176cffe7d72afbf6f9071adee8d38cd93c60d | <ide><path>packages/next/pages/_document.js
<ide> const Fragment = React.Fragment || function Fragment ({ children }) {
<ide>
<ide> export default class Document extends Component {
<ide> static childContextTypes = {
<del> _documentProps: PropTypes.any
<add> _documentProps: PropTypes.any,
<add> _devOnlyInva... | 3 |
Javascript | Javascript | fix meta and styles on error page (#600) | 08548551977c03986fd1bec975abecd8b8c56cb0 | <ide><path>pages/_error-debug.js
<ide> import React from 'react'
<add>import Head from 'next/head'
<ide> import ansiHTML from 'ansi-html'
<ide>
<ide> export default class ErrorDebug extends React.Component {
<ide> export default class ErrorDebug extends React.Component {
<ide> const { name, message, stack, path } ... | 2 |
Javascript | Javascript | add assert map and set benchmarks | 462b58e581f0e6a0f621bd478290d4c427fc8d37 | <ide><path>benchmark/assert/deepequal-map.js
<add>'use strict';
<add>
<add>/* eslint-disable no-restricted-properties */
<add>
<add>const common = require('../common.js');
<add>const assert = require('assert');
<add>
<add>const bench = common.createBenchmark(main, {
<add> n: [5e2],
<add> len: [5e2],
<add> method: [
... | 2 |
Ruby | Ruby | use a named arg for required `repositories` | ae73f28d0fb6ccba90462fd9e0b5660a2c835d6b | <ide><path>Library/Homebrew/dev-cmd/contributions.rb
<ide> module Homebrew
<ide> sig { returns(CLI::Parser) }
<ide> def contributions_args
<ide> Homebrew::CLI::Parser.new do
<del> usage_banner "`contributions` [<email>]"
<add> usage_banner "`contributions` <email> <repo1,repo2|all>"
<ide> descri... | 1 |
Ruby | Ruby | fix failing test | e5ee7d59f52453b28cd3f71078e8a0de53f0e227 | <ide><path>Library/Homebrew/test/test_formula_validation.rb
<ide> def assert_invalid(attr, &block)
<ide>
<ide> def test_cant_override_brew
<ide> e = assert_raises(RuntimeError) { Class.new(Formula) { def brew; end } }
<del> assert_equal "You cannot override Formula#brew", e.message
<add> assert_match /You ... | 1 |
Text | Text | prevent object mutation; fixes and enhancements | 97a74b68e85ade83c5efbeabe87faa4bb3b0c2a5 | <ide><path>guide/english/certifications/javascript-algorithms-and-data-structures/es6/prevent-object-mutation/index.md
<ide> ---
<ide> title: Prevent Object Mutation
<ide> ---
<del>
<del>
<ide> ![:triangular_flag_on_... | 1 |
Python | Python | fix stack overflow | 59da3f270004088c04ceddac769f3ea41b881f5b | <ide><path>src/transformers/tokenization_utils_base.py
<ide> def n_sequences(self) -> Optional[int]:
<ide> :class:`~transformers.BatchEncoding`. Currently can be one of :obj:`None` (unknown), :obj:`1` (a single
<ide> sentence) or :obj:`2` (a pair of sentences)
<ide> """
<del> return self.... | 1 |
PHP | PHP | fix documentation of fetchassoc() return value | 84e89fcc7bfd5aba24bf26e1bbb9e533bb425381 | <ide><path>src/Database/Statement/StatementDecorator.php
<ide> public function fetch($type = self::FETCH_TYPE_NUM)
<ide>
<ide> /**
<ide> * Returns the next row in a result set as an associative array. Calling this function is the same as calling
<del> * $statement->fetch(StatementDecorator::FETCH_TYPE_ASS... | 1 |
Go | Go | fix vet warning in devicemapper | 6b764bba8ad1c1006dadf24ec55edb9de200c706 | <ide><path>pkg/devicemapper/devmapper.go
<ide> import (
<ide> "os"
<ide> "runtime"
<ide> "syscall"
<add> "unsafe"
<ide>
<ide> log "github.com/Sirupsen/logrus"
<ide> )
<ide> func (t *Task) GetDriverVersion() (string, error) {
<ide> return res, nil
<ide> }
<ide>
<del>func (t *Task) GetNextTarget(next uintptr) (nex... | 2 |
Python | Python | drop random.choice() in basehook.get_connection() | 74ed92b3ff34fa3b6af27c17f44ad4573b517bbd | <ide><path>airflow/hooks/base_hook.py
<ide> # under the License.
<ide> """Base class for all hooks"""
<ide> import logging
<del>import random
<ide> from typing import Any, List
<ide>
<ide> from airflow.models.connection import Connection
<ide> class BaseHook(LoggingMixin):
<ide> @classmethod
<ide> def get_conn... | 1 |
PHP | PHP | use logs constant | 15a74722b34be6b64f4c20b413c5fa84f3666132 | <ide><path>lib/Cake/Test/Case/Utility/DebuggerTest.php
<ide> public function testLog() {
<ide> $this->assertRegExp('/DebuggerTest\:\:testLog/i', $result);
<ide> $this->assertRegExp("/'cool'/", $result);
<ide>
<del> unlink(TMP . 'logs' . DS . 'debug.log');
<add> unlink(LOGS . 'debug.log');
<ide>
<ide> Debugger... | 1 |
Text | Text | add 2.15.3 to changelog.md | 922aed6f70b6daae16a0c0c5a351d9e243916c77 | <ide><path>CHANGELOG.md
<ide> - [#15528](https://github.com/emberjs/ember.js/pull/15528) [DEPRECATION] Deprecate `Controller#content` alias.
<ide> - [#15552](https://github.com/emberjs/ember.js/pull/15552) [FEATURE] Update blueprints and tests to RFC #176.
<ide>
<add>### 2.15.3 (October 9, 2017)
<add>
<add>- [#15718](... | 1 |
Javascript | Javascript | use environ to run compares more than once | db5d58e84252042236b8de80fe0e1b722a83e61a | <ide><path>benchmark/compare.js
<del>var usage = 'node benchmark/compare.js <node-binary1> <node-binary2> [--html] [--red|-r] [--green|-g]';
<add>var usage = 'node benchmark/compare.js ' +
<add> '<node-binary1> <node-binary2> ' +
<add> '[--html] [--red|-r] [--green|-g]';
<ide>
<ide> var show = 'b... | 1 |
Go | Go | remove unnecessary error returns | 990655448dec63ef8add376becb1a20ae184a162 | <ide><path>daemon/daemon.go
<ide> func (daemon *Daemon) stats(c *Container) (*execdriver.ResourceStats, error) {
<ide> return daemon.execDriver.Stats(c.ID)
<ide> }
<ide>
<del>func (daemon *Daemon) subscribeToContainerStats(c *Container) (chan interface{}, error) {
<del> ch := daemon.statsCollector.collect(c)
<del> re... | 2 |
Go | Go | fix multiple attach test | 01094c15680c0a33367e1dcc69ec9f4018efd2ac | <ide><path>integration-cli/docker_cli_attach_test.go
<ide> package main
<ide>
<ide> import (
<add> "io"
<ide> "os/exec"
<ide> "strings"
<ide> "sync"
<ide> "testing"
<ide> "time"
<ide> )
<ide>
<add>const attachWait = 5 * time.Second
<add>
<ide> func TestMultipleAttachRestart(t *testing.T) {
<del> cmd := exec.Comm... | 2 |
Python | Python | resolve line-too-long in api | 4cb8159165ca3738e18ce699fee8f7af829fc1f9 | <ide><path>keras/api/tests/api_compatibility_test.py
<ide> def _FilterGoldenProtoDict(golden_proto_dict, omit_golden_symbols_map):
<ide> filtered_members = [
<ide> m for m in members if m.name not in symbol_list
<ide> ]
<del> # Two steps because protobu... | 1 |
Javascript | Javascript | remove console.logs and fix code style | 3130a82b21691deaedbd7ee01ad3e970b386c0a6 | <ide><path>lib/versions/version-info.js
<ide> var currentPackage, previousVersions, cdnVersion, gitRepoInfo;
<ide> var getPackage = function() {
<ide> // Search up the folder hierarchy for the first package.json
<ide> var packageFolder = path.resolve('.');
<del> while ( !fs.existsSync(path.join(packageFolder, 'pac... | 1 |
Javascript | Javascript | report history false on android < 4 | 7b739c97028be2a5d5aef679ef1f8064cd10d386 | <ide><path>src/ng/sniffer.js
<ide> */
<ide> function $SnifferProvider() {
<ide> this.$get = ['$window', function($window) {
<del> var eventSupport = {};
<add> var eventSupport = {},
<add> android = int((/android (\d+)/.exec(lowercase($window.navigator.userAgent)) || [])[1]);
<ide>
<ide> return {
<d... | 4 |
Ruby | Ruby | fix typo s/limitions/limitations/ [ci skip] | 90db24436a55b7b004c07ff46ed238bfff5f06b2 | <ide><path>activerecord/lib/active_record/associations.rb
<ide> module ClassMethods
<ide> # [:disable_joins]
<ide> # Specifies whether joins should be skipped for an association. If set to true, two or more queries
<ide> # will be generated. Note that in some cases, if order or limit is appl... | 1 |
Javascript | Javascript | exclude forwardref and memo from stack frames | cbab25bb5159e82f0d74b0d2ad84d7ad7dd3613a | <ide><path>packages/react-reconciler/src/ReactFiberComponentStack.js
<ide> import {
<ide> FunctionComponent,
<ide> IndeterminateComponent,
<ide> ForwardRef,
<del> MemoComponent,
<ide> SimpleMemoComponent,
<ide> Block,
<ide> ClassComponent,
<ide> function describeFiber(fiber: Fiber): string {
<ide> re... | 3 |
Javascript | Javascript | move instrumentation to the node managers | 5f1cba209b0025d976c3bd5053ea1eea052f5d73 | <ide><path>packages/ember-htmlbars/lib/keywords/collection.js
<ide>
<ide> import { readViewFactory } from "ember-views/streams/utils";
<ide> import CollectionView from "ember-views/views/collection_view";
<del>import ComponentNode from "ember-htmlbars/system/component-node";
<add>import ViewNodeManager from "ember-htm... | 11 |
Go | Go | remove gotest.tools dependency | 6ff6913ac46dfa6748f1c6a2dd34ad6dee80b495 | <ide><path>pkg/signal/signal_linux_test.go
<ide> import (
<ide> "syscall"
<ide> "testing"
<ide> "time"
<del>
<del> "gotest.tools/v3/assert"
<del> is "gotest.tools/v3/assert/cmp"
<ide> )
<ide>
<ide> func TestCatchAll(t *testing.T) {
<ide> func TestCatchAll(t *testing.T) {
<ide>
<ide> for sigStr := range listOfSign... | 2 |
PHP | PHP | add a space | eb0d4340d81af3c99962cb15d7365b67fc866581 | <ide><path>src/Illuminate/Foundation/Testing/TestCase.php
<ide> public function assertSessionHasAll(array $bindings)
<ide> {
<ide> foreach ($bindings as $key => $value)
<ide> {
<del> if(is_int($key))
<add> if (is_int($key))
<ide> {
<ide> $this->assertSessionHas($value);
<ide> } | 1 |
PHP | PHP | remove invalid context error on clone | 0d2883a23a06f19e8cfd9c4b2658fcfc4ad2697f | <ide><path>src/View/Widget/DateTimeWidget.php
<ide> protected function _deconstructDate($value, $options)
<ide>
<ide> $date = new DateTime();
<ide> } else {
<add> /* @var \DateTime $value */
<ide> $date = clone $value;
<ide> }
<ide> } catch... | 1 |
Go | Go | implement docker top for containerd | 2f27332836afbd114f942458459751e278a8ac25 | <ide><path>daemon/top_windows.go
<ide> func (daemon *Daemon) ContainerTop(name string, psArgs string) (*containertypes.
<ide> procList.Titles = []string{"Name", "PID", "CPU", "Private Working Set"}
<ide>
<ide> for _, j := range s {
<del> d := time.Duration((j.KernelTime100ns + j.UserTime100ns) * 100) // Combined ti... | 4 |
Java | Java | avoid one layer of httpheaders wrapping | 3276f818519f9bde187c4ccb83653c21c2e0e7fb | <ide><path>spring-web/src/main/java/org/springframework/http/HttpEntity.java
<ide> /*
<del> * Copyright 2002-2018 the original author or authors.
<add> * Copyright 2002-2020 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this fi... | 8 |
Ruby | Ruby | use the key name yielded to the fetch block | 857bd732723a6ca297195198b9796ba79226f83f | <ide><path>activerecord/lib/active_record/attribute_methods/read.rb
<ide> def instance_cast_method(attr_name)
<ide> # "2004-12-12" in a data column is cast to a date object, like Date.new(2004, 12, 12)).
<ide> def read_attribute(attr_name)
<ide> # If it's cached, just return it
<del> @attribu... | 1 |
Python | Python | simplify test of notmasked_contiguous | e2c71688e765a2c0eba4958891b0637754575f18 | <ide><path>numpy/ma/tests/test_extras.py
<ide> def test_contiguous(self):
<ide> a = masked_array(np.arange(24).reshape(3, 8),
<ide> mask=[[0, 0, 0, 0, 1, 1, 1, 1],
<ide> [1, 1, 1, 1, 1, 1, 1, 1],
<del> [0, 0, 0, 0, 0, 0, 1, 0]... | 1 |
Javascript | Javascript | move all helpers to the end of the module | 1043fa897156c077b96de8109c7869bf5b8381ab | <ide><path>src/manipulation.js
<ide> jQuery.fn.extend({
<ide> }
<ide> });
<ide>
<del>function findOrAppend( elem, tag ) {
<del> return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
<del>}
<del>
<del>// Replace/restore the type attribute of script elements for safe... | 1 |
Text | Text | update text about attached and detached semantics | 1eba8cff39eb345b4d9e2e6623aa0d2235faceb9 | <ide><path>docs/upgrading/upgrading-your-package.md
<ide> Sometimes it is as simple as converting the requires at the top of each view pag
<ide> ### Upgrading classes extending any space-pen View
<ide>
<ide> The `afterAttach` and `beforeRemove` hooks have been replaced with
<del>`attached` and `detached`. The `attache... | 1 |
Python | Python | extend list of numbers for ru language | 23f06dc37f8b9e309028d4d8b3ef17f6daaad8e0 | <ide><path>spacy/lang/ru/lex_attrs.py
<ide> from ...attrs import LIKE_NUM
<ide>
<ide>
<del>_num_words = [
<del> "ноль",
<del> "один",
<del> "два",
<del> "три",
<del> "четыре",
<del> "пять",
<del> "шесть",
<del> "семь",
<del> "восемь",
<del> "девять",
<del> "десять",
<del> "одиннадц... | 1 |
Java | Java | refine exception handling | 97af9998d5d4dbaa885776ae71b863afa8c89263 | <ide><path>spring-web-reactive/src/main/java/org/springframework/web/reactive/DispatcherHandler.java
<ide> public Mono<Void> handle(ServerHttpRequest request, ServerHttpResponse response)
<ide> logger.debug("Processing " + request.getMethod() + " request for [" + request.getURI() + "]");
<ide> }
<ide> return Flu... | 4 |
Python | Python | fix error when `bert_model` param is path or url | ca4e7aaa72551cdba39e49094f5a05962573c774 | <ide><path>examples/run_squad.py
<ide> def main():
<ide> global_step = 0
<ide> if args.do_train:
<ide> cached_train_features_file = args.train_file+'_{0}_{1}_{2}_{3}'.format(
<del> args.bert_model, str(args.max_seq_length), str(args.doc_stride), str(args.max_query_length))
<add> li... | 1 |
Python | Python | fix openstack swift driver so it works correctly | be258dc9d8100697f27078639dc24b4f256d436d | <ide><path>libcloud/storage/drivers/cloudfiles.py
<ide> class OpenStackSwiftConnection(CloudFilesConnection):
<ide> Connection class for the OpenStack Swift endpoint.
<ide> """
<ide>
<add> # TODO: Reverse the relationship - Swift -> CloudFiles
<add>
<ide> def __init__(self, *args, **kwargs):
<ide> ... | 1 |
Text | Text | add comma after however | 19c68550754e5ab32d9a13a3f991d1b5a639e121 | <ide><path>guides/source/layouts_and_rendering.md
<ide> And you have a view file `app/views/books/index.html.erb`:
<ide>
<ide> Rails will automatically render `app/views/books/index.html.erb` when you navigate to `/books` and you will see "Books are coming soon!" on your screen.
<ide>
<del>However a coming soon scree... | 1 |
Javascript | Javascript | strengthen nested update counter test coverage | 31518135c25aaa1b5c2799d2a18b6b9e9178409c | <ide><path>packages/react-dom/src/__tests__/ReactUpdates-test.js
<ide> let ReactTestUtils;
<ide>
<ide> describe('ReactUpdates', () => {
<ide> beforeEach(() => {
<add> jest.resetModules();
<ide> React = require('react');
<ide> ReactDOM = require('react-dom');
<ide> ReactTestUtils = require('react-dom/t... | 1 |
Go | Go | remove false alarm error | 0e64a4d7e7d5dd7c68ecc1df9fe8234938f12026 | <ide><path>api.go
<ide> func postCommit(srv *Server, version float64, w http.ResponseWriter, r *http.Req
<ide> return err
<ide> }
<ide> config := &Config{}
<del> if err := json.NewDecoder(r.Body).Decode(config); err != nil {
<add> if err := json.NewDecoder(r.Body).Decode(config); err != nil && err.Error() != "EOF" ... | 1 |
PHP | PHP | show useful message for dev | c47587718d81d83d5ee18f2fa3ed3b4e63e0fa90 | <ide><path>src/Http/Runner.php
<ide> public function handle(ServerRequestInterface $request): ResponseInterface
<ide> return $this->fallbackHandler->handle($request);
<ide> }
<ide>
<del> return (new Response())->withStatus(500);
<add> $response = new Response([
<add> 'body'... | 1 |
Python | Python | fix tf gpt2 test_onnx_runtime_optimize | 401fcca6c561d61db6ce25d9b1cebb75325a034f | <ide><path>tests/models/gpt2/test_modeling_tf_gpt2.py
<ide> import unittest
<ide>
<ide> from transformers import GPT2Config, is_tf_available
<del>from transformers.testing_utils import require_tf, slow
<add>from transformers.testing_utils import require_tf, require_tf2onnx, slow
<ide>
<ide> from ...test_configuration... | 1 |
Python | Python | fix static checks after merging | 1da8379c913843834353b44861c62f332a461bdf | <ide><path>airflow/providers/google/cloud/hooks/cloud_memorystore.py
<ide> def __init__(
<ide> def get_conn(
<ide> self,
<ide> ):
<del> """
<del> Retrieves client library object that allow access to Cloud Memorystore Memcached service.
<del> """
<add> """Retrieves client libr... | 1 |
Text | Text | hotlink examples in readme | a5272e85156db31a578715272931f0f2180d385b | <ide><path>examples/README.md
<ide> # examples
<ide>
<del>## commonjs
<add>## [commonjs](commonjs)
<ide>
<ide> example demonstrating a very simple program
<ide>
<del>## code-splitting
<add>## [code-splitting](code-splitting)
<ide>
<ide> example demonstrating a very simple case of Code Splitting.
<ide>
<del>## requ... | 1 |
Text | Text | fix status code in documents [ci skip] | c883fedc472f64b45b69f18d3b6c4693e1430df7 | <ide><path>guides/source/layouts_and_rendering.md
<ide> Rails understands both numeric status codes and the corresponding symbols shown
<ide> | | 423 | :locked |
<ide> | | 424 | :failed_dependency |
<ide> | ... | 1 |
Javascript | Javascript | add crossfadefrom & crossfadeto | 8485ffd4815b506f876b18f8676a50aee13d7a29 | <ide><path>test/unit/src/animation/AnimationAction.tests.js
<ide> function createAnimation(){
<ide>
<ide> }
<ide>
<add>function createTwoAnimations(){
<add>
<add> var root = new Object3D();
<add> var mixer = new AnimationMixer(root);
<add> var track = new NumberKeyframeTrack( ".rotation[x]", [ 0, 1000 ], [ 0, 360 ] )... | 1 |
Javascript | Javascript | add a failing test for | 7a74435c93726ba411eb3031b10ecf57c2693b23 | <ide><path>packages/ember-metal/lib/watching.js
<ide> export function isWatching(obj, key) {
<ide> return (meta && meta.peekWatching(key)) > 0;
<ide> }
<ide>
<add>export function watcherCount(obj, key) {
<add> var meta = peekMeta(obj);
<add> return (meta && meta.peekWatching(key)) || 0;
<add>}
<add>
<ide> watch.fl... | 2 |
Javascript | Javascript | enable the fuzz tester | ccbb92f9ef2348e80104094b10655b61fd22ef0d | <ide><path>src/renderers/shared/fiber/__tests__/ReactIncrementalTriangle-test.js
<ide> describe('ReactIncrementalTriangle', () => {
<ide> return {simulate, totalChildren, totalTriangles};
<ide> }
<ide>
<del> xit('renders the triangle demo without inconsistencies', () => {
<add> it('renders the triangle demo wi... | 1 |
Python | Python | fix linting errors | e0e4ed00f3962af1a38c3002f5266131f0e30780 | <ide><path>libcloud/compute/drivers/dimensiondata.py
<ide> def _to_firewall_address(self, element):
<ide> port_list = element.find(fixxpath('portList', TYPES_URN))
<ide> address_list = element.find(fixxpath('ipAddressList', TYPES_URN))
<ide> if address_list is None:
<del> return Dimen... | 1 |
Python | Python | add gcp extras | 596270fcde351703021f4a946066ab10b3fbceaa | <ide><path>setup.py
<ide> def run(self):
<ide> ]
<ide> docker = ['docker-py>=1.6.0']
<ide> druid = ['pydruid>=0.2.1']
<add>gcp = [
<add> 'gcloud>=1.1.0',
<add>]
<ide> gcp_api = [
<ide> 'oauth2client>=1.5.2, <2.0.0',
<ide> 'httplib2',
<ide> def run(self):
<ide> 'doc': doc,
<ide> 'docker': dock... | 1 |
Text | Text | improve the changelog entry for | 69e0e3f91b5297d0507441f86e13a60f37ec54d8 | <ide><path>activerecord/CHANGELOG.md
<ide> ## Rails 4.0.0 (unreleased) ##
<ide>
<del>* Fix querying with an empty hash *Damien Mathieu*
<add>* Fix the return of querying with an empty hash.
<add> Fix #6971.
<add>
<add> User.where(token: {})
<add>
<add> Before:
<add>
<add> #=> SELECT * FROM user... | 1 |
PHP | PHP | fix cs errors | d0c8cf1c79e580665befb26ae899f0a5d4d6f831 | <ide><path>src/Mailer/AbstractTransport.php
<ide> public function __construct(array $config = [])
<ide> /**
<ide> * Check that at least one destination header is set.
<ide> *
<del> * @param \Cake\Mailer\Message $message
<add> * @param \Cake\Mailer\Message $message Message instance.
<ide> * @r... | 1 |
Python | Python | fix lerp function and corresponding tests | 214e8302ff92c002853ab03427cae2448a812f7c | <ide><path>numpy/lib/function_base.py
<ide> def _quantile_is_valid(q):
<ide>
<ide> def _lerp(a, b, t, out=None):
<ide> """ Linearly interpolate from a to b by a factor of t """
<del> if t < 0.5:
<del> return add(a, subtract(b, a)*t, out=out)
<add> #return add(a, subtract(b, a, out=out)*t, out=out)
<ad... | 2 |
Python | Python | remove import of removed train_config script | baf3ef0ddcb7b59973750443f4c0a3732dd0f12a | <ide><path>spacy/cli/__init__.py
<ide> from .info import info
<ide> from .link import link
<ide> from .package import package
<del>from .train import train, train_config
<add>from .train import train
<ide> from .model import model
<ide> from .convert import convert | 1 |
Ruby | Ruby | remove unnecessary require in associations_test.rb | 715e845fa2e96e4c55efd962939657334ed66e7e | <ide><path>activerecord/test/cases/associations_test.rb
<ide> require 'models/tagging'
<ide> require 'models/person'
<ide> require 'models/reader'
<del>require 'models/parrot'
<ide> require 'models/ship_part'
<ide> require 'models/ship'
<ide> require 'models/liquid' | 1 |
Text | Text | add security contact | 93f7f2e9507763816ce1ccbf518c4cbeda31d85a | <ide><path>CONTRIBUTING.md
<ide> Second, read the [Troubleshooting Checklist](https://github.com/Homebrew/homebre
<ide>
<ide> **If you don't read these it will take us far longer to help you with your problem.**
<ide>
<add>Security
<add>--------
<add>Please report security issues to security@brew.sh.
<add>
<ide> Cont... | 2 |
PHP | PHP | implement the rest of file support | a20db3d21f379a135368023688b2a03ceac3648b | <ide><path>lib/Cake/Network/Http/FormData.php
<ide> public function add($name, $value) {
<ide> */
<ide> public function addFile($name, $value) {
<ide> $filename = false;
<add> $contentType = 'application/octet-stream';
<ide> if (is_resource($value)) {
<ide> $content = stream_get_contents($value);
<ide> } el... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.