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 | catch exception if pathlib not install | 0c970caa4a0d7744df89666c537fd5e6adc2a3eb | <ide><path>pytorch_pretrained_bert/file_utils.py
<ide> from pathlib import Path
<ide> PYTORCH_PRETRAINED_BERT_CACHE = Path(os.getenv('PYTORCH_PRETRAINED_BERT_CACHE',
<ide> Path.home() / '.pytorch_pretrained_bert'))
<del>except AttributeError:
<add>except (Attri... | 1 |
Python | Python | fix construction of input examples for roberta | d812e6d76e39bd3a5e037524ccb1c3bc9b6c2420 | <ide><path>examples/token-classification/run_pl_ner.py
<ide> def prepare_data(self):
<ide> cls_token=self.tokenizer.cls_token,
<ide> cls_token_segment_id=2 if self.config.model_type in ["xlnet"] else 0,
<ide> sep_token=self.tokenizer.sep_token,
<del> ... | 2 |
PHP | PHP | add typehint to view cell | 67390558aa7c16f2d6bb86a5e7b0ee029f5c54cc | <ide><path>src/View/Cell.php
<ide> <?php
<add>declare(strict_types=1);
<ide> /**
<ide> * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
<ide> * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<ide> abstract class Cell implements EventDispatcherInterface
<ide> * @param a... | 2 |
PHP | PHP | allow retrieving entity from entitycontext | 1952f855a18a20ff134e11972f62bdc587bf1851 | <ide><path>src/View/Form/EntityContext.php
<ide> public function val($field)
<ide> return null;
<ide> }
<ide> $parts = explode('.', $field);
<del> $entity = $this->_getEntity($parts);
<add> $entity = $this->entity($parts);
<ide>
<ide> if (end($parts) === '_ids' && !emp... | 2 |
Java | Java | fix various compiler warnings in spring-context | 40357be72bcd687972c0778f03593d076fe05d98 | <ide><path>spring-context/src/test/java/example/scannable/ServiceInvocationCounter.java
<ide> public void serviceExecution() {}
<ide> @Before("serviceExecution()")
<ide> public void countUse() {
<ide> this.useCount++;
<del> this.threadLocalCount.set(this.useCount);
<del> System.out.println("");
<add> threadLocal... | 4 |
Javascript | Javascript | add playbackrates() method | 6259ef79e90c0a66172ac722015a3ab43a72d173 | <ide><path>src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js
<ide> * @file playback-rate-menu-button.js
<ide> */
<ide> import MenuButton from '../../menu/menu-button.js';
<del>import Menu from '../../menu/menu.js';
<ide> import PlaybackRateMenuItem from './playback-rate-menu-item.js';
<ide> import Co... | 5 |
Javascript | Javascript | handle emit('error') before ctor | 63edde0e01e577691002c2f2e39fb30abccec1bc | <ide><path>lib/events.js
<ide> EventEmitter.prototype.setMaxListeners = function(n) {
<ide> EventEmitter.prototype.emit = function(type) {
<ide> var er, handler, len, args, i, listeners;
<ide>
<add> if (!this._events)
<add> this._events = {};
<add>
<ide> // If there is no 'error' event listener then throw.
<id... | 2 |
PHP | PHP | fix coding standards | d64b7ed3af6290b4748316e61a46402c6add75fc | <ide><path>lib/Cake/Controller/Component/RequestHandlerComponent.php
<ide> public function isAjax() {
<ide> public function isFlash() {
<ide> return $this->request->is('flash');
<ide> }
<del>;
<add>
<ide> /**
<ide> * Returns true if the current request is over HTTPS, false otherwise.
<ide> *
<ide><path>lib/Cake/C... | 5 |
Text | Text | update instructions for modifying hint topics | a2c5e2379e8307ea3b3e2b1c99da4c80e335f3cc | <ide><path>docs/how-to-work-on-coding-challenges.md
<ide> Here are specific formatting guidelines for the challenge seed code:
<ide>
<ide> Each challenge has a `Get a Hint` button, so a user can access any hints/solutions which have been created for the challenge. Curriculum hints/solutions topics are located on [our... | 1 |
Text | Text | add content into activity section | 62884faa2ec954392d00d8ba561783564511beed | <ide><path>guide/english/android-development/core-components/index.md
<ide> Core components are the essential elements contained in an Android app. Each of
<ide> ### [Activities](https://developer.android.com/guide/components/activities/)
<ide> An _activity_ is a component that has a user interface and represents a sin... | 1 |
Text | Text | convert releasing rails guide to markdown | bbcbe6e9c86b6291411f10fdc7ce099a998dc314 | <add><path>RELEASING_RAILS.md
<del><path>RELEASING_RAILS.rdoc
<del>= Releasing Rails
<add># Releasing Rails
<ide>
<ide> In this document, we'll cover the steps necessary to release Rails. Each
<ide> section contains steps to take during that time before the release. The times
<ide> suggested in each header are just ... | 1 |
Ruby | Ruby | pull install tests into a separate class | b49d3bd0a99d2ffb7d85e0fd3a13decf820ff85c | <ide><path>Library/Homebrew/test/test_pathname.rb
<ide> def test_install_removes_original
<ide> refute_predicate @file, :exist?
<ide> end
<ide>
<add> def test_install_creates_intermediate_directories
<add> touch @file
<add> refute_predicate @dir, :directory?
<add> @dir.install(@file)
<add> assert_pr... | 1 |
Ruby | Ruby | fix formula version | 3ee158bf16882c1a0c8b83f292ff303e7bef410e | <ide><path>Library/Homebrew/dev-cmd/pr-upload.rb
<ide> def check_bottled_formulae(json_files)
<ide>
<ide> hashes.each do |name, hash|
<ide> formula_path = HOMEBREW_REPOSITORY/hash["formula"]["path"]
<del> formula_version = Formulary.factory(formula_path).version
<add> formula_version = Formulary.fa... | 1 |
Javascript | Javascript | update copyright header in browserify config | d3c12487fd456f79b96c3985fbfbac95a518887c | <ide><path>grunt/config/browserify.js
<ide> var LICENSE_TEMPLATE =
<ide> '/**\n\
<ide> * @PACKAGE@ v@VERSION@\n\
<ide> *\n\
<del> * Copyright 2013 Facebook, Inc.\n\
<add> * Copyright 2013-2014 Facebook, Inc.\n\
<ide> *\n\
<ide> * Licensed under the Apache License, Version 2.0 (the "License");\n\
<ide> * you may no... | 1 |
PHP | PHP | pass the locator to associationcollection | 535f99f733b77636b8987783a73c2c211e0fc56f | <ide><path>src/ORM/AssociationCollection.php
<ide>
<ide> use ArrayIterator;
<ide> use Cake\Datasource\EntityInterface;
<add>use Cake\ORM\Locator\LocatorAwareTrait;
<ide> use InvalidArgumentException;
<ide> use IteratorAggregate;
<ide>
<ide> class AssociationCollection implements IteratorAggregate
<ide> {
<ide>
<ide>... | 3 |
Javascript | Javascript | add extra checks in simple/test-cli-eval | 19a432260cd2a2981c067c88f37f71206d23ccd2 | <ide><path>test/simple/test-cli-eval.js
<ide> var filename = __filename.replace(/\\/g, '/');
<ide> child.exec(nodejs + ' --eval 42',
<ide> function(err, stdout, stderr) {
<ide> assert.equal(stdout, '');
<add> assert.equal(stderr, '');
<ide> });
<ide>
<ide> // assert that "42\n" is written to stderr
... | 1 |
Python | Python | add flag to enable xla in keras models | 4571d3fa39d3e12ce141a5513e4156c837505889 | <ide><path>official/resnet/keras/keras_cifar_main.py
<ide> def learning_rate_schedule(current_epoch,
<ide> Returns:
<ide> Adjusted learning rate.
<ide> """
<add> del current_batch, batches_per_epoch # not used
<ide> initial_learning_rate = keras_common.BASE_LEARNING_RATE * batch_size / 128
<ide> learning_... | 3 |
Java | Java | compare kind references before checking log levels | 801f196de05a2d8424c30a66bede6f9a5bfa713d | <ide><path>spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java
<ide> /*
<del> * Copyright 2002-2012 the original author or authors.
<add> * Copyright 2002-2013 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> *... | 1 |
Javascript | Javascript | remove extra blank lines | bbf623208f6c4f48a10cc4505474002d49e1bcb6 | <ide><path>examples/todomvc/components/MainSection.js
<ide> import React, { PropTypes } from 'react';
<ide> import TodoItem from './TodoItem';
<ide>
<ide> export default class MainSection {
<del>
<ide> static propTypes = {
<ide> todos: PropTypes.array.isRequired,
<ide> actions: PropTypes.object.isRequired
<i... | 1 |
Ruby | Ruby | clarify index_by and index_with docs [ci skip] | 94b7453089d48049e4ad469edbb1865719d34ff1 | <ide><path>activesupport/lib/active_support/core_ext/enumerable.rb
<ide> def sum(identity = nil, &block)
<ide> end
<ide> end
<ide>
<del> # Convert an enumerable to a hash keying it by the block return value.
<add> # Convert an enumerable to a hash, using the block result as the key and the
<add> # element as ... | 1 |
Go | Go | allow overwrite in untar | 5a3d774e5651da772a065282a1fb1a31e19e911c | <ide><path>archive/archive.go
<ide> func TarWithOptions(srcPath string, options *TarOptions) (io.ReadCloser, error)
<ide> // identity (uncompressed), gzip, bzip2, xz.
<ide> // If `dest` does not exist, it is created unless there are multiple entries in `archive`.
<ide> // In the latter case, an error is returned.
<del... | 2 |
Python | Python | fix 1.4 tests and make flatten_choice a utility | ee2afb83e2e531922a5fc10c236f8b17b30fae82 | <ide><path>rest_framework/fields.py
<ide> def set_value(dictionary, keys, value):
<ide> dictionary[keys[-1]] = value
<ide>
<ide>
<add>def flatten_choice(choice):
<add> """
<add> Convert a single choices choice into a flat list of choices.
<add>
<add> Returns a list of choices pairs.
<add>
<add> flatte... | 1 |
PHP | PHP | add language line for file validation rule | cd032040441787c827aa07c428ae753281b685df | <ide><path>resources/lang/en/validation.php
<ide> 'distinct' => 'The :attribute field has a duplicate value.',
<ide> 'email' => 'The :attribute must be a valid email address.',
<ide> 'exists' => 'The selected :attribute is invalid.',
<add> 'file' =... | 1 |
Ruby | Ruby | document the partialiteration object | 7dc0f3fc8d3160db3408ef5a20c43a7268c0cd8e | <ide><path>actionview/lib/action_view/renderer/partial_renderer.rb
<ide> require 'thread_safe'
<ide>
<ide> module ActionView
<del> class PartialIteration # :nodoc:
<del> attr_reader :size, :index
<add> class PartialIteration
<add> # The number of iterations that will be done by the partial.
<add> attr_reade... | 1 |
Text | Text | streamline errors.md introductory material | 4ee50e714cda9a1d3e7f76d7eb3fcc53e7c0d8d5 | <ide><path>doc/api/errors.md
<ide> Applications running in Node.js will generally experience four categories of
<ide> errors:
<ide>
<del>- Standard JavaScript errors such as:
<del> - {EvalError} : thrown when a call to `eval()` fails.
<del> - {SyntaxError} : thrown in response to improper JavaScript language
<del> ... | 1 |
Ruby | Ruby | abandon top support | 41b92914f89be855cc6af768f13fd5fc53c967fa | <ide><path>activerecord/lib/arel/nodes/select_core.rb
<ide> module Arel # :nodoc: all
<ide> module Nodes
<ide> class SelectCore < Arel::Nodes::Node
<del> attr_accessor :top, :projections, :wheres, :groups, :windows
<add> attr_accessor :projections, :wheres, :groups, :windows
<ide> attr_accessor :h... | 10 |
Java | Java | fix checkstyle violations | c4d7e6ff46348a34c55e45b1d26726d3ef6cf259 | <ide><path>spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultWebClientTests.java
<ide> import org.mockito.junit.jupiter.MockitoSettings;
<ide> import org.mockito.quality.Strictness;
<ide> import org.reactivestreams.Publisher;
<del>import org.springframework.web.reactive.function.BodyE... | 2 |
Python | Python | reduce complexity linear_discriminant_analysis. | 4851942ec02b18bbe4c8b58c46efed9cc2115e32 | <ide><path>machine_learning/linear_discriminant_analysis.py
<ide> Linear Discriminant Analysis
<ide>
<ide>
<add>
<ide> Assumptions About Data :
<ide> 1. The input variables has a gaussian distribution.
<ide> 2. The variance calculated for each input variables by class grouping is the
<ide> fro... | 1 |
Text | Text | add full stop where needed. | 890f546c2534a0565012dc66778bee9e8fcd72d5 | <ide><path>README.md
<ide> Contributing
<ide> We welcome pull requests from Free Code Camp campers (our students) and seasoned JavaScript developers alike! Follow these steps to contribute:
<ide>
<ide> 1. Check our [public Waffle Board](https://waffle.io/freecodecamp/freecodecamp).
<del>2. Pick an issue that nobody ... | 1 |
PHP | PHP | remove test for unimplementable feature | db3b6d97ed67d3bb7564cc641d602ce30d8ade42 | <ide><path>tests/TestCase/Http/RunnerTest.php
<ide> */
<ide> namespace Cake\Test\TestCase;
<ide>
<del>use Cake\Core\Exception\Exception;
<ide> use Cake\Http\MiddlewareQueue;
<ide> use Cake\Http\Response;
<ide> use Cake\Http\Runner;
<ide> public function testRunSingle()
<ide> $this->assertInstanceof(ResponseIn... | 1 |
PHP | PHP | fix cs error | 47bf1d09d6d1d70c095e4f17b0dcc02cb6977805 | <ide><path>src/View/View.php
<ide> protected function _getLayoutFileName(?string $name = null): string
<ide> if ($name === null) {
<ide> if ($this->layout === false) {
<ide> throw new RuntimeException(
<del> 'Setting View::$layout to false is no longer supported.'
... | 1 |
Javascript | Javascript | stop global event bubbling using onlyhandlers flag | 560c33b395ec809cc296c97cab41244949ec863c | <ide><path>src/event.js
<ide> jQuery.event = {
<ide>
<ide> // TODO: Stop taunting the data cache; remove global events and always attach to document
<ide> cache = jQuery.cache;
<del> event.stopPropagation();
<ide> for ( i in cache ) {
<ide> if ( cache[ i ].events && cache[ i ].events[ type ] ) {
<del> ... | 1 |
Javascript | Javascript | fix trailing slash issue. fixes | 075ed988996a79bc27f76fd1a582ac6cd94452b2 | <ide><path>packages/ember-routing/lib/vendor/route-recognizer.js
<ide> define("route-recognizer",
<ide>
<ide> // DEBUG GROUP path
<ide>
<add> var pathLen = path.length;
<add>
<ide> if (path.charAt(0) !== "/") { path = "/" + path; }
<ide>
<add> if (pathLen > 1 && path.charAt(pathLen - 1)... | 1 |
PHP | PHP | trigger an exception when alias names do not match | c6eca2f9388c25c2d2cb79e27a76ae49bb1fe4e3 | <ide><path>src/ORM/EagerLoader.php
<ide> protected function _normalizeContain(Table $parent, $alias, $options, $paths)
<ide> sprintf('%s is not associated with %s', $parent->alias(), $alias)
<ide> );
<ide> }
<add> if ($instance->alias() !== $alias) {
<add> throw new... | 3 |
Javascript | Javascript | simplify objecttomap by using object.entries | c747449c651ad7bf0f6d5e0b46975f457e1f15df | <ide><path>lib/util/objectToMap.js
<ide> "use strict";
<ide>
<ide> /**
<del> * convert an object into its 2D array equivalent to be turned
<del> * into an ES6 map
<add> * Convert an object into an ES6 map
<ide> *
<del> * @param {object} obj - any object type that works with Object.keys()
<del> * @returns {Map<TODO, T... | 1 |
Ruby | Ruby | bring the missing parameters back | 36368eaa1ea778fd2556db482183892324c58b95 | <ide><path>activerecord/lib/active_record/attribute_methods.rb
<ide> def [](name)
<ide> end
<ide>
<ide> private
<del> def method_body; raise NotImplementedError; end
<add>
<add> # Override this method in the subclasses for method body.
<add> def method_body(method_name, const_name)
<add> ... | 1 |
PHP | PHP | add integration test for binary uuid | 4db1edd813f83a6234c162c7ea66ddc9857cec4b | <ide><path>src/Database/Type/BinaryUuidType.php
<ide> public function toDatabase($value, Driver $driver)
<ide> /**
<ide> * Generate a new binary UUID
<ide> *
<del> * @return mixed A new primary key value.
<add> * @return string A new primary key value.
<ide> */
<ide> public function newId... | 3 |
Javascript | Javascript | update the documentation of the button component | 6b7014ab047ae88aded9beb645ac05d16f4ddc37 | <ide><path>Libraries/Components/Button.js
<ide> *
<ide> * @format
<ide> * @flow
<add> * @generate-docs
<ide> */
<ide>
<ide> 'use strict';
<ide> import type {ColorValue} from '../StyleSheet/StyleSheet';
<ide>
<ide> type ButtonProps = $ReadOnly<{|
<ide> /**
<del> * Text to display inside the button
<add> Tex... | 1 |
Python | Python | modernize python 2 code to get ready for python 3 | ad6b0f1c6b3d79a8a8a17ea38ead4b5936f11917 | <ide><path>Graphs/basic-graphs.py
<ide> def adjm():
<ide> """
<ide>
<ide>
<del>def floy(xxx_todo_changeme):
<del> (A, n) = xxx_todo_changeme
<add>def floy(A_and_n):
<add> (A, n) = A_and_n
<ide> dist = list(A)
<ide> path = [[0] * n for i in xrange(n)]
<ide> for k in xrange(n):
<ide> def edglist():
<i... | 1 |
Python | Python | move unused args to kwargs | 6b4c617666fd26646d44d54f0c45dfe1332b12ca | <ide><path>src/transformers/trainer.py
<ide> def hyperparameter_search(
<ide> hp_space: Optional[Callable[["optuna.Trial"], Dict[str, float]]] = None,
<ide> compute_objective: Optional[Callable[[Dict[str, float]], float]] = None,
<ide> n_trials: int = 20,
<del> timeout: int = 1800,
<del> ... | 1 |
Text | Text | fix ironic typo in changelog | 45bd52d472c3131c7ad5077cf8b20a241d82c555 | <ide><path>CHANGELOG.md
<ide> * Registry: Implement login with private registry
<ide> * Remote API: Bump to v1.5
<ide> * Packaging: Break down hack/make.sh into small scripts, one per 'bundle': test, binary, ubuntu etc.
<del>* Documentation: General improvments
<add>* Documentation: General improvements
<ide> - Runtime... | 1 |
Javascript | Javascript | fix binding tests to not use sc.object | d191f7bf142c54d29ab25e3389f0f0e8a964efcf | <ide><path>packages/sproutcore-metal/tests/binding/and_test.js
<ide> var MyApp, set = SC.set, get = SC.get;
<ide>
<ide> module('binding/and', {
<ide> setup: function() {
<del> MyApp = SC.Object.create({
<add> MyApp = {
<ide> foo: false,
<del> bar: false,
<del> bazBinding: SC.Binding.and('foo', ... | 8 |
Text | Text | fix markdown error in airflow readme | 6e592ad7565d4f8a7371dea71ce6e74e512dec11 | <ide><path>dev/README_RELEASE_AIRFLOW.md
<ide> - [Prepare the Apache Airflow Package RC](#prepare-the-apache-airflow-package-rc)
<ide> - [Update the milestone](#update-the-milestone)
<ide> - [Build RC artifacts](#build-rc-artifacts)
<del> - [[\Optional\] Prepare new release branches and cache](#%5Coptional%5C-prep... | 1 |
Python | Python | add lxccontainerdriver class | f70cd3d5364d1976f3d1b957b8b2143747ed3dd8 | <ide><path>libcloud/container/drivers/lxc.py
<add>"""
<add>Module for handling LXC containers
<add>"""
<add>from libcloud.container.base import (Container, ContainerDriver, ContainerImage)
<add>
<add>class LXCContainerDriver(ContainerDriver):
<add> """
<add> Driver for LXC containers
<add> """
<add> pass
<i... | 1 |
Javascript | Javascript | exclude the e2e test that fails on safari | f0c94ea292d214c873eaa82a901ca5c2abc26f66 | <ide><path>src/ng/filter/limitTo.js
<ide> 'use strict';
<ide>
<del>*
<add>/*
<ide> * @ngdoc filter
<ide> * @name limitTo
<ide> * @kind function
<ide> });
<ide> </file>
<ide> </example>
<del>
<add>*/
<ide> function limitToFilter(){
<ide> return function(input, limit) {
<ide> if (isNumber(input))... | 1 |
Javascript | Javascript | fix typo in view.js | a7da457e6bdf474c0abc820c359f094475819cfd | <ide><path>packages/react-devtools-scheduling-profiler/src/view-base/View.js
<ide> export class View {
<ide> _needsDisplay = true;
<ide>
<ide> /**
<del> * Whether the heirarchy below this view has subviews that need display.
<add> * Whether the hierarchy below this view has subviews that need display.
<ide> ... | 1 |
PHP | PHP | update doc block | a7213b2e6451b45a9801e8ca4060641c6848a196 | <ide><path>lib/Cake/Error/exceptions.php
<ide> class CakeBaseException extends RuntimeException {
<ide> * - an array of string headers is also accepted
<ide> * @param string $value. The header value.
<ide> * @return array
<del> * @see CakeResponse::header() See also
<add> * @see CakeResponse::header()
<ide> */
<ide... | 1 |
PHP | PHP | fix logical operators | 22b72f03a22e5d7a96eb7d77c6f17cbdc5d8fd74 | <ide><path>src/Collection/CollectionTrait.php
<ide> public function cartesianProduct(callable $operation = null, callable $filter =
<ide> $currentIndexes = array_fill(0, $lastIndex + 1, 0);
<ide> $changeIndex = $lastIndex;
<ide>
<del> while (!($changeIndex === 0 AND $currentIndexes[0] === $count... | 1 |
Text | Text | add kitematic to readme.md | 7bd250c74d1dbc64be2ccb0978e1babd55d18afa | <ide><path>README.md
<ide> There are a number of projects under development that are based on Docker's
<ide> core technology. These projects expand the tooling built around the
<ide> Docker platform to broaden its application and utility.
<ide>
<del>If you know of another project underway that should be listed here, ... | 1 |
Text | Text | address comments on original pr | a0fe85542f8c17a85bbd857f319a7faa816dd961 | <ide><path>CONTRIBUTING.md
<ide> git clone https://github.com/your-username/redux.git
<ide> ### Building
<ide>
<ide> #### Build Redux
<del>To build Redux:
<add>
<add>Running the `build` task will create both a CommonJS module-per-module build and a UMD build.
<ide> ```
<ide> npm run build
<ide> ```
<ide>
<del>To buil... | 1 |
Javascript | Javascript | allow querystring for assets, fixes #217 | 6e7bd0c60b5a6f32b2ccddf35ea95238ced31ebd | <ide><path>lib/Compiler.js
<ide> Compiler.prototype.emitAssets = function(compilation, callback) {
<ide>
<ide> require("async").forEach(Object.keys(compilation.assets), function(file, callback) {
<ide>
<del> if(file.indexOf("/") >= 0) {
<del> var idx = file.lastIndexOf("/");
<del> var dir = file.substr(0, i... | 2 |
Python | Python | add unit testing | 81b97607339ac68b27cf72ba7923345d58e2895e | <ide><path>numpy/array_api/tests/test_asarray.py
<add>import numpy as np
<add>
<add>
<add>def test_fast_return():
<add> """"""
<add> a = np.array([1, 2, 3], dtype='i')
<add> assert np.asarray(a) is a
<add> assert np.asarray(a, dtype='i') is a
<add> # This may produce a new view or a copy, but is never th... | 1 |
PHP | PHP | add a new exception class for routing errors | ac16ff1bbc179865e24f8102b99f50d9461b5fbf | <ide><path>src/Routing/Router.php
<ide>
<ide> use Cake\Core\App;
<ide> use Cake\Core\Configure;
<del>use Cake\Error;
<ide> use Cake\Network\Request;
<add>use Cake\Routing\Error\MissingRouteException;
<ide> use Cake\Routing\ScopedRouteCollection;
<ide> use Cake\Routing\Route\Route;
<ide> use Cake\Utility\Inflector;
<id... | 2 |
Javascript | Javascript | fix path to uiexplorer examples | f15031a37499701dc8cdbbfbd1b7d376c34cb398 | <ide><path>website/server/extractDocs.js
<ide> function getPlatformFromPath(filepath) {
<ide> }
<ide>
<ide> function getExamplePaths(componentName, componentPlatform) {
<del> const componentExample = '../Examples/UIExplorer/' + componentName + 'Example.';
<add> const componentExample = '../Examples/UIExplorer/js/' +... | 1 |
PHP | PHP | update projecttask, fixes | 72de81ce74fc216a2b4b49d5c480444e02439064 | <ide><path>cake/console/libs/tasks/project.php
<ide> function __buildDirLayout($path) {
<ide> }
<ide>
<ide> if (!$Folder->chmod($path . DS . 'tmp', 0777)) {
<del> $this->err('Could path set permissions on '. $project . DS .'tmp' . DS . '*');
<add> $this->err('Could not set permissions on '. $path . DS ... | 1 |
PHP | PHP | move view error binding to a new booted event | 16f9cf75b9d0e869bc1995741d4bddf91267fe21 | <ide><path>src/Illuminate/Foundation/Application.php
<ide> class Application extends Container implements HttpKernelInterface {
<ide> protected $booted = false;
<ide>
<ide> /**
<del> * Get the booting callbacks.
<add> * The array of booting callbacks.
<ide> *
<ide> * @var array
<ide> */
<ide> protected $boo... | 2 |
Javascript | Javascript | introduce macro backdoor | 630e1e95d3155696d66cb72e5665c566b28cf195 | <ide><path>packages/ember-glimmer/lib/syntax.js
<ide> function refineBlockSyntax(sexp, builder) {
<ide> return false;
<ide> }
<ide>
<add>let experimentalMacros = [];
<add>
<add>// This is a private API to allow for expiremental macros
<add>// to be created in user space. Registering a macro should
<add>// should be ... | 1 |
Ruby | Ruby | bring comment in line with rest of initializers | e50ea481dd4ee2e82e947835dff849f28130c2c2 | <ide><path>railties/lib/rails/generators/rails/app/templates/config/initializers/application_controller_renderer.rb
<del>## Change renderer defaults here.
<del>#
<add># Be sure to restart your server when you modify this file.
<add>
<ide> # ApplicationController.renderer.defaults.merge!(
<ide> # http_host: 'example.o... | 1 |
Javascript | Javascript | prefer single quotes + some whitespaces | 6f91ffeb914e3a3670d675397cbdbff5cf590edd | <ide><path>test/BinderSpec.js
<ide> describe('Binder', function() {
<ide> }));
<ide>
<ide> it('ReplaceBindingInTextWithSpan preserve surounding text', function() {
<del> expect(this.compileToHtml("<b>a{{b}}c</b>")).toBe('<b>a<span ng:bind="b"></span>c</b>');
<add> expect(this.compileToHtml('<b>a{{b}}c</b>'))... | 2 |
Ruby | Ruby | fix disable_joins when using an enum sti type | 207747ec2d07699c30cd06c1bcf5bacd567c9417 | <ide><path>activerecord/lib/active_record/associations/disable_joins_association_scope.rb
<ide> def last_scope_chain(reverse_chain, owner)
<ide>
<ide> def add_constraints(reflection, key, join_ids, owner, ordered)
<ide> scope = reflection.build_scope(reflection.aliased_table).where(key => join_ids)
<... | 3 |
Javascript | Javascript | add mac to test-os | 76ada45342db20947ec638659276e39762b22c15 | <ide><path>test/simple/test-os.js
<ide> switch (platform) {
<ide> var filter = function(e) { return e.address == '127.0.0.1'; };
<ide> var actual = interfaces.lo.filter(filter);
<ide> var expected = [{ address: '127.0.0.1', netmask: '255.0.0.0',
<del> family: 'IPv4', internal: true }];
... | 1 |
Ruby | Ruby | deprecate the env method on controller instances | 05934d24aff62d66fc62621aa38dae6456e276be | <ide><path>actionpack/lib/action_controller/metal.rb
<ide> require 'active_support/core_ext/array/extract_options'
<ide> require 'action_dispatch/middleware/stack'
<add>require 'active_support/deprecation'
<ide>
<ide> module ActionController
<ide> # Extend ActionDispatch middleware stack to make it aware of options
... | 3 |
Ruby | Ruby | fix string#blank? on binary strings | 0c58f39c2c7ff590e854772e41f6d10117a51c53 | <ide><path>activesupport/lib/active_support/core_ext/object/blank.rb
<ide> class String
<ide> # " something here ".blank? # => false
<ide> #
<ide> def blank?
<del> self !~ NON_WHITESPACE_REGEXP
<add> # 1.8 does not takes [:space:] properly
<add> if encoding_aware?
<add> self !~ /[^[:space:]]/
<add... | 1 |
Text | Text | replace text "помутнение" on "непрозрачность" | 1d162bf8a7fd9b88737173d74baf3e3f2118f243 | <ide><path>guide/russian/css/colors/index.md
<ide> Hex-коды нечувствительны к регистру, что озна
<ide>
<ide> Кроме того, имеется 16 777 216 возможных цветовых комбинаций с использованием шестнадцатеричного кода.
<ide>
<del>### помутнение
<add>### Непрозрачность
<ide>
<ide> Свойство opacity CSS3 задает непрозрачность... | 1 |
PHP | PHP | use cleaner api for mocking model events | c6eff0f8dcd480985ca7788afa1d98bf5d62983c | <ide><path>src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php
<ide> protected function withoutModelEvents()
<ide> *
<ide> * These events will be mocked, so that handlers will not actually be executed.
<ide> *
<add> * @param string $model
<ide> * @param array|string $even... | 2 |
Ruby | Ruby | add tests for associations without counter_cache | 543523045112c5f5920c486e6fcf2d7e1ffedf5a | <ide><path>activerecord/test/cases/associations/belongs_to_associations_test.rb
<ide> require 'models/line_item'
<ide> require 'models/column'
<ide> require 'models/record'
<add>require 'models/ship'
<add>require 'models/treasure'
<add>require 'models/parrot'
<ide>
<ide> class BelongsToAssociationsTest < ActiveRecord:... | 4 |
Text | Text | add ricky zhou to collaborators | e1eb56fc94f4a345dfde51847e551b132cf98da8 | <ide><path>README.md
<ide> For information about the governance of the Node.js project, see
<ide> **Pranshu Srivastava** <rexagod@gmail.com> (he/him)
<ide> * [richardlau](https://github.com/richardlau) -
<ide> **Richard Lau** <riclau@uk.ibm.com>
<add>* [rickyes](https://github.com/rickyes) -
<add>**Ricky Zh... | 1 |
Mixed | Javascript | remove more upstream modules that aren't used | 3525d01b9b9e0e635fd1a76777abf510ee64275a | <ide><path>src/vendor/immutable/Immutable.js
<del>/**
<del> * Copyright 2013-2015, Facebook, Inc.
<del> * All rights reserved.
<del> *
<del> * This source code is licensed under the BSD-style license found in the
<del> * LICENSE file in the root directory of this source tree. An additional grant
<del> * of patent right... | 6 |
Ruby | Ruby | improve warning when db is missing | 5e9d52e7fe6ba8a0938e500c8b8ad86193287324 | <ide><path>activerecord/lib/active_record/errors.rb
<ide> def initialize(message = nil)
<ide> class << self
<ide> def db_error(db_name)
<ide> NoDatabaseError.new(<<~MSG)
<del> We could not find your database: #{db_name}. Which can be found in the database configuration file located at config/... | 1 |
Python | Python | add type annotations for bert and copies | bb69d154c52b7c530bc002c7c02675f58c5620e5 | <ide><path>src/transformers/models/bert/modeling_bert.py
<ide> import os
<ide> import warnings
<ide> from dataclasses import dataclass
<del>from typing import Optional, Tuple
<add>from typing import List, Optional, Tuple, Union
<ide>
<ide> import torch
<ide> import torch.utils.checkpoint
<ide> class PreTrainedModel
<i... | 5 |
Text | Text | use serial comma in tls docs | 58d8d69f12cc0646cca8ff352b0305bd1e7f2629 | <ide><path>doc/api/tls.md
<ide> changes:
<ide> * `socket` {stream.Duplex} Establish secure connection on a given socket
<ide> rather than creating a new socket. Typically, this is an instance of
<ide> [`net.Socket`][], but any `Duplex` stream is allowed.
<del> If this option is specified, `path`, `host` an... | 1 |
Python | Python | avoid nested dispatch in numpy.core.shape_base | 8f9ec01afa2b2dee209010f6155da27af02de96d | <ide><path>numpy/core/shape_base.py
<ide> def atleast_2d(*arys):
<ide> if ary.ndim == 0:
<ide> result = ary.reshape(1, 1)
<ide> elif ary.ndim == 1:
<del> result = ary[newaxis,:]
<add> result = ary[newaxis, :]
<ide> else:
<ide> result = ary
<ide> ... | 1 |
Javascript | Javascript | convert `appmodule()` to `setupapptest()` helper | c6202fcd7cd006bef785c626ae4abdc2699e26d1 | <ide><path>tests/node/app-boot-test.js
<del>var appModule = require('./helpers/app-module');
<add>const setupAppTest = require('./helpers/setup-app');
<ide>
<ide> require('./helpers/assert-html-matches').register();
<ide>
<del>appModule('App Boot');
<add>QUnit.module('App Boot', function(hooks) {
<add> setupAppTest(... | 3 |
Text | Text | add postmark to the ingress lists [ci skip] | 9edc84cdfa8908a436901d85309cadf65d457d8f | <ide><path>actionmailbox/README.md
<ide> # Action Mailbox
<ide>
<del>Action Mailbox routes incoming emails to controller-like mailboxes for processing in Rails. It ships with ingresses for Amazon SES, Mailgun, Mandrill, and SendGrid. You can also handle inbound mails directly via the built-in Postfix ingress.
<add>Act... | 2 |
PHP | PHP | fix cs errors | 0e6bd00b66c3dd81baac598f44f6b0d97d326c1f | <ide><path>src/Mailer/Message.php
<ide> protected function createBoundary(): void
<ide> /**
<ide> * Generate full message.
<ide> *
<del> * @return void
<add> * @return array
<ide> */
<ide> protected function generateMessage()
<ide> {
<ide><path>src/Mailer/Renderer.php
<ide> */
<ide> ... | 2 |
PHP | PHP | fix bug in fluent class | 6f49fc29697fa1a33320bfbc465e71a685a41190 | <ide><path>src/Illuminate/Support/Fluent.php
<ide> public function __construct($attributes = array())
<ide> {
<ide> foreach ($attributes as $key => $value)
<ide> {
<del> $this->$key = $value;
<add> $this->attributes[$key] = $value;
<ide> }
<ide> }
<ide> | 1 |
PHP | PHP | fix some phpdoc inconsistencies | b05f46a0500349dadda6886178c043d3b72fc392 | <ide><path>src/Illuminate/Database/Query/Builder.php
<ide> protected function invalidOperatorAndValue($operator, $value)
<ide> /**
<ide> * Add an "or where" clause to the query.
<ide> *
<del> * @param string|\Closure $column
<add> * @param \Closure|string $column
<ide> * @param string $... | 2 |
Python | Python | fix test_ccompiler_opt when path contains dots | 6f2f26e08c6e0d476593c82ad31d13847f30cbf4 | <ide><path>numpy/distutils/tests/test_ccompiler_opt.py
<ide> def get_targets(self, targets, groups, **kwargs):
<ide> gflags = {}
<ide> fake_objects = opt.try_dispatch([file])
<ide> for source, flags in fake_objects:
<del> gtar = source.split('.')[1:-1]
<add> ... | 1 |
Python | Python | fix .descr of aligned structures | 3cf31df5d76acf7ff31c23d6a387824fce68e9df | <ide><path>numpy/core/_internal.py
<ide> def _array_descr(descriptor):
<ide> offset = 0
<ide> for field in ordered_fields:
<ide> if field[1] > offset:
<del> result.append(('','|V%d' % (field[1]-offset)))
<add> num = field[1] - offset
<add> result.append(('','|V%d' % num)... | 1 |
Javascript | Javascript | add localetitle to the challenge schema | 65094d13e4f040c042baa1076df388ca4cfbf396 | <ide><path>curriculum/schema/challengeSchema.js
<ide> const Joi = require('joi');
<ide> Joi.objectId = require('joi-objectid')(Joi);
<add>const path = require('path');
<add>require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
<ide>
<del>const schema = Joi.object().keys({
<add>const { LOCALE: lang... | 1 |
Javascript | Javascript | make test work on all platforms | cd907e6a5f978333a763338a6801495efd38a5b0 | <ide><path>test/binCases/config-name/not-found/test.js
<ide> "use strict";
<ide>
<ide> module.exports = function testAssertions(code, stdout, stderr) {
<del> code.should.be.exactly(255);
<del>
<add> code.should.not.eql(0);
<ide> stdout.should.be.empty();
<ide> stderr[0].should.containEql("Configuration with name \'f... | 1 |
Python | Python | remove code duplication | 59fc36e334c845d5079d5db69afbb07a4e0e310b | <ide><path>glances/plugins/glances_processlist.py
<ide> def msg_curse(self, args=None):
<ide> return ret
<ide>
<ide> # Compute the sort key
<del> if glances_processes.getmanualsortkey() is None:
<del> process_sort_key = glances_processes.getautosortkey()
<del> else:
<del> ... | 1 |
Javascript | Javascript | adapt tests to new expando name | ee8fae8c0f1680428b0eb84d1306b55bebf44074 | <ide><path>test/AngularSpec.js
<ide> describe('angular', function() {
<ide> expect(function () {
<ide> angular.bootstrap(element);
<ide> }).toThrowMatching(
<del> /\[ng:btstrpd\] App Already Bootstrapped with this Element '<div class="?ng\-scope"?( ng\-[0-9]+="?[0-9]+"?)?>'/i
<add> /\[... | 2 |
Python | Python | delay the creation of ssh proxy until get_conn() | 129b4d2ac2ce09d42fb487f8a9aaac7eb7901a05 | <ide><path>airflow/providers/ssh/hooks/ssh.py
<ide> # under the License.
<ide> """Hook for SSH connections."""
<ide> import os
<add>import sys
<ide> import warnings
<ide> from base64 import decodebytes
<ide> from io import StringIO
<ide> from paramiko.config import SSH_PORT
<ide> from sshtunnel import SSHTunnelForwarde... | 1 |
Python | Python | improve task_id to pod name conversion | eee3df457063df04d0fa2e57431786c6f223f700 | <ide><path>airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
<ide> from airflow.utils.context import Context
<ide>
<ide>
<add>def _task_id_to_pod_name(val: str) -> str:
<add> """
<add> Given a task_id, convert it to a pod name.
<add> Adds a 0 if start or end char is invalid.
<add> Replaces... | 2 |
Text | Text | centralize discussion of behavior label and env | 39a71acf7e18c2d00d32b01db3daaebc7392d92a | <ide><path>docs/reference/logging/fluentd.md
<ide> the log tag format.
<ide>
<ide> ### labels and env
<ide>
<del>The `labels` and `env` options takes a comma-separated list of keys. If there is collision between `label` and `env` keys, the value of the `env` takes precedence.
<add>The `labels` and `env` options each ... | 3 |
PHP | PHP | unify templated tags | f990e73ffa6fa880a89a3bc9c340c8713ec3b607 | <ide><path>src/View/Helper/HtmlHelper.php
<ide> class HtmlHelper extends Helper {
<ide> 'parastart' => '<p{{attrs}}>',
<ide> 'css' => '<link rel="{{rel}}" href="{{url}}"{{attrs}}/>',
<ide> 'style' => '<style{{attrs}}>{{content}}</style>',
<del> 'charset' => '<meta http-equiv="Content-Type" content="text/html... | 1 |
Text | Text | drop core team member | 82b9511abc3af9bd7e97b06b786df0fd92bbb170 | <ide><path>README.md
<ide> If you have discovered a 🐜 or have a feature suggestion, feel free to create
<ide> <br>
<ide> <p>Founder of the core team</p>
<ide> </td>
<del> <td align="center" valign="top">
<del> <img width="150" height="150" src="https://github.com/bebraw.png?s=150">
<d... | 1 |
Mixed | Text | update readme to latest release | e6f00a11d7fa34215184e3c797e19e6c7debe0fe | <ide><path>README.md
<ide> Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih.
<ide> 1. **[Megatron-GPT2](https://huggingface.co/docs/transformers/model_doc/megatron_gpt2)** (from NVIDIA) released with the paper [Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelis... | 5 |
Javascript | Javascript | fix flow from | 65c137768abf696ee1c79a026d6df3a166dd8553 | <ide><path>packages/react-dom/src/events/isEventSupported.js
<ide> function isEventSupported(eventNameSuffix: string): boolean {
<ide> if (!isSupported) {
<ide> const element = document.createElement('div');
<ide> element.setAttribute(eventName, 'return;');
<del> isSupported = typeof element[eventName] ===... | 2 |
Javascript | Javascript | fix language, meridiem and days of week | 6c814f3c59daf24023c10cd0b7b18d5a13e9c393 | <ide><path>src/locale/ne.js
<ide> export default moment.defineLocale('ne', {
<ide> monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),
<ide> weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),
<ide> weekdaysShort : 'आइत._सोम._मङ्गल._बुध... | 2 |
Text | Text | add section on pooling | 6caff8ec377cc2d16fe66da4bc48721dcb1df055 | <ide><path>guide/english/machine-learning/neural-networks/convolutional-neural-networks/index.md
<ide> Convolutional Neural Networks (ConvNets or CNNs) are a category of Neural Networ
<ide>
<ide> CNNs are biologically inspired models on how mammals visually perceive things. When we see something a layer of neurons are... | 1 |
Python | Python | add disambiguation code to load | 4d2dd4b763a33fb48129190377a759bf394db386 | <ide><path>io.py
<ide>
<ide> __all__ = ['savetxt', 'loadtxt',
<ide> 'load', 'loads',
<del> 'save', 'savez',
<add> 'save', 'savez',
<ide> 'packbits', 'unpackbits',
<ide> 'DataSource',
<ide> ]
<ide>
<ide> _file = file
<ide>
<add>class _bagobj(object):
<ad... | 1 |
Mixed | Javascript | add recursive watch to linux | 17ae2ab7509c8379e842e606a011f688fcbcf7f2 | <ide><path>doc/api/fs.md
<ide> The `atime` and `mtime` arguments follow these rules:
<ide> <!-- YAML
<ide> added: v0.5.10
<ide> changes:
<add> - version: REPLACEME
<add> pr-url: https://github.com/nodejs/node/pull/45098
<add> description: Added recursive support for Linux, AIX and IBMi.
<ide> - version:
<ide> ... | 13 |
Text | Text | add solution to challenge | f4353999e3e3dff5142a4159938fc5d8623a6cad | <ide><path>curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement.english.md
<ide> console.log(countOnline(users));
<ide> <section id='solution'>
<ide>
<ide> ```js
<del>// solution required
<add>let users = {
<ad... | 1 |
Mixed | Ruby | split direct method into two | d7c1e62c2cd2969b991bc4a1150b02b27f6d6e3f | <ide><path>actionpack/CHANGELOG.md
<ide>
<ide> *Andrew White*
<ide>
<del>* Add the `direct` method to the routing DSL
<add>* Add the `resolve` method to the routing DSL
<ide>
<del> This new method allows customization of the routing behavior in two ways:
<add> This new method allows customization of th... | 5 |
PHP | PHP | move socketexception to network/error | 45eed035095dfa0600502578077d4902d7f263d0 | <ide><path>src/Network/Email/Email.php
<ide> use Cake\Core\App;
<ide> use Cake\Core\Configure;
<ide> use Cake\Core\StaticConfigTrait;
<del>use Cake\Error;
<add>use Cake\Error\Exception;
<ide> use Cake\Log\Log;
<add>use Cake\Network\Error;
<ide> use Cake\Network\Http\FormData\Part;
<ide> use Cake\Utility\File;
<ide> use... | 10 |
Javascript | Javascript | remove iscontainer flag | 2f2c8ac314f692599a7307242b0985f6347ed020 | <ide><path>packages/ember-views/lib/system/renderer.js
<ide> EmberRenderer.prototype.cancelRender =
<ide> run.cancel(id);
<ide> };
<ide>
<del>EmberRenderer.prototype.createChildViewsMorph =
<del> function EmberRenderer_createChildViewsMorph(view, _element) {
<del> if (view.createChildViewsMorph) {
<del> ... | 4 |
Javascript | Javascript | add handlebars to benchmark runner | 25b38af12370c8be97cb75d19cb244ebaee0df85 | <ide><path>benchmarks/runner.js
<ide> function makeiframe(emberPath, suitePath, profile, callback) {
<ide> write("<title>" + name + "</title>");
<ide> write("<script src='../lib/jquery-1.7.2.js'></script>");
<ide> write("<script>ENV = {VIEW_PRESERVES_CONTEXT: true};</script>");
<add> write("<script src='../lib/h... | 1 |
Go | Go | fix typo in comments | ae6cf966f9ed4bc98d07619fde3344be7cbffc99 | <ide><path>layer/layer.go
<ide> type RWLayer interface {
<ide> Parent() Layer
<ide>
<ide> // Mount mounts the RWLayer and returns the filesystem path
<del> // the to the writable layer.
<add> // to the writable layer.
<ide> Mount(mountLabel string) (containerfs.ContainerFS, error)
<ide>
<ide> // Unmount unmounts ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.