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 |
|---|---|---|---|---|---|
Go | Go | move authconfig to api/types | 5b321e328769cc93c3454e82ec3fe07672156f2e | <ide><path>api/client/client.go
<ide> import (
<ide>
<ide> "github.com/docker/docker/api/client/lib"
<ide> "github.com/docker/docker/api/types"
<del> "github.com/docker/docker/cliconfig"
<ide> "github.com/docker/docker/pkg/parsers/filters"
<ide> "github.com/docker/docker/registry"
<ide> "github.com/docker/docker/... | 25 |
Javascript | Javascript | improve test coverage for | db76b9fb39d7ca29873739571ea09035ad7603e3 | <ide><path>spec/tokenized-buffer-iterator-spec.js
<ide> import {Point} from 'text-buffer'
<ide>
<ide> describe('TokenizedBufferIterator', () => {
<ide> describe('seek(position)', function () {
<del> it('seeks to the leftmost tag boundary at the given position, returning the containing tags', function () {
<add> ... | 1 |
Javascript | Javascript | check isavailable key on simulator object | 1031872784e9373082797e5bf5c815816af2105b | <ide><path>local-cli/runIOS/__tests__/findMatchingSimulator-test.js
<ide> describe('findMatchingSimulator', () => {
<ide> });
<ide> });
<ide>
<add> it('should find simulator with new xcrun format', () => {
<add> expect(
<add> findMatchingSimulator(
<add> {
<add> devices: {
<add> ... | 2 |
Javascript | Javascript | fix lint issue | 134a3a52e8357884d2ad14ba10db145832b94093 | <ide><path>server/services/user.js
<ide> const protectedUserFields = {
<ide> profiles: censor
<ide> };
<ide>
<del>export default function userServices(/* app */) {
<add>export default function userServices() {
<ide> return {
<ide> name: 'user',
<ide> read: (req, resource, params, config, cb) => { | 1 |
Javascript | Javascript | replace tls-fragmentation with tls/throughput | 0a406869df990d030d2383abc7f1388aead57d0c | <ide><path>benchmark/tls-fragmentation.js
<del>// Copyright Joyent, Inc. and other Node contributors.
<del>//
<del>// Permission is hereby granted, free of charge, to any person obtaining a
<del>// copy of this software and associated documentation files (the
<del>// "Software"), to deal in the Software without restric... | 2 |
PHP | PHP | add hasscope function to the base model | 2a922bc0d83ebdf4199ff8fa75088b27c9c41083 | <ide><path>src/Illuminate/Database/Eloquent/Builder.php
<ide> public function __call($method, $parameters)
<ide> return call_user_func_array(static::$macros[$method], $parameters);
<ide> }
<ide>
<del> if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) {
<del> retu... | 3 |
Python | Python | add python 3.7 to setup.py (resolves ) | 83e88553d4cb18dd876c5abe1fe1651034b09e8e | <ide><path>setup.py
<ide> def setup_package():
<ide> 'Programming Language :: Python :: 3.4',
<ide> 'Programming Language :: Python :: 3.5',
<ide> 'Programming Language :: Python :: 3.6',
<add> 'Programming Language :: Python :: 3.7',
<ide> ... | 1 |
Javascript | Javascript | use only public api for changeeventplugin-test.js | a67757e11540936677b0a5d89d623b3e38b5fe69 | <ide><path>packages/react-dom/src/events/__tests__/ChangeEventPlugin-test.internal.js
<del>/**
<del> * Copyright (c) 2013-present, Facebook, Inc.
<del> *
<del> * This source code is licensed under the MIT license found in the
<del> * LICENSE file in the root directory of this source tree.
<del> *
<del> * @emails react-... | 2 |
Javascript | Javascript | remove duplicate import declarations | 595b4f945b703128af7e65750726c0cbf073ca58 | <ide><path>packages/react-reconciler/src/ReactFiberScheduler.js
<ide> import {
<ide> scheduleDeferredCallback,
<ide> cancelDeferredCallback,
<ide> shouldYield,
<del> scheduleTimeout,
<del> cancelTimeout,
<del> noTimeout,
<ide> prepareForCommit,
<ide> resetAfterCommit,
<ide> scheduleTimeout, | 1 |
Python | Python | add missing teardown in deprecation test case | 78d7cc4f3422826954b067a5b030f0807f85f294 | <ide><path>numpy/core/tests/test_deprecations.py
<ide> def foo():
<ide> warnings.warn("foo", category=DeprecationWarning)
<ide>
<ide> test_case_instance.assert_deprecated(foo)
<add> test_case_instance.tearDown()
<add>
<ide>
<ide> if __name__ == "__main__":
<ide> run_module_suite() | 1 |
PHP | PHP | add test covering reading old data | e97b65c70d19d36ed9704d1ea2001ce5384c2010 | <ide><path>tests/TestCase/Http/Cookie/CookieTest.php
<ide> public function testReadComplexData()
<ide> $this->assertEquals('developer', $result);
<ide> }
<ide>
<add> /**
<add> * Test reading complex data serialized in 1.x and early 2.x
<add> *
<add> * @return void
<add> */
<add> publi... | 1 |
Javascript | Javascript | fix https with fs.openreadstream hangs | 5451ba3aa8f3061851a1618374374f2f0f0e3275 | <ide><path>lib/tls.js
<ide> CryptoStream.prototype._pull = function() {
<ide> paused = this.pair.cleartext._paused;
<ide> }
<ide> if (!paused) {
<del> debug('drain');
<del> process.nextTick(this.emit.bind(this, 'drain'));
<add> debug('drain ' + (this === this.pair.cleartext ? 'clear' : 'enc... | 2 |
Javascript | Javascript | fix coding style in test/unit/crypto_spec.js | 9e3f7e4d6d8d6a29bee4cd37b4eb593fe74b5062 | <ide><path>test/unit/crypto_spec.js
<ide> describe('crypto', function() {
<ide> function string2binary(s) {
<ide> var n = s.length, i;
<ide> var result = new Uint8Array(n);
<del> for (i = 0; i < n; ++i)
<add> for (i = 0; i < n; ++i) {
<ide> result[i] = s.charCodeAt(i) % 0xFF;
<add> }
<ide> ... | 1 |
PHP | PHP | fix null when calling explode | 5d8d5545a40e8360a8b0ef9aaa3e514308ab99fd | <ide><path>src/Controller/Component/RequestHandlerComponent.php
<ide> public function requestedWith($type = null)
<ide> return false;
<ide> }
<ide>
<del> list($contentType) = explode(';', $request->contentType());
<add> list($contentType) = explode(';', $request->contentType() ?? '');... | 1 |
Go | Go | check supplied hostname before using it | 412324cfbe9b5e256d9af31b21e6ae142d39612c | <ide><path>pkg/libcontainer/nsinit/init.go
<ide> func Init(container *libcontainer.Container, uncleanRootfs, consolePath string,
<ide> if err := mount.InitializeMountNamespace(rootfs, consolePath, container); err != nil {
<ide> return fmt.Errorf("setup mount namespace %s", err)
<ide> }
<del> if err := system.Sethos... | 1 |
Text | Text | add security.md to readme.md | 472a3d890bcd1c6799658d72bb813626a16d0adc | <ide><path>README.md
<ide> source and a list of supported platforms.
<ide>
<ide> ## Security
<ide>
<del>If you find a security vulnerability in Node.js, please report it to
<del>security@nodejs.org. Please withhold public disclosure until after the security
<del>team has addressed the vulnerability.
<del>
<del>The se... | 2 |
Text | Text | fix typo in esm example | 4bd8e0efa05112d29de241142ccca3c2dcfb8175 | <ide><path>doc/api/esm.md
<ide> async function getPackageType(url) {
<ide> // Compose a file path to a package.json in the same directory,
<ide> // which may or may not exist
<ide> const packagePath = resolvePath(dir, 'package.json');
<del> // Try to read the possibly non-existant package.json
<add> // Try to r... | 1 |
Ruby | Ruby | remove dead code | 598e7010f98c261df7c0a17c79dea554aebd1334 | <ide><path>Library/Homebrew/download_strategy.rb
<ide> def initialize name, resource
<ide> @url = "#{@url}?use_mirror=#{mirror}" if mirror
<ide> end
<ide>
<del> def tarball_path
<del> @tarball_path ||= HOMEBREW_CACHE/"#{name}-#{resource.version}#{ext}"
<del> end
<del>
<ide> def stage
<ide> ohai "Pouri... | 1 |
Javascript | Javascript | apply css on server rendering | 3e721b6878bcaad7a68256ac9643305bff478fcf | <ide><path>client/next.js
<ide> import { createElement } from 'react'
<ide> import { render } from 'react-dom'
<ide> import HeadManager from './head-manager'
<add>import { StyleSheet } from '../lib/css'
<ide> import Router from '../lib/router'
<ide> import DefaultApp from '../lib/app'
<ide> import evalScript from '../l... | 3 |
Go | Go | enable multiple cli build tests | bb4b31585c19b5d20a536c615e54b2fe48f8054c | <ide><path>integration-cli/docker_cli_build_test.go
<ide> func (s *DockerSuite) TestBuildContextCleanup(c *check.C) {
<ide> }
<ide>
<ide> func (s *DockerSuite) TestBuildContextCleanupFailedBuild(c *check.C) {
<del> testRequires(c, DaemonIsLinux)
<ide> testRequires(c, SameHostDaemon)
<ide>
<ide> name := "testbuildco... | 1 |
PHP | PHP | update php8 string function | ab5fd4bfc2a93283c26a4bfbc63f48355694bca4 | <ide><path>src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
<ide> protected function serializeClassCastableAttribute($key, $value)
<ide> */
<ide> protected function isCustomDateTimeCast($cast)
<ide> {
<del> return strncmp($cast, 'date:', 5) === 0 ||
<del> strncmp($cast, 'dat... | 1 |
PHP | PHP | remove strange test | 2a728804ccc1ef63fcf4fae3b4d5d73eda04dbba | <ide><path>tests/Routing/RoutingRouteTest.php
<ide> public function testClassesCanBeInjectedIntoRoutes()
<ide> unset($_SERVER['__test.route_inject']);
<ide> }
<ide>
<del> public function testClassesAndVariablesCanBeInjectedIntoRoutes()
<del> {
<del> unset($_SERVER['__test.route_inject']);
<del... | 1 |
Ruby | Ruby | remove more flaky tests | fb0fa419abc750bf33695a396244b9cffbea1554 | <ide><path>Library/Homebrew/test/cask/cmd/upgrade_spec.rb
<ide> end
<ide> end
<ide>
<del> context "dry run upgrade" do
<del> let(:installed) {
<del> [
<del> "outdated/local-caffeine",
<del> "outdated/local-transmission",
<del> "outdated/auto-updates",
<del> "outdated/version-... | 1 |
Java | Java | add tests for importselector meta-data | e142fd11e08261de16f79e23081e02cab3d9f628 | <ide><path>spring-context/src/test/java/org/springframework/context/annotation/ImportSelectorTests.java
<ide> import java.lang.annotation.Retention;
<ide> import java.lang.annotation.RetentionPolicy;
<ide> import java.lang.annotation.Target;
<add>import java.util.HashMap;
<add>import java.util.Map;
<ide>
<add>import o... | 1 |
Python | Python | add accuracy monitoring, verbose eval/predict | 616537f3085aa00c41871a2226c4fdd4d6e8c669 | <ide><path>keras/models.py
<ide> def standardize_y(y):
<ide> y = np.reshape(y, (len(y), 1))
<ide> return y
<ide>
<add>def make_batches(size, batch_size):
<add> nb_batch = int(np.ceil(size/float(batch_size)))
<add> return [(i*batch_size, min(size, (i+1)*batch_size)) for i in range(0, nb_batch)]
<add>
... | 1 |
Python | Python | add proth number to maths | 618f9ca885a6f4e0c2f7dfcf1768ef7b0f717ba6 | <ide><path>maths/proth_number.py
<add>"""
<add>Calculate the nth Proth number
<add>
<add>Source:
<add> https://handwiki.org/wiki/Proth_number
<add>"""
<add>
<add>import math
<add>
<add>
<add>def proth(number: int) -> int:
<add> """
<add> :param number: nth number to calculate in the sequence
<add> :return: ... | 1 |
Python | Python | fix typo in all model docs | 13c185771847370d695b8eee3cbf12f4edc2111c | <ide><path>src/transformers/modeling_albert.py
<ide> class AlbertForPreTrainingOutput(ModelOutput):
<ide> Mask values selected in ``[0, 1]``:
<ide>
<ide> - 1 for tokens that are **not masked**,
<del> - 0 for tokens that are **maked**.
<add> - 0 for tokens that are **masked... | 43 |
Ruby | Ruby | remove audit whitelist | 09d53f4fc567dfafb6d9c71742f4633762f55d7c | <ide><path>Library/Homebrew/cmd/audit.rb
<ide> def audit_line(line, lineno)
<ide> end
<ide>
<ide> if line =~ /ARGV\.(?!(debug\?|verbose\?|value[\(\s]))/
<del> # Python formulae need ARGV for Requirements
<del> problem "Use build instead of ARGV to check options",
<del> :whitelist => %w{p... | 1 |
Ruby | Ruby | add more docs comment context | 59747144539a3c394b6c4e5e27948df41bec22d2 | <ide><path>Library/Homebrew/dev-cmd/pull.rb
<ide> def merge_commit?(url)
<ide>
<ide> # Use `homebrew` remote if HOMEBREW_FORCE_HOMEBREW_ON_LINUX env variable is set.
<ide> # The `homebrew` remote points to homebrew-core tap and is used by Linux maintainers.
<add> # See https://docs.brew.sh/Homebrew-linuxbre... | 1 |
PHP | PHP | check disable_functions before set_time_limit | 52685b3f2ca3055ce3c6418f9a943cab06cc085a | <ide><path>src/Http/Response.php
<ide> protected function _sendFile($file, $range)
<ide> }
<ide>
<ide> $bufferSize = 8192;
<del> set_time_limit(0);
<add> if (array_search('set_time_limit', explode(',', ini_get('disable_functions'))) === false) {
<add> set_time_limit(0);
<add> ... | 1 |
Mixed | Javascript | handle errors properly with deep*equal | 204d94fc756218bfeee921905c8be488027f9627 | <ide><path>doc/api/assert.md
<ide> Only [enumerable "own" properties][] are considered. The
<ide> non-enumerable properties — for such checks, consider using
<ide> [`assert.deepStrictEqual()`][] instead. This can lead to some
<ide> potentially surprising results. For example, the following example does not
<del>throw a... | 3 |
Ruby | Ruby | use file.open instead of kernel.open | 0304545d0cb334c5f24be63e1c639ff8989f7226 | <ide><path>Library/Homebrew/dev-cmd/audit.rb
<ide> def audit
<ide> style_results = Style.check_style_json(style_files, options) if style_files
<ide> # load licenses
<ide> spdx = HOMEBREW_LIBRARY_PATH/"data/spdx.json"
<del> spdx_data = open(spdx, "r") do |file|
<add> spdx_data = File.open(spdx, "r") do... | 1 |
Python | Python | limit astroid version to < 2.12 | ee564ef9e57707ef07db1c3353a1406e47d8e3db | <ide><path>setup.py
<ide> def write_version(filename: str = str(AIRFLOW_SOURCES_ROOT / "airflow" / "git_ve
<ide> 'requests>=2.26.0',
<ide> ]
<ide> doc = [
<add> # Astroid 2.12.* breaks documentation building
<add> # We can remove the limit here after https://github.com/PyCQA/astroid/issues/1708 is solved
<add... | 1 |
Ruby | Ruby | fix schema_cache_test.rb for sqlite3_mem | 1defb6adb8be9051402d2496ded4bb8233d0d925 | <ide><path>activerecord/test/cases/connection_adapters/schema_cache_test.rb
<ide> class SchemaCacheTest < ActiveRecord::TestCase
<ide> def setup
<ide> connection = ActiveRecord::Base.connection
<ide> @cache = SchemaCache.new connection
<del>
<del> if in_memory_db?
<del> connect... | 1 |
Ruby | Ruby | prefer dir.glob when iterating over the result | bf365fc23b89e924e1bfbbb65befdf2a72774819 | <ide><path>Library/Homebrew/cmd/tap.rb
<ide> def link_tap_formula paths
<ide> def repair_taps
<ide> count = 0
<ide> # prune dead symlinks in Formula
<del> Dir["#{HOMEBREW_LIBRARY}/Formula/*.rb"].each do |fn|
<add> Dir.glob("#{HOMEBREW_LIBRARY}/Formula/*.rb") do |fn|
<ide> if not File.exist? fn
<id... | 2 |
PHP | PHP | fix unguarded bug | dfaeb785e478981a49dd1a0e4c95faadbd69ba50 | <ide><path>src/Illuminate/Database/Eloquent/Model.php
<ide> public function fill(array $attributes)
<ide> */
<ide> protected function fillableFromArray(array $attributes)
<ide> {
<del> if (count($this->fillable) > 0)
<add> if (count($this->fillable) > 0 and ! static::$unguarded)
<ide> {
<ide> return array_in... | 1 |
Java | Java | add default destination for @sendto methods | 72dec7d0fed80cf74139157690641096de23f41a | <ide><path>spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SendToMethodReturnValueHandler.java
<ide> public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
<ide>
<ide> private final boolean annotationRequired;
<ide>
<add> private String defaultDestinatio... | 3 |
Python | Python | use keywords instead of args | ef5d4ed17c4d38148f357ecfa15f42b763a49b39 | <ide><path>celery/app/base.py
<ide> from celery.local import PromiseProxy, maybe_evaluate
<ide> from celery.utils.functional import first
<ide> from celery.utils.imports import instantiate, symbol_by_name
<add>from celery.utils.objects import mro_lookup
<ide>
<ide> from .annotations import prepare as prepare_annotatio... | 2 |
Ruby | Ruby | use variations hash when installing from api | 7392f9811e6c5a03038b336d9560c6fa1d76682d | <ide><path>Library/Homebrew/formulary.rb
<ide> def self.load_formula_from_api(name, flags:)
<ide> class_s = Formulary.class_s(name)
<ide> json_formula = Homebrew::API::Formula.all_formulae[name]
<ide>
<add> bottle_tag = Utils::Bottles.tag.to_s
<add> if json_formula.key?("variations") && json_formula["var... | 2 |
Javascript | Javascript | commit lint fixes for the api | 07266b7e432489f757250b395ef52e3c93da4678 | <ide><path>api-server/common/models/User-Identity.js
<ide> export default function(UserIdent) {
<ide> return identity
<ide> ? Observable.of(identity.user())
<ide> : User.findOne$({ where: { email } }).flatMap(user => {
<del> return user
<del> ? Observabl... | 17 |
Ruby | Ruby | fix broken condition | dd9b317e245670ac06610e4f69bbba98e224b851 | <ide><path>Library/Homebrew/cmd/audit.rb
<ide> def audit_python
<ide> end
<ide>
<ide> # Checks that apply only to code in def caveats
<del> if text =~ /(\s*)def\s+caveats((.*\n)*?)(\1end)/ || /(\s*)def\s+caveats;(.*?)end/
<add> if text =~ /(\s*)def\s+caveats((.*\n)*?)(\1end)/ || text =~ /(\s*)def\s+cavea... | 1 |
Text | Text | give credit to browserstack in readme | f5b1875ce909a6122f6cd3cb2b6abd9760e02372 | <ide><path>README.md
<ide> Ember.js also provides access to the most advanced features of JavaScript, HTML
<ide> # Contribution
<ide>
<ide> See [CONTRIBUTING.md](https://github.com/emberjs/ember.js/blob/master/CONTRIBUTING.md)
<add>
<add>---
<add>
<add>Cross-browser testing provided by:
<add>
<add><a href="http://brow... | 1 |
Javascript | Javascript | remove var in reactandroid/src/androidtest | 0beb1cc55deff20061e5bccbb6a6f2561be79250 | <ide><path>ReactAndroid/src/androidTest/js/ProgressBarTestModule.js
<ide>
<ide> 'use strict';
<ide>
<del>var BatchedBridge = require('BatchedBridge');
<del>var React = require('React');
<del>var ProgressBar = require('ProgressBarAndroid');
<del>var View = require('View');
<add>const BatchedBridge = require('BatchedBr... | 10 |
PHP | PHP | fix coding standards | 480c1bbb54d9bdf5d2af024c50037169ec53192b | <ide><path>lib/Cake/Test/Case/AllTestsTest.php
<ide> public static function suite() {
<ide> $suite->addTestFile($path . 'Model' . DS . 'ModelTest.php');
<ide> $suite->addTestFile($path . 'AllRoutingTest.php');
<ide> $suite->addTestFile($path . 'AllNetworkTest.php');
<del> $suite->addTestFile($path . 'AllTestSuit... | 3 |
Ruby | Ruby | add a truncate option | 2b847959f098414fb12600535b5f0ab584a11e40 | <ide><path>Library/Homebrew/utils.rb
<ide> def ohai(title, *sput)
<ide> puts sput
<ide> end
<ide>
<del>def oh1(title)
<del> title = Tty.truncate(title) if $stdout.tty? && !ARGV.verbose?
<add>def oh1(title, options = {})
<add> if $stdout.tty? && !ARGV.verbose? && options.fetch(:truncate, :auto) == :auto
<add> ti... | 1 |
Text | Text | add onleave to legend config docs | b36d55d0936bf591d5ab58ae3d6a076f8f2d62e1 | <ide><path>docs/configuration/legend.md
<ide> The legend configuration is passed into the `options.legend` namespace. The glob
<ide> | `fullWidth` | `boolean` | `true` | Marks that this box should take the full width of the canvas (pushing down other boxes). This is unlikely to need to be changed in day-to-day use.
<id... | 1 |
Text | Text | update incremental adoption documentation. | d47d83d88dc8db43e4b974f8a124794a8e5c9f72 | <ide><path>docs/migrating/incremental-adoption.md
<ide> description: Learn different strategies for incrementally adopting Next.js into
<ide> </ul>
<ide> </details>
<ide>
<del>Next.js has been designed from the start for gradual adoption. You can use as much (or as little) React as you need. By starting small and in... | 1 |
Text | Text | fix typo in esm.md | 75cc41e4c89778c0955037da8626b77e6e712073 | <ide><path>doc/api/esm.md
<ide> Alterantively `module.createRequire()` can be used.
<ide>
<ide> Native modules are not currently supported with ES module imports.
<ide>
<del>The can instead be loaded with [`module.createRequire()`][] or
<add>They can instead be loaded with [`module.createRequire()`][] or
<ide> [`proc... | 1 |
Python | Python | change dag audit log sort by date from asc to desc | 8b928b4172c7d3abb42c141a8d874e85639decf8 | <ide><path>airflow/www/views.py
<ide> def audit_log(self, dag_id: str, session=None):
<ide>
<ide> current_page = request.args.get('page', default=0, type=int)
<ide> arg_sorting_key = request.args.get('sorting_key', 'dttm')
<del> arg_sorting_direction = request.args.get('sorting_direction', defau... | 1 |
Python | Python | add regression test for | dcff10abe98c844f2f66ff22835c9eb8ea8e7138 | <ide><path>spacy/tests/regression/test_issue1281.py
<add># coding: utf8
<add>from __future__ import unicode_literals
<add>
<add>import pytest
<add>
<add>
<add>@pytest.mark.parametrize('text', [
<add> "She hasn't done the housework.",
<add> "I haven't done it before.",
<add> "you daren't do that"])
<add>def tes... | 1 |
PHP | PHP | fix cs errors | 699a9535dc09d324b8b83fd031492730c7ce630d | <ide><path>src/Http/MiddlewareQueue.php
<ide> public function count(): int
<ide> * @return void
<ide> * @see \SeekableIterator::seek()
<ide> */
<del> public function seek($position) {
<add> public function seek($position)
<add> {
<ide> if (!isset($this->queue[$position])) {
<ide> ... | 1 |
PHP | PHP | clarify deprecation warning | c09687df6b37902ad1c75d3238a33e14ca5236a2 | <ide><path>src/Event/EventDispatcherTrait.php
<ide> trait EventDispatcherTrait
<ide> *
<ide> * @param \Cake\Event\EventManager|null $eventManager the eventManager to set
<ide> * @return \Cake\Event\EventManager
<del> * @deprecated 3.5.0 Use getter/setter instead.
<add> * @deprecated 3.5.0 Use get... | 1 |
Python | Python | fix numpy by including negative shifts | 60981410a6be95db211491e76190259ca41b03a0 | <ide><path>numpy/core/numeric.py
<ide> def roll(a, shift, axis=None):
<ide> >>> x = np.arange(10)
<ide> >>> np.roll(x, 2)
<ide> array([8, 9, 0, 1, 2, 3, 4, 5, 6, 7])
<del>
<add> >>> np.roll(x, -2)
<add> array([2, 3, 4, 5, 6, 7, 8, 9, 0, 1])
<ide> >>> x2 = np.reshape(x, (2,5))
<ide> >>> x2
<ide... | 1 |
Python | Python | remove leftover statement | d1f6530b8c7bf02bc8a79131253a384fbfd0dafe | <ide><path>celery/concurrency/processes/pool.py
<ide> def on_state_change(task):
<ide> on_state_change(task)
<ide> join_exited_workers()
<ide>
<del> job, i, obj = task
<del> try:
<del> cache[job]._set(i, obj)
<del> except KeyError:
<del> ... | 1 |
Go | Go | fix the driver name empty case | 6c78edaf7f22bfe3bd731855f767b9fa3c7d8549 | <ide><path>volume/store/store.go
<ide> func (s *VolumeStore) create(name, driverName string, opts map[string]string) (v
<ide> }
<ide> }
<ide>
<del> logrus.Debugf("Registering new volume reference: driver %q, name %q", driverName, name)
<ide> vd, err := volumedrivers.GetDriver(driverName)
<add>
<ide> if err != nil... | 1 |
Javascript | Javascript | fix typo in orderedmap | 6c3c643c8e63f3cd2319e4e1e53a6b8627724062 | <ide><path>src/utils/OrderedMap.js
<ide> var NO_EXIST = 'NO_EXIST';
<ide> if (__DEV__) {
<ide> ARRAY_MUST_CB =
<ide> 'If providing an array to an OrderedMap constructor, you must provide ' +
<del> 'a callback that may determine the uniqueue key for each entry. ' +
<add> 'a callback that may determine the un... | 1 |
Javascript | Javascript | handle errors thrown in nested error handlers | 29cd0f2a77faa3b2a746e64e4871cded32e8aa98 | <ide><path>src/node.js
<ide> var caught = false;
<ide> if (process.domain) {
<ide> var domain = process.domain;
<add> var domainModule = NativeModule.require('domain');
<add> var domainStack = domainModule._stack;
<ide>
<ide> // ignore errors on disposed domains.
<ide> ... | 2 |
Python | Python | support sentinel with ssl" | 0fa4db8889325fd774f7e89ebb219a87fc1d8cfb | <ide><path>celery/backends/redis.py
<ide> class RedisBackend(BaseKeyValueStoreBackend, AsyncBackendMixin):
<ide>
<ide> #: :pypi:`redis` client module.
<ide> redis = redis
<del> connection_class_ssl = redis.SSLConnection if redis else None
<ide>
<ide> #: Maximum number of connections in the pool.
<ide> ... | 2 |
Python | Python | remove redundant coverage | 6730ecdd3c92f068ddb598812c90baddd4ff22c7 | <ide><path>tests/test_tokenization_common.py
<ide> def test_get_vocab(self):
<ide> self.assertIsInstance(vocab, dict)
<ide> self.assertEqual(len(vocab), len(tokenizer))
<ide>
<del> for word, ind in vocab.items():
<del> self.assertEqual(tokenizer.convert... | 1 |
Go | Go | remove extra args in testexitcode | 4b80ec9aae2f43e831de64f3746c7838252e9203 | <ide><path>integration/container_test.go
<ide> func TestExitCode(t *testing.T) {
<ide>
<ide> trueContainer, _, err := runtime.Create(&docker.Config{
<ide> Image: GetTestImage(runtime).ID,
<del> Cmd: []string{"/bin/true", ""},
<add> Cmd: []string{"/bin/true"},
<ide> }, "")
<ide> if err != nil {
<ide> t.Fat... | 1 |
Java | Java | fix modal when the activity is paused or resumed | a0562c7ccffea7d001499ce8e431ede5249cab5e | <ide><path>ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java
<ide> public Class<? extends LayoutShadowNode> getShadowNodeClass() {
<ide> @Override
<ide> public void onDropViewInstance(ReactModalHostView view) {
<ide> super.onDropViewInstance(view);
<del> view.dismiss();
<ad... | 2 |
Go | Go | fix some typos | 70f1910a8bbeb3727829070a2454a636a91e2d48 | <ide><path>pkg/term/winconsole/term_emulator_test.go
<ide> func TestAssertEqualBytesNegative(t *testing.T) {
<ide> AssertBytesEqual(t, []byte{1, 2, 3}, []byte{1, 1, 1}, "content mismatch")
<ide> }*/
<ide>
<del>// Checks that the calls recieved
<add>// Checks that the calls received
<ide> func assertHandlerOutput(t *t... | 1 |
PHP | PHP | remove deprecated code for association classes | 5d0ffb15be3a30d57b511617e3a6fff6cf9ab9e9 | <ide><path>src/ORM/Association.php
<ide> public function getName()
<ide> return $this->_name;
<ide> }
<ide>
<del> /**
<del> * Sets the name for this association.
<del> *
<del> * @deprecated 3.4.0 Use setName()/getName() instead.
<del> * @param string|null $name Name to be assigned
<del> ... | 10 |
Javascript | Javascript | fix reference urls in animated | f8fc90546cd75c271b4d10a5f5a16f26998af645 | <ide><path>Libraries/Animated/AnimatedImplementation.js
<ide> const event = function (
<ide> * If additional transforms are added, be sure to include them in
<ide> * AnimatedMock.js as well.
<ide> *
<del> * See https://reactnative.dev/docs/animated.html
<add> * See https://reactnative.dev/docs/animated
<ide> */
<id... | 4 |
Python | Python | remove duplicated code in iotools.py | 37214699e18b55b51a3cda5fcaf64ba31c32990c | <ide><path>numpy/lib/_iotools.py
<ide> def __call__(self, value):
<ide> return self._callingfunction(value)
<ide> #
<ide>
<add> def _do_upgrade(self):
<add> # Raise an exception if we locked the converter...
<add> if self._locked:
<add> errmsg = "Converter is locked and cannot b... | 1 |
Ruby | Ruby | permit glibc 2.27, 2.31, or 2.35 | 7d1197e8eb938f30c3db9a8754c5557a8c08ed5c | <ide><path>Library/Homebrew/formula_auditor.rb
<ide> def audit_postgresql
<ide>
<ide> def audit_glibc
<ide> return unless @core_tap
<del> return if formula.name != "glibc" || [OS::CI_GLIBC_VERSION, "2.35"].include?(formula.version.to_s)
<add> return if formula.name != "glibc"
<add> return if [... | 1 |
Ruby | Ruby | add version class | 104fc0e09b8bfe825a0fecd71a971677cb11c271 | <ide><path>Library/Homebrew/version.rb
<add>class Version
<add> include Comparable
<add>
<add> def initialize val
<add> return val if val.is_a? Version or val.nil?
<add> @version = val.to_s.strip
<add> end
<add>
<add> def nums
<add> @version.scan(/\d+/).map { |d| d.to_i }
<add> end
<add>
<add> def <=>(ot... | 1 |
Text | Text | remove obsolete i18n links from guides [ci skip] | 71a3e6634c654b245d2e0b4b1074340dd746d6ad | <ide><path>guides/source/i18n.md
<ide> Conclusion
<ide>
<ide> At this point you should have a good overview about how I18n support in Ruby on Rails works and are ready to start translating your project.
<ide>
<del>If you find anything missing or wrong in this guide, please file a ticket on our [issue tracker](http://... | 1 |
Ruby | Ruby | fix tests when preserving timezones | b782665cbb55260bfdfc19c366c5fbc4ddd6fb12 | <ide><path>activesupport/test/core_ext/date_time_ext_test.rb
<ide> def test_to_datetime
<ide> def test_to_time
<ide> with_env_tz 'US/Eastern' do
<ide> assert_instance_of Time, DateTime.new(2005, 2, 21, 10, 11, 12, 0).to_time
<del> assert_equal Time.local(2005, 2, 21, 5, 11, 12), DateTime.new(2005, 2, 2... | 2 |
Go | Go | fix a panic in handling forwarded queries | 6a96717344a782c136eb03d642766e02eaba4519 | <ide><path>libnetwork/resolver.go
<ide> func (r *resolver) ServeDNS(w dns.ResponseWriter, query *dns.Msg) {
<ide> extConn net.Conn
<ide> resp *dns.Msg
<ide> err error
<add> writer dns.ResponseWriter
<ide> )
<ide>
<ide> if query == nil || len(query.Question) == 0 {
<ide> func (r *resolver) ServeDNS(w d... | 1 |
Javascript | Javascript | assign timeoutid to avoid multiple requests | 6df050e726b324dff9d92af8712dccc0121b96dd | <ide><path>src/devtools/views/Components/SelectedElement.js
<ide> function useInspectedElement(id: number | null): InspectedElement | null {
<ide> // Ask for an update in a second.
<ide> // Make sure we only ask once though.
<ide> clearTimeout(((timeoutID: any): TimeoutID));
<del> setTimeout(send... | 1 |
Python | Python | simplify stat collecting for process tree | 0c494fd3782ddd32e47f3ce600012d474d43ea6c | <ide><path>glances/core/glances_processes.py
<ide> def __init__(self, cache_timeout=60):
<ide> # Whether or not to hide kernel threads
<ide> self.no_kernel_threads = False
<ide>
<add> self.process_tree = None
<add>
<ide> def enable(self):
<ide> """Enable process stats."""
<ide> ... | 1 |
Javascript | Javascript | add support for custom files in bugreporting | 610cfdc8198133bc89e6977193c2d7b217b03e61 | <ide><path>Libraries/BugReporting/BugReporting.js
<ide>
<ide> const BugReportingNativeModule = require('NativeModules').BugReporting;
<ide> const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
<add>const Map = require('Map');
<ide>
<ide> import type EmitterSubscription from 'EmitterSubscription';
<ide>
<i... | 1 |
Python | Python | fix ticket #252 | 44b8093162207cf82143b58d9cdf5a2af7ed0731 | <ide><path>numpy/oldnumeric/alter_code1.py
<ide>
<ide> def fixtypechars(fstr):
<ide> for name in _func2 + _func4 + _meth1:
<del> fstr = func2_re[name].sub('\\1B\\2',fstr)
<add> fstr = func_re[name].sub('\\1B\\2',fstr)
<ide> for char in _chars.keys():
<ide> fstr = meth_re[char].sub('\\1%s\... | 1 |
Javascript | Javascript | remove redundant function | 4ae320f2b3c745402955019d6a57a22ee2b8d3bd | <ide><path>lib/path.js
<ide> function isWindowsDeviceRoot(code) {
<ide> }
<ide>
<ide> // Resolves . and .. elements in a path with directory names
<del>function normalizeStringWin32(path, allowAboveRoot) {
<add>function normalizeString(path, allowAboveRoot, separator) {
<ide> var res = '';
<ide> var lastSegmentLen... | 1 |
Javascript | Javascript | fix win32 parse() | 4717ea9186eb3995b5b317f223f6b516c6182197 | <ide><path>lib/path.js
<ide> const win32 = {
<ide> isAbsolute = true;
<ide>
<ide> code = path.charCodeAt(1);
<add> rootEnd = 1;
<ide> if (code === 47/*/*/ || code === 92/*\*/) {
<del> rootEnd = 1;
<ide> // Matched double path separator at beginning
<ide> var ... | 2 |
Go | Go | ignore kernel-memory on api >= 1.42 | 2597a7162360ef56001a1764d0cb53b51b912d8f | <ide><path>client/container_create.go
<ide> func (cli *Client) ContainerCreate(ctx context.Context, config *container.Config
<ide> if err := cli.NewVersionError("1.25", "stop timeout"); config != nil && config.StopTimeout != nil && err != nil {
<ide> return response, err
<ide> }
<del>
<del> clientVersion := cli.Cli... | 1 |
Javascript | Javascript | fix buggy getttyfd() implementation | 1af82f3d0e13a175c424017565189fffb2f49e83 | <ide><path>test/sequential/test-async-wrap-getasyncid.js
<ide> if (common.hasCrypto) { // eslint-disable-line crypto-check
<ide> // Do our best to grab a tty fd.
<ide> function getTTYfd() {
<ide> const tty = require('tty');
<del> let tty_fd = 0;
<del> if (!tty.isatty(tty_fd)) tty_fd++;
<del> else if (!... | 1 |
PHP | PHP | add return type into phpdoc | da09db73f3c3b4ecf788870896d84c73cd574107 | <ide><path>src/Illuminate/Database/Query/Builder.php
<ide> public function insertGetId(array $values, $sequence = null)
<ide> *
<ide> * @param array $columns
<ide> * @param \Closure|\Illuminate\Database\Query\Builder|string $query
<add> * @return bool
<ide> */
<ide> public function insertS... | 1 |
Javascript | Javascript | adjust code style | ace8e6b56d7e621619564ab23da423378f9944fb | <ide><path>examples/js/animation/MMDAnimationHelper.js
<ide> THREE.MMDAnimationHelper = ( function () {
<ide>
<ide> if ( this.currentTime < this.delayTime ) return false;
<ide>
<del> if ((this.currentTime - this.delayTime) > this.audioDuration) return false;
<add> if ( ( this.currentTime - this.delayTime ) ... | 1 |
Javascript | Javascript | prepare files for no-var lint rule | 49547abe99678bf090f666663efdd7f9292758fe | <ide><path>lib/internal/crypto/util.js
<ide> function lazyRequire(name) {
<ide> return ret;
<ide> }
<ide>
<del>var defaultEncoding = 'buffer';
<add>let defaultEncoding = 'buffer';
<ide>
<ide> function setDefaultEncoding(val) {
<ide> defaultEncoding = val;
<ide><path>lib/internal/dns/promises.js
<ide> function onl... | 3 |
PHP | PHP | snake function | 4ef2c071dcf7a6cdffdcc9e0a4e6a5d90ebf88d4 | <ide><path>src/Illuminate/Support/Str.php
<ide> public static function slug($title, $separator = '-')
<ide> *
<ide> * @param string $value
<ide> * @param string $delimiter
<add> * @param bool $each
<ide> * @return string
<ide> */
<del> public static function snake($value, $delimiter = '_')
<add> publ... | 2 |
PHP | PHP | remove deprecation code | 4251cbe1d1ca00459906715e781c081e37c253b4 | <ide><path>src/Core/Plugin.php
<ide> class Plugin
<ide> *
<ide> * - `bootstrap` - array - Whether or not you want the $plugin/config/bootstrap.php file loaded.
<ide> * - `routes` - boolean - Whether or not you want to load the $plugin/config/routes.php file.
<del> * - `ignoreMissing` - boolean - Set ... | 5 |
Ruby | Ruby | fix version mapping | 05b496194af2340826bc9d33ee8118186b1e6487 | <ide><path>Library/Homebrew/test/unversioned_cask_checker_spec.rb
<ide> ["1.0", "1"] => "1.0",
<ide> ["1.0", "0"] => "1.0",
<ide> ["1.2.3.4000", "4000"] => "1.2.3.4000",
<add> ["5", "5.0.45"] => "5.0.45",
<ide> }
<ide>
<ide> expected_mappings.each do |(short_ve... | 2 |
Text | Text | add comments and update callback arguments' names | a30982e862e241a4f4615211ef0c14543a77b1e2 | <ide><path>guide/english/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-reduce-method-to-analyze-data/index.md
<ide> var watchList = [
<ide> ];
<ide>
<ide> // Add your code below this line
<del>
<del>var averageRating = watchList.filter(x => x.Director === "Christopher Nolan").... | 1 |
PHP | PHP | add defualt value | 7642f12d7199456e5bf634a3e449023e3ee0160d | <ide><path>src/Illuminate/Validation/Validator.php
<ide> public function extractValuesForWildcards($data, $attribute)
<ide> * @param string|array $rules
<ide> * @return $this
<ide> */
<del> public function mergeRules($attribute, $rules)
<add> public function mergeRules($attribute, $rules = [])
<i... | 1 |
Go | Go | add support for external cas | 11085b2260a78b3248f3e98e0a1e3203431fae22 | <ide><path>api/client/swarm/opts.go
<ide> package swarm
<ide>
<ide> import (
<add> "encoding/csv"
<add> "errors"
<ide> "fmt"
<ide> "strings"
<ide> "time"
<ide> const (
<ide> flagListenAddr = "listen-addr"
<ide> flagSecret = "secret"
<ide> flagTaskHistoryLimit = "task-history-limit"
<add>... | 3 |
Go | Go | remove osversion from oci | 72de562943a9bfbc44d24c80dfc9d0dc112ab0f4 | <ide><path>daemon/oci_windows.go
<ide> func (daemon *Daemon) createSpec(c *container.Container) (*libcontainerd.Spec, e
<ide> return nil, fmt.Errorf("Failed to graph.Get on ImageID %s - %s", c.ImageID, err)
<ide> }
<ide>
<del> s.Platform.OSVersion = img.OSVersion
<del>
<ide> // In base spec
<ide> s.Hostname = c.F... | 6 |
Javascript | Javascript | make repl test pass in coverage mode | 61567299e79525e82f4942fb1941e61c633f551f | <ide><path>test/parallel/test-repl-tab-complete.js
<ide> const editor = repl.start({
<ide> editorStream.run(['.clear']);
<ide> editorStream.run(['.editor']);
<ide>
<del>editor.completer('co', common.mustCall((error, data) => {
<del> assert.deepStrictEqual(data, [['con'], 'co']);
<add>editor.completer('Uin', common.mu... | 1 |
Javascript | Javascript | add comments to pmrem generator and packer | f053a9268ce175aeccdbb67d9fe0dbc4a864597a | <ide><path>examples/js/pmrem/PMREMCubeUVPacker.js
<ide> /**
<ide> * @author Prashant Sharma / spidersharma03
<ide> * @author Ben Houston / bhouston, https://clara.io
<add> *
<add> * This class takes the cube lods(corresponding to different roughness values), and creates a single cubeUV
<add> * Texture. The format for... | 2 |
Ruby | Ruby | use same weekday correspondance as date#wday | dd7f8ca3cd18086b012715ba88fc2fb9f153c9ac | <ide><path>activesupport/lib/active_support/core_ext/date_and_time/calculations.rb
<ide> module DateAndTime
<ide> module Calculations
<ide> DAYS_INTO_WEEK = {
<del> monday: 0,
<del> tuesday: 1,
<del> wednesday: 2,
<del> thursday: 3,
<del> friday: 4,
<del> saturday: 5,
<del> sund... | 1 |
Text | Text | add angle brackets around implicit links | 7183d70273d8fad1d33233d5737a076e40bacd8c | <ide><path>BUILDING.md
<ide> For use of AVX2,
<ide> * nasm version 2.10 or higher in Windows
<ide>
<ide> Please refer to
<del> https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_ia32cap.html for details.
<add> <https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_ia32cap.html> for details.
<ide>
<ide> If compiling wit... | 15 |
Ruby | Ruby | fix problem with accessing constant proxy subclass | 48c0abb4748c30adeecc17058f0220e87bcbe84a | <ide><path>activesupport/lib/active_support/deprecation/proxy_wrappers.rb
<ide> def warn(callstack, called, args)
<ide> # # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead.
<ide> # (Backtrace information…)
<ide> # ["Mercury", "Venus", "Earth", "Mars", "Jupiter", ... | 2 |
Text | Text | fix zh_cn links | 8808b1cd0f11d9b33c977e9c6bad74c0baf158ba | <ide><path>threejs/lessons/zh_cn/threejs-fundamentals.md
<ide> import * as THREE from './resources/threejs/r122/build/three.module.js';
<ide> </script>
<ide> ```
<ide>
<del>拿到canvas后我们需要创建一个[WebGL渲染器(`WebGLRenderer`)](WebGLRenderer)。渲染器负责将你提供的所有数据渲染绘制到canvas上。之前还有其他渲染器,比如[CSS渲染器(`CSSRenderer`)](CSSRenderer)、[Canvas渲染器... | 1 |
Text | Text | add arch build instructions | 27423fcc157884c95ddd643515b3915c3a46027f | <ide><path>docs/build-instructions/linux.md
<ide> Ubuntu LTS 12.04 64-bit is the recommended platform.
<ide> * C++ toolchain
<ide> * on Ubuntu/Debian: `sudo apt-get install build-essential`
<ide> * on Fedora: `sudo yum --assumeyes install make gcc gcc-c++ glibc-devel`
<add> * on Arch: `sudo pacman -S base-... | 1 |
Ruby | Ruby | remove obsolete documentation [ci skip] | 065be937f27c25bc7d23e0dd35ad4aa84818b167 | <ide><path>activesupport/lib/active_support/core_ext/string/output_safety.rb
<ide> module Util
<ide> # A utility method for escaping HTML tag characters.
<ide> # This method is also aliased as <tt>h</tt>.
<ide> #
<del> # In your ERB templates, use this method to escape any unsafe content. For example:
<d... | 1 |
Text | Text | use lesson-builder v1.7.0 | b98e8ff2d9dbfe261f7320749a825410a306545e | <ide><path>threejs/lessons/fr/threejs-primitives.md
<ide> ou votre [BufferGeometry](threejs-custom-buffergeometry.html).
<ide>
<ide> Voyons maintenant l'article traitant sur [comment fonctionne un graphe de scène three.js et comment l'utiliser](threejs-scenegraph.html).
<ide>
<del><link rel="stylesheet" href="../reso... | 22 |
Javascript | Javascript | fix man pages linking regex | 66e6affb428efdfc8de1db4bd9d6dfd7984ebb44 | <ide><path>tools/doc/html.js
<ide> const BSD_ONLY_SYSCALLS = new Set(['lchmod']);
<ide> // '<a href="http://man7.org/linux/man-pages/man2/open.2.html">open(2)</a>'
<ide> function linkManPages(text) {
<ide> return text.replace(
<del> /\b([a-z.]+)\((\d)([a-z]?)\)/gm,
<del> (match, name, number, optionalCharacter)... | 1 |
Java | Java | update oss specs | e040a198e23c20d583041b520e2b01b7ce30ff07 | <ide><path>ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeImageEditorSpec.java
<add>/**
<add> * Copyright (c) Facebook, Inc. and its affiliates.
<add> *
<add> * <p>This source code is licensed under the MIT license found in the LICENSE file in the root
<add> * directory of this source tree.
<add> *
<add> *... | 2 |
Go | Go | remove nil check for slices | ace53bbe65d1384893027d046a5d4eae83bd60af | <ide><path>api/types/filters/parse.go
<ide> func (filters Args) MatchKVList(field string, sources map[string]string) bool {
<ide> return true
<ide> }
<ide>
<del> if sources == nil || len(sources) == 0 {
<add> if len(sources) == 0 {
<ide> return false
<ide> }
<ide>
<ide><path>pkg/archive/archive_linux.go
<ide> f... | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.