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 |
|---|---|---|---|---|---|
Ruby | Ruby | use the columns hash for primary key lookup | d21f38aaa204ee8df81bd34a6dad3d6de8ad63d9 | <ide><path>activerecord/lib/active_record/relation/finder_methods.rb
<ide> def find_with_ids(*ids)
<ide> def find_one(id)
<ide> id = id.id if ActiveRecord::Base === id
<ide>
<del> column = primary_key.column
<add> column = columns_hash[primary_key.name.to_s]
<ide>
<ide> substitute = connecti... | 1 |
PHP | PHP | add hasreplyto method | fbf0e9e0a17704068fc6158438455f8dde82e748 | <ide><path>src/Illuminate/Mail/Mailable.php
<ide> public function replyTo($address, $name = null)
<ide> return $this->setAddress($address, $name, 'replyTo');
<ide> }
<ide>
<add> /**
<add> * Determine if the given recipient is set on the mailable.
<add> *
<add> * @param object|array|string ... | 2 |
Javascript | Javascript | add specs for jqlite wrapping/node creation | 2d9dd1c17270d8300b909fcb2f36964662000acf | <ide><path>test/jqLiteSpec.js
<ide> describe('jqLite', function(){
<ide> expect(selected.length).toEqual(1);
<ide> expect(selected[0]).toEqual(text);
<ide> });
<add>
<ide> it('should allow construction with html', function(){
<ide> var nodes = jqLite('<div>1</div><span>2</span>');
<ide> ... | 1 |
Javascript | Javascript | add packagetranspilationregistry spec | 934ab30a0d3a14f55de2672001982860fda54aa8 | <ide><path>spec/package-transpilation-registry-spec.js
<add>/** @babel */
<add>import fs from 'fs'
<add>import path from 'path'
<add>
<add>import {it, fit, ffit, fffit, beforeEach, afterEach} from './async-spec-helpers'
<add>
<add>import PackageTranspilationRegistry from '../src/package-transpilation-registry'
<add>
<a... | 1 |
Python | Python | add electra tf 2.x pretrainer | b708fd68e312ddc9a18b6b553c508b8e19507ee0 | <ide><path>official/nlp/modeling/models/electra_pretrainer.py
<add># Copyright 2020 The TensorFlow Authors. All Rights Reserved.
<add>#
<add># Licensed under the Apache License, Version 2.0 (the "License");
<add># you may not use this file except in compliance with the License.
<add># You may obtain a copy of the Licen... | 3 |
Ruby | Ruby | simplify namespace assignment in fields_for | 4e8fbc0c229327b1d2986c30faa497f699a4b122 | <ide><path>actionpack/lib/action_view/helpers/form_helper.rb
<ide> def fields_for(record_name, record_object = nil, fields_options = {}, &block)
<ide> fields_options, record_object = record_object, nil if record_object.is_a?(Hash) && record_object.extractable_options?
<ide> fields_options[:builder] ||= ... | 1 |
PHP | PHP | fix documentation block | fd2c341fc1f1feef8933cf9e2054989bd6878da0 | <ide><path>src/Illuminate/Http/Request.php
<ide> public function session()
<ide> /**
<ide> * Get the user making the request.
<ide> *
<del> * @return \Closure
<add> * @return mixed
<ide> */
<ide> public function user()
<ide> { | 1 |
Ruby | Ruby | fix bug with eager_load in development environment | 7dbc6d6979aec1ce7364269360d277fa2499e919 | <ide><path>actionpack/lib/action_dispatch/journey/routes.rb
<ide> def partition_route(route)
<ide> def ast
<ide> @ast ||= begin
<ide> asts = anchored_routes.map(&:ast)
<del> Nodes::Or.new(asts) unless asts.empty?
<add> Nodes::Or.new(asts)
<ide> end
<ide> end
<ide>... | 2 |
Ruby | Ruby | remove test ordering bug by using another class | 34497c0b3638e7fd298da4a1107333fe534f9ca4 | <ide><path>activerecord/test/cases/callbacks_test.rb
<ide> def history
<ide> end
<ide> end
<ide>
<add>class CallbackDeveloperWithFalseValidation < CallbackDeveloper
<add> before_validation proc { |model| model.history << [:before_validation, :returning_false]; return false }
<add> before_validation proc { |model| ... | 1 |
Text | Text | add bengl to collaborators | 38c8fd4afbfbe174b285d21af78782d47ee4964e | <ide><path>README.md
<ide> information about the governance of the Node.js project, see
<ide>
<ide> * [addaleax](https://github.com/addaleax) - **Anna Henningsen** <anna@addaleax.net>
<ide> * [AndreasMadsen](https://github.com/AndreasMadsen) - **Andreas Madsen** <amwebdk@gmail.com>
<add>* [bengl](https://g... | 1 |
PHP | PHP | add container flush test | 22126ac39c371adca21698535020bc61aa19a3ad | <ide><path>tests/Container/ContainerTest.php
<ide> public function testForgetInstancesForgetsAllInstances()
<ide> $this->assertFalse($container->isShared('Instance2'));
<ide> $this->assertFalse($container->isShared('Instance3'));
<ide> }
<add>
<add> public function testContainerFlushFlushesAllBin... | 1 |
Python | Python | find max function in python | 67d409b6be5f90c33e73ddf73ba2966d8f2c44f4 | <ide><path>Maths/FindMax.py
<add># NguyenU
<add>
<add>import math
<add>
<add>def find_max(nums):
<add> max = 0
<add> for x in nums:
<add> if x > max:
<add> max = x
<add> print max | 1 |
Ruby | Ruby | add guard for calling `finalize` on nullsession | d21345baf0c5ebfa42452979229c7d20a092c7f4 | <ide><path>activerecord/lib/active_record/asynchronous_queries_tracker.rb
<ide> def start_session
<ide> end
<ide>
<ide> def finalize_session
<del> @current_session&.finalize
<add> @current_session.finalize if @current_session.respond_to?(:finalize)
<ide> @current_session = NullSession
<ide> ... | 2 |
Go | Go | use formatter in docker diff | 3dad39b957a008127890ddf9037c063d69b99347 | <ide><path>cli/command/container/diff.go
<ide> package container
<ide>
<ide> import (
<del> "fmt"
<del>
<ide> "github.com/docker/docker/cli"
<ide> "github.com/docker/docker/cli/command"
<del> "github.com/docker/docker/pkg/archive"
<add> "github.com/docker/docker/cli/command/formatter"
<ide> "github.com/pkg/errors"
... | 3 |
Javascript | Javascript | fix executionenvironment.canusedom for ie8 | eebcf9f888b8a8fc3ed1f31c2789584a235aa089 | <ide><path>src/vendor/core/ExecutionEnvironment.js
<ide>
<ide> "use strict";
<ide>
<del>var canUseDOM =
<add>var canUseDOM = !!(
<ide> typeof window !== 'undefined' &&
<ide> window.document &&
<del> typeof window.document.createElement === 'function';
<add> window.document.createElement
<add>);
<ide>
<ide> /**... | 1 |
Javascript | Javascript | remove unnecessary console instantiation | c8d4ff1d52e639434dcd09d2ee41e9f7926313c9 | <ide><path>lib/events.js
<ide> Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
<ide> return defaultMaxListeners;
<ide> },
<ide> set: function(arg) {
<del> // force global console to be compiled.
<del> // see https://github.com/nodejs/node/issues/4467
<del> console;
<ide> // check wheth... | 1 |
PHP | PHP | fix assertion order | d3e6620931a8401f1292aaa14d215959ae721812 | <ide><path>tests/TestCase/Network/Http/ClientTest.php
<ide> public function testGetQuerystringString()
<ide> 'Category' => ['id' => [2, 3]]
<ide> ];
<ide> $result = $http->get('/search', http_build_query($data));
<del> $this->assertSame($result, $response);
<add> $this->assertS... | 1 |
Javascript | Javascript | remove unused variable | 85cc66ac39baccb4b33af824d67ebf41008db9cb | <ide><path>packages/ember-views/lib/views/view.js
<ide> Ember.View = Ember.Object.extend(Ember.Evented,
<ide> @property _context
<ide> */
<ide> _context: Ember.computed(function(key, value) {
<del> var parentView, controller, context;
<add> var parentView, controller;
<ide>
<ide> if (arguments.length... | 1 |
Javascript | Javascript | make async iterator .next() always resolve | fa1535aed7f8dcfe0400f6359c068253032f5973 | <ide><path>lib/internal/streams/async_iterator.js
<ide> function onReadable(iter) {
<ide> function wrapForNext(lastPromise, iter) {
<ide> return (resolve, reject) => {
<ide> lastPromise.then(() => {
<add> if (iter[kEnded]) {
<add> resolve(createIterResult(undefined, true));
<add> return;
<add> ... | 2 |
Text | Text | add pronouns to readme | 6fe740e014d9eddf3fc177720eeee63d29cafcaf | <ide><path>README.md
<ide> For more information about the governance of the Node.js project, see
<ide> * [MylesBorins](https://github.com/MylesBorins) -
<ide> **Myles Borins** <myles.borins@gmail.com> (he/him)
<ide> * [not-an-aardvark](https://github.com/not-an-aardvark) -
<del>**Teddy Katz** <teddy.katz@gmail... | 1 |
Javascript | Javascript | restore no-op function in test | 5b1d12a092c2c38ecb3da0d9b59c702c625e7ae3 | <ide><path>test/parallel/test-http-hostname-typechecking.js
<ide> 'use strict';
<del>const common = require('../common');
<add>require('../common');
<ide>
<ide> const assert = require('assert');
<ide> const http = require('http');
<ide> vals.forEach((v) => {
<ide> // These values are OK and should not throw synchronou... | 1 |
Javascript | Javascript | add optional arg to define custom indentation | 1191edba4eaa15f675fa4ed047949a150843971b | <ide><path>src/Angular.js
<ide> function toJsonReplacer(key, value) {
<ide> * stripped since angular uses this notation internally.
<ide> *
<ide> * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
<del> * @param {boolean=} pretty If set to true, the JSON output will contain newlines and... | 3 |
Javascript | Javascript | add loopbackmigrationgrandfathered flag | 9cb33e409c162c7714bf2bf4ff3b80c634846957 | <ide><path>loopbackMigration.js
<ide> var users = dbObservable
<ide> user.username = 'fcc' + uuid.v4().slice(0, 8);
<ide> if (user.github) {
<ide> user.isGithubCool = true;
<add> } else {
<add> user.isMigrationGrandfathered = true;
<ide> }
<ide> return user;
<ide> }) | 1 |
Javascript | Javascript | fix durations not being cloned properly | b864420eab59b45dde8a4b9d33f9b6f81fc7b9b0 | <ide><path>moment.js
<ide> seconds = duration.seconds || duration.second || duration.s || 0,
<ide> milliseconds = duration.milliseconds || duration.millisecond || duration.ms || 0;
<ide>
<add> // store reference to input for deterministic cloning
<add> this._input = duration;
<add... | 2 |
Text | Text | fix typos in custom geometry article | 564d38a4318b4c27f7346cc6cec5fd2ecf24d379 | <ide><path>threejs/lessons/threejs-custom-geometry.md
<ide> A [previous article](threejs-primitives.html) gave a tour of
<ide> the various built in primitives included in THREE.js. In this
<ide> article we'll cover making our own geometry.
<ide>
<del>Just to be clear, if you are serious about making 3D content
<add>Ju... | 1 |
Python | Python | fix error in test_saving_without_compilation | 75519651bbfd0a31a382eee92a982d9338e0e6d5 | <ide><path>tests/test_model_saving.py
<ide> def test_sequential_model_saving_2():
<ide>
<ide>
<ide> @keras_test
<del>def test_fuctional_model_saving():
<add>def test_functional_model_saving():
<ide> input = Input(shape=(3,))
<ide> x = Dense(2)(input)
<ide> output = Dense(3)(x)
<ide> def test_saving_multip... | 1 |
Text | Text | add long overdue link to the google trc project | 51e5eca612d24896165ba8f7c83ecd0e8f695aa4 | <ide><path>examples/flax/README.md
<ide> module abstraction using Python dataclasses that leads to concise and explicit c
<ide> All of our JAX/Flax models are designed to run efficiently on Google
<ide> Cloud TPUs. Here is [a guide for running JAX on Google Cloud TPU](https://cloud.google.com/tpu/docs/jax-quickstart-tp... | 1 |
Javascript | Javascript | fix duplicate errors and warnings | c27b46ac8b8f67274a2a38f91a92efd6d729d806 | <ide><path>lib/Compilation.js
<ide> class Compilation {
<ide> if (err) return callback(err);
<ide>
<ide> if (!needBuild) {
<del> for (const err of module.errors) {
<del> this.errors.push(err);
<del> }
<del> for (const err of module.warnings) {
<del> this.warnings.push(err);
<del> }
<i... | 1 |
Python | Python | move more reduction ops to forward graph | af1a2eb1f556f97ed2dd94074339e5a1ec159c86 | <ide><path>keras/layers/gru_v2_test.py
<ide> from absl.testing import parameterized
<ide> import numpy as np
<ide> from tensorflow.core.protobuf import rewriter_config_pb2
<add>from tensorflow.python.framework import test_util as tf_test_util
<ide> import keras
<ide> from keras import combinations
<ide> from keras impo... | 3 |
Ruby | Ruby | leave default_asset_host_protocol unset | 88237daae48c9867fca3b0e14e779d4f4cdd88d0 | <ide><path>actionpack/lib/sprockets/railtie.rb
<ide> module Sprockets
<ide>
<ide> # TODO: Get rid of config.assets.enabled
<ide> class Railtie < ::Rails::Railtie
<del> config.action_controller.default_asset_host_protocol = :relative
<del>
<ide> rake_tasks do
<ide> load "sprockets/assets.rake"
<ide> ... | 2 |
Ruby | Ruby | pull parent and alias tacker from the nodes | 085bb239f8476003fa06f81e06a7b4a0402401fc | <ide><path>activerecord/lib/active_record/associations/join_dependency.rb
<ide> def make_joins(node)
<ide> }
<ide> end
<ide>
<add> def construct_tables!(parent, node)
<add> node.tables = node.reflection.chain.map { |reflection|
<add> alias_tracker.aliased_table_for(
<add> ... | 4 |
PHP | PHP | set default charset for sqlsrv driver to utf8 | 2c4964e159f290a6fed48a902cdfdce5a8c1f8dd | <ide><path>config/database.php
<ide> 'database' => env('DB_DATABASE', 'forge'),
<ide> 'username' => env('DB_USERNAME', 'forge'),
<ide> 'password' => env('DB_PASSWORD', ''),
<add> 'charset' => 'utf8',
<ide> 'prefix' => '',
<ide> ],
<ide> | 1 |
PHP | PHP | add test for eventmanager reset | 190b47cf367af22d8b72fa7e9d19c3a6a8846f9a | <ide><path>tests/TestCase/TestSuite/IntegrationTestCaseTest.php
<ide> namespace Cake\Test\TestCase\TestSuite;
<ide>
<ide> use Cake\Core\Configure;
<add>use Cake\Event\EventManager;
<ide> use Cake\Network\Response;
<ide> use Cake\Routing\DispatcherFactory;
<ide> use Cake\Routing\Router;
<ide> public function testAssert... | 1 |
Ruby | Ruby | add tests for macos check | 77105b809a83583e3da5726105dc9cd913112913 | <ide><path>Library/Homebrew/rubocops/lines_cop.rb
<ide> def audit_formula(_node, _class_node, _parent_class_node, body_node)
<ide> next unless method_called?(m, :new)
<ide> problem "`depends_on` can take requirement classes instead of instances"
<ide> end
<del> #
<del> ... | 2 |
Go | Go | transfer uid and gid to volume. fixes | 9cfbaecfe5b1ccb1ab21c66400f3a1ba1b33da1e | <ide><path>container.go
<ide> func (container *Container) Start(hostConfig *HostConfig) error {
<ide> }
<ide> }
<ide> }
<add> var stat syscall.Stat_t
<add> if err := syscall.Stat(rootVolPath, &stat); err != nil {
<add> return err
<add> }
<add> var srcStat syscall.Stat_t
<add> if err := syscall.... | 2 |
Java | Java | reduce platformtransactionmanager lookups | 4e257243f2dd2fdd5625286d01976b346a74f5d7 | <ide><path>spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java
<ide>
<ide> import java.lang.reflect.Method;
<ide> import java.util.Properties;
<add>import java.util.concurrent.ConcurrentHashMap;
<ide>
<ide> /**
<ide> * Base class for transactional aspects, such as the {@... | 3 |
Javascript | Javascript | expose fastfs on the depencenygraph instance | 700b848826e7ec5fb836b1e69e872ee52b0913c1 | <ide><path>packager/react-packager/src/DependencyResolver/DependencyGraph/index.js
<ide> class DependencyGraph {
<ide> return this._moduleCache.getModule(entryPath).getDependencies();
<ide> }
<ide>
<del> stat(filePath) {
<del> return this._fastfs.stat(filePath);
<add> getFS() {
<add> return this._fastfs;... | 2 |
Java | Java | remove redundant cast in exceptions | 620981ad1e57eac5d13b94ac5cde4078660ffac4 | <ide><path>src/main/java/rx/exceptions/Exceptions.java
<ide> public static void throwIfFatal(Throwable t) {
<ide> if (t instanceof OnErrorNotImplementedException) {
<ide> throw (OnErrorNotImplementedException) t;
<ide> } else if (t instanceof OnErrorFailedException) {
<del> Throwa... | 1 |
Ruby | Ruby | fix broken proc syntax for 1.9.3 | b769b5fc1405659f8e425e174e26509ba9ea73ed | <ide><path>activerecord/test/models/author.rb
<ide> def ratings
<ide> has_many :posts_with_default_include, :class_name => 'PostWithDefaultInclude'
<ide> has_many :comments_on_posts_with_default_include, :through => :posts_with_default_include, :source => :comments
<ide>
<del> has_many :posts_with_signature, -> (... | 1 |
Go | Go | fix a race in daemon/logger.testcopier | ab533f06510a14a023c056604f9520741073acd3 | <ide><path>daemon/logger/copier_test.go
<ide> import (
<ide> "bytes"
<ide> "encoding/json"
<ide> "io"
<add> "sync"
<ide> "testing"
<ide> "time"
<ide> )
<ide>
<ide> type TestLoggerJSON struct {
<ide> *json.Encoder
<add> mu sync.Mutex
<ide> delay time.Duration
<ide> }
<ide>
<ide> func (l *TestLoggerJSON) Log(... | 1 |
Javascript | Javascript | unify build of challenges | 2168b6115161908121ec493d2119ecbfc58603e3 | <ide><path>client/src/client/workers/test-evaluator.js
<ide> import chai from 'chai';
<ide> import '@babel/polyfill';
<add>import __toString from 'lodash/toString';
<ide>
<ide> const oldLog = self.console.log.bind(self.console);
<ide> self.console.log = function proxyConsole(...args) {
<ide> self.console.log = functio... | 4 |
Java | Java | add a couple of @see to completable | b338ffe9f469896187e401caee2e9a9a8fffe28d | <ide><path>src/main/java/io/reactivex/Completable.java
<ide> public final Completable compose(CompletableTransformer transformer) {
<ide> * @param other the other Completable, not null
<ide> * @return the new Completable which subscribes to this and then the other Completable
<ide> * @throws NullPointerE... | 2 |
Ruby | Ruby | remove bundle exec from the exception message | d17fa452ec1993271ccc6e5035fb27b9c89513cf | <ide><path>activerecord/lib/active_record/migration.rb
<ide> def initialize(name)
<ide>
<ide> class PendingMigrationError < ActiveRecordError#:nodoc:
<ide> def initialize
<del> super("Migrations are pending run 'bundle exec rake db:migrate RAILS_ENV=#{ENV['RAILS_ENV']}' to resolve the issue")
<add> sup... | 1 |
Python | Python | fix typo in documentation (101 instead of 10) | 0f1d2d929a0f7babb6d4471e987be1da34e06e34 | <ide><path>numpy/core/code_generators/ufunc_docstrings.py
<ide> def add_newdoc(place, name, doc):
<ide>
<ide> >>> import matplotlib.pyplot as plt
<ide>
<del> >>> x = np.linspace(-10, 10, 101)
<add> >>> x = np.linspace(-10, 10, 10)
<ide> >>> plt.plot(x, np.absolute(x))
<ide> >>> plt.show()
<ide> | 1 |
PHP | PHP | add tests for | edcfe2d3a8905f5a2972a48a6d8427e85aab2632 | <ide><path>lib/Cake/Test/Case/Utility/HashTest.php
<ide> public function testExtractAttributeEquality() {
<ide> $this->assertEquals(5, $result[3]['id']);
<ide> }
<ide>
<add>/**
<add> * Test that attribute matchers don't cause errors on scalar data.
<add> *
<add> * @return void
<add> */
<add> public function testExt... | 1 |
Python | Python | add extra field to get_connnection rest endpoint | adf7755eaa67bd924f6a4da0498bce804da1dd4b | <ide><path>airflow/api_connexion/endpoints/connection_endpoint.py
<ide> from airflow.api_connexion.parameters import check_limit, format_parameters
<ide> from airflow.api_connexion.schemas.connection_schema import (
<ide> ConnectionCollection,
<del> connection_collection_item_schema,
<ide> connection_collect... | 2 |
Javascript | Javascript | convert the `domcanvasfactory` to an es6 class | c5f73edcd273f1cd33694243740e248bef0472c9 | <ide><path>examples/node/pdf2png/pdf2png.js
<ide> NodeCanvasFactory.prototype = {
<ide> };
<ide> },
<ide>
<del> reset: function NodeCanvasFactory_reset(canvasAndContextPair, width, height) {
<del> assert(canvasAndContextPair.canvas, 'Canvas is not specified');
<add> reset: function NodeCanvasFactory_reset(c... | 2 |
Javascript | Javascript | show error details | b6a1c40545cbde4e3ec085e20eb9fbfa1a850f56 | <ide><path>bin/webpack.js
<ide> optimist
<ide>
<ide> .boolean("display-chunks").describe("display-chunks")
<ide>
<add> .boolean("display-error-details").describe("display-error-details")
<add>
<ide> .boolean("display-reasons").alias("display-reasons", "verbose").alias("display-reasons", "v").describe("display-reaso... | 4 |
Javascript | Javascript | ensure presetenv is loaded | eb75f8c8cc2316fbf68a4fa26841e77292c71f3c | <ide><path>client/src/templates/Challenges/rechallenge/transformers.js
<ide> async function loadBabel() {
<ide> }
<ide>
<ide> async function loadPresetEnv() {
<del> if (presetEnv) return;
<add> if (babelOptionsJSBase && babelOptionsJSBase.presets) return;
<ide> /* eslint-disable no-inline-comments */
<del> preset... | 1 |
PHP | PHP | fix incorrect class type for widgets | e5a9dc8de6fbb7c9dcd3d44c81a01ea7415d7937 | <ide><path>src/View/Widget/WidgetRegistry.php
<ide> protected function _resolveWidget($widget) {
<ide> }
<ide>
<ide> $class = array_shift($widget);
<del> $className = App::className($class, 'View/Input');
<add> $className = App::className($class, 'View/Widget');
<ide> if ($className === false || !class_exists(... | 2 |
Text | Text | add backticks around string#camelize | ec544350bb59e9e42361d607bde2db689c6bb2d7 | <ide><path>activesupport/CHANGELOG.md
<del>* Update String#camelize to provide feedback when wrong option is passed
<add>* Update `String#camelize` to provide feedback when wrong option is passed
<ide>
<del> String#camelize was returning nil without any feedback when an
<add> `String#camelize` was returning ... | 1 |
Python | Python | fix failing yaml tests | 653d626b3c3189260423bec7a1dd4faed9f8708d | <ide><path>tests/test_renderers.py
<ide> from django.utils import six, unittest
<ide> from django.utils.translation import ugettext_lazy as _
<ide> from rest_framework import status, permissions
<del>from rest_framework.compat import yaml, etree, StringIO
<add>from rest_framework.compat import yaml, etree, StringIO, By... | 1 |
Ruby | Ruby | parse tag if detecting version | 11ebc27e0a1659ce23993bfa6a96470fcc76f477 | <ide><path>Library/Homebrew/test/version_spec.rb
<ide> .to be_detected_from("https://php.net/get/php-7.1.10.tar.gz/from/this/mirror")
<ide> end
<ide>
<del> specify "from URL" do
<add> specify "from tag" do
<ide> expect(described_class.create("1.2.3"))
<ide> .to be_detected_from("https:/... | 2 |
Javascript | Javascript | fix indentation again | 14bbd82ce53e861333a107c82fe5f8145f6fd284 | <ide><path>web/viewer.js
<ide> var PDFView = {
<ide> var data = (xhr.mozResponseArrayBuffer || xhr.mozResponse ||
<ide> xhr.responseArrayBuffer || xhr.response);
<ide>
<del> document.getElementById('loading').style.display = "none";
<add> document.getElementById('loading').s... | 1 |
Python | Python | calculate gradient for entity encoding | 9ffe5437aee37c02db2d32a79bc4a2072448cce3 | <ide><path>examples/pipeline/wiki_entity_linking/train_el.py
<ide> class EL_Model():
<ide>
<ide> INPUT_DIM = 300
<del> OUTPUT_DIM = 5 # 96
<del> PRINT_LOSS = True
<add> OUTPUT_DIM = 96
<add> PRINT_LOSS = False
<ide> PRINT_F = True
<add> EPS = 0.0000000005
<ide>
<ide> labels = ["MATCH", "NO... | 2 |
PHP | PHP | fix missing newline | 80392e2dbf099ae33bbd2d2180ce6c663e59f72a | <ide><path>src/Database/Query.php
<ide> public function clause($name)
<ide> $clauses = implode(', ', array_keys($this->_parts));
<ide> throw new InvalidArgumentException("The '$name' clause is not defined. Valid clauses are: $clauses");
<ide> }
<add>
<ide> return $this->_parts[$n... | 1 |
Mixed | Go | fix volumes-from/bind-mounts passed in on start | d44c9f91472eb3df4c38c669134df04b2ccf9953 | <ide><path>daemon/volumes.go
<ide> type Mount struct {
<ide> volume *volumes.Volume
<ide> Writable bool
<ide> copyData bool
<add> from *Container
<ide> }
<ide>
<ide> func (mnt *Mount) Export(resource string) (io.ReadCloser, error) {
<ide> func (container *Container) prepareVolumes() error {
<ide> ... | 3 |
Python | Python | add a test for ndindex call | 4c489f6d6edccc4d7fe2310b0e0902e980b5f52b | <ide><path>numpy/lib/tests/test_index_tricks.py
<ide> def test_ndindex():
<ide> x = list(np.ndindex((1, 2, 3)))
<ide> assert_array_equal(x, expected)
<ide>
<add> # Test use of scalars and tuples
<add> x = list(np.ndindex((3,)))
<add> assert_array_equal(x, list(np.ndindex(3)))
<add>
<ide> # Make su... | 1 |
Ruby | Ruby | ignore isolation test tests for test-unit 2 also | 98f96a0809de7cc33e683d0d4643ca80e3ac26bf | <ide><path>activesupport/test/isolation_test.rb
<ide> require 'abstract_unit'
<ide>
<add>if defined?(MiniTest) || defined?(Test::Unit::TestResultFailureSupport)
<add> $stderr.puts "Isolation tests can test test-unit 1 only"
<add>
<ide> # Does awesome
<del>if defined?(MiniTest)
<del> $stderr.puts "Umm, MiniTest not s... | 1 |
Javascript | Javascript | add infrastructure test | b6138c18a10318fb0834663ef081250505ca1485 | <ide><path>test/Compiler.test.js
<ide> describe("Compiler", () => {
<ide> done();
<ide> });
<ide> });
<add> describe("infrastructure logging", () => {
<add> const CONSOLE_METHODS = [
<add> "error",
<add> "warn",
<add> "info",
<add> "log",
<add> "debug",
<add> "trace",
<add> "profile",
<add> "prof... | 1 |
Python | Python | fix tf ctrl model naming | fc64559c4583db4e38ce50a976c8d935b124cf67 | <ide><path>setup.py
<ide>
<ide> # keras2onnx and onnxconverter-common version is specific through a commit until 1.7.0 lands on pypi
<ide> extras["tf"] = [
<del> "tensorflow<=2.2",
<add> "tensorflow",
<ide> # "onnxconverter-common",
<ide> # "keras2onnx"
<ide> "onnxconverter-common @ git+git://github.... | 2 |
Text | Text | explain what to do if git push is rejected | d15a5c0fe1380bc33368d08f3cf4564a60146243 | <ide><path>COLLABORATOR_GUIDE.md
<ide> your pull request shows the purple merged status then you should still
<ide> add the "Landed in <commit hash>..<commit hash>" comment if you added
<ide> multiple commits.
<ide>
<add>### Troubleshooting
<add>
<add>Sometimes, when running `git push upstream master`, you may get an ... | 1 |
Python | Python | restore proper import for httperror | 7c6812645afa8ac8ff0c264a8d86f487aa4ed33b | <ide><path>transformers/commands/user.py
<ide> from getpass import getpass
<ide> from typing import List, Union
<ide>
<add>from requests.exceptions import HTTPError
<add>
<ide> from transformers.commands import BaseTransformersCLICommand
<del>from transformers.hf_api import HfApi, HfFolder, HTTPError
<add>from transfo... | 2 |
Python | Python | fix t5 special tokens | b93569457fd758a60f15d94ac7b3ba3a245096c0 | <ide><path>src/transformers/tokenization_t5.py
<ide> def _convert_id_to_token(self, index):
<ide>
<ide> def convert_tokens_to_string(self, tokens):
<ide> """ Converts a sequence of tokens (string) in a single string. """
<del> out_string = self.sp_model.decode_pieces(tokens)
<del> return out_... | 2 |
Python | Python | fix imagepullpolicy missing in tests | 6f246b0d54ccaf733b7c5951a8955adda6719acb | <ide><path>kubernetes_tests/test_kubernetes_pod_operator.py
<ide> def setUp(self):
<ide> 'containers': [
<ide> {
<ide> 'image': 'ubuntu:16.04',
<add> 'imagePullPolicy': 'IfNotPresent',
<ide> 'args': ["echo 10"],
<... | 2 |
PHP | PHP | use absolute class names for lang facade | ef98884b29306bf8bdbb918a4a668587ed676745 | <ide><path>src/Illuminate/View/Compilers/BladeCompiler.php
<ide> protected function compileLanguage($value)
<ide> {
<ide> $pattern = $this->createMatcher('lang');
<ide>
<del> $value = preg_replace($pattern, '$1<?php echo Lang::get$2; ?>', $value);
<add> $value = preg_replace($pattern, '$1<?php echo \Illuminate\Su... | 1 |
Javascript | Javascript | add attempt logging for verifypython() | 2c6c14d1977b9f92dbeb702e3b89a652f9fadbe6 | <ide><path>script/lib/verify-machine-requirements.js
<ide> function verifyPython() {
<ide> var stdout;
<ide> var fullVersion;
<ide> var usablePythonWasFound;
<add> var triedLog = '';
<ide>
<ide> function verifyBinary(binary, prependFlag) {
<ide> if (binary && !usablePythonWasFound) {
<ide> function verify... | 1 |
Java | Java | fix checkstyle violation | 9a71a8d357caf94ba71236a01ecc786c0a7f308d | <ide><path>spring-tx/src/test/java/org/springframework/transaction/event/TransactionalEventListenerTests.java
<ide> import org.springframework.util.LinkedMultiValueMap;
<ide> import org.springframework.util.MultiValueMap;
<ide>
<del>import static org.assertj.core.api.Assertions.*;
<del>import static org.springframewor... | 1 |
Java | Java | favor scriptexception over sqlexception | 92eb99a5abaaf43f4fddeaf00020dad2f3dd73eb | <ide><path>spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/CompositeDatabasePopulator.java
<ide> * See the License for the specific language governing permissions and
<ide> * limitations under the License.
<ide> */
<add>
<ide> package org.springframework.jdbc.datasource.init;
<ide>
<ide> import j... | 4 |
Ruby | Ruby | make current_page? compare binary strings | b3c0858f732da157195ad3e2dec470791c754cfe | <ide><path>actionview/lib/action_view/helpers/url_helper.rb
<ide> def current_page?(options)
<ide>
<ide> return false unless request.get? || request.head?
<ide>
<del> url_string = url_for(options)
<add> url_string = URI.unescape(url_for(options)).force_encoding(Encoding::BINARY)
<ide>
<ide> ... | 2 |
Mixed | Javascript | throw if common.port used in parallel tests | 800ce94e5cdaa8dba7cf69b4c560a66a51ae0ec8 | <ide><path>test/common/index.js
<ide> const noop = () => {};
<ide> // gets tools to ignore it by default or by simple rules, especially eslint.
<ide> let tmpDirName = '.tmp';
<ide>
<del>exports.PORT = +process.env.NODE_COMMON_PORT || 12346;
<add>Object.defineProperty(exports, 'PORT', {
<add> get: () => {
<add> if ... | 2 |
Text | Text | remove confusion in the sentence [ci skip] | 8831155f64fcccf76ab33a9f438c295b55547fd3 | <ide><path>guides/source/autoloading_and_reloading_constants.md
<ide> is not entirely equivalent to the one of the body of the definitions using the
<ide> assignment.
<ide>
<ide> Thus, when one informally says "the `String` class", that really means: the
<del>class object stored in the constant called "String" in the ... | 1 |
Java | Java | turn flushingdatabuffer to an empty databuffer | 6b3d5f1bc57a2285abce83121f516250422e03b6 | <ide><path>spring-web-reactive/src/main/java/org/springframework/core/io/buffer/FlushingDataBuffer.java
<ide> import java.nio.ByteBuffer;
<ide> import java.util.function.IntPredicate;
<ide>
<del>import org.springframework.util.Assert;
<del>
<ide> /**
<del> * {@link DataBuffer} wrapper that indicates the file or the so... | 4 |
Python | Python | fix typos (resolves #718) | 1bd53bbf89fe134e20ccb3e6000798c02ef03468 | <ide><path>spacy/en/tokenizer_exceptions.py
<ide> ],
<ide>
<ide> "She's": [
<del> {ORTH: "i", LEMMA: PRON_LEMMA, TAG: "PRP"},
<add> {ORTH: "She", LEMMA: PRON_LEMMA, TAG: "PRP"},
<ide> {ORTH: "'s"}
<ide> ],
<ide>
<ide> ],
<ide>
<ide> "Shedve": [
<del> {ORTH: "i", LEMMA... | 1 |
Text | Text | translate 02.1-jsx-in-depth.ja-jp.md to japanese | f460a19d8a53cb7721888ef8974e6f2953e4a9d7 | <ide><path>docs/docs/02.1-jsx-in-depth.ja-JP.md
<add>---
<add>id: jsx-in-depth
<add>title: JSXの深層
<add>permalink: jsx-in-depth-ja-JP.html
<add>prev: displaying-data-ja-JP.html
<add>next: jsx-spread-ja_JP.html
<add>---
<add>
<add>[JSX](https://facebook.github.io/jsx/)はXMLに似たJavaScriptのシンタックスの拡張です。Reactでは、単純なJSXのシンタックスの変... | 1 |
Ruby | Ruby | update asset helpers to use `config.assets.prefix` | 2684f17a17e4f97bdb89d20b4cd08585235263a2 | <ide><path>actionpack/lib/sprockets/helpers/rails_helper.rb
<ide> def debug_assets?
<ide>
<ide> def asset_path(source, default_ext = nil, body = false)
<ide> source = source.logical_path if source.respond_to?(:logical_path)
<del> path = asset_paths.compute_public_path(source, 'assets', default_ext... | 1 |
Python | Python | fix bug with inactive user accessing oauth | 74fbd5ccc5b2aa2f0aab25ead5ffa36024079fcf | <ide><path>rest_framework/authentication.py
<ide> from rest_framework import exceptions, HTTP_HEADER_ENCODING
<ide> from rest_framework.compat import CsrfViewMiddleware
<ide> from rest_framework.compat import oauth, oauth_provider, oauth_provider_store
<del>from rest_framework.compat import oauth2_provider, oauth2_prov... | 1 |
Text | Text | update the rails security guide | f27325d7e5cce3088c746ca91393b5fd95ee8552 | <ide><path>guides/source/security.md
<ide> User.find(session[:user_id])
<ide>
<ide> ### Session id
<ide>
<del>NOTE: _The session id is a 32 byte long MD5 hash value._
<add>NOTE: _The session id is a 32-character random hex string._
<ide>
<del>A session id consists of the hash value of a random string. The random str... | 1 |
Python | Python | improve debug messages for amp | 8b3aaac72d337940b2af1548314c4e252db6881f | <ide><path>glances/amps/glances_amp.py
<ide> class GlancesAmp(object):
<ide>
<ide> def __init__(self, name=None, args=None):
<ide> """Init AMP classe."""
<del> logger.debug("Init {} version {}".format(self.NAME, self.VERSION))
<add> logger.debug("AMP - Init {} version {}".format(self.NAME, se... | 1 |
PHP | PHP | prototype an idea for nested label inputs | b66577f4f523e9218659facd0329b41cd46c4190 | <ide><path>src/View/Helper/FormHelper.php
<ide> class FormHelper extends Helper {
<ide> 'templates' => [
<ide> 'button' => '<button{{attrs}}>{{text}}</button>',
<ide> 'checkbox' => '<input type="checkbox" name="{{name}}" value="{{value}}"{{attrs}}>',
<del> 'checkboxFormGroup' => '{{input}}{{label}}',
<add> ... | 4 |
Text | Text | suggest new hash syntax in testing guide | 487aa51b1414d3f316c7ccdc92af2f212961e0bb | <ide><path>guides/source/testing.md
<ide> All the keyword arguments are optional.
<ide> Example: Calling the `:show` action, passing an `id` of 12 as the `params` and setting a `user_id` of 5 in the session:
<ide>
<ide> ```ruby
<del>get(:show, params: { 'id' => "12" }, session: { 'user_id' => 5 })
<add>get(:show, para... | 1 |
Text | Text | remove copyrighted content from file | b7de2dff3f2407f8d960ebc4ab0aa0fa9b4e7dfc | <ide><path>guide/english/logic/mobsters-riddle/index.md
<ide> title: Mobsters Riddle
<ide> ---
<ide> ## Mobsters Riddle
<ide>
<del>The gang of four that once ran the biggest protection racket in the east eventually got out of jail. Almost immediately, they began operating again in the same neighborhood. They had previ... | 1 |
Javascript | Javascript | remove debug code | 12b0282836d5fb9ee3d72106e7a7897150c05993 | <ide><path>src/api.js
<ide> var WorkerTransport = (function WorkerTransportClosure() {
<ide> var fakeWorker = {
<ide> postMessage: function WorkerTransport_postMessage(obj) {
<ide> fakeWorker.onmessage({data: obj});
<del> try {
<del> testF.contentWindow.postMessage(obj, "*");
<... | 1 |
Ruby | Ruby | fix the class name | 61c65a0aefc535d20c4ae5f4d51dbb3f624f1836 | <ide><path>railties/lib/rails/generators/app_base.rb
<ide> def set_default_accessors!
<ide>
<ide> def database_gemfile_entry
<ide> return [] if options[:skip_active_record]
<del> gem = GemfileGem.version gem_for_database, nil,
<add> gem = GemfileEntry.version gem_for_database, nil,
<ide> ... | 1 |
Text | Text | fix dotcloud to docker, inc | 36ab1836f973c62ff543456f1613dec8813d00df | <ide><path>CONTRIBUTING.md
<ide> c. The contribution was provided directly to me by some other person who represe
<ide>
<ide> d. I understand and agree that this Project and the contribution are publicly known and that a record of the contribution (including all personal information I submit with it, including my sign... | 1 |
Ruby | Ruby | remove more uses of deprecated logger methods | bb106e9aa278a44cd970a3b820af1664fd85bba1 | <ide><path>activerecord/test/cases/base_test.rb
<ide> def test_becomes_includes_errors
<ide> def test_silence_sets_log_level_to_error_in_block
<ide> original_logger = ActiveRecord::Base.logger
<ide> log = StringIO.new
<del> ActiveRecord::Base.logger = Logger.new(log)
<add> ActiveRecord::Base.logger = Ac... | 3 |
Javascript | Javascript | fix component helper test | 16ccac91d07e2e975a54efbf004ecf82d585d23e | <ide><path>test/ng/compileSpec.js
<ide> describe('$compile', function() {
<ide> controllerAs: 'myComponent',
<ide> template: '',
<ide> templateUrl: undefined,
<del> transclude: false,
<add> transclude: undefined,
<ide> scope: {},
<ide> bindToController... | 1 |
PHP | PHP | simplify join clause | a06e156348dfd932a36758ca1df5062aa4c953d5 | <ide><path>src/Illuminate/Database/Query/Builder.php
<ide> public function from($table)
<ide> */
<ide> public function join($table, $one, $operator = null, $two = null, $type = 'inner', $where = false)
<ide> {
<add> $join = new JoinClause($type, $table, $this);
<add>
<ide> // If the first "c... | 5 |
PHP | PHP | fix singular form of messages | 114914e523f504b3f16e2f6bd77bacabdcf23ebc | <ide><path>tests/TestCase/I18n/I18nTest.php
<ide> public function testPluralContextFunction()
<ide> 'letter' => [
<ide> '_context' => [
<ide> 'character' => 'The letter {0}',
<del> 'communication' => 'The letters {0} and {1}',
<add> ... | 1 |
Text | Text | fix typo in readme | 81c7e3ec9f26e774902276769d32140bc699c631 | <ide><path>README.md
<ide> with torch.no_grad():
<ide> # get the predicted last token
<ide> predicted_index = torch.argmax(predictions_2[0, -1, :]).item()
<ide> predicted_token = tokenizer.convert_ids_to_tokens([predicted_index])[0]
<del>assert predicted_token == '.</w>'
<add>assert predicted_token == 'who'
<ide> ```
<... | 1 |
Go | Go | add warning for deprecatd flags | bb5ed452241c37ee9f2f3ebd02a2a5e1764334ad | <ide><path>pkg/mflag/flag.go
<ide> func (f *FlagSet) parseOne() (bool, string, error) {
<ide> f.actual = make(map[string]*Flag)
<ide> }
<ide> f.actual[name] = flag
<add> for _, n := range flag.Names {
<add> if n == fmt.Sprintf("#%s", name) {
<add> fmt.Fprintf(f.out(), "Warning: '-%s' is deprecated, it will be re... | 1 |
PHP | PHP | add test for cli | 27dc4bf7c68aa117d36ea9525c99c4e837001a07 | <ide><path>tests/TestCase/Shell/Task/LoadTaskTest.php
<ide> public function setUp()
<ide> ->getMock();
<ide>
<ide> $this->bootstrap = ROOT . DS . 'config' . DS . 'bootstrap.php';
<add> $this->bootstrapCli = ROOT . DS . 'config' . DS . 'bootstrap_cli.php';
<add> copy($this->bootstrap, ... | 1 |
Text | Text | update res.json definition | 192d42bcacf20e8b501b9c3e7d325c852f6796ee | <ide><path>docs/api-routes/response-helpers.md
<ide> export default function handler(req, res) {
<ide> The included helpers are:
<ide>
<ide> - `res.status(code)` - A function to set the status code. `code` must be a valid [HTTP status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
<del>- `res.json(json... | 1 |
Text | Text | update install instructions | c2e36510ead564e796ef75a7fc590c2470663573 | <ide><path>guide/english/apache/index.md
<ide> Apache runs on 67% of all webservers in the world. It is fast, reliable, and sec
<ide>
<ide> ### Installation
<ide>
<del>#### On Ubuntu
<add>#### On Ubuntu/Debian
<ide> ```
<del>sudo apt install apache2
<add>sudo aptitude install apache2
<ide> ```
<del>#### On Centos
<ad... | 1 |
Python | Python | use 201 status code for post requests. | 94a09149b62496b5434a690de84b5972a5d5b554 | <ide><path>rest_framework/schemas/openapi.py
<ide> def _get_responses(self, path, method):
<ide> response_schema = paginator.get_paginated_response_schema(response_schema)
<ide> else:
<ide> response_schema = item_schema
<del>
<add> status_code = '201' if method == 'POST' else ... | 2 |
Javascript | Javascript | add ended getter middleware | c74c27d99b8d9ab4f267edb8160bd935696ecb83 | <ide><path>src/js/tech/middleware.js
<ide> export const allowedGetters = {
<ide> played: 1,
<ide> paused: 1,
<ide> seekable: 1,
<del> volume: 1
<add> volume: 1,
<add> ended: 1
<ide> };
<ide>
<ide> /** | 1 |
Ruby | Ruby | fix new rubocop failures | ad1acdc1adfe5cc58590069fa604f884e729d89e | <ide><path>Library/Homebrew/requirement.rb
<ide> class Requirement
<ide> attr_reader :tags, :name, :cask, :download
<ide>
<ide> def initialize(tags = [])
<del> @cask ||= self.class.cask
<del> @download ||= self.class.download
<add> @cask = self.class.cask
<add> @download = self.class.download
<ide> ... | 1 |
Javascript | Javascript | simplify .wrapall() and fix style. close gh-1116 | 9434060722b7b935f61f8fb6c97a2a424255dc5d | <ide><path>src/manipulation.js
<ide> jQuery.fn.extend({
<ide> return jQuery.access( this, function( value ) {
<ide> return value === undefined ?
<ide> jQuery.text( this ) :
<del> this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
<add> this.empty().append( ( ... | 1 |
Go | Go | update the ui for docker build | 90ffcda05547332020ec6f2b98179380f7d0e56f | <ide><path>commands.go
<ide> func (cli *DockerCli) CmdInsert(args ...string) error {
<ide> }
<ide>
<ide> func (cli *DockerCli) CmdBuild(args ...string) error {
<del> cmd := Subcmd("build", "[OPTIONS]", "Build an image from a Dockerfile")
<del> fileName := cmd.String("f", "Dockerfile", "Use file as Dockerfile. Can be '... | 1 |
Javascript | Javascript | add plyexporter to the pages list | 71919368f27580a386f2322d8856432bbbf12fe6 | <ide><path>docs/list.js
<ide> var list = {
<ide> },
<ide>
<ide> "Exporters": {
<del> "GLTFExporter": "examples/exporters/GLTFExporter"
<add> "GLTFExporter": "examples/exporters/GLTFExporter",
<add> "PLYExporter": "examples/exporters/PLYExporter"
<ide> },
<ide>
<ide> "Plugins": { | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.