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 |
|---|---|---|---|---|---|
Text | Text | remove arrows from test name assertion | 891a64fa3dd8c8d950e0011c0eabf2690476b480 | <ide><path>curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/american-british-translator.md
<ide> async (getUserInput) => {
<ide> };
<ide> ```
<ide>
<del>The `/api/translate` route should handle the way time is written in American and British English. For example, ten thirty is written as "... | 1 |
Ruby | Ruby | extract method to share path expansion logic | cbceb78f38a1e51d02c19cd33f7299f3d0a79e95 | <ide><path>actionpack/lib/action_dispatch/testing/integration.rb
<ide> def process(method, path, params: nil, headers: nil, env: nil, xhr: false, as: n
<ide> request_encoder = RequestEncoder.encoder(as)
<ide>
<ide> if path =~ %r{://}
<del> location = URI.parse(path)
<del> http... | 1 |
Javascript | Javascript | allow dispatch many times without listener | b381bed10cf24a3009a9e805fbe4cea081d4590b | <ide><path>lib/internal/event_target.js
<ide> class EventTarget {
<ide> }
<ide>
<ide> const root = this[kEvents].get(type);
<del> if (root === undefined || root.next === undefined)
<add> if (root === undefined || root.next === undefined) {
<add> if (event !== undefined)
<add> event[kIsBeingDi... | 2 |
Python | Python | fix calls to pricing | 04b29e1454fafd148b2b19bc5571ee534eceb741 | <ide><path>libcloud/test/test_pricing.py
<ide> def test_get_gce_image_price_non_premium_image(self):
<ide> image_name = "debian-10-buster-v20220519"
<ide> cores = 4
<ide> size_name = "c2d-standard-4"
<del> price = libcloud.pricing.get_gce_image_price(image_name, size_name, cores)
<add> ... | 1 |
Python | Python | use a name that exists in both python2 and 3, | c7734491f87ac711ff5d749213e8cac0adb3686b | <ide><path>tests/modeltests/custom_pk/fields.py
<ide> def __init__(self, *args, **kwargs):
<ide> def pre_save(self, instance, add):
<ide> value = getattr(instance, self.attname, None)
<ide> if not value:
<del> value = MyWrapper(''.join(random.sample(string.lowercase, 10)))
<add> ... | 1 |
PHP | PHP | return new static instance instead of collection | f703cf23b120b5b5338f57b4841a565d69765ce3 | <ide><path>src/Illuminate/Support/Collection.php
<ide> public function values()
<ide> */
<ide> public function fetch($key)
<ide> {
<del> return new Collection(array_fetch($this, $key));
<add> return new static(array_fetch($this, $key));
<ide> }
<ide>
<ide> /**
<ide> public function collapse()
<ide> $results... | 1 |
Javascript | Javascript | remove unused eslint directive | 93d5ac9a311282517a03b47ca9b54be7847aef0f | <ide><path>src/scales/scale.time.js
<del>/* global window: false */
<ide> 'use strict';
<ide>
<ide> var adapter = require('../core/core.adapters')._date; | 1 |
Go | Go | fix typos in nsinit logs | 0aacca3ae6fa7d46a3e2c4e60e71f67c9a4c64e5 | <ide><path>pkg/libcontainer/nsinit/exec.go
<ide> func (ns *linuxNs) Exec(container *libcontainer.Container, term Terminal, args [
<ide> if err != nil {
<ide> return -1, err
<ide> }
<del> ns.logger.Printf("writting pid %d to file\n", command.Process.Pid)
<add> ns.logger.Printf("writing pid %d to file\n", command.Pro... | 2 |
Go | Go | use checker assert for docker_api_build_test.go | 253f975fdbc13bc8a84fba1a3f8a4e518cb86d8e | <ide><path>integration-cli/docker_api_build_test.go
<ide> import (
<ide> "archive/tar"
<ide> "bytes"
<ide> "net/http"
<del> "strings"
<ide>
<add> "github.com/docker/docker/pkg/integration/checker"
<ide> "github.com/go-check/check"
<ide> )
<ide>
<ide> func (s *DockerSuite) TestBuildApiDockerfilePath(c *check.C) {
... | 1 |
Ruby | Ruby | add forgotten testcase | ccadfc36953a8547dc9386eb77eb4fc1147817f3 | <ide><path>activesupport/test/core_ext/pathname_test.rb
<add>require 'test/unit'
<add>require File.dirname(__FILE__) + '/../../lib/active_support/core_ext/pathname'
<add>
<add>class TestPathname < Test::Unit::TestCase
<add>
<add> def test_clean_within
<add> assert_equal "Hi", Pathname.clean_within("Hi")
<add> ... | 1 |
Text | Text | enable docker socket and service on fedora | 7a93a87c1a254abbf8e68093d4be241097694bb1 | <ide><path>docs/installation/linux/fedora.md
<ide> There are two ways to install Docker Engine. You can install with the `dnf` pac
<ide>
<ide> $ sudo dnf install docker-engine
<ide>
<del>5. Start the Docker daemon.
<add>5. Enable the socket and service.
<add>
<add> $ sudo systemctl enable docker.socket dock... | 1 |
Ruby | Ruby | fix typo on form_tag_helper.rb | eab2b999edb167a0e4a373671009ffbbc5707295 | <ide><path>actionpack/lib/action_view/helpers/form_tag_helper.rb
<ide> def text_field_tag(name, value = nil, options = {})
<ide> # # => <label for="name">Name</label>
<ide> #
<ide> # label_tag 'name', 'Your name'
<del> # # => <label for="name">Your Name</label>
<add> # # => <label fo... | 1 |
Python | Python | add attachment support in emailoperator | d4fa61ad1a6a33798700c421fc04cb7b3ffdb5ee | <ide><path>airflow/operators/email_operator.py
<ide> class EmailOperator(BaseOperator):
<ide> :param html_content: content of the email (templated), html markup
<ide> is allowed
<ide> :type html_content: string
<add> :param files: file names to attach in email
<add> :type files: list
<ide> """... | 2 |
Javascript | Javascript | change reactid.attr_name to "data-reactid" | 67cf44e7c18e068e3f39462b7ac7149eee58d3e5 | <ide><path>src/core/ReactID.js
<ide>
<ide> var invariant = require('invariant');
<ide> var ReactMount = require('ReactMount');
<del>var ATTR_NAME = 'id';
<add>var ATTR_NAME = 'data-reactid';
<ide> var nodeCache = {};
<ide>
<ide> /**
<ide> function getNode(id) {
<ide> }
<ide>
<ide> return nodeCache[id] =
<del> ... | 2 |
Javascript | Javascript | improve tick width for vertical bars | 6bb6e5aa4b110bf4f084747691b145a1caefb63a | <ide><path>src/controllers/controller.bar.js
<ide> module.exports = function(Chart) {
<ide>
<ide> // Appearance
<ide> base: reset ? yScalePoint : this.calculateBarBase(this.index, index),
<del> width: this.calculateBarWidth(numBars),
<add> width: this.calculateBarWidth(index),
<ide> backgroundCo... | 1 |
Javascript | Javascript | add a fallback component name for warnings | dcbb4301f0a505c8bac72f7beac1604869a3846a | <ide><path>packages/react-reconciler/src/ReactFiberClassComponent.js
<ide> export default function(
<ide> shouldUpdate !== undefined,
<ide> '%s.shouldComponentUpdate(): Returned undefined instead of a ' +
<ide> 'boolean value. Make sure to return true or false.',
<del> getCompon... | 1 |
PHP | PHP | apply fixes from styleci | c22ac4bcb9ed425d599827e89ba274c4ae58f6c9 | <ide><path>tests/Support/SupportCollectionTest.php
<ide> public function testGroupByMultiLevelAndClosurePreservingKeys()
<ide> 'skilllevel',
<ide> function ($item) {
<ide> return $item['roles'];
<del> }
<add> },
<ide> ], true);
<ide>
<ide> $... | 1 |
Ruby | Ruby | remove unnecessary begin block | e887232b7ec991e451e7dfc7ee23d6d91c023958 | <ide><path>Library/Homebrew/macos.rb
<ide> def xctoolchain_path
<ide>
<ide> def sdk_path(v = version)
<ide> (@sdk_path ||= {}).fetch(v.to_s) do
<del> @sdk_path[v.to_s] = begin
<del> opts = []
<del> # First query Xcode itself
<del> opts << `#{locate('xcodebuild')} -version -sdk macosx#{v... | 1 |
Text | Text | add version metadata to timers/promises | 2f49720beee7f4c03a75c3793bf76e76cf044bc3 | <ide><path>doc/api/timers.md
<ide> added: v0.0.1
<ide> Cancels a `Timeout` object created by [`setTimeout()`][].
<ide>
<ide> ## Timers Promises API
<add><!-- YAML
<add>added: v15.0.0
<add>-->
<ide>
<ide> > Stability: 1 - Experimental
<ide>
<ide> const timersPromises = require('timers/promises');
<ide> ```
<ide>
<id... | 1 |
Ruby | Ruby | handle invalid signed blob ids gracefully | af0caadb8d9781770399c1804976af4a71d1313b | <ide><path>activestorage/app/controllers/active_storage/blobs_controller.rb
<ide> # security-through-obscurity factor of the signed blob references, you'll need to implement your own
<ide> # authenticated redirection controller.
<ide> class ActiveStorage::BlobsController < ActionController::Base
<add> include ActiveSt... | 7 |
PHP | PHP | rewrite redis job to one json_decode() | daa49838d9557c526e28abd75f1825f8c05dd998 | <ide><path>src/Illuminate/Queue/Jobs/RedisJob.php
<ide> class RedisJob extends Job implements JobContract
<ide> protected $redis;
<ide>
<ide> /**
<del> * The Redis job payload.
<add> * The Redis raw job payload.
<ide> *
<ide> * @var string
<ide> */
<ide> protected $job;
<ide>
<add> ... | 2 |
Python | Python | add pcg64dxsm to performance-measuring script | 781254a751e6a808c14544de5f010d8a8cfe5d2e | <ide><path>doc/source/reference/random/performance.py
<ide> import pandas as pd
<ide>
<ide> import numpy as np
<del>from numpy.random import MT19937, PCG64, Philox, SFC64
<add>from numpy.random import MT19937, PCG64, PCG64DXSM, Philox, SFC64
<ide>
<del>PRNGS = [MT19937, PCG64, Philox, SFC64]
<add>PRNGS = [MT19937, PC... | 1 |
Javascript | Javascript | use point.size() in getmaxoverflow | 91fec4a3970a91baa534c585f4301aebfb18ee37 | <ide><path>src/controllers/controller.bubble.js
<ide> export default class BubbleController extends DatasetController {
<ide> getMaxOverflow() {
<ide> const me = this;
<ide> const meta = me._cachedMeta;
<del> let i = (meta.data || []).length - 1;
<add> const data = meta.data;
<ide> let max = 0;
<del> for (; i... | 1 |
Ruby | Ruby | fix spelling error | 4be3c2c92fed516aca2fcb1ba9fc253bda580d25 | <ide><path>activeresource/lib/active_resource/base.rb
<ide> def timeout=(timeout)
<ide> @timeout = timeout
<ide> end
<ide>
<del> # Gets tthe number of seconds after which requests to the REST API should time out.
<add> # Gets the number of seconds after which requests to the REST API should tim... | 1 |
PHP | PHP | reduce line length | d0d30dd2730c177eb1001c2509b389c4ec22efdc | <ide><path>src/Illuminate/Console/Scheduling/Event.php
<ide> public function everyThirtyMinutes()
<ide> */
<ide> public function days($days)
<ide> {
<del> $this->spliceIntoPosition(5, implode(',', is_array($days) ? $days : func_get_args()));
<add> $days = is_array($days) ? $days : func_get_args();
<ide>
<del> r... | 1 |
Javascript | Javascript | use strings instead of arrays in cff.wrap | dae18a271007310ce07a2c2434fface62dcb8f16 | <ide><path>fonts.js
<ide> CFF.prototype = {
<ide> },
<ide>
<ide> wrap: function wrap(name, glyphs, charstrings, subrs, properties) {
<del> function stringToArray(str) {
<del> var array = [];
<del> for (var i = 0; i < str.length; ++i)
<del> array[i] = str.charCodeAt(i);
<add> var fields = {
<... | 1 |
Python | Python | fix bytes vs str issues in tests | 700147f601a881d756128e5e4d9aeb3a356cb7b2 | <ide><path>numpy/lib/tests/test_io.py
<ide>
<ide> from numpy.lib._iotools import ConverterError, ConverterLockError, \
<ide> ConversionWarning
<del>from numpy.compat import asbytes, asbytes_nested
<add>from numpy.compat import asbytes, asbytes_nested, bytes
<ide>
<ide> if sys.version_in... | 2 |
Mixed | Javascript | enable suspense + rename placeholder | 8af6728c6f105d37f9c0006288a6d1ac3903dc71 | <ide><path>fixtures/unstable-async/suspense/README.md
<ide> No. The APIs being tested here are unstable and some of them have still not been
<ide>
<ide> Clone the React repository.
<ide>
<del>First, open this file locally:
<del>
<del>* `packages/shared/ReactFeatureFlags.js` (make sure you didn't open a similarly name... | 30 |
PHP | PHP | implement parsed body methods | f79582299a20ddb4504a43b9e2d6fb2ea1b54d76 | <ide><path>src/Network/Request.php
<ide> public function withCookieParams(array $cookies)
<ide> return $new;
<ide> }
<ide>
<add> /**
<add> * Get the parsed request body data.
<add> *
<add> * If the request Content-Type is either application/x-www-form-urlencoded
<add> * or multipart/form... | 2 |
Javascript | Javascript | use passive events where possible | d584fcdc6e10b9f4d4e9eec775731e7ffc0fb501 | <ide><path>packages/react-events/src/Press.js
<ide> const targetEventTypes = [
<ide> 'pointerdown',
<ide> 'pointercancel',
<ide> ];
<del>const rootEventTypes = [
<del> {name: 'keyup', passive: false},
<del> {name: 'pointerup', passive: false},
<del> 'pointermove',
<del> 'scroll',
<del>];
<add>const rootEventTyp... | 1 |
PHP | PHP | fix bug with assigning middleware | a75a9cdadac503b7c2d6e03ccd5d67b38d25d6fc | <ide><path>src/Illuminate/Routing/Route.php
<ide> public function middleware($middleware = null)
<ide> $middleware = [$middleware];
<ide> }
<ide>
<del> $this->action['middleware'] = array_merge($this->action['middleware'], $middleware);
<add> $this->action['middleware'] = array_merge(... | 1 |
Python | Python | fix regularization in embedding | e8a6ae298d7fdbd5ad4e5fe25c2d5ff82d0178a3 | <ide><path>keras/layers/embeddings.py
<ide> class Embedding(Layer):
<ide> @input_dim: size of vocabulary (highest input integer + 1)
<ide> @out_dim: size of dense representation
<ide> '''
<del> def __init__(self, input_dim, output_dim, init='uniform', weights=None, W_regularizer=None, W_constrain... | 2 |
Javascript | Javascript | add inline cache to processmoduledependencies | c9f7567f1207813f5c61237af588f2d3d2dcb5cb | <ide><path>lib/Compilation.js
<ide> class Compilation {
<ide>
<ide> let currentBlock = module;
<ide>
<add> let factoryCacheKey;
<add> let factoryCacheValue;
<add> let listCacheKey;
<add> let listCacheValue;
<add>
<ide> const processDependency = dep => {
<ide> this.moduleGraph.setParents(dep, currentBlock, ... | 1 |
Python | Python | fix error message [ci skip] | 9bdc9e81f5f8affe464d1ff3c6bc35c08aa2a0d6 | <ide><path>spacy/cli/_util.py
<ide> def load_project_config(path: Path) -> Dict[str, Any]:
<ide> msg.fail(invalid_err, e, exits=1)
<ide> errors = validate(ProjectConfigSchema, config)
<ide> if errors:
<del> msg.fail(invalid_err, "\n".join(errors), exits=1)
<add> msg.fail(invalid_err)
<add>... | 1 |
Ruby | Ruby | use common terminology | 279c3957237b049dead8d95db81ea1ff665ee78c | <ide><path>actionpack/lib/action_dispatch/middleware/flash.rb
<ide> def flash
<ide>
<ide> # The flash provides a way to pass temporary objects between actions. Anything you place in the flash will be exposed
<ide> # to the very next action and then cleared out. This is a great way of doing notices and alerts, such... | 1 |
Javascript | Javascript | open universal nav links on the same tab | 2c3de17c746bdb9884af52da21af062b8f17ab31 | <ide><path>client/src/components/Header/components/NavLinks.js
<ide> function NavLinks({ displayMenu }) {
<ide> role='menu'
<ide> >
<ide> <li className='nav-news' role='menuitem'>
<del> <Link external={true} to='/news'>
<add> <Link external={true} sameTab={true} to='/news'>
<ide>... | 2 |
Python | Python | add depthwise conv2d for theano and cntk | cdbe1542d7b694d96e428fcba340fa82bc4cc8e5 | <ide><path>keras/applications/mobilenet.py
<ide> from ..layers import GlobalAveragePooling2D
<ide> from ..layers import GlobalMaxPooling2D
<ide> from ..layers import Conv2D
<add>from ..layers import DepthwiseConv2D
<ide> from .. import initializers
<ide> from .. import regularizers
<ide> from .. import constraints
<ide... | 7 |
PHP | PHP | fix cs issues | 7c95d16df8006e3fb95e0a2591c17fb02b6a0d8c | <ide><path>tests/TestCase/Core/Retry/CommandRetryTest.php
<ide> public function testExceedAttempts()
<ide> */
<ide> public function testRespectStrategy()
<ide> {
<del> $count = 0;
<del> $action = function () use (&$count) {
<add> $action = function () {
<ide> throw new Exce... | 2 |
Javascript | Javascript | rename a few things for clarity | d1aac46a5a5b5c6c7179342de7d6820efd6da8b7 | <ide><path>d3.js
<ide> })();
<ide> }
<ide> function d3_geo_projectionMutator(projectAt) {
<del> var project, rotate, rotation, projectRotate, k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, clip = d3_geo_cut, clipAngle = null, resample = d3_geo_resample(projectPoint);
<add> var pr... | 2 |
Javascript | Javascript | show error when hotonly hmr fails | 5345a38c36dec279fca9a938327925e13c6e5f25 | <ide><path>hot/only-dev-server.js
<ide> if(module.hot) {
<ide> console.warn("Ignored an update to declined module " + data.chain.join(" -> "));
<ide> },
<ide> onErrored: function(data) {
<add> console.error(data.error);
<ide> console.warn("Ignored an error while updating module " + data.moduleId +... | 1 |
Python | Python | resolve line-too-long in benchmarks | f9fb9b44cea161cea007a963aead676888281c6e | <ide><path>keras/benchmarks/benchmark_util.py
<ide> def generate_benchmark_params_cpu_gpu(*params_list):
<ide> *params_list: A list of tuples represents the benchmark parameters.
<ide>
<ide> Returns:
<del> A list of strings with the benchmark name extended with CPU and GPU suffix.
<add> A list of s... | 9 |
Java | Java | update webmvcconfigurer#addinterceptors javadoc | 627a9be65460dae2bd4c4050070fb721a6a70743 | <ide><path>spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurer.java
<ide> default void addFormatters(FormatterRegistry registry) {
<ide>
<ide> /**
<ide> * Add Spring MVC lifecycle interceptors for pre- and post-processing of
<del> * controller method invocations. Intercep... | 1 |
Javascript | Javascript | remove performwithpriority from scheduler | 7d77d795c2c647effbea40272de3834bb38f4e52 | <ide><path>src/renderers/noop/ReactNoopEntry.js
<ide> import type {UpdateQueue} from 'ReactFiberUpdateQueue';
<ide> var ReactFiberInstrumentation = require('ReactFiberInstrumentation');
<ide> var ReactFiberReconciler = require('ReactFiberReconciler');
<ide> var ReactInstanceMap = require('ReactInstanceMap');
<del>var {... | 3 |
Javascript | Javascript | fix logarithmicdepthbuffer bug | 856b01d8e398e89f066e67b6de2ba7a580a12f1c | <ide><path>src/renderers/webgl/WebGLCapabilities.js
<ide> function WebGLCapabilities( gl, extensions, parameters ) {
<ide>
<ide> }
<ide>
<del> var logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true && !! extensions.get( 'EXT_frag_depth' );
<add> var logarithmicDepthBuffer = parameters.logarithmicDep... | 1 |
Text | Text | fix changelog format | 13fd153429e337ad8b9690fcf00c1019037c917f | <ide><path>activesupport/CHANGELOG.md
<ide>
<ide> *Ricardo Díaz*
<ide>
<del>
<ide> * Fix modulo operations involving durations
<ide>
<ide> Rails 5.1 introduce an `ActiveSupport::Duration::Scalar` class as a wrapper | 1 |
Text | Text | fix invalid syntax | 50ecd8ad4059309d503fc6c0783fb8a80784965f | <ide><path>guide/english/python/lists/list-pop/index.md
<ide> If the index passed to the pop() method is not in the range, it throws IndexErro
<ide> ```py
<ide> cities = ['New York', 'Dallas', 'San Antonio', 'Houston', 'San Francisco'];
<ide>
<del>print "City popped is : ", cities.pop()
<del>print "City at index 2 is... | 1 |
Javascript | Javascript | add test for withcredentials option | 73273ccbe9baa4ca784c94c65b599978abcf1ee4 | <ide><path>test/unit/api_spec.js
<ide> describe('api', function() {
<ide> done.fail(reason);
<ide> });
<ide> });
<add>
<add> describe('Cross-origin', function() {
<add> var loadingTask;
<add> function _checkCanLoad(expectSuccess, filename, options) {
<add> if (isNodeJS()) {
<add> ... | 2 |
PHP | PHP | remove countable use and add trailing slash | 7f73b2dcd816e6c45ca65172011f8739ab210ba4 | <ide><path>src/Illuminate/Foundation/helpers.php
<ide> function trans($id = null, $parameters = [], $domain = 'messages', $locale = nul
<ide> * Translates the given message based on a count.
<ide> *
<ide> * @param string $id
<del> * @param int|array|Countable $number
<add> * @param int|array... | 2 |
Javascript | Javascript | replace multi line string with concat | c87bddf4b10a0f9fb5345306aa3f60dd2cabb058 | <ide><path>test/RawModule.test.js
<ide> describe("RawModule", () => {
<ide> });
<ide>
<ide> describe("readableIdentifier", () => {
<del> it("returns result of calling provided requestShortener\"s shorten method\
<del> on readableIdentifierStr attribute", () => {
<add> it("returns result of calling provided req... | 1 |
Ruby | Ruby | fix a variable name in error message (#190) | 967988c4441ed49338b8e31a1a5ff8a7f6061c88 | <ide><path>Library/Homebrew/extend/fileutils.rb
<ide> def run
<ide> # group_id.to_s makes OS X 10.6.7 (ruby-1.8.7-p174) and earlier happy.
<ide> chown(nil, group_id.to_s, tmpdir)
<ide> rescue Errno::EPERM
<del> opoo "Failed setting group \"#{Etc.getgrgid(group_id).name}\" on #{tmp}"
<add> ... | 1 |
Ruby | Ruby | remove redundant curlies from hash arguments | 411ccbdab2608c62aabdb320d52cb02d446bb39c | <ide><path>actioncable/test/channel/base_test.rb
<ide> def rm_rf
<ide> setup do
<ide> @user = User.new "lifo"
<ide> @connection = TestConnection.new(@user)
<del> @channel = ChatChannel.new @connection, "{id: 1}", { id: 1 }
<add> @channel = ChatChannel.new @connection, "{id: 1}", id: 1
<ide> end
<ide> ... | 100 |
Javascript | Javascript | fix nits in tools/doc/common.js | 50e5eff12ab33f868067fb41601e9d8feb2d8177 | <ide><path>tools/doc/common.js
<ide> const yaml = require('js-yaml');
<ide>
<ide> function isYAMLBlock(text) {
<del> return !!text.match(/^<!-- YAML/);
<add> return /^<!-- YAML/.test(text);
<ide> }
<ide>
<del>exports.isYAMLBlock = isYAMLBlock;
<del>
<ide> function arrify(value) {
<ide> return Array.isArray(value)... | 1 |
Text | Text | fix nits in stream.md | 1cc5c547d5f83097b7190d8186533bf176df6c9f | <ide><path>doc/api/stream.md
<ide> that implements an HTTP server:
<ide> const http = require('http');
<ide>
<ide> const server = http.createServer((req, res) => {
<del> // `req` is an http.IncomingMessage, which is a Readable Stream
<del> // `res` is an http.ServerResponse, which is a Writable Stream
<add> // `req... | 1 |
Python | Python | add view (mvc speeking) for the plugins. cpu ok | c813802968290a3e4919dd72c4ade7e31616c4a5 | <ide><path>glances/plugins/glances_cpu.py
<ide> def update(self):
<ide> # Update the history list
<ide> self.update_stats_history()
<ide>
<add> # Update the view
<add> self.update_views()
<add>
<ide> return self.stats
<ide>
<add> def update_views(self):
<add> """Update ... | 2 |
Go | Go | adjust ipam errors | dc4285b9a4e2dcf79ed83c18d6c523c93fb5e782 | <ide><path>libnetwork/bitseq/sequence.go
<ide> const (
<ide> )
<ide>
<ide> var (
<del> errNoBitAvailable = fmt.Errorf("no bit available")
<add> // ErrNoBitAvailable is returned when no more bits are available to set
<add> ErrNoBitAvailable = fmt.Errorf("no bit available")
<add> // ErrBitAllocated is returned when the ... | 7 |
Javascript | Javascript | avoid unnecessary multiitemcache | 349a5e395e083763c7245782d82cfdfb0cff160a | <ide><path>lib/CacheFacade.js
<ide> class MultiItemCache {
<ide> */
<ide> constructor(items) {
<ide> this._items = items;
<add> if (items.length === 1) return /** @type {any} */ (items[0]);
<ide> }
<ide>
<ide> /** | 1 |
Python | Python | fix quotation marks | ec359c37ba8f542fae97ff4e51a6d23876dcf185 | <ide><path>numpy/testing/_private/utils.py
<ide> def assert_string_equal(actual, desired):
<ide> raise AssertionError(repr(d1))
<ide> if not diff_list:
<ide> return
<del> msg = f'Differences in strings:\n{''.join(diff_list).rstrip()}'
<add> msg = f"Differences in strings:\n{''.join(diff_list).... | 1 |
Ruby | Ruby | fix unreachable code | 5c2dd5779458b056ce3fb4ed4fc207ef1bb695b5 | <ide><path>Library/Homebrew/cask/audit.rb
<ide> def check_signing
<ide> next if result.success?
<ide>
<ide> # Only fail if signature is wrong, not when no signature is present at all.
<del> next result.stderr.include?("not signed at all")
<add> next if result.stderr.include?("not ... | 1 |
Mixed | Javascript | update deprecation codes | a12a2d892fadf8d8f6c5482056b937c9e1f89df4 | <ide><path>doc/api/deprecations.md
<ide> Type: Documentation-only
<ide>
<ide> Use [`request.destroy()`][] instead of [`request.abort()`][].
<ide>
<del><a id="DEP0XXX"></a>
<del>### DEP0XXX: `repl.inputStream` and `repl.outputStream`
<add><a id="DEP0141"></a>
<add>### DEP0141: `repl.inputStream` and `repl.outputStream... | 3 |
Javascript | Javascript | prevent error thrown when removing event target | 2f0bb69708e224fb7b6eb90766578841112a22d2 | <ide><path>src/browser/ReactEventTopLevelCallback.js
<ide> function findParent(node) {
<ide> return parent;
<ide> }
<ide>
<add>// Used to store ancestor hierarchy in top level callback
<add>var topLevelCallbackReusableArray = [];
<add>
<ide> /**
<ide> * Top-level callback creator used to implement event handling us... | 2 |
Ruby | Ruby | escape `.`s in hostnames in regexps | 63742cd4804b0004fa537b760c96667885de54d2 | <ide><path>Library/Homebrew/dev-cmd/bump-formula-pr.rb
<ide> def determine_formula_from_url(url)
<ide>
<ide> def determine_mirror(url)
<ide> case url
<del> when %r{.*ftp.gnu.org/gnu.*}
<add> when %r{.*ftp\.gnu\.org/gnu.*}
<ide> url.sub "ftp.gnu.org/gnu", "ftpmirror.gnu.org"
<del> when %r{.*downloa... | 1 |
Ruby | Ruby | drop an unused hash; change slang to special | 6893c23f48d2707714240a1ae2a410a0661aa3a5 | <ide><path>actionmailer/test/mailers/base_mailer.rb
<ide> def email_with_translations
<ide> def without_mail_call
<ide> end
<ide>
<del> def with_nil_as_return_value(hash = {})
<add> def with_nil_as_return_value
<ide> mail(:template_name => "welcome")
<ide> nil
<ide> end
<ide><path>actionpack/lib/action... | 2 |
Javascript | Javascript | add node_test_no_internet to the doc builder | 914d800a23f1c7877770d62bd4061957c402c8ca | <ide><path>tools/doc/versions.js
<ide> const getUrl = (url) => {
<ide> });
<ide> };
<ide>
<add>const kNoInternet = !!process.env.NODE_TEST_NO_INTERNET;
<add>
<ide> module.exports = {
<ide> async versions() {
<ide> if (_versions) {
<ide> module.exports = {
<ide> const url =
<ide> 'https://raw.githubus... | 1 |
PHP | PHP | valueretriever | 31d720672ef9698af14ed3c06a1716e61e47425b | <ide><path>src/Illuminate/Support/Collection.php
<ide> protected function valueRetriever($value)
<ide> {
<ide> return function($item) use ($value)
<ide> {
<del> return is_object($item) ? $item->{$value} : array_get($item, $value);
<add> return data_get($item, $value);
<ide> };
<ide> }
<ide>
<ide><path>test... | 2 |
Python | Python | move parse_once to quarantine | ff7232761497985720387c4288439ac1dce2ee77 | <ide><path>tests/utils/test_dag_processing.py
<ide> from unittest import mock
<ide> from unittest.mock import MagicMock, PropertyMock
<ide>
<add>import pytest
<add>
<ide> from airflow.configuration import conf
<ide> from airflow.jobs.local_task_job import LocalTaskJob as LJ
<ide> from airflow.jobs.scheduler_job import... | 1 |
Javascript | Javascript | use proxy logger in test worker | de7798c7539a0a4a946239a1d4b822a3cf1070fc | <ide><path>client/src/client/workers/test-evaluator.js
<ide> import '@babel/polyfill';
<ide>
<ide> const oldLog = self.console.log.bind(self.console);
<ide> self.console.log = function proxyConsole(...args) {
<del> self.__logs = [...self.__logs, ...args];
<add> self.postMessage({ type: 'LOG', data: String(args) });
... | 3 |
Text | Text | remove statement about client private keys | b2edcfee46097fe8e0510a455b97d5c6d0cac5ec | <ide><path>doc/api/tls.md
<ide> const tls = require('tls');
<ide> ## TLS/SSL concepts
<ide>
<ide> The TLS/SSL is a public/private key infrastructure (PKI). For most common
<del>cases, each client and server must have a _private key_.
<add>cases, each server must have a _private key_.
<ide>
<ide> Private keys can be g... | 1 |
Javascript | Javascript | restore optin behavior for builds | 8791920183f9f13a7be1d513652b9c96d29648c7 | <ide><path>build/tasks/build.js
<ide> module.exports = function( grunt ) {
<ide> startFile: "src/intro.js",
<ide> endFile: "src/outro.js"
<ide> },
<add> rawText: {},
<ide> onBuildWrite: convert
<ide> };
<ide>
<ide> module.exports = function( grunt ) {
<ide> var flag, index,
<ide> done = this.asy... | 1 |
Text | Text | alphabetize migration guide | e39970d494edf5f503072e0b0038b46465233868 | <ide><path>docs/getting-started/v3-migration.md
<ide> Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released
<ide>
<ide> ### Interactions
<ide>
<del>* `options.onClick` is now limited to the chart area
<del>* `{mode: 'single'}` was replaced with `{mode: 'nearest', intersect: true}`
<ide> * `{... | 1 |
Python | Python | add missing classmethod decorators | 1da782cb28dc9bb030e8f09b78ea14a81324c3d6 | <ide><path>src/transformers/models/auto/auto_factory.py
<ide> def __init__(self, *args, **kwargs):
<ide> f"`{self.__class__.__name__}.from_config(config)` methods."
<ide> )
<ide>
<add> @classmethod
<ide> def from_config(cls, config, **kwargs):
<ide> if type(config) in cls._model_mapp... | 1 |
Ruby | Ruby | remove dummy method | 4f476d70661ff6b108f5c5e3175ee2db8d55927b | <ide><path>Library/Homebrew/test/test_formula.rb
<ide> def test_factory
<ide> require 'formula'
<ide> class #{Formulary.class_s(name)} < Formula
<ide> url 'foo-1.0'
<del> def initialize(*args)
<del> super
<del> end
<ide> end
<ide> }
<ide> end | 1 |
Python | Python | remove old recordtype definition | 58ee25b5d8f6bf35743c2d5e4f4441fc5f241d04 | <ide><path>libcloud/dns/types.py
<ide> class Provider(object):
<ide> GANDI = 'gandi'
<ide>
<ide>
<del>class RecordType(object):
<del> """
<del> DNS record type.
<del> """
<del> A = 0
<del> AAAA = 1
<del> MX = 2
<del> NS = 3
<del> CNAME = 4
<del> DNAME = 5
<del> TXT = 6
<del> PTR =... | 1 |
Text | Text | update catalan acknowledgements for v3.2 | 6763cbfdc03ed801576c99a5d35623cf55925e22 | <ide><path>website/docs/usage/v3-2.md
<ide> their contributions!
<ide>
<ide> - All Universal Dependencies training data has been updated to v2.8.
<ide> - The Catalan data, tokenizer and lemmatizer have been updated, thanks to Carlos
<del> Rodriguez and the Barcelona Supercomputing Center!
<add> Rodriguez, Carme Arme... | 1 |
PHP | PHP | add missing tests imports. | da8aff4338753feda04a9ca794168e0dd7de94e4 | <ide><path>tests/Bus/BusBatchTest.php
<ide> use Mockery as m;
<ide> use PHPUnit\Framework\TestCase;
<ide> use RuntimeException;
<add>use stdClass;
<ide>
<ide> class BusBatchTest extends TestCase
<ide> {
<ide><path>tests/Database/DatabaseMigrationMigrateCommandTest.php
<ide> use Illuminate\Foundation\Application;
<ide>... | 5 |
Ruby | Ruby | use separate sets for procs and symbols | aca48deda0f7bbb9831291dbf47ed3c8e4ae2b9c | <ide><path>Library/Homebrew/build_environment.rb
<ide> class BuildEnvironment
<ide> def initialize(*settings)
<ide> @settings = Set.new(settings)
<add> @procs = Set.new
<ide> end
<ide>
<ide> def <<(o)
<del> @settings << o
<add> case o
<add> when Proc then @procs << o
<add> else @settings << o
... | 2 |
Javascript | Javascript | add isolate version of test-child-process-fork | 4428b70cbaf94d0af4e18dd727facd3a6b7ec272 | <ide><path>lib/child_process.js
<ide> exports.fork = function(modulePath, args, options) {
<ide> args = args ? args.slice(0) : [];
<ide> args.unshift(modulePath);
<ide>
<add> if (options.thread) {
<add> if (!process.features.isolates) {
<add> throw new Error('node compiled without isolate support');
<add>... | 3 |
PHP | PHP | fix whitespace error in validation utility | 4b2825431901b3bdd7409df8f956f26fba998800 | <ide><path>lib/Cake/Utility/Validation.php
<ide> public static function date($check, $format = 'ymd', $regex = null) {
<ide> $separator . '((1[6-9]|[2-9]\\d)\\d{2})$%';
<ide>
<ide> $regex['my'] = '%^(' . $month . $separator . $year . ')$%';
<del> $regex['ym'] = '%^(' . $year . $separator . $month . ')$%';
<add>... | 1 |
Python | Python | add head_mask and decoder_head_mask to tf led | e7381c4596828e5d9fa7974df14f011ed95890c1 | <ide><path>src/transformers/models/led/modeling_tf_led.py
<ide> def call(
<ide> (
<ide> hidden_states,
<ide> attention_mask,
<add> layer_head_mask,
<ide> is_index_masked,
<ide> is_index_global_attn,
<ide> is_global_attn,
<ide> def call(
<ide... | 4 |
Javascript | Javascript | fix permanent deopt | d081548858ae2c89e22c6e9a231644fba08e008e | <ide><path>lib/net.js
<ide> Socket.prototype.connect = function() {
<ide> // TODO(joyeecheung): use destructuring when V8 is fast enough
<ide> normalized = normalizeArgs(args);
<ide> }
<del> const options = normalized[0];
<del> const cb = normalized[1];
<add> var options = normalized[0];
<add> var cb = no... | 1 |
Ruby | Ruby | catch more examples from example_formula | 2abd3298f9520b25550b4f5b27884452b4ddec13 | <ide><path>Library/Homebrew/cmd/audit.rb
<ide> def audit_line(line, lineno)
<ide> if line =~ /# PLEASE REMOVE/
<ide> problem "Please remove default template comments"
<ide> end
<add> if line =~ /# Documentation:/
<add> problem "Please remove default template comments"
<add> end
<ide> if lin... | 1 |
Go | Go | use increment operator | 16e850fe3ea42f5103c9a11f3db17d11dc4f6ada | <ide><path>api/server/server.go
<ide> func ServeFd(addr string, handle http.Handler) error {
<ide> }()
<ide> }
<ide>
<del> for i := 0; i < len(ls); i += 1 {
<add> for i := 0; i < len(ls); i++ {
<ide> err := <-chErrors
<ide> if err != nil {
<ide> return err
<ide> func ServeApi(job *engine.Job) engine.Status {... | 3 |
PHP | PHP | apply fixes from styleci | 44958f04b0c3eacd8ebc8b19602511438f7fbbec | <ide><path>src/Illuminate/Mail/Mailer.php
<ide>
<ide> namespace Illuminate\Mail;
<ide>
<del>use Closure;
<ide> use Swift_Mailer;
<ide> use Swift_Message;
<ide> use Illuminate\Support\Arr;
<ide> protected function setGlobalTo($message)
<ide> public function queue($view, array $data = [], $callback = null, $queue =... | 2 |
Text | Text | add changelog for rake routes default fix | 6d9ad0dd921e3368b64910c5aeebb880bc8c41a3 | <ide><path>actionpack/CHANGELOG.md
<add>* Fix rake routes not showing the right format when
<add> nesting multiple routes.
<add>
<add> See #18373.
<add>
<add> *Ravil Bayramgalin*
<add>
<ide> * Add ability to override default form builder for a controller.
<ide>
<ide> class AdminController < Applic... | 1 |
Text | Text | add import to example in api-guide/parsers | 4249245123f2bae425363292de689bd291d0573b | <ide><path>docs/api-guide/parsers.md
<ide> Or, if you're using the `@api_view` decorator with function based views.
<ide>
<ide> from rest_framework.decorators import api_view
<ide> from rest_framework.decorators import parser_classes
<add> from rest_framework.parsers import JSONParser
<ide>
<ide> @api_... | 1 |
Javascript | Javascript | remove debug statement | 0689793ef81b546d225d198ff2183d95bc22af07 | <ide><path>controllers/challenges.js
<ide> var highestChallengeNumber = 53;
<ide>
<ide> exports.returnChallenge = function(req, res, next) {
<ide> var challengeNumber = parseInt(req.params.challengeNumber) || 0;
<del> debug(challengeNumber);
<ide> if (challengeNumber > highestChallengeNumber) {
<ide> ... | 1 |
Go | Go | fix typo in overlay log message | 01688ba25352a6627fb9054f9180ee12bdb1b0c2 | <ide><path>libnetwork/drivers/overlay/ov_network.go
<ide> func setDefaultVlan() {
<ide> data := []byte{'0', '\n'}
<ide>
<ide> if err = ioutil.WriteFile(path, data, 0644); err != nil {
<del> logrus.Errorf("endbling default vlan on bridge %s failed %v", brName, err)
<add> logrus.Errorf("enabling default vlan on brid... | 1 |
Python | Python | update conv1d input_shape description | b9a74813081303399e8fce0f9f5f37f6a8343b03 | <ide><path>keras/layers/convolutional.py
<ide> class Conv1D(_Conv):
<ide> it is applied to the outputs as well.
<ide>
<ide> When using this layer as the first layer in a model,
<del> provide an `input_shape` argument
<del> (tuple of integers or `None`, e.g.
<del> `(10, 128)` for sequences of 10 vector... | 1 |
Javascript | Javascript | add support for oncancel and onclose event | d8450845fe735b407133b1b3aa6a87e7c45679d5 | <ide><path>src/renderers/dom/shared/ReactBrowserEventEmitter.js
<ide> var topEventMapping = {
<ide> topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
<ide> topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
<ide> topBlur: 'blur',
<ad... | 3 |
Javascript | Javascript | remove three. prefix from vector3 | c24eed3903ba6841eedb1ac3976e2ed21cc26297 | <ide><path>src/materials/MeshDistanceMaterial.js
<ide> import { Material } from './Material';
<add>import { Vector3 } from '../math/Vector3.js';
<ide>
<ide> /**
<ide> * @author WestLangley / http://github.com/WestLangley
<ide> function MeshDistanceMaterial( parameters ) {
<ide>
<ide> this.type = 'MeshDistanceMateri... | 1 |
PHP | PHP | move extension parsing | 3849dcef9a7288741ae9f13af098d656b65d0ec9 | <ide><path>lib/Cake/Routing/Route/Route.php
<ide> class Route {
<ide> 'server' => 'server_name'
<ide> );
<ide>
<add>/**
<add> * List of connected extensions for this route.
<add> *
<add> * @var array
<add> */
<add> protected $_extensions = array();
<add>
<ide> /**
<ide> * Constructor for a Route
<ide> *
<del> * U... | 4 |
Javascript | Javascript | add rfc 232 mocha mixin blueprint | 95cb1d274c1cda6f9ee2e68d99a03dfe7b0449f6 | <ide><path>blueprints/mixin-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js
<add>import { expect } from 'chai';
<add>import { describe, it } from 'mocha';
<add>import EmberObject from '@ember/object';
<add>import <%= classifiedModuleName %>Mixin from '<%= dasherizedPackageName %>/mixins/<%= dasherizedMo... | 3 |
Ruby | Ruby | use request.body io and rewind, if possible | 3957d44fd10c683518562f22d8b73f1b1c3d455d | <ide><path>actionpack/lib/action_dispatch/middleware/params_parser.rb
<ide> def parse_formatted_parameters(env)
<ide> when Proc
<ide> strategy.call(request.raw_post)
<ide> when :xml_simple, :xml_node
<del> (Hash.from_xml(request.raw_post) || {}).with_indifferent_access
<add> ... | 1 |
Ruby | Ruby | drop array allocations on `html_safe` | 783858c8e150eb0f98d7e5d893e492ee08998662 | <ide><path>activesupport/lib/active_support/core_ext/string/output_safety.rb
<ide> def safe_concat(value)
<ide> original_concat(value)
<ide> end
<ide>
<del> def initialize(*)
<add> def initialize(str = '')
<ide> @html_safe = true
<ide> super
<ide> end | 1 |
Go | Go | remove redundant sync.once | 350fadbdd4acaa40e5c0f92189db42b430dd755d | <ide><path>rootless/rootless.go
<ide> package rootless // import "github.com/docker/docker/rootless"
<ide> import (
<ide> "os"
<ide> "path/filepath"
<del> "sync"
<ide>
<ide> "github.com/pkg/errors"
<ide> "github.com/rootless-containers/rootlesskit/pkg/api/client"
<ide> )
<ide>
<del>const (
<del> // RootlessKitDoc... | 1 |
PHP | PHP | remove pointless @package tag | e73b45464856b36b9f7801b8808c15a712221ca0 | <ide><path>lib/Cake/Model/Datasource/Database/Type/DateTimeType.php
<ide> *
<ide> * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
<ide> * @link http://cakephp.org CakePHP(tm) Project
<del> * @package Cake.Model
<ide> * @since CakePHP(tm) v 3.0.0
<ide>... | 1 |
PHP | PHP | add tests for save() and multiple locales | 83abced287feba5e94551a82657b9143fe82cecd | <ide><path>lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php
<ide> public function testSaveCreate() {
<ide> $this->assertEquals($expected, $result);
<ide> }
<ide>
<add>/**
<add> * test save multiple locales method
<add> *
<add> * @return void
<add> */
<add> public function testSaveMultipleLocales() {
<add... | 1 |
Text | Text | add link on logo to readme | 71704fbc96ae1cd06aff1aec12421c3f4620d806 | <ide><path>README.md
<ide> <p align="center">
<del> <img alt="Node.js" src="https://nodejs.org/static/images/logo-light.svg" width="400"/>
<add> <a href="https://nodejs.org/">
<add> <img alt="Node.js" src="https://nodejs.org/static/images/logo-light.svg" width="400"/>
<add> </a>
<ide> </p>
<ide> <p align="center"... | 1 |
Ruby | Ruby | use opt_prefix when available | e07a587f42abcf107866f0937643b1a261adf185 | <ide><path>Library/Homebrew/cmd/--prefix.rb
<ide> def __prefix
<ide> if ARGV.named.empty?
<ide> puts HOMEBREW_PREFIX
<ide> else
<del> puts ARGV.resolved_formulae.map(&:installed_prefix)
<add> puts ARGV.resolved_formulae.map { |f|
<add> f.opt_prefix.exist? ? f.opt_prefix : f.installed_pref... | 1 |
Ruby | Ruby | add missing root mkpath | d78dc014d14bf2619d3ae3e985373aff393e67e0 | <ide><path>Library/Homebrew/github_packages.rb
<ide> def upload_bottle(user, token, skopeo, formula_full_name, bottle_hash, keep_old:
<ide>
<ide> root = Pathname("#{formula_name}--#{version_rebuild}")
<ide> FileUtils.rm_rf root
<add> root.mkpath
<ide>
<ide> if keep_old
<ide> download(user, token,... | 1 |
Python | Python | show more task info | 6b1ef78d21e1a6c13018b5b7a589f48bc451515a | <ide><path>celery/events/cursesmon.py
<ide> def draw(self):
<ide> except KeyError:
<ide> pass
<ide> else:
<del> info = selection.info(['args', 'kwargs',
<del> 'result', 'runtime', 'eta'])
<add> info = selection.i... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.