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 | test one to one with inheritance | de08f28a9185c09667eace53b637b1cb4529c695 | <ide><path>tests/test_one_to_one_with_inheritance.py
<add>from __future__ import unicode_literals
<add>
<add>from django.db import models
<add>from django.test import TestCase
<add>
<add>from rest_framework import serializers
<add>from tests.models import RESTFrameworkModel
<add>
<add>
<add># Models
<add>from tests.tes... | 1 |
PHP | PHP | add typehint for translatebehavior | b1f50e5c14853406404406009e8fbcc0fe02dcd3 | <ide><path>src/Model/Behavior/TranslateBehavior.php
<ide> public function setupFieldAssociations($fields, $table) {
<ide> * @param \Cake\ORM\Query $query Query
<ide> * @return void
<ide> */
<del> public function beforeFind(Event $event, $query) {
<add> public function beforeFind(Event $event, Query $query) {
<ide> ... | 1 |
Python | Python | start arg parser | 8cedd5fbb813e8786ffd1182008672a743604f3f | <ide><path>glances/__init__.py
<ide> from .core.glances_core import GlancesCore
<ide>
<ide> def main(argv=None):
<del> print "!!! %s" % argv
<ide> glances_instance = GlancesCore()
<ide> glances_instance.start()
<ide><path>glances/core/glances_core.py
<ide> # You should have received a copy of the GNU Lesser... | 2 |
Javascript | Javascript | avoid hardcoding platform on blacklist | e82a7a86494dad5fe77cb035060cbb361e5901d4 | <ide><path>local-cli/bundle/buildBundle.js
<ide> function buildBundle(args, config, output = outputBundle) {
<ide> const options = {
<ide> projectRoots: config.getProjectRoots(),
<ide> assetRoots: config.getAssetRoots(),
<del> blacklistRE: config.getBlacklistRE(),
<add> blacklistRE: config.get... | 2 |
Javascript | Javascript | extract loader.target from target option | eec6fbdd7ce1829ccf839a437371bbd700c498ae | <ide><path>lib/NormalModule.js
<ide> class NormalModule extends Module {
<ide> fs: fs
<ide> };
<ide>
<add> Object.assign(loaderContext, options.loader);
<add>
<ide> NormalModule.getCompilationHooks(compilation).loader.call(
<ide> loaderContext,
<ide> this
<ide> );
<ide>
<del> if (options.loader) {
<d... | 5 |
Text | Text | fix typos in readme | 956c917344afc7286f92dbe351050a22c0b04a00 | <ide><path>README.md
<ide> Here is a detailed documentation of the classes in the package and how to use th
<ide>
<ide> ### Loading Google AI's pre-trained weigths and PyTorch dump
<ide>
<del>To load Google AI's pre-trained weight or a PyTorch saved instance of `BertForPreTraining`, the PyTorch model classes and the ... | 1 |
PHP | PHP | accept a string or array of views | a07bd96a101034a6944e3a58dc50d9936a20e2f9 | <ide><path>src/Illuminate/Contracts/Routing/ResponseFactory.php
<ide> public function noContent($status = 204, array $headers = []);
<ide> /**
<ide> * Create a new response for a given view.
<ide> *
<del> * @param string $view
<add> * @param string|array $view
<ide> * @param array $data... | 1 |
Ruby | Ruby | use implicit begin | b2ff6e934bad87aaa4a8f4f7d3bc66fa87e8e72b | <ide><path>Library/Homebrew/utils.rb
<ide> def nostdout
<ide>
<ide> module GitHub extend self
<ide> def open url, headers={}, &block
<del> begin
<del> default_headers = {'User-Agent' => HOMEBREW_USER_AGENT}
<del> default_headers['Authorization'] = "token #{HOMEBREW_GITHUB_API_TOKEN}" if HOMEBREW_GITHUB_... | 1 |
Javascript | Javascript | check crypto before requiring tls module | 7307839b559b13c242e9d5341201ec17f83f3eed | <ide><path>test/parallel/test-tls-session-cache.js
<ide>
<ide> 'use strict';
<ide> const common = require('../common');
<add>if (!common.hasCrypto)
<add> common.skip('missing crypto');
<ide> const fixtures = require('../common/fixtures');
<ide> const assert = require('assert');
<ide> const tls = require('tls');
<ide>... | 1 |
PHP | PHP | fix typehint template | 8ce9c834f9f9124af425c27795853efaa2c6aaad | <ide><path>src/Illuminate/Collections/Collection.php
<ide> public function diff($items)
<ide> * Get the items in the collection that are not present in the given items, using the callback.
<ide> *
<ide> * @param \Illuminate\Contracts\Support\Arrayable<array-key, TValue>|iterable<array-key, TValue> $ite... | 3 |
Ruby | Ruby | stringify the incoming hash in flashhash | a668beffd64106a1e1fedb71cc25eaaa11baf0c1 | <ide><path>actionpack/lib/action_dispatch/middleware/flash.rb
<add>require 'active_support/core_ext/hash/keys'
<add>
<ide> module ActionDispatch
<ide> class Request < Rack::Request
<ide> # Access the contents of the flash. Use <tt>flash["notice"]</tt> to
<ide> def to_session_value
<ide>
<ide> def initializ... | 1 |
Javascript | Javascript | use writev instead of the hacky hot end | ec576235f1f4d7f5873cf3c0118b28c022740ffe | <ide><path>lib/_http_outgoing.js
<ide> var crlf_buf = new Buffer('\r\n');
<ide>
<ide>
<ide> OutgoingMessage.prototype.end = function(data, encoding) {
<add> if (data && typeof data !== 'string' && !Buffer.isBuffer(data)) {
<add> throw new TypeError('first argument must be a string or Buffer');
<add> }
<add>
<ide... | 1 |
PHP | PHP | revert some unnecessary changes | 3919621558e1635db4327c4b54cafa4f9cba9c82 | <ide><path>src/Illuminate/Database/Query/Builder.php
<ide> class Builder
<ide> '&', '|', '^', '<<', '>>',
<ide> 'rlike', 'regexp', 'not regexp',
<ide> '~', '~*', '!~', '!~*', 'similar to',
<del> 'not similar to',
<add> 'not similar to',
<ide> ];
<ide>
<ide> /**
<id... | 1 |
Javascript | Javascript | convert legacy process.binding to internalbinding | 04c839bd8c83eb497340bcd5a15f84a1e6fe473a | <ide><path>lib/internal/idna.js
<ide> 'use strict';
<ide>
<del>if (process.binding('config').hasIntl) {
<add>if (internalBinding('config').hasIntl) {
<ide> const { toASCII, toUnicode } = internalBinding('icu');
<ide> module.exports = { toASCII, toUnicode };
<ide> } else { | 1 |
Python | Python | prepare 2.2.0 release | 9a58f7b29026270afbec58c9255750b527ceff27 | <ide><path>keras/__init__.py
<ide> from .models import Model
<ide> from .models import Sequential
<ide>
<del>__version__ = '2.1.6'
<add>__version__ = '2.2.0'
<ide><path>setup.py
<ide> '''
<ide>
<ide> setup(name='Keras',
<del> version='2.1.6',
<add> version='2.2.0',
<ide> description='Deep Learning for... | 2 |
Ruby | Ruby | remove workaround for non-lazy serialize in tests | bc769581c20e5634debd18a9f6abfadb778e1ac6 | <ide><path>activerecord/test/cases/adapters/postgresql/hstore_test.rb
<ide> def test_update_all
<ide> assert_equal({ }, hstore.reload.tags)
<ide> end
<ide>
<del> # FIXME: remove this lambda once `serialize` no longer issues a db connection.
<del> LAZY_MODELS = lambda do
<del> return if defined?(Ta... | 1 |
Ruby | Ruby | remove sentinel object | c4c72ad0bbceee2da817dd46d7c2274cb2460fe0 | <ide><path>actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
<ide> def create_template(request, wrapper)
<ide> DebugView.new(
<ide> request: request,
<ide> exception_wrapper: wrapper,
<del> exception: BasicObject.new,
<add> # Everything should use the wrapper, b... | 1 |
Javascript | Javascript | improve error message for circular reexports | 3f6450410af83be217c4f21c0a8ab1bc3e42add4 | <ide><path>lib/optimize/ConcatenatedModule.js
<ide> const getFinalName = (
<ide> moduleToInfoMap,
<ide> requestShortener,
<ide> asCall,
<del> strictHarmonyModule
<add> strictHarmonyModule,
<add> alreadyVisited = new Set()
<ide> ) => {
<ide> switch (info.type) {
<ide> case "concatenated": {
<ide> const getFinalNam... | 11 |
Ruby | Ruby | add cask cleanup and per-formula cache cleanup | 78658e430259bc030389668d6f6aec9b8e1066b2 | <ide><path>Library/Homebrew/cask/lib/hbc/cask_loader.rb
<add>require "hbc/cask"
<ide> require "uri"
<ide>
<ide> module Hbc
<ide><path>Library/Homebrew/cleanup.rb
<ide> require "hbc/cask_loader"
<ide>
<ide> module CleanupRefinement
<add> LATEST_CASK_DAYS = 7
<add>
<ide> refine Pathname do
<ide> def incomplete?
... | 2 |
Java | Java | apply abortoncancel in jettyclienthttpconnector | 0cf5005a3d8bfe387ccc970c95953351fc83fbe5 | <ide><path>spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpConnector.java
<ide> public Mono<ClientHttpResponse> connect(HttpMethod method, URI uri,
<ide> Request request = this.httpClient.newRequest(uri).method(method.toString());
<ide>
<ide> return requestCallback.apply(new JettyC... | 1 |
PHP | PHP | lower method directly | 8f2aeb345a4ce88f0515ae0bdef477d40380f17e | <ide><path>src/Illuminate/Support/Str.php
<ide> public static function slug($title, $separator = '-', $language = 'en')
<ide> $title = str_replace('@', $separator.'at'.$separator, $title);
<ide>
<ide> // Remove all characters that are not the separator, letters, numbers, or whitespace.
<del> $ti... | 1 |
Go | Go | use ordered array instead of heap for sb.endpoints | 40923e73532e765763c00fec0a27d712b4d219e3 | <ide><path>libnetwork/controller.go
<ide> create network namespaces and allocate interfaces for containers to use.
<ide> package libnetwork
<ide>
<ide> import (
<del> "container/heap"
<ide> "fmt"
<ide> "net"
<ide> "path/filepath"
<ide> func (c *controller) NewSandbox(containerID string, options ...SandboxOption) (S... | 4 |
Python | Python | return path from the shelloutsshclient.put method | ea3500614aa3b735c36b663f0db807f35d126f0b | <ide><path>libcloud/compute/ssh.py
<ide> def put(self, path, contents=None, chmod=None, mode='w'):
<ide>
<ide> cmd = ['echo "%s" %s %s' % (contents, redirect, path)]
<ide> self._run_remote_shell_command(cmd)
<add> return path
<ide>
<ide> def delete(self, path):
<ide> cmd = ['rm', '-... | 1 |
PHP | PHP | implement typeinterface from type | 85de77e0a3dcebb21f4a70c3dff996784df42941 | <ide><path>src/Database/Type.php
<ide> * Encapsulates all conversion functions for values coming from database into PHP and
<ide> * going from PHP into database.
<ide> */
<del>class Type
<add>class Type implements TypeInterface
<ide> {
<ide>
<ide> /** | 1 |
Javascript | Javascript | remove return values from validation functions | 6c913fb0287fa7f823fcd0fbe7035bac3c4f75ec | <ide><path>lib/internal/crypto/scrypt.js
<ide> function check(password, salt, keylen, options) {
<ide>
<ide> password = validateArrayBufferView(password, 'password');
<ide> salt = validateArrayBufferView(salt, 'salt');
<del> keylen = validateUint32(keylen, 'keylen');
<add> validateUint32(keylen, 'keylen');
<ide>... | 2 |
Go | Go | use correct version for ptrace denial suppression | 284d9d451e93baff311b501018cae2097f76b134 | <ide><path>profiles/apparmor/template.go
<ide> profile {{.Name}} flags=(attach_disconnected,mediate_deleted) {
<ide> deny /sys/firmware/efi/efivars/** rwklx,
<ide> deny /sys/kernel/security/** rwklx,
<ide>
<del>{{if ge .Version 208000}}
<add>{{if ge .Version 208095}}
<ide> # suppress ptrace denials when using 'd... | 1 |
Python | Python | add new option 'cfunc_alias' to umath generator | d084917e8f884f43ee172117fe516244ebe728b5 | <ide><path>numpy/core/code_generators/generate_umath.py
<ide> class TypeDescription:
<ide> astype : dict or None, optional
<ide> If astype['x'] is 'y', uses PyUFunc_x_x_As_y_y/PyUFunc_xx_x_As_yy_y
<ide> instead of PyUFunc_x_x/PyUFunc_xx_x.
<add> cfunc_alias : str or none, optional
<add> re... | 1 |
Javascript | Javascript | use custom elements on pane container element | d1f3d4e3bb598900149977647b77179c1e1a998d | <ide><path>src/panel-container-element.js
<ide> const { createFocusTrap } = require('focus-trap');
<ide> const { CompositeDisposable } = require('event-kit');
<ide>
<ide> class PanelContainerElement extends HTMLElement {
<del> createdCallback() {
<add> constructor() {
<add> super();
<ide> this.subscriptions =... | 2 |
Ruby | Ruby | improve long command output | 347c905a7f5967880c59582c7760e2ed23994ca3 | <ide><path>Library/Contributions/cmd/brew-test-bot.rb
<ide> def puts_command
<ide> end
<ide>
<ide> def puts_result
<del> puts "#{Tty.send status_colour}#{status_upcase}#{Tty.reset}"
<add> puts " #{Tty.send status_colour}#{status_upcase}#{Tty.reset}"
<ide> end
<ide>
<ide> def has_output? | 1 |
Javascript | Javascript | add type argument to module.size | cc34ea42b0844d531db587ca17a84ff6f0b03eee | <ide><path>lib/ContextModule.js
<ide> webpackEmptyAsyncContext.id = ${JSON.stringify(id)};`;
<ide> }
<ide>
<ide> /**
<add> * @param {string=} type the source type for which the size should be estimated
<ide> * @returns {number} the estimated size of the module
<ide> */
<del> size() {
<add> size(type) {
<ide> ... | 14 |
Text | Text | change the typo from ad to as | 972dbd5c27579ffc77c10acc6fec8170943cf1dd | <ide><path>curriculum/challenges/english/09-information-security/information-security-with-helmetjs/understand-bcrypt-hashes.md
<ide> BCrypt hashes will always looks like `$2a$13$ZyprE5MRw2Q3WpNOGZWGbeG7ADUre1Q8QO.
<ide>
<ide> Add all your code for these lessons in the `server.js` file between the code we have started... | 1 |
Text | Text | fix some translations | 68bb39b9f2414189cffb124540e11c94d2d799ba | <ide><path>guide/spanish/algorithms/exponentiation/index.md
<ide> ---
<ide> title: Exponentiation
<del>localeTitle: Exposiciónción
<add>localeTitle: Potenciación
<ide> ---
<del>## Exposiciónción
<add>## Potenciación
<ide>
<ide> Dados dos enteros a y n, escribe una función para calcular a ^ n.
<ide>
<ide> int power(i... | 1 |
Javascript | Javascript | remove getterfn wrapper for internal use | b3b476db7d34bc2f8b099ab5b993b1e899b9cffd | <ide><path>src/ng/parse.js
<ide> function ensureSafeFunction(obj, fullExpression) {
<ide> }
<ide> }
<ide>
<add>//Keyword constants
<add>var CONSTANTS = createMap();
<add>forEach({
<add> 'null': function() { return null; },
<add> 'true': function() { return true; },
<add> 'false': function() { return false; },
<ad... | 2 |
PHP | PHP | fix input() making multiple checkboxes | 086c88b8e5da3aa3442b9ea922ab82ba2acd2fed | <ide><path>src/View/Helper/FormHelper.php
<ide> protected function _getInput($fieldName, $options) {
<ide> $opts = $options['options'];
<ide> unset($options['options']);
<ide> return $this->radio($fieldName, $opts, $options);
<add> case 'multicheckbox':
<add> $opts = $options['options'];
<add> unset... | 2 |
Python | Python | fix mypy errors in airflow/operators | a5dfd63944cfad796e18bbd7a02f713971c27c94 | <ide><path>airflow/operators/bash.py
<ide> def __init__(
<ide> append_env: bool = False,
<ide> output_encoding: str = 'utf-8',
<ide> skip_exit_code: int = 99,
<del> cwd: str = None,
<add> cwd: Optional[str] = None,
<ide> **kwargs,
<ide> ) -> None:
<ide> super().... | 2 |
PHP | PHP | allow orm\table to slip through duplicate checks | a5674371fe351b549e6e1e3ec916b3a0d2d61a28 | <ide><path>src/Shell/Task/TestTask.php
<ide> protected function _processModel($subject) {
<ide> $assoc = $subject->association($alias);
<ide> $target = $assoc->target();
<ide> $name = $target->alias();
<add> $subjectClass = get_class($subject);
<ide>
<del> if (get_class($subject) === get_class($target)) {... | 2 |
Ruby | Ruby | reuse details cache key identity object | 6ccddadd847c2c3106867ca8085b51a82b449e14 | <ide><path>actionview/lib/action_view/lookup_context.rb
<ide> class DetailsKey #:nodoc:
<ide> @digest_cache = Concurrent::Map.new
<ide>
<ide> def self.digest_cache(details)
<del> if details[:formats]
<del> details = details.dup
<del> details[:formats] &= Template::Types.symbols
<de... | 1 |
Python | Python | add test for find_default_import_path | 5eaed3711685f263d4a34af25b5976f04e6885f2 | <ide><path>tests/test_cli.py
<ide> from flask import Flask, current_app
<ide>
<ide> from flask.cli import AppGroup, FlaskGroup, NoAppException, ScriptInfo, \
<del> find_best_app, locate_app, with_appcontext, prepare_exec_for_file
<add> find_best_app, locate_app, with_appcontext, prepare_exec_for_file, \
<add> ... | 1 |
Text | Text | update code conventions.md | 9738b69c0e3babb365cafaa26b872ca1028c9696 | <ide><path>extra/DEVELOPER_DOCS/Code Conventions.md
<ide> Regression tests are tests that refer to bugs reported in specific issues. They
<ide>
<ide> The test suite also provides [fixtures](https://github.com/explosion/spaCy/blob/master/spacy/tests/conftest.py) for different language tokenizers that can be used as fun... | 1 |
Mixed | Javascript | watch signals for recursive incompatibility | 67e067eb0658281b647ff68a5a9e64ea2cfdb706 | <ide><path>doc/api/errors.md
<ide> The `--entry-type=...` flag is not compatible with the Node.js REPL.
<ide> Used when an [ES Module][] loader hook specifies `format: 'dynamic'` but does
<ide> not provide a `dynamicInstantiate` hook.
<ide>
<add><a id="ERR_FEATURE_UNAVAILABLE_ON_PLATFORM"></a>
<add>#### `ERR_FEATURE_U... | 5 |
Python | Python | improve the `numpy.linalg.eig` doctring. | 8bd5dddda46805928bba355a288815831c50c96c | <ide><path>numpy/linalg/linalg.py
<ide> def eig(a):
<ide> Hermitian (conjugate symmetric) array.
<ide> eigvalsh : eigenvalues of a real symmetric or complex Hermitian
<ide> (conjugate symmetric) array.
<del> scipy.linalg.eig : Similar function in SciPy (but also solves the
<del> ... | 1 |
PHP | PHP | fix status code | ec88362ee06ad418db93eb0e19f6d285eed7e701 | <ide><path>src/Illuminate/Foundation/Exceptions/Handler.php
<ide> protected function convertValidationExceptionToResponse(ValidationException $e,
<ide>
<ide> if ($request->expectsJson()) {
<ide> return response()->json(
<del> $this->formatValidationResponse($e)
<add> $... | 1 |
PHP | PHP | fix coding standard against code sniffer 2.5.0 | 55140a955b5c0048c43b2e559361a2399fed3a83 | <ide><path>src/Database/Query.php
<ide> public function select($fields = [], $overwrite = false)
<ide> * $query->distinct('name', true);
<ide> * ```
<ide> *
<del> * @param array|ExpressionInterface|string|boolean $on Enable/disable distinct class
<add> * @param array|ExpressionInterface|string|bo... | 7 |
Python | Python | improve "repeat" in backends | de8a0133f01b4e9204eb81eb85ff4f9684aeb98f | <ide><path>keras/backend/tensorflow_backend.py
<ide> def repeat(x, n):
<ide> if x has shape (samples, dim) and n=2,
<ide> the output will have shape (samples, 2, dim)
<ide> '''
<add> assert x.ndim == 2
<ide> tensors = [x] * n
<ide> stacked = tf.pack(tensors)
<ide> return tf.transpose(stacked,... | 3 |
Text | Text | show error 404 without partial failing | 59cb9e8a77629fcebbc959628c569179e389134f | <ide><path>CHANGELOG.md
<add><a name="1.2.26"></a>
<add># 1.2.26 zucchini-expansion (2014-10-01)
<add>
<add>
<add>## Bug Fixes
<add>
<add>- **$compile:** Resolve leak with asynchronous compilation
<add> ([5c9c1973](https://github.com/angular/angular.js/commit/5c9c19730526d5df6f16c523e578e5305f3796d0),
<add> [#9199](... | 1 |
Python | Python | hide program path in short process view | dae8db065c07bda49e608a4a91af3090ef3ad3e3 | <ide><path>glances/plugins/glances_processlist.py
<ide> def get_process_curses_data(self, p, first, args):
<ide> if cmdline == '':
<ide> msg = ' {0}'.format(p['name'])
<ide> ret.append(self.curse_add_line(msg, splittable=True))
<del> elif args.process_short_name:
<... | 1 |
PHP | PHP | implement empty options for datetime selects | e4121d27bce67663f020f6b0e0c0bcfb9d1ac931 | <ide><path>src/View/Input/DateTime.php
<ide> public function render(array $data) {
<ide> 'name' => 'data',
<ide> 'empty' => false,
<ide> 'disabled' => null,
<del> 'val' => new \DateTime(),
<add> 'val' => null,
<ide> 'year' => [],
<ide> 'month' => [
<ide> 'names' => false,
<ide> public function re... | 2 |
Ruby | Ruby | add autocorrect and tests for test checks | ca59377a90970a88b58aeda8cf74b8803931dcdc | <ide><path>Library/Homebrew/rubocops/class_cop.rb
<ide> def audit_formula(_node, _class_node, _parent_class_node, body_node)
<ide> end
<ide> end
<ide>
<add> def autocorrect(node)
<add> lambda do |corrector|
<add> case node.type
<add> when :str, :dstr
<add> ... | 2 |
Ruby | Ruby | fix more version misdetections for urls with archs | a9c4091de733e54cc73bab7e0fe0b729f5f6bde6 | <ide><path>Library/Homebrew/test/test_versions.rb
<ide> def test_win_style
<ide> def test_with_arch
<ide> assert_version_detected '4.0.18-1',
<ide> 'http://ftpmirror.gnu.org/mtools/mtools-4.0.18-1.i686.rpm'
<add> assert_version_detected '5.5.7-5',
<add> 'http://ftpmirror.gnu.org/autogen/autogen-5.5.... | 2 |
Java | Java | use softreferences for context caching in the tcf | 0cb22fc8f34a29c42313056671a947444b60050b | <ide><path>spring-test/src/main/java/org/springframework/test/context/ContextCache.java
<ide> import java.util.List;
<ide> import java.util.Map;
<ide> import java.util.Set;
<del>import java.util.concurrent.ConcurrentHashMap;
<ide> import java.util.concurrent.atomic.AtomicInteger;
<ide>
<ide> import org.springframework... | 1 |
Go | Go | implement docker remove with standalone client lib | fb6533e6cf1793b653ab0ea9f12b6b6876076d97 | <ide><path>api/client/lib/container_remove.go
<add>package lib
<add>
<add>import "net/url"
<add>
<add>// ContainerRemoveOptions holds parameters to remove containers.
<add>type ContainerRemoveOptions struct {
<add> ContainerID string
<add> RemoveVolumes bool
<add> RemoveLinks bool
<add> Force bool
<add>}
<a... | 2 |
Ruby | Ruby | require the extensions to tests pass in isolation | f9433ef26023174c9dc079441eb7d388f0625f34 | <ide><path>activesupport/test/array_inquirer_test.rb
<ide> require 'abstract_unit'
<add>require 'active_support/core_ext/array'
<ide>
<ide> class ArrayInquirerTest < ActiveSupport::TestCase
<ide> def setup | 1 |
Go | Go | allow set_file_cap capability in container | 80319add5542153146fdaecd46be5549b4397beb | <ide><path>lxc_template.go
<ide> lxc.mount.entry = {{$realPath}} {{$ROOTFS}}/{{$virtualPath}} none bind,{{ if ind
<ide> # (Note: 'lxc.cap.keep' is coming soon and should replace this under the
<ide> # security principle 'deny all unless explicitly permitted', see
<ide> # http://sourceforge.net/mailarch... | 1 |
PHP | PHP | add check for valid output type | ce8bc83a2e184c84b33398fe86a3e2b07dcec789 | <ide><path>src/Console/ConsoleOutput.php
<ide> */
<ide> namespace Cake\Console;
<ide>
<add>use InvalidArgumentException;
<add>
<ide> /**
<ide> * Object wrapper for outputting information from a shell application.
<ide> * Can be connected to any stream resource that can be used with fopen()
<ide> public function get... | 2 |
Javascript | Javascript | update code style to arrow functions | f7c2f8e470d44686a2758c2debe59b86b3396c12 | <ide><path>lib/CachePlugin.js
<ide> class CachePlugin {
<ide> callback();
<ide> });
<ide> });
<del> compiler.plugin("after-compile", function(compilation, callback) {
<add> compiler.plugin("after-compile", (compilation, callback) => {
<ide> compilation.compiler._lastCompilationFileDependencies = com... | 75 |
PHP | PHP | prevent $config conflicts within config files | 5311a22735cad8ae34e42e8b4e76b03d5e928399 | <ide><path>src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
<ide> public function bootstrap(Application $app)
<ide> * @param \Illuminate\Contracts\Config\Repository $config
<ide> * @return void
<ide> */
<del> protected function loadConfigurationFiles(Application $app, RepositoryContract $co... | 1 |
Ruby | Ruby | fix bintray url for bottle uploading | 5773ca64c509094b261bdcfc43cadc9c8fd566c5 | <ide><path>Library/Homebrew/cmd/test-bot.rb
<ide> def test_ci_upload(tap)
<ide> tag = pr ? "pr-#{pr}" : "testing-#{number}"
<ide> safe_system "git", "push", "--force", remote, "master:master", ":refs/tags/#{tag}"
<ide>
<del> bintray_repo = if tap.nil?
<del> Bintray.repository(tap)
<del> else
<del> ... | 1 |
Java | Java | fix package cycle | 558d7f3f3efa4bdc03e252474bec46f62c2acb72 | <add><path>spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/HandshakeInfo.java
<del><path>spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/HandshakeInfo.java
<ide> * See the License for the specific language governing permissions and
<ide> * limitations under ... | 22 |
Go | Go | fix race condition in execcommandgc | e5e62b96ce0d4eb3934a386b07203830f55e07ce | <ide><path>daemon/exec/exec.go
<ide> func NewStore() *Store {
<ide>
<ide> // Commands returns the exec configurations in the store.
<ide> func (e *Store) Commands() map[string]*Config {
<del> return e.commands
<add> e.RLock()
<add> commands := make(map[string]*Config, len(e.commands))
<add> for id, config := range e.c... | 1 |
Text | Text | add release notes for v1.5.8 | 228754fe96ae5613bf4b419605891e3be3e3f75f | <ide><path>CHANGELOG.md
<add><a name="1.5.8"></a>
<add># 1.5.8 arbitrary-fallbacks (2016-07-22)
<add>
<add>
<add>## Bug Fixes
<add>
<add>- **$animate:** do not get affected by custom, enumerable properties on `Object.prototype`
<add> ([181e4401](https://github.com/angular/angular.js/commit/181e44019e850e5253378e29415c... | 1 |
Javascript | Javascript | allow loading pdf fonts into another document | ac723a1760b9d9c67a06fe5e007d8c9a5dd2ca7e | <ide><path>src/display/api.js
<ide> function setPDFNetworkStreamFactory(pdfNetworkStreamFactory) {
<ide> * parsed font data from the worker-thread. This may be useful for debugging
<ide> * purposes (and backwards compatibility), but note that it will lead to
<ide> * increased memory usage. The default value is... | 5 |
Ruby | Ruby | add ignorable module | 8b808308c292e7079a85460dac13d13e1db453aa | <ide><path>Library/Homebrew/debrew.rb
<ide>
<ide> require "mutex_m"
<ide> require "debrew/irb"
<del>require "warnings"
<del>Warnings.ignore(/warning: callcc is obsolete; use Fiber instead/) do
<del> require "continuation"
<del>end
<add>require "ignorable"
<ide>
<ide> # Helper module for debugging formulae.
<ide> #
<... | 2 |
Ruby | Ruby | move complex logic to it's own method | 2afd6c75f18aee67fab85efef2b970572d459db3 | <ide><path>activerecord/lib/active_record/associations/association_collection.rb
<ide> def load_target
<ide> unless loaded?
<ide> begin
<ide> if @target.is_a?(Array) && @target.any?
<del> @target = find_target.map do |f|
<del> i = @target.ind... | 1 |
Python | Python | correct lint error in mqtt exporter | dce2f6a5f6ed77ebf064bcb39a4b54c86ccad018 | <ide><path>glances/exports/glances_mqtt.py
<ide> def whitelisted(s,
<ide> for sensor, value in zip(columns, points):
<ide> try:
<ide> sensor = [whitelisted(name) for name in sensor.split('.')]
<del> topic = '/'.join([self.topic, self.hostname, name, *sensor])
<add> ... | 1 |
PHP | PHP | update docblock + tests | 74fed151b5075918c130848a8f77b91cfd0d59a0 | <ide><path>src/Routing/Router.php
<ide> public static function scope($path, $params = [], $callback = null)
<ide> * For example a path of `admin` would result in `'prefix' => 'admin'` being
<ide> * applied to all connected routes.
<ide> *
<add> * The prefix name will be inflected to the underscore ve... | 2 |
Text | Text | fix example about ps and linked containers | 0f8f04a77492ddf37ca9c163ef0c3ddaf8a93a40 | <ide><path>docs/sources/reference/commandline/cli.md
<ide> The `docker rename` command allows the container to be renamed to a different na
<ide> -s, --size=false Display total file sizes
<ide> --since="" Show created since Id or Name, include non-running.
<ide>
<del>Running `docker ps` sho... | 1 |
PHP | PHP | use \throwable instead of \exception | 1d9130c08720a30cc4a8dda99170821fd62bb6fa | <ide><path>src/Core/Exception/Exception.php
<ide> namespace Cake\Core\Exception;
<ide>
<ide> use RuntimeException;
<add>use Throwable;
<ide>
<ide> /**
<ide> * Base class that all CakePHP Exceptions extend.
<ide> class Exception extends RuntimeException
<ide> * @param string|array $message Either the string of t... | 16 |
Python | Python | correct pb if array stats are none | 522acfca352b2259a77a1b26883e390abd7c0062 | <ide><path>glances/plugins/glances_raid.py
<ide> def update(self):
<ide> # Update stats using the PyMDstat lib (https://github.com/nicolargo/pymdstat)
<ide> try:
<ide> # !!! Path ONLY for dev
<del> mds = MdStat('/home/nicolargo/dev/pymdstat/tests/mdstat.09')
<add> ... | 1 |
PHP | PHP | fix various docblocks | 79c1d50b4e53ab00a38b5c2e443fce88ee1fb528 | <ide><path>src/Illuminate/Console/AppNamespaceDetectorTrait.php
<ide> trait AppNamespaceDetectorTrait {
<ide> /**
<ide> * Get the application namespace from the Composer file.
<ide> *
<del> * @param string $namespacePath
<ide> * @return string
<add> *
<add> * @throws \RuntimeException
<ide> */
<ide> prot... | 3 |
Javascript | Javascript | replace new app template with new app screen | fe88e9e48ce99cb8b9da913051cc36575310018b | <ide><path>Libraries/NewAppScreen/components/DebugInstructions.js
<add>/**
<add> * Copyright (c) Facebook, Inc. and its affiliates.
<add> *
<add> * This source code is licensed under the MIT license found in the
<add> * LICENSE file in the root directory of this source tree.
<add> *
<add> * @flow
<add> * @format
<add> ... | 5 |
Python | Python | add comments in the code | 23a9149a8da92767b18f1e0e02de99d60e4e602f | <ide><path>keras/regularizers.py
<ide> def __call__(self, x):
<ide> if self.l1:
<ide> regularization += self.l1 * tf.reduce_sum(tf.abs(x))
<ide> if self.l2:
<add> # equivalent to "self.l2 * tf.reduce_sum(tf.square(x))"
<ide> regularization += 2.0 * self.l2 * tf.nn.l2_loss(x)
<ide> return re... | 1 |
Text | Text | move the coc text to the rails website | 90bcb6dea7f8fc8b93b4266180465fc0c0785c01 | <ide><path>CODE_OF_CONDUCT.md
<ide> # Contributor Code of Conduct
<ide>
<del>As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, subm... | 2 |
Go | Go | make "validateopts()" a method on root | e106e3f5c6edd07750f1422f84d5f3e3d16ac03e | <ide><path>volume/local/local.go
<ide> func (r *Root) Create(name string, opts map[string]string) (volume.Volume, error
<ide> if err := r.validateName(name); err != nil {
<ide> return nil, err
<ide> }
<del> if err := validateOpts(opts); err != nil {
<add> if err := r.validateOpts(opts); err != nil {
<ide> return ... | 3 |
Java | Java | fix failing test | 0f47732523865e360bfe8de4ba9ec708e0accaa0 | <ide><path>spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsThreadPoolTaskScheduler.java
<ide> public class SockJsThreadPoolTaskScheduler extends ThreadPoolTaskScheduler {
<ide>
<ide> // Check for setRemoveOnCancelPolicy method - available on JDK 7 and higher
<ide> private static ... | 1 |
Javascript | Javascript | accept texture.source/sampler=0 in gltf2loader | ebbe091bc4814762ad7da5c7676070adea0a12ad | <ide><path>examples/js/loaders/GLTF2Loader.js
<ide> THREE.GLTF2Loader = ( function () {
<ide>
<ide> return _each( json.textures, function ( texture ) {
<ide>
<del> if ( texture.source ) {
<add> if ( texture.source !== undefined ) {
<ide>
<ide> return new Promise( function ( resolve ) {
<ide>
<ide> THR... | 1 |
Text | Text | update grammer error in step 68 of project 2 | 60f6fd2f017036c85cdfdf04805c9a87c22dc87f | <ide><path>curriculum/challenges/english/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3f26fa39591db45e5cd7a0.md
<ide> dashedName: step-68
<ide>
<ide> The default properties of an `hr` element will make it appear as a thin light grey line. You can change the height of the line by specifying a v... | 1 |
Text | Text | fix typo in sequence model card | dc552b9b7025ea9c38717f30ad3d69c2a972049d | <ide><path>model_cards/facebook/rag-sequence-nq/README.md
<ide> The model can generate answers to any factoid question as follows:
<ide> ```python
<ide> from transformers import RagTokenizer, RagRetriever, RagSequenceForGeneration
<ide>
<del>tokenizer = RagTokenizer.from_pretrained("facebook/rag-token-nq")
<del>ret... | 1 |
Text | Text | release notes on non-text detail arguments. closes | 00531ec937206e7e0af949c67872c915d0752b5a | <ide><path>docs/topics/3.0-announcement.md
<ide> The default JSON renderer will return float objects for un-coerced `Decimal` ins
<ide> * The serializer `ChoiceField` does not currently display nested choices, as was the case in 2.4. This will be address as part of 3.1.
<ide> * Due to the new templated form rendering, ... | 1 |
Javascript | Javascript | update common.js path for new test layout | b08f2af34439685432c37723232edb48c10649b8 | <ide><path>test/common.js
<ide> var path = require("path");
<ide>
<ide> exports.testDir = path.dirname(__filename);
<ide> exports.fixturesDir = path.join(exports.testDir, "fixtures");
<del>exports.libDir = path.join(exports.testDir, "../../lib");
<add>exports.libDir = path.join(exports.testDir, "../lib");
<ide>
<ide>... | 1 |
Mixed | Java | add scrollwithoutanimationto to android | 3b68869fc83e9ea02ea0527cb1c32ae8df209738 | <ide><path>Libraries/Components/ScrollResponder.js
<ide> var ScrollResponderMixin = {
<ide> }
<ide> },
<ide>
<add> /**
<add> * Like `scrollResponderScrollTo` but immediately scrolls to the given
<add> * position
<add> */
<add> scrollResponderScrollWithouthAnimationTo: function(offsetX: number, offsetY: n... | 5 |
Java | Java | add header support to websocketconnectionmanager | 172a0b9f5d2b6caf5ed5e3d8cfe529c75ff145d5 | <ide><path>spring-websocket/src/main/java/org/springframework/web/socket/client/AbstractWebSocketClient.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 with the... | 7 |
Python | Python | fix lint issues | 9f21f1f91a2dd35b34f37d322f2dd2e75cc3caa3 | <ide><path>libcloud/compute/drivers/cloudstack.py
<ide> from libcloud.utils.networking import is_private_subnet
<ide>
<ide>
<del>"""
<del>Define the extra dictionary for specific resources
<del>"""
<del>
<add># Utility functions
<ide> def transform_int_or_unlimited(value):
<ide> try:
<ide> return int(valu... | 1 |
Python | Python | set rcond to precision of x as default | 658b94aa185b341ddf638ec488ac5acd8cdf28fa | <ide><path>numpy/lib/polynomial.py
<ide> import numpy.core.numeric as NX
<ide>
<ide> from numpy.core import isscalar, abs
<add>from numpy.lib.machar import MachAr
<ide> from numpy.lib.twodim_base import diag, vander
<ide> from numpy.lib.shape_base import hstack, atleast_1d
<ide> from numpy.lib.function_base import tri... | 1 |
Ruby | Ruby | update clang for 10.11 | 6a534f569d617e6323c736be4e1753fa6ad597a9 | <ide><path>Library/Homebrew/os/mac/xcode.rb
<ide> def installed?
<ide>
<ide> def latest_version
<ide> case MacOS.version
<del> when "10.11" then "700.0.53.3"
<add> when "10.11" then "700.0.57.2"
<ide> when "10.10" then "602.0.53"
<ide> when "10.9" then "600.0.57"
<ide> ... | 1 |
PHP | PHP | add ability to pass exceptions as flash message | 4fc8d4725b5537c1521f9fd365690c3438a4f657 | <ide><path>src/Controller/Component/FlashComponent.php
<ide> public function __construct(ComponentRegistry $collection, array $config = []) {
<ide> }
<ide>
<ide> public function set($message, $element = null, array $params = array(), $key = 'flash') {
<add> if ($message instanceof \Exception) {
<add> $message = $... | 2 |
Python | Python | fix eval batch size | 2fa56484b251baf1eb0245b033db0104aad29b23 | <ide><path>spacy/cli/train.py
<ide> def evaluate():
<ide>
<ide> if optimizer.averages:
<ide> with nlp.use_params(optimizer.averages):
<del> scorer = nlp.evaluate(dev_examples, batch_size=eval_batch_size)
<add> scorer = nlp.evaluate(dev_examples, batch_size=batch_size)
... | 1 |
Python | Python | remove duplicate entry | 58b7955ecbdc157e5647fdd1eba06252dacd64de | <ide><path>libcloud/compute/types.py
<ide> class Provider(Type):
<ide>
<ide> CLOUDSIGMA_US = 'cloudsigma_us'
<ide>
<del> MAXIHOST = "maxihost"
<del>
<ide> # Removed
<ide> # SLICEHOST = 'slicehost'
<ide> | 1 |
Text | Text | add changelogs for stream | a70aa589faec204cc61f19406976fa3ffe1e3bbf | <ide><path>doc/api/stream.md
<ide> file.end('world!');
<ide> ##### writable.setDefaultEncoding(encoding)
<ide> <!-- YAML
<ide> added: v0.11.15
<add>changes:
<add> - version: v6.1.0
<add> pr-url: https://github.com/nodejs/node/pull/5040
<add> description: This method now returns a reference to `writable`.
<ide> -... | 1 |
Ruby | Ruby | remove extraneous response_obj | a470bb36128cfdddd888492b7ac972ee582f6acb | <ide><path>actionpack/lib/action_controller/abstract/base.rb
<ide> def initialize(message = nil)
<ide>
<ide> class Base
<ide> attr_internal :response_body
<del> attr_internal :response_obj
<ide> attr_internal :action_name
<ide>
<ide> class << self
<ide> def action_methods
<ide>
<ide> abstract!
<... | 1 |
Python | Python | fix ticket link in test docstring | 86ea969e1154de20a53fc5b853e8340508648e98 | <ide><path>rest_framework/tests/test_serializer_nested.py
<ide> def test_create_via_foreign_key_with_source(self):
<ide> """
<ide> Check that we can both *create* and *update* into objects across
<ide> ForeignKeys that have a `source` specified.
<del> Regression test for #<ticket>
<add> ... | 1 |
Ruby | Ruby | add formula renames to report | e4480cf6bf80e8de737581f8b3ce3068334747c4 | <ide><path>Library/Homebrew/cmd/update.rb
<ide> def update
<ide> tabs.each(&:write)
<ide> end if load_tap_migrations
<ide>
<del> # Migrate installed renamed formulae from main Homebrew repository.
<del> if load_formula_renames
<del> report.select_formula(:D).each do |oldname|
<del> newname ... | 1 |
Ruby | Ruby | handle non-extent methods passed as arguments | 6017811397b7ee0797fe452309e37fb5018689a5 | <ide><path>Library/Homebrew/cmd/doctor.rb
<ide> def doctor
<ide>
<ide> first_warning = true
<ide> methods.each do |method|
<del> out = checks.send(method)
<add> begin
<add> out = checks.send(method)
<add> rescue NoMethodError
<add> Homebrew.failed = true
<add> puts "No check... | 1 |
PHP | PHP | add merge option to instanceconfig trait | 08a6faf077511393792f9b26733ab58b5f77a1f2 | <ide><path>src/Controller/Component.php
<ide> class Component extends Object implements EventListener {
<ide> public function __construct(ComponentRegistry $registry, $config = []) {
<ide> $this->_registry = $registry;
<ide>
<del> $this->config($config);
<add> $this->config($config, null, true);
<ide>
<ide> $t... | 10 |
Python | Python | remove duplicate code from perf_kit | 7d69987eddd0d5793339ccfd272bac8721d95894 | <ide><path>scripts/perf/perf_kit/sqlalchemy.py
<ide> def after_cursor_execute(self, conn, cursor, statement, parameters, context, exe
<ide> if self.display_time:
<ide> output_parts.append(f"{total:.5f}")
<ide>
<del> if self.display_time:
<del> output_parts.append(f"{total:.5f}")
<... | 1 |
Text | Text | add a dot to a note in readme.md | abae1734d85f453e0f4d56af073df8a8a276ea40 | <ide><path>packages/next/README.md
<ide> export default IndexPage
<ide>
<ide> In this case only the second `<meta name="viewport" />` is rendered.
<ide>
<del>_Note: The contents of `<head>` get cleared upon unmounting the component, so make sure each page completely defines what it needs in `<head>`, without making a... | 1 |
Text | Text | add import notes in docs. closes | a636320ff3b381a6d7d8685f1b4fba8bdd6c8b94 | <ide><path>docs/api-guide/generic-views.md
<ide> You won't typically need to override the following methods, although you might n
<ide>
<ide> The mixin classes provide the actions that are used to provide the basic view behavior. Note that the mixin classes provide action methods rather than defining the handler meth... | 1 |
Javascript | Javascript | add missing ; | dd538fe64944d8df18f970b7a23a55ca88848129 | <ide><path>src/extras/FontUtils.js
<ide> THREE.FontUtils.generateShapes = function ( text, parameters ) {
<ide> // To use the typeface.js face files, hook up the API
<ide> var typeface_js = { faces: THREE.FontUtils.faces, loadFace: THREE.FontUtils.loadFace };
<ide> if ( typeof self !== 'undefined' ){
<del> self._typefa... | 1 |
Python | Python | fix dataset creation in test | 76ba9e70c2f6669eeb84a71437cd13daa3b15bf1 | <ide><path>keras/tests/integration_test.py
<ide> class TokenClassificationIntegrationTest(test_combinations.TestCase):
<ide> """
<ide> def test_token_classification(self):
<ide> np.random.seed(1337)
<del> data = [np.random.randint(low=0, high=16, size=random.randint(4, 16)) for _ in range(100)]
<del> labe... | 1 |
Text | Text | improve testing suggestions | 76767f3d6e89e540241e973b8ffe04690a9a2ccb | <ide><path>share/doc/homebrew/Formula-Cookbook.md
<ide> The [`test do`](http://www.rubydoc.info/github/Homebrew/homebrew/master/Formula#
<ide>
<ide> We want tests that don't require any user input and test the basic functionality of the application. For example `foo build-foo input.foo` is a good test and (despite the... | 1 |
PHP | PHP | put domain in route output. closes | c9878249b8fd4b8ee0c854bb1b267f5956f2e99c | <ide><path>src/Illuminate/Foundation/Console/RoutesCommand.php
<ide> protected function getRouteInformation($name, Route $route)
<ide> $action = $route->getAction() ?: 'Closure';
<ide>
<ide> return array(
<add> 'host' => $route->getHost(),
<ide> 'uri' => $uri,
<ide> 'name' => $this->getRouteName($na... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.