content_type
stringclasses
8 values
main_lang
stringclasses
7 values
message
stringlengths
1
50
sha
stringlengths
40
40
patch
stringlengths
52
962k
file_count
int64
1
300
Python
Python
use list to allow indexing
e7ee93ff8c4553d60c10d3f2d483c0c77cf78723
<ide><path>airflow/macros/hive.py <ide> def closest_ds_partition( <ide> partitions = hh.get_partitions(schema=schema, table_name=table) <ide> if not partitions: <ide> return None <del> part_vals = [p.values()[0] for p in partitions] <add> part_vals = [list(p.values())[0] for p in partitions] <ide>...
1
Javascript
Javascript
remove irrelevant note
df8d9507aaf8882b87117c9117b17119e6a9d738
<ide><path>src/ngRoute/route.js <ide> function $RouteProvider(){ <ide> * This example shows how changing the URL hash causes the `$route` to match a route against the <ide> * URL, and the `ngView` pulls in the partial. <ide> * <del> * Note that this example is using {@link ng.directive:script inlined...
1
Mixed
Javascript
add maxheadersize option to http2
3b84048260ba57277b327c1913ca19d826c49158
<ide><path>doc/api/http2.md <ide> properties. <ide> * `maxHeaderListSize` {number} Specifies the maximum size (uncompressed octets) <ide> of header list that will be accepted. The minimum allowed value is 0. The <ide> maximum allowed value is 2<sup>32</sup>-1. **Default:** `65535`. <add>* `maxHeaderSize` {number} A...
7
Python
Python
use coalesce when ordering runs to handle null
22d52c00f6397fde8d97cf2479c0614671f5b5ba
<ide><path>airflow/www/utils.py <ide> import json <ide> import textwrap <ide> import time <del>from typing import Any <add>from typing import TYPE_CHECKING, Any, Sequence <ide> from urllib.parse import urlencode <ide> <del>import sqlalchemy as sqla <ide> from flask import request, url_for <ide> from flask.helpers impo...
2
Ruby
Ruby
fix active model observer tests
1924cff93402160f4db4eea5c1b14bb9d1f85d91
<ide><path>activemodel/lib/active_model/observing.rb <ide> def notify_observers(*arg) <ide> end <ide> end <ide> <add> def count_observers <add> @observer_instances.size <add> end <add> <ide> protected <ide> def instantiate_observer(observer) #:nodoc: <ide> # strin...
2
Java
Java
execute handlerinterceptors in registration order
c36435c0427c75d4dcee382a88a466ad96241faa
<ide><path>spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java <ide> import java.io.IOException; <ide> import java.util.ArrayList; <ide> import java.util.Arrays; <del>import java.util.HashMap; <ide> import java.util.LinkedHashMap; <ide> import java.util.List; <ide> import jav...
4
Text
Text
improve release documentation
16d794dae64529f908659fca97370760bfd89fc2
<ide><path>doc/guides/releases.md <ide> official release builds for Node.js, hosted on <https://nodejs.org/>. <ide> * [10. Test the Build](#10-test-the-build) <ide> * [11. Tag and Sign the Release Commit](#11-tag-and-sign-the-release-commit) <ide> * [12. Set Up For the Next Release](#12-set-up-for-the-next-releas...
1
Python
Python
fix the corner case for dtensor model layout map
e0a970d08ddba7f700876439c44b379e19d3cc33
<ide><path>keras/dtensor/layout_map_test.py <ide> def test_init_sequential_model_variable_with_layout(self): <ide> result = model(tf.zeros((10, 10), layout=self.layout_2d), training=True) <ide> self.assertAllClose(result, tf.zeros((10, 30), layout=self.layout_2d)) <ide> <add> def test_init_model_with_empty_la...
3
Javascript
Javascript
convert `containersassert` to es6 class
81347ab9bcd6738c4e49576efe3f942755648733
<ide><path>packages/internal-test-helpers/lib/ember-dev/containers.js <ide> import { Container } from '@ember/-internals/container'; <ide> <del>function ContainersAssert(env) { <del> this.env = env; <del>} <del> <ide> const { _leakTracking: containerLeakTracking } = Container; <ide> <del>ContainersAssert.prototype =...
1
Text
Text
add descriptions to documentation pages
d1fdd2bbf8df7e12f561f3eec0c1f16897502045
<ide><path>docs/advanced-features/amp-support/adding-amp-components.md <add>--- <add>description: Add components from the AMP community to AMP pages, and make your pages more interactive. <add>--- <add> <ide> # Adding AMP Components <ide> <ide> The AMP community provide [many components](https://amp.dev/documentation/...
52
Python
Python
expand get_flashed_messages tests
b9907b496911d0d8676225151a36c28fe4f4b72f
<ide><path>flask/testsuite/basic.py <ide> def index(): <ide> <ide> @app.route('/test') <ide> def test(): <add> messages = flask.get_flashed_messages() <add> self.assert_equal(len(messages), 3) <add> self.assert_equal(messages[0], u'Hello World') <add> self.as...
1
PHP
PHP
remove unused variables
42b16bfc934ca7b5c1f33c8438d0ab45a7484950
<ide><path>tests/Routing/RoutingUrlGeneratorTest.php <ide> class RoutingUrlGeneratorTest extends TestCase <ide> public function testBasicGeneration() <ide> { <ide> $url = new UrlGenerator( <del> $routes = new RouteCollection, <del> $request = Request::create('http://www.foo.com/') ...
1
Ruby
Ruby
use arel instead of sql strings
475d1d1713faddee890e2367724a629169e079fe
<ide><path>activerecord/lib/active_record/locking/optimistic.rb <ide> def destroy #:nodoc: <ide> lock_col = self.class.locking_column <ide> previous_value = send(lock_col).to_i <ide> <del> affected_rows = connection.delete( <del> "DELETE FROM #{self.class.quoted_table_na...
1
Python
Python
make genv8constants.py python3-compatible
af03f4425e42c15e32e0bd9c42f56b3d38110e3c
<ide><path>tools/genv8constants.py <ide> def out_define(): <ide> out_reset() <ide> <ide> for line in pipe: <add> line = line.decode('utf-8') <ide> if curr_sym != None: <ide> # <ide> # This bit of code has nasty knowledge of the objdump text output
1
Javascript
Javascript
pass sandbox to vm.runinnewcontext()
4c6069bbc383d34261df280abaa967605215edc9
<ide><path>test/ConfigTestCases.test.js <ide> describe("ConfigTestCases", function() { <ide> var p = path.join(outputDirectory, module); <ide> var fn; <ide> if (options.target === "web") { <del> fn = vm.runInNewContext("(function(require, module, exports, __dirname, __filename, it) {" + ...
1
Text
Text
fix typo in changelog
4942b4126772b98ebb37d83d70372a2868042b65
<ide><path>activerecord/CHANGELOG.md <ide> <ide> *Sean Griffin* <ide> <del>* Give `AcriveRecord::Relation#update` its own deprecation warning when <add>* Give `ActiveRecord::Relation#update` its own deprecation warning when <ide> passed an `ActiveRecord::Base` instance. <ide> <ide> Fixes #21945.
1
Javascript
Javascript
add test for scale
d49b5b82c7d2f487cd858af278801aee3a564afe
<ide><path>test/scale.linear.tests.js <ide> describe('Linear Scale', function() { <ide> expect(scale.max).toBe(200); <ide> }); <ide> <add> it('Should correctly determine the min and max data values when stacked mode is turned on there are multiple types of datasets', function() { <add> var scaleID = 'myScale'; <ad...
1
Ruby
Ruby
ensure autocorrect when `desc` ends in `.`
6f2f97b98f1069fa299386fca31502e1101dbf13
<ide><path>Library/Homebrew/test/rubocops/formula_desc_spec.rb <ide> class Foo < Formula <ide> RUBY <ide> end <ide> <del> it "reports an offense when the description ends with a full stop" do <add> it "report and corrects an offense when the description ends with a full stop" do <ide> expect_offe...
1
Javascript
Javascript
update es longdateformats
2a1be653b32eeac6785821a6bfe3269c23d42558
<ide><path>lang/es.js <ide> longDateFormat : { <ide> LT : "H:mm", <ide> L : "DD/MM/YYYY", <del> LL : "D [de] MMMM [de] YYYY", <del> LLL : "D [de] MMMM [de] YYYY LT", <del> LLLL : "dddd, D [de] MMMM [de] YYYY LT" <add> LL : "D [de] MMMM [del] YY...
1
Javascript
Javascript
pass a dummy event into triggerhandler
0401a7f598ef9a36ffe1f217e1a98961046fa551
<ide><path>src/jqLite.js <ide> * - [replaceWith()](http://api.jquery.com/replaceWith/) <ide> * - [text()](http://api.jquery.com/text/) <ide> * - [toggleClass()](http://api.jquery.com/toggleClass/) <del> * - [triggerHandler()](http://api.jquery.com/triggerHandler/) - Doesn't pass native event objects to handlers. <ad...
2
Text
Text
clarify issues and pull requests guidance
c1d18a0728fc43036af47780414bb519b670a4d5
<ide><path>COLLABORATOR_GUIDE.md <ide> ## Contents <ide> <ide> * [Issues and Pull Requests](#issues-and-pull-requests) <del> - [Managing Issues and Pull Requests](#managing-issues-and-pull-requests) <ide> - [Welcoming First-Time Contributors](#welcoming-first-time-contributors) <ide> - [Closing Issues and Pull Re...
1
Javascript
Javascript
use clientrequest "aborted" value (#966)
f1fb3de38fc96287763aeb7c5fee23858c851955
<ide><path>lib/adapters/http.js <ide> module.exports = function httpAdapter(config) { <ide> var data = config.data; <ide> var headers = config.headers; <ide> var timer; <del> var aborted = false; <ide> <ide> // Set User-Agent (required by some servers) <ide> // Only set header if it hasn't been ...
1
Javascript
Javascript
add setnodelay to cryptostream
4d0416caf6e9ff2f09494e1257fd714c65cf0da4
<ide><path>lib/tls.js <ide> CryptoStream.prototype.setTimeout = function(n) { <ide> }; <ide> <ide> <add>CryptoStream.prototype.setNoDelay = function() { <add> if (this.socket) this.socket.setNoDelay(); <add>}; <add> <add> <ide> // EG '/C=US/ST=CA/L=SF/O=Joyent/OU=Node.js/CN=ca1/emailAddress=ry@clouds.org' <ide> func...
1
PHP
PHP
fix bug in belongtomany when using first
8c47b5b8f108de1fccc70727d9c013c57dd1a4fa
<ide><path>src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php <ide> public function getResults() <ide> return $this->get(); <ide> } <ide> <add> /** <add> * Execute the query and get the first result. <add> * <add> * @param array $columns <add> * @return mixed <add> */ <add> public function first($...
1
Ruby
Ruby
add newline to new issue reporting instructions
8934fdbe82a34daa656ba185f197ea439a9b0797
<ide><path>Library/Homebrew/brew.h.rb <ide> FORMULA_META_FILES = %w[README README.md ChangeLog COPYING LICENSE LICENCE COPYRIGHT AUTHORS] <del>PLEASE_REPORT_BUG = "#{Tty.white}Please follow the instructions to report this bug at #{Tty.em}https://github.com/mxcl/homebrew/wiki/new-issue#{Tty.reset}" <add>PLEASE_REPORT_BU...
1
Python
Python
improve idempotency of bigqueryinsertjoboperator
be46d20fb431cc1d91c935e8894dfc7756c18993
<ide><path>airflow/providers/google/cloud/hooks/bigquery.py <ide> <ide> log = logging.getLogger(__name__) <ide> <add>BigQueryJob = Union[CopyJob, QueryJob, LoadJob, ExtractJob] <add> <ide> <ide> # pylint: disable=too-many-public-methods <ide> class BigQueryHook(GoogleBaseHook, DbApiHook): <ide> def insert_job( <ide>...
3
Java
Java
improve usage of advisedsupport.getadvisors()
8c3cab7eadcb07be11ed725bc82277f046a4fe7c
<ide><path>spring-aop/src/main/java/org/springframework/aop/framework/Advised.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 "License"); <ide> * you may not use t...
5
Javascript
Javascript
fix a typo
d3c191ea637cc3ad56cd393ba1897f9d260709e9
<ide><path>src/ng/directive/input.js <ide> var inputType = { <ide> expect(valid.getText()).toContain('myForm.input.$valid = false'); <ide> }); <ide> </file> <del> </example>f <add> </example> <ide> */ <ide> 'date': createDateInputType('date', DATE_REGEXP, <ide> createDateP...
1
Javascript
Javascript
remove name property from native modules
abca4660372b5055c4e0bc9591cbaf56ae477fdc
<ide><path>Libraries/Utilities/MessageQueue.js <ide> class MessageQueue { <ide> } <ide> <ide> processModuleConfig(config, moduleID) { <del> const module = this._genModule(config, moduleID); <del> this.RemoteModules[module.name] = module; <add> const info = this._genModule(config, moduleID); <add> this....
1
Go
Go
show dmesg if mount fails
46833ee1c353c247e3ef817a08d5a35a2a43bdf3
<ide><path>daemon/graphdriver/devmapper/deviceset.go <ide> import ( <ide> "github.com/docker/docker/daemon/graphdriver" <ide> "github.com/docker/docker/dockerversion" <ide> "github.com/docker/docker/pkg/devicemapper" <add> "github.com/docker/docker/pkg/dmesg" <ide> "github.com/docker/docker/pkg/idtools" <ide> "git...
3
Java
Java
remove unused method
f88c9d63828e975a9792969e27accd851ead3e86
<ide><path>ReactAndroid/src/main/java/com/facebook/react/devsupport/BundleDownloader.java <ide> public void execute(Map<String, String> headers, Buffer body, boolean finished) <ide> }); <ide> } <ide> <del> public void cancelDownloadBundleFromURL() { <del> if (mDownloadBundleFromURLCall != null) { <del> ...
1
Python
Python
remove unused class definition
31aecd9b092d5bab27aac2288758eedbeda7bb81
<ide><path>numpy/testing/noseclasses.py <ide> from nose.plugins import doctests as npd <ide> from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin <ide> from nose.plugins.base import Plugin <del>from nose.util import src, getpackage <add>from nose.util import src <ide> import numpy <ide> from nosetester impo...
1
Ruby
Ruby
remove unnecessary brackets in regex (closes )
01e389c965af85901ee8ea77fe099fd3081e07ea
<ide><path>activesupport/lib/active_support/inflections.rb <ide> inflect.singular(/(o)es$/i, '\1') <ide> inflect.singular(/(shoe)s$/i, '\1') <ide> inflect.singular(/(cris|ax|test)es$/i, '\1is') <del> inflect.singular(/([octop|vir])i$/i, '\1us') <add> inflect.singular(/(octop|vir)i$/i, '\1us') <ide> inflect.si...
1
Python
Python
adjust wandb installation command
2affeb290554382042a5652bfa2a5639feb299a3
<ide><path>src/transformers/trainer_tf.py <ide> def __init__( <ide> elif os.getenv("WANDB_DISABLED", "").upper() not in ENV_VARS_TRUE_VALUES: <ide> logger.info( <ide> "You are instantiating a Trainer but W&B is not installed. To use wandb logging, " <del> "run `pip ins...
1
Python
Python
improve clarity of window function docs
250245d49a62d9f26e755f1ba7b213f8cab2008c
<ide><path>numpy/lib/function_base.py <ide> def blackman(M): <ide> Returns <ide> ------- <ide> out : ndarray <del> The window, normalized to one (the value one appears only if the <del> number of samples is odd). <add> The window, with the maximum value normalized to one (the value one ...
1
Python
Python
apply ufunc signature and type test fixmes
7dc28c78005efaf6536e125461d96123083ea2db
<ide><path>numpy/core/tests/test_ufunc.py <ide> def test_generic_loops(self): <ide> just looked at the signatures registered in the build directory to find <ide> relevant functions. <ide> <del> Fixme, currently untested: <del> <del> PyUFunc_ff_f_As_dd_d <del> PyUFunc_FF_F_A...
1
Java
Java
handle hints for cglib proxies consistently
4eca87baa3218ae36f3b17a41ffe85cf88711dd1
<ide><path>spring-context/src/main/java/org/springframework/context/aot/ApplicationContextAotGenerator.java <ide> public class ApplicationContextAotGenerator { <ide> */ <ide> public ClassName processAheadOfTime(GenericApplicationContext applicationContext, <ide> GenerationContext generationContext) { <del> retur...
7
Go
Go
avoid cancellation with forked pull context
d8d71ad5b94d44a2778f2d8989424259cac94e9b
<ide><path>daemon/cluster/executor/container/controller.go <ide> type controller struct { <ide> adapter *containerAdapter <ide> closed chan struct{} <ide> err error <add> <add> pulled chan struct{} // closed after pull <add> cancelPull func() // cancels pull context if not nil <add> pullErr error ...
1
Javascript
Javascript
use containslocation() for url handler processing
2a2ef17d85f9336799c3e39249f960f75cac7cf6
<ide><path>src/core-uri-handlers.js <add>const fs = require('fs-plus') <add> <ide> // Converts a query string parameter for a line or column number <ide> // to a zero-based line or column number for the Atom API. <ide> function getLineColNumber (numStr) { <ide> function openFile (atom, {query}) { <ide> <ide> function ...
1
Javascript
Javascript
remove unused properties from reactmount
b8ad5a23c68743052084f32cb639a66a809f012d
<ide><path>src/browser/ui/ReactMount.js <ide> function findDeepestCachedAncestor(targetID) { <ide> * Inside of `container`, the first element rendered is the "reactRoot". <ide> */ <ide> var ReactMount = { <del> /** Time spent generating markup. */ <del> totalInstantiationTime: 0, <del> <del> /** Time spent inserti...
1
Python
Python
fix momentum and epsilon values
4dd784c32f76fb8285f205b94e2a6ebde731a1cd
<ide><path>src/transformers/models/data2vec/modeling_tf_data2vec_vision.py <ide> def __init__( <ide> dilation_rate=dilation, <ide> name="conv", <ide> ) <del> self.bn = tf.keras.layers.BatchNormalization(name="bn") <add> self.bn = tf.keras.layers.BatchNormalization(name="bn"...
5
Ruby
Ruby
display invalid value in error
efae65d005ee298207d720fb4f61c28a38973e8e
<ide><path>activerecord/lib/active_record/core.rb <ide> def strict_loading? <ide> # => #<ActiveRecord::Associations::CollectionProxy> <ide> def strict_loading!(value = true, mode: :all) <ide> unless [:all, :n_plus_one_only].include?(mode) <del> raise ArgumentError, "The :mode option must be one o...
1
Java
Java
implement equality for redablenativearray
a8703fe10bfeefcf07f44733986a602a3bc6ad4d
<ide><path>ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeArray.java <ide> public int getInt(int index) { <ide> return DynamicFromArray.create(this, index); <ide> } <ide> <add> @Override <add> public int hashCode() { <add> return getLocalArray().hashCode(); <add> } <add> <add> @Overrid...
1
Text
Text
add the way to specify number of decimal places
be96a8808fa7d8a550448bd96bcbe73583dc6c2b
<ide><path>guide/chinese/c/format-specifiers/index.md <ide> int main() { float a = 0.0; scanf(“%f”,&a); //输入是45.65 p <ide> <ide> 字符串输入:%s <ide> <add>可以设定要放多少个小数点: <add>%.2f 代表只会显示两个小数点。 <add>但只可以放在 printf()里,不能在scanf()里。 <add> <ide> # 包括 <ide> <ide> int main() { char str \[20\]; scanf(“%s”,str); //输入是nitesh printf(...
1
Ruby
Ruby
put lib back on the autoload path
02a5842cd09bd75de4c2fdb6b474c6c0ff163ebf
<ide><path>railties/lib/rails/engine/configuration.rb <ide> def paths <ide> paths.app.models "app/models", :eager_load => true <ide> paths.app.mailers "app/mailers", :eager_load => true <ide> paths.app.views "app/views" <del> paths.lib ...
1
Javascript
Javascript
update imports in ember-debug package tests
d0cdb8030024f27453b598963350481bb7fe79a2
<ide><path>packages/ember-debug/tests/handlers-test.js <ide> import { <ide> HANDLERS, <ide> registerHandler, <ide> invoke <del>} from 'ember-debug/handlers'; <add>} from '../handlers'; <ide> <ide> QUnit.module('ember-debug/handlers', { <ide> teardown() { <ide><path>packages/ember-debug/tests/main_test.js <ide>...
3
Python
Python
fix some relative imports for extension modules
35523ead5c998abc1c9d64baab860d555d22e6c1
<ide><path>tools/py3tool.py <ide> def getenv(): <ide> # Run nosetests <ide> subprocess.call(['nosetests3', '-v', d], cwd=TEMP) <ide> <add>def custom_mangling(filename): <add> import_mangling = [ <add> os.path.join('core', '__init__.py'), <add> os.path.join('core', 'numeric.py'), <add> ...
1
PHP
PHP
fix a long line
29031cb70a60932e40b317ad4c9e693b82564afc
<ide><path>src/Illuminate/Auth/Console/MakeAuthCommand.php <ide> public function fire() <ide> if (! $this->option('views')) { <ide> $this->info('Installed HomeController.'); <ide> <del> copy(__DIR__.'/stubs/make/controllers/HomeController.stub', app_path('Http/Controllers/HomeController....
1
PHP
PHP
move session assertions
fb644538937e91b922135161355d7466600f7a03
<ide><path>src/Illuminate/Foundation/Testing/InteractsWithSession.php <ide> public function flushSession() <ide> <ide> $this->app['session']->flush(); <ide> } <add> <add> /** <add> * Assert that the session has a given list of values. <add> * <add> * @param string|array $key <add> * @p...
2
Python
Python
define the `urlpatterns` as a list of `url()...
bfd7219352213c47299dd560b302c88f87825769
<ide><path>tests/browsable_api/auth_urls.py <ide> <ide> <ide> urlpatterns = [ <del> (r'^$', MockView.as_view()), <add> url(r'^$', MockView.as_view()), <ide> url(r'^auth/', include('rest_framework.urls', namespace='rest_framework')), <ide> ] <ide><path>tests/browsable_api/no_auth_urls.py <ide> from __future_...
4
Go
Go
add more error details on plugin get
b1a3fe49341bec714c1017067bd17d9052e5a2d6
<ide><path>pkg/plugins/plugins.go <ide> package plugins // import "github.com/docker/docker/pkg/plugins" <ide> <ide> import ( <ide> "errors" <add> "fmt" <ide> "sync" <ide> "time" <ide> <ide> func Get(name, imp string) (*Plugin, error) { <ide> logrus.Debugf("%s implements: %s", name, imp) <ide> return pl, nil <...
1
Javascript
Javascript
replace bluebird with promise
fccea2f365983bbd05bc24c7960dbbb31bf26775
<ide><path>packager/react-packager/__mocks__/bluebird.js <del>'use strict'; <del> <del>jest.autoMockOff(); <del>module.exports = require.requireActual('bluebird'); <del>jest.autoMockOn(); <ide><path>packager/react-packager/src/AssetServer/__tests__/AssetServer-test.js <ide> jest <ide> .mock('crypto') <ide> .mock('f...
18
Text
Text
fix mdn links to avoid redirections
259f62a8e8d4eac2f067b205abc9264b946d6738
<ide><path>doc/api/assert.md <ide> second argument. This might lead to difficult-to-spot errors. <ide> <ide> [`Error.captureStackTrace`]: errors.html#errors_error_capturestacktrace_targetobject_constructoropt <ide> [`Error`]: errors.html#errors_class_error <del>[`Map`]: https://developer.mozilla.org/en/docs/Web/JavaSc...
5
Javascript
Javascript
add yeti smart home to the list of showcase apps
81193eba07bbaf438fd508e24a7a893ebbdecc30
<ide><path>website/src/react-native/showcase.js <ide> var featured = [ <ide> linkPlayStore: 'https://play.google.com/store/apps/details?id=com.deliverycom&hl=en', <ide> infoLink: 'https://medium.com/delivery-com-engineering/react-native-in-an-existing-ios-app-delivered-874ba95a3c52#.37qruw6ck', <ide> infoTi...
1
Text
Text
add new solution version that directly returns
271b2c34342618485d674fa9cb041e145ddc6586
<ide><path>guide/english/certifications/javascript-algorithms-and-data-structures/basic-data-structures/check-for-the-presence-of-an-element-with-indexof/index.md <ide> return arr.indexOf(elem) >= 0 ? true : false; <ide> } <ide> console.log(quickCheck(['squash', 'onions', 'shallots'], 'mushrooms')); <ide> ``` <add>- `S...
1
Javascript
Javascript
restore getchar in jpegstream
825f9249b23d247b78ab8eb6fa685c373362e4fa
<ide><path>pdf.js <ide> var JpegStream = (function() { <ide> constructor.prototype = { <ide> getImage: function() { <ide> return this.domImage; <add> }, <add> getChar: function() { <add> error("internal error: getChar is not valid on JpegStream"); <ide> } <ide> ...
1
Javascript
Javascript
replace var with let/const
0271f1b067be019f67e274802a2c951b29f18ab8
<ide><path>lib/internal/http2/util.js <ide> const IDX_OPTIONS_MAX_SESSION_MEMORY = 8; <ide> const IDX_OPTIONS_FLAGS = 9; <ide> <ide> function updateOptionsBuffer(options) { <del> var flags = 0; <add> let flags = 0; <ide> if (typeof options.maxDeflateDynamicTableSize === 'number') { <ide> flags |= (1 << IDX_OPT...
1
Javascript
Javascript
fix typo in template.js
c66289f1fc47a918c08bad8ad5b78d187ea27de5
<ide><path>src/core/xfa/template.js <ide> class Image extends StringObject { <ide> <ide> [$toHTML]() { <ide> if (this.href || !this[$content]) { <del> // TODO: href can be a Name refering to an internal stream <add> // TODO: href can be a Name referring to an internal stream <ide> // containing a...
1
Text
Text
update example copyright dates
3ec6c0e42442aaaa2fa68e93fb68bec082dfae95
<ide><path>CONTRIBUTING.md <ide> present in the framework. <ide> <ide> ```java <ide> /* <del> * Copyright 2002-2016 the original author or authors. <add> * Copyright 2002-2017 the original author or authors. <ide> * <ide> * Licensed under the Apache License, Version 2.0 (the "License"); <ide> * you may not use this...
1
Python
Python
fix loading of tagger
45a6f9b9c7ea97cda09bfda33e60e2cab1df7487
<ide><path>spacy/language.py <ide> def create_tokenizer(cls, nlp=None): <ide> def create_tagger(cls, nlp=None): <ide> if nlp is None: <ide> return Tagger(cls.create_vocab(), features=cls.tagger_features) <del> elif nlp.path is None or not (nlp.path / 'ner').exists(): <add> elif nlp...
1
Python
Python
solve the port conflict
1c76a51615ccd5c8e60570771b29ef16a9c3bc17
<ide><path>tests/deepspeed/test_deepspeed.py <ide> def load_json(path): <ide> return json.load(f) <ide> <ide> <add>def get_master_port(real_launcher=False): <add> """ <add> When using a single gpu launcher emulation (i.e. not deepspeed or python -m torch.distributed) <add> the issue is that once the ...
1
Ruby
Ruby
move header injection back into integration tests
d63b42da362d696398fd371815734cb0caed48df
<ide><path>actionpack/lib/action_controller/testing/integration.rb <ide> def process(method, path, parameters = nil, headers = nil) <ide> opts = { <ide> :method => method.to_s.upcase, <ide> :params => parameters, <del> :headers => headers, <ide> <ide> "SERVER_NA...
2
Javascript
Javascript
fix typo in internal message event name
c8108aad832b4734a4bc14ab6e2e052218be3990
<ide><path>lib/cluster.js <ide> function Worker(customEnv) { <ide> } <ide> <ide> // Internal message: handle message <del> this.process.on('inernalMessage', function(message, handle) { <add> this.process.on('internalMessage', function(message, handle) { <ide> debug('recived: ', message); <ide> <ide> // ...
2
Python
Python
specify kb_id and kb_url for url visualisation
f4b5c4209d6cb3748534ad072784a3f9c4fa194c
<ide><path>spacy/displacy/render.py <ide> def render_ents( <ide> """Render entities in text. <ide> <ide> text (str): Original text. <del> spans (list): Individual entity spans and their start, end and label. <add> spans (list): Individual entity spans and their start, end, label, kb_id an...
1
Ruby
Ruby
unroll validation loop
8575034f192d0c85bb97c2ad70533c9ed93a60c5
<ide><path>Library/Homebrew/formula.rb <ide> def initialize(name, path, spec) <ide> set_spec :head <ide> <ide> @active_spec = determine_active_spec(spec) <del> validate_attributes :url, :name, :version <add> validate_attributes! <ide> @pkg_version = PkgVersion.new(version, revision) <ide> @build ...
2
Javascript
Javascript
increase coverage for fs/dir read
a9c0077493e86b6e2c6ef51a74bdb0b7eb2e87f7
<ide><path>test/parallel/test-fs-opendir.js <ide> async function doConcurrentAsyncAndSyncOps() { <ide> } <ide> doConcurrentAsyncAndSyncOps().then(common.mustCall()); <ide> <add>// Check read throw exceptions on invalid callback <add>{ <add> const dir = fs.opendirSync(testDir); <add> assert.throws(() => dir.read('INV...
1
Ruby
Ruby
handle more non-executable curl edge-cases
924865ec7f18078650be87ca31b6c0a434b0a78d
<ide><path>Library/Homebrew/utils/curl.rb <ide> require "open3" <ide> <ide> def curl_executable <del> curl = Pathname.new ENV["HOMEBREW_CURL"] <del> curl = which("curl") unless curl.exist? <del> return curl if curl.executable? <del> raise "#{curl} is not executable" <add> @curl ||= [ <add> ENV["HOMEBREW_CURL"]...
1
PHP
PHP
update basics to match code standards
d861a733273bf10d6aa2e16477a3d06afa6ab218
<ide><path>lib/Cake/basics.php <ide> <?php <add> <ide> /** <ide> * Basic Cake functionality. <ide> * <ide> * @return boolean Success <ide> * @link http://book.cakephp.org/view/1125/config <ide> */ <del> function config() { <del> $args = func_get_args(); <del> foreach ($args as $arg) { <del> if ($arg === 'datab...
1
Javascript
Javascript
fix whitespace issues
fb8811d95ec3d644f60db24f4a816f8c05cd9ad5
<ide><path>lib/_debugger.js <ide> Client.prototype.fullTrace = function(cb) { <ide> }; <ide> <ide> <del> <del> <del> <del> <ide> const commands = [ <ide> [ <ide> 'run (r)', <ide><path>lib/_http_server.js <ide> ServerResponse.prototype._finish = function() { <ide> }; <ide> <ide> <del> <ide> exports.ServerRespo...
40
Javascript
Javascript
fix permanent deoptimizations
b6da225799cd754e6696586e759218d7514fdd85
<ide><path>test/common.js <ide> exports.allowGlobals = allowGlobals; <ide> function leakedGlobals() { <ide> const leaked = []; <ide> <del> for (const val in global) <add> // eslint-disable-next-line no-var <add> for (var val in global) <ide> if (!knownGlobals.includes(global[val])) <ide> leaked.push(val...
1
Mixed
Javascript
add readme to app template, lint
ab81db65c51bfb28b35b0154b5e16a13271afd64
<ide><path>local-cli/templates/HelloNavigation/README.md <add># App template for new React Native apps <add> <add>This is a simple React Native app template which demonstrates a few basics concepts such as navigation between a few screens, ListViews, and handling text input. <add> <add><img src="https://cloud.githubuse...
11
Javascript
Javascript
add lti annotations to xplat/js
037e346197a3c7f99fa93dab68b5a1a94011f1ee
<ide><path>Libraries/Animated/SpringConfig.js <ide> type SpringConfigType = { <ide> ... <ide> }; <ide> <del>function stiffnessFromOrigamiValue(oValue) { <add>function stiffnessFromOrigamiValue(oValue: number) { <ide> return (oValue - 30) * 3.62 + 194; <ide> } <ide> <del>function dampingFromOrigamiValue(oValue) { ...
53
PHP
PHP
convert schemacache shell into commands
f29ff30974c4d6324d1ad7ac1a017093d610f75b
<ide><path>src/Command/SchemacacheBuildCommand.php <add><?php <add>declare(strict_types=1); <add> <add>/** <add> * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) <add> * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) <add> * <add> * Licensed under The MIT License <add> * For ...
5
PHP
PHP
set property to null instead of unsetting
3c3d86dcdc142e610b98100f8f7a0a59c5991388
<ide><path>src/View/ViewVarsTrait.php <ide> public function createView($viewClass = null) <ide> $builder = $this->viewBuilder(); <ide> if ($viewClass === null && $builder->getClassName() === null) { <ide> $builder->setClassName($this->viewClass); <del> unset($this->viewClass); <ad...
1
Javascript
Javascript
fix some output
3be4f097a3dc1228e99b48e9beca9120c9c70a5f
<ide><path>lib/_debugger.js <ide> Client.prototype._onResponse = function(res) { <ide> <ide> if (res.headers.Type == 'connect') { <ide> // do nothing <del> console.log(res); <ide> this.emit('ready'); <ide> } else if (res.body && res.body.event == 'break') { <ide> this.emit('break', res.body); <ide> ...
1
Text
Text
move stray sentences in zlib doc
944ff77cabb5cd1d9cd973474b0525e63f9508a8
<ide><path>doc/api/zlib.md <ide> Only applicable to deflate algorithm. <ide> added: v0.7.0 <ide> --> <ide> <add>Reset the compressor/decompressor to factory defaults. Only applicable to <add>the inflate and deflate algorithms. <add> <ide> ## zlib.constants <ide> <ide> Provides an object enumerating Zlib-related const...
1
Ruby
Ruby
use proper hook for loading fixtures extension
2035138115035ffb94e19bad8a941f8da0c60560
<ide><path>activerecord/lib/active_record/railtie.rb <ide> class Railtie < Rails::Railtie # :nodoc: <ide> **config.active_record.encryption <ide> <ide> ActiveSupport.on_load(:active_record) do <del> # Encrypt active record fixtures <del> if ActiveRecord::Encryption.config.encrypt_fixtures ...
1
Go
Go
add integration test for volumes-from as file
28015f8e579e7bbe396f65b3343188ca03b06cbd
<ide><path>integration-cli/docker_cli_run_test.go <ide> func TestDockerRunWithoutNetworking(t *testing.T) { <ide> logDone("run - disable networking with --networking=false") <ide> logDone("run - disable networking with -n=false") <ide> } <add> <add>// Regression test for #4741 <add>func TestDockerRunWithVolumesAsFile...
1
PHP
PHP
remove remote provider
4204337382b2ac2a45ff4839b268a2e967718a55
<ide><path>config/app.php <ide> 'Illuminate\Pagination\PaginationServiceProvider', <ide> 'Illuminate\Queue\QueueServiceProvider', <ide> 'Illuminate\Redis\RedisServiceProvider', <del> 'Illuminate\Remote\RemoteServiceProvider', <ide> 'Illuminate\Auth\Reminders\ReminderServiceProvider', <ide> 'Illuminate\Databa...
1
Ruby
Ruby
show formula version in failed build output
b24ef38bc1990707133fb24788fcabe0be81c9a1
<ide><path>Library/Homebrew/exceptions.rb <ide> def dump <ide> ohai "ENV" <ide> Homebrew.dump_build_env(env) <ide> puts <del> onoe "#{formula.name} did not build" <add> onoe "#{formula.name} #{formula.version} did not build" <ide> unless (logs = Dir["#{HOMEBREW_LOGS}/#{formula}/*"]).em...
1
Javascript
Javascript
fix two failing assert.throws
36c59cd2338ff29bbe18383fa58cef2fe859718b
<ide><path>test/selection/data-test.js <ide> suite.addBatch({ <ide> assert.deepEqual(body.data(), [data]); <ide> assert.strictEqual(body.data()[0], data); <ide> }, <del> // TODO not sure why Node is not catching this error: <del> "throws an error if data is null or undefined": function(b...
1
Go
Go
move some kill integration cli to api tests
2227c8ad5ee2bd2f636651efd4ef70e56c082f85
<ide><path>integration-cli/docker_cli_kill_test.go <ide> import ( <ide> <ide> "github.com/docker/docker/integration-cli/checker" <ide> "github.com/docker/docker/integration-cli/cli" <del> "github.com/docker/docker/integration-cli/request" <ide> "github.com/go-check/check" <del> "github.com/gotestyourself/gotestyour...
3
Ruby
Ruby
add support for a not predicate
0e6888232a19c8c59416490d3da6079e590fab77
<ide><path>lib/arel/algebra/attributes/attribute.rb <ide> def eq(other) <ide> Predicates::Equality.new(self, other) <ide> end <ide> <add> def not(other) <add> Predicates::Not.new(self, other) <add> end <add> <ide> def lt(other) <ide> Predicates::LessThan.new(self, other) <i...
5
Ruby
Ruby
pass strings to the underscore method
59ec4562a2e70df455b2e44a67c340fa5254e26e
<ide><path>railties/lib/rails/engine.rb <ide> def endpoint(endpoint = nil) <ide> end <ide> <ide> def isolate_namespace(mod) <del> engine_name(generate_railtie_name(mod)) <add> engine_name(generate_railtie_name(mod.name)) <ide> <ide> self.routes.default_scope = { module: ActiveSupport...
2
Javascript
Javascript
create flow props for image
8bac869f5d1f2ef42e707d0ec817afc6ac98b3b2
<ide><path>Libraries/Image/ImageProps.js <ide> * <ide> * @providesModule ImageProps <ide> * @flow <add> * @format <ide> */ <ide> <ide> 'use strict'; <ide> const ImageStylePropTypes = require('ImageStylePropTypes'); <ide> const PropTypes = require('prop-types'); <ide> const StyleSheetPropType = require('StyleSheetP...
1
Text
Text
improve changelog entry [ci skip]
4efb0f373047c44249bc6542fdf9969e4c63dd88
<ide><path>activerecord/CHANGELOG.md <del>* Revert the behaviour of AR::Relation#join changed through 4.0 => 4.1 to 4.0 <add>* Revert the behaviour of `ActiveRecord::Relation#join` changed through 4.0 => 4.1 to 4.0. <ide> <del> In 4.1.0 Relation#join is delegated to Arel#SelectManager. <del> In 4.0 series it...
1
Python
Python
fix bad import with pytorch <= 1.4.1
d1ad4bff445d86fcf2700b9317bf6c029f86788a
<ide><path>src/transformers/trainer_pt_utils.py <ide> <ide> import numpy as np <ide> import torch <del>from torch.optim.lr_scheduler import SAVE_STATE_WARNING <add>from packaging import version <ide> from torch.utils.data.distributed import DistributedSampler <ide> from torch.utils.data.sampler import RandomSampler, S...
1
Javascript
Javascript
move generatestructname to cpphelpers
e6c1e81c60638b052edbe373d110ccc321fcefec
<ide><path>packages/react-native-codegen/src/generators/components/CppHelpers.js <ide> function getImports(component: ComponentShape): Set<string> { <ide> return imports; <ide> } <ide> <add>function generateStructName( <add> componentName: string, <add> parts: $ReadOnlyArray<string> = [], <add>) { <add> const add...
4
Python
Python
replace remaining uses of "bail"
0d8bc95ad643924ebcad4da0d9ea36416e05d5e3
<ide><path>airflow/cli/commands/dag_command.py <ide> def dag_delete(args): <ide> except OSError as err: <ide> raise AirflowException(err) <ide> else: <del> print("Bail.") <add> print("Cancelled") <ide> <ide> <ide> @cli_utils.action_logging <ide><path>airflow/cli/commands/db_comma...
3
Text
Text
fix some typos at formula cookbook
3d9bc57feacf32d9050569b3645c29d2a0ddd749
<ide><path>share/doc/homebrew/Formula-Cookbook.md <ide> so you can override this with `brew create <url> --set-name <name>`. <ide> <ide> ## Fill in the [`homepage`](http://www.rubydoc.info/github/Homebrew/homebrew/master/Formula#homepage%3D-class_method) <ide> <del>**We don’t accept formulae without [`homepage`](http...
1
Python
Python
set version to v3.0.2
b31471b5b8c1d16dd0960f4e121b32c5f1e7fefa
<ide><path>spacy/about.py <ide> # fmt: off <ide> __title__ = "spacy" <del>__version__ = "3.0.1" <add>__version__ = "3.0.2" <ide> __download_url__ = "https://github.com/explosion/spacy-models/releases/download" <ide> __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json"...
1
Javascript
Javascript
remove unused local var from link_to test
cf2cd8310084155379dd74b4278b7df472e59bae
<ide><path>packages/ember/tests/helpers/link_to_test.js <ide> test("The {{link-to}} helper moves into the named route with context", function( <ide> <ide> Ember.TEMPLATES.about = Ember.Handlebars.compile("<h3>List</h3><ul>{{#each controller}}<li>{{#link-to 'item' this}}{{name}}{{/link-to}}<li>{{/each}}</ul>{{#link-t...
1
Javascript
Javascript
add test to validate changelogs for releases
cf523c659fa27956c7fe8670e9509ced9899f8b7
<ide><path>test/parallel/test-release-changelog.js <add>'use strict'; <add> <add>// This test checks that the changelogs contain an entry for releases. <add> <add>const common = require('../common'); <add>const assert = require('assert'); <add>const fs = require('fs'); <add>const path = require('path'); <add> <add>cons...
1
Javascript
Javascript
report more errors to workers
3e9f2e61db371f8208ccb04824fdfb186de72f36
<ide><path>lib/cluster.js <ide> if (cluster.isMaster) { <ide> <ide> if (serverHandlers.hasOwnProperty(key)) { <ide> handler = serverHandlers[key]; <del> } else if (message.addressType === 'udp4' || <del> message.addressType === 'udp6') { <del> var dgram = require('dgram'); <del> ha...
4
Javascript
Javascript
move __styleprop to stylesheet
cf89a2cbfd4fb66580a0ed2b195a6daf680ca79c
<ide><path>Libraries/StyleSheet/StyleSheet.js <ide> import type { <ide> StyleSheetStyle as _StyleSheetStyle, <ide> Styles as _Styles, <ide> ____StyleObj_Internal, <add> ____ViewStyleProp_Internal, <add> ____TextStyleProp_Internal, <add> ____ImageStyleProp_Internal, <ide> LayoutStyle <ide> } from 'StyleSheetT...
3
Ruby
Ruby
use env shebang when installing gems
81f262ece3ba6215579c1a0147bc281590ea7d3d
<ide><path>Library/Homebrew/utils/gems.rb <ide> def install_gem!(name, version: nil, setup_gem_environment: true) <ide> ohai_if_defined "Installing '#{name}' gem" <ide> # `document: []` is equivalent to --no-document <ide> # `build_args: []` stops ARGV being used as a default <del> specs = Gem.in...
1
Javascript
Javascript
squeeze support module. close gh-1165
22a4e5bd0a7c0a92b54b9965984b582fd42099f2
<ide><path>src/support.js <ide> jQuery.support = (function( support ) { <del> <del> var a, select, opt, input, fragment, <del> div = document.createElement("div"); <del> <del> // Finish early in limited (non-browser) environments <del> div.innerHTML = "<a>a</a><input type='checkbox'/>"; <del> a = div.getElementsByTagN...
1
Go
Go
update volumepath regex to allow returning earlier
55ceb5047c304d3ac8ecd15801a4b0472832158e
<ide><path>pkg/system/filesys_windows.go <ide> import ( <ide> const SddlAdministratorsLocalSystem = "D:P(A;OICI;GA;;;BA)(A;OICI;GA;;;SY)" <ide> <ide> // volumePath is a regular expression to check if a path is a Windows <del>// volume path (e.g., "\\?\Volume{4c1b02c1-d990-11dc-99ae-806e6f6e6963}". <del>var volumePath ...
1
Python
Python
use 2 spaces for indent
01dfbda369d9a3e85e18a9af7e51bcba66866cb5
<ide><path>keras/engine/data_adapter_test.py <ide> def __init__(self, batch_size, feature_shape, epochs=2): <ide> self.on_epoch_end() <ide> <ide> def __len__(self): <del> """Number of batches in the Sequence. <add> """Number of batches in the Sequence. <ide> <del> Returns: int <del> The nu...
1
Java
Java
fix typo in javadoc for mergedannotations
ee2041388b6adcf3a6727415be78a90774ed4113
<ide><path>spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotations.java <ide> * mergedAnnotations.get(ExampleAnnotation.class).getString("value"); <ide> * <ide> * // get all meta-annotations but no directly present annotations <del> * mergedAnnotations.stream().anyMatch(MergedAnnotation::isMe...
1