content_type stringclasses 8
values | main_lang stringclasses 7
values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
Ruby | Ruby | add support for nested archives | 589c5b4e8dc4fab625868672d138e46290b19ecf | <ide><path>Library/Homebrew/test/unpack_strategy_spec.rb
<ide> end
<ide> end
<ide>
<add>describe UnpackStrategy do
<add> describe "#extract_nestedly" do
<add> let(:file_name) { "file" }
<add> let(:nested_archive) {
<add> dir = mktmpdir
<add>
<add> (dir/"file").write "This file was inside a GZIP insi... | 2 |
Javascript | Javascript | update webgltextures for gl.rgb | 89c1738ac98a96bfdfdb299c5ec85f464a6a8889 | <ide><path>src/renderers/webgl/WebGLTextures.js
<ide> function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
<ide>
<ide> if ( ! _isWebGL2 ) return glFormat;
<ide>
<del> if ( glFormat === _gl.RGBA && glType === _gl.FLOAT ) return _gl.RGBA32F;
<del> if ( glFormat === _gl.RGBA && glType ===... | 1 |
Javascript | Javascript | use cff compiler for building type1 font | a235ec1441716a51eb540e855a02e7f6d82916d7 | <ide><path>src/fonts.js
<ide> var Type1Font = function Type1Font(name, file, properties) {
<ide> };
<ide>
<ide> Type1Font.prototype = {
<del> createCFFIndexHeader: function Type1Font_createCFFIndexHeader(objects,
<del> isByte) {
<del> // First 2 bytes ... | 1 |
PHP | PHP | fix behavior of oneachside = 1 with paginator | c59cffa7825498e1d419d8c86cd8527520f718cb | <ide><path>src/Illuminate/Pagination/UrlWindow.php
<ide> protected function getSmallSlider()
<ide> */
<ide> protected function getUrlSlider($onEachSide)
<ide> {
<del> $window = $onEachSide * 2;
<add> $window = $onEachSide + 4;
<ide>
<ide> if (! $this->hasPages()) {
<ide> ... | 2 |
Javascript | Javascript | add babel-node to seed | 9d12d868921797c87d4c626fde72252cebf760c6 | <ide><path>index.js
<ide> /* eslint-disable no-process-exit */
<add>require('babel/register');
<ide> require('dotenv').load();
<ide> var fs = require('fs'),
<ide> path = require('path'), | 1 |
PHP | PHP | add failing test for lazycollection@until | 4e43bddd60752cfe509c6be08967c85c26639474 | <ide><path>tests/Support/SupportLazyCollectionIsLazyTest.php
<ide> public function testUnlessNotEmptyIsLazy()
<ide> });
<ide> }
<ide>
<add> public function testUntilIsLazy()
<add> {
<add> $this->assertDoesNotEnumerate(function ($collection) {
<add> $collection->until(INF);
<add> ... | 1 |
Text | Text | add changelog entry | 8f05fee1ff26247d6fec8f06f711a60a3c4e48fc | <ide><path>railties/CHANGELOG.md
<ide> ## Rails 4.0.0 (unreleased) ##
<ide>
<add>* `Rails.version` now returns an instance of `Gem::Version`
<add>
<add> *Charlie Somerville*
<add>
<ide> * Don't generate a scaffold.css when --no-assets is specified
<ide>
<ide> *Kevin Glowacz* | 1 |
Javascript | Javascript | fix coding style in test/unit/testreporter.js | 2bd81786c238477388c6f041af913b9e894b1798 | <ide><path>test/unit/testreporter.js
<ide> var TestReporter = function(browser, appPath) {
<ide> r.onreadystatechange = function sendTaskResultOnreadystatechange(e) {
<ide> if (r.readyState == 4) {
<ide> // Retry until successful
<del> if (r.status !== 200)
<add> if (r.status !== 200) {
... | 1 |
Ruby | Ruby | handle double pluralization for irregular plurals | 1754bd9b208e8d9207c226d1ffb3cee490856a78 | <ide><path>activesupport/lib/active_support/inflections.rb
<ide> module ActiveSupport
<ide> inflect.plural(/s$/i, 's')
<ide> inflect.plural(/(ax|test)is$/i, '\1es')
<ide> inflect.plural(/(octop|vir)us$/i, '\1i')
<add> inflect.plural(/(octop|vir)i$/i, '\1i')
<ide> inflect.plural(/(alias|status)$/i, '\... | 3 |
Python | Python | remove dead code from spacy._ml | f6fef30adc217ed84dc658bc849cdee039663750 | <ide><path>spacy/_ml.py
<ide> def reapply_bwd(dY, sgd=None):
<ide> return wrap(reapply_fwd, layer)
<ide>
<ide>
<del>
<del>
<ide> def asarray(ops, dtype):
<ide> def forward(X, drop=0.):
<ide> return ops.asarray(X, dtype=dtype), None
<ide> return layerize(forward)
<ide>
<ide>
<del>def foreach(laye... | 1 |
Python | Python | add a test case for ninefold loadbalancer driver | 4e48b4587d8af6cce0cc083db10287c8a9f933e3 | <ide><path>libcloud/test/loadbalancer/test_ninefold.py
<add>import sys
<add>import unittest
<add>
<add>from libcloud.loadbalancer.types import Provider
<add>from libcloud.loadbalancer.providers import get_driver
<add>
<add>
<add>class NinefoldLbTestCase(unittest.TestCase):
<add> def test_driver_instantiation(self):
... | 1 |
Text | Text | add openssl cve fix to notable changes in v15.5.0 | 81442fa9fdc900e4b7058b142dfbdd268d2dbd6a | <ide><path>doc/changelogs/CHANGELOG_V15.md
<ide> Vulnerabilities fixed:
<ide>
<ide> ### Notable Changes
<ide>
<add>#### OpenSSL-1.1.1i
<add>
<add>OpenSSL-1.1.1i contains a fix for CVE-2020-1971: OpenSSL - EDIPARTYNAME NULL pointer de-reference (High). This is a vulnerability in OpenSSL which may be exploited through ... | 1 |
Text | Text | add tip style to style entry | dc24bb63d6cad6266cc2718bd077ba25f34e1842 | <ide><path>docs/cookbook/cb-02-inline-styles.md
<ide> permalink: inline-styles.html
<ide> script: "cookbook/inline-styles.js"
<ide> ---
<ide>
<add>## Q&A format
<add>
<ide> ### Problem
<del>You want to apply inline style to an element.
<add>You want to put inline style to an element.
<ide>
<ide> ### Solution
<ide> In... | 1 |
Javascript | Javascript | allow multiple values for same config | 43fa0a884765752e18bf70f4be13cc721ee866de | <ide><path>benchmark/common.js
<ide> function Benchmark(fn, configs, options) {
<ide> }
<ide>
<ide> Benchmark.prototype._parseArgs = function(argv, configs) {
<del> const cliOptions = Object.assign({}, configs);
<add> const cliOptions = {};
<ide> const extraOptions = {};
<ide> // Parse configuration arguments
<i... | 1 |
Text | Text | correct document page of html page | 6bef39b0f1fa0c014ba6dd4474b93972468019db | <ide><path>laravel/documentation/views/html.md
<ide> For example, the < symbol should be converted to its entity representation. Conv
<ide>
<ide> #### Generating a reference to a CSS file using a given media type:
<ide>
<del> echo HTML::style('css/common.css', 'print');
<add> echo HTML::style('css/common.css', array(... | 1 |
Ruby | Ruby | convert some multiline code into a single line | 7ffeba6380035e190efdf7eb7a003dd51e356cea | <ide><path>Library/Homebrew/livecheck/livecheck.rb
<ide> def resource_version(
<ide> livecheck_strategy = livecheck.strategy
<ide> livecheck_strategy_block = livecheck.strategy_block
<ide>
<del> livecheck_url_string = livecheck_url_to_string(
<del> livecheck_url,
<del> resource,
<del> ... | 1 |
Javascript | Javascript | fix double-exit on nested domains | 80472bc301234d9dc4142e62bbffc4300fffdd83 | <ide><path>src/node.js
<ide> // The domain error handler threw! oh no!
<ide> // See if another domain can catch THIS error,
<ide> // or else crash on the original one.
<del> domainStack.pop();
<add> // If the user already exited it, then don't double-exit.
<add> ... | 2 |
Text | Text | add note about using cluster without networking | adb7be2649abb9ffa835886427b48d765688fdb5 | <ide><path>doc/api/cluster.md
<ide> will be dropped and new connections will be refused. Node.js does not
<ide> automatically manage the number of workers, however. It is the application's
<ide> responsibility to manage the worker pool based on its own needs.
<ide>
<del>
<add>Although a primary use case for the `clust... | 1 |
Python | Python | fix linspace for use with physical quantities | 4a764d3c7afccedc6e96fce0bdabe6ed44f255dc | <ide><path>numpy/core/function_base.py
<ide> def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None):
<ide> num = int(num)
<ide>
<ide> # Convert float/complex array scalars to float, gh-3504
<del> start = start + 0.
<del> stop = stop + 0.
<add> start = start * 1.
<add> stop = s... | 2 |
Go | Go | remove unused map() method | 7b510fda0cd6d633501b3e999e16bd98ce89dea3 | <ide><path>daemon/containerd/service.go
<ide> func (cs *ImageService) GetLayerFolders(img *image.Image, rwLayer layer.RWLayer)
<ide> panic("not implemented")
<ide> }
<ide>
<del>// Map returns a map of all images in the ImageStore.
<del>func (cs *ImageService) Map() map[image.ID]*image.Image {
<del> panic("not impleme... | 3 |
Java | Java | fix mergedannotations javadoc | 87dba5a4df3bd4b2e9f0b5c31d9ceda2d81ec94d | <ide><path>spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotations.java
<ide> public interface MergedAnnotations extends Iterable<MergedAnnotation<Annotation>
<ide> <A extends Annotation> boolean isPresent(Class<A> annotationType);
<ide>
<ide> /**
<del> * Determine if the specified annotatio... | 1 |
PHP | PHP | remove the before/after options | 444699e02b98446fb508c22e3bd9f4f34b5a7ab8 | <ide><path>src/View/Helper/FormHelper.php
<ide> public function postLink($title, $url = null, $options = array(), $confirmMessag
<ide> *
<ide> * - `div` - Include a wrapping div? Defaults to true. Accepts sub options similar to
<ide> * FormHelper::input().
<del> * - `before` - Content to include before the input.... | 2 |
PHP | PHP | fix arraying of relations | 087ecd6ece89d9038840281cc02b78c92ac7eb29 | <ide><path>src/Illuminate/Database/Eloquent/Model.php
<ide> public function relationsToArray()
<ide> // If the relation value has been set, we will set it on this attributes
<ide> // list for returning. If it was not arrayable or null, we'll not set
<ide> // the value on the array because it is some type of in... | 2 |
PHP | PHP | add plugin examples | ae5e7508dfdad0451fe3e98efd19ffe601a960fe | <ide><path>tests/TestCase/ORM/TableRegistryTest.php
<ide> public function testGetFallbacks()
<ide> $this->assertEquals('rebels', $result->table(), 'The table should be taken from options');
<ide> $this->assertEquals('C3P0', $result->alias());
<ide>
<add> $result = TableRegistry::get('Funky.Chipm... | 1 |
Javascript | Javascript | fix spelling in test case comments | e890344d18fdc4ad096d2c5020a7101bc355ad8b | <ide><path>test/abort/test-http-parser-consume.js
<ide> if (process.argv[2] === 'child') {
<ide> const rr = get({ port: server.address().port }, common.mustCall(() => {
<ide> // This bad input (0) should abort the parser and the process
<ide> rr.parser.consume(0);
<del> // This line should be unrea... | 48 |
Javascript | Javascript | fix central dashed line | 54756f4d32e55b9618b151a7e07de1a82c9b034c | <ide><path>d3.chart.js
<ide> d3.chart.boxplot = function() {
<ide>
<ide> // Update center line.
<ide> var center = g.selectAll("line.center")
<del> .data([[min, max]]);
<add> .data([[whiskerData[0], whiskerData[whiskerData.length - 1]]]);
<ide>
<ide> center.enter().append("svg:line... | 3 |
Python | Python | clarify qa pipeline output based on character | 4bbad604ebddcb64f37e83cacbb54202ea4466e4 | <ide><path>src/transformers/pipelines/question_answering.py
<ide> def __call__(self, *args, **kwargs):
<ide> A :obj:`dict` or a list of :obj:`dict`: Each result comes as a dictionary with the following keys:
<ide>
<ide> - **score** (:obj:`float`) -- The probability associated to the answer.
<de... | 1 |
Python | Python | handle queued tasks from multiple jobs/executors | 43bdd7a4c876f9ac2d4c357d9c30c0956a1b0d76 | <ide><path>airflow/executors/base_executor.py
<ide> def start(self): # pragma: no cover
<ide> """
<ide> pass
<ide>
<del> def queue_command(self, key, command, priority=1, queue=None):
<add> def queue_command(self, task_instance, command, priority=1, queue=None):
<add> key = task_instance.... | 6 |
Javascript | Javascript | remove unneeded constants | cc2ddada5869f66616b130a82e5bc7372b6c4b53 | <ide><path>examples/jsm/nodes/ShaderNode.js
<ide> export const step = new ShaderNodeProxy( MathNode, 'step' );
<ide> export const tan = new ShaderNodeProxy( MathNode, 'tan' );
<ide> export const transformDirection = new ShaderNodeProxy( MathNode, 'transformDirection' );
<ide>
<del>export const PI = float( Math.PI );
<... | 3 |
Ruby | Ruby | replace argv.verbose? with homebrew.args.verbose? | acde828a45c452b54413a3cd711752343e54f3cf | <ide><path>Library/Homebrew/cleaner.rb
<ide> def prune
<ide> # actual files gets removed correctly.
<ide> dirs.reverse_each do |d|
<ide> if d.children.empty?
<del> puts "rmdir: #{d} (empty)" if ARGV.verbose?
<add> puts "rmdir: #{d} (empty)" if Homebrew.args.verbose?
<ide> d.rmdir
<id... | 16 |
Text | Text | remove size alias for length validation | a94186f836044d5ddaf9b185e01a99dc1c2569f8 | <ide><path>guides/source/active_record_validations.md
<ide> provide a personalized message or use `presence: true` instead. When
<ide> `:in` or `:within` have a lower limit of 1, you should either provide a
<ide> personalized message or call `presence` prior to `length`.
<ide>
<del>The `size` helper is an alias for `l... | 1 |
Javascript | Javascript | remove excessive value from http2 benchmark | e136903700445f1d5f7555f22f69be189a14f682 | <ide><path>benchmark/http2/respond-with-fd.js
<ide> const fs = require('fs');
<ide> const file = path.join(path.resolve(__dirname, '../fixtures'), 'alice.html');
<ide>
<ide> const bench = common.createBenchmark(main, {
<del> requests: [100, 1000, 10000, 100000, 1000000],
<add> requests: [100, 1000, 10000, 100000],
<... | 1 |
Javascript | Javascript | implement modifications to pull request | a920c12539991c4184fd977e9b1ec1cd01333609 | <ide><path>test/watchCases/plugins/automatic-prefetch-plugin/0/foo/c.js
<ide> module.exports = "a test";
<del>
<del>
<ide><path>test/watchCases/plugins/automatic-prefetch-plugin/0/index.js
<ide> it("should watch for changes", function() {
<ide> require("./foo/" + WATCH_STEP).should.be.eql('This is only a test.' + WATC... | 13 |
Javascript | Javascript | replace string concatenation with template | 66a990b5edad89af6bc3c4d048f8ddc5463e80ab | <ide><path>test/parallel/test-http-incoming-pipelined-socket-destroy.js
<ide> const server = http.createServer(common.mustCall(function(req, res) {
<ide>
<ide> // Make a bunch of requests pipelined on the same socket
<ide> function generator(seeds) {
<add> const port = server.address().port;
<ide> return seeds.map(... | 1 |
Text | Text | add explicit bracket for markdown reference links | 24011de9071fcd092fab29719d3fa8269a95288a | <ide><path>doc/api/assert.md
<ide> All instances contain the built-in `Error` properties (`message` and `name`)
<ide> and:
<ide>
<ide> * `actual` {any} Set to the `actual` argument for methods such as
<del> [`assert.strictEqual()`].
<add> [`assert.strictEqual()`][].
<ide> * `expected` {any} Set to the `expected` val... | 17 |
Javascript | Javascript | replace `listeners()` with `listenercount()` | b11d6ecbb8bb2f0d6f423be6775e587f4e9b1c4d | <ide><path>Libraries/EventEmitter/NativeEventEmitter.js
<ide> export default class NativeEventEmitter extends EventEmitter {
<ide>
<ide> removeAllListeners(eventType: string) {
<ide> invariant(eventType, 'eventType argument is required.');
<del> const count = this.listeners(eventType).length;
<add> const c... | 2 |
PHP | PHP | remove cake_test_lib constant | 0508055ee9b77fe3d358ca401d3e74185cb7bfc0 | <ide><path>app/webroot/test.php
<ide> die(__d('cake', 'Debug setting does not allow access to this url.'));
<ide> }
<ide>
<del>require_once CAKE_TESTS_LIB . 'CakeTestSuiteDispatcher.php';
<add>require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
<ide>
<ide> CakeTestSuiteDispatcher::run();
<ide><path... | 5 |
Javascript | Javascript | fix metadata comment | 226799e1f8767a8ab2849ea04f595dc82ce83747 | <ide><path>src/locale/fil.js
<ide> //! moment.js locale configuration
<del>//! locale : Tagalog (Philippines) [tl-ph]
<add>//! locale : Filipino [fil]
<ide> //! author : Dan Hagman : https://github.com/hagmandan
<ide> //! author : Matthew Co : https://github.com/matthewdeeco
<ide> | 1 |
Javascript | Javascript | copy color to uniforms value | 2f350889c9a3d6696f08006db30c35eeb16c6a9d | <ide><path>src/renderers/WebGLRenderer.js
<ide> function WebGLRenderer( parameters ) {
<ide>
<ide> } else if ( material.isShadowMaterial ) {
<ide>
<del> m_uniforms.color.value = material.color;
<add> m_uniforms.color.value.copy( material.color );
<ide> m_uniforms.opacity.value = material.opacity;
<ide>
... | 1 |
Javascript | Javascript | move method definition to es6 class `mixin` | a66d9a5369108a43263b445aa9316af66e64b7c1 | <ide><path>packages/ember-metal/lib/mixin.js
<ide> export default class Mixin {
<ide>
<ide> return ret;
<ide> }
<del>}
<ide>
<del>Mixin._apply = applyMixin;
<add> /**
<add> @method reopen
<add> @param arguments*
<add> @private
<add> */
<add> reopen() {
<add> let currentMixin;
<add>
<add> if (t... | 1 |
PHP | PHP | change assertequals to assertsame | 5600af55df51db2ec3ec5f2b4ee4576108f2de24 | <ide><path>tests/TestCase/ORM/TableTest.php
<ide> public function testSaveManyFailed()
<ide> $result = $table->saveMany($entities);
<ide>
<ide> $this->assertFalse($result);
<del> $this->assertEquals($expectedCount, $table->find()->count());
<add> $this->assertSame($expectedCount, $table->... | 1 |
Python | Python | fix grammatical error | aa1d34dc51fc63dabc46f388822ba73b15d3ef97 | <ide><path>src/flask/scaffold.py
<ide> def teardown_request(self, f: TeardownCallable) -> TeardownCallable:
<ide> stack of active contexts. This becomes relevant if you are using
<ide> such constructs in tests.
<ide>
<del> Teardown functions must avoid raising exceptions, since they . If they
<... | 1 |
Text | Text | use full path to system ruby in setup instructions | a43227143d0464ab7d6776c2d6866d653503cb5d | <ide><path>README.md
<ide> Quick Install to /usr/local
<ide> ---------------------------
<ide> [This script][gist] will prompt for confirmation before it does anything:
<ide>
<del> ruby -e "$(curl -fsSL https://raw.github.com/gist/323731/39fc1416e34b9f6db201b4a026181f4ceb7cfa74)"
<add> /usr/bin/ruby -e "$(curl -... | 1 |
Python | Python | fix generation repetition penalty with xla | fd9aa82b07d9b844a21f18f1622de5ca104f25bd | <ide><path>src/transformers/generation_tf_logits_process.py
<ide> def _create_score_penalties(self, input_ids: tf.Tensor, logits: tf.Tensor) -> tf
<ide>
<ide> # Scatters the penalties
<ide> token_penalties = tf.ones(logits.shape)
<add> batch_size = input_ids.shape[0]
<add> seq_len = tf.sh... | 1 |
Javascript | Javascript | reuse meta `arraycontentdidchange` | 49f01699a9c209c3134ac85895cba4456a58b935 | <ide><path>packages/ember-runtime/lib/mixins/array.js
<ide> export function arrayContentDidChange(array, startIdx, removeAmt, addAmt) {
<ide>
<ide> let normalStartIdx = startIdx < 0 ? previousLength + startIdx : startIdx;
<ide> if (cache.firstObject !== undefined && normalStartIdx === 0) {
<del> propertyW... | 1 |
Python | Python | fix lint issue | 45d33fdacc79c182f8a17bd2f628e10c8ab184ec | <ide><path>libcloud/compute/drivers/openstack.py
<ide> def ex_list_subnets(self):
<ide> response = self.network_connection.request(
<ide> self._subnets_url_prefix).object
<ide> return self._to_subnets(response)
<add>
<ide> def ex_list_ports(self):
<ide> """
<ide> List all... | 1 |
Python | Python | fix base filters in one_hot | 4973fe3069b594f1cc808cc18bf473ff21ab7956 | <ide><path>keras/preprocessing/text.py
<ide> def text_to_word_sequence(text,
<ide> return [i for i in seq if i]
<ide>
<ide>
<del>def one_hot(text, n, filters=base_filter(), lower=True, split=" "):
<add>def one_hot(text, n,
<add> filters='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~\t\n',
<add> lower=Tru... | 1 |
Go | Go | remove unneeded "digest" alias for "go-digest" | a0230f3d9a1f650c06142a2865f8aed08e3a7f0d | <ide><path>builder/builder-next/adapters/containerimage/pull.go
<ide> import (
<ide> "github.com/moby/buildkit/util/leaseutil"
<ide> "github.com/moby/buildkit/util/progress"
<ide> "github.com/moby/buildkit/util/resolver"
<del> digest "github.com/opencontainers/go-digest"
<add> "github.com/opencontainers/go-digest"
<... | 56 |
Text | Text | add links to apache software and docs | 89990e69286556448ba3a8588ee826c93bedf0af | <ide><path>guide/english/apache/index.md
<ide> Their purpose is supporting Apache software projects under Apache license.
<ide>
<ide> ## Apache HTTP Server
<ide>
<del>The Apache HTTP Server, commonly known as Apache, is a free and open-source cross-platform web server, released under the terms of [Apache License 2.0]... | 1 |
Python | Python | remove types from kpo docstring | a159ae828f92eb2590f47762a52d10ea03b1a465 | <ide><path>airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
<ide> class KubernetesPodOperator(BaseOperator):
<ide> The docker images's entrypoint is used if this is not provided.
<ide> :param arguments: arguments of the entrypoint. (templated)
<ide> The docker image's CMD is used if thi... | 1 |
PHP | PHP | fix typo in the console output | 3a9ab0e3be91cc9c2a57b4b313f6f07c97233e88 | <ide><path>src/Shell/I18nShell.php
<ide> public function main()
<ide> $this->out('<info>I18n Shell</info>');
<ide> $this->hr();
<ide> $this->out('[E]xtract POT file from sources');
<del> $this->out('[I]inialize a language from POT file');
<add> $this->out('[I]nitialize a language f... | 1 |
Ruby | Ruby | respect model.record_timestamps? in upsert_all | c5c4315259254ddb12272839e502659e2fee1240 | <ide><path>activerecord/lib/active_record/insert_all.rb
<ide> def initialize(model, inserts, on_duplicate:, returning: nil, unique_by: nil)
<ide>
<ide> @model, @connection, @inserts, @keys = model, model.connection, inserts, inserts.first.keys.map(&:to_s)
<ide> @on_duplicate, @returning, @unique_by = on_du... | 2 |
Python | Python | handle empty data with serializer | b4199704316bd2d67281cbc3cf946eab9bded407 | <ide><path>rest_framework/serializers.py
<ide> def data(self):
<ide> @property
<ide> def errors(self):
<ide> ret = super(Serializer, self).errors
<add> if isinstance(ret, list) and len(ret) == 1 and ret[0].code == 'null':
<add> # Edge case. Provide a more descriptive error than
<add> ... | 3 |
Javascript | Javascript | add missing types | 84f9842d547845c0a65d5d1ae820b0245c954927 | <ide><path>lib/RuntimeModule.js
<ide> const Module = require("./Module");
<ide> const TYPES = new Set(["runtime"]);
<ide>
<ide> class RuntimeModule extends Module {
<add> /**
<add> * @param {string} name a readable name
<add> * @param {number=} stage an optional stage
<add> */
<ide> constructor(name, stage = 0) {
... | 9 |
PHP | PHP | add database connection to di container | 9cb46e6d6c4576aad6fcbc2e63a2837b2e2a4e95 | <ide><path>src/Illuminate/Database/DatabaseServiceProvider.php
<ide> public function register()
<ide> $this->app->singleton('db', function ($app) {
<ide> return new DatabaseManager($app, $app['db.factory']);
<ide> });
<add>
<add> $this->app->bind('db.connection', function ($app) {
<ad... | 2 |
Javascript | Javascript | fix typo in aca documentation [ci skip] | 966d3a7bf2c08c5c20213d29686cbb409a07734a | <ide><path>actioncable/app/javascript/action_cable/subscriptions.js
<ide> import Subscription from "./subscription"
<ide>
<del>// Collection class for creating (and internally managing) channel subscriptions. The only method intended to be triggered by the user
<del>// us ActionCable.Subscriptions#create, and it shoul... | 1 |
Python | Python | add newline at the end | 6393251803b6562d9b2ea98cf1385d1dbb0207d9 | <ide><path>Graphs/minimum_spanning_tree_kruskal.py
<ide> def find_parent(i):
<ide>
<ide> print(minimum_spanning_tree_cost)
<ide> for edge in minimum_spanning_tree:
<del> print(edge)
<ide>\ No newline at end of file
<add> print(edge) | 1 |
Javascript | Javascript | use template strings | 1ee36f614ce3813598ac2d3d75dccc39e1c93a2a | <ide><path>lib/util.js
<ide> exports.debuglog = function(set) {
<ide> debugEnviron = process.env.NODE_DEBUG || '';
<ide> set = set.toUpperCase();
<ide> if (!debugs[set]) {
<del> if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
<add> if (new RegExp(`\\b${set}\\b`, 'i').test(debugEnviron)) {
<... | 1 |
Javascript | Javascript | fix readablestate.awaitdrain mechanism | 819b2d36bcffdb9f33e0e4497ac818d64fe5711d | <ide><path>lib/_stream_readable.js
<ide> Readable.prototype.pipe = function(dest, pipeOpts) {
<ide> // If the user unpiped during `dest.write()`, it is possible
<ide> // to get stuck in a permanently paused state if that write
<ide> // also returned false.
<del> if (state.pipesCount === 1 &&
<del... | 2 |
PHP | PHP | add datetime to inputregistry | e0079c1d2b8c31e087c1a69b7235c49c4e76e769 | <ide><path>src/View/Input/InputRegistry.php
<ide> class InputRegistry {
<ide> 'radio' => ['Cake\View\Input\Radio', 'label'],
<ide> 'select' => ['Cake\View\Input\SelectBox'],
<ide> 'textarea' => ['Cake\View\Input\Textarea'],
<add> 'datetime' => ['Cake\View\Input\DateTime', 'select'],
<ide> '_default' => ['Cake\... | 1 |
Javascript | Javascript | add more eventemitter benchmarks | 847b9d212a404e5906ea9f366c458332c0318c53 | <ide><path>benchmark/events/ee-emit-multi-args.js
<add>var common = require('../common.js');
<add>var EventEmitter = require('events').EventEmitter;
<add>
<add>var bench = common.createBenchmark(main, {n: [25e4]});
<add>
<add>function main(conf) {
<add> var n = conf.n | 0;
<add>
<add> var ee = new EventEmitter();
<ad... | 5 |
Javascript | Javascript | update nextchallenge logic to ignore beta | efc76f7f7193c192d95699843ef9c553c9660739 | <ide><path>common/app/routes/challenges/utils.js
<ide> export function getNextChallenge(
<ide> // skip is used to skip isComingSoon challenges
<ide> block.challenges[ index + 1 + skip ]
<ide> ];
<del> if (!isDev && nextChallenge && nextChallenge.isComingSoon) {
<add> if (
<add> !isDev &&
<add> nextCha... | 2 |
Text | Text | add oyyd to collaborators | 616125c8b1e901b857aa19ec9ddca06b2f72910a | <ide><path>README.md
<ide> For information about the governance of the Node.js project, see
<ide> **Alexis Campailla** <orangemocha@nodejs.org>
<ide> * [othiym23](https://github.com/othiym23) -
<ide> **Forrest L Norvell** <ogd@aoaioxxysz.net> (he/him)
<add>* [oyyd](https://github.com/oyyd) -
<add>**Ouyang Y... | 1 |
Python | Python | set version to 2.3.1 | 86d13a9fb84cee2df56a998446d340207dfdbd5f | <ide><path>spacy/about.py
<ide> # fmt: off
<ide> __title__ = "spacy"
<del>__version__ = "2.3.0"
<add>__version__ = "2.3.1"
<ide> __release__ = True
<ide> __download_url__ = "https://github.com/explosion/spacy-models/releases/download"
<ide> __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/m... | 1 |
Python | Python | fix triggerdagrunoperator extra link | 820e836c4a2e45239279d4d71e1db9434022fec5 | <ide><path>airflow/operators/trigger_dagrun.py
<ide> from airflow.api.common.experimental.trigger_dag import trigger_dag
<ide> from airflow.exceptions import AirflowException, DagNotFound, DagRunAlreadyExists
<ide> from airflow.models import BaseOperator, BaseOperatorLink, DagBag, DagModel, DagRun
<add>from airflow.mod... | 2 |
Java | Java | reuse resolvabletype in getdependencytype | b69ab8d568d363d1e5e6be4330fa6d1242e27a9a | <ide><path>spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java
<ide> import java.io.Serializable;
<ide> import java.lang.annotation.Annotation;
<ide> import java.lang.reflect.Field;
<del>import java.lang.reflect.ParameterizedType;
<del>import java.lang.reflect.Type;
<ide> impor... | 1 |
Python | Python | add lemmatizer fixture | 09acfbca012c6a1b98fbb4167420ed0b5797f9be | <ide><path>spacy/tests/conftest.py
<ide> from ..hu import Hungarian
<ide> from ..tokens import Doc
<ide> from ..strings import StringStore
<add>from ..lemmatizer import Lemmatizer
<ide> from ..attrs import ORTH, TAG, HEAD, DEP
<ide> from ..util import match_best_version, get_data_path
<ide>
<ide> def en_entityrecogniz... | 1 |
PHP | PHP | add collection tests. | 5a52bebd203bb887e339e588aa75d938ae2d2ed7 | <ide><path>tests/Support/SupportCollectionTest.php
<ide> public function testCombineWithCollection()
<ide>
<ide> $this->assertSame($expected, $actual);
<ide> }
<add>
<add> public function testReduce()
<add> {
<add> $data = new Collection([1, 2, 3]);
<add> $this->assertEquals(6, $data->r... | 1 |
Java | Java | add responseentity test | 475b876f08349b70e066719e5ae7437db96ad255 | <ide><path>spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java
<ide> public void handleMonoWithWildcardBodyType() throws Exception {
<ide> assertResponseBody("\"body\"");
<ide> }
<ide>
<add> @Test // SPR-14877
<add> public void handleMono... | 1 |
PHP | PHP | improve sql server last insert id retrieval | 200fcdbf0f28aff145a2ed2a943d704c36fd3c63 | <ide><path>src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
<ide> public function compileExists(Builder $query)
<ide> return $this->compileSelect($existsQuery->selectRaw('1 [exists]')->limit(1));
<ide> }
<ide>
<add> /**
<add> * Compile an insert and get ID statement into SQL.
<add> *
... | 3 |
Ruby | Ruby | improve eof handling | e30f2af9870905181f12dbd45a973145dcadc1ee | <ide><path>Library/Homebrew/system_command.rb
<ide> def write_input_to(raw_stdin)
<ide>
<ide> sig { params(sources: T::Array[IO], _block: T.proc.params(type: Symbol, line: String).void).void }
<ide> def each_line_from(sources, &_block)
<del> loop do
<del> readable_sources, = IO.select(sources)
<del>
<del> ... | 1 |
PHP | PHP | fix form control docs url | 2c9d04d74e037041337d92d8a4d0620a397f4d1d | <ide><path>src/View/Helper/FormHelper.php
<ide> public function fieldset(string $fields = '', array $options = []): string
<ide> * @param string $fieldName This should be "modelname.fieldname"
<ide> * @param array<string, mixed> $options Each type of input takes different options.
<ide> * @return string ... | 1 |
Python | Python | add hook_params in basesqloperator | ccb9d04c22dfbe1efa8d0b690ddd929894acff9a | <ide><path>airflow/models/connection.py
<ide> def rotate_fernet_key(self):
<ide> if self._extra and self.is_extra_encrypted:
<ide> self._extra = fernet.rotate(self._extra.encode('utf-8')).decode()
<ide>
<del> def get_hook(self):
<del> """Return hook based on conn_type."""
<add> def get... | 3 |
Mixed | Ruby | add support for `if_not_exists` to indexes | 7ba08037f8d807cce2a25b0445743d07adfbe44c | <ide><path>activerecord/CHANGELOG.md
<add>* Add support for `if_not_exists` option for adding index.
<add>
<add> The `add_index` method respects `if_not_exists` option. If it is set to true
<add> index won't be added.
<add>
<add> Usage:
<add>
<add> ```
<add> add_index :users, :account_id, if_not_exis... | 10 |
Javascript | Javascript | support an unescaped url port | b94ca12fa0b027d8592f5717e038b7b116c59384 | <ide><path>src/ngResource/resource.js
<ide> *
<ide> * @param {string} url A parametrized URL template with parameters prefixed by `:` as in
<ide> * `/user/:username`. If you are using a URL with a port number (e.g.
<del> * `http://example.com:8080/api`), you'll need to escape the colon character before the port
... | 2 |
Javascript | Javascript | replace newlines in deprecation with space | 63f110addb51807613f24d066c3acc51c10c7de9 | <ide><path>tools/doc/html.js
<ide> function parseLists(input) {
<ide> headingIndex = -1;
<ide> heading = null;
<ide> }
<del> tok.text = parseAPIHeader(tok.text);
<add> tok.text = parseAPIHeader(tok.text).replace(/\n/g, ' ');
<ide> output.push({ type: 'html', text: tok.t... | 1 |
Ruby | Ruby | redirect bundler stdout to stderr" | c4d69dd2e903f7faa810da59cf4b307bd8cdd116 | <ide><path>Library/Homebrew/dev-cmd/vendor-gems.rb
<ide> def vendor_gems
<ide> end
<ide>
<ide> ohai "bundle install --standalone"
<del> safe_system_redirect_stdout_to_stderr "bundle", "install", "--standalone"
<add> safe_system "bundle", "install", "--standalone"
<ide>
<ide> ohai "bundle p... | 3 |
Javascript | Javascript | add caveat about symbols to string error message | b9c96cfc73b6e0adcb7b747c40ac40c74995ea7f | <ide><path>eslint-rules/no-primitive-constructors.js
<ide> 'use strict';
<ide>
<ide> module.exports = function(context) {
<add> function report(node, name, msg) {
<add> context.report(node, `Do not use the ${name} constructor. ${msg}`);
<add> }
<add>
<ide> function check(node) {
<ide> const name = node.call... | 1 |
PHP | PHP | bind request on constructor | f07272015670d3296bb8d1aa0571ce55d63a638f | <ide><path>src/Illuminate/Foundation/Application.php
<ide> class Application extends Container implements HttpKernelInterface, TerminableIn
<ide> /**
<ide> * Create a new Illuminate application instance.
<ide> *
<add> * @param \Illuminate\Http\Request $request
<ide> * @return void
<ide> */
<del> public func... | 1 |
Python | Python | remove six dependency | a0801719f8f24a0e3192eca203bbd341c4e557ec | <ide><path>flask/helpers.py
<ide>
<ide> from werkzeug.datastructures import Headers
<ide> from werkzeug.exceptions import NotFound
<del>import six
<ide> from flask._compat import string_types, text_type
<ide>
<ide> # this was moved in 0.7
<ide> def generator():
<ide> # pushed. This item is discarded. Then when ... | 9 |
Javascript | Javascript | add failing test for gh-511 | e530507cb1f7b3cc41e86fd1141c760055f9f890 | <ide><path>test/pummel/test-next-tick-loops-quick.js
<add>var common = require('../common');
<add>var assert = require('assert');
<add>
<add>// Regression test GH-511: https://github.com/ry/node/issues/issue/511
<add>// Make sure nextTick loops quickly
<add>
<add>setTimeout(function () {
<add> t = Date.now() - t;
<add>... | 1 |
Mixed | Javascript | add getter and setter to mocktracker | afed1afa55962211b6b56c2068d520b4d8a08888 | <ide><path>doc/api/test.md
<ide> test('mocks a counting function', (t) => {
<ide> });
<ide> ```
<ide>
<add>### `mock.getter(object, methodName[, implementation][, options])`
<add>
<add><!-- YAML
<add>added: REPLACEME
<add>-->
<add>
<add>This function is syntax sugar for [`MockTracker.method`][] with `options.getter`
<... | 3 |
Javascript | Javascript | add missing return, fix | 5d35df8afa12488ef774b2a1236e8359cad3342a | <ide><path>Libraries/Interaction/InteractionManager.js
<ide> var InteractionManager = {
<ide> then: promise.then.bind(promise),
<ide> done: (...args) => {
<ide> if (promise.done) {
<del> promise.done(...args);
<add> return promise.done(...args);
<ide> } else {
<ide> ... | 1 |
Python | Python | add numpy implementation of f90 spacing function | 0c539e1f2526d09ffefc56ccead470dbbd56cd24 | <ide><path>numpy/testing/tests/test_utils.py
<ide> def test_catch_no_raise(self):
<ide> else:
<ide> raise AssertionError("should have raised an AssertionError")
<ide>
<add>class TestSpacing(unittest.TestCase):
<add> def test_one(self):
<add> for dt, dec in zip([np.float32, np.float64], (1... | 2 |
PHP | PHP | create dropallforeignkeys method for sql server | f8e0662e377544dd0ce78328033f1da995947efb | <ide><path>src/Illuminate/Database/Schema/Builder.php
<ide> public function disableForeignKeyConstraints()
<ide> );
<ide> }
<ide>
<add> /**
<add> * Drop all foreign keys from the database.
<add> *
<add> * @return void
<add> *
<add> * @throws \LogicException
<add> */
<add> publ... | 3 |
Go | Go | remove aliases for deprecated pkg/fsutils | c1729f876c7e4a13e0183cce4d3ac4f6c82bd488 | <ide><path>pkg/fsutils/fsutils_linux.go
<del>package fsutils // import "github.com/docker/docker/pkg/fsutils"
<del>
<del>import "github.com/containerd/continuity/fs"
<del>
<del>// SupportsDType returns whether the filesystem mounted on path supports d_type.
<del>//
<del>// Deprecated: use github.com/containerd/continui... | 1 |
Java | Java | improve javadocs of flatmapsingle and flatmapmaybe | 3f9ffae961506ba560a8d43e936a94eb5f563d3c | <ide><path>src/main/java/io/reactivex/Flowable.java
<ide> public final <U, V> Flowable<V> flatMapIterable(final Function<? super T, ? exte
<ide> }
<ide>
<ide> /**
<del> * Maps each element of the upstream Flowable into MaybeSources, subscribes to them and
<del> * waits until the upstream and all MaybeS... | 2 |
Javascript | Javascript | update preact links in examples | a104cf683888991cafc1762c443dfa9f0d1ff4c9 | <ide><path>examples/data-fetch/pages/preact-stars.js
<ide> function PreactStars({ stars }) {
<ide> }
<ide>
<ide> export async function getStaticProps() {
<del> const res = await fetch('https://api.github.com/repos/developit/preact')
<add> const res = await fetch('https://api.github.com/repos/preactjs/preact')
<ide> ... | 2 |
Ruby | Ruby | allow checksums access | bf828aa36bcee07d6a030b720e12c525ab86c854 | <ide><path>Library/Homebrew/formula_support.rb
<ide> def initialize
<ide> # a Hash, which indicates the platform the checksum applies on.
<ide> Checksum::TYPES.each do |cksum|
<ide> class_eval <<-EOS, __FILE__, __LINE__ + 1
<del> def #{cksum}(val)
<add> def #{cksum}(val=nil)
<add> return @#{cks... | 1 |
PHP | PHP | sync app core.php with tempalte core.php | 3ff9747d02f3805cec4630adf659c6e9512fee13 | <ide><path>app/config/core.php
<ide> *
<ide> * Options:
<ide> *
<del> * - `handler` - callback - The callback to handle errors. You can set this to any callback type,
<add> * - `handler` - callback - The callback to handle errors. You can set this to any callback type,
<ide> * including anonymous functions.
<id... | 1 |
PHP | PHP | add deprecated class stub | 9c72b1e02b9861874f394e169bdbb354555d3f8c | <ide><path>src/Http/ControllerFactory.php
<add><?php
<add>declare(strict_types=1);
<add>
<add>class_alias(
<add> 'Cake\Controller\ControllerFactory',
<add> 'Cake\Http\ControllerFactory',
<add>);
<add>deprecationWarning(
<add> 'Use Cake\Controller\ControllerFactory instead of Cake\Http\ControllerFactory.'
<add>... | 1 |
Ruby | Ruby | check formula name against blacklisted names | 4a9601ab82c1f8093d8d3643bed8b2532f7c4890 | <ide><path>Library/Homebrew/dev-cmd/audit.rb
<ide> require "cmd/search"
<ide> require "cmd/style"
<ide> require "date"
<add>require "blacklist"
<ide>
<ide> module Homebrew
<ide> module_function
<ide> def audit_formula_name
<ide> name = formula.name
<ide> full_name = formula.full_name
<ide>
<add> if black... | 1 |
Python | Python | correct a bug with docker module and server mode | 105920cd8334e6e6e35fa90828dbd08e78aac71d | <ide><path>glances/plugins/glances_docker.py
<ide> def update(self):
<ide> self.reset()
<ide>
<ide> # The Docker-py lib is mandatory
<del> if not docker_tag or self.args.disable_docker:
<add> if not docker_tag or (self.args is not None and self.args.disable_docker):
<ide> retu... | 1 |
Python | Python | use lookup_url_kwarg in presave if required | 216ac8a5c1ba39bf24e4e91b6fac7e0ac1dee7e4 | <ide><path>rest_framework/mixins.py
<ide> def pre_save(self, obj):
<ide> Set any attributes on the object that are implicit in the request.
<ide> """
<ide> # pk and/or slug attributes are implicit in the URL.
<del> lookup = self.kwargs.get(self.lookup_field, None)
<add> lookup_url_... | 1 |
Text | Text | add 16.8.0 changelog and update some readmes | ce6ecd3fbf59bcf245851c6bbbfadfb69c534afe | <ide><path>CHANGELOG.md
<ide> </summary>
<ide> </details>
<ide>
<add>## 16.8.0 (February 6, 2019)
<add>
<add>### React
<add>
<add>* Add [Hooks](https://reactjs.org/docs/hooks-intro.html) — a way to use state and other React features without writing a class. ([@acdlite](https://github.com/acdlite) et al. in [#13968](... | 2 |
Python | Python | add text categorizer to language | baa3d81c3518e9e81bd6bc89382fca1d6c727f33 | <ide><path>spacy/language.py
<ide> from .pipeline import TokenVectorEncoder, NeuralTagger, NeuralEntityRecognizer
<ide> from .pipeline import NeuralLabeller
<ide> from .pipeline import SimilarityHook
<add>from .pipeline import TextCategorizer
<ide>
<ide> from .compat import json_dumps
<ide> from .attrs import IS_STOP
... | 1 |
Text | Text | fix text to follow portuguese language syntax | 47ee0fefa4e25ef34d3add87220611810401ee8b | <ide><path>curriculum/challenges/portuguese/01-responsive-web-design/css-flexbox/align-elements-using-the-align-items-property.portuguese.md
<ide> localeTitle: Alinhar elementos usando a propriedade align-items
<ide> ---
<ide>
<ide> ## Description
<del><section id="description"> A propriedade <code>align-items</code> ... | 1 |
PHP | PHP | use id() as version doesn't exist in phpunit 3.6 | f6c5ceb77a2344d722da07a6edc200694df2009e | <ide><path>lib/Cake/Test/Case/Event/CakeEventManagerTest.php
<ide> public function testDispatchReturnValue() {
<ide> */
<ide> public function testDispatchFalseStopsEvent() {
<ide> $this->skipIf(
<del> version_compare(PHPUnit_Runner_Version::VERSION, '3.7', '<'),
<add> version_compare(PHPUnit_Runner_Version::id(... | 1 |
Text | Text | update changelog for 2.8.3 | 20a9bd4e2279db29a317469c5fd93d5d0ae4fa2d | <ide><path>CHANGELOG.md
<ide> Changelog
<ide> =========
<ide>
<add>### 2.8.3
<add>
<add>Bugfixes:
<add>
<add>* [#1801](https://github.com/moment/moment/issues/1801) proper pluralization for Arabic
<add>* [#1833](https://github.com/moment/moment/issues/1833) improve spm integration
<add>* [#1871](https://github.com/mom... | 1 |
Javascript | Javascript | remove vestigial redirects | b347d157fb2d460d6a711529575547a6a0649983 | <ide><path>app.js
<ide> app.get('/map',
<ide> );
<ide>
<ide> app.get('/live-pair-programming', function(req, res) {
<del> res.redirect(301, '/field-guide/live-stream-pair-programming-on-twitch.tv');
<add> res.redirect(301, '/twitch');
<ide> });
<ide>
<del>app.get('/install-screenhero', function(req, res) {
<del> r... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.