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 | remove unused variable | 584ebed482907abb3b18c65495cd62fe5f643a89 | <ide><path>actionpack/lib/action_view/helpers/form_options_helper.rb
<ide> def grouped_options_for_select(grouped_options, selected_key = nil, options = {}
<ide> divider = options[:divider]
<ide> else
<ide> prompt = options
<del> options = {}
<ide> message = "Passing the ... | 1 |
Python | Python | rewrite tensorflow train_step and test_step | 349f1c85d35167c3a416a19ca869358c8e0e4b0c | <ide><path>src/transformers/modeling_tf_utils.py
<ide> class TFPreTrainedModel(tf.keras.Model, TFModelUtilsMixin, TFGenerationMixin, Pu
<ide> main_input_name = "input_ids"
<ide> _auto_class = None
<ide> _using_dummy_loss = None
<add> _label_to_output_map = None
<ide>
<ide> # a list of re pattern of ... | 2 |
Python | Python | fix a typo | 77ce4470311e8f8094b8a06f21fded80dc5c57da | <ide><path>libcloud/compute/drivers/openstack.py
<ide> def create_node(self, **kwargs):
<ide>
<ide>
<ide> :keyword networks: The server is launched into a set of Networks.
<del> :type networks: :class:`OpenStackNetwork`
<add> :type networks: ``list`` of :class:`OpenStackNetwork`
<... | 1 |
Text | Text | add daeyeon to triagers | 9fa110087b5bdc306955cbaa0e14ec6e1695238f | <ide><path>README.md
<ide> maintaining the Node.js project.
<ide>
<ide> * [Ayase-252](https://github.com/Ayase-252) -
<ide> **Qingyu Deng** <<i@ayase-lab.com>>
<add>* [daeyeon](https://github.com/daeyeon) -
<add> **Daeyeon Jeong** <<daeyeon.dev@gmail.com>> (he/him)
<ide> * [F3n67u](https://github.com/F3n67u) -
<ide... | 1 |
Python | Python | update lexeme ranks for loaded vectors | 0e4b96c97e1959e7c78d0c35063ff021f2189f82 | <ide><path>spacy/training/initialize.py
<ide> def load_vectors_into_model(
<ide> logger.warning(Warnings.W112.format(name=name))
<ide>
<ide> nlp.vocab.vectors = vectors_nlp.vocab.vectors
<add> for lex in nlp.vocab:
<add> lex.rank = nlp.vocab.vectors.key2row.get(lex.orth, OOV_RANK)
<ide> if ad... | 1 |
Python | Python | improve docstrings for various modules | 53796988929d7b5de98cd322fdea9e0a8edec0a1 | <ide><path>airflow/operators/sql.py
<ide> class SQLIntervalCheckOperator(BaseSQLOperator):
<ide> :type table: str
<ide> :param conn_id: the connection ID used to connect to the database.
<ide> :type conn_id: str
<del> :param database: name of database which overwrite the defined one in connection
<del> ... | 4 |
PHP | PHP | fix code style; | d410a6bf3f279b5e766d6d7c2a7bb49fb93c88d9 | <ide><path>tests/Http/HttpRequestTest.php
<ide> public function testMagicMethods()
<ide> $this->assertEquals(empty($request->undefined), true);
<ide>
<ide> // Simulates Route parameters.
<del> $request = Request::create('/example/bar', 'GET', [ 'xyz' => 'overwrited' ]);
<add> $request = R... | 1 |
Ruby | Ruby | remove deprecated formatted named routes | bd729344a7ac747cccaeed983d435fc36c905683 | <ide><path>actionpack/lib/action_dispatch/routing/route_set.rb
<ide> def #{selector}(*args) #
<ide> url_for(#{hash_access_method}(opts)) # url_for(hash_for_users_url(opts))
<ide> ... | 2 |
Text | Text | fix "introduction" link of readme.md | 4222b0e2be92395b75f27bea97789a779a8cde05 | <ide><path>README.md
<ide> Redux co-maintainer [Mark Erikson](https://twitter.com/acemarke) has put togethe
<ide>
<ide> ## Documentation
<ide>
<del>- [Introduction](http://redux.js.org/introduction)
<add>- [Introduction](http://redux.js.org/introduction/getting-started)
<ide> - [Basics](http://redux.js.org/basics/bas... | 1 |
Python | Python | remove unnecessary argument | f74a45c1fe54b4a63c17626baf5572377d179410 | <ide><path>spacy/tests/serialize/test_serialize_tagger.py
<ide>
<ide> @pytest.fixture
<ide> def taggers(en_vocab):
<del> tagger1 = Tagger(en_vocab, True)
<del> tagger2 = Tagger(en_vocab, True)
<add> tagger1 = Tagger(en_vocab)
<add> tagger2 = Tagger(en_vocab)
<ide> tagger1.model = tagger1.Model(None, No... | 1 |
Ruby | Ruby | remove explicit tmpdir deletions | 1aee7c6945c3cbbbbfa2830bb1cf6bf39d4702be | <ide><path>Library/Homebrew/test/audit_test.rb
<ide> def setup
<ide> @dir = mktmpdir
<ide> end
<ide>
<del> def teardown
<del> FileUtils.rm_rf @dir
<del> super
<del> end
<del>
<ide> def formula_text(name, body = nil, options = {})
<ide> path = Pathname.new "#{@dir}/#{name}.rb"
<ide> path.open("w... | 5 |
Text | Text | use uuid method to define the uuid type [ci skip] | c0747e2f39a1c040c50e63fb41e23dfa6e30f2fc | <ide><path>guides/source/active_record_postgresql.md
<ide> extension to use uuid.
<ide> ```ruby
<ide> # db/migrate/20131220144913_create_revisions.rb
<ide> create_table :revisions do |t|
<del> t.column :identifier, :uuid
<add> t.uuid :identifier
<ide> end
<ide>
<ide> # app/models/revision.rb | 1 |
Text | Text | fix v8.6 changelog entry | f55005514c350bbcba77b9664140e1518d7586a7 | <ide><path>doc/changelogs/CHANGELOG_V8.md
<ide> * [[`9e8b1b3ec6`](https://github.com/nodejs/node/commit/9e8b1b3ec6)] - **util**: refactor inspect for performance and more (Ruben Bridgewater) [#14881](https://github.com/nodejs/node/pull/14881)
<ide> * [[`539445890b`](https://github.com/nodejs/node/commit/539445890b)] - ... | 1 |
Ruby | Ruby | move #encode_with to relation | ef8cae60ee330f760e35f7c2ed9497b6918587f9 | <ide><path>activerecord/lib/active_record/relation.rb
<ide> def to_a
<ide> @records
<ide> end
<ide>
<add> # Serializes the relation objects Array.
<add> def encode_with(coder)
<add> coder.represent_seq(nil, to_a)
<add> end
<add>
<ide> def as_json(options = nil) #:nodoc:
<ide> to_a.as_... | 2 |
Ruby | Ruby | fix wrong test description and failure message | 2242317fddaec2d2cca5103b4f79f71d73d25b31 | <ide><path>activemodel/test/cases/validations/validations_context_test.rb
<ide> def validate(record)
<ide> end
<ide> end
<ide>
<del> test "with a class that adds errors on update and validating a new model with no arguments" do
<add> test "with a class that adds errors on create and validating a new model with... | 1 |
Javascript | Javascript | add test for url | abb0bdd53fa6d831de43119fb1d5560afc495677 | <ide><path>test/parallel/test-url-relative.js
<ide> const assert = require('assert');
<ide> const inspect = require('util').inspect;
<ide> const url = require('url');
<ide>
<add>// when source is false
<add>assert.strictEqual(url.resolveObject('', 'foo'), 'foo');
<add>
<ide> /*
<ide> [from, path, expected]
<ide> */ | 1 |
Javascript | Javascript | support cyclic object references in error messages | fa12c3c86af7965d1b9d9a5dd3434755e9e04635 | <ide><path>src/ng/directive/ngRepeat.js
<ide> var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
<ide> });
<ide> throw ngRepeatMinErr('dupes',
<ide> "Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeate... | 1 |
Javascript | Javascript | fix description for `rewritelinks` | a4db4e618779609003abe3957749732d02782561 | <ide><path>src/ng/location.js
<ide> function $LocationProvider(){
<ide> * whether or not a <base> tag is required to be present. If `enabled` and `requireBase` are
<ide> * true, and a base tag is not present, an error will be thrown when `$location` is injected.
<ide> * See the {@link guide/$locati... | 1 |
Text | Text | make minor improvements to fs.realpath() docs | 89d211f54acea642cce65be731f4878555283ff0 | <ide><path>doc/api/fs.md
<ide> changes:
<ide> Asynchronously computes the canonical pathname by resolving `.`, `..` and
<ide> symbolic links.
<ide>
<del>Note that "canonical" does not mean "unique": hard links and bind mounts can
<add>A canonical pathname is not necessarily unique. Hard links and bind mounts can
<ide>... | 1 |
Python | Python | fix escape sequence | 817b0db52132d3a1060e7876f1894554da783673 | <ide><path>spacy/lang/lt/punctuation.py
<ide> )
<ide>
<ide>
<del>_suffixes = ["\."] + list(TOKENIZER_SUFFIXES)
<add>_suffixes = [r"\."] + list(TOKENIZER_SUFFIXES)
<ide>
<ide>
<ide> TOKENIZER_INFIXES = _infixes | 1 |
Mixed | Go | add new `hostconfig` field, `mounts` | fc7b904dced4d18d49c8a6c47ae3f415d16d0c43 | <ide><path>container/container.go
<ide> import (
<ide>
<ide> "github.com/Sirupsen/logrus"
<ide> containertypes "github.com/docker/docker/api/types/container"
<add> mounttypes "github.com/docker/docker/api/types/mount"
<ide> networktypes "github.com/docker/docker/api/types/network"
<ide> "github.com/docker/docker/d... | 30 |
Javascript | Javascript | improve the jsdocs for the `pdfobjects` class | bad15894fc0ceac0cd8823dd4b55689261d29ca1 | <ide><path>src/display/api.js
<ide> const DefaultStandardFontDataFactory =
<ide> */
<ide>
<ide> /**
<del> * @type IPDFStreamFactory
<add> * @type {IPDFStreamFactory}
<ide> * @private
<ide> */
<ide> let createPDFNetworkStream;
<ide> class PDFPageProxy {
<ide> this._transport = transport;
<ide> this._stats = ... | 1 |
Javascript | Javascript | fix incorrect comment example for userid | 1bb4e87dd6a0b3a3a66b72faf5056d3f47caf52b | <ide><path>src/ngResource/resource.js
<ide> function shallowClearAndCopy(src, dst) {
<ide> * read, update, delete) on server-side data like this:
<ide> * ```js
<ide> * var User = $resource('/user/:userId', {userId:'@id'});
<del> * var user = User.get({userId:123}, function() {
<add> * var user = User.get({... | 1 |
Javascript | Javascript | add skipped test for compat mode attrs-proxy | 36225a2df71bdfab5de9580a332963793a294ee1 | <ide><path>packages/ember-views/tests/compat/attrs_proxy_test.js
<add>import View from "ember-views/views/view";
<add>import { runAppend, runDestroy } from "ember-runtime/tests/utils";
<add>import compile from "ember-template-compiler/system/compile";
<add>import Registry from "container/registry";
<add>
<add>var view,... | 1 |
PHP | PHP | fix error on php 5.4 | 201dae5d527ccd01b30b82d9c3793ebac9a425e9 | <ide><path>src/Controller/Component/AuthComponent.php
<ide> public function startup(Event $event) {
<ide> return $this->_unauthenticated($controller);
<ide> }
<ide>
<add> $authorize = $this->config('authorize');
<ide> if ($this->_isLoginAction($controller) ||
<del> empty($this->config('authorize')) ||
<add> ... | 1 |
Python | Python | enable pegasus fp16 by clamping large activations | 9e80f972fb41b40c224c007ffd04a3c2744b83fe | <ide><path>src/transformers/modeling_bart.py
<ide> def forward(self, x, encoder_padding_mask, output_attentions=False):
<ide> x = residual + x
<ide> if not self.normalize_before:
<ide> x = self.final_layer_norm(x)
<add> if torch.isinf(x).any() or torch.isnan(x).any():
<add> ... | 2 |
PHP | PHP | rewrote validation library | c3b8524e1b97bbe14e3b5130d3c9b5d75eea75d7 | <ide><path>application/lang/en/validation.php
<ide>
<ide> return array(
<ide>
<del> /*
<del> |--------------------------------------------------------------------------
<del> | General Validation Messages
<del> |--------------------------------------------------------------------------
<del> */
<del>
<del> "acceptanc... | 22 |
Javascript | Javascript | improve readability of net benchmarks | f955c734bac29a5df3d8ebf45944abfeed5e929b | <ide><path>benchmark/net/net-c2s.js
<ide> Writer.prototype.emit = function() {};
<ide> Writer.prototype.prependListener = function() {};
<ide>
<ide>
<add>function flow() {
<add> var dest = this.dest;
<add> var res = dest.write(chunk, encoding);
<add> if (!res)
<add> dest.once('drain', this.flow);
<add> else
<a... | 3 |
Python | Python | fix a typo in django/db/transaction.py | cd7afcdcac69cc4e6f762188262957bceb4760e0 | <ide><path>django/db/transaction.py
<ide> class Atomic(ContextDecorator):
<ide> connection. None denotes the absence of a savepoint.
<ide>
<ide> This allows reentrancy even if the same AtomicWrapper is reused. For
<del> example, it's possible to define `oa = @atomic('other')` and use `@oa` or
<add> examp... | 1 |
Python | Python | update the typing tests for `np.core.multiarray` | fc66b9e3e30b02939c6a4c97e77c0b55188210ca | <ide><path>numpy/typing/tests/data/fail/constants.py
<ide> np.ALLOW_THREADS = np.ALLOW_THREADS # E: Cannot assign to final
<ide> np.little_endian = np.little_endian # E: Cannot assign to final
<ide> np.UFUNC_PYVALS_NAME = np.UFUNC_PYVALS_NAME # E: Cannot assign to final
<add>np.CLIP = 2 # E: Incompatible types
<ide... | 3 |
Text | Text | add one more bullet point | 856370f522d8d81e3e6c22b59c697b5aa06cb3b2 | <ide><path>docs/upgrading/upgrading-your-ui-theme.md
<ide> Text editor content is now rendered in the shadow DOM, which shields it from bei
<ide> * Gutter decorations
<ide> * Line decorations
<ide> * Scrollbar styling
<add>* Anything targeting a child selector of `.editor`
<ide>
<ide> During a transition phase, it wil... | 1 |
Ruby | Ruby | fix hashwithindifferentaccess.[] method | 2ee28b2bf8414cad3655dbe685ff0d27051395cd | <ide><path>activesupport/lib/active_support/hash_with_indifferent_access.rb
<ide> def self.new_from_hash_copying_default(hash)
<ide> end
<ide> end
<ide>
<add> def self.[](*args)
<add> new.merge(Hash[*args])
<add> end
<add>
<ide> alias_method :regular_writer, :[]= unless method_defined?(:regula... | 2 |
PHP | PHP | remove extra method call | c764f76e5b1f2b99f34384039e123eff0bf8627a | <ide><path>laravel/blade.php
<ide> public static function sharpen()
<ide> */
<ide> public static function expired($view, $path)
<ide> {
<del> $compiled = static::compiled($path);
<del>
<ide> return filemtime($path) > filemtime(static::compiled($path));
<ide> }
<ide> | 1 |
Python | Python | fix mixed precision in tf models | 3f290e6c8403c6a2cf80dce068869793bde49540 | <ide><path>src/transformers/activations_tf.py
<ide> import math
<ide>
<ide> import tensorflow as tf
<add>from packaging import version
<ide>
<ide>
<del>def gelu(x):
<add>def _gelu(x):
<ide> """
<ide> Gaussian Error Linear Unit. Original Implementation of the gelu activation function in Google Bert repo when
... | 8 |
Python | Python | remove useless imports | 56db3ddf4e77a9c2184bf9580a67bcb2dd8ca4d7 | <ide><path>tests/test_deprecations.py
<ide> # -*- coding: utf-8 -*-
<ide> """
<ide> tests.deprecations
<del> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<add> ~~~~~~~~~~~~~~~~~~
<ide>
<ide> Tests deprecation support. Not used currently.
<ide>
<ide> :copyright: (c) 2014 by Armin Ronacher.
<ide> :license: BSD, s... | 1 |
Text | Text | refine rntester documentation to disable fabric | ad14eb4bd324f69d3a8619f536c208acfb878d14 | <ide><path>packages/rn-tester/README.md
<ide> If you are testing non-fabric component, modify [the fabric_enabled flag in RNTe
<ide> fabric_enabled = false
<ide> ```
<ide>
<add>Also, if you previously built RNTester with fabric enabled, you might need to clean up the build files and Pods.
<add>```sh
<add># Clean the g... | 1 |
Python | Python | disallow verbose=1 with parameterserverstrategy | 366d4ac23bae7dc327e94366d33c2dee507c59b7 | <ide><path>keras/distribute/dataset_creator_model_fit_ps_only_test.py
<ide> def testModelFitTensorBoardEpochLevel(self, strategy, use_dataset_creator):
<ide> files = tf.compat.v1.gfile.ListDirectory(log_dir)
<ide> self.assertGreaterEqual(len(files), 1)
<ide>
<del> def testModelFitVerbose1(self, strategy, use_... | 3 |
PHP | PHP | reset array keys for restoration | 851b6719603437acec47f6c2959f70d11a9be9af | <ide><path>src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php
<ide> public function newQueryForRestoration($ids)
<ide> */
<ide> protected function newQueryForCollectionRestoration(array $ids)
<ide> {
<add> $ids = array_values($ids);
<add>
<ide> if (! Str::contains($ids[0], ':'))... | 2 |
Mixed | Go | add format to secret ls | e281fe9c3a0034e119e7718a142133e86f38a4f2 | <ide><path>cli/command/formatter/secret.go
<add>package formatter
<add>
<add>import (
<add> "fmt"
<add> "strings"
<add> "time"
<add>
<add> "github.com/docker/docker/api/types/swarm"
<add> units "github.com/docker/go-units"
<add>)
<add>
<add>const (
<add> defaultSecretTableFormat = "table {{.ID}}\t{{.Name}}\t{{.CreatedA... | 6 |
Javascript | Javascript | use random port in test webserver | ff8c3342076546b772c0936b215e726f590716bc | <ide><path>test/test.js
<ide> function parseOptions() {
<ide> .example('$0 --b=firefox -t=issue5567 -t=issue5909',
<ide> 'Run the reftest identified by issue5567 and issue5909 in Firefox.')
<ide> .describe('port', 'The port the HTTP server should listen on.')
<del> .default('port', 8000)
<add> .defa... | 2 |
Ruby | Ruby | make use of tap to return a previously used var | ef5ae60a07c7d45855a9a2a4b695f153ef9faa79 | <ide><path>activerecord/lib/active_record/associations/association_collection.rb
<ide> def load_target
<ide> @target = find_target.map do |f|
<ide> i = @target.index(f)
<ide> if i
<del> t = @target.delete_at(i)
<del> key... | 1 |
Java | Java | add jmh benchmark for replaysubject | 329a0936d48bdbfd194ea48055e11718c65d9da6 | <ide><path>rxjava-core/src/perf/java/rx/jmh/Baseline.java
<add>/**
<add> * Copyright 2014 Netflix, Inc.
<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 License at
<add> *
<add> *... | 4 |
Ruby | Ruby | fix syntax error in rdocs. | 2aedb202c1c06011b5cb1715a6c76bf0104b287f | <ide><path>activesupport/lib/active_support/testing/assertions.rb
<ide> def assert_blank(object, message=nil)
<ide>
<ide> # Test if an expression is not blank. Passes if object.present? is true.
<ide> #
<del> # assert_present {:data => 'x' } # => true
<add> # assert_present({:data => 'x' }) #... | 1 |
PHP | PHP | fix cs errors | df20ef9809c3301972c3ecb2acf5edd22379cf49 | <ide><path>tests/TestCase/Console/Command/Task/ViewTaskTest.php
<ide> public function initialize(array $config) {
<ide> 'foreignKey' => 'article_id'
<ide> ]);
<ide> }
<add>
<ide> }
<ide>
<ide> /**
<ide> class ViewTaskArticlesTable extends Table {
<ide> public function intialize(array $config) {
<ide> $this->t... | 1 |
PHP | PHP | fix default values in postgres | a6eff184e7eca1f8d03162e6a9bc7f9202d8539c | <ide><path>src/Database/Schema/PostgresSchema.php
<ide> public function convertColumnDescription(Table $table, $row) {
<ide> $row['default'] = 0;
<ide> }
<ide> }
<del>
<ide> $field += [
<add> 'default' => $this->_defaultValue($row['default']),
<ide> 'null' => $row['null'] === 'YES' ? true : false,
<del>... | 2 |
Ruby | Ruby | add #first! and #last! to models & relations | 5214e73850916de3c9127d35a4ecee0424d364a3 | <ide><path>activerecord/lib/active_record/relation/finder_methods.rb
<ide> def first(*args)
<ide> end
<ide> end
<ide>
<add> # Same as #first! but raises RecordNotFound if no record is returned
<add> def first!(*args)
<add> self.first(*args) or raise RecordNotFound
<add> end
<add>
<ide> # A ... | 2 |
Javascript | Javascript | fix refresh inside callback | 4306300b5ea8d8c4ff3daf64c7ed5fd64055ec2f | <ide><path>lib/internal/timers.js
<ide> function getTimerCallbacks(runNextTicks) {
<ide> if (start === undefined)
<ide> start = getLibuvNow();
<ide> insert(timer, timer[kRefed], start);
<del> } else {
<add> } else if (!timer._idleNext && !timer._idlePrev) {
<ide> ... | 2 |
Javascript | Javascript | add semicolon after chunk size | 19839f8d984caee8ed064d0c15afa5cc89e47ede | <ide><path>test/parallel/test-http-chunked-smuggling.js
<ide> function start() {
<ide> 'Host: localhost:8080\r\n' +
<ide> 'Transfer-Encoding: chunked\r\n' +
<ide> '\r\n' +
<del> '2 \n' +
<add> '2;\n' +
<ide> 'xx\r\n' +
<ide> '4c\r\n' +
<ide> '0\r\n' + | 1 |
PHP | PHP | update docblock to match expectations | ac700f0ef4e684b07a00d4626c847007fa3da471 | <ide><path>src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php
<ide> public function all()
<ide> * Get a single failed job.
<ide> *
<ide> * @param mixed $id
<del> * @return array
<add> * @return object|null
<ide> */
<ide> public function find($id)
<ide> {
<ide><path>src/Illum... | 3 |
Text | Text | use sentence-case in quic.md headers | 2c3092088679b355804416eb8afcf6a667a0df40 | <ide><path>doc/api/quic.md
<ide> socket.on('session', (session) => {
<ide>
<ide> ```
<ide>
<del>## QUIC Basics
<add>## QUIC basics
<ide>
<ide> QUIC is a UDP-based network transport protocol that includes built-in security
<ide> via TLS 1.3, flow control, error correction, connection migration,
<ide> Unlike the `net.... | 1 |
Ruby | Ruby | expose request method to reset the csrf token | b925880914fa3dca8c9cd0f8e88fb18fc8ec180b | <ide><path>actionpack/lib/action_dispatch/http/request.rb
<ide> def body_stream # :nodoc:
<ide>
<ide> def reset_session
<ide> session.destroy
<del> controller_instance.reset_csrf_token(self) if controller_instance.respond_to?(:reset_csrf_token)
<add> reset_csrf_token
<ide> end
<ide>
<ide> ... | 1 |
Ruby | Ruby | make tests for `person` pass | 6198978fa23e7acc22bc0196db9315a60bea52d0 | <ide><path>test/models/person.rb
<ide>
<ide> class Person
<ide> include ActiveModel::GlobalIdentification
<del>
<add>
<ide> attr_reader :id
<del>
<add>
<ide> def self.find(id)
<ide> new(id)
<ide> end
<del>
<add>
<ide> def initialize(id)
<ide> @id = id
<ide> end
<del>
<add>
<ide> def ==(ot... | 1 |
Text | Text | update translation radix-sort | a5ab6f2d5ff5e044b2d7a1dbcebb41a3715aec15 | <ide><path>guide/portuguese/algorithms/sorting-algorithms/radix-sort/index.md
<ide> Agora, o array se torna: 10,11,17,21,123,34,44,654 Finalmente, classificamos de
<ide> A matriz torna-se: 10,11,17,21,34,44,123,654 que é classificada. É assim que nosso algoritmo funciona.
<ide>
<ide> Uma implementação em C:
<add>```c
... | 1 |
Javascript | Javascript | use isarray() to determine array type | a01ce6b81c197b0a4a1057981e8e9c1b74f37587 | <ide><path>src/ng/filter/filter.js
<ide> function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatc
<ide>
<ide> if ((expectedType === 'string') && (expected.charAt(0) === '!')) {
<ide> return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);
<del> } else if (act... | 2 |
Java | Java | update stomp message frames with messageid | e7dde941b7d9af04bb4a8dd5d68e9ccf4ad92b6e | <ide><path>spring-websocket/src/main/java/org/springframework/web/messaging/PubSubHeaders.java
<ide> package org.springframework.web.messaging;
<ide>
<ide> import java.util.Arrays;
<add>import java.util.Collections;
<ide> import java.util.HashMap;
<ide> import java.util.List;
<ide> import java.util.Map;
<ide> public P... | 3 |
Python | Python | fix typo in multiarray sources | 7f5efe309720501fbfa2cca886e47cb97e72f35b | <ide><path>numpy/core/setup.py
<ide> def generate_umath_c(ext,build_dir):
<ide> join('src', 'multiarray', 'common.c'),
<ide> join('src', 'multiarray', 'usertypes.c'),
<ide> join('src', 'multiarray', 'scalarapi.c'),
<del> join('src', 'multiarray', 'refecount.c'),
<add> join('src', '... | 1 |
Ruby | Ruby | make these methods on env | 3977beb8ed091606ff025c918368a2f94863da84 | <ide><path>Library/Homebrew/extend/ENV.rb
<ide> def setup_build_environment
<ide> self['CMAKE_PREFIX_PATH'] = "#{HOMEBREW_PREFIX}"
<ide> end
<ide>
<del> if MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_CLANG'] or ARGV.include? '--use-clang')
<add> if MACOS_VERSION >= 10.6 and self.use_clang?
<ide> ... | 1 |
Javascript | Javascript | prevent missing charcode to block the rendering | 0ea9411f69fea09f3d9dc1f45202b00a1cd6f342 | <ide><path>fonts.js
<ide> var Font = (function Font() {
<ide> // loop should never end on the last byte
<ide> for (var i = 0; i < length; i++) {
<ide> var charcode = int16([chars.charCodeAt(i++), chars.charCodeAt(i)]);
<del> var unicode = encoding[charco... | 1 |
Text | Text | avoid memory leak warning in async_hooks example | 3518919cb7a8fca324f67c3fa3c61f1d820f61b2 | <ide><path>doc/api/async_hooks.md
<ide> class WorkerPool extends EventEmitter {
<ide> this.numThreads = numThreads;
<ide> this.workers = [];
<ide> this.freeWorkers = [];
<add> this.tasks = [];
<ide>
<ide> for (let i = 0; i < numThreads; i++)
<ide> this.addNewWorker();
<add>
<add> // Any tim... | 1 |
Ruby | Ruby | use sort_by in prettylisting | 6a1ad36fbd99b75f67cbc234cb887218b2d9d8cc | <ide><path>Library/Homebrew/cmd/list.rb
<ide> def list_pinned
<ide>
<ide> class PrettyListing
<ide> def initialize path
<del> Pathname.new(path).children.sort{ |a,b| a.to_s.downcase <=> b.to_s.downcase }.each do |pn|
<add> Pathname.new(path).children.sort_by { |p| p.to_s.downcase }.each do |pn|
<ide> cas... | 1 |
Ruby | Ruby | use 1.9 compat syntax. fixes homebrew/homebrew | 492748bc0b2776ff4f14017fd482961feadd3034 | <ide><path>Library/Homebrew/formula.rb
<ide> class SoftwareSpecification
<ide> attr_reader :url, :specs, :using
<ide>
<ide> VCS_SYMBOLS = {
<del> :bzr, BazaarDownloadStrategy,
<del> :curl, CurlDownloadStrategy,
<del> :cvs, CVSDownloadStrategy,
<del> :git, GitDownloadStrategy,
<del> :h... | 1 |
Python | Python | fix handling of non-empty ndarrays | c01165f43068fea96722c172eb23efed4ca99763 | <ide><path>numpy/lib/index_tricks.py
<ide> def ix_(*args):
<ide> out = []
<ide> nd = len(args)
<ide> for k, new in enumerate(args):
<del> # Explicitly type empty sequences to avoid float default
<del> new = asarray(new, dtype=None if new else _nx.intp)
<del> if (new.ndim != 1):
<add> ... | 2 |
Go | Go | remove lxcconf in daemon_test.go and fix a typo | 00d00b429ff6f5cecf6789d6b6773b8e979ad0ae | <ide><path>daemon/daemon_test.go
<ide> func TestLoadWithVolume(t *testing.T) {
<ide> t.Fatal(err)
<ide> }
<ide>
<del> hostConfig := `{"Binds":[],"ContainerIDFile":"","LxcConf":[],"Memory":0,"MemorySwap":0,"CpuShares":0,"CpusetCpus":"",
<add> hostConfig := `{"Binds":[],"ContainerIDFile":"","Memory":0,"MemorySwap":0,... | 2 |
Text | Text | remove extra space from manpage | 20d05297c3089fb6c214a94e26814417b533d0f0 | <ide><path>docs/Manpage.md
<ide> to send a notification when the autoupdate process has finished successfully.
<ide> <br>Output this tool's current version.
<ide>
<ide> * `--upgrade`:
<del> Automatically upgrade your installed formulae. If the Caskroom exists locally Casks will be upgraded as well. Must be passed wi... | 1 |
Python | Python | add basic japanese support | c8f83aeb873c2d3beff22cbe0f967b6d56b6793e | <ide><path>setup.py
<ide> 'spacy.fi',
<ide> 'spacy.bn',
<ide> 'spacy.he',
<del> 'spacy.nb',
<add> 'spacy.nb',
<add> 'spacy.ja',
<ide> 'spacy.en.lemmatizer',
<ide> 'spacy.cli.converters',
<ide> 'spacy.language_data',
<ide><path>spacy/__init__.py
<ide> from .deprecated import resolve_... | 6 |
Go | Go | remove unused istransporturl() | 074bc1c3ab6c6d506200a002b6e8809e4cf3ce38 | <ide><path>pkg/urlutil/urlutil.go
<ide> // Package urlutil provides helper function to check urls kind.
<del>// It supports http urls, git urls and transport url (tcp://, …)
<add>// It supports http and git urls.
<ide> package urlutil // import "github.com/docker/docker/pkg/urlutil"
<ide>
<ide> import (
<ide> var (
<i... | 2 |
Go | Go | fix a typo | 2c6fbd864ae089e9cb544666949b8b2d897b3b23 | <ide><path>daemon/logger/loggerutils/logfile.go
<ide> func watchFile(name string) (filenotify.FileWatcher, error) {
<ide>
<ide> logger := logrus.WithFields(logrus.Fields{
<ide> "module": "logger",
<del> "fille": name,
<add> "file": name,
<ide> })
<ide>
<ide> if err := fileWatcher.Add(name); err != nil { | 1 |
PHP | PHP | use a better assert | fad9410ac23c9d1bc186ce94462e9aa641d7499b | <ide><path>tests/TestCase/Log/LogTest.php
<ide> public function testLogFileWriting() {
<ide> }
<ide> $result = Log::write(LOG_WARNING, 'Test warning');
<ide> $this->assertTrue($result);
<del> $this->assertTrue(file_exists(LOGS . 'error.log'));
<add> $this->assertFileExists(LOGS . 'error.log');
<ide> unlink(LO... | 1 |
Ruby | Ruby | fix external perl checker | d84b1711d052cc1ed5f3b818532fe629d04acbf4 | <ide><path>Library/Homebrew/formula_installer.rb
<ide> def check_external_deps f
<ide> raise pyerr(dep) unless quiet_system "/usr/bin/env", "python", "-c", "import #{dep}"
<ide> end
<ide> f.external_deps[:perl].each do |dep|
<del> raise plerr(dep) unless quiet_system "/usr/bin/env", "perl", "-e", "us... | 1 |
Ruby | Ruby | stringify param values in controller tests | 9277e72a3ca1009f135b1eb194ff6f3c96a55c1b | <ide><path>actionpack/lib/action_controller/test_case.rb
<ide> def xml_http_request(request_method, action, parameters = nil, session = nil, fl
<ide> end
<ide> alias xhr :xml_http_request
<ide>
<add> def stringify_values(hash_or_array_or_value)
<add> case hash_or_array_or_value
<add> whe... | 2 |
Ruby | Ruby | allow mounting engines at '/' | 22b11a41cc764bc0f7b0c0f518a5289230428597 | <ide><path>actionpack/lib/action_dispatch/routing/route_set.rb
<ide> def url_for(options)
<ide> end
<ide>
<ide> script_name = options.delete(:script_name)
<del> path = (script_name.blank? ? _generate_prefix(options) : script_name).to_s
<add> path = (script_name.blank? ? _generate_prefix(o... | 2 |
Go | Go | add logdrivers to /info | 17abacb8946ed89496fcbf07a0288fafe24cb7b0 | <ide><path>api/types/types.go
<ide> type PluginsInfo struct {
<ide> Network []string
<ide> // List of Authorization plugins registered
<ide> Authorization []string
<add> // List of Log plugins registered
<add> Log []string
<ide> }
<ide>
<ide> // ExecStartCheck is a temp struct used by execStart
<ide><path>cli/comma... | 6 |
Ruby | Ruby | use utils link_path_manpages | 03352805c66c8f545fad59f7007f615a55d3e37b | <ide><path>Library/Homebrew/tap.rb
<ide> def install(options = {})
<ide> end
<ide>
<ide> def link_manpages
<del> return unless (path/"man").exist?
<del> conflicts = []
<del> (path/"man").find do |src|
<del> next if src.directory?
<del> dst = HOMEBREW_PREFIX/"share"/src.relative_path_from(path)
<... | 1 |
Javascript | Javascript | add a `pixelpositionformouseevent` method | e1ae3749c01240ef0668da63d78c796b6af22b89 | <ide><path>src/text-editor-component.js
<ide> class TextEditorComponent {
<ide> if (scrolled) this.updateSync()
<ide> }
<ide>
<del> screenPositionForMouseEvent ({clientX, clientY}) {
<add> screenPositionForMouseEvent (event) {
<add> return this.screenPositionForPixelPosition(this.pixelPositionForMouseEvent(... | 1 |
Go | Go | fix race in `testapiswarmrestartcluster` | fdcde8bb65acf2c459e93678bf2659139ef5e918 | <ide><path>integration-cli/docker_api_swarm_test.go
<ide> func setGlobalMode(s *swarm.Service) {
<ide>
<ide> func checkClusterHealth(c *check.C, cl []*SwarmDaemon, managerCount, workerCount int) {
<ide> var totalMCount, totalWCount int
<add>
<ide> for _, d := range cl {
<del> info, err := d.info()
<del> c.Assert(e... | 1 |
Javascript | Javascript | add typings for various library template plugins | ed9d0246d5186333435a225f473474352b9b406c | <ide><path>lib/AmdMainTemplatePlugin.js
<ide> const { ConcatSource } = require("webpack-sources");
<ide> const Template = require("./Template");
<ide>
<add>/** @typedef {import("./Compilation")} Compilation */
<add>
<ide> class AmdMainTemplatePlugin {
<add> /**
<add> * @param {string} name the library name
<add> */
... | 5 |
Go | Go | fix testbuildwithtabs for go 1.4 | a31c14cadca4052a0a141347b322d825f56b814b | <ide><path>integration-cli/docker_cli_build_test.go
<ide> func TestBuildWithTabs(t *testing.T) {
<ide> if err != nil {
<ide> t.Fatal(err)
<ide> }
<del> expected := "[\"/bin/sh\",\"-c\",\"echo\\u0009one\\u0009\\u0009two\"]"
<add> expected := `["/bin/sh","-c","echo\tone\t\ttwo"]`
<ide> if res != expected {
<ide> t... | 1 |
Text | Text | add a condition for garbage collection eligibility | 6d115ae515bd2b6aaf144b4f3c5545b35d769af6 | <ide><path>guide/english/java/garbage-collection/index.md
<ide> Java relieves the programmer from memory management task and itself reclaims the
<ide> n = null; //the Integer object is no longer accessible
<ide> ```
<ide> * Cyclic dependencies are not counted as reference so if Object X h... | 1 |
Javascript | Javascript | add benchmark script for resourceusage | 56b25e7a6f741c8181c55f3d40d0cab6ffa1eb4d | <ide><path>benchmark/process/resourceUsage.js
<add>'use strict';
<add>
<add>const common = require('../common.js');
<add>const bench = common.createBenchmark(main, {
<add> n: [1e5]
<add>});
<add>
<add>function main({ n }) {
<add> bench.start();
<add> for (let i = 0; i < n; i++) {
<add> process.resourceUsage();
<a... | 1 |
PHP | PHP | remove useless imports | 252c2cc648035a16e545147542d5b62ef58ca6f4 | <ide><path>tests/Filesystem/FilesystemTest.php
<ide> use Illuminate\Filesystem\Filesystem;
<ide> use Illuminate\Filesystem\FilesystemManager;
<ide> use Illuminate\Foundation\Application;
<del>use League\Flysystem\Adapter\Ftp;
<ide> use Mockery as m;
<ide> use PHPUnit\Framework\TestCase;
<ide> use SplFileInfo;
<ide><pat... | 2 |
Python | Python | add sol3 for project_euler problem_03 | ad2db80f8aeba7fe407eccd69327cfb3bdfaacd2 | <ide><path>project_euler/problem_03/sol3.py
<add>"""
<add>Problem:
<add>The prime factors of 13195 are 5,7,13 and 29. What is the largest prime factor
<add>of a given number N?
<add>
<add>e.g. for 10, largest prime factor = 5. For 17, largest prime factor = 17.
<add>"""
<add>
<add>
<add>def solution(n: int) -> int:
<ad... | 1 |
Text | Text | add article for javascript string.search() | 306c53187f2b86cb19ff6a037bac4e0e629e5b4c | <ide><path>guide/english/javascript/standard-objects/string/string-prototype-search/index.md
<ide> title: String.prototype.search
<ide> ---
<ide> ## String.prototype.search
<ide>
<del>This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototy... | 1 |
Javascript | Javascript | fix touchablehighlight w/o `onlongpress` | bdf3c7911007f547101d753903da11ea4ee095f9 | <ide><path>Libraries/Components/Touchable/TouchableBounce.js
<ide> class TouchableBounce extends React.Component<Props, State> {
<ide> this.props.onFocus(event);
<ide> }
<ide> },
<del> onLongPress: event => {
<del> if (this.props.onLongPress != null) {
<del> this.props.onLon... | 2 |
Mixed | Javascript | remove setupbabel call from main entry point | 17e0478cf4157e2067baf7437e3a81756744221a | <ide><path>local-cli/dependencies/dependencies.js
<ide> */
<ide> 'use strict';
<ide>
<del>const ReactPackager = require('../../packager/react-packager');
<add>require('../../setupBabel')();
<add>const ReactPackager = require('../../packager');
<ide>
<ide> const denodeify = require('denodeify');
<ide> const fs = requ... | 6 |
Text | Text | add heterogeneous enum, and description | 2023d2bab5911e487d1281a81ab07eebddbbb0ba | <ide><path>client/src/guide/english/typescript/enums/index.md
<ide> enum StringBasedEnum {
<ide> Programming = "is fun",
<ide> Pizza = "is good"
<ide> }
<add>
<add>// Heterogeneous based enum
<add>enum HeterogeneousBasedEnum {
<add> Day = 2,
<add> Pizza = "is good"
<add>}
<add>
<add>
<ide> ```
<add>
<add>... | 1 |
Go | Go | add mechanism to skip tests | bc37c036b568f9ae27a7aa457ec73d0c5c6a61cf | <ide><path>integration-cli/docker_cli_links_test.go
<ide> func TestLinksEtcHostsRegularFile(t *testing.T) {
<ide> }
<ide>
<ide> func TestLinksEtcHostsContentMatch(t *testing.T) {
<add> testRequires(t, SameHostDaemon)
<add>
<ide> runCmd := exec.Command(dockerBinary, "run", "--net=host", "busybox", "cat", "/etc/hosts")... | 5 |
Javascript | Javascript | remove unused file from chromium extension | fa965269ea98e32b2c9497cf185f85a3a32f0c88 | <ide><path>extensions/chromium/patch-worker.js
<del>/*
<del>Copyright 2013 Rob Wu <gwnRob@gmail.com>
<del>Licensed under the Apache License, Version 2.0 (the "License");
<del>you may not use this file except in compliance with the License.
<del>You may obtain a copy of the License at
<del>
<del> http://www.apache.or... | 1 |
Javascript | Javascript | remove focused test | e82ee6ca377a9081f1a3ffa0f042d8a28a92c62d | <ide><path>spec/squirrel-update-spec.js
<ide> const createFakeApp = function() {
<ide>
<ide> const AtomTestAppName = 'Atom Testing'
<ide>
<del>fdescribe("Windows Squirrel Update", function() {
<add>describe("Windows Squirrel Update", function() {
<ide> let tempHomeDirectory = null;
<ide>
<ide> beforeEach(functio... | 1 |
Java | Java | add defaultusewrapper support to jackson builder | 7b861c9a8aeda83ef6844633901d6f00ea28c4c0 | <ide><path>spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java
<ide> import com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder;
<ide> import com.fasterxml.jackson.databind.module.SimpleModule;
<ide> import com.fasterxml.jackson.databind.ser.FilterProvider;
<add>imp... | 3 |
Javascript | Javascript | add proper es6 symbol polyfill | 049eff1482884be0c4e74080c2c18acb9447f2d5 | <ide><path>dist/Immutable.js
<ide> $traceurRuntime.createClass = createClass;
<ide> $traceurRuntime.superCall = superCall;
<ide> $traceurRuntime.defaultSuperCall = defaultSuperCall;
<ide> "use strict";
<add>var SHIFT = 5;
<add>var SIZE = 1 << SHIFT;
<add>var MASK = SIZE - 1;
<add>var NOT_SET = {};
<add>var CHANGE_LENGT... | 8 |
PHP | PHP | remove additional is_callable checks | 4dc98d47f5b85be3f4a01bb4580f7e6947d0e8d0 | <ide><path>src/Controller/Controller.php
<ide> use Cake\Utility\MergeVariablesTrait;
<ide> use Cake\View\ViewVarsTrait;
<ide> use LogicException;
<del>use ReflectionClass;
<add>use ReflectionMethod;
<ide> use ReflectionException;
<ide>
<ide> /**
<ide> public function invokeAction() {
<ide> ));
<ide> }
<ide> $ca... | 1 |
Javascript | Javascript | use a dispatch table for performance | 6735b578886df38b80d489fa38b17835c366490e | <ide><path>lib/serialization/BinaryMiddleware.js
<ide> const SerializerMiddleware = require("./SerializerMiddleware");
<ide> /** @typedef {import("./types").BufferSerializableType} BufferSerializableType */
<ide> /** @typedef {import("./types").PrimitiveSerializableType} PrimitiveSerializableType */
<ide>
<add>/* esli... | 1 |
Text | Text | create security.md for github security policy page | 0a9842a705b1574b2553dea409bec0c6b05e9c9f | <ide><path>SECURITY.md
<add># Reporting security issues
<add>
<add>The Moby maintainers take security seriously. If you discover a security issue, please bring it to their attention right away!
<add>
<add>### Reporting a Vulnerability
<add>
<add>Please **DO NOT** file a public issue, instead send your report privately ... | 1 |
Python | Python | use sha-256 instead of sha-1 | dda61caf191ee69da9d944039cbb07fad5705a02 | <ide><path>tools/cythonize.py
<ide> def process_tempita_pxd(fromfile, tofile):
<ide> # Hash db
<ide> #
<ide> def load_hashes(filename):
<del> # Return { filename : (sha1 of input, sha1 of output) }
<add> # Return { filename : (sha256 of input, sha256 of output) }
<ide> if os.path.isfile(filename):
<ide> ... | 1 |
Java | Java | fix exception in jetty10requestupgradestrategy | 7067461d711f9b830386761494fa0fdee02a025d | <ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/Jetty10RequestUpgradeStrategy.java
<ide> /*
<del> * Copyright 2002-2021 the original author or authors.
<add> * Copyright 2002-2022 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version ... | 2 |
Ruby | Ruby | make arel nodes more invertable | 3ebcbe4015e1035214d140144415f77e59ff2389 | <ide><path>activerecord/lib/arel/nodes/binary.rb
<ide> def fetch_attribute
<ide> end
<ide>
<ide> class Between < Binary; include FetchAttribute; end
<del> class NotIn < Binary; include FetchAttribute; end
<del> class GreaterThan < Binary; include FetchAttribute; end
<del> class GreaterThanOrEqual < Bi... | 3 |
Javascript | Javascript | prevent unhandledpromiserejection if shell errors | a59f53a603306777fc6f949d84ce85f09bba4e4c | <ide><path>packages/react-dom/src/server/ReactDOMFizzServerBrowser.js
<ide> function renderToReadableStream(
<ide> resolve(stream);
<ide> }
<ide> function onShellError(error: mixed) {
<add> // If the shell errors the caller of `renderToReadableStream` won't have access to `allReady`.
<add> // Ho... | 1 |
Mixed | Text | add a new option dm.min_free_space | 2e222f69b3486cf20039525a882ae4153b52f92c | <ide><path>daemon/graphdriver/devmapper/deviceset.go
<ide> var (
<ide> // We retry device removal so many a times that even error messages
<ide> // will fill up console during normal operation. So only log Fatal
<ide> // messages by default.
<del> logLevel = devicemapper.LogLevelFatal
<del> drive... | 3 |
Javascript | Javascript | use pre-bundled elements inspector | 9a93a3cba47722a590a8912a5ace1c479eb4178a | <ide><path>Libraries/Devtools/setupDevtools.js
<ide> function setupDevtools() {
<ide> var messageListeners = [];
<ide> var closeListeners = [];
<del> var ws = new window.WebSocket('ws://localhost:8081/devtools');
<add> var ws = new window.WebSocket('ws://localhost:8097/devtools');
<ide> // this is accessed by t... | 1 |
Javascript | Javascript | remove tracking of app height | d86eba998b73d349b18545c28d938d1281b9af31 | <ide><path>common/app/redux/index.js
<ide> import { createSelector } from 'reselect';
<ide> import fetchUserEpic from './fetch-user-epic.js';
<ide> import updateMyCurrentChallengeEpic from './update-my-challenge-epic.js';
<ide> import fetchChallengesEpic from './fetch-challenges-epic.js';
<del>import navSizeEpic from '... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.