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 |
|---|---|---|---|---|---|
Go | Go | add extra prometheus metrics | a28b173a780cd06db6d93197c54b00a7d616b3dc | <ide><path>builder/dockerfile/builder.go
<ide> func NewBuildManager(b builder.Backend) *BuildManager {
<ide>
<ide> // Build starts a new build from a BuildConfig
<ide> func (bm *BuildManager) Build(ctx context.Context, config backend.BuildConfig) (*builder.Result, error) {
<add> buildsTriggered.Inc()
<ide> if config.... | 5 |
Javascript | Javascript | add test for quadtree with no bounds | bcf70c96c93858710c5218b931f82b3edd988181 | <ide><path>test/geom/quadtree-test.js
<ide> suite.addBatch({
<ide> },
<ide> "has the default y-accessor, d[1]": function(q) {
<ide> assert.strictEqual(q.y()([42, 43]), 43);
<add> },
<add> "can create a single-node quadtree with no bounds": function(q) {
<add> var point = [0, 0],
<ad... | 1 |
Python | Python | set version to v2.1.0a7.dev5 | aebf71bc72e920b8c2ad34f0d8dca3267bec55f9 | <ide><path>spacy/about.py
<ide> # fmt: off
<ide>
<ide> __title__ = "spacy-nightly"
<del>__version__ = "2.1.0a7.dev4"
<add>__version__ = "2.1.0a7.dev5"
<ide> __summary__ = "Industrial-strength Natural Language Processing (NLP) with Python and Cython"
<ide> __uri__ = "https://spacy.io"
<ide> __author__ = "Explosion AI" | 1 |
Ruby | Ruby | add missing test for inreplace with tabs | 701691c261778c8f3b531b2b827f046b97ac0bf0 | <ide><path>Library/Homebrew/test/test_inreplace.rb
<ide> def test_get_make_var
<ide> s.extend(StringInreplaceExtension)
<ide> assert_equal "-Wall -O2", s.get_make_var("CFLAGS")
<ide> end
<add>
<add> def test_change_make_var_with_tabs
<add> s = "CFLAGS\t=\t-Wall -O2\nLDFLAGS\t=\t-lcrypto -lssl"
<add> s.... | 1 |
Javascript | Javascript | pass null as error on successful send() | 4bc1cccb228fdfd1a527de0ee1d9cedc6dac87e2 | <ide><path>lib/dgram.js
<ide> function doSend(ex, self, ip, buffer, address, port, callback) {
<ide> function afterSend(err, sent) {
<ide> if (err) {
<ide> err = exceptionWithHostPort(err, 'send', this.address, this.port);
<add> } else {
<add> err = null;
<ide> }
<add>
<ide> this.callback(err, sent);
<ide... | 2 |
PHP | PHP | simplify the code for object collection | 91c09d87bcda582b492fdd5cb330068df49fe24b | <ide><path>lib/Cake/Utility/ObjectCollection.php
<ide> public function trigger($callback, $params = array(), $options = array()) {
<ide> if ($options['modParams'] !== false && !isset($params[$options['modParams']])) {
<ide> throw new CakeException(__d('cake_dev', 'Cannot use modParams with indexes that do not exis... | 1 |
Javascript | Javascript | use main entry points from ember-runtime | 20151a75d9276ed92497ed3d01b0b2766c9fe3ec | <ide><path>packages/ember-metal/lib/index.js
<ide> export {
<ide> export {
<ide> intern,
<ide> GUID_KEY,
<add> GUID_KEY_PROPERTY,
<ide> apply,
<ide> applyStr,
<ide> canInvoke,
<ide> export {
<ide> } from './testing';
<ide> export {
<ide> getOnerror,
<del> setOnerror
<add> setOnerror,
<add> dispatchError... | 32 |
Mixed | Ruby | fix error when assigning nan to an integer column | 807e176aba7804cad8d630d04f3b771011be4fe6 | <ide><path>activerecord/CHANGELOG.md
<ide>
<ide> *Rob Worley*
<ide>
<del>* Fix undefined method `to_i` when calling `new` on a scope that uses an Array.
<del> Fixes #8718, #8734.
<add>* Fix undefined method `to_i` when calling `new` on a scope that uses an
<add> Array; Fix FloatDomainError when setting... | 3 |
Ruby | Ruby | fix indentation in the template for secrets | ac345f5dadc31a63239e0705dcacc51ef74fdd61 | <ide><path>railties/lib/rails/secrets.rb
<ide> def template
<ide> <<-end_of_template.strip_heredoc
<ide> # See `secrets.yml` for tips on generating suitable keys.
<ide> # production:
<del> # external_api_key: 1466aac22e6a869134be3d09b9e89232fc2c2289
<add> # external_api_... | 3 |
Java | Java | update copyright date | b34404916a6640e2b30ca030db61186313b7a957 | <ide><path>spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java
<ide> /*
<del> * Copyright 2002-2018 the original author or authors.
<add> * Copyright 2002-2020 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "Lice... | 2 |
PHP | PHP | remove duplicate queries to find batch | 502a5054025a81996d45d2657a598809db3c2aab | <ide><path>src/Illuminate/Queue/CallQueuedHandler.php
<ide> protected function ensureSuccessfulBatchJobIsRecorded($command)
<ide> $uses = class_uses_recursive($command);
<ide>
<ide> if (! in_array(Batchable::class, $uses) ||
<del> ! in_array(InteractsWithQueue::class, $uses) ||
<del> ... | 1 |
Python | Python | add logic to lock db and avoid race condition | c1aa93f1a7c9dbe88889b78b541b3abe05ded081 | <ide><path>airflow/models.py
<ide> def error(self, session=None):
<ide> session.commit()
<ide>
<ide> @provide_session
<del> def refresh_from_db(self, session=None):
<add> def refresh_from_db(self, session=None, lock_for_update=False):
<ide> """
<ide> Refreshes the task instance from t... | 1 |
Mixed | Go | add cpuset cpus support for docker | adbe3096e8c8572925dbae5f19ac2ce2dc84fb1c | <ide><path>daemon/container.go
<ide> func populateCommand(c *Container, env []string) error {
<ide> Memory: c.Config.Memory,
<ide> MemorySwap: c.Config.MemorySwap,
<ide> CpuShares: c.Config.CpuShares,
<add> Cpuset: c.Config.Cpuset,
<ide> }
<ide> c.command = &execdriver.Command{
<ide> ID: c.I... | 8 |
Text | Text | update example in repl.md | d8f8096ec6e6b9516cd5ca3f046669194ec0984c | <ide><path>doc/api/repl.md
<ide> const replServer = repl.start({prompt: '> '});
<ide> replServer.defineCommand('sayhello', {
<ide> help: 'Say hello',
<ide> action(name) {
<del> this.lineParser.reset();
<ide> this.bufferedCommand = '';
<ide> console.log(`Hello, ${name}!`);
<ide> this.displayPrompt(); | 1 |
Text | Text | edit addon text about event loop blocking | e28f23f39f6a6d1d42d959a3c3ae9cce2c08d694 | <ide><path>doc/api/addons.md
<ide> involving knowledge of several components and APIs:
<ide> as interacting with the filesystem, sockets, timers, and system events. libuv
<ide> also provides a threading abstraction similar to POSIX threads for
<ide> more sophisticated asynchronous addons that need to move beyond ... | 1 |
Text | Text | improve discoverability of code of conduct | d781cdc349973891030d2a46b72bb779a06aa7e0 | <ide><path>CODE_OF_CONDUCT.md
<add>## Code of Conduct
<add>
<add>This Code of Conduct is adapted from [Rust's wonderful
<add>CoC](http://www.rust-lang.org/conduct.html).
<add>
<add>* We are committed to providing a friendly, safe and welcoming
<add> environment for all, regardless of gender, sexual orientation,
<add> ... | 3 |
Javascript | Javascript | add newline to cert and key if not present | cdde9a386aca90ae151be9ad9455d0d0586d113b | <ide><path>lib/crypto.js
<ide> function Credentials(secureProtocol, flags, context) {
<ide>
<ide> exports.Credentials = Credentials;
<ide>
<add>function addNewline(buf) {
<add> var last = buf[buf.length - 1];
<add> var isBuf = Buffer.isBuffer(buf);
<add>
<add> if (!isBuf && !util.isString(buf))
<add> throw new ... | 2 |
Javascript | Javascript | correct iteration count for objectsequence | 80cf20b9cd85d0be956074a3df7a6ce9e22dcc41 | <ide><path>dist/Immutable.js
<ide> var ObjectSequence = function ObjectSequence(object) {
<ide> for (var ii = 0; ii <= maxIndex; ii++) {
<ide> var iteration = reverse ? maxIndex - ii : ii;
<ide> if (fn(object[keys[iteration]], keys[iteration], object) === false) {
<del> break;
<add> return... | 3 |
PHP | PHP | fix requesthandler ajax handling | 29205f14a21b4c4b5c6784d23c8612abf7b37ba0 | <ide><path>src/Controller/Component/RequestHandlerComponent.php
<ide> public function beforeRedirect(Event $event, $url, Response $response)
<ide> return;
<ide> }
<ide> if (is_array($url)) {
<del> $url = Router::url($url + ['base' => false]);
<add> $url = Router::url($u... | 1 |
Python | Python | fix a test failure for python 3.7 | 10cb25f6dd600f3aa636b3b8db7b7fd102c2eccf | <ide><path>numpy/typing/tests/data/pass/array_constructors.py
<add>import sys
<ide> from typing import List, Any
<ide> import numpy as np
<ide>
<ide> def func(i: int, j: int, **kwargs: Any) -> SubClass:
<ide> B_stack = np.array([[1], [1]]).view(SubClass)
<ide> C = [1]
<ide>
<del>np.ndarray(Index())
<del>np.ndarray([I... | 1 |
Java | Java | update javadoc for multipartfile.transferto | 78f3a3cb11536b5305555c70c867c9daf7c355ad | <ide><path>spring-web/src/main/java/org/springframework/web/multipart/MultipartFile.java
<ide> /*
<del> * Copyright 2002-2012 the original author or authors.
<add> * Copyright 2002-2015 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not... | 1 |
Python | Python | allow tags on aws batch job submission | bd74eb0ca0bb5f81cd98e2c151257a404d4a55a5 | <ide><path>airflow/providers/amazon/aws/hooks/batch_client.py
<ide> def submit_job(
<ide> arrayProperties: Dict,
<ide> parameters: Dict,
<ide> containerOverrides: Dict,
<add> tags: Dict,
<ide> ) -> Dict:
<ide> """
<ide> Submit a batch job
<ide> def submit_job(
<ide> ... | 3 |
PHP | PHP | make extracttasktest more robust | a4a55a0b91c641436b41c2fb152e170e71f81e30 | <ide><path>Cake/Test/TestCase/Console/Command/Task/ExtractTaskTest.php
<ide> public function testExecute() {
<ide> $this->assertRegExp($pattern, $result);
<ide>
<ide> // extract.ctp
<del> $pattern = '/\#: (\\\\|\/)extract\.ctp:15;6\n';
<add> $pattern = '/\#: (\\\\|\/)extract\.ctp:\d+;\d+\n';
<ide> $pattern .= ... | 1 |
Java | Java | remove deleted parameter from javadoc | 72ddd692228de55e4a7abb274c615be436e9dc15 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java
<ide> import android.content.ComponentCallbacks2;
<ide> import android.content.res.Configuration;
<ide> import android.view.View;
<add>import androidx.annotation.NonNull;
<ide> import androidx.annotation.Nullable;
<ide> import andro... | 2 |
Ruby | Ruby | add comments with urls for email previews | cbd4bc84afa354e9b4c50d53a0d6deb7141eb15d | <ide><path>railties/lib/rails/generators/test_unit/mailer/templates/preview.rb
<ide> <% module_namespacing do -%>
<add># Preview all emails at http://localhost:3000/rails/mailers/<%= file_path %>
<ide> class <%= class_name %>Preview < ActionMailer::Preview
<ide> <% actions.each do |action| -%>
<ide>
<add> # Preview t... | 2 |
Ruby | Ruby | fix failing tests in new callbacks | 64ae5b56fff7c51fd436aaf81b8f30488cce3a2d | <ide><path>activesupport/lib/active_support/new_callbacks.rb
<ide> def #{method_name}(&blk)
<ide>
<ide> def _normalize_legacy_filter(kind, filter)
<ide> if !filter.respond_to?(kind) && filter.respond_to?(:filter)
<del> filter.class_eval(
<add> filter.metaclass.class_eval(
<ide> ... | 1 |
Ruby | Ruby | handle new non-string xcode version | b69d71edea36ed8845801c037a72e92dace248a8 | <ide><path>Library/Homebrew/extend/os/mac/system_config.rb
<ide> def xcode
<ide> if instance_variable_defined?(:@xcode)
<ide> @xcode
<ide> elsif MacOS::Xcode.installed?
<del> @xcode = MacOS::Xcode.version
<add> @xcode = MacOS::Xcode.version.to_s
<ide> @xcode += " => #{MacOS::Xc... | 1 |
PHP | PHP | fix psalm errors | 8fc50b698c64ff25cfe87198d8dcc69233ec9fc1 | <ide><path>src/Console/ConsoleOptionParser.php
<ide> public function help(?string $subcommand = null, string $format = 'text', int $w
<ide> return (string)$formatter->xml();
<ide> }
<ide> }
<add> $subcommand = (string)$subcommand;
<ide>
<ide> if (isset($this->_subcomm... | 2 |
Javascript | Javascript | add count to array computed meta | acefb532e2e5f51f32f593e3038e0ad20b91d913 | <ide><path>packages_es6/ember-runtime/lib/computed/reduce_computed.js
<ide> DependentArraysObserver.prototype = {
<ide>
<ide> forEach(itemPropertyKeys, removeObservers, this);
<ide>
<del> changeMeta = createChangeMeta(dependentArray, item, itemIndex, this.instanceMeta.propertyName, this.cp);
<add> cha... | 2 |
Javascript | Javascript | remove debugger statement from unit test | 0ffa758cd39fbc11c38fe00011457c218feb39f3 | <ide><path>packages/sproutcore-handlebars/tests/handlebars_test.js
<ide> test("should not enter an infinite loop when binding an attribute in Handlebars"
<ide> classNames: ['app-link'],
<ide> tagName: 'a',
<ide> attributeBindings: ['href'],
<del> // href: '#none',
<del> href: function(key, value) {
<d... | 1 |
Python | Python | add support for collection routes to simplerouter | d72603bc6a16112008959c5267839f819c2bc43a | <ide><path>rest_framework/decorators.py
<ide> def link(**kwargs):
<ide> """
<ide> def decorator(func):
<ide> func.bind_to_methods = ['get']
<add> func.collection = False
<ide> func.kwargs = kwargs
<ide> return func
<ide> return decorator
<ide> def action(methods=['post'], **kw... | 3 |
PHP | PHP | refactor the validate required method for clarity | dae283943fed8639236fb30ef9127eb0bcc74cc9 | <ide><path>laravel/validator.php
<ide> protected function error($attribute, $rule, $parameters)
<ide> */
<ide> protected function validate_required($attribute, $value)
<ide> {
<del> return ! (is_null($value) or (is_string($value) and trim($value) === ''));
<add> if (is_null($value))
<add> {
<add> return false;... | 1 |
Javascript | Javascript | simplify code and remove unused properties | 1eec5f091ab00860539ac2474e47232b31925cea | <ide><path>lib/_http_common.js
<ide> function parserOnMessageComplete() {
<ide> parser._url = '';
<ide> }
<ide>
<del> if (!stream.upgrade)
<del> // For upgraded connections, also emit this after parser.execute
<del> stream.push(null);
<del> }
<del>
<del> if (stream && !parser.incoming._pending... | 3 |
PHP | PHP | close php tags for ajax tests on swarm | f6e86c3ca4d527d5453a0b5b9591ef38b5d3c000 | <ide><path>test/data/errorWithJSON.php
<ide> header("HTTP/1.0 400 Bad Request");
<ide> header("Content-Type: application/json");
<ide>
<del>echo '{ "code": 40, "message": "Bad Request" }';
<ide>\ No newline at end of file
<add>echo '{ "code": 40, "message": "Bad Request" }';
<add>
<add>?>
<ide>\ No newline at end of f... | 3 |
Javascript | Javascript | change support test to be wwa-friendly | 85af4e6412e49c2e6a872feef00718a46c2fa2ce | <ide><path>src/manipulation/support.js
<ide> define([
<ide>
<ide> (function() {
<ide> var fragment = document.createDocumentFragment(),
<del> div = fragment.appendChild( document.createElement( "div" ) );
<add> div = fragment.appendChild( document.createElement( "div" ) ),
<add> input = document.createElement( "in... | 1 |
Python | Python | fix the batch_size of the ncf benchmark | f519c0157718b13d3c95fdefafb43b9ae8c84899 | <ide><path>official/recommendation/ncf_keras_benchmark.py
<ide> def __init__(self,
<ide> default_flags['num_gpus'] = 1
<ide> default_flags['train_epochs'] = 14
<ide> default_flags['clean'] = True
<del> default_flags['batch_size'] = 16000
<add> default_flags['batch_size'] = 160000
<ide> default_fla... | 1 |
Text | Text | add a question about autoplay | e5a240a63118a2f9dfe487b6ae493e6ae4bc650a | <ide><path>docs/faq.md
<ide> * [If you don't think you can fix the issue or add the feature](#if-you-dont-think-you-can-fix-the-issue-or-add-the-feature)
<ide> * [Q: What is a reduced test case?](#q-what-is-a-reduced-test-case)
<ide> * [Q: What media formats does video.js support?](#q-what-media-formats-does-videojs-... | 1 |
PHP | PHP | add a test for auto-tables with an alias | f6cc721b0633cdfabf31fbe98c474bb68891c0cd | <ide><path>tests/TestCase/ORM/TableRegistryTest.php
<ide> public function testGet()
<ide> $this->assertEquals('my_articles', $result->table());
<ide> }
<ide>
<add> /**
<add> * Are auto-models instanciated correctly? How about when they have an alias?
<add> *
<add> * @return void
<add> */... | 1 |
Ruby | Ruby | remove unused requires | 6d5eefd453c641c317f3cdfa1286f07cfc5b11e7 | <ide><path>activerecord/test/cases/associations/has_many_associations_test.rb
<ide> require "models/image"
<ide> require "models/post"
<ide> require "models/author"
<del>require "models/book"
<ide> require "models/essay"
<ide> require "models/comment"
<ide> require "models/person"
<ide> require "models/minivan"
<ide> r... | 1 |
Javascript | Javascript | add rewrites in storybook preset | b87b2d46eacccc09cc81e37e7904427d4fcc990b | <ide><path>packages/next-plugin-storybook/preset.js
<ide> async function webpackFinal(config) {
<ide> target: 'server',
<ide> config: nextConfig,
<ide> buildId: 'storybook',
<add> rewrites: [],
<ide> })
<ide>
<ide> config.plugins = [...config.plugins, ...nextWebpackConfig.plugins] | 1 |
Javascript | Javascript | add weak event handlers | 5ef4c64e5b912aa2f90d73ea08753362ec396c36 | <ide><path>lib/events.js
<ide> function getEventListeners(emitterOrTarget, type) {
<ide> const listeners = [];
<ide> let handler = root?.next;
<ide> while (handler?.listener !== undefined) {
<del> ArrayPrototypePush(listeners, handler.listener);
<add> const listener = handler.listener?.deref ?
<ad... | 4 |
Javascript | Javascript | remove unused swc option | cf9eb36e7cf994bd593a7be3aaa9e3d4639ea60a | <ide><path>packages/next/build/webpack/loaders/next-swc-loader.js
<ide> function getSWCOptions({
<ide> : {}),
<ide> // Disables getStaticProps/getServerSideProps tree shaking on the server compilation for pages
<ide> disableNextSsg: true,
<del> allowWrongLineComments: true,
<ide> pagesDir... | 1 |
Javascript | Javascript | allow direct access to data_priv for cleanup | c1b8edfcc90961290f7555c55851209bc860c0b4 | <ide><path>src/data.js
<ide> Data.prototype = {
<ide> );
<ide> },
<ide> discard: function( owner ) {
<del> delete this.cache[ this.key( owner ) ];
<add> if ( owner[ this.expando ] ) {
<add> delete this.cache[ owner[ this.expando ] ];
<add> }
<ide> }
<ide> };
<ide>
<ide><path>src/manipulation.js
<ide> jQuery.... | 2 |
Javascript | Javascript | reduce run time for misc benchmark tests | ce848a450152095c3d0f5b7a4acdd2252a1f9549 | <ide><path>benchmark/misc/console.js
<ide> function runUsingArgumentsAndApply(n, concat) {
<ide> function main(conf) {
<ide> const n = +conf.n;
<ide> switch (conf.method) {
<add> // '' is a default case for tests
<add> case '':
<ide> case 'restAndSpread':
<ide> runUsingRestAndSpread(n, conf.concat);... | 4 |
Javascript | Javascript | fix typo in array mixin docs | a8384b2aeee841bcfa6c400d538dee03c27a12ba | <ide><path>packages/ember-runtime/lib/mixins/array.js
<ide> Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
<ide> Adds an array observer to the receiving array. The array observer object
<ide> normally must implement two methods:
<ide>
<del> * `arrayWillChange(start, removeC... | 1 |
PHP | PHP | failed-table | 4ea441ea82bac647ed802ab96bf4ec841bffadb1 | <ide><path>src/Illuminate/Queue/Console/FailedTableCommand.php
<ide> protected function createBaseMigration()
<ide> {
<ide> $name = 'create_failed_jobs_table';
<ide>
<del> $path = $this->laravel['path'].'/database/migrations';
<add> $path = $this->laravel['path.database'].'/migrations';
<ide>
<ide> return $thi... | 1 |
Javascript | Javascript | use ternary operator simplify statement | 5d06a374ea0f8b8d75dc70ba8e765847818dd15b | <ide><path>lib/internal/dns/promises.js
<ide> function createLookupPromise(family, hostname, all, hints, verbatim) {
<ide> return new Promise((resolve, reject) => {
<ide> if (!hostname) {
<ide> emitInvalidHostnameWarning(hostname);
<del> if (all)
<del> resolve([]);
<del> else
<del> r... | 1 |
Python | Python | improve check copies | 1f7e40d04f41569e41a2d606261fceac02a801e9 | <ide><path>utils/check_copies.py
<ide> def is_copy_consistent(filename, overwrite=False):
<ide>
<ide> # Test for a diff and act accordingly.
<ide> if observed_code != theoretical_code:
<del> diffs.append([object_name, start_index])
<add> diff_index = start_index + 1
<add> ... | 1 |
Ruby | Ruby | use formula from keg for local bottle installs | a0dfe4aa180f602af0c4b5ed6d9c0ffd315dbc6d | <ide><path>Library/Homebrew/formula_installer.rb
<ide> def post_install
<ide> -I #{$LOAD_PATH.join(File::PATH_SEPARATOR)}
<ide> --
<ide> #{HOMEBREW_LIBRARY_PATH}/postinstall.rb
<del> #{formula.path}
<ide> ]
<ide>
<add> args << if formula.local_bottle_path.present?
<add> formula.prefi... | 1 |
Python | Python | add test for ticket #390 | 92ce54ed154e972e649800fcfceda52458c18664 | <ide><path>numpy/core/tests/test_records.py
<del>from os import path
<add>import numpy as np
<ide> from numpy.testing import *
<add>from os import path
<ide> set_package_path()
<del>import numpy.core
<del>reload(numpy.core)
<del>import numpy
<del>from numpy.core import *
<ide> restore_path()
<ide>
<ide> class TestFrom... | 1 |
Javascript | Javascript | remove usage of require('util') in `per_thread.js` | 4a07a62d04b219ca72271f7cda0880a2a4300d05 | <ide><path>lib/internal/process/per_thread.js
<ide> const {
<ide> ERR_UNKNOWN_SIGNAL
<ide> }
<ide> } = require('internal/errors');
<del>const util = require('util');
<add>const format = require('internal/util/inspect').format;
<ide> const constants = internalBinding('constants').os.signals;
<ide>
<ide> function ... | 1 |
Python | Python | fix typo in recurrent | 1c6ab36c63044199c2219e9c9cb1f03e1b54361f | <ide><path>keras/layers/recurrent.py
<ide> def build(self):
<ide> raise Exception('If a RNN is stateful, a complete ' +
<ide> 'input_shape must be provided ' +
<ide> '(including batch size).')
<del> self.states = [K.zeros(input_s... | 1 |
Go | Go | move docker rmi to a job | 564e6bc7802b606d829a498eee0c2bb8ce4032e1 | <ide><path>api.go
<ide> func deleteImages(srv *Server, version float64, w http.ResponseWriter, r *http.R
<ide> if vars == nil {
<ide> return fmt.Errorf("Missing parameter")
<ide> }
<del> name := vars["name"]
<del> imgs, err := srv.ImageDelete(name, version > 1.1)
<del> if err != nil {
<add> var (
<add> buffer = by... | 6 |
Text | Text | add content in mutable section of lists | 3189751ae78026ac4c82bda07943175bfdc2f002 | <ide><path>guide/english/python/lists/index.md
<ide> Also, we can do this:
<ide> ```
<ide> **Mutable:**
<ide>
<del>`lists` are mutable containers. Mutable containers are containers that allow changes to which objects are contained by the container. **TODO: ADD MORE?**
<add>`lists` are mutable containers. Mutable conta... | 1 |
Python | Python | modify config before super().__init__ | 32eb29fef9e73a0ade63dcc86c1fceb0bba68a5b | <ide><path>src/transformers/models/bart/modeling_bart.py
<ide> def forward(self, *args, **kwargs):
<ide>
<ide> class BartForCausalLM(BartPretrainedModel):
<ide> def __init__(self, config):
<del> super().__init__(config)
<ide> config = copy.deepcopy(config)
<ide> config.is_decoder = True
<ide... | 10 |
Javascript | Javascript | fix spec title for angular.formatter.index | da4b8a74c3c84aeccf2ecb8b5d74d22a579f2438 | <ide><path>src/formatters.js
<ide> angularFormatter.trim = formatter(
<ide> * </div>
<ide> *
<ide> * @scenario
<del> * it('should format trim', function(){
<add> * it('should retrieve object by index', function(){
<ide> * expect(binding('currentUser.password')).toEqual('guest');
<ide> * select('currentUser').o... | 1 |
Go | Go | fix escape-keys by preserving input if invalid | 0fb6190243d6101f96283e487cd4911142a05483 | <ide><path>container/container.go
<ide> func copyEscapable(dst io.Writer, src io.ReadCloser, keys []byte) (written int64
<ide> nr, er := src.Read(buf)
<ide> if nr > 0 {
<ide> // ---- Docker addition
<add> preservBuf := []byte{}
<ide> for i, key := range keys {
<add> preservBuf = append(preservBuf, buf[0:... | 2 |
Javascript | Javascript | avoid memory leak in lazyset | ada11a286dfff0f835f247d2a3485b3dec5a4c07 | <ide><path>lib/util/LazySet.js
<ide> class LazySet {
<ide> } else {
<ide> this._toMerge.add(iterable);
<ide> this._needMerge = true;
<add> // Avoid a memory leak
<add> if (this._toMerge.size > 100000) this._merge();
<ide> }
<ide> return this;
<ide> } | 1 |
Ruby | Ruby | extract attr_rw from formula for reuse | b97b013fcea50c783faf85e7c12f7844eb86e4b3 | <ide><path>Library/Homebrew/compilers.rb
<ide> def build
<ide>
<ide> class CompilerFailure
<ide> attr_reader :compiler
<add> attr_rw :build, :cause
<ide>
<ide> def initialize compiler, &block
<ide> @compiler = compiler
<ide> instance_eval(&block) if block_given?
<del> @build ||= 9999
<del> end
<del>
... | 7 |
Go | Go | remove head req & pass down response | c47ebe7a351bc639028cd48aed9d2fa2310a2a65 | <ide><path>registry/registry.go
<ide> func (r *Registry) GetRemoteImageJSON(imgID, registry string, token []string) ([
<ide>
<ide> func (r *Registry) GetRemoteImageLayer(imgID, registry string, token []string, imgSize int64) (io.ReadCloser, error) {
<ide> var (
<del> retries = 5
<del> headRes *http.Response
<de... | 1 |
Text | Text | add missing links to features.md | 62076a4bc8c2cc257336331289443b9dbd5cb850 | <ide><path>FEATURES.md
<ide> for a detailed explanation.
<ide> Enables `Ember.run.bind` which is ember run-loop aware variation of
<ide> jQuery.proxy. Useful for integrating with 3rd party callbacks.
<ide>
<add> Added in [161113](https://github.com/emberjs/ember.js/commit/161113a9e5fad7f6dfde09a053166a05660a0051... | 1 |
Mixed | Javascript | return this from clientrequest#destroy() | cad76da198ff59e16d3439cbdb5793750c01f382 | <ide><path>doc/api/http.md
<ide> is finished.
<ide> ### `request.destroy([error])`
<ide> <!-- YAML
<ide> added: v0.3.0
<add>changes:
<add> - version: REPLACEME
<add> pr-url: https://github.com/nodejs/node/pull/32789
<add> description: The function returns `this` for consistency with other Readable
<add> ... | 3 |
Python | Python | drop unused import | c1a40c58999a3ca3dd667d092051dd719fc0588b | <ide><path>rest_framework/views.py
<ide> from rest_framework.request import Request
<ide> from rest_framework.settings import api_settings
<ide> import re
<del>import warnings
<ide>
<ide>
<ide> def _remove_trailing_string(content, trailing): | 1 |
Go | Go | wrap some errors | 744940056d7335cad4b6785960ec0e5760d76807 | <ide><path>client/request.go
<ide> func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp
<ide> }
<ide>
<ide> if cli.scheme == "https" && strings.Contains(err.Error(), "bad certificate") {
<del> return serverResp, fmt.Errorf("The server probably has client authentication (--tlsverify) e... | 1 |
PHP | PHP | add message class for email | ffa43b6eaec52fce74e153b27a99f1d717948ac2 | <ide><path>src/Mailer/Email.php
<ide> namespace Cake\Mailer;
<ide>
<ide> use BadMethodCallException;
<del>use Cake\Core\Configure;
<ide> use Cake\Core\StaticConfigTrait;
<ide> use Cake\Log\Log;
<del>use Cake\Utility\Text;
<ide> use Cake\View\ViewBuilder;
<ide> use InvalidArgumentException;
<ide> use JsonSerializable;
... | 5 |
PHP | PHP | allow collection prepend with a key | 7cdbd874d82d201e2a100b4684ec04e707a4184d | <ide><path>src/Illuminate/Support/Collection.php
<ide> public function pop()
<ide> * Push an item onto the beginning of the collection.
<ide> *
<ide> * @param mixed $value
<add> * @param mixed $key
<ide> * @return $this
<ide> */
<del> public function prepend($value)
<add> public f... | 2 |
Text | Text | move the code of conduct to tsc repository | 258494c2f8834d1401cc57db9ee434e1dacfa348 | <ide><path>CODE_OF_CONDUCT.md
<ide> # Code of Conduct
<ide>
<del>## Conduct
<del>
<del>* We are committed to providing a friendly, safe and welcoming
<del> environment for all, regardless of level of experience, gender
<del> identity and expression, sexual orientation, disability,
<del> personal appearance, body si... | 2 |
Javascript | Javascript | remove outdated file | c637ca0d031ac35b716303258e82a1a8eb8f7a27 | <ide><path>packager/src/Cache/__mocks__/Cache.js
<del>/**
<del> * Copyright (c) 2015-present, Facebook, Inc.
<del> * All rights reserved.
<del> *
<del> * This source code is licensed under the BSD-style license found in the
<del> * LICENSE file in the root directory of this source tree. An additional grant
<del> * of p... | 1 |
Text | Text | remove lstm_benchmark from examples/readme.md | 2abf10c3a429a7c8146925930d8111b7a71dbdba | <ide><path>examples/README.md
<ide> Trains a FastText model on the IMDB sentiment classification task.
<ide> [imdb_lstm.py](imdb_lstm.py)
<ide> Trains an LSTM model on the IMDB sentiment classification task.
<ide>
<del>[lstm_benchmark.py](lstm_benchmark.py)
<del>Compares different LSTM implementations on the IMDB sent... | 1 |
Ruby | Ruby | handle location indicating the current dir | 5e2f87f7ac860fc18105ef60a63c141b405ea0f8 | <ide><path>Library/Homebrew/download_strategy.rb
<ide> def resolve_url_basename_time(url)
<ide> elsif location.start_with?("/")
<ide> uri = URI(current_url)
<ide> "#{uri.scheme}://#{uri.host}#{location}"
<add> elsif location.start_with?("./")
<add> uri = URI(current_url)
<add> "... | 1 |
Ruby | Ruby | add specs for `caskloader` | efbc1b0cb489ccc35110b4013145ded2abd3e03f | <ide><path>Library/Homebrew/test/cask/cask_loader/from_content_loader_spec.rb
<add>describe Hbc::CaskLoader::FromContentLoader do
<add> alias_matcher :be_able_to_load, :be_can_load
<add>
<add> describe "::can_load?" do
<add> it "returns true for Casks specified with `cask \"token\" do … end`" do
<add> expect(... | 2 |
Python | Python | add xlm-roberta to glue script | a26ce4dee116a1d5d9099c8a94e22d1e31ad631c | <ide><path>examples/run_glue.py
<ide> AlbertConfig,
<ide> AlbertForSequenceClassification,
<ide> AlbertTokenizer,
<add> XLMRobertaConfig,
<add> XLMRobe... | 1 |
Javascript | Javascript | use proper names for scroll metric properties | 2aa5631e2eba008327b71f529fb9a975fecbcf99 | <ide><path>src/event/synthetic/SyntheticMouseEvent.js
<ide> var MouseEventInterface = {
<ide> pageX: function(event) {
<ide> return 'pageX' in event ?
<ide> event.pageX :
<del> event.clientX + ViewportMetrics.currentPageScrollLeft;
<add> event.clientX + ViewportMetrics.currentScrollLeft;
<ide> }... | 1 |
Text | Text | fix some errors in translation | 889eeea46efb8fe9fefff9918b5e97a513997dcc | <ide><path>threejs/lessons/fr/threejs-lights.md
<ide> Title: Lumières en Three.js
<del>Description: Configuration des mulières
<del>TOC: Lights
<add>Description: Configuration des lumières
<add>TOC: Lumières
<ide>
<ide> Cet article fait partie d'une série consacrée à Three.js.
<ide> Le premier article s'intitule [Prin... | 1 |
Go | Go | remove deprecated environment.daemonplatform() | 18a771a761654e241ae8d1e85aa0c0a6164c5d27 | <ide><path>integration-cli/docker_api_build_test.go
<ide> func (s *DockerSuite) TestBuildAPIDockerFileRemote(c *check.C) {
<ide> testRequires(c, NotUserNamespace)
<ide>
<ide> var testD string
<del> if testEnv.DaemonPlatform() == "windows" {
<add> if testEnv.OSType == "windows" {
<ide> testD = `FROM busybox
<ide> R... | 25 |
Javascript | Javascript | add a bookmarklet to comment on questions | 848a151ff815a242ba61e21c9fc384e0a6678934 | <ide><path>bots/question-bookmarklet.js
<add>javascript:(function(){$('#new_comment_field')[0].value='Hey and thanks for reporting this!\n\nThis issue looks like a question - please use [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native) for questions. It\'s the best system for Q&A and the best way... | 1 |
Javascript | Javascript | fix typo in listviewdatasource documentation | d16c6e926c02358cbd51a585daa413cd36099e27 | <ide><path>Libraries/CustomComponents/ListView/ListViewDataSource.js
<ide> class ListViewDataSource {
<ide> * construction an extractor to get the interesting information was defined
<ide> * (or the default was used).
<ide> *
<del> * The `rowIdentities` is is a 2D array of identifiers for rows.
<add> * The... | 1 |
Javascript | Javascript | adjust globs for ts files | 9a2f9fb33f0df89bcc1147a70155027f5db4eef4 | <ide><path>.eslintrc.js
<ide> module.exports = {
<ide> },
<ide> {
<ide> files: [
<del> 'packages/*/tests/**/*.js',
<del> 'packages/@ember/*/tests/**/*.js',
<del> 'packages/@ember/-internals/*/tests/**/*.js',
<del> 'packages/internal-test-helpers/**/*.js',
<add> 'packages... | 1 |
Ruby | Ruby | compare ruby version with correct way | 0014790b2a8a7830685ec91b68d457ec37617f26 | <ide><path>railties/lib/rails/ruby_version_check.rb
<ide> # frozen_string_literal: true
<ide>
<del>if RUBY_VERSION < "2.4.1" && RUBY_ENGINE == "ruby"
<add>if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.4.1") && RUBY_ENGINE == "ruby"
<ide> desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_V... | 1 |
PHP | PHP | use namespace imports | 44c11585f127764278f979fa04307b805df58792 | <ide><path>tests/Routing/RoutingUrlGeneratorTest.php
<ide> <?php
<ide>
<add>use Illuminate\Http\Request;
<add>use Illuminate\Routing\Route;
<ide> use Illuminate\Routing\UrlGenerator;
<add>use Illuminate\Routing\RouteCollection;
<ide> use Illuminate\Contracts\Routing\UrlRoutable;
<ide>
<ide> class RoutingUrlGeneratorT... | 1 |
PHP | PHP | update response tests | fa998d716d6009538ac6167efd4bdf32b2980ed2 | <ide><path>tests/TestCase/Network/ResponseTest.php
<ide> public function testHttpCodes()
<ide> {
<ide> $response = new Response();
<ide> $result = $response->httpCodes();
<del> $this->assertEquals(40, count($result));
<add> $this->assertEquals(41, count($result));
<ide>
<ide> ... | 1 |
Javascript | Javascript | set decodestrings to false, test | 2ffc8ac3017eb2246deb99019aacd618e5c088c3 | <ide><path>benchmark/http2/write.js
<add>'use strict';
<add>
<add>const common = require('../common.js');
<add>const PORT = common.PORT;
<add>
<add>var bench = common.createBenchmark(main, {
<add> streams: [100, 200, 1000],
<add> length: [64 * 1024, 128 * 1024, 256 * 1024, 1024 * 1024],
<add>}, { flags: ['--expose-ht... | 3 |
Text | Text | fix typographical errors in introductory texts | 402ccb36f15777b18952104bc2f7afcd7f2ae30e | <ide><path>client/src/pages/learn/information-security-and-quality-assurance/advanced-node-and-express/index.md
<ide> superBlock: Information Security and Quality Assurance
<ide>
<ide> *Authentication* is the process or action of verifying the identity of a user or process. Up to this point you have not been able to c... | 1 |
Python | Python | fix a logging issue | 4d2c26f95aad62f2ea7fa6ad0e5b73def13cb874 | <ide><path>official/vision/modeling/backbones/vit.py
<ide> def build(self, inputs_shape):
<ide> def _interpolate(self, pos_embedding: tf.Tensor, from_shape: Tuple[int, int],
<ide> to_shape: Tuple[int, int]) -> tf.Tensor:
<ide> """Interpolates the positional embeddings."""
<del> logging.info(... | 1 |
Text | Text | add link to 'pry' in debugging guide [ci skip] | a170304174133cafd2269423428042f68afe3a62 | <ide><path>guides/source/debugging_rails_applications.md
<ide> development that will end your tailing of development.log. Have all information
<ide> about your Rails app requests in the browser — in the Developer Tools panel.
<ide> Provides insight to db/rendering/total times, parameter list, rendered views and
<ide> m... | 1 |
Ruby | Ruby | rewrite conditions in more natural way | 4489a8684f258c6a56d3e44397fae15bc6784ddb | <ide><path>Library/Homebrew/formula_installer.rb
<ide> def check_install_sanity
<ide>
<ide> if f.installed?
<ide> msg = "#{f}-#{f.installed_version} already installed"
<del> msg << ", it's just not linked" if not f.linked_keg.symlink? and not f.keg_only?
<add> msg << ", it's just not linked" unless... | 1 |
Go | Go | drop side effect from registerlinks() | 388fe4aea82a37f38ff96db5594643b14b3f73e8 | <ide><path>daemon/daemon_unix.go
<ide> func getUnmountOnShutdownPath(config *config.Config) string {
<ide> return filepath.Join(config.ExecRoot, "unmount-on-shutdown")
<ide> }
<ide>
<del>// registerLinks writes the links to a file.
<add>// registerLinks registers network links between container and other containers
<... | 1 |
Java | Java | predict specific object type in ehcachefactorybean | 0690b58878f0e6c57a443720244049b16ba3cfd5 | <ide><path>spring-context/src/main/java/org/springframework/cache/ehcache/EhCacheFactoryBean.java
<ide> /*
<del> * Copyright 2002-2011 the original author or authors.
<add> * Copyright 2002-2012 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * yo... | 2 |
PHP | PHP | improve error handling and output messages display | ee684832b5d51fbab39d5befefa499c0a58595f9 | <ide><path>src/Shell/Task/AssetsTask.php
<ide> protected function _process() {
<ide>
<ide> $link = Inflector::underscore($plugin);
<ide> $dir = WWW_ROOT;
<del> if (file_exists($dir . $link)) {
<del> $this->out($link . ' already exists');
<del> $this->out();
<del> continue;
<del> }
<ide>
<ide> if... | 1 |
Ruby | Ruby | avoid class_attrs for unused collection callbacks | bfcac1359e6a1848c07ced1b301a339b54fb260d | <ide><path>activerecord/lib/active_record/associations/builder/collection_association.rb
<ide> def self.define_extensions(model, name, &block)
<ide> def self.define_callback(model, callback_name, name, options)
<ide> full_callback_name = "#{callback_name}_for_#{name}"
<ide>
<del> unless model.method_def... | 2 |
Javascript | Javascript | remove deprecated screen api from the cache | b2d3c569b6f11fb46d19750a0f02fb27141102f0 | <ide><path>src/module-cache.js
<ide> function registerBuiltins(devMode) {
<ide> 'crash-reporter',
<ide> 'ipc-renderer',
<ide> 'remote',
<del> 'screen'
<add> //'screen' Deprecated https://www.electronjs.org/docs/breaking-changes#api-changed-electronscreen-in-the-renderer-process-should-be-accessed-via-... | 1 |
Javascript | Javascript | update head-manager to compress better | 513a7d5b5c44a1a288b68a9c06616e3356808098 | <ide><path>packages/next/client/head-manager.js
<ide> const DOMAttributeNames = {
<ide> httpEquiv: 'http-equiv',
<ide> }
<ide>
<del>export default class HeadManager {
<del> constructor() {
<del> this.updatePromise = null
<del> }
<del>
<del> updateHead = head => {
<del> const promise = (this.updatePromise = ... | 3 |
PHP | PHP | remove forgotten echo statement | e9952e5a07d4cbd664fdac743ede25f10b7abb1c | <ide><path>src/Illuminate/Foundation/Console/ServeCommand.php
<ide> public function handle()
<ide> return $this->handle();
<ide> }
<ide>
<del> echo $status;
<del>
<ide> return $status;
<ide> }
<ide> | 1 |
Text | Text | use code markup/markdown in headers | fc949343bf1fd6ec1222e152414209c1881899d6 | <ide><path>doc/api/inspector.md
<ide> It can be accessed using:
<ide> const inspector = require('inspector');
<ide> ```
<ide>
<del>## inspector.close()
<add>## `inspector.close()`
<ide>
<ide> Deactivate the inspector. Blocks until there are no active connections.
<ide>
<del>## inspector.console
<add>## `inspector.co... | 1 |
Python | Python | update documentation for preprocessing layers | 069e95a5c8075555b3bd2895bdbf34ed68bb3bba | <ide><path>keras/layers/preprocessing/category_encoding.py
<ide> class CategoryEncoding(base_layer.Layer):
<ide> `(..., num_tokens)`.
<ide> - `"count"`: Like `"multi_hot"`, but the int array contains a count of
<ide> the number of times the token at that index appeared in the sample.
<add> ... | 4 |
Python | Python | update openstack identity tests | 688839519d2212f2849eac26985961515a6130ea | <ide><path>libcloud/test/common/test_openstack_identity.py
<ide> def test_auth_url_is_correctly_assembled(self):
<ide> ),
<ide> ]
<ide>
<del> APPEND = 0
<del> NOTAPPEND = 1
<del>
<ide> auth_urls = [
<del> ("https://auth.api.example.com", APPEND, ""),
<del> ... | 1 |
Python | Python | add batch dimension in encode | d6dde438eaf7117fa17de0c4ede3e5126989dfdf | <ide><path>examples/run_tf_glue.py
<ide> tf_model.compile(optimizer=optimizer, loss=loss, metrics=['sparse_categorical_accuracy'])
<ide>
<ide> # Train and evaluate using tf.keras.Model.fit()
<del>tf_model.fit(train_dataset, epochs=1, steps_per_epoch=115, validation_data=valid_dataset, validation_steps=7)
<add>tf_model... | 2 |
Java | Java | fix javadoc syntax | 2980e592980e67dd41a0b2f5a079a8d82a252f87 | <ide><path>spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java
<ide> * 1. BeanNameAware's {@code setBeanName}<br>
<ide> * 2. BeanClassLoaderAware's {@code setBeanClassLoader}<br>
<ide> * 3. BeanFactoryAware's {@code setBeanFactory}<br>
<del> * 4. EnvironmentAware's {@code setEnvironment}
<d... | 1 |
Javascript | Javascript | use tabindex instead of tabindex | cb31d4cb6d2a9b8e4e04c6abb7729c74fb8f86a1 | <ide><path>website/core/AlgoliaDocSearch.js
<ide> var AlgoliaDocSearch = React.createClass({
<ide> render: function() {
<ide> return (
<ide> <div className="algolia-search-wrapper">
<del> <input id="algolia-doc-search" tabindex="0" type="text" placeholder="Search docs..." />
<add> <input id="a... | 1 |
PHP | PHP | remove extra whitespace | 322f7fb15246956ae6decc6768cea239c84a4bd1 | <ide><path>config/cache.php
<ide> env('MEMCACHED_PASSWORD'),
<ide> ],
<ide> 'options' => [
<del> // Memcached::OPT_CONNECT_TIMEOUT => 2000,
<add> // Memcached::OPT_CONNECT_TIMEOUT => 2000,
<ide> ],
<ide> 'servers' => [
<ide> ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.