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 |
|---|---|---|---|---|---|
Javascript | Javascript | remove unnecessary observability from _childviews | c3401b77840119f9014bd347756da32a801973ea | <ide><path>packages/ember-metal/lib/array.js
<ide> Ember.ArrayUtils = {
<ide> indexOf: function(obj) {
<ide> var args = Array.prototype.slice.call(arguments, 1);
<ide> return obj.indexOf ? obj.indexOf.apply(obj, args) : arrayIndexOf.apply(obj, args);
<add> },
<add>
<add> removeObject: function(array, item) ... | 5 |
Javascript | Javascript | imrove $orderby performance | 81dac70e72430b7ab9a824ab923038c1e00e7003 | <ide><path>src/Angular.js
<ide> function copy(source, destination){
<ide> while(destination.length) {
<ide> destination.pop();
<ide> }
<add> for ( var i = 0; i < source.length; i++) {
<add> destination.push(copy(source[i]));
<add> }
<ide> } else {
<ide> foreach(destination... | 2 |
Python | Python | prepare 2.1.6 release | 30c34ff6327d04b1296a66f6d463d8c7b2f1a96b | <ide><path>keras/__init__.py
<ide> from .models import Model
<ide> from .models import Sequential
<ide>
<del>__version__ = '2.1.5'
<add>__version__ = '2.1.6'
<ide><path>setup.py
<ide>
<ide>
<ide> setup(name='Keras',
<del> version='2.1.5',
<add> version='2.1.6',
<ide> description='Deep Learning for hu... | 2 |
Python | Python | run test_large_zip in a child process | 081c7230546861259bac75a316338b1c00005d5e | <ide><path>numpy/lib/tests/test_io.py
<ide> from io import BytesIO, StringIO
<ide> from datetime import datetime
<ide> import locale
<add>from multiprocessing import Process
<ide>
<ide> import numpy as np
<ide> import numpy.ma as ma
<ide> def test_unicode_and_bytes_fmt(self, fmt, iotype):
<ide> assert_equa... | 1 |
Javascript | Javascript | adjust onfinishcallback polyfill | f301c4f0631e936addcf23d827775bca9b9f5d5d | <ide><path>packages/next/client/event-source-polyfill.js
<ide> FetchTransport.prototype.open = function (xhr, onStartCallback, onProgressCallba
<ide> }).then(function(result) {
<ide> onFinishCallback()
<ide> return result
<del> })['catch'](function(error) {
<add> }, function(error) {
<ide> onFinishCallb... | 1 |
Javascript | Javascript | use flat vertex normals | a350f91896fad35ec3d1491773a3c0adb4b47734 | <ide><path>examples/js/geometries/ConvexGeometry.js
<ide> THREE.ConvexGeometry = function( vertices ) {
<ide> }
<ide>
<ide> this.computeFaceNormals();
<del> this.computeVertexNormals();
<add>
<add> // Compute flat vertex normals
<add> for ( var i = 0; i < this.faces.length; i ++ ) {
<add>
<add> var face = this.face... | 1 |
Python | Python | add basic benchmarks for numpy.pad | 1bcc8afc27653b4fb712df5d741ec78c11229bb0 | <ide><path>benchmarks/benchmarks/bench_lib.py
<add>"""Benchmarks for `numpy.lib`."""
<add>
<add>
<add>from __future__ import absolute_import, division, print_function
<add>
<add>from .common import Benchmark
<add>
<add>import numpy as np
<add>
<add>
<add>class Pad(Benchmark):
<add> """Benchmarks for `numpy.pad`."""
... | 1 |
Javascript | Javascript | add bench for fs.realpath() fix | b9832eb3fe61fcbfb6031e3dfce5eff8567a479c | <ide><path>benchmark/fs/bench-realpath.js
<add>'use strict';
<add>
<add>const common = require('../common');
<add>const fs = require('fs');
<add>const path = require('path');
<add>const resolved_path = path.resolve(__dirname, '../../lib/');
<add>const relative_path = path.relative(__dirname, '../../lib/');
<add>
<add>c... | 2 |
Javascript | Javascript | add finally method to promise flow definition | 4eccb1693580bba37368e7cfae8de41f08e3af36 | <ide><path>flow/Promise.js
<ide> declare class Promise<+R> {
<ide> static race<T>(promises: Array<Promise<T>>): Promise<T>;
<ide>
<ide> // Non-standard APIs
<add>
<add> // See https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/__forks__/Promise.native.js#L21
<add> finally<U>(
<add> onFinally?: ?(v... | 1 |
PHP | PHP | fix console options parsing with scheduler | 36e215dd39cd757a8ffc6b17794de60476b2289d | <ide><path>src/Illuminate/Console/Scheduling/Schedule.php
<ide> public function exec($command, array $parameters = [])
<ide> protected function compileParameters(array $parameters)
<ide> {
<ide> return collect($parameters)->map(function ($value, $key) {
<del> if (is_array($value) && Str::star... | 2 |
Python | Python | add huber loss function (for robust regression) | 8967d16d005decee9c382cb677b68e4eb0b9e330 | <ide><path>keras/losses.py
<ide> def hinge(y_true, y_pred):
<ide> return K.mean(K.maximum(1. - y_true * y_pred, 0.), axis=-1)
<ide>
<ide>
<add>def logcosh(y_true, y_pred):
<add> def cosh(x):
<add> return (K.exp(x) + K.exp(-x)) / 2
<add> return K.mean(K.log(cosh(y_pred - y_true)), axis=-1)
<add>
<add>... | 4 |
Javascript | Javascript | expose asobject to precompile function | edab6450f9fd5078f970471ea572271058fe1f46 | <ide><path>packages_es6/ember-handlebars-compiler/lib/main.js
<ide> EmberHandlebars.Compiler.prototype.mustache = function(mustache) {
<ide> @for Ember.Handlebars
<ide> @static
<ide> @param {String} string The template to precompile
<add> @param {Boolean} asObject optional parameter, defaulting to true, of wheth... | 2 |
PHP | PHP | fix import on phpseclib | 7f9c14c26d9b09e9f8ace204fe398f49498a1388 | <ide><path>src/Illuminate/Remote/SecLibGateway.php
<ide> <?php namespace Illuminate\Remote;
<ide>
<del>use Net_SSH2;
<add>use Net_SFTP;
<ide> use Crypt_RSA;
<ide> use Illuminate\Filesystem\Filesystem;
<ide> | 1 |
PHP | PHP | add typehints for string template | fce58bd30c61925cd26e9deb4166113f04e33131 | <ide><path>src/View/StringTemplate.php
<ide> <?php
<add>declare(strict_types=1);
<ide> /**
<ide> * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
<ide> * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<ide> public function __construct(array $config = [])
<ide> *
<ide> ... | 2 |
Go | Go | fix panic on slow log consumer | c2cf97a0747976c2307e991028dc703b2b430d80 | <ide><path>daemon/logs.go
<ide> import (
<ide> "io"
<ide> "os"
<ide> "strconv"
<add> "sync"
<ide>
<ide> log "github.com/Sirupsen/logrus"
<ide> "github.com/docker/docker/engine"
<ide> func (daemon *Daemon) ContainerLogs(job *engine.Job) engine.Status {
<ide> }
<ide> if follow && container.IsRunning() {
<ide> e... | 2 |
Python | Python | add adagrad optimizer support | 95d1b29870d7e2ae0455eebf34674f1afd10c507 | <ide><path>official/modeling/optimization/configs/optimization_config.py
<ide> class OptimizerConfig(oneof.OneOfConfig):
<ide> lamb: lamb optimizer.
<ide> rmsprop: rmsprop optimizer.
<ide> lars: lars optimizer.
<add> adagrad: adagrad optimizer.
<ide> """
<ide> type: Optional[str] = None
<ide> sgd: ... | 4 |
Javascript | Javascript | add schedulerhostconfig fork for post task | 52c51462744ac6a9437d64ae84fcd94eacbb8aa8 | <ide><path>packages/scheduler/src/forks/SchedulerHostConfig.post-task.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>
<add>import {enableIsI... | 4 |
Python | Python | implement three new algorithms (#948) | 1c9d995b9eb05f439fee5892210af3ab659f9760 | <ide><path>conversions/decimal_to_binary.py
<add>"""Convert a Decimal Number to a Binary Number."""
<add>
<add>
<add>def decimal_to_binary(num):
<add> """Convert a Decimal Number to a Binary Number."""
<add> binary = []
<add> while num > 0:
<add> binary.insert(0, num % 2)
<add> num >>= 1
<add> ... | 3 |
Ruby | Ruby | fix rubocop warnings | d9b8d0f6b11a7928dd997efb8905a9019ec6a6e9 | <ide><path>Library/Homebrew/cmd/help.rb
<del>HOMEBREW_HELP = <<-EOS
<add>HOMEBREW_HELP = <<-EOS.freeze
<ide> Example usage:
<ide> brew search [TEXT|/REGEX/]
<ide> brew (info|home|options) [FORMULA...]
<ide> def command_help(path)
<ide> HOMEBREW_HELP
<ide> else
<ide> help_lines.map do |line|
<del> ... | 1 |
Text | Text | release notes for 1.2.9 | 9f5d0cf79ff14cc67897b0f7869ba137afd426b2 | <ide><path>CHANGELOG.md
<add><a name="1.2.9"></a>
<add># 1.2.9 enchanted-articulacy (2014-01-15)
<add>
<add>
<add>## Bug Fixes
<add>
<add>- **$animate:**
<add> - ensure the final closing timeout respects staggering animations
<add> ([ed53100a](https://github.com/angular/angular.js/commit/ed53100a0dbc9119d5dfc8b724884... | 1 |
Text | Text | tidy some addons.md text | bdfc59893d4d797c1fd2e22349faf96cf57fd067 | <ide><path>doc/api/addons.md
<ide> void AddEnvironmentCleanupHook(v8::Isolate* isolate,
<ide> ```
<ide>
<ide> This function adds a hook that will run before a given Node.js instance shuts
<del>down. If necessary, such hooks can be removed using
<del>`RemoveEnvironmentCleanupHook()` before they are run, which has the s... | 1 |
Javascript | Javascript | add custom names to ember.namespace | a511b094fc720f5ba4c612c3dff610f3dc39d231 | <ide><path>packages/ember-runtime/lib/system/namespace.js
<ide> require('ember-runtime/system/object');
<ide> @submodule ember-runtime
<ide> */
<ide>
<del>var indexOf = Ember.ArrayPolyfills.indexOf;
<add>var get = Ember.get, indexOf = Ember.ArrayPolyfills.indexOf;
<ide>
<ide> /**
<ide> A Namespace is an object usua... | 2 |
Ruby | Ruby | fix syntax error with rdoc directive, | 06e1881fd3c1a2c96d24ec92ea8449305b89334a | <ide><path>activesupport/lib/active_support/duration.rb
<ide> def as_json(options = nil) #:nodoc:
<ide> to_i
<ide> end
<ide>
<del> def respond_to_missing?(method, include_private=false) #:nodoc
<add> def respond_to_missing?(method, include_private=false) #:nodoc:
<ide> @value.respond_to?(method, ... | 1 |
Text | Text | fix broken links in chinese challenges | 02eff252b57e3d2ecbb231c2eb3f7e6a83c7971c | <ide><path>curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.chinese.md
<ide> localeTitle: 具有返回值的分配
<ide> ---
<ide>
<ide> ## Description
<del><section id="description">如果您从我们对<a href="javascript-algorithms-and-data-structures/basic-javascript/s... | 5 |
PHP | PHP | add pdo try again as lost connection message | 2ad79ca851d5bd6578957c506b3e9eace6d987c7 | <ide><path>src/Illuminate/Database/DetectsLostConnections.php
<ide> protected function causedByLostConnection(Throwable $e)
<ide> 'Connection refused',
<ide> 'running with the --read-only option so it cannot execute this statement',
<ide> 'The connection is broken and recovery is not... | 1 |
Python | Python | remove unnecessary example | 0202da0271de4c7367ae5556691ed1d7719147d4 | <ide><path>examples/run_gpt2_generate_unconditional_samples.py
<del>#!/usr/bin/env python3
<del>
<del>import argparse
<del>import logging
<del>
<del>import torch
<del>import torch.nn.functional as F
<del>import numpy as np
<del>from tqdm import trange
<del>
<del>from pytorch_pretrained_bert import GPT2LMHeadModel, GPT2... | 1 |
Javascript | Javascript | improve performance of applymaskimagedata | 687c9a871033de00657b6f64f429f921ad0dd10f | <ide><path>src/shared/image_utils.js
<ide> * limitations under the License.
<ide> */
<ide>
<add>import { FeatureTest } from "./util.js";
<add>
<ide> function applyMaskImageData({
<ide> src,
<ide> srcPos = 0,
<ide> dest,
<del> destPos = 3,
<add> destPos = 0,
<ide> width,
<ide> height,
<ide> inverseDecod... | 1 |
Ruby | Ruby | use sha256 for resources | edf205f5ca025254a286db4d057fe9badbf6baf0 | <ide><path>Library/Homebrew/cmd/aspell-dictionaries.rb
<ide> def aspell_dictionaries
<ide> resource "#{r.name}" do
<ide> url "#{r.url}"
<ide> mirror "#{r.mirrors.first}"
<del> sha1 "#{r.cached_download.sha1}"
<add> sha256 "#{r.cached_download.sha256}"
<ide> end
<ide... | 1 |
Python | Python | add type annotations for aws operators and hooks | 0823d46a7f267f2e45195a175021825367938add | <ide><path>airflow/providers/amazon/aws/hooks/base_aws.py
<ide> from typing import Any, Dict, Optional, Tuple, Union
<ide>
<ide> import boto3
<add>from botocore.credentials import ReadOnlyCredentials
<ide> from botocore.config import Config
<ide> from cached_property import cached_property
<ide>
<ide> def get_session... | 15 |
Python | Python | fix password support in rimuhosting | 88209800186f07941069d2ea15dab7f8c489986f | <ide><path>libcloud/drivers/rimuhosting.py
<ide> def create_node(self, **kwargs):
<ide>
<ide> if kwargs.has_key('auth'):
<ide> auth = kwargs['auth']
<del> if isinstance(auth, NodeAuthPassword):
<del> password = auth.password
<del> else:
<add> if not i... | 1 |
Python | Python | improve documentation of common_type | 1a45aef27b5b47640e45394b753e51293a543457 | <ide><path>numpy/lib/type_check.py
<ide> def common_type(*arrays):
<ide> an integer array, the minimum precision type that is returned is a
<ide> 64-bit floating point dtype.
<ide>
<del> All input arrays can be safely cast to the returned dtype without loss
<del> of information.
<add> All input arrays... | 1 |
PHP | PHP | remove duplicate test | 0b236600896eb2d9162f4b48234df714cb8c9fd4 | <ide><path>tests/TestCase/View/Helper/PaginatorHelperTest.php
<ide> public function testNumbersModulus()
<ide> ];
<ide> $this->assertHtml($expected, $result);
<ide>
<del> $result = $this->Paginator->numbers(['first' => 2, 'modulus' => 2, 'last' => 2]);
<del> $expected = [
<del> ... | 1 |
Javascript | Javascript | make a note of values considered to be falsy | e591ddcb30a2cfd9dedcc7cfbd38db29725c4780 | <ide><path>src/ng/directive/ngShowHide.js
<ide> *
<ide> * Just remember to include the important flag so the CSS override will function.
<ide> *
<add> * <div class="alert alert-warning">
<add> * **Note:** Here is a list of values that ngShow will consider as a falsy value (case insensitive):<br />
<add> * "f" / "0" ... | 1 |
Python | Python | remove client credentials from all oauth 2 tests | 8ec60a22e1c14792b7021ff9b4e940e16528788a | <ide><path>rest_framework/tests/authentication.py
<ide> def setUp(self):
<ide> def _create_authorization_header(self, token=None):
<ide> return "Bearer {0}".format(token or self.access_token.token)
<ide>
<del> def _client_credentials_params(self):
<del> return {'client_id': self.CLIENT_ID, 'clien... | 1 |
PHP | PHP | correct variable mismatch | 055cc92b1af2d19348e171580f4918fe1fe5c50a | <ide><path>src/Console/ShellDispatcher.php
<ide> protected function _dispatch() {
<ide> * This permits a plugin which implements a shell of the same name to be accessed
<ide> * Using the shell name alone
<ide> *
<del> * @return void
<add> * @return array the resultant list of aliases
<ide> */
<ide> public function... | 2 |
Javascript | Javascript | add junit config for testacular | a5d434d857f9059fe277e348fe9876d62ca38a18 | <ide><path>testacular-e2e.conf.js
<ide> proxies = {
<ide> '/angular': 'http://localhost:8000/build/angular',
<ide> '/': 'http://localhost:8000/build/docs/'
<ide> };
<add>
<add>junitReporter = {
<add> outputFile: 'test_out/e2e.xml',
<add> suite: 'E2E'
<add>};
<ide><path>testacular-jqlite.conf.js
<ide> exclude = ['... | 4 |
Javascript | Javascript | ensure two newlines between specs | 210c18418469e9e74a16f1627a265d4f3d6b47cc | <ide><path>test/ng/directive/ngOptionsSpec.js
<ide> describe('ngOptions', function() {
<ide> expect(options.eq(2)).toEqualOption(scope.values[2], 'D');
<ide> });
<ide>
<add>
<ide> it('should preserve pre-existing empty option', function() {
<ide> createSingleSelect(true);
<ide>
<ide> describe('ngOptions',... | 1 |
Ruby | Ruby | remove patch checks from audit | b2eafdf11d1bec99479e9a097f68cf5be31c2146 | <ide><path>Library/Homebrew/dev-cmd/audit.rb
<ide> def without_patch
<ide> @text.split("\n__END__").first
<ide> end
<ide>
<del> def data?
<del> /^[^#]*\bDATA\b/ =~ @text
<del> end
<del>
<del> def end?
<del> /^__END__$/ =~ @text
<del> end
<del>
<ide> def trailing_newline?
<ide> ... | 2 |
Javascript | Javascript | create time service | fa4c7b7f1d885eb9746166e268c9f7511ea39676 | <ide><path>angularFiles.js
<ide> var angularFiles = {
<ide> 'src/ng/sniffer.js',
<ide> 'src/ng/templateRequest.js',
<ide> 'src/ng/testability.js',
<add> 'src/ng/date.js',
<ide> 'src/ng/timeout.js',
<ide> 'src/ng/urlUtils.js',
<ide> 'src/ng/window.js',
<ide><path>src/AngularPublic.js
<ide> $... | 4 |
Go | Go | handle cleanup dns for attachable container | 1732ab426d59fda07154c2bb0c394cea860d372c | <ide><path>libnetwork/controller.go
<ide> func (c *controller) clusterAgentInit() {
<ide> // should still be present when cleaning up
<ide> // service bindings
<ide> c.agentClose()
<add> c.cleanupServiceDiscovery("")
<ide> c.cleanupServiceBindings("")
<ide>
<ide> c.agentStopComplete()
<ide><path>libne... | 4 |
PHP | PHP | remove unnecessary variable | 72deea318efb2886ee589654b584be8500977eb1 | <ide><path>src/Illuminate/Auth/GenericUser.php
<ide> public function getAuthIdentifierName()
<ide> */
<ide> public function getAuthIdentifier()
<ide> {
<del> $name = $this->getAuthIdentifierName();
<del>
<del> return $this->attributes[$name];
<add> return $this->attributes[$this->getAu... | 1 |
Java | Java | fix bug in timer clean up | 06e52f8e8c86f7f79ac03717a62b5c76d3ad8ad5 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/modules/core/Timing.java
<ide> public void doFrame(long frameTimeNanos) {
<ide> timer.mTargetTime = frameTimeMillis + timer.mInterval;
<ide> mTimers.add(timer);
<ide> } else {
<del> mTimerIdsToTimers.remove(timer.mExec... | 1 |
Javascript | Javascript | improve error for nested render calls | 382be4e9e99e523f2e42dc1734e8a97a56e2b1e4 | <ide><path>src/core/ReactCompositeComponent.js
<ide> var ReactCompositeComponentMixin = {
<ide> 'ReactCompositeComponent',
<ide> '_renderValidatedComponent',
<ide> function() {
<add> // We set ReactCurrentOwner.current back to null at the end of this
<add> // function, so it should be null right n... | 2 |
Python | Python | fix keras trivial model 1 gpu test | 8e7051a8c1c4069f004a072362b173e70a8e260a | <ide><path>official/resnet/keras/keras_imagenet_benchmark.py
<ide> def benchmark_graph_1_gpu(self):
<ide> """Test trivial Keras model (input pipeline) with 1 GPU."""
<ide> self._setup()
<ide>
<del> FLAGS.num_gpus = 8
<add> FLAGS.num_gpus = 1
<ide> FLAGS.enable_eager = False
<ide> FLAGS.model_dir ... | 1 |
Javascript | Javascript | send custom events in ember.runloadhooks | a7bee11b5e358548d20bf842589e8515fea96b71 | <ide><path>packages/ember-runtime/lib/system/lazy_load.js
<add>/*globals CustomEvent */
<add>
<ide> var forEach = Ember.ArrayPolyfills.forEach;
<ide>
<ide> /**
<ide> Ember.onLoad = function(name, callback) {
<ide> Ember.runLoadHooks = function(name, object) {
<ide> loaded[name] = object;
<ide>
<add> if (typeof win... | 2 |
Python | Python | set refresh rate for global cpu percent | 960dea5479ddda6ad888191dca8f5227fd47986c | <ide><path>glances/cpu_percent.py
<ide> def __init__(self, cached_time=1):
<ide>
<ide> # cached_time is the minimum time interval between stats updates
<ide> # since last update is passed (will retrieve old cached info instead)
<del> self.cached_time = 0
<add> self.cached_time = 1
<ide> ... | 1 |
Python | Python | fix issue 715 | 34e3f4966dcbd14094e00b11f6379f5c13a7c6c1 | <ide><path>numpy/distutils/interactive.py
<ide> def interactive_sys_argv(argv):
<ide> while 1:
<ide> show_tasks(argv,c_compiler_name, f_compiler_name)
<ide> try:
<del> task = raw_input('Choose a task (^D to quit, Enter to continue with setup): ').lower()
<add> task = raw_input(... | 1 |
Python | Python | fix indentation error | c7737e63883e9ca4392f372d5a55978ed99dc23e | <ide><path>numpy/lib/function_base.py
<ide> def _get_nargs(obj):
<ide> ndefaults = 0
<ide> if isinstance(obj, types.MethodType):
<ide> nargs -= 1
<del> return nargs, ndefaults
<add> return nargs, ndefaults
<ide> terr = re.compile(r'.*? takes exactly (?P<exargs>\d+) ... | 1 |
Text | Text | replace github -> github (spanish) | 4101d5c73e37d05b28d403a42204fcb28f32330b | <ide><path>curriculum/challenges/spanish/06-information-security-and-quality-assurance/advanced-node-and-express/authentication-strategies.spanish.md
<ide> localeTitle: Estrategias de autenticación
<ide> ---
<ide>
<ide> ## Description
<del><section id="description"> Como recordatorio, este proyecto se está construyend... | 43 |
Ruby | Ruby | remove unnecessary send | 7568f31650e3d3a090f720589b7fad7bae884741 | <ide><path>railties/test/application/configuration_test.rb
<ide> def index
<ide> require "mail"
<ide> _ = ActionMailer::Base
<ide>
<del> assert_equal [::MyMailInterceptor], ::Mail.send(:class_variable_get, "@@delivery_interceptors")
<add> assert_equal [::MyMailInterceptor], ::Mail.class_variable_... | 1 |
Ruby | Ruby | remove use of forwardable from externalpatch | 251bd707a25cc81fbe54052f4d48134e1b19ea37 | <ide><path>Library/Homebrew/patch.rb
<ide> require 'resource'
<ide> require 'stringio'
<ide> require 'erb'
<del>require 'forwardable'
<ide>
<ide> class Patch
<ide> def self.create(strip, io=nil, &block)
<ide> def inspect
<ide> end
<ide>
<ide> class ExternalPatch < Patch
<del> extend Forwardable
<del>
<ide> attr_... | 1 |
Ruby | Ruby | capture block so content won't leak | ee82ce78296a6ed9c882ca6e0560cbbffe701824 | <ide><path>actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
<ide> def check_box(extra_html_options={})
<ide> end
<ide> end
<ide>
<del> def render
<add> def render(&block)
<ide> rendered_collection = render_collection do |item, value, text, default_html_options... | 3 |
Ruby | Ruby | fix forbidden license check | 42d75c2787e3e68d81b23865a67111c48a670d9e | <ide><path>Library/Homebrew/formula_installer.rb
<ide> def puts_requirement_messages
<ide> end
<ide>
<ide> def forbidden_license_check
<del> forbidden_licenses = Homebrew::EnvConfig.forbidden_licenses.dup
<add> forbidden_licenses = Homebrew::EnvConfig.forbidden_licenses.to_s.dup
<ide> SPDX::ALLOWED_LICEN... | 1 |
Javascript | Javascript | fix single select incorrectly updating | 7d699f40638927375174746bd5e24abff0043512 | <ide><path>src/renderers/dom/client/wrappers/ReactDOMSelect.js
<ide> function updateOptionsIfPendingUpdateAndMounted() {
<ide> var value = LinkedValueUtils.getValue(props);
<ide>
<ide> if (value != null) {
<del> updateOptions(this, props, value);
<add> updateOptions(this, Boolean(props.multiple), val... | 2 |
Text | Text | remove block argument from callback example | ef77d40649b04dff4c935418ef2782c131fc7ef6 | <ide><path>guides/source/active_record_callbacks.md
<ide> The macro-style class methods can also receive a block. Consider using this styl
<ide> class User < ActiveRecord::Base
<ide> validates :login, :email, presence: true
<ide>
<del> before_create do |user|
<del> user.name = user.login.capitalize if user.name.... | 1 |
Mixed | Go | remove use of deprecated client.newenvclient() | c8ff5ecc091278520a890ce58ed891ec354bf6d9 | <ide><path>client/README.md
<ide> import (
<ide> )
<ide>
<ide> func main() {
<del> cli, err := client.NewEnvClient()
<add> cli, err := client.NewClientWithOpts(client.FromEnv)
<ide> if err != nil {
<ide> panic(err)
<ide> }
<ide><path>client/client.go
<ide> For example, to list running containers (the equivalent of... | 26 |
Python | Python | use basestring (py3 compatible) | d4f7ac10a6aa531600c0b2e3757696e1a6910fac | <ide><path>airflow/configuration.py
<ide> from future import standard_library
<ide> standard_library.install_aliases()
<add>from past.builtins import basestring
<ide> from builtins import str
<ide> from configparser import ConfigParser
<ide> import errno
<ide> def expand_env_var(env_var):
<ide> `expandvars` and `ex... | 1 |
Go | Go | extract volume bind, creation and external methods | 40fe9f581bd56bbcab9f231763cfac20e659d8c3 | <ide><path>container.go
<ide> func (container *Container) Start() (err error) {
<ide> log.Printf("WARNING: IPv4 forwarding is disabled. Networking will not work")
<ide> }
<ide>
<del> // Create the requested bind mounts
<del> binds := make(map[string]BindMap)
<del> // Define illegal container destinations
<del> ille... | 1 |
PHP | PHP | apply fixes from styleci | d9ea96e554abc6db534b0454a77dc063123256aa | <ide><path>src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php
<ide>
<ide> namespace Illuminate\Database\Eloquent;
<ide>
<del>use Illuminate\Database\Eloquent\Builder;
<del>
<ide> /**
<ide> * @mixin \Illuminate\Database\Eloquent\Builder
<ide> */ | 1 |
Mixed | Javascript | combine similar error codes | d022cb1bdd20f10483cbe988a950548df2dfd48c | <ide><path>doc/api/errors.md
<ide> An operation caused an out-of-memory condition.
<ide> <a id="ERR_OUT_OF_RANGE"></a>
<ide> ### ERR_OUT_OF_RANGE
<ide>
<del>An input argument value was outside an acceptable range.
<add>A given value is out of the accepted range.
<ide>
<ide> <a id="ERR_PARSE_HISTORY_DATA"></a>
<ide> #... | 17 |
Javascript | Javascript | add minimal test for net benchmarks | 0d000ca51f4c274a4786f28019032eca9b74146f | <ide><path>test/sequential/test-benchmark-net.js
<add>'use strict';
<add>
<add>require('../common');
<add>
<add>// Minimal test for net benchmarks. This makes sure the benchmarks aren't
<add>// horribly broken but nothing more than that.
<add>
<add>// Because the net benchmarks use hardcoded ports, this should be in se... | 1 |
Text | Text | add skyscanner to companies list | d4703f0f1dab11d9c510b4ac757e774031ce1da6 | <ide><path>README.md
<ide> Currently **officially** using Airflow:
<ide> 1. [Shopkick](https://shopkick.com/) [[@shopkick](https://github.com/shopkick)]
<ide> 1. [Sidecar](https://hello.getsidecar.com/) [[@getsidecar](https://github.com/getsidecar)]
<ide> 1. [SimilarWeb](https://www.similarweb.com/) [[@similarweb](http... | 1 |
Python | Python | add type check to axis | a253a9d67f95db27f1dbf74284fb6fdad2353b43 | <ide><path>keras/losses.py
<ide> from tensorflow.python.util import dispatch
<ide> from tensorflow.python.util.tf_export import keras_export
<ide> from tensorflow.tools.docs import doc_controls
<add>from tensorflow.python.ops import check_ops
<ide>
<ide>
<ide> @keras_export('keras.losses.Loss')
<ide> def categorical_... | 1 |
Python | Python | correct some pep8 issues | 833d388bc17ef10cf99368716e705c9d43b1958b | <ide><path>glances/plugins/glances_processlist.py
<ide> def get_process_curses_data(self, p, first, args):
<ide> msg = '{:>6.1f}'.format(p['cpu_percent'])
<ide> alert = self.get_alert(p['cpu_percent'],
<ide> highlight_zero=False,
<del> ... | 1 |
Text | Text | fix typo in run.md documentation | 4a20252137902100a8a01dd86c698e49dc00e8b2 | <ide><path>docs/reference/commandline/run.md
<ide> Options:
<ide> -w, --workdir string Working directory inside the container
<ide> ```
<ide>
<del>## Descriptino
<add>## Description
<ide>
<ide> The `docker run` command first `creates` a writeable container layer over the
<ide> specified image, and then... | 1 |
Python | Python | add test_connection method to aws hook | 210549c658c96ad0129609f50a46e40eebfdaa23 | <ide><path>airflow/providers/amazon/aws/hooks/base_aws.py
<ide>
<ide> import configparser
<ide> import datetime
<add>import json
<ide> import logging
<ide> import warnings
<ide> from functools import wraps
<ide> def __init__(
<ide> self.region_name = region_name
<ide> self.config = config
<ide>
<del> ... | 2 |
PHP | PHP | remove config and clear auth type on disconnection | 051f28d5f9be8035a27f1297e87e0f2bd16591ec | <ide><path>src/Mailer/Transport/SmtpTransport.php
<ide> class SmtpTransport extends AbstractTransport
<ide> 'client' => null,
<ide> 'tls' => false,
<ide> 'keepAlive' => false,
<del> 'authType' => null,
<ide> ];
<ide>
<ide> /**
<ide> class SmtpTransport extends AbstractTransport
<... | 1 |
Ruby | Ruby | add missing methods | 30bbb93f2189be88c799bfdb257216909bcd3fde | <ide><path>Library/Homebrew/tab.rb
<ide> def build_32_bit?
<ide> include?("32-bit")
<ide> end
<ide>
<add> def head?
<add> spec == :head
<add> end
<add>
<add> def devel?
<add> spec == :devel
<add> end
<add>
<add> def stable?
<add> spec == :stable
<add> end
<add>
<ide> def used_options
<ide> O... | 1 |
Go | Go | reuse same code for setting pipes in run/exec | ade8146aa82baa88bacdcf2d9c2559e8f47d71e4 | <ide><path>daemon/execdriver/native/driver.go
<ide> func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
<ide> return execdriver.ExitStatus{ExitCode: -1}, err
<ide> }
<ide>
<del> var term execdriver.Terminal
<del>
<ide> p := &libcontainer.Process{
<ide> Args: append([]string{c.Process... | 4 |
Ruby | Ruby | parse float value only once in number helpers | ef3e696d1fbfde7a77592bc1fd24586a214c505d | <ide><path>actionpack/lib/action_view/helpers/number_helper.rb
<ide> require 'active_support/core_ext/numeric'
<ide> require 'active_support/core_ext/string/output_safety'
<ide> require 'active_support/number_helper'
<del>require 'erb'
<ide>
<ide> module ActionView
<ide> # = Action View Number Helpers
<ide> def numb... | 1 |
Ruby | Ruby | move env access to the request object | de59e6ebad0cc829e60e2444f03230aef8228980 | <ide><path>actionpack/lib/action_controller/metal/request_forgery_protection.rb
<ide> def exists?
<ide>
<ide> class NullCookieJar < ActionDispatch::Cookies::CookieJar #:nodoc:
<ide> def self.build(request)
<del> key_generator = request.env[ActionDispatch::Cookies::GENERATOR_KEY]
<add> ... | 3 |
Java | Java | fix broken javadoc related to `<` and `>` | 2defb6555ea1bb0db84a04836674ce9b2fdcad7f | <ide><path>spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java
<ide> /**
<ide> * {@link org.springframework.beans.factory.parsing.ComponentDefinition}
<ide> * that bridges the gap between the advisor bean definition configured
<del> * by the {@code <aop:advisor>} tag and the ... | 24 |
Python | Python | replace typecodes with dtypes | 02926b0b6c030ec3cbf46eb37227d111c6da0ea8 | <ide><path>numpy/lib/getlimits.py
<ide> def __new__(cls, dtype):
<ide>
<ide> def _init(self, dtype):
<ide> self.dtype = dtype
<del> if dtype is numeric.float_:
<del> machar = MachAr(lambda v:array([v],'d'),
<del> lambda v:_frz(v.astype('i'))[0],
<del> ... | 1 |
PHP | PHP | add limit parameter to page() | aa72c19a8ff70e33481a8bad0f82876bea97b8c5 | <ide><path>src/Database/Query.php
<ide> public function orHaving($conditions, $types = []) {
<ide> * Pages should start at 1.
<ide> *
<ide> * @param int $num The page number you want.
<add> * @param int $limit The number of rows you want in the page. If null
<add> * the current limit clause will be used.
<ide> * @... | 2 |
Text | Text | allow flex inside media queries when testing | 6737d42aced5cd8537be128e7002521591fad024 | <ide><path>curriculum/challenges/english/01-responsive-web-design/responsive-web-design-projects/build-a-product-landing-page.md
<ide> assert(cssCheck.length > 0 || htmlSourceAttr.length > 0);
<ide> Your Product Landing Page should use CSS Flexbox at least once.
<ide>
<ide> ```js
<add>const hasFlex = (rule) => ["flex"... | 2 |
Text | Text | add anchor link for --preserve-symlinks | aa7167ff3b86b424aa012259087ea0ae52a59e21 | <ide><path>doc/api/cli.md
<ide> however, for backward compatibility with older Node.js versions.
<ide> `--preserve-symlinks` when it is not desirable to follow symlinks before
<ide> resolving relative paths.
<ide>
<del>See `--preserve-symlinks` for more information.
<add>See [`--preserve-symlinks`][] for more informat... | 1 |
Text | Text | add link to the "card" class for bootstrap 4 | a65603cfc070cb6c7c799f3a0de62ec71d73ccad | <ide><path>guide/english/bootstrap/panels/index.md
<ide> This is a set of examples that shows each type of panel. The CSS Class is displa
<ide> ### More Information
<ide>
<ide> - [Bootstrap dropdown documentation](https://getbootstrap.com/docs/4.0/components/dropdowns/)
<add>- [Panels have been replaced with the "card... | 1 |
Text | Text | add estliberitas to collaborators | c7066fb853c58b4eaee2dcb2e633541bb1189aa6 | <ide><path>README.md
<ide> information about the governance of the Node.js project, see
<ide> * [calvinmetcalf](https://github.com/calvinmetcalf) - **Calvin Metcalf** <calvin.metcalf@gmail.com>
<ide> * [claudiorodriguez](https://github.com/claudiorodriguez) - **Claudio Rodriguez** <cjrodr@yahoo.com>
<ide> *... | 1 |
Python | Python | add documentation on ssh client classes | 45585fc605b8ec2dfe368284cabb5050eff100fd | <ide><path>libcloud/ssh.py
<ide> from os.path import split as psplit
<ide>
<ide> class BaseSSHClient(object):
<add> """
<add> Base class representing a connection over SSH/SCP to a remote node.
<add> """
<add>
<ide> def __init__(self, hostname, port=22, username='root', password=None, key=None):
<add> ... | 1 |
Text | Text | move docs tooling from jsx in depth | ca95c8c3a3ceda04da3fb7ba6070d54272ffcccb | <ide><path>docs/docs/02.1-jsx-in-depth.md
<ide> It's easy to add comments within your JSX; they're just JS expressions:
<ide> var content = <Container>{/* this is a comment */}<Nav /></Container>;
<ide> ```
<ide>
<del>## Tooling
<del>
<del>Beyond the compilation step, JSX does not require any special tools.
<del>
<del... | 2 |
Python | Python | fix np.__dir__ to correctly handle new properties | 035ef5ac3ca52b9f14ea3effe739c6aaca9411bc | <ide><path>numpy/__init__.py
<ide> def __getattr__(attr):
<ide> "{!r}".format(__name__, attr))
<ide>
<ide> def __dir__():
<del> return __all__ + ['Tester', 'testing']
<add> return list(globals().keys()) + ['Tester', 'testing']
<ide>
<ide> else:
<i... | 1 |
Text | Text | add gittip link | 220c6fade13b159581a98ba5fcaab380c08f275a | <ide><path>README.md
<ide> License
<ide> -------
<ide> Code is under the [BSD 2 Clause (NetBSD) license][license].
<ide>
<add>Donations
<add>---------
<add>We accept tips through [Gittip][tip].
<add>
<add>[](https://www.gittip.com/Homebrew/)
<add>
<ide> [home]:http:/... | 1 |
Python | Python | fix tests maybe? | 0a108b3fb2b53a95cba0fc359171594ae1d43f61 | <ide><path>keras/utils/test_utils.py
<ide> import numpy as np
<ide> from numpy.testing import assert_allclose
<ide> import inspect
<add>import functools
<ide>
<ide> from ..engine import Model, Input
<ide> from ..models import Sequential, model_from_json
<ide> def layer_test(layer_cls, kwargs={}, input_shape=None, inpu... | 1 |
Go | Go | add a test for expose a invalid port | 34b7c10e3eed8bd4d71b998d06ca10766ce4c754 | <ide><path>integration-cli/docker_cli_run_test.go
<ide> func TestRunAllowPortRangeThroughExpose(t *testing.T) {
<ide> logDone("run - allow port range through --expose flag")
<ide> }
<ide>
<add>// test docker run expose a invalid port
<add>func TestRunExposePort(t *testing.T) {
<add> runCmd := exec.Command(dockerBinar... | 1 |
Python | Python | read image data as binary | 5d854ddcb2bf317aff14fd43ce59f4d2cefcc9e9 | <ide><path>research/compression/image_encoder/encoder.py
<ide> def main(_):
<ide> print('\n--iteration must be between 0 and 15 inclusive.\n')
<ide> return
<ide>
<del> with tf.gfile.FastGFile(FLAGS.input_image) as input_image:
<add> with tf.gfile.FastGFile(FLAGS.input_image, 'rb') as input_image:
<ide> i... | 1 |
Javascript | Javascript | reinforce the typing at api boundary | 8ac35c8a0e31a0d5d384e18fc07fc09fd9bcd4e1 | <ide><path>packager/react-packager.js
<ide> const Logger = require('./src/Logger');
<ide> const debug = require('debug');
<ide> const invariant = require('fbjs/lib/invariant');
<ide>
<add>import type Server from './src/Server';
<ide> import type GlobalTransformCache from './src/lib/GlobalTransformCache';
<ide> import ... | 1 |
Ruby | Ruby | add websocket uri support to csp dsl mappings | 01d857b09ae22174d5101a03b424829a876cc4bd | <ide><path>actionpack/lib/action_dispatch/http/content_security_policy.rb
<ide> def generate_content_security_policy_nonce
<ide> blob: "blob:",
<ide> filesystem: "filesystem:",
<ide> report_sample: "'report-sample'",
<del> strict_dynamic: "'strict-dynamic'"
<add> strict_dynami... | 2 |
Text | Text | edit two errors in docs | d7e6ef0f88242db091e1aab0fc2200350a343c1e | <ide><path>docs/docs/forms.md
<ide> id: forms
<ide> title: Forms
<ide> permalink: docs/forms.html
<del>prev: state-and-lifecycle.html
<add>prev: lists-and-keys.html
<ide> next: lifting-state-up.html
<ide> redirect_from:
<ide> - "tips/controlled-input-null-value.html"
<ide><path>docs/docs/lifting-state-up.md
<ide> id:... | 2 |
Javascript | Javascript | avoid recompilation of closure | 21b24401768aa111142522fd56a49f8de805fd74 | <ide><path>lib/fs.js
<ide> fs.realpathSync = function realpathSync(p, options) {
<ide> // the partial path scanned in the previous round, with slash
<ide> var previous;
<ide>
<del> start();
<add> // Skip over roots
<add> var m = splitRootRe.exec(p);
<add> pos = m[0].length;
<add> current = m[0];
<add> base =... | 1 |
Ruby | Ruby | fix frozen objects | 9eedb1e2ca85b123ca69c11a787687476fb594b8 | <ide><path>Library/Homebrew/test/system_command_result_spec.rb
<ide>
<ide> context "when verbose" do
<ide> before do
<del> allow(Homebrew.args).to receive(:verbose?).and_return(true)
<add> allow(Homebrew).to receive(:args).and_return(OpenStruct.new("verbose?" => true))
<ide> end... | 1 |
Javascript | Javascript | add ignore to multichild test | 46bcd7fdf2ba7a9e7813398ddc1d835ab05b2736 | <ide><path>src/renderers/__tests__/ReactMultiChildText-test.js
<ide> var expectChildren = function(container, children) {
<ide> describe('ReactMultiChildText', () => {
<ide> it('should correctly handle all possible children for render and update', () => {
<ide> spyOn(console, 'error');
<add> // prettier-ignore... | 1 |
Go | Go | enable `docker search` on private docker registry | cc3e94b9babc21e3505511fa6d02725dfc199be4 | <ide><path>registry/service.go
<ide> func (s *Service) Search(job *engine.Job) engine.Status {
<ide> job.GetenvJson("authConfig", authConfig)
<ide> job.GetenvJson("metaHeaders", metaHeaders)
<ide>
<del> r, err := NewRegistry(authConfig, HTTPRequestFactory(metaHeaders), IndexServerAddress(), true)
<add> hostname, ter... | 1 |
PHP | PHP | apply fixes from styleci | 891c0140f33a42eafeaa34477243782de325c52e | <ide><path>src/Illuminate/Database/Console/PruneCommand.php
<ide> protected function models()
<ide> }
<ide>
<ide> if (! empty($models) && ! empty($except = $this->option('except'))) {
<del> throw new InvalidArgumentException("The --models and --except options cannot be combined.");
<add> ... | 1 |
Javascript | Javascript | convert the password prompt to es6 syntax | e3796f6f416c70cd72a57ebbd4ec8882232df3ef | <ide><path>web/password_prompt.js
<ide> import { PasswordResponses } from './pdfjs';
<ide> * entry.
<ide> */
<ide>
<del>/**
<del> * @class
<del> */
<del>var PasswordPrompt = (function PasswordPromptClosure() {
<add>class PasswordPrompt {
<ide> /**
<del> * @constructs ... | 1 |
PHP | PHP | fix exception in tests | 774e5cf990caee75cec678b655d009f811d92ed6 | <ide><path>tests/Database/DatabaseEloquentBuilderTest.php
<ide> public function testGetRelationProperlySetsNestedRelationshipsWithSimilarNames()
<ide>
<ide> /**
<ide> * @expectedException \Illuminate\Database\Eloquent\RelationNotFoundException
<del> * @expectedExceptionMessage Call to undefined relationsh... | 1 |
Ruby | Ruby | fix small bug which was shown by the last commit | d619e399380cd840f9f5ec88bb3d823fbb1f4d08 | <ide><path>activerecord/lib/active_record/associations.rb
<ide> def join_relation(joining_relation)
<ide> end
<ide>
<ide> def table
<del> if reflection.macro == :has_and_belongs_to_many
<add> if @tables.last.is_a?(Array)
<ide> @tables.last.f... | 1 |
Javascript | Javascript | preserve scroll position when restoring focus | 1095d3f965b93936ea1a8c96429be7f1fe0b9973 | <ide><path>src/renderers/dom/shared/ReactInputSelection.js
<ide> var ReactInputSelection = {
<ide> priorSelectionRange
<ide> );
<ide> }
<add>
<add> // Focusing a node can change the scroll position, which is undesirable
<add> const ancestors = [];
<add> let ancestor = priorFocused... | 1 |
Ruby | Ruby | address some style issues in macos module | cfe58531ee6dee0f0a24f0b8d5146ea43ee88c38 | <ide><path>Library/Homebrew/macos.rb
<ide> def dev_tools_path
<ide> end
<ide>
<ide> def xctoolchain_path
<del> # Beginning with Xcode 4.3, clang and some other tools are located in a xctoolchain dir.
<add> # As of Xcode 4.3, some tools are located in the "xctoolchain" directory
<ide> @xctoolchain_path ||... | 1 |
Python | Python | fix tf dpr | ec54d70e162f2f081f17621c5344df165559bedd | <ide><path>src/transformers/models/dpr/modeling_tf_dpr.py
<ide> class TFDPRReaderOutput(ModelOutput):
<ide> attentions: Optional[Tuple[tf.Tensor]] = None
<ide>
<ide>
<del>class TFDPREncoder(TFPreTrainedModel):
<add>class TFDPREncoderLayer(tf.keras.layers.Layer):
<ide>
<ide> base_model_prefix = "bert_model"
<... | 1 |
PHP | PHP | add new unit tests for dropcolumn function | c1b3eedece74f70c97e098392fbc2007f5e2072c | <ide><path>tests/Database/DatabaseMySqlSchemaGrammarTest.php
<ide> public function testDropColumn()
<ide>
<ide> $this->assertEquals(1, count($statements));
<ide> $this->assertEquals('alter table `users` drop `foo`, drop `bar`', $statements[0]);
<add>
<add> $blueprint = new Blueprint('users');
<add> $blueprint->d... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.