content_type stringclasses 8
values | main_lang stringclasses 7
values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
Javascript | Javascript | use factory superclass in route#model hook | ba1c747b668e23c2fca0e19970f3a042a375a399 | <ide><path>packages/ember-routing/lib/system/route.js
<ide> Ember.Route = Ember.Object.extend({
<ide> if (!name && sawParams) { return params; }
<ide> else if (!name) { return; }
<ide>
<del> var modelClass = this.container.lookupFactory('model:' + name);
<add> var modelClass = this.container.lookupFactor... | 3 |
Javascript | Javascript | use a runtime module to inject system polyfill | bfb9df6c20b0aeaccba311ed7f6a4609f1880417 | <ide><path>buildin/system.js
<del>// Provide a "System" global.
<del>module.exports = {
<del> // Make sure import is only used as "System.import"
<del> import: function() {
<del> throw new Error("System.import cannot be used indirectly");
<del> }
<del>};
<ide><path>lib/RuntimeGlobals.js
<ide> exports.hmrDownloadUpdate... | 5 |
Javascript | Javascript | fix whitespace issues | 6a68d646297b5264fc3c0672fc58dcbf64523bdc | <ide><path>lib/path.js
<ide> if (isWindows) {
<ide> resolvedTail = normalizeArray(resolvedTail.split(/[\\\/]+/).filter(f),
<ide> !resolvedAbsolute).join('\\');
<ide>
<del> // If device is a drive letter, we'll normalize to lower case.
<del> if (resolvedDevice && resolvedDe... | 1 |
PHP | PHP | fix psalm errors | b094090907b11b28102e7f714835616d03737df1 | <ide><path>src/Console/Exception/NoOptionException.php
<ide> */
<ide> namespace Cake\Console\Exception;
<ide>
<add>use Throwable;
<add>
<ide> /**
<ide> * Exception raised with suggestions
<ide> */
<ide> class NoOptionException extends ConsoleException
<ide> * Constructor.
<ide> *
<ide> * @param strin... | 1 |
Ruby | Ruby | add another comment | 749c877f032f4990581eec636ffcf1a826e5b4e9 | <ide><path>Library/Homebrew/os/mac/xcode.rb
<ide> module Xcode
<ide>
<ide> # Locate the "current Xcode folder" via xcode-select. See:
<ide> # man xcode-select
<del> # NOTE!! use Xcode.prefix rather than this generally!
<add> # TODO Should this be moved to OS::Mac? As of 10.9 this is referred to
<... | 1 |
Text | Text | add v2.8.0-beta.2 to changelog.md | 868e29c9840592a81f8a67e32262fe28976d762e | <ide><path>CHANGELOG.md
<ide> # Ember Changelog
<ide>
<add>### 2.8.0-beta.2 (August 1, 2016)
<add>
<add>- [#13887](https://github.com/emberjs/ember.js/pull/13887) [BUGFIX] Add assertions for illegal component invocations.
<add>- [#13892](https://github.com/emberjs/ember.js/pull/13892) [CLEANUP] Remove `View#createElem... | 1 |
Javascript | Javascript | change variable naming | 09cd3335c85c9b1dd5d20f996d5771f541c55ca3 | <ide><path>packages/ember-metal/lib/set_properties.js
<ide> import keys from "ember-metal/keys";
<ide> ```
<ide>
<ide> @method setProperties
<del> @param self
<del> @param {Object} hash
<del> @return self
<add> @param obj
<add> @param {Object} properties
<add> @return obj
<ide> */
<del>export default functio... | 1 |
Text | Text | add changelog entry | ddcb3eaf877300229130648eebde964c9de17274 | <ide><path>railties/CHANGELOG.md
<add>* Enable HSTS with IncludeSudomains header for new applications.
<add>
<add> *Egor Homakov*, *Prathamesh Sonpatki*
<add>
<ide> ## Rails 5.0.0.beta3 (February 24, 2016) ##
<ide>
<ide> * Alias `rake` with `rails_command` in the Rails Application Templates API | 1 |
PHP | PHP | add theme to mailable properties | 44879ecf372236f2446483da687f5eea7434c978 | <ide><path>src/Illuminate/Mail/Mailable.php
<ide> class Mailable implements MailableContract, Renderable
<ide> */
<ide> public $callbacks = [];
<ide>
<add> /**
<add> * The name of the theme that should be used when formatting the message.
<add> *
<add> * @var string|null
<add> */
<add> p... | 1 |
Python | Python | remove pytest dependency. | 0cb163865a4c761c226b151283309eedb2b1ca4d | <ide><path>transformers/tests/optimization_tf_test.py
<ide> from __future__ import print_function
<ide>
<ide> import unittest
<del>import pytest
<ide>
<ide> from transformers import is_tf_available
<ide>
<add>from .utils import require_tf
<add>
<ide> if is_tf_available():
<ide> import tensorflow as tf
<ide> ... | 1 |
Ruby | Ruby | fix typo in fortran environment variables | 399d73e10037885d0970ee1a7fa89ee2cf876bf8 | <ide><path>Library/Homebrew/extend/ENV.rb
<ide> def fortran
<ide>
<ide> if ARGV.include? '--default-fortran-flags'
<ide> self['FCFLAGS'] = self['CFLAGS'] unless self['FCFLAGS']
<del> self['FFFLAGS'] = self['CFLAGS'] unless self['FFFLAGS']
<add> self['FFLAGS'] = self['CFLAGS'] unless self['F... | 1 |
Python | Python | remove debug print | ee9bbc4041a493d78edf31298e8042639401b8f8 | <ide><path>libcloud/test/storage/test_local.py
<ide> def remove_tmp_file(self, tmppath):
<ide>
<ide> @unittest.skipIf(platform.system().lower() == 'windows', 'Unsupported on Windows')
<ide> def test_lock_local_storage(self):
<del> print("aaaa")
<ide> # 1. Acquire succeeds
<ide> lock = Lo... | 1 |
Ruby | Ruby | override the initializers instead of using tap | 58f9c4f096c92518a81093aa9912314b14873a66 | <ide><path>actionmailer/lib/action_mailer/parameterized.rb
<ide> def initialize(mailer, params)
<ide>
<ide> def method_missing(method_name, *args)
<ide> if @mailer.action_methods.include?(method_name.to_s)
<del> ActionMailer::Parameterized::MessageDelivery.new(@mailer, method_name, *args).tap { ... | 1 |
Ruby | Ruby | remove duplicate function | dbe460ef04ddc8b043988879730414e31600db53 | <ide><path>Library/Homebrew/formula_support.rb
<ide> def include? name
<ide> @args.include? '--' + name
<ide> end
<ide>
<del> def using? name
<del> @args.include? '--' + name
<del> end
<del>
<ide> def head?
<ide> @args.flag? '--HEAD'
<ide> end | 1 |
Python | Python | add possibility to maintain full copies of files | 57461ac0b4e4f7349c2437fcf8d4115014d6ceda | <ide><path>examples/tensorflow/question-answering/utils_qa.py
<ide> def postprocess_qa_predictions(
<ide> null_score_diff_threshold: float = 0.0,
<ide> output_dir: Optional[str] = None,
<ide> prefix: Optional[str] = None,
<add> is_world_process_zero: bool = True,
<ide> ):
<ide> """
<ide> Post-pro... | 2 |
Python | Python | fix pipeline analysis on remove pipe | afe4a428f78abe45d6104d74ef42a066570fa43d | <ide><path>spacy/language.py
<ide> def remove_pipe(self, name):
<ide> """
<ide> if name not in self.pipe_names:
<ide> raise ValueError(Errors.E001.format(name=name, opts=self.pipe_names))
<add> removed = self.pipeline.pop(self.pipe_names.index(name))
<ide> if ENABLE_PIPELINE_A... | 2 |
Text | Text | fix bug in `readable.unshift` code example | ee38bbd4cfc9d515b185fb406ffce5919e63bafa | <ide><path>doc/api/stream.md
<ide> function parseHeader(stream, callback) {
<ide> let chunk;
<ide> while (null !== (chunk = stream.read())) {
<ide> const str = decoder.write(chunk);
<del> if (str.match(/\n\n/)) {
<add> if (str.includes('\n\n')) {
<ide> // Found the header boundary.
<ide>... | 1 |
Javascript | Javascript | remove useless dependencies in tests | 4da1cc3b81048180eff99637d407ccd9dd07ec6d | <ide><path>test/ng/compileSpec.js
<ide> describe('$compile', function() {
<ide> ));
<ide>
<ide> it('should not load cross domain templates by default', inject(
<del> function($compile, $httpBackend, $rootScope, $sce) {
<add> function($compile, $rootScope) {
<ide> expect(fu... | 1 |
Text | Text | fix types and description for dns.resolvetxt | 3888a576ac83239d8d3d2fc985e7ea1856dac83e | <ide><path>doc/api/dns.md
<ide> records. The type and structure of individual results varies based on `rrtype`:
<ide> | `'PTR'` | pointer records | {string} | [`dns.resolvePtr()`][] |
<ide> | `'SOA'` | start of authority records | {Object} | [`dns.resolveSoa()`][] |
<ide> | `'SRV'` | ... | 1 |
Text | Text | remove the redundant "[" before "this" word | 4e7d3e718e941c7e774cbbad36388fdee043618e | <ide><path>guide/english/algorithms/algorithm-performance/index.md
<ide> Therefore we can say that the best case time complexity of bubble sort is O(_n_)
<ide> Examining the worst case scenario where the array is in reverse order, the first iteration will make _n_ comparisons while the next will have to make _n_ - 1 co... | 1 |
Python | Python | fix assertion to check actual content | 6734eb1d09a99dc519e89a59e2086cef09a87098 | <ide><path>tests/operators/test_trigger_dagrun.py
<ide> def test_trigger_dagrun_operator_conf(self):
<ide> with create_session() as session:
<ide> dagruns = session.query(DagRun).filter(DagRun.dag_id == TRIGGERED_DAG_ID).all()
<ide> assert len(dagruns) == 1
<del> assert dagrun... | 1 |
PHP | PHP | pull routes after booting application | c33453e97f93a7ed0eb019e86ae8bedf9ddff9e3 | <ide><path>app/src/Providers/RouteServiceProvider.php
<ide> public function before()
<ide> */
<ide> public function map()
<ide> {
<del> require app_path().'/src/Http/routes.php';
<add> $this->app->booted(function()
<add> {
<add> require app('path.src').'/Http/routes.php';
<add> });
<ide> }
<ide>
<ide> }
<id... | 1 |
Javascript | Javascript | initialize elements in an array from left to right | 966f6d831f9469a917601f9a10604612cd7bd792 | <ide><path>src/ng/parse.js
<ide> ASTCompiler.prototype = {
<ide> self.if(self.notNull(right), function() {
<ide> self.addEnsureSafeFunction(right);
<ide> forEach(ast.arguments, function(expr) {
<del> self.recurse(expr, undefined, undefined, function(argument) {
<add> ... | 2 |
PHP | PHP | extract a protected method | 0c46ccf657b81fc7338b9da6eb04625419013147 | <ide><path>src/View/Input/Radio.php
<ide> public function render($data) {
<ide> $options = (array)$data['options'];
<ide> }
<ide>
<del> $escape = $data['escape'];
<ide> if (!empty($data['empty'])) {
<ide> $empty = $data['empty'] === true ? 'empty' : $data['empty'];
<ide> $options = ['' => $empty] + $opti... | 1 |
Javascript | Javascript | remove reference to dprecation (no longer applies) | 02e3f0a00c78174ce6cc24bf6e7fe0d83a89c7d6 | <ide><path>packages/ember-runtime/lib/mixins/array.js
<ide> export default Mixin.create(Enumerable, {
<ide> return an enumerable that maps automatically to the named key on the
<ide> member objects.
<ide>
<del> @each should only be used in a non-terminal context, and is deprecated when
<del> used as a le... | 1 |
Ruby | Ruby | make unsafesubversiondownloadstrategy a no-op | 023bddbd046c7dce0f9e56344f9fb5e258e0f59f | <ide><path>Library/Homebrew/download_strategy.rb
<ide> def get_externals
<ide> end
<ide> end
<ide>
<del> def fetch_args
<del> []
<del> end
<del>
<ide> def fetch_repo target, url, revision=nil, ignore_externals=false
<ide> # Use "svn up" when the repository already exists locally.
<ide> # This save... | 1 |
Python | Python | use lowercase test_ for concrete test cases | 98d501f9375de5e2977e66c47ab1ee43039b0671 | <ide><path>celery/tests/test_app/test_app_amqp.py
<ide> from celery.tests.utils import AppCase
<ide>
<ide>
<del>class TestMsgOptions(AppCase):
<add>class test_extract_message_options(AppCase):
<ide>
<ide> def test_MSG_OPTIONS(self):
<ide> self.assertTrue(MSG_OPTIONS)
<ide><path>celery/tests/test_app/test... | 21 |
Text | Text | fix cache_timestamp_format default value in guides | 4a84942e0b99807d1320cf2e4563ede53cf75b82 | <ide><path>guides/source/configuring.md
<ide> All these configuration options are delegated to the `I18n` library.
<ide>
<ide> * `config.active_record.lock_optimistically` controls whether Active Record will use optimistic locking and is `true` by default.
<ide>
<del>* `config.active_record.cache_timestamp_format` co... | 1 |
Javascript | Javascript | remove settimeout (covered by misc/timeout.js) | fef35fc4f1da9e06790d5b3b34b3bcdb085dd3a2 | <ide><path>benchmark/settimeout.js
<del>console.log("wait...");
<del>var done = 0;
<del>var N = 5000000;
<del>var begin = new Date();
<del>for (var i = 0; i < N; i++) {
<del> setTimeout(function () {
<del> if (++done == N) {
<del> var end = new Date();
<del> console.log("smaller is better");
<del> co... | 1 |
Javascript | Javascript | fix regression #372 | 528e89693b15154913f2fb0d2df9da7b8ce052d6 | <ide><path>pdf.js
<ide> var PartialEvaluator = (function() {
<ide> }
<ide>
<ide> if (fontDict.has('ToUnicode')) {
<add> encodingMap['empty'] = true;
<ide> var cmapObj = xref.fetchIfRef(fontDict.get('ToUnicode'));
<ide> if (IsName(cmapObj)) {
<ide> error('ToUnico... | 1 |
Python | Python | fix doc/source/conf.py to work with python 3 | 9d8722b5bc76ecb2fe74a8e8dd3a7b1c2c83985b | <ide><path>doc/source/conf.py
<ide> version = re.sub(r'(\.dev\d+).*?$', r'\1', version)
<ide> # The full version, including alpha/beta/rc tags.
<ide> release = numpy.__version__
<del>print version, release
<add>print("%s %s" % (version, release))
<ide>
<ide> # There are two options for replacing |today|: either, you s... | 1 |
PHP | PHP | remove needless line of code | 26aeb1155063f9e4169dc5820d18fe159c066989 | <ide><path>lib/Cake/Utility/Sanitize.php
<ide> public static function clean($data, $options = array()) {
<ide> $data = str_replace("\r", "", $data);
<ide> }
<ide>
<del> $data = str_replace("'", "'", str_replace("!", "!", $data));
<del>
<ide> if ($options['unicode']) {
<ide> $data = preg_replace("/&... | 1 |
Ruby | Ruby | add factory methods for empty alias trackers | bfc776f7bb114e90cf91f16f5892be636ed2f0c8 | <ide><path>activerecord/lib/active_record/associations/alias_tracker.rb
<ide> module Associations
<ide> class AliasTracker # :nodoc:
<ide> attr_reader :aliases, :connection
<ide>
<add> def self.empty(connection)
<add> new connection, Hash.new(0)
<add> end
<add>
<add> def self.create(con... | 3 |
Javascript | Javascript | fix extend_prototypes for sproutcore-datetime | 2885a044938380e1e0ed78534f76a830297df1e1 | <ide><path>packages/sproutcore-datetime/lib/datetime.js
<ide> SC.DateTime.reopenClass(SC.Comparable,
<ide> if ( opts.month === 2 && opts.day > 29 ){
<ide> return null;
<ide> }
<del> if ([4,6,9,11].contains(opts.month) && opts.day > 30) {
<add> if (jQuery.inArray(opts.month, [4,6,9,11]... | 2 |
Javascript | Javascript | consolidate logic for press event component | 051513bfa064c0d5d058482db4cc3a32955b9ec5 | <ide><path>packages/react-events/src/Press.js
<ide> import type {
<ide> ReactResponderDispatchEventOptions,
<ide> } from 'shared/ReactTypes';
<ide> import {REACT_EVENT_COMPONENT_TYPE} from 'shared/ReactSymbols';
<add>import {
<add> getEventPointerType,
<add> getEventCurrentTarget,
<add> isEventPositionWithinTouchH... | 2 |
Python | Python | pin version of tf and torch | 206b78d4850d3c6fe85a015654293fc4b803ed7b | <ide><path>setup.py
<ide>
<ide> # keras2onnx and onnxconverter-common version is specific through a commit until 1.7.0 lands on pypi
<ide> extras["tf"] = [
<del> "tensorflow",
<add> "tensorflow>=2.0",
<ide> "onnxconverter-common",
<ide> "keras2onnx"
<ide> # "onnxconverter-common @ git+git://github.co... | 1 |
Text | Text | use hook inside of function component | b760c8dd0a992cd4fceb15cc603de86f2457988f | <ide><path>docs/api-reference/next/image.md
<ide> The Ref must point to a DOM element or a React component that [forwards the Ref]
<ide> import Image from 'next/image'
<ide> import React from 'react'
<ide>
<del>const lazyRoot = React.useRef(null)
<add>const Example = () => {
<add> const lazyRoot = React.useRef(null)
... | 1 |
Ruby | Ruby | fix svnadmin calls on linux | 69c1b4fcf984c6da97534a59bd917d3ddd14936c | <ide><path>Library/Homebrew/test/unpack_strategy/subversion_spec.rb
<ide> let(:path) { working_copy }
<ide>
<ide> before do
<del> safe_system "xcrun", "svnadmin", "create", repo
<add> svnadmin = ["svnadmin"]
<add> svnadmin = ["xcrun", *svnadmin] if OS.mac? && MacOS.version >= :catalina
<add> safe_syste... | 1 |
PHP | PHP | improve test coverage | 4bd2251385ba49b0886830a8e1e27833ed34c1fb | <ide><path>tests/Support/SupportCollectionTest.php
<ide> public function testExcept()
<ide> $this->assertEquals(['first' => 'Taylor', 'email' => 'taylorotwell@gmail.com'], $data->except('last')->all());
<ide> }
<ide>
<add> public function testExceptSelf()
<add> {
<add> $data = new Collection([... | 3 |
PHP | PHP | add default address in mail config | ab453a7e82fcb348eae7bc453fddf321a4741db4 | <ide><path>config/mail.php
<ide> |
<ide> */
<ide>
<del> 'from' => ['address' => null, 'name' => null],
<add> 'from' => [
<add> 'address' => 'hello@example.com',
<add> 'name' => 'Example',
<add> ],
<ide>
<ide> /*
<ide> |------------------------------------------------------------... | 1 |
Javascript | Javascript | remove unnecessary serialization | 9629caefb7e6423020d035b0b213a1d266917fc2 | <ide><path>src/workspace.js
<ide> module.exports = class Workspace extends Model {
<ide> left: this.paneContainers.left.serialize(),
<ide> right: this.paneContainers.right.serialize(),
<ide> bottom: this.paneContainers.bottom.serialize()
<del> },
<del> hasActiveTextEditor: this.hasActi... | 1 |
Text | Text | add entry to url.parse() changes metadata | 04e45db1726e1d2c11ecbf8cbacc82c88672fc83 | <ide><path>doc/api/url.md
<ide> The formatting process operates as follows:
<ide> <!-- YAML
<ide> added: v0.1.25
<ide> changes:
<add> - version: v11.14.0
<add> pr-url: https://github.com/nodejs/node/pull/26941
<add> description: The `pathname` property on the returned URL object is now `/`
<add> ... | 1 |
PHP | PHP | remove unnecessary temporary variable | 04b751f3f274d7ae454cb703482ca38911947f81 | <ide><path>src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
<ide> public static function withoutEventDispatcher(callable $callback)
<ide> static::unsetEventDispatcher();
<ide>
<ide> try {
<del> $result = $callback();
<add> return $callback();
<ide> } finally {
<ide>... | 1 |
Ruby | Ruby | clarify usage of object.acts_like? | 5e69b7e0001ad0da7392a8465515873c516d3ead | <ide><path>activesupport/lib/active_support/core_ext/object/acts_like.rb
<ide> # frozen_string_literal: true
<ide>
<ide> class Object
<del> # A duck-type assistant method. For example, Active Support extends Date
<del> # to define an <tt>acts_like_date?</tt> method, and extends Time to define
<del> # <tt>acts_like_... | 1 |
Text | Text | update ticks.callback documentation | a4cc21f9a919ab9f80fc133a309820b6f6c4f599 | <ide><path>docs/axes/labelling.md
<ide> Namespace: `options.scales[scaleId].title`, it defines options for the scale tit
<ide>
<ide> ## Creating Custom Tick Formats
<ide>
<del>It is also common to want to change the tick marks to include information about the data type. For example, adding a dollar sign ('$'). To do ... | 1 |
PHP | PHP | avoid fatal error by throwing exception | fe475a1a304857e6230b4a6bf96d437a601e81b9 | <ide><path>src/Utility/ObjectRegistry.php
<ide> public function load($objectName, $config = []) {
<ide> $objectName = $config['className'];
<ide> }
<ide> $className = $this->_resolveClassName($objectName);
<del> if (!$className) {
<add> if (!$className || (is_string($className) && !class_exists($className))) {... | 2 |
PHP | PHP | add model option to command | 255b8fc30036c3fd05544d4d6bf9b57e3fd64592 | <ide><path>src/Illuminate/Foundation/Console/ObserverMakeCommand.php
<ide> namespace Illuminate\Foundation\Console;
<ide>
<ide> use Illuminate\Console\GeneratorCommand;
<add>use Illuminate\Support\Str;
<add>use Symfony\Component\Console\Input\InputOption;
<ide>
<ide> class ObserverMakeCommand extends GeneratorCommand... | 1 |
PHP | PHP | modify auth and secure methods with new exceptions | e1ca3348a8a947478cd4ff7e97721f7a6529558d | <ide><path>src/Controller/Component/SecurityComponent.php
<ide>
<ide> use Cake\Controller\Component;
<ide> use Cake\Controller\Controller;
<add>use Cake\Controller\Exception\AuthSecurityException;
<ide> use Cake\Controller\Exception\SecurityException;
<ide> use Cake\Event\Event;
<ide> use Cake\Network\Exception\BadReq... | 2 |
PHP | PHP | avoid possible typeerror exception | 2c40d89dd501de2bae4cfce8b065c4f916cd8d7f | <ide><path>src/Cache/Engine/FileEngine.php
<ide> public function delete($key): bool
<ide> /** @psalm-suppress PossiblyNullReference */
<ide> $path = $this->_File->getRealPath();
<ide> $this->_File = null;
<add>
<add> if ($path === false) {
<add> return false;
<add> ... | 1 |
Javascript | Javascript | use fixtures.readkey in https-timeout-server | cfea677a5ee82db7c031adf0cdd828e56a5ccd0b | <ide><path>test/parallel/test-https-timeout-server.js
<ide> const common = require('../common');
<ide> if (!common.hasCrypto)
<ide> common.skip('missing crypto');
<ide>
<add>const fixtures = require('../common/fixtures');
<add>
<ide> const assert = require('assert');
<ide> const https = require('https');
<ide>
<ide... | 1 |
Java | Java | add equals/hashcode to responseentity | a49851d5ebcb5d3c65e324f279f3a8c33f4db16f | <ide><path>spring-web/src/main/java/org/springframework/http/HttpEntity.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> * you may not use this fi... | 3 |
Go | Go | make testing helpers as such… | cb8db44395df70fa3044d2a9683d6d24438cfa74 | <ide><path>integration/internal/requirement/requirement.go
<ide> import (
<ide> // HasHubConnectivity checks to see if https://hub.docker.com is
<ide> // accessible from the present environment
<ide> func HasHubConnectivity(t *testing.T) bool {
<add> t.Helper()
<ide> // Set a timeout on the GET at 15s
<ide> var timeo... | 20 |
Python | Python | update structured array docs to reflect | c43e0e5c0f2e8dc52cbc1eed71bf93aa281df3d7 | <ide><path>numpy/doc/structured_arrays.py
<ide> Introduction
<ide> ============
<ide>
<del>NumPy provides powerful capabilities to create arrays of structured datatype.
<del>These arrays permit one to manipulate the data by named fields. A simple
<del>example will show what is meant.: ::
<add>Structured arrays are nd... | 1 |
Python | Python | add support for new xlm-roberta model | 69f4f058fa5ecc6fea8c65ae59694442bba795e6 | <ide><path>transformers/modeling_xlm_roberta.py
<add># coding=utf-8
<add># Copyright 2019 Facebook AI Research and the HuggingFace Inc. team.
<add># Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
<add>#
<add># Licensed under the Apache License, Version 2.0 (the "License");
<add># you may not use this fil... | 1 |
Ruby | Ruby | replace puts with ohai | fe71d891538e59df3227fd0b4a5de08dfa80c598 | <ide><path>Library/Homebrew/dev-cmd/bump.rb
<ide>
<ide> require "cli/parser"
<ide> require "utils/popen"
<add>require "utils/repology"
<ide>
<ide> module Homebrew
<ide> module_function
<ide> def bump
<ide> end
<ide>
<ide> def display(outdated_packages)
<del> ohai "Outdated Formulae"
<add> ohai "Outdated ... | 1 |
Text | Text | remove references to atom-docs | 8cca42a6b89574dbb7f187e59dfda84f7a2435cc | <ide><path>README.md
<ide>
<ide> 
<ide>
<del>Check out our [guides](https://atom-docs.githubapp.com/v26.0/index.html) and [API documentation](https://atom-docs.githubapp.com/v26.0/api/index.html).
<add>Check out o... | 1 |
Ruby | Ruby | compute ext in initialize, and use an attr_reader | 2dbb73bdda3b81947fd112486ac4285fb1a6e3a9 | <ide><path>actionpack/lib/action_dispatch/middleware/static.rb
<ide>
<ide> module ActionDispatch
<ide> class FileHandler
<add> attr_reader :ext
<add>
<ide> def initialize(at, root)
<ide> @at, @root = at.chomp('/'), root.chomp('/')
<ide> @compiled_at = (Regexp.compile(/^#{Regexp.escape(at)}/) unles... | 1 |
Go | Go | replace uses of fmt.sprintf() | f586a473cf8dc9ac1edf893f70ccf37c2e217035 | <ide><path>pkg/namesgenerator/names-generator.go
<ide> package namesgenerator // import "github.com/docker/docker/pkg/namesgenerator"
<ide>
<ide> import (
<del> "fmt"
<ide> "math/rand"
<add> "strconv"
<ide> )
<ide>
<ide> var (
<ide> var (
<ide> // integer between 0 and 10 will be added to the end of the name, e.g `f... | 2 |
Text | Text | add process for handling premature disclosure | 9cf23414d5883b1aabcfe5bddeb8a23396064f2e | <ide><path>doc/guides/collaborator-guide.md
<ide> * [Closing issues and pull requests](#closing-issues-and-pull-requests)
<ide> * [Author ready pull requests](#author-ready-pull-requests)
<ide> * [Handling own pull requests](#handling-own-pull-requests)
<add> * [Security issues](#managing-security-issues)
<ide> ... | 1 |
Python | Python | create bitonicsort.py (#386) | a0d5c9aaf0f573ff11beacb6a30a91f90312dd08 | <ide><path>sorts/BitonicSort.py
<add># Python program for Bitonic Sort. Note that this program
<add># works only when size of input is a power of 2.
<add>
<add># The parameter dir indicates the sorting direction, ASCENDING
<add># or DESCENDING; if (a[i] > a[j]) agrees with the direction,
<add># then a[i] and a[j] a... | 1 |
Javascript | Javascript | fix typing for progressbarandroid | bc4825ee9d49d7c8044bd08ec3ca49050435e17c | <ide><path>Libraries/Components/ActivityIndicator/ActivityIndicator.js
<ide> const ActivityIndicator = (props: Props, forwardedRef?: any) => {
<ide> // $FlowFixMe Flow doesn't know when this is the android component
<ide> <PlatformActivityIndicator {...nativeProps} {...androidProps} />
<ide> ) : (... | 3 |
Text | Text | fix missing closing tag in challenge description | 996b466d87b618851a4d1d5aa160ab07946fb074 | <ide><path>curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/compare-the-properties-of-two-elements.md
<ide> dashedName: compare-the-properties-of-two-elements
<ide>
<ide> # --description--
<ide>
<del>As a reminder, this project is being built upon the following starter projec... | 1 |
Javascript | Javascript | allow filtering of tests in statscases | 5b30edebfcbb12ec78168061502cb2d618bf01ae | <ide><path>test/StatsTestCases.test.js
<ide> const tests = fs
<ide> testName =>
<ide> fs.existsSync(path.join(base, testName, "index.js")) ||
<ide> fs.existsSync(path.join(base, testName, "webpack.config.js"))
<del> );
<add> )
<add> .filter(testName => {
<add> const testDirectory = path.join(base, testName);
<... | 1 |
Text | Text | add overlay networking security model node | cc5debcb2e8621358721eb860c07f33f8b83d684 | <ide><path>docs/reference/commandline/network_connect.md
<ide> You can connect a container to one or more networks. The networks need not be th
<ide> * [network disconnect](network_disconnect.md)
<ide> * [network ls](network_ls.md)
<ide> * [network rm](network_rm.md)
<del>* [Understand Docker container networks](../../... | 19 |
PHP | PHP | use isset instead of double boolean cast | bc5dcbe9b9ef163d3610178d61a6a375d80b6c4f | <ide><path>src/Database/Statement/StatementDecorator.php
<ide> public function lastInsertId($table = null, $column = null) {
<ide> if ($column && $this->columnCount()) {
<ide> $row = $this->fetch('assoc');
<ide> }
<del> if ($column && $row) {
<add> if (isset($row[$column])) {
<ide> return $row[$column];
<id... | 1 |
Text | Text | add naming convention for `-ui` themes | 739d1714625a82b55902f1b400a72dfa8b1cf44e | <ide><path>docs/creating-a-theme.md
<ide> Let's create your first theme.
<ide> To get started, hit `cmd-shift-P`, and start typing "Generate Syntax Theme" to
<ide> generate a new theme package. Select "Generate Syntax Theme," and you'll be
<ide> asked for the path where your theme will be created. Let's call ours
<del>... | 1 |
Javascript | Javascript | emit error on stream object, not global | 90368770e6acc224460376f3086ad47f54d363d3 | <ide><path>lib/_stream_transform.js
<ide> function afterTransform(stream, er, data) {
<ide> var cb = ts.writecb;
<ide>
<ide> if (!cb)
<del> return this.emit('error', new Error('no writecb in Transform class'));
<add> return stream.emit('error', new Error('no writecb in Transform class'));
<ide>
<ide> ts.w... | 1 |
Javascript | Javascript | check _events before _events.error | fbb963b5d520a70d9c3f2f9ec116d79a0c676f80 | <ide><path>lib/_stream_readable.js
<ide> Readable.prototype.pipe = function(dest, pipeOpts) {
<ide> }
<ide> // This is a brutally ugly hack to make sure that our error handler
<ide> // is attached before any userland ones. NEVER DO THIS.
<del> if (!dest._events.error)
<add> if (!dest._events || !dest._events.e... | 1 |
Text | Text | fix typos in readme | edc892680162ff6d41ba80c553c8f25539722912 | <ide><path>README.md
<ide> you then have to manually deserialize. Before, jobs would look like this:
<ide>
<ide> ```ruby
<ide> class TrashableCleanupJob
<del> def perfom(trashable_class, trashable_id, depth)
<add> def perform(trashable_class, trashable_id, depth)
<ide> trashable = trashable_class.constantize.fin... | 1 |
Javascript | Javascript | fix its vs it's typos | def5b57de872058874c05e214cc4007ae48aca0f | <ide><path>src/ngAnimate/animate.js
<ide> angular.module('ngAnimate', ['ng'])
<ide> * | 8. The animation ends and all generated CSS classes are removed from the element | class="my-animation" |
<... | 3 |
Python | Python | fix platform detection on freebsd, sunos | e5649d4b3d0271c6fc248ac12ff73b6b253a91b7 | <ide><path>tools/gyp/pylib/gyp/common.py
<ide> def GetFlavor(params):
<ide> 'cygwin': 'win',
<ide> 'win32': 'win',
<ide> 'darwin': 'mac',
<del> 'sunos5': 'solaris',
<del> 'freebsd7': 'freebsd',
<del> 'freebsd8': 'freebsd',
<del> 'freebsd9': 'freebsd',
<ide> }
<del> flavor = flavors.get(sys.pl... | 1 |
PHP | PHP | fix issue with identifier quoting | c6a93d9db34c7712d5c7c3827a00fb6d049e2faf | <ide><path>src/Database/Expression/ValuesExpression.php
<ide> public function columns($cols = null)
<ide> return $this;
<ide> }
<ide>
<add> /**
<add> * Get the bare column names.
<add> *
<add> * Because column names could be identifier quoted, we
<add> * need to strip the identifiers off... | 1 |
Ruby | Ruby | remove workaround for old debugger | 1abcb0b348c0d0b07ee92ed274c5d97550b39ee4 | <ide><path>Library/Homebrew/formula.rb
<ide> def system cmd, *args
<ide> raise BuildError.new(self, cmd, args, ENV.to_hash)
<ide> end
<ide> ensure
<del> log.close unless log.closed?
<add> log.close
<ide> end
<ide> end
<ide> | 1 |
Python | Python | remove unused numpy/f2py/info.py file | 7960edee9ccf1a6e8b48d269a13e54f658e560b8 | <ide><path>numpy/f2py/info.py
<del>"""Fortran to Python Interface Generator.
<del>
<del>"""
<del>from __future__ import division, absolute_import, print_function
<del>
<del>postpone_import = True
<ide><path>numpy/tests/test_public_api.py
<ide> def test_NPY_NO_EXPORT():
<ide> "f2py.f2py_testing",
<ide> "f2py.f90... | 2 |
PHP | PHP | fix failing test when directories contain spaces | ac33e82737c3db242262d53f679ba710478952a3 | <ide><path>lib/Cake/Test/TestCase/Utility/XmlTest.php
<ide> public function testAmpInText() {
<ide> * @return void
<ide> */
<ide> public function testNoEntityLoading() {
<del> $file = CAKE . 'VERSION.txt';
<add> $file = str_replace(' ' , '%20' , CAKE . 'VERSION.txt');
<ide> $xml = <<<XML
<ide> <!DOCTYPE cakephp ... | 1 |
Python | Python | fix function serialization | 45e781c305edc0ee23af8a60bfa73a6e2e19839a | <ide><path>keras/utils/generic_utils.py
<ide> import marshal
<ide> import types as python_types
<ide> import inspect
<add>import codecs
<ide>
<ide> _GLOBAL_CUSTOM_OBJECTS = {}
<ide>
<ide> def func_dump(func):
<ide> # Returns
<ide> A tuple `(code, defaults, closure)`.
<ide> """
<del> code = marshal.... | 2 |
Javascript | Javascript | add defaults for deterministic id plugins | ca46218787e56196bea3d06418c6d8ea383cc3e7 | <ide><path>lib/WebpackOptionsApply.js
<ide> class WebpackOptionsApply extends OptionsApply {
<ide> new HashedModuleIdsPlugin().apply(compiler);
<ide> break;
<ide> case "deterministic":
<del> new DeterministicModuleIdsPlugin({
<del> maxLength: 3
<del> }).apply(compiler);
<add> new Determin... | 3 |
Ruby | Ruby | remove `macho` check for `executable` | d8624f5fe754b3d3bcbb0836ecd9fdbb974b9ea1 | <ide><path>Library/Homebrew/unpack_strategy/executable.rb
<ide> require_relative "uncompressed"
<ide>
<del>require "vendor/macho/macho"
<del>
<ide> module UnpackStrategy
<ide> class Executable < Uncompressed
<ide> def self.can_extract?(path:, magic_number:)
<del> return true if magic_number.match?(/\A#!\s*\... | 1 |
Javascript | Javascript | fix redirect caching in httpuriplugin | c128f4fe44111206838faf3db6b21f531d5c6b3f | <ide><path>lib/schemes/HttpUriPlugin.js
<ide> class HttpUriPlugin {
<ide>
<ide> /**
<ide> * @param {string} url URL
<del> * @param {FetchResult} cachedResult result from cache
<add> * @param {FetchResult | RedirectFetchResult} cachedResult result from cache
<ide> * @param {function((Error | ... | 1 |
Ruby | Ruby | remove bundler warnings from bin/setup output | b59634603862918b379e02b2594bc1bb8a5728df | <ide><path>railties/test/application/bin_setup_test.rb
<ide> def test_bin_setup_output
<ide>
<ide> # Ignore line that's only output by Bundler < 1.14
<ide> output.sub!(/^Resolving dependencies\.\.\.\n/, "")
<add> # Suppress Bundler platform warnings from output
<add> output.gsub!(/^The de... | 1 |
Python | Python | use e.value to get to the exceptioninfo value | f420aa1138f52c732102b6ad00825bab797792ec | <ide><path>spacy/tests/test_language.py
<ide> def test_language_init_invalid_vocab(value):
<ide> err_fragment = "invalid value"
<ide> with pytest.raises(ValueError) as e:
<ide> Language(value)
<del> assert err_fragment in str(e)
<add> assert err_fragment in str(e.value) | 1 |
Python | Python | add ٪ as punctuation | 42349471bc815ffa76a83b7c1c7174666d71edfe | <ide><path>spacy/lang/char_classes.py
<ide>
<ide> _units = ('km km² km³ m m² m³ dm dm² dm³ cm cm² cm³ mm mm² mm³ ha µm nm yd in ft '
<ide> 'kg g mg µg t lb oz m/s km/h kmh mph hPa Pa mbar mb MB kb KB gb GB tb '
<del> 'TB T G M K % ٪ км км² км³ м м² м³ дм дм² дм³ см см² см³ мм мм² мм³ нм '
<add> ... | 1 |
Text | Text | fix horizontal scrolling in docs | 6facb85f853365125b10e9f0843d013184f88d2e | <ide><path>docs/docs/optimizing-performance.md
<ide> Remember that you only need to do this for production builds. You shouldn't appl
<ide>
<ide> In the **development** mode, you can visualize how components mount, update, and unmount, using the performance tools in supported browsers. For example:
<ide>
<del><center... | 1 |
Go | Go | fix warning in build | ec488fa1231a9a5240dc0cd38c99ca3241fcaf7c | <ide><path>runtime.go
<ide> func (runtime *Runtime) Create(config *Config, name string) (*Container, []strin
<ide> return nil, nil, err
<ide> }
<ide>
<del> if img.Config != nil {
<del> if err := MergeConfig(config, img.Config); err != nil {
<del> return nil, nil, err
<add> checkDeprecatedExpose := func(config *C... | 1 |
Python | Python | remove stray pprint | 83112cf9db6c5bf993865507bcfdbd7985d954fd | <ide><path>libcloud/test/dns/test_godaddy.py
<ide>
<ide> import sys
<ide> import unittest
<del>from pprint import pprint
<add>
<ide> from libcloud.utils.py3 import httplib
<ide> from libcloud.dns.drivers.godaddy import GoDaddyDNSDriver
<ide> from libcloud.test import MockHttp | 1 |
Python | Python | add lm_labels for the lm cross-entropy | dc580dd4c720c5daefe7411f604b6908da99681e | <ide><path>transformers/modeling_bert.py
<ide> def tie_weights(self):
<ide> self.bert.embeddings.word_embeddings)
<ide>
<ide> def forward(self, input_ids, attention_mask=None, token_type_ids=None, position_ids=None, head_mask=None,
<del> masked_lm_labels=None, enco... | 1 |
Javascript | Javascript | fix utf8stream references | 2663c69f8d8ea4df9fbc40b03186259186011e97 | <ide><path>lib/http.js
<ide> function debug (x) {
<ide>
<ide> var sys = require('sys');
<ide> var net = require('net');
<del>var Utf8Stream = require('utf8_stream').Utf8Stream;
<add>var Utf8Decoder = require('utf8decoder').Utf8Decoder;
<ide> var events = require('events');
<ide> var Buffer = require('buffer').Buffer;
... | 1 |
PHP | PHP | apply fixes from styleci | bb91bf7c0883707dfef34a20a87e95a4f75e6c29 | <ide><path>src/Illuminate/View/Compilers/ComponentTagCompiler.php
<ide> protected function parseAttributeBag(string $attributeString)
<ide> */
<ide> protected function parseComponentTagClassStatements(string $attributeString)
<ide> {
<del> return preg_replace_callback(
<add> return preg_repl... | 1 |
PHP | PHP | make stringable tappable | 7f1138e362c6e124f4e1b327fc14d83eb80fffee | <ide><path>src/Illuminate/Support/Stringable.php
<ide>
<ide> use Closure;
<ide> use Illuminate\Support\Traits\Macroable;
<add>use Illuminate\Support\Traits\Tappable;
<ide> use Symfony\Component\VarDumper\VarDumper;
<ide>
<ide> class Stringable
<ide> {
<del> use Macroable;
<add> use Tappable, Macroable;
<ide>
<... | 1 |
Text | Text | fix a couple of typos in the js guide [ci skip] | 676ee7887e3689257811c8b00bd699f89a838910 | <ide><path>guides/source/working_with_javascript.md
<ide> ease! We will cover the following topics:
<ide> An introduction to AJAX
<ide> ------------------------
<ide>
<del>In order to understand AJAX, you must first understand what a web broswer does
<add>In order to understand AJAX, you must first understand what a w... | 1 |
PHP | PHP | remove additional wrong ds | 3708f80b3d66155c07b343440d1963a3ea6ee05a | <ide><path>src/View/View.php
<ide> protected function _getTemplateFileName(?string $name = null): string
<ide> } elseif (!$plugin || $this->templatePath !== $this->name) {
<ide> $name = $templatePath . $subDir . $name;
<ide> } else {
<del> $name = DIRECTORY_SEPARAT... | 1 |
PHP | PHP | use correct type hint for redirectto | 195529f6256464ec5df7b87d9a3ecfea5121e984 | <ide><path>src/Illuminate/Auth/AuthenticationException.php
<ide> class AuthenticationException extends Exception
<ide> /**
<ide> * The path the user should be redirected to.
<ide> *
<del> * @var string
<add> * @var string|null
<ide> */
<ide> protected $redirectTo;
<ide>
<ide> public func... | 1 |
Javascript | Javascript | update rawmodule to es2015 syntax | 24594b345a2e9f64f34befe001745ae6c6e31b87 | <ide><path>lib/RawModule.js
<ide> MIT License http://www.opensource.org/licenses/mit-license.php
<ide> Author Tobias Koppers @sokra
<ide> */
<del>var Module = require("./Module");
<del>var OriginalSource = require("webpack-sources").OriginalSource;
<del>var RawSource = require("webpack-sources").RawSource;
<del>
<del... | 2 |
Python | Python | add diagflat. begin to add numarray compatibility | a1e9a90654afd97b7bf45d318019966684935c51 | <ide><path>numpy/lib/twodim_base.py
<ide>
<ide> """
<ide>
<del>__all__ = ['diag','eye','fliplr','flipud','rot90','tri','triu','tril',
<add>__all__ = ['diag','diagflat','eye','fliplr','flipud','rot90','tri','triu','tril',
<ide> 'vander','histogram2d']
<ide>
<ide> from numpy.core.numeric import asanyarray, ... | 5 |
Text | Text | add bmeck to collaborators | 636935acc72b9c3cded5b2b2d722023b711c05c1 | <ide><path>README.md
<ide> information about the governance of the Node.js project, see
<ide> * [AndreasMadsen](https://github.com/AndreasMadsen) - **Andreas Madsen** <amwebdk@gmail.com>
<ide> * [bengl](https://github.com/bengl) - **Bryan English** <bryan@bryanenglish.com>
<ide> * [benjamingr](https://githu... | 1 |
Java | Java | remove trailing whitespace in spring-test | 7c84266259227467513aff7c6fe1ea84ba55a5d5 | <ide><path>spring-test/src/main/java/org/springframework/test/context/junit4/rules/SpringMethodRule.java
<ide> private Statement withProfileValueCheck(Statement next, Method testMethod, Objec
<ide> * that is annotated with {@code @ClassRule}.
<ide> */
<ide> private static SpringClassRule validateSpringClassRuleCon... | 3 |
Javascript | Javascript | raise exception when the socket is closed | 5976d5879621730b28b611da82c7f12286fd5fba | <ide><path>lib/net.js
<ide> Socket.prototype.write = function(data, arg1, arg2) {
<ide> Socket.prototype._write = function(data, encoding, cb) {
<ide> timers.active(this);
<ide>
<add> if (!this._handle) throw new Error('This socket is closed.');
<add>
<ide> // `encoding` is unused right now, `data` is always a bu... | 2 |
PHP | PHP | add arrayaccess implementation | 11ec41d6bc1d7d5806a1e23c0bde3c82cd19b6f4 | <ide><path>lib/Cake/Network/Http/Response.php
<ide> *
<ide> * ### Check the status code
<ide> *
<del> *
<ide> */
<del>class Response {
<add>class Response implements \ArrayAccess {
<ide>
<ide> const STATUS_OK = 200;
<ide> const STATUS_CREATED = 201;
<ide> class Response {
<ide> */
<ide> protected $_body;
<ide>... | 2 |
Go | Go | fix tcpechoserver.close() in unit test | 809207fc7432b59257d4026b98467ba7414014be | <ide><path>pkg/proxy/network_proxy_test.go
<ide> func (server *TCPEchoServer) Run() {
<ide> }
<ide>
<ide> func (server *TCPEchoServer) LocalAddr() net.Addr { return server.listener.Addr() }
<del>func (server *TCPEchoServer) Close() { server.listener.Addr() }
<add>func (server *TCPEchoServer) Close() ... | 1 |
Text | Text | fix typo on "occured" to "occurred" | bdd1d85813f6aef95dbe45de036f473029fa9ce0 | <ide><path>errors/template.md
<ide>
<ide> #### Why This Error Occurred
<ide>
<del><!-- Explain why the error occured. Ensure the description makes it clear why the warning/error exists -->
<add><!-- Explain why the error occurred. Ensure the description makes it clear why the warning/error exists -->
<ide>
<ide> ###... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.