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 |
|---|---|---|---|---|---|
Java | Java | add support to fabricuimanger to handle throwable | d2f05740a8e475108c23b2e24de9030a0cbb2a8d | <ide><path>ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java
<ide> public ReactShadowNode createNode(int reactTag,
<ide> mUIViewOperationQueue
<ide> .enqueueCreateView(rootNode.getThemedContext(), reactTag, viewName, styles);
<ide> return node;
<del> } catch (Exception e) ... | 1 |
Javascript | Javascript | remove unneeded parameters | 79b1f64acb4a0975fda7c23f70831e14da1fcaf6 | <ide><path>examples/js/loaders/FBXLoader.js
<ide> THREE.FBXLoader = ( function () {
<ide> switch ( type ) {
<ide>
<ide> case 'Bump':
<del> parameters.bumpMap = self.getTexture( FBXTree, textureMap, child.ID, connections );
<add> parameters.bumpMap = self.getTexture( textureMap, child.ID );
<ide> ... | 1 |
PHP | PHP | add disk facade | 0ec2d01fa4654a167b723ae20b0ac0b3e055ffba | <ide><path>config/app.php
<ide> 'Cookie' => 'Illuminate\Support\Facades\Cookie',
<ide> 'Crypt' => 'Illuminate\Support\Facades\Crypt',
<ide> 'DB' => 'Illuminate\Support\Facades\DB',
<add> 'Disk' => 'Illuminate\Support\Facades\Disk',
<ide> 'Eloquent' => 'Illuminate\Database\Eloquent\Model',
<... | 1 |
Python | Python | add couple of tests for compat module | 9c8adb4812d08020c91bac71fe5f3605c97609dd | <ide><path>tests/test_compat.py
<add>from django.test import TestCase
<add>
<add>from rest_framework import compat
<add>
<add>
<add>class CompatTests(TestCase):
<add>
<add> def test_total_seconds(self):
<add> class MockTimedelta(object):
<add> days = 1
<add> seconds = 1
<add> ... | 1 |
Javascript | Javascript | keep process prototype in inheritance chain | cde272a066923a1b93a10a8121b0ce572308d13c | <ide><path>lib/internal/bootstrap_node.js
<ide> process._eventsCount = 0;
<ide>
<ide> const origProcProto = Object.getPrototypeOf(process);
<del> Object.setPrototypeOf(process, Object.create(EventEmitter.prototype, {
<del> constructor: Object.getOwnPropertyDescriptor(origProcProto, 'constructor')
<del>... | 2 |
Text | Text | add v3.21.0-beta.2 to changelog | a43f203010669f22fca0277a9edf0231a3e94079 | <ide><path>CHANGELOG.md
<ide> # Ember Changelog
<ide>
<add>### v3.21.0-beta.2 (July 20, 2020)
<add>
<add>- [#19040](https://github.com/emberjs/ember.js/pull/19040) [BUGFIX] Fix a memory leak that occurred when changing the array passed to `{{each}}`
<add>- [#19047](https://github.com/emberjs/ember.js/pull/19047) [BUGF... | 1 |
Ruby | Ruby | remove patchelf exemption | 2d95b9acda5b56380a3ca603fd2e0a0afbfa91f0 | <ide><path>Library/Homebrew/extend/os/linux/keg_relocate.rb
<ide> def relocate_dynamic_linkage(relocation)
<ide> # Patching the dynamic linker of glibc breaks it.
<ide> return if name.match? Version.formula_optionally_versioned_regex(:glibc)
<ide>
<del> # Patching patchelf fails with "Text file busy" or SIG... | 1 |
Java | Java | introduce @nested tests with constructor injection | 75f70b269ed89294330758eb61ee8d7f218c9af6 | <ide><path>spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/NestedTestsWithConstructorInjectionWithSpringAndJUnitJupiterTestCase.java
<add>/*
<add> * Copyright 2002-2018 the original author or authors.
<add> *
<add> * Licensed under the Apache License, Version 2.0 (the "License");
<add> *... | 2 |
Javascript | Javascript | delete all webglproperties on loss of context | dfaea63385328a89bc56f4f1f28e4dcaefdffbfe | <ide><path>src/renderers/WebGLRenderer.js
<ide> THREE.WebGLRenderer = function ( parameters ) {
<ide> setDefaultGLState();
<ide>
<ide> objects.objects = {};
<add> objects.webGLProps.deleteAll();
<add> webGLProps.deleteAll();
<ide>
<ide> }, false);
<ide>
<ide><path>src/renderers/webgl/WebGLObjects.js
<ide... | 3 |
Text | Text | fix http2 example with rstwithcancel | ba4a0a6f5f9f0172e182da4e9000fec8956d0689 | <ide><path>doc/api/http2.md
<ide> const client = http2.connect('http://example.org:8000');
<ide> const req = client.request({ ':path': '/' });
<ide>
<ide> // Cancel the stream if there's no activity after 5 seconds
<del>req.setTimeout(5000, () => req.rstStreamWithCancel());
<add>req.setTimeout(5000, () => req.rstWithC... | 1 |
Javascript | Javascript | move argument special casing to the helpers | 83209e5d909152cd13649b77b4b769d84445e1bc | <ide><path>packages/ember-htmlbars/lib/helpers/each.js
<ide> function eachHelper(params, hash, options, env) {
<ide> return env.helpers.collection.call(this, [EachView], hash, options, env);
<ide> }
<ide>
<add>eachHelper._preprocessArguments = function(view, params, hash, options, env) {
<add> if (params.length ===... | 3 |
Javascript | Javascript | remove proptypes from elementproperties | c650407fe913e4eb8e9899d1115fc98d491c0f3e | <ide><path>Libraries/Inspector/ElementProperties.js
<ide> 'use strict';
<ide>
<ide> const BoxInspector = require('BoxInspector');
<del>const PropTypes = require('prop-types');
<ide> const React = require('React');
<ide> const StyleInspector = require('StyleInspector');
<ide> const StyleSheet = require('StyleSheet');
<... | 1 |
Python | Python | add missing docstring line | 7308416449ca1d39f42ab863ea3a8a797dc2b2b4 | <ide><path>libcloud/dns/base.py
<ide> def list_hosts(self, zone):
<ide>
<ide> def create_zone(self, type='master', ttl=None, extra=None):
<ide> """
<add> Create a new zone.
<add>
<ide> @type type: C{string}
<ide> @param type: Zone type (master / slave).
<ide> | 1 |
Ruby | Ruby | amend paths to check for chmods | 897dd14ae5ab775470264156ddd3645ffb37cfaa | <ide><path>install_homebrew.rb
<ide> def getc # NOTE only tested on OS X
<ide> puts "/usr/local/Library/Formula/..."
<ide> puts "/usr/local/Library/Homebrew/..."
<ide>
<del>chmods = %w(bin etc include lib libexec Library sbin share var . share/locale share/man share/info share/doc share/aclocal).
<add>chmods = %w(bin... | 1 |
PHP | PHP | break crawler logic into crawler trait | 2eed3b634937971edaf6df41c66bb799e3a7961a | <add><path>src/Illuminate/Foundation/Testing/CrawlerTrait.php
<del><path>src/Illuminate/Foundation/Testing/ApplicationTrait.php
<ide> use InvalidArgumentException;
<ide> use Symfony\Component\DomCrawler\Form;
<ide> use Symfony\Component\DomCrawler\Crawler;
<del>use Illuminate\Contracts\Auth\Authenticatable as UserContr... | 2 |
Text | Text | update minitest references in testing guide | dcc532d2fbd0f412efd023beab4807d21784b6a6 | <ide><path>guides/source/testing.md
<ide> class ArticleTest < ActiveSupport::TestCase
<ide>
<ide> The `ArticleTest` class defines a _test case_ because it inherits from `ActiveSupport::TestCase`. `ArticleTest` thus has all the methods available from `ActiveSupport::TestCase`. You'll see those methods a little later in... | 1 |
Ruby | Ruby | add test and comment for `path#existing` | 1be5eeec26000b881c2ec8ff53333266eedd9fff | <ide><path>Library/Homebrew/PATH.rb
<ide> def empty?
<ide>
<ide> def existing
<ide> existing_path = select(&File.method(:directory?))
<add> # return nil instead of empty PATH, to unset environment variables
<ide> existing_path unless existing_path.empty?
<ide> end
<ide>
<ide><path>Library/Homebrew/test... | 2 |
Text | Text | add unhandledrejection to strict mode | a33521bc51785cf5d3d6eb6b6ed20e5edee72f62 | <ide><path>doc/api/cli.md
<ide> occurs. One of the following modes can be chosen:
<ide>
<ide> * `throw`: Emit [`unhandledRejection`][]. If this hook is not set, raise the
<ide> unhandled rejection as an uncaught exception. This is the default.
<del>* `strict`: Raise the unhandled rejection as an uncaught exception.
... | 1 |
Ruby | Ruby | use bind values for model types | 5e9f49aad94d11c19626c95189223aa88896ae22 | <ide><path>activerecord/lib/active_record/associations/association_scope.rb
<ide> def add_constraints(scope)
<ide> constraint = table[key].eq(foreign_table[foreign_key])
<ide>
<ide> if reflection.type
<del> type = chain[i + 1].klass.base_class.name
<del> constraint = c... | 1 |
Text | Text | change 87th line "to-do列表" to "to-do列表" | 2a33dfc17666f50bfcdbecfe95992beafd9cbfd3 | <ide><path>guide/chinese/agile/acceptance-testing/index.md
<ide> localeTitle: 验收测试
<ide>
<ide> \- >建议
<ide>
<del>\- > To-DO列表摘要
<add>\- > To-Do列表摘要
<ide>
<ide> # \- >批准决定
<ide> | 1 |
Ruby | Ruby | fix a typo in http_basic_authenticate_with | 9feaf7eaaef3f08151d0ba1362d883f127020e7c | <ide><path>actionpack/lib/action_controller/metal/http_authentication.rb
<ide> module ClassMethods
<ide> # See ActionController::HttpAuthentication::Basic for example usage.
<ide> def http_basic_authenticate_with(name:, password:, realm: nil, **options)
<ide> raise ArgumentError, "Expect... | 1 |
Ruby | Ruby | use length == 0 instead of empty in preloader | 6b3180fc5e27c6964f4f59f1272a51997e5eca7b | <ide><path>activerecord/lib/active_record/associations/preloader.rb
<ide> def initialize(associate_by_default: true, polymorphic_parent: false, **kwargs)
<ide> end
<ide>
<ide> def call
<del> return [] if records.empty? || associations.nil?
<add> return [] if associations.nil? || records.lengt... | 1 |
Python | Python | remove print statement | 80d85d62e932f97494387b66be3cfadbab5bde8d | <ide><path>numpy/lib/function_base.py
<ide> def gradient(f, *varargs):
<ide>
<ide> # use central differences on interior and first differences on endpoints
<ide>
<del> print dx
<ide> outvals = []
<ide>
<ide> # create slice objects --- initially all are [:, :, ..., :] | 1 |
Python | Python | avoid deprecated getargspec | 74264ea3cd5e8bdfe90325f98944297d7f409018 | <ide><path>docs/autogen.py
<ide> from keras.layers import advanced_activations
<ide> from keras.layers import noise
<ide> from keras.layers import wrappers
<add>from keras.utils import generic_utils
<ide> from keras import initializers
<ide> from keras import optimizers
<ide> from keras import callbacks
<ide> def get_f... | 3 |
PHP | PHP | apply fixes from styleci | 8af4f77d4c60f6d616e00c6c37eea731543f792d | <ide><path>src/Illuminate/Encryption/EncryptionServiceProvider.php
<ide> use Illuminate\Support\ServiceProvider;
<ide> use Illuminate\Support\Str;
<ide> use Opis\Closure\SerializableClosure;
<del>use RuntimeException;
<ide>
<ide> class EncryptionServiceProvider extends ServiceProvider
<ide> { | 1 |
Mixed | Javascript | promise version of streams.finished call clean up | 84064bfd6c237a7451ff7b025e47dbe0775704c9 | <ide><path>doc/api/stream.md
<ide> changes:
<ide> -->
<ide>
<ide> * `stream` {Stream} A readable and/or writable stream.
<add>
<ide> * `options` {Object}
<ide> * `error` {boolean} If set to `false`, then a call to `emit('error', err)` is
<ide> not treated as finished. **Default:** `true`.
<ide> changes:
<ide> ... | 3 |
Javascript | Javascript | support usecapture boolean | bf33b61be04988d95bd2373e3b931e09d254e06b | <ide><path>lib/internal/event_target.js
<ide> function validateListener(listener) {
<ide> }
<ide>
<ide> function validateEventListenerOptions(options) {
<add> if (typeof options === 'boolean') {
<add> options = { capture: options };
<add> }
<ide> if (options == null || typeof options !== 'object')
<ide> thr... | 2 |
Javascript | Javascript | use soundmanager in pressability and touchable | ff03698f20a123ebac8584891579a21443285b35 | <ide><path>Libraries/Components/Touchable/Touchable.js
<ide> const StyleSheet = require('../../StyleSheet/StyleSheet');
<ide> const TVEventHandler = require('../AppleTV/TVEventHandler');
<ide> const UIManager = require('../../ReactNative/UIManager');
<ide> const View = require('../View/View');
<add>const SoundManager =... | 1 |
PHP | PHP | fix bug in route | 425192a05db7d5066a2ba62c4f844164c94ee21f | <ide><path>laravel/routing/route.php
<ide> protected function filters($event)
<ide> */
<ide> protected function patterns()
<ide> {
<add> $filters = array();
<add>
<ide> // We will simply iterate through the registered patterns and
<ide> // check the URI pattern against the URI for the route and
<ide> // if t... | 1 |
Javascript | Javascript | consolidate workloop and deferredwork loop | 3a7844cabb9d815e6dac8ae5b9eddd255a82b7a6 | <ide><path>src/renderers/shared/fiber/ReactFiberScheduler.js
<ide> module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>) {
<ide> }
<ide>
<ide> priorityContext = previousPriorityContext;
<del>
<del> // Clear any errors that may have occurred during this commit
<del> // TODO: Possi... | 1 |
Javascript | Javascript | clarify manual proptype calls warning | b7c70b67af77fa8611d4b13315bf57df15c4d35b | <ide><path>src/isomorphic/classic/types/ReactPropTypes.js
<ide> function createChainableTypeChecker(validate) {
<ide> false,
<ide> 'You are manually calling a React.PropTypes validation ' +
<ide> 'function for the `%s` prop on `%s`. This is deprecated ' +
<del> 'and will n... | 1 |
Python | Python | restore mongodb extra dependencies | 8ba6c7ee08b24a028767f64aba161ba666e6b044 | <ide><path>setup.py
<ide> def _pyimp():
<ide> 'slmq',
<ide> 'tblib',
<ide> 'consul',
<del> 'dynamodb'
<add> 'dynamodb',
<add> 'mongodb',
<ide> }
<ide>
<ide> # -*- Classifiers -*- | 1 |
Javascript | Javascript | replace fixturesdir with fixtures methods | 64560cf08c1626a0414fa98872037751e1a3a1f5 | <ide><path>test/parallel/test-http2-respond-file-fd-errors.js
<ide> const common = require('../common');
<ide> if (!common.hasCrypto)
<ide> common.skip('missing crypto');
<add>const fixtures = require('../common/fixtures');
<ide> const http2 = require('http2');
<del>const path = require('path');
<ide> const fs = requ... | 1 |
Go | Go | convert docker root command to use pflag and cobra | 0452ff5a4dd1b8fba707235d6f12a4038208f34b | <ide><path>api/client/cli.go
<ide> import (
<ide> "github.com/docker/docker/cliconfig/configfile"
<ide> "github.com/docker/docker/cliconfig/credentials"
<ide> "github.com/docker/docker/dockerversion"
<del> "github.com/docker/docker/opts"
<add> dopts "github.com/docker/docker/opts"
<ide> "github.com/docker/docker/pk... | 8 |
Text | Text | add v3.12.0-beta.1 to changelog | de4234af72a6ce14b539baf1b5a1e1c273f8c03f | <ide><path>CHANGELOG.md
<ide> # Ember Changelog
<ide>
<add># v3.12.0-beta.1 (June 27, 2019)
<add>
<add>- [#17406](https://github.com/emberjs/ember.js/pull/17406) [BUGFIX] Properties observed through `Ember.Observer` can be set to `undefined`
<add>- [#18150](https://github.com/emberjs/ember.js/pull/18150) [BUGFIX] Fix ... | 1 |
Javascript | Javascript | improve descriptiveness of identifier | c005ebb0ce3888c7fc6d088fab75561c29c2a31c | <ide><path>lib/url.js
<ide> Url.prototype.resolveObject = function resolveObject(relative) {
<ide> var removeAllDots = mustEndAbs;
<ide> var srcPath = result.pathname && result.pathname.split('/') || [];
<ide> var relPath = relative.pathname && relative.pathname.split('/') || [];
<del> var psychotic = result.pro... | 1 |
Ruby | Ruby | add test for argv.flag? | 863d2b253a4c4be255e309b18d4fd14ad94155c1 | <ide><path>Library/Homebrew/test/test_ARGV.rb
<ide> def test_switch?
<ide> %w{b ns bar --bar -n}.each { |s| assert !@argv.switch?(s) }
<ide> end
<ide>
<add> def test_flag?
<add> @argv << "--foo" << "-bq" << "--bar"
<add> assert @argv.flag?("--foo")
<add> assert @argv.flag?("--bar")
<add> assert @arg... | 1 |
Python | Python | add is_graph to docstring | 515448f8596e2f9f1d0ffe91957c3da1a37dda23 | <ide><path>keras/layers/core.py
<ide> class Siamese(Layer):
<ide> merge_mode: Same meaning as `mode` argument of Merge layer
<ide> concat_axis: Same meaning as `concat_axis` argument of Merge layer
<ide> dot_axes: Same meaning as `dot_axes` argument of Merge layer
<add> is_graph: Should b... | 1 |
PHP | PHP | add ability to nested validation rules | 9d19d1ece898ccbc0193a89a58a6500b5fb6c146 | <ide><path>src/Illuminate/Validation/NestedRules.php
<add><?php
<add>
<add>namespace Illuminate\Validation;
<add>
<add>use Illuminate\Support\Arr;
<add>
<add>class NestedRules
<add>{
<add> /**
<add> * The callback to execute.
<add> *
<add> * @var callable
<add> */
<add> protected $callback;
<add>
... | 5 |
Javascript | Javascript | fix feature flags react-dom/unstable-new-scheduler | 3a44ccefeda8cfa19482c8a3a4480a83cae6c2ae | <ide><path>scripts/rollup/bundles.js
<ide> const bundles = [
<ide> FB_WWW_PROFILING,
<ide> NODE_DEV,
<ide> NODE_PROD,
<add> NODE_PROFILING,
<ide> ],
<ide> moduleType: RENDERER,
<ide> entry: 'react-dom/unstable-new-scheduler',
<ide><path>scripts/rollup/forks.js
<ide> const inlinedHostC... | 2 |
Javascript | Javascript | apply numeric text event bubbling fix for android | 17cb70efdd1ed6378677e720a022c9d83ad87dd6 | <ide><path>Libraries/Renderer/src/renderers/shared/shared/event/EventPluginHub.js
<ide> var EventPluginHub = {
<ide> return null;
<ide> }
<ide> } else {
<del> if (typeof inst._currentElement === 'string') {
<add> const currentElement = inst._currentElement;
<add> if (
<add> typeo... | 1 |
Java | Java | remove global list in jscheapcapture | 31628f3aa49256d489d6670c9e25ddd593216370 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerImpl.java
<ide> public void run() {
<ide> }
<ide>
<ide> private void handleCaptureHeap() {
<del> JSCHeapCapture.captureHeap(
<add> if (mCurrentContext == null) {
<add> return;
<add> }
<add> JSCHeapCapture heapCapt... | 3 |
Ruby | Ruby | change the "unstable" spec message to devel/head | fabb0931e3fc13ad929b88996b9821acdea041d0 | <ide><path>Library/Homebrew/dev-cmd/audit.rb
<ide> def audit_specs
<ide> end
<ide>
<ide> if formula.head || formula.devel
<del> unstable_spec_message = "Formulae should not have an unstable spec"
<add> unstable_spec_message = "Formulae should not have a `HEAD` or `devel` spec"
<ide> i... | 1 |
PHP | PHP | add wherejsoncontains() to sql server | 8038c3d7eeb8d1cdbec8924bd0b4b41c3234f4d8 | <ide><path>src/Illuminate/Database/Query/Builder.php
<ide> public function whereJsonContains($column, $value, $boolean = 'and', $not = fals
<ide> $this->wheres[] = compact('type', 'column', 'value', 'boolean', 'not');
<ide>
<ide> if (! $value instanceof Expression) {
<del> $this->addBinding(... | 4 |
Javascript | Javascript | remove unnecessary set watching to zero | 3edefeae22cf7c84fafc026230c26fc4af75d608 | <ide><path>packages/ember-metal/lib/watching.js
<ide> var propertyDidChange = Ember.propertyDidChange = function(obj, keyName) {
<ide> @returns {void}
<ide> */
<ide> Ember.destroy = function (obj) {
<del> var meta = obj[META_KEY], chains, watching, paths, path;
<add> var meta = obj[META_KEY], chains, paths, path;
<... | 1 |
PHP | PHP | add sub-view evaluating back to view class | 7ad1126cf18cd5b732e54fd7c853931a540d2400 | <ide><path>system/view.php
<ide> public function get()
<ide> throw new \Exception("View [$view] does not exist.");
<ide> }
<ide>
<add> foreach ($this->data as &$data)
<add> {
<add> if ($data instanceof View or $data instanceof Response) $data = (string) $data;
<add> }
<add>
<ide> ob_start() and extract($th... | 1 |
Ruby | Ruby | use undeprecated add_offense form | 4e29152603ed192e90b83b66f0ad92a676549c43 | <ide><path>Library/Homebrew/rubocops/extend/formula_cop.rb
<ide> def formula_tap
<ide> end
<ide>
<ide> def problem(msg)
<del> add_offense(@offensive_node, @offense_source_range, msg)
<add> add_offense(@offensive_node, location: @offense_source_range, message: msg)
<ide> end
<ide>
<ide>... | 1 |
Text | Text | add full deprecation history | ed130d2e2c3422451915f89b73894b2abc822880 | <ide><path>doc/api/deprecations.md
<ide> However, the deprecation identifier will not be modified.
<ide>
<ide> <a id="DEP0001"></a>
<ide> ### DEP0001: http.OutgoingMessage.prototype.flush
<add><!-- YAML
<add>changes:
<add> - version:
<add> - v4.8.6
<add> - v6.12.0
<add> pr-url: https://github.com/nodejs/node... | 1 |
Javascript | Javascript | fix error message in gltfloader | 006a90682c49065e81aa2138029680d5530ba0e0 | <ide><path>examples/js/loaders/GLTFLoader.js
<ide> THREE.GLTFLoader = ( function () {
<ide>
<ide> if ( bufferDef.type && bufferDef.type !== 'arraybuffer' ) {
<ide>
<del> throw new Error( 'THREE.GLTFLoader: %s buffer type is not supported.', bufferDef.type );
<add> throw new Error( 'THREE.GLTFLoader: ' + bufferD... | 1 |
Ruby | Ruby | add a failing test | 943fde0a55594bb9e75783974e37eba9584ac79b | <ide><path>activerecord/test/associations_test.rb
<ide> def test_store_association_in_two_relations_with_one_save
<ide> assert_equal num_orders +1, Order.count
<ide> assert_equal num_customers +1, Customer.count
<ide> end
<add>
<add> def test_association_assignment_sticks
<add> client = Client.find(:first... | 1 |
Text | Text | add wikipedia link for dry explanation | ff9e9f1d7c32b8c1ec36f9eb8a0ace5d20748818 | <ide><path>docs/01-Chart-Configuration.md
<ide> var chartInstance = new Chart(ctx, {
<ide>
<ide> ### Global Configuration
<ide>
<del>This concept was introduced in Chart.js 1.0 to keep configuration DRY, and allow for changing options globally across chart types, avoiding the need to specify options for each instance... | 1 |
Python | Python | add extra space in test failure output | a59b6a1bc6714c230339cea0c3a007e905b29191 | <ide><path>test/pseudo-tty/testcfg.py
<ide> def IsFailureOutput(self, output):
<ide> raw_lines = (output.stdout + output.stderr).split('\n')
<ide> outlines = [ s.rstrip() for s in raw_lines if not self.IgnoreLine(s) ]
<ide> if len(outlines) != len(patterns):
<del> print("length differs.")
<add> pr... | 1 |
Python | Python | fix num of bits calculation for network stats | f0fe6af62929178cd46b8c8969310d6d1371c36d | <ide><path>glances/glances.py
<ide> def displayNetwork(self, network):
<ide> cx_per_sec = self.__autoUnit(
<ide> network[i]['cx'] // elapsed_time * 8) + "b"
<ide> cumulative_rx = self.__autoUnit(
<del> network[i]['cumulative_rx']) + ... | 1 |
Java | Java | fix condition in subprotocolwebsockethandler | 2b1ff4c5db781a3d0b5b83fab44e47cd7e64dbd6 | <ide><path>spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java
<ide> public class SubProtocolWebSocketHandler implements WebSocketHandler,
<ide> * connection isn't doing well (proxy issue, slow network?) and can be closed.
<ide> * @see #checkSessions()
<ide> */... | 2 |
PHP | PHP | fix typo in error class | c75f298c34a281e0a30959ceafcf515271ce945d | <ide><path>system/error.php
<ide> public static function handle($e)
<ide> $file = $e->getFile();
<ide> }
<ide>
<del> // Trim the period off the error message since we will be formatting it oursevles.
<add> // Trim the period off the error message since we will be formatting it ourselves.
<ide> $message = rtri... | 1 |
Text | Text | fix typo in command | f594090a936a06524d2df77c0eb65a42bf694d6b | <ide><path>examples/pytorch/translation/README.md
<ide> pip install accelerate
<ide> then
<ide>
<ide> ```bash
<del>python run_tranlation_no_trainer.py \
<add>python run_translation_no_trainer.py \
<ide> --model_name_or_path Helsinki-NLP/opus-mt-en-ro \
<ide> --source_lang en \
<ide> --target_lang ro \ | 1 |
Java | Java | add sun.misc annotation marker | 5923ee8af39a5a36017e3046146bdf0591ab0f61 | <ide><path>spring-core/src/main/java/org/springframework/lang/UsesSunMisc.java
<add>package org.springframework.lang;
<add>
<add>import java.lang.annotation.Documented;
<add>import java.lang.annotation.ElementType;
<add>import java.lang.annotation.Retention;
<add>import java.lang.annotation.RetentionPolicy;
<add>import... | 1 |
PHP | PHP | trim a long ling | 62d8c09cce19dae64a338fe4b22f2660b96dafec | <ide><path>laravel/cli/tasks/migrate/migrator.php
<ide> protected function stub($bundle, $migration)
<ide> {
<ide> $stub = File::get(path('sys').'cli/tasks/migrate/stub'.EXT);
<ide>
<add> $prefix = Bundle::class_prefix($bundle);
<add>
<ide> // The class name is formatted simialrly to tasks and controllers,
<ide>... | 1 |
Ruby | Ruby | add regression test. closes | dea2aafbfa5f63bf99f21244309a6fe75e5de906 | <ide><path>activerecord/test/cases/persistence_test.rb
<ide> def self.name; 'Topic'; end
<ide> end
<ide> end
<ide>
<add> def test_update_does_not_run_sql_if_record_has_not_changed
<add> topic = Topic.create(title: 'Another New Topic')
<add> assert_queries(0) { topic.update(title: 'Another New Topic') }
<a... | 1 |
Python | Python | add timeout parameter to `dockeroperator` | e1a42c4fc8a634852dd5ac5b16cade620851477f | <ide><path>airflow/providers/docker/hooks/docker.py
<ide> from typing import Any, Dict, Optional
<ide>
<ide> from docker import APIClient
<add>from docker.constants import DEFAULT_TIMEOUT_SECONDS
<ide> from docker.errors import APIError
<ide>
<ide> from airflow.exceptions import AirflowException
<ide> def __init__(
<... | 5 |
Javascript | Javascript | remove unnecessary div and props | 1660a267bad076f50f5591fd2498071df83e9bd8 | <ide><path>client/src/templates/Guide/components/GuideFooter.js
<ide> import { Link, Spacer } from '../../../components/helpers';
<ide> const propTypes = {
<ide> githubPath: PropTypes.string
<ide> };
<del>const GuideFooter = props => {
<del> const { githubPath } = props;
<del> return (
<del> <div>
<del> <Sp... | 1 |
Javascript | Javascript | fix bumpy line on smooth data set | e080e782ab44f34d2bcd63ad6255f48bac2292ea | <ide><path>src/scales/scale.linear.js
<ide> module.exports = function(Chart) {
<ide>
<ide> if (me.isHorizontal()) {
<ide> pixel = me.left + (me.width / range * (rightValue - start));
<del> return Math.round(pixel);
<add> } else {
<add> pixel = me.bottom - (me.height / range * (rightValue - start));
<ide... | 3 |
PHP | PHP | apply fixes from styleci | 9208548adbc1da7dc0a29de6c9d3365e350cafbd | <ide><path>src/Illuminate/Http/Client/RequestException.php
<ide> protected function prepareMessage(Response $response)
<ide>
<ide> $summary = \GuzzleHttp\Psr7\get_message_body_summary($response->toPsrResponse());
<ide>
<del> return is_null($summary) ? $message : $message .= ":\n{$summary}\n";;
<add> ... | 1 |
Python | Python | fix add_start_docstrings on python 2 (removed) | 62b8eb43c1b722f8c8a3c89fce5d788a08fc9653 | <ide><path>pytorch_transformers/modeling_bert.py
<ide> def init_weights(self, module):
<ide> @add_start_docstrings("The bare Bert Model transformer outputing raw hidden-states without any specific head on top.",
<ide> BERT_START_DOCSTRING, BERT_INPUTS_DOCSTRING)
<ide> class BertModel(BertPreTraine... | 3 |
Ruby | Ruby | convert integer extension modules to class reopens | 54cf0fc476b2d77adb8a124c27a79a048fa4ddb5 | <ide><path>activesupport/lib/active_support/core_ext/integer.rb
<add>require 'active_support/core_ext/integer/even_odd'
<add>require 'active_support/core_ext/integer/inflections'
<add>
<ide> require 'active_support/core_ext/util'
<del>ActiveSupport.core_ext Integer, %w(even_odd inflections time)
<add>ActiveSupport.core... | 3 |
Text | Text | add tempates for new issues and pull requests | 9cac2716f7196fc915c4cac3b2c34aa2183182d9 | <ide><path>.github/ISSUE_TEMPLATE.md
<add><!--
<add>If you are reporting a new issue, make sure that we do not have any duplicates
<add>already open. You can ensure this by searching the issue list for this
<add>repository. If there is a duplicate, please close your issue and add a comment
<add>to the existing issue in... | 2 |
Python | Python | factorize export code | 338330271d62629461f867d7fd940231e65fa08f | <ide><path>glances/exports/glances_csv.py
<ide> def __init__(self, config=None, args=None):
<ide>
<ide> logger.info("Stats exported to CSV file: {0}".format(self.csv_filename))
<ide>
<add> self.export_enable = True
<add>
<ide> self.first_line = True
<ide>
<ide> def exit(self):
<ide><path>g... | 4 |
Javascript | Javascript | remove unused catch bindings | a64ca7139ec1c04aff033fd1c6a1cd6c6a99c015 | <ide><path>lib/internal/modules/esm/loader.js
<ide> class Loader {
<ide> if (this._resolve !== defaultResolve) {
<ide> try {
<ide> new URL(url);
<del> } catch (e) {
<add> } catch {
<ide> throw new ERR_INVALID_RETURN_PROPERTY(
<ide> 'url', 'loader resolve', 'url', url
<ide> ... | 1 |
Javascript | Javascript | add exportsspec type to getexports | f5a457ffd4896b39da7dd83382ae46d6227a78b5 | <ide><path>lib/Dependency.js
<ide> class Dependency {
<ide>
<ide> /**
<ide> * Returns the exported names
<add> * @param {ModuleGraph} moduleGraph module graph
<ide> * @returns {ExportsSpec | undefined} export names
<ide> */
<del> getExports() {
<del> return null;
<add> getExports(moduleGraph) {
<add> return ... | 7 |
Python | Python | fix pickle tests | bb3304a4f1785cca954858b500afeef9051d245e | <ide><path>spacy/tests/test_pickles.py
<ide> def test_pickle_vocab(text1, text2):
<ide> lex2 = vocab[text2]
<ide> assert lex1.norm_ == text1[:-1]
<ide> assert lex2.norm_ == text2[:-1]
<del> data = pickle.dumps(vocab)
<del> unpickled = pickle.loads(data)
<add> data = srsly.pickle_dumps(vocab)
<add> ... | 1 |
Javascript | Javascript | add examples to the ember.route docs | 9ebb56e43184eed021a2059be08b58d9f8431e0e | <ide><path>packages/ember-routing/lib/system/route.js
<ide> Ember.Route = Ember.Object.extend({
<ide> route in question. The model will be serialized into the URL
<ide> using the `serialize` hook.
<ide>
<add> Example
<add>
<add> ```javascript
<add> App.Router.map(function() {
<add> this.route("in... | 1 |
PHP | PHP | simplify test api for session access | f79ca04e0c1c883821fb3a95c461e5d1080dbd1a | <ide><path>src/TestSuite/IntegrationTestTrait.php
<ide> protected function extractExceptionMessage(Exception $exception): string
<ide> /**
<ide> * @return \Cake\TestSuite\TestSession
<ide> */
<del> protected function getTestSession(): TestSession
<add> protected function getSession(): TestSession
<i... | 1 |
Python | Python | remove unnecessary test_input_fn | 88c864f724e179343848938282404a84dc0c3e83 | <ide><path>official/nlp/xlnet/run_classifier.py
<ide> def main(unused_argv):
<ide> eval_fn=eval_fn,
<ide> metric_fn=get_metric_fn,
<ide> train_input_fn=train_input_fn,
<del> test_input_fn=test_input_fn,
<ide> init_checkpoint=FLAGS.init_checkpoint,
<ide> init_from_transformerxl=FLAGS.i... | 4 |
Python | Python | simplify flow in np.require | f9cc4bf70c5c6f26ad421962bf5c608558b1035c | <ide><path>numpy/core/_asarray.py
<ide> __all__ = ["require"]
<ide>
<ide>
<add>POSSIBLE_FLAGS = {
<add> 'C': 'C', 'C_CONTIGUOUS': 'C', 'CONTIGUOUS': 'C',
<add> 'F': 'F', 'F_CONTIGUOUS': 'F', 'FORTRAN': 'F',
<add> 'A': 'A', 'ALIGNED': 'A',
<add> 'W': 'W', 'WRITEABLE': 'W',
<add> 'O': 'O', 'OWNDATA': 'O'... | 1 |
Javascript | Javascript | use fixtures in test-https-localaddress.js | b9c8fd8338be88c074a91bd01a1101ba828d1fd4 | <ide><path>test/parallel/test-https-localaddress.js
<ide> if (!common.hasCrypto)
<ide> if (!common.hasMultiLocalhost())
<ide> common.skip('platform-specific test.');
<ide>
<del>const fs = require('fs');
<add>const fixtures = require('../common/fixtures');
<ide> const assert = require('assert');
<ide> const https = r... | 1 |
PHP | PHP | add tests for assertjsonfragment() | 69f9c4eef64faf473683801b3659e5e4d314e7f3 | <ide><path>tests/Foundation/FoundationTestResponseTest.php
<ide> public function testAssertJsonWithMixed()
<ide> $response->assertJson($resource->jsonSerialize());
<ide> }
<ide>
<add> public function testAssertJsonFragment()
<add> {
<add> $response = new TestResponse(new JsonSerializableSingle... | 1 |
Text | Text | add socket example gist link | 3f93d6bb21fd104263bc83da87bd2e113e82bd9f | <ide><path>docs/faq/CodeStructure.md
<ide> Middleware are the right place for persistent connections like websockets in a R
<ide> - Middleware can see all dispatched actions and dispatch actions themselves. This means a middleware can take dispatched actions and turn those into messages sent over the websocket, and di... | 1 |
PHP | PHP | apply fixes from styleci | 51be372c2eed553cecfc73a46804d27fa2ff96ff | <ide><path>src/Illuminate/Http/UploadedFile.php
<ide> public function storePubliclyAs($path, $name, $options = [])
<ide> public function storeAs($path, $name, $options = [])
<ide> {
<ide> $options = $this->parseOptions($options);
<del>
<add>
<ide> $disk = Arr::pull($options, 'disk');
<id... | 1 |
Java | Java | remove short conversions in mapbuffer | a054379a54c1548b98b5835bebf987d93517c41c | <ide><path>ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/ReadableMapBuffer.java
<ide> public class ReadableMapBuffer implements Iterable<ReadableMapBuffer.MapBufferEn
<ide>
<ide> private static final int INT_SIZE = 4;
<ide>
<del> // TODO T83483191: consider moving short to INTs, we are doing extra... | 2 |
Java | Java | add nullpointerexception comment | 14bebc511b242d38f1956544a86265a6f48e489d | <ide><path>src/main/java/io/reactivex/Single.java
<ide> public static Single<Long> timer(long delay, TimeUnit unit) {
<ide> * @param unit the time unit of the delay
<ide> * @param scheduler the scheduler where the single 0L will be emitted
<ide> * @return the new Single instance
<add> * @throws NullP... | 1 |
PHP | PHP | allow array of strings/arrays, optional name attr | 38684f94871e66a599644b605b02c4bcac3ea088 | <ide><path>src/Illuminate/Mail/Mailable.php
<ide> protected function setAddress($address, $name = null, $property = 'to')
<ide>
<ide> if ($address instanceof Collection || is_array($address)) {
<ide> foreach ($address as $user) {
<del> $this->{$property}($user->email, $user->name);
<... | 1 |
Python | Python | fix 2.5-isms for deprecated decorator | eb6df7ca32375fe98c7902f77b90d6a7d9869ea3 | <ide><path>numpy/testing/decorators.py
<ide> def __init__(self, message, category, filename, lineno, file=None,
<ide> local_values = locals()
<ide> for attr in self._WARNING_DETAILS:
<ide> setattr(self, attr, local_values[attr])
<del> self._category_name = category.__name__ if categor... | 1 |
Java | Java | add cookies to the websocket handshakeinfo | d92c74d923a43218cd0f49fdf28622a2aa6c9837 | <ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/socket/HandshakeInfo.java
<ide> import java.util.Collections;
<ide> import java.util.Map;
<ide>
<add>import org.springframework.http.HttpCookie;
<add>import org.springframework.util.CollectionUtils;
<add>import org.springframework.util.MultiValue... | 2 |
Go | Go | add 500 check for registry api call | 88f02c2f33ff5caf69b93e667b52ab50e5e386ad | <ide><path>registry/auth.go
<ide> func loginV1(authConfig *cliconfig.AuthConfig, registryEndpoint *Endpoint) (stri
<ide> }
<ide> // *TODO: Use registry configuration to determine what this says, if anything?
<ide> return "", fmt.Errorf("Login: Account is not Active. Please see the documentation of the regis... | 1 |
Javascript | Javascript | add benchmark for v8.getheap*statistics | bed4612c408dddd86f82b0d939338b6b72a5e346 | <ide><path>benchmark/v8/get-stats.js
<add>'use strict';
<add>
<add>const common = require('../common.js');
<add>const v8 = require('v8');
<add>
<add>const bench = common.createBenchmark(main, {
<add> method: [
<add> 'getHeapStatistics',
<add> 'getHeapSpaceStatistics'
<add> ],
<add> n: [1e6],
<add> flags: ['--... | 1 |
Ruby | Ruby | improve alpha and rc detection | 58a2ef9b58d90dd831647f1bcc39e8597be5a7b8 | <ide><path>Library/Homebrew/version.rb
<ide> def self._parse(spec)
<ide> m = /-((?:\d+\.)*\d+(?:[abc]|rc|RC)\d*)$/.match(stem)
<ide> return m.captures.first unless m.nil?
<ide>
<del> # e.g. foobar-4.5.0-beta1, or foobar-4.50-beta
<del> m = /-((?:\d+\.)*\d+-beta\d*)$/.match(stem)
<add> # e.g. foobar-4.... | 1 |
Javascript | Javascript | write font cmap using a string | 32880025fc1ccdcc6e47a77fa4c2be4ceed29012 | <ide><path>fonts.js
<ide> var Font = (function () {
<ide> var searchRange = FontsUtils.getMaxPower2(segCount) * 2;
<ide> var searchEntry = Math.log(segCount) / Math.log(2);
<ide> var rangeShift = 2 * segCount - searchRange;
<del> var cmap = [].concat(
<del> [
<... | 1 |
Ruby | Ruby | remove @state.parent assignment on commit | dd9829a9ea460ddcfc8d954f2b95161b52fff6e7 | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/transaction.rb
<ide> def savepoint_name
<ide> end
<ide>
<ide> class TransactionState
<del> attr_accessor :parent
<add> attr_reader :parent
<ide>
<ide> VALID_STATES = Set.new([:committed, :rolledback, nil])
<ide>
<ide> def ... | 1 |
Python | Python | debug + tests for multipartparser | ee74aec27cdc8ca9934f93c828ffbdc7da3c426c | <ide><path>djangorestframework/parsers.py
<ide> class DataFlatener(object):
<ide> def flatten_data(self, data):
<ide> """Given a data dictionary {<key>: <value_list>}, returns a flattened dictionary
<ide> with information provided by the method "is_a_list"."""
<del> data = data.copy()
<ide> ... | 2 |
Javascript | Javascript | switch assertion order | 1ff9a49b7811f77919075132559adf105c3291b5 | <ide><path>test/pummel/test-child-process-spawn-loop.js
<ide> function doSpawn(i) {
<ide>
<ide> child.on('close', () => {
<ide> // + 1 for \n or + 2 for \r\n on Windows
<del> assert.strictEqual(SIZE + (common.isWindows ? 2 : 1), count);
<add> assert.strictEqual(count, SIZE + (common.isWindows ? 2 : 1));
<i... | 1 |
Python | Python | use hparams rather than dict. don't tune sync | e11010fce913ee21a5f57a116aa4c87d0afd3243 | <ide><path>tutorials/image/cifar10_estimator/cifar10_main.py
<ide> from __future__ import print_function
<ide>
<ide> import argparse
<del>import collections
<ide> import functools
<ide> import itertools
<ide> import os
<ide> tf.logging.set_verbosity(tf.logging.INFO)
<ide>
<ide>
<del>def get_model_fn(num_gpus, variab... | 1 |
Javascript | Javascript | move composition event to plugin with polyfill | 5d7633d74cc79d6bb6498c9dd57d62b6718648e2 | <ide><path>src/core/ReactDefaultInjection.js
<ide> var DOMProperty = require('DOMProperty');
<ide> var DefaultEventPluginOrder = require('DefaultEventPluginOrder');
<ide> var EnterLeaveEventPlugin = require('EnterLeaveEventPlugin');
<ide> var ChangeEventPlugin = require('ChangeEventPlugin');
<add>var CompositionEventPl... | 4 |
Javascript | Javascript | remove defaultprops from keyboardavoidingview | 2824b68ee8f808bc2860d1a4fd8f4e92127b79f6 | <ide><path>Libraries/Components/Keyboard/KeyboardAvoidingView.js
<ide> type Props = $ReadOnly<{|
<ide> * Controls whether this `KeyboardAvoidingView` instance should take effect.
<ide> * This is useful when more than one is on the screen. Defaults to true.
<ide> */
<del> enabled: ?boolean,
<add> enabled?: ?b... | 1 |
PHP | PHP | update array usage | 9fa29d2fc549bb0613bfc95282f477c91446c126 | <ide><path>lib/Cake/Routing/RequestActionTrait.php
<ide> trait RequestActionTrait {
<ide> * or fetch the return value from controller actions.
<ide> *
<ide> * Under the hood this method uses Router::reverse() to convert the $url parameter into a string
<del> * URL. You should use URL formats that are compatible wit... | 1 |
Python | Python | fix digital ocean tests | b164cfc793f99ed6c0e52f2e681abd9dfe744a50 | <ide><path>libcloud/common/base.py
<ide>
<ide> import libcloud
<ide>
<del>from libcloud.utils.py3 import PY3, PY25
<add>from libcloud.utils.py3 import PY25
<ide> from libcloud.utils.py3 import httplib
<ide> from libcloud.utils.py3 import urlparse
<ide> from libcloud.utils.py3 import urlencode
<del>from libcloud.utils... | 3 |
Go | Go | return device id in error message | 39bdf601f6bea3c189d8e189e13c7e48b6f66b43 | <ide><path>daemon/graphdriver/devmapper/driver.go
<ide> func (d *Driver) Remove(id string) error {
<ide>
<ide> // This assumes the device has been properly Get/Put:ed and thus is unmounted
<ide> if err := d.DeviceSet.DeleteDevice(id, false); err != nil {
<del> return err
<add> return fmt.Errorf("failed to remove d... | 1 |
Python | Python | add constraint to ensure task map length >= 0 | 80f30ee589f0ccbeaae5568976b40917ffd66d7f | <ide><path>airflow/migrations/versions/e655c0453f75_add_taskmap_and_map_id_on_taskinstance.py
<ide> """
<ide>
<ide> from alembic import op
<del>from sqlalchemy import Column, ForeignKeyConstraint, Integer, text
<add>from sqlalchemy import CheckConstraint, Column, ForeignKeyConstraint, Integer, text
<ide>
<ide> from a... | 2 |
Text | Text | add another useful link for beginners | 36886e63180231ed405e0ea69a9dd5335400b6ef | <ide><path>guide/english/mathematics/intro-to-logarithms/index.md
<ide> math.log(100, 10) #outputs 2
<ide> math.log(2, 2) #outputs 1
<ide> ```
<ide>
<del>
<del>#### Sources:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>* https://betterexplained.com/articles/u... | 1 |
Java | Java | set error status in observation servlet filter | 1960666765a6bf93500f3bf8f2eeb29e428b68e9 | <ide><path>spring-web/src/main/java/org/springframework/web/filter/ServerHttpObservationFilter.java
<ide> import jakarta.servlet.http.HttpServletRequest;
<ide> import jakarta.servlet.http.HttpServletResponse;
<ide>
<add>import org.springframework.http.HttpStatus;
<ide> import org.springframework.http.server.observatio... | 2 |
Python | Python | fix bug in np.insert when axis=-1 | cb6fe848bf1a6a046fd473b72b1350ea40c8644e | <ide><path>numpy/lib/function_base.py
<ide> def insert(arr, obj, values, axis=None):
<ide> # broadcasting is very different here, since a[:,0,:] = ... behaves
<ide> # very different from a[:,[0],:] = ...! This changes values so that
<ide> # it works likes the second case. (here a[:,0... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.