content_type stringclasses 8
values | main_lang stringclasses 7
values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
Ruby | Ruby | allow load from file content | ffd92a87c5e0503c1ca63c52d54332c2c93618c2 | <ide><path>Library/Homebrew/tab.rb
<ide> def self.create(formula, compiler, stdlib, build)
<ide> end
<ide>
<ide> def self.from_file path
<del> attributes = Utils::JSON.load(File.read(path))
<add> from_file_content(File.read(path), path)
<add> end
<add>
<add> def self.from_file_content content, path
<add> ... | 1 |
Javascript | Javascript | use a fixture to test `helper-test` blueprint | cb2cadf9912e1b4616aea1e090b8c2b920b3db77 | <ide><path>node-tests/blueprints/helper-test.js
<ide> 'use strict';
<ide>
<add>const file = require('../helpers/file');
<ide> var blueprintHelpers = require('ember-cli-blueprint-test-helpers/helpers');
<ide> var setupTestHooks = blueprintHelpers.setupTestHooks;
<ide> var emberNew = blueprintHelpers.emberNew;
<ide> des... | 3 |
PHP | PHP | fix more cs | d5a189d3f8f2c40c5ed1672a1e993e5911455d17 | <ide><path>src/Shell/Task/PluginTask.php
<ide> public function bake($plugin) {
<ide> $out .= "class AppController extends BaseController {\n\n";
<ide> $out .= "}\n";
<ide> $this->createFile($this->path . $plugin . DS . $classBase . DS . 'Controller' . DS . $controllerFileName, $out);
<del> $emptyFile = $this... | 1 |
Python | Python | add stringfield to imports | 6b7f001a607f2527f88352d7f1aaf608d91f1557 | <ide><path>airflow/www/app.py
<ide> import sqlalchemy as sqla
<ide> from wtforms import (
<ide> widgets,
<del> Form, DateTimeField, SelectField, TextAreaField, PasswordField)
<add> Form, DateTimeField, SelectField, TextAreaField, PasswordField, StringField)
<ide>
<ide> from pygments import highlight, lexers
... | 1 |
Text | Text | add hint about using media types | a94d9712741daf33863e159106e8980fbe3e7745 | <ide><path>curriculum/challenges/english/14-responsive-web-design-22/learn-css-flexbox-by-building-a-photo-gallery/6153a3952facd25a83fe8083.md
<ide> You should add a new `@media` query.
<ide> assert(new __helpers.CSSHelp(document).getCSSRules('media')?.length === 1);
<ide> ```
<ide>
<del>Your new `@media` query should... | 2 |
PHP | PHP | between method | c354a691669005381c824331f29e184e31f7c583 | <ide><path>src/Illuminate/Support/Str.php
<ide> public static function beforeLast($subject, $search)
<ide> return static::substr($subject, 0, $pos);
<ide> }
<ide>
<add> /**
<add> * Get the portion of a string between a given values.
<add> *
<add> * @param string $subject
<add> * @param... | 2 |
Ruby | Ruby | delegate all calculations to the scope | edd94cee9af1688dd036fc58fd405adb30a5e0da | <ide><path>activerecord/lib/active_record/associations/collection_proxy.rb
<ide> module Associations
<ide> # is computed directly through SQL and does not trigger by itself the
<ide> # instantiation of the actual post records.
<ide> class CollectionProxy < Relation
<add> delegate *ActiveRecord::Calcula... | 3 |
Javascript | Javascript | add rdfa attributes not already covered | fd682b5cac157b08c12403e4e6e87c3384385202 | <ide><path>src/renderers/dom/shared/HTMLDOMPropertyConfig.js
<ide> var HTMLDOMPropertyConfig = {
<ide> wmode: MUST_USE_ATTRIBUTE,
<ide> wrap: null,
<ide>
<add> /**
<add> * RDFa Properties
<add> */
<add> about: MUST_USE_ATTRIBUTE,
<add> datatype: MUST_USE_ATTRIBUTE,
<add> inlist: MUST_USE_AT... | 1 |
Javascript | Javascript | fix validation of options in `blob` constructor | d6ee27445b58651f40bc2be54b63986dace2e997 | <ide><path>lib/internal/blob.js
<ide> const {
<ide> } = require('internal/errors');
<ide>
<ide> const {
<del> validateObject,
<ide> isUint32,
<add> validateDictionary,
<ide> } = require('internal/validators');
<ide>
<ide> const kHandle = Symbol('kHandle');
<ide> class Blob {
<ide> * }} [options]
<ide> * @co... | 3 |
Python | Python | reinstate imports for github enterprise auth | 9339711625ea46e738870bcf5e3c9a8765fc3d21 | <ide><path>airflow/contrib/auth/backends/github_enterprise_auth.py
<ide> import logging
<ide>
<ide> import flask_login
<del>from flask_login import login_user
<add>
<add># Need to expose these downstream
<add># pylint: disable=unused-import
<add>from flask_login import (current_user,
<add> logo... | 1 |
Python | Python | add type hints for poolformer in pytorch | 5493c10ecba5eb9aa3023108f2af9499bdb1aea9 | <ide><path>src/transformers/models/poolformer/modeling_poolformer.py
<ide>
<ide> import collections.abc
<ide> from dataclasses import dataclass
<del>from typing import Optional, Tuple
<add>from typing import Optional, Tuple, Union
<ide>
<ide> import torch
<ide> import torch.utils.checkpoint
<ide> def get_input_embedd... | 1 |
Java | Java | improve javadocs of the subscribeactual methods | d07dfa1fe59e71e2f231246374c9c2009599ef62 | <ide><path>src/main/java/io/reactivex/Completable.java
<ide> public final void subscribe(CompletableObserver s) {
<ide> }
<ide>
<ide> /**
<del> * Implement this to handle the incoming CompletableObserver and
<add> * Implement this method to handle the incoming {@link CompletableObserver}s and
<ide> ... | 5 |
PHP | PHP | add deletemany() and deletemanyorfail() | 8392c4c00cf6d14629ea05761b88b699bb9747d6 | <ide><path>src/ORM/Table.php
<ide> public function delete(EntityInterface $entity, $options = []): bool
<ide> return $success;
<ide> }
<ide>
<add> /**
<add> * Deletes multiple entities of a table.
<add> *
<add> * The records will be deleted in a transaction which will be rolled back if
<add>... | 2 |
Python | Python | fix w605 flake8 warning (x5) | 5eab3cf6bce7b6f11793056d8772aeb6e761ac4f | <ide><path>examples/contrib/run_openai_gpt.py
<ide> --model_name openai-gpt \
<ide> --do_train \
<ide> --do_eval \
<del> --train_dataset $ROC_STORIES_DIR/cloze_test_val__spring2016\ -\ cloze_test_ALL_val.csv \
<del> --eval_dataset $ROC_STORIES_DIR/cloze_test_test__spring2... | 2 |
Ruby | Ruby | update a comment | e6f8f1618388d705883e943b1c4b6aff8e409b1a | <ide><path>Library/Homebrew/formula.rb
<ide> def fails_with_llvm msg=nil, data=nil
<ide> end
<ide> end
<ide>
<del># see ack.rb for an example usage
<add># See youtube-dl.rb for an example
<ide> class ScriptFileFormula < Formula
<ide> def install
<ide> bin.install Dir['*']
<ide> end
<ide> end
<ide>
<del># se... | 1 |
Go | Go | update the crashtest to have the dockerpath in env | ebe157ebb567965e05cca45a1221cd36ec48a052 | <ide><path>contrib/crashTest.go
<ide> import (
<ide> "log"
<ide> "os"
<ide> "os/exec"
<add> "path"
<ide> "time"
<ide> )
<ide>
<del>const DOCKER_PATH = "/home/creack/dotcloud/docker/docker/docker"
<add>var DOCKER_PATH string = path.Join(os.Getenv("DOCKERPATH"), "docker")
<ide>
<ide> func runDaemon() (*exec.Cmd, er... | 1 |
PHP | PHP | simplify code in data_get() | c6a84451d6771cea7d528e4303319c4c299105a7 | <ide><path>src/Illuminate/Support/helpers.php
<ide> function data_get($target, $key, $default = null)
<ide> return in_array('*', $key) ? Arr::collapse($result) : $result;
<ide> }
<ide>
<del> if (Arr::accessible($target)) {
<del> if (! Arr::exists($target, $segment)... | 1 |
Javascript | Javascript | add failure mode for reading project settings | ad40ff9825c6dc640dea9788845e17510439608f | <ide><path>src/main-process/parse-command-line.js
<ide> const readProjectSettingsSync = (filepath, executedFrom) => {
<ide> }
<ide> try {
<ide> const readPath = path.isAbsolute(filepath) ? filepath : path.join(executedFrom, filepath)
<del> return CSON.readFileSync(readPath)
<add> const contents = CSON.rea... | 1 |
Javascript | Javascript | use temp repo copy while linking packages | f525ab6909f6b570ac36894e587cc73f5593464b | <ide><path>scripts/trace-next-server.js
<ide> const MAX_UNCOMPRESSED_SIZE = 2.5 * 1000 * 1000
<ide> // version so isn't pre-traced
<ide> async function main() {
<ide> const tmpdir = os.tmpdir()
<del> const repoDir = path.join(__dirname, '..')
<add> const origRepoDir = path.join(__dirname, '..')
<add> const repoDir... | 1 |
PHP | PHP | remove unnecessary test | 981cb002042ad93af018bd02e368d22621137d48 | <ide><path>tests/Support/SupportSerializableClosureTest.php
<del><?php
<del>
<del>use SuperClosure\Serializer;
<del>
<del>class SupportSerializableClosureTest extends PHPUnit_Framework_TestCase {
<del>
<del> public function testClosureCanBeSerializedAndRebuilt()
<del> {
<del> $serialized = (new Serializer)->serialize(... | 1 |
Javascript | Javascript | remove unused variable | a6ad8eace3e2211bce100f153082397baf023c6f | <ide><path>packages/ember-handlebars/tests/handlebars_test.js
<ide> var appendView = function() {
<ide> Ember.run(function() { view.appendTo('#qunit-fixture'); });
<ide> };
<ide>
<del>var additionalTeardown;
<ide> var originalLookup = Ember.lookup, lookup;
<ide> var TemplateTests, container;
<ide> | 1 |
Go | Go | fix races in channel close | 378f0657f963fa6c854643571e4fe83628466c01 | <ide><path>daemon/logger/copier.go
<ide> import (
<ide> // Writes are concurrent, so you need implement some sync in your logger
<ide> type Copier struct {
<ide> // srcs is map of name -> reader pairs, for example "stdout", "stderr"
<del> srcs map[string]io.Reader
<del> dst Logger
<del> copyJobs sync.WaitGrou... | 2 |
Javascript | Javascript | remove special casing for `node.meshes` | 129ea49e81a3650255929ee8dd98a13c0361fef9 | <ide><path>examples/js/loaders/GLTFLoader.js
<ide> THREE.GLTFLoader = ( function () {
<ide> ] ).then( function ( dependencies ) {
<ide>
<ide> return _each( __nodes, function ( _node, nodeId ) {
<del>
<add>
<ide> var node = json.nodes[ nodeId ];
<ide>
<del> var meshes;
<del>
<del> if ( node.mesh !... | 1 |
Javascript | Javascript | add trusted types to react on client side | b8d079b41372290aa1846e3a780d85d05ab8ffc1 | <ide><path>.eslintrc.js
<ide> module.exports = {
<ide> spyOnProd: true,
<ide> __PROFILE__: true,
<ide> __UMD__: true,
<add> trustedTypes: true,
<ide> },
<ide> };
<ide><path>packages/react-dom/src/client/DOMPropertyOperations.js
<ide> import {
<ide> OVERLOADED_BOOLEAN,
<ide> } from '../shared/DOMPrope... | 18 |
Go | Go | delay network deletion until after lb cleanup | 6861aade580e13e039330dca2ca46a07bcf13026 | <ide><path>libnetwork/network.go
<ide> func (n *network) delete(force bool, rmLBEndpoint bool) error {
<ide> goto removeFromStore
<ide> }
<ide>
<del> if err = n.deleteNetwork(); err != nil {
<del> if !force {
<del> return err
<del> }
<del> logrus.Debugf("driver failed to delete stale network %s (%s): %v", n.Na... | 2 |
Javascript | Javascript | remove logic for multiple error recovery attempts | 5318971f50da06fd42763689826acecdb14b4c5e | <ide><path>packages/react-reconciler/src/ReactFiberWorkLoop.new.js
<ide> function recoverFromConcurrentError(root, errorRetryLanes) {
<ide> }
<ide> }
<ide>
<del> let exitStatus;
<del>
<del> const MAX_ERROR_RETRY_ATTEMPTS = 50;
<del> for (let i = 0; i < MAX_ERROR_RETRY_ATTEMPTS; i++) {
<del> exitStatus = re... | 2 |
Ruby | Ruby | extend curl warning | 821dbab5f88e9dcbb9f08ba5ef3d8e1bf5dece3b | <ide><path>Library/Homebrew/cmd/doctor.rb
<ide> def check_user_path_3
<ide> end
<ide>
<ide> def check_for_bad_curl
<del> if MacOS.version <= "10.6" && !Formula["curl"].installed? then <<-EOS.undent
<del> The system curl on 10.6 and below is often incapable of supporting
<add> if MacOS.version <= "10.8" ... | 1 |
Ruby | Ruby | distinguish indirect deps from undeclared deps | c946da88ab07772ac4becd45ef0c82a60bbfc515 | <ide><path>Library/Homebrew/os/mac/linkage_checker.rb
<ide> def initialize(keg, formula = nil)
<ide> @system_dylibs = Set.new
<ide> @broken_dylibs = Set.new
<ide> @variable_dylibs = Set.new
<add> @indirect_deps = []
<ide> @undeclared_deps = []
<ide> @reverse_links = Hash.new { |h, k| h[k] = Set.n... | 1 |
Text | Text | fix stylistic issues in api/net.md | d3418b13190d142112270dcacf33d5542170729d | <ide><path>doc/api/net.md
<ide> double-backslashes, such as:
<ide>
<ide> ```js
<ide> net.createServer().listen(
<del> path.join('\\\\?\\pipe', process.cwd(), 'myctl'))
<add> path.join('\\\\?\\pipe', process.cwd(), 'myctl'));
<ide> ```
<ide>
<ide> ## Class: net.Server
<ide> Returns an object with `port`, `family... | 1 |
PHP | PHP | add typehint for mailer/ | 1e16656a25e769328f7bd88d911feea688137da6 | <ide><path>src/Mailer/Email.php
<ide> public function __clone()
<ide> * @param array $args Method arguments
<ide> * @return $this|mixed
<ide> */
<del> public function __call($method, $args)
<add> public function __call(string $method, array $args)
<ide> {
<ide> $result = $this->message-... | 5 |
Javascript | Javascript | remove unused parameters | e67220ec81ce55833559e9d40f44a08b80756a07 | <ide><path>benchmark/cluster/echo.js
<ide> if (cluster.isMaster) {
<ide> for (var i = 0; i < workers; ++i)
<ide> cluster.fork().on('online', onOnline).on('message', onMessage);
<ide>
<del> function onOnline(msg) {
<add> function onOnline() {
<ide> if (++readies === workers) {
<ide> bench.... | 1 |
Javascript | Javascript | remove the `gulp extension` build target | 32de419a88ec6e22fffec5999bd126472740e447 | <ide><path>gulpfile.js
<ide> gulp.task('default', function() {
<ide> });
<ide> });
<ide>
<del>gulp.task('extension', ['chromium']);
<del>
<ide> gulp.task('buildnumber', function (done) {
<ide> console.log();
<ide> console.log('### Getting extension build number');
<ide> gulp.task('lib', ['buildnumber'], function... | 1 |
Javascript | Javascript | add hooks to containerview | a2cd03b0f219142c52f291de7a439931d83ffaa3 | <ide><path>packages/ember-views/lib/views/container_view.js
<ide> var childViewsProperty = Ember.computed(function() {
<ide> {{view Ember.ContainerView currentViewBinding="App.appController.view"}}
<ide> ```
<ide>
<add> ## Use lifecycle hooks
<add>
<add> This is an example of how you could implement reusable cur... | 2 |
Text | Text | add deprecation message for od api | 304583012bab34a3f27949745324abe16b0fa529 | <ide><path>research/object_detection/README.md
<ide> [](https://github.com/tensorflow/tensorflow/releases/tag/v1.15.0)
<ide> [](https://www.python.org/downloads/release/pyt... | 1 |
Javascript | Javascript | remove incorrect comment about lambert material | f4fb49e3d5b6d738baf367246f5fc83f86a9828d | <ide><path>examples/js/loaders/LDrawLoader.js
<ide> THREE.LDrawLoader = ( function () {
<ide>
<ide> case LDrawLoader.FINISH_TYPE_RUBBER:
<ide>
<del> // Rubber is best simulated with Lambert
<add> // Rubber finish
<ide> material = new THREE.MeshStandardMaterial( { color: colour, roughness: 0.9, metaln... | 1 |
Python | Python | display hours too | e446d380a1c0b84577f5a2d20f8e9ee6dc371274 | <ide><path>glances/plugins/glances_processlist.py
<ide> from glances.plugins.glances_plugin import GlancesPlugin
<ide>
<ide>
<add>def convert_timedelta(delta):
<add> """Convert timedelta to human-readable time."""
<add> # Python 2.7+:
<add> # total_seconds = delta.total_seconds()
<add> # hours = total_sec... | 1 |
Text | Text | add examples for implementing esm | 47804933012841f2dc90626bdcc161adf34569a5 | <ide><path>doc/api/esm.md
<ide> ECMAScript modules are [the official standard format][] to package JavaScript
<ide> code for reuse. Modules are defined using a variety of [`import`][] and
<ide> [`export`][] statements.
<ide>
<add>The following example of an ES module exports a function:
<add>
<add>```js
<add>// addTwo... | 1 |
Ruby | Ruby | remove superfluous require | 1304b664924bfea54fd6dc0dc924ae3d126ff92d | <ide><path>activerecord/lib/active_record/test_case.rb
<ide> require "active_support/test_case"
<del>require "active_record/fixtures"
<ide>
<ide> module ActiveRecord
<ide> class TestCase < ActiveSupport::TestCase #:nodoc: | 1 |
Java | Java | relax javabean rules for spel property access | b25e91a550beaf428a6e696959b717341a04f27d | <ide><path>spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java
<ide> private Field findField(String name, Class<?> clazz, Object target) {
<ide> * Find a getter method for the specified property.
<ide> */
<ide> protected Method findGetterForProperty(String pr... | 2 |
Python | Python | optimize long list of if-statements | b91dd5eaaae638d21b42f05bc7020ade26759e65 | <ide><path>celery/events/state.py
<ide> from celery.utils.functional import LRUCache, memoize
<ide> from celery.utils.log import get_logger
<ide>
<add>__all__ = ['Worker', 'Task', 'State', 'heartbeat_expires']
<add>
<ide> PYPY = hasattr(sys, 'pypy_version_info')
<ide>
<ide> # The window (in percentage) is added to th... | 1 |
Javascript | Javascript | add these changes to the non scheduled code path | b7138a041079fc85fa13b4c1218f0a7c197957dc | <ide><path>src/text-editor-component.js
<ide> class TextEditorComponent {
<ide> })
<ide> })
<ide> } else {
<del> this.measureContentDuringUpdateSync()
<del> this.updateSyncAfterMeasuringContent()
<add> const restartFrame = this.measureContentDuringUpdateSync()
<add> if (restartFram... | 1 |
PHP | PHP | accept empty strings as empty sessions | 011562184cf0c0a412ff40c3bb093725a02f5812 | <ide><path>tests/TestCase/Network/Session/DatabaseSessionTest.php
<ide> public function testRead()
<ide> $this->assertEquals($expected, $result);
<ide>
<ide> $result = $this->storage->read('made up value');
<del> $this->assertFalse($result);
<add> $this->assertEmpty($result);
<ide> }
... | 1 |
Text | Text | add invitation to add new content | 4871dbdc73632be4fb00befbc816bc670bb609cc | <ide><path>docs/topics/third-party-resources.md
<ide> Django REST Framework has a growing community of developers, packages, and resou
<ide>
<ide> Check out a grid detailing all the packages and ecosystem around Django REST Framework at [Django Packages](https://www.djangopackages.com/grids/g/django-rest-framework/).
... | 1 |
Python | Python | add test for issue #589 | 6977a2b8cdef4325eca8de1c44aed923bf8f2908 | <ide><path>spacy/tests/regression/test_issue589.py
<add>import pytest
<add>
<add>from ...vocab import Vocab
<add>from ...tokens import Doc
<add>
<add>
<add>def test_issue589():
<add> vocab = Vocab()
<add> vocab.strings.set_frozen(True)
<add> doc = Doc(vocab, words=[u'whata']) | 1 |
Python | Python | fix unit tests. prevent nomask from being copied | 11c95e35e85166b808ea24d321f86a7bc4a0dcab | <ide><path>numpy/ma/core.py
<ide> from numpy import array as narray
<ide> import warnings
<ide>
<add>class NoMask(ndarray):
<add> def __new__(subtype):
<add> narray(False)
<add> return narray(False).view(subtype)
<add>
<add> def no_op(self,*args,**kwargs):
<add> return self
<add>
<add> de... | 3 |
Python | Python | fix ticket #322 | be917888687f967df612629d3b52b8c488ad3755 | <ide><path>numpy/core/records.py
<ide> def fromarrays(arrayList, dtype=None, shape=None, formats=None,
<ide> d0 = descr[0].shape
<ide> nn = len(d0)
<ide> if nn > 0:
<del> shape = shape[nn:]
<add> shape = shape[:-nn]
<ide>
<ide> for k, obj in enumerate(arrayList):
<ide> nn ... | 1 |
Java | Java | add debug information in mounting manager | b3a07685f25c6d40a7177a1e40f899d407db4a4b | <ide><path>ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java
<ide> package com.facebook.react.fabric.mounting;
<ide>
<ide> import android.content.Context;
<del>import androidx.annotation.AnyThread;
<del>import androidx.annotation.Nullable;
<del>import androidx.annotation.UiThread;
<ide... | 1 |
PHP | PHP | fix styleci errors | b39a01d2962edf2d114cf81c38f4b441479d4a4e | <ide><path>src/Illuminate/Database/Eloquent/Relations/MorphTo.php
<ide> class MorphTo extends BelongsTo
<ide> protected $macroBuffer = [];
<ide>
<ide> /**
<del> * A map of relations to load for each individual morph type
<add> * A map of relations to load for each individual morph type.
<ide> *
<i... | 1 |
Python | Python | reduce `operator_name` dupe in serialised json | 0267a47e5abd104891e0ec6c741b5bed208eef1e | <ide><path>airflow/serialization/serialized_objects.py
<ide> def serialize_to_json(
<ide> if cls._is_excluded(value, key, object_to_serialize):
<ide> continue
<ide>
<del> if key in decorated_fields:
<add> if key == '_operator_name':
<add> # when operator... | 2 |
Text | Text | change 'ancho' to width in css only | e8ff81210cbbd869f7d3214cbf44bce81d017ac9 | <ide><path>curriculum/challenges/spanish/01-responsive-web-design/basic-css/size-your-images.spanish.md
<ide> localeTitle: Tamaño de sus imágenes
<ide> ---
<ide>
<ide> ## Descripción
<del><section id="description"> CSS tiene una propiedad llamada <code>width</code> que controla el ancho de un elemento. Al igual que co... | 1 |
Text | Text | add the text "### nested html lists" to | f365204cc86c724b66d3dce68f9239c9595955fe | <ide><path>guide/english/html/lists/index.md
<ide> which would end up looking like:
<ide> </dl>
<ide>
<ide>
<del>## More Information:
<add>## Nested HTML Lists
<add>
<add>List can be nested (lists inside lists):
<add>
<add>##### Code:
<add>```html
<add><ul>
<add> <li>Coffee</li>
<add> <li>Tea
<add> <ul>
<add> ... | 1 |
Python | Python | add test for multilevel_native_crop_and_resize | 8ce327f82d0b8e075c25513388bffb12135aacb4 | <ide><path>research/object_detection/utils/spatial_transform_ops_test.py
<ide> def graph_fn(image, boxes):
<ide>
<ide> class NativeCropAndResizeTest(test_case.TestCase):
<ide>
<add> # def testBatchCropAndResize3x3To2x2_2Channels(self):
<add>
<add> # def graph_fn(image, boxes):
<add> # return spatial_ops.nati... | 1 |
Javascript | Javascript | fix ng-prop-* with undefined values | 8b973e04cad06b839f8d6641131e2b206afb284c | <ide><path>src/ng/compile.js
<ide> function $CompileProvider($provide, $$sanitizeUriProvider) {
<ide> pre: function ngPropPreLinkFn(scope, $element) {
<ide> function applyPropValue() {
<ide> var propValue = ngPropGetter(scope);
<del> $element.prop(propName, sanit... | 2 |
Javascript | Javascript | prevent code duplication when using help button | d67a617e472c597a6d7532426a77f51fdce62546 | <ide><path>client/src/templates/Challenges/redux/create-question-epic.js
<ide> function filesToMarkdown(challengeFiles = {}) {
<ide> return fileString;
<ide> }
<ide> const fileName = moreThanOneFile
<del> ? `\\ file: ${challengeFile.contents}`
<add> ? `/* file: ${challengeFile.name}.${challengeF... | 1 |
PHP | PHP | add identifier quoting to table aliases | 0a90481969b8cce14c2092c68f94ae7f98cb8c6b | <ide><path>Cake/Database/Query.php
<ide> public function from($tables = [], $overwrite = false) {
<ide> protected function _buildFromPart($parts, $generator) {
<ide> $select = ' FROM %s';
<ide> $normalized = [];
<add> $driver = $this->connection()->driver();
<ide> $parts = $this->_stringifyExpressions($parts, $... | 2 |
Javascript | Javascript | report native warnings to yellowbox | e697ed75d14289c6d8e2ada448f7f24adbd1d29a | <ide><path>Libraries/ReactNative/YellowBox.js
<ide> const EventEmitter = require('EventEmitter');
<ide> const Platform = require('Platform');
<ide> const React = require('React');
<ide> const StyleSheet = require('StyleSheet');
<add>const RCTLog = require('RCTLog');
<ide>
<ide> const infoLog = require('infoLog');
<ide... | 2 |
Python | Python | fix xlnet tokenizer and python2 | c946bb51a61f67b0c9eaae1c9cf6f164a7748e37 | <ide><path>pytorch_pretrained_bert/tokenization_xlnet.py
<ide> def convert_tokens_to_ids(self, tokens, sample=False):
<ide> )
<ide> return ids
<ide>
<del> def convert_ids_to_tokens(self, ids, skip_special_tokens=False):
<add> def convert_ids_to_tokens(self, ids, return_unicode=True, skip_spec... | 2 |
Python | Python | trim lines in resnet keras | c49b8b71be09b6492705be0d0fa6300c1c3e8941 | <ide><path>official/resnet/keras/keras_common.py
<ide> def __enter__(self):
<ide>
<ide> def __exit__(self, *args):
<ide> pass
<del>
<del> | 1 |
PHP | PHP | add test for find('list') with no fields | b4b1c22a5a3b018deaf9fbfa177844b3304f14de | <ide><path>Cake/Test/TestCase/ORM/TableTest.php
<ide> public function testFindListNoHydration() {
<ide> 'connection' => $this->connection,
<ide> ]);
<ide> $table->displayField('username');
<add> $query = $table->find('list')
<add> ->hydrate(false)
<add> ->order('id');
<add> $expected = [
<add> 1 => 'mari... | 1 |
Mixed | Ruby | accept a block in button_to helper | ab7a80ea22c94a006788eddfa3b92123b4031cb6 | <ide><path>actionpack/CHANGELOG.md
<ide> ## Rails 4.0.0 (unreleased) ##
<ide>
<add>* Make possible to use a block in button_to helper if button text is hard
<add> to fit into the name parameter, e.g.:
<add>
<add> <%= button_to [:make_happy, @user] do %>
<add> Make happy <strong><%= @user.name %></... | 3 |
Java | Java | add contextclass resolution to jacksonjsondecoder | 9fb8a2eb2e05b99179614a7d67a1a745e432819c | <ide><path>spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageReaderArgumentResolverTests.java
<ide> package org.springframework.web.reactive.result.method.annotation;
<ide>
<ide> import java.io.Serializable;
<add>import java.lang.reflect.Method;
<ide> import java.net.UR... | 2 |
Javascript | Javascript | replace duplicate conditions by function | 523d44a66e5a4f9bbe335b7872919aa39d6ee4c4 | <ide><path>lib/fs.js
<ide> function isFd(path) {
<ide>
<ide> fs.Stats = Stats;
<ide>
<add>function isFileType(fileType) {
<add> // Use stats array directly to avoid creating an fs.Stats instance just for
<add> // our internal use.
<add> return (statValues[1/*mode*/] & S_IFMT) === fileType;
<add>}
<add>
<ide> // Do... | 1 |
Python | Python | reduce number of return statements | f473fe4418a98e2e0edb357f23b74964b09d6a7a | <ide><path>numpy/core/fromnumeric.py
<ide> def sum(a, axis=None, dtype=None, out=None, keepdims=np._NoValue):
<ide> out[...] = res
<ide> return out
<ide> return res
<del> elif type(a) is not mu.ndarray:
<add> if type(a) is not mu.ndarray:
<ide> try:
<ide> sum = ... | 1 |
Javascript | Javascript | remove unused export | 5a71cbe7a9e192c23b847be6e0c575b6705f6939 | <ide><path>packages/react-reconciler/src/ReactFiberReconciler.js
<ide> export function updateContainer(
<ide> }
<ide>
<ide> export {
<del> flushRoot,
<ide> batchedEventUpdates,
<ide> batchedUpdates,
<ide> unbatchedUpdates,
<ide><path>packages/react-reconciler/src/ReactFiberWorkLoop.js
<ide> export function comp... | 2 |
Ruby | Ruby | add env.ldflags and use | 53cf7e843b05a1dc1247312c9358023234bb9411 | <ide><path>Library/Homebrew/extend/ENV.rb
<ide> def cxx; self['CXX'] or "g++"; end
<ide>
<ide> # CFLAGS are read quite a bit
<ide> def cflags; ENV['CFLAGS']; end
<add> def ldflags; ENV['LDFLAGS']; end
<ide>
<ide> def m64
<ide> append_to_cflags '-m64' | 1 |
Java | Java | update copyright header | 2fc2c29e9a729aed82f0e7ff23082960980f7841 | <ide><path>spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java
<ide> /*
<del> * Copyright 2002-2015 the original author or authors.
<add> * Copyright 2002-2016 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * y... | 16 |
Text | Text | add v1.2.7 changes | e31560cf6b85ddbb340cb0af421c1d0f5586e142 | <ide><path>CHANGELOG.md
<add><a name="1.2.7"></a>
<add># 1.2.7 emoji-clairvoyance (2014-01-03)
<add>
<add>
<add>## Bug Fixes
<add>
<add>- **$animate:**
<add> - ensue class-based animations are always skipped before structural post-digest tasks are run
<add> ([bc492c0f](https://github.com/angular/angular.js/commit/bc4... | 1 |
Javascript | Javascript | remove tostring of dangerouslysetinnerhtml | edeea0720791f998b505f2ecdcf866c7e539e7a2 | <ide><path>packages/react-dom/src/client/ReactDOMComponent.js
<ide> import possibleStandardNames from '../shared/possibleStandardNames';
<ide> import {validateProperties as validateARIAProperties} from '../shared/ReactDOMInvalidARIAHook';
<ide> import {validateProperties as validateInputProperties} from '../shared/Reac... | 1 |
Python | Python | add fit_generator methods in models | 47d074fec3836206450facbbbc0965acd482f69c | <ide><path>keras/models.py
<ide> import pprint
<ide> from six.moves import range
<ide> import six
<add>import time
<add>import threading
<add>try:
<add> import queue
<add>except ImportError:
<add> import Queue as queue
<ide>
<ide> from . import backend as K
<ide> from . import optimizers
<ide> def load_weights(s... | 2 |
Text | Text | fix doc typo in userviewset example | b0201bcfbf57cd3abf75746c149e1eb70ba19c55 | <ide><path>docs/api-guide/viewsets.md
<ide> Both of these come with a trade-off. Using regular views and URL confs is more
<ide>
<ide> The default routers included with REST framework will provide routes for a standard set of create/retrieve/update/destroy style operations, as shown below:
<ide>
<del> class UserV... | 1 |
Python | Python | update spacy.load() helper functions | dd6dc4c1207d36295641d1d5660b72d19844aa53 | <ide><path>spacy/util.py
<ide> def load_model(name, **overrides):
<ide> if not data_path or not data_path.exists():
<ide> raise IOError("Can't find spaCy data path: %s" % path2str(data_path))
<ide> if isinstance(name, basestring_):
<del> if (data_path / name).exists(): # in data dir or shortcut
<... | 1 |
Python | Python | prevent lemmatization of base nouns | 4f400fa486ebf4fa7ef5aa90607cca68acb301a8 | <ide><path>spacy/lemmatizer.py
<ide> def __call__(self, string, univ_pos, morphology=None):
<ide> def is_base_form(self, univ_pos, morphology=None):
<ide> '''Check whether we're dealing with an uninflected paradigm, so we can
<ide> avoid lemmatization entirely.'''
<del> print("Is base form?",... | 2 |
Javascript | Javascript | move utility functions to internal/fs | 2620358624b6c0f6c7d02dc2e4333eae9e73b3ea | <ide><path>lib/fs.js
<ide> const { Buffer } = require('buffer');
<ide> const errors = require('internal/errors');
<ide> const { Readable, Writable } = require('stream');
<ide> const EventEmitter = require('events');
<del>const { FSReqWrap } = binding;
<add>const { FSReqWrap, statValues } = binding;
<ide> const { FSEven... | 2 |
Python | Python | fix has_app_context and has_request_context | 095651be9eec58ddb0c2eb6158318b1c703c67c5 | <ide><path>src/flask/ctx.py
<ide> def __init__(self, username, remote_addr=None):
<ide>
<ide> .. versionadded:: 0.7
<ide> """
<del> return _cv_app.get(None) is not None
<add> return _cv_request.get(None) is not None
<ide>
<ide>
<ide> def has_app_context() -> bool:
<ide> def has_app_context() -> bool:
<... | 1 |
Javascript | Javascript | resolve more conflicts | 02e0047e92de0f1575fb92c091806c4eb4b6ef26 | <ide><path>src/css.js
<ide> if ( !jQuery.support.opacity ) {
<ide>
<ide> style.filter = ralpha.test(filter) ?
<ide> filter.replace(ralpha, opacity) :
<del><<<<<<< HEAD
<del> style.filter + " " + opacity;
<del>=======
<ide> filter + " " + opacity;
<del>>>>>>>> 312df0441b16981dd697d74fcbc1e1f212b47b7e
<ide... | 1 |
Python | Python | specify loader for yaml loading | 4a5770827edf1c3974274ba3e4169d0e5ba7478a | <ide><path>official/modeling/hyperparams/base_config.py
<ide> def replace(self, **kwargs):
<ide> def from_yaml(cls, file_path: str):
<ide> # Note: This only works if the Config has all default values.
<ide> with tf.io.gfile.GFile(file_path, 'r') as f:
<del> loaded = yaml.load(f)
<add> loaded = yaml.... | 2 |
Ruby | Ruby | fix a test failure on linux | 434e8d8e2fc4dbd51e3193e8560ecad65f916e7e | <ide><path>Library/Homebrew/test/cmd/install_spec.rb
<ide> def install
<ide> it "succeeds when a non-fatal requirement isn't satisfied" do
<ide> setup_test_formula "testball1", <<~EOS
<ide> class NonFatalRequirement < Requirement
<del> satisfy { false }
<add> satisfy(build_env: false) { false ... | 1 |
Javascript | Javascript | remove a newline | 7ed0340488bc8d0d1791cebd564594764526f66f | <ide><path>src/ng/animate.js
<ide> var $AnimateProvider = ['$provide', /** @this */ function($provide) {
<ide> var reservedRegex = new RegExp('(\\s+|\\/)' + NG_ANIMATE_CLASSNAME + '(\\s+|\\/)');
<ide> if (reservedRegex.test(this.$$classNameFilter.toString())) {
<ide> throw $animateMinErr('nong... | 1 |
Text | Text | add travis badge | fe9e72ac163d7951d854dfba211269158664d65c | <ide><path>README.md
<ide> <img width="112" alt="screen shot 2016-10-25 at 2 37 27 pm" src="https://cloud.githubusercontent.com/assets/13041/19686250/971bf7f8-9ac0-11e6-975c-188defd82df1.png">
<ide>
<add>[](https://travis-ci.org/zeit/next.js)
<ide> [... | 1 |
Mixed | Python | add graham scan algorithm | a796ccf1ce2594bffdb938156987a0cbb16ee52e | <ide><path>DIRECTORY.md
<ide> * [Binary Count Trailing Zeros](https://github.com/TheAlgorithms/Python/blob/master/bit_manipulation/binary_count_trailing_zeros.py)
<ide> * [Binary Or Operator](https://github.com/TheAlgorithms/Python/blob/master/bit_manipulation/binary_or_operator.py)
<ide> * [Binary Xor Operator](... | 2 |
Text | Text | add missing deprecation number | 2cfdf28413fd9a7bfab65cb49cff6e50ab0c21ec | <ide><path>doc/api/deprecations.md
<ide> Type: Documentation-only
<ide> The [`crypto.Certificate()` constructor][] is deprecated. Use
<ide> [static methods of `crypto.Certificate()`][] instead.
<ide>
<del>### DEP0XXX: `fs.rmdir(path, { recursive: true })`
<add>### DEP0147: `fs.rmdir(path, { recursive: true })`
<ide> <... | 1 |
Text | Text | change belongs_to example to has_one [ci skip] | c2e51b839491f8d440f7c75c22e9050a058f4467 | <ide><path>guides/source/active_record_validations.md
<ide> to map the association. This way, it is not only checked that the foreign key
<ide> is not empty but also that the referenced object exists.
<ide>
<ide> ```ruby
<del>class LineItem < ApplicationRecord
<del> belongs_to :order
<del> validates :order, presence... | 1 |
Text | Text | adjust readme to match ie support | 0b4e70d2ba9ee8bd951adf9fe26593025e299298 | <ide><path>README.md
<ide> Promise based HTTP client for the browser and node.js
<ide>
<ide>  |  |  error {
<ide> }
<ide>
<ide> // UnmountVolumes unmounts all volumes
<del>func (container *Container) UnmountVolumes(forceSyscall bool) error {
<add>func (container *Container) UnmountVolumes(forceSyscall bool, volumeEventLog func(name, action ... | 12 |
Javascript | Javascript | fix devtools inspector | 6c0f5d11785192c237937fe8cdd5514137a1f5ff | <ide><path>Libraries/Inspector/Inspector.js
<ide> class Inspector extends React.Component<
<ide> _onAgentShowNativeHighlight = node => {
<ide> clearTimeout(this._hideTimeoutID);
<ide>
<del> node.measure((x, y, width, height, left, top) => {
<add> // Shape of `node` is different in Fabric.
<add> const co... | 1 |
Javascript | Javascript | add missing test for $destroy event | c0d638a94b914edc76c5532c08a47ec4e60308d4 | <ide><path>test/jqLiteSpec.js
<ide> describe('jqLite', function() {
<ide> var scope, a, b, c;
<ide>
<add>
<add> beforeEach(module(provideLog));
<add>
<ide> beforeEach(function() {
<ide> a = jqLite('<div>A</div>')[0];
<ide> b = jqLite('<div>B</div>')[0];
<ide> describe('jqLite', function() {
<ide> ex... | 1 |
Text | Text | update the readme to use jdk1.8 b88 | 23737a4516a2e582b2010ea58cf10d25620035b1 | <ide><path>README.md
<ide> a cross-platform, self-contained bootstrap mechanism for the build.
<ide>
<ide> ### prerequisites
<ide>
<del>[Git][] and the latest [Early Access build of OpenJDK 1.8][JDK18].
<add>[Git][] and [Early Access build of OpenJDK 1.8 build 88][JDK18 build 88].
<ide>
<ide> ### check out sources
<... | 1 |
Ruby | Ruby | allow accessing version in `livecheck` blocks | 3a4c7223df13161c834d85258ba8567c5e55a722 | <ide><path>Library/Homebrew/livecheck.rb
<ide> # This information is used by the `brew livecheck` command to control its
<ide> # behavior.
<ide> class Livecheck
<add> extend Forwardable
<add>
<ide> # A very brief description of why the formula/cask is skipped (e.g. `No longer
<ide> # developed or maintained`).
<id... | 1 |
Python | Python | remove final_size parameter of resnet | 8ff6115343e37f6d62cea3f4ab26127799bf8775 | <ide><path>official/resnet/cifar10_main.py
<ide> def __init__(self, resnet_size, data_format=None, num_classes=_NUM_CLASSES,
<ide> first_pool_stride=None,
<ide> block_sizes=[num_blocks] * 3,
<ide> block_strides=[1, 2, 2],
<del> final_size=64,
<ide> resnet_version=resnet_version,
<... | 3 |
Ruby | Ruby | add test for env.fortran | 3fc6cc1a3a4b8f1b7ca42dc0a7dd7cf8fad91b18 | <ide><path>Library/Homebrew/rubocops/lines_cop.rb
<ide> def audit_formula(_node, _class_node, _parent_class_node, body_node)
<ide> problem "Use 'build.head?' instead of inspecting 'version'"
<ide> end
<ide>
<del> # find_instance_method_call(body_node, :ENV, :fortran) do
<del> # ... | 2 |
Go | Go | normalize comment formatting | 5331e6ab2d4b3cbf1a33db65ce3e11cb047cef1f | <ide><path>pkg/tailfile/tailfile.go
<ide> var eol = []byte("\n")
<ide> // ErrNonPositiveLinesNumber is an error returned if the lines number was negative.
<ide> var ErrNonPositiveLinesNumber = errors.New("The number of lines to extract from the file must be positive")
<ide>
<del>//TailFile returns last n lines of the ... | 1 |
Java | Java | add permanent/temporary redirect to serverresponse | 56d669f849d4b4caaef97b93385c873ac810ecd9 | <ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerResponse.java
<ide> static BodyBuilder status(HttpStatus status) {
<ide> }
<ide>
<ide> /**
<del> * Create a builder with the status set to {@linkplain HttpStatus#OK OK}.
<add> * Create a builder with the status set to {@... | 2 |
PHP | PHP | add missing docblocks | 9475cb4a99e88723f192f645cc4dbcd15b6796e1 | <ide><path>src/Illuminate/Container/BoundMethod.php
<ide> protected static function normalizeMethod($callback)
<ide> /**
<ide> * Get all dependencies for a given method.
<ide> *
<del> * @param \Illuminate\Container\Container
<add> * @param \Illuminate\Container\Container $container
<ide> *... | 4 |
Python | Python | replace getters/setters with properties - round 5 | 308a8b6b50e540711a02437e4a5105fcc49ef114 | <ide><path>glances/outputs/glances_bars.py
<ide> class Bar(object):
<ide> import time
<ide> b = Bar(10)
<ide> for p in range(0, 100):
<del> b.set_percent(p)
<add> b.percent = p
<ide> print("\r%s" % b),
<ide> time.sleep(0.1)
<ide> sys.stdout.flush()
<ide> def __init__(se... | 2 |
Python | Python | show original autodoc signatures | d40288496c18d86d16f8aad144e8cf57c46dd3bf | <ide><path>docs/conf.py
<ide> pygments_style = 'tango'
<ide> html_theme = 'default'
<ide> html_theme_options = {}
<add>
<add>
<add># unwrap decorators
<add>def unwrap_decorators():
<add> import sphinx.util.inspect as inspect
<add> import functools
<add>
<add> old_getargspec = inspect.getargspec
<ad... | 1 |
Text | Text | return largest numbers in array - portuguese | 117e198b1e37f606cd9ea213801a36e3c2d43185 | <ide><path>curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/return-largest-numbers-in-arrays.portuguese.md
<ide> largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 85
<ide> <section id='solution'>
<ide>
<ide> ```js
<del>// solution requi... | 1 |
Mixed | Javascript | improve createrequire() example | 58a59a8d6ba2de899dd6093e644ee3cf0d4b9a0a | <ide><path>.eslintrc.js
<ide> module.exports = {
<ide> {
<ide> files: [
<ide> 'doc/api/esm.md',
<add> 'doc/api/modules.md',
<ide> 'test/es-module/test-esm-type-flag.js',
<ide> 'test/es-module/test-esm-type-flag-alias.js',
<ide> '*.mjs',
<ide><path>doc/api/modules.md
<ide... | 2 |
Ruby | Ruby | improve method description | a3c4d035f05287b09f7216a594d333fd0d85650a | <ide><path>actioncable/lib/action_cable/channel/naming.rb
<ide> module Naming
<ide> #
<ide> # ChatChannel.channel_name # => 'chat'
<ide> # Chats::AppearancesChannel.channel_name # => 'chats:appearances'
<add> # FooChats::BarAppearancesChannel.channel_name # => 'foo_chats:bar_appeara... | 1 |
Ruby | Ruby | fix documentation comments for form_tag | e9c09c4b7305b6fa2961e0764f4ecc57cd6ae666 | <ide><path>actionview/lib/action_view/helpers/form_tag_helper.rb
<ide> module FormTagHelper
<ide> #
<ide> # <%= form_tag('/posts', remote: true) %>
<ide> # # => <form action="/posts" method="post" data-remote="true">
<del>
<add> #
<ide> # form_tag(false, method: :get)
<ide> # ... | 1 |
PHP | PHP | support php 7 throwables | 03221c9a0ac66d6b3f6f1b239d125ded467bf360 | <ide><path>src/Illuminate/Database/Connection.php
<ide> use Closure;
<ide> use DateTime;
<ide> use Exception;
<add>use Throwable;
<ide> use LogicException;
<ide> use RuntimeException;
<ide> use Illuminate\Support\Arr;
<ide> public function prepareBindings(array $bindings)
<ide> /**
<ide> * Execute a Closure wi... | 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.