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 | simplify the alias_attribute example [ci skip] | 7e26f7f0f7e3c230c333e1b265727a9b8cf7c91f | <ide><path>activemodel/lib/active_model/attribute_methods.rb
<ide> def attribute_method_affix(*affixes)
<ide>
<ide> # Allows you to make aliases for attributes.
<ide> #
<del> # For example:
<del> #
<ide> # class Person
<del> #
<del> # include ActiveModel::AttributeMethods
<i... | 1 |
Javascript | Javascript | use shorter promise.resolve for empty blocks | d1efe5b5fc07b789c20536514f79aaf21a87b1bd | <ide><path>lib/dependencies/DepBlockHelpers.js
<ide> DepBlockHelpers.getDepBlockPromise = (depBlock, outputOptions, requestShortener,
<ide> return `Promise.all${name}(${pathChunkCheck ? Template.toComment(shortChunkName) : ""}[${chunks.map(requireChunkId).join(", ")}])`;
<ide> }
<ide> }
<del> return "new Promise(... | 1 |
Ruby | Ruby | use homebrew_repository for freshness check | c947dbc58028f6c8efe40e9b3206c04e62fe73e5 | <ide><path>Library/Homebrew/cmd/doctor.rb
<ide> def check_for_bad_python_symlink
<ide> end
<ide>
<ide> def check_for_outdated_homebrew
<del> HOMEBREW_PREFIX.cd do
<add> HOMEBREW_REPOSITORY.cd do
<ide> timestamp = if File.directory? ".git"
<ide> `git log -1 --format="%ct" HEAD`.to_i
<ide> else
<del> ... | 1 |
Text | Text | update object example in using objects for lookups | 9b95c2d95e35dd71872244c9ea33cdb0b6d8ee61 | <ide><path>curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.md
<ide> dashedName: using-objects-for-lookups
<ide>
<ide> Objects can be thought of as a key/value storage, like a dictionary. If you have tabular data, you can use an object to lookup valu... | 1 |
Javascript | Javascript | fix typo in test options | 72dc37581c13362ee7bee60610cf42ae9e0fad4d | <ide><path>test/specs/controller.bar.tests.js
<ide> describe('Chart.controllers.bar', function() {
<ide> },
<ide> options: {
<ide> elements: {
<del> bars: {
<add> bar: {
<ide> backgroundColor: 'rgb(255, 0, 0)',
<ide> borderColor: 'rgb(0, 0, 255)',
<ide> borderWidth: 2, | 1 |
PHP | PHP | fix incomplete test | afa0329330f7eb8884024cd30daf6cf6b50bd37f | <ide><path>lib/Cake/Test/Case/Utility/Set2Test.php
<ide> public function testFormat() {
<ide> * @return void
<ide> */
<ide> public function testFormatNullValues() {
<del> $this->markTestIncomplete('Not done yet');
<del>
<ide> $data = array(
<del> array('Person' => array('first_name' => 'Nate', 'last_name' => 'A... | 1 |
Go | Go | add (hidden) flags to set containerd namespaces | 24ad2f486d92681080a8e257760b047f8de2c71c | <ide><path>cmd/dockerd/config.go
<ide> package main
<ide> import (
<ide> "runtime"
<ide>
<add> "github.com/docker/docker/daemon"
<ide> "github.com/docker/docker/daemon/config"
<ide> "github.com/docker/docker/opts"
<add> "github.com/docker/docker/plugin/executor/containerd"
<ide> "github.com/docker/docker/registry"... | 7 |
Ruby | Ruby | remove needless require | 5ce59f456f4c77b93df69d617f9f20a62546b13e | <ide><path>activejob/lib/active_job/exceptions.rb
<del>require 'active_job/arguments'
<del>
<ide> module ActiveJob
<ide> # Provides behavior for retrying and discarding jobs on exceptions.
<ide> module Exceptions | 1 |
Javascript | Javascript | remove unneeded condition | 3429991d8b43474cab58f067658b5ce81ace58f8 | <ide><path>lib/assert.js
<ide> assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
<ide> };
<ide>
<ide> function expectedException(actual, expected) {
<del> if (!actual || !expected) {
<add> // actual is guaranteed to be an Error object, but we need to check expected.
<add> if (!expected) {... | 1 |
Java | Java | introduce default constructor in tomcathttpserver | d9e3b8b9a5526b5ca31b5a974c684f808adffb6b | <ide><path>spring-web/src/test/java/org/springframework/http/server/reactive/AbstractHttpHandlerIntegrationTests.java
<ide>
<ide> package org.springframework.http.server.reactive;
<ide>
<del>import java.io.File;
<ide> import java.lang.annotation.ElementType;
<ide> import java.lang.annotation.Retention;
<ide> import j... | 4 |
Ruby | Ruby | add test for method `#attributes` | ac623b8511d064419a1ae32d36d1c95c28aba01c | <ide><path>activerecord/test/cases/base_test.rb
<ide> def test_attributes_on_dummy_time_with_invalid_time
<ide> assert_nil topic.bonus_time
<ide> end
<ide>
<add> def test_attributes
<add> category = Category.new(name: "Ruby")
<add>
<add> expected_attributes = category.attribute_names.map do |attribute_nam... | 1 |
Ruby | Ruby | use user path | f11ddb9aab4a6ebfa6a4be8888cca6b6908944aa | <ide><path>Library/Homebrew/cmd/log.rb
<ide> def log_args
<ide> def log
<ide> log_args.parse
<ide>
<add> # As this command is simplifying user run commands then let's just use a
<add> # user path, too.
<add> ENV["PATH"] = ENV["HOMEBREW_PATH"]
<add>
<ide> if ARGV.named.empty?
<ide> git_log HOME... | 1 |
Javascript | Javascript | add rotation (optional) to three.ellipsecurve | 26e3f30e387fa5f8d512e45e7865cb82561637f2 | <ide><path>src/extras/curves/EllipseCurve.js
<ide> * Ellipse curve
<ide> **************************************************************/
<ide>
<del>THREE.EllipseCurve = function ( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise ) {
<add>THREE.EllipseCurve = function ( aX, aY, xRadius, yRadius, aStartAng... | 1 |
Text | Text | fix guide about command_line [ci skip] | 66b92ab81e0734131b968eb62346850f39a6b4fe | <ide><path>guides/source/command_line.md
<ide> Please choose a generator below.
<ide>
<ide> Rails:
<ide> assets
<add> channel
<ide> controller
<ide> generator
<ide> ...
<ide> $ bin/rails generate scaffold HighScore game:string score:integer
<ide> invoke jbuilder
<ide> create app/views/high_sco... | 1 |
Ruby | Ruby | fix comment about session | a91c7b4006f32ba425ca6d88b43fc5078819dd7d | <ide><path>actionpack/lib/action_dispatch/request/session.rb
<ide>
<ide> module ActionDispatch
<ide> class Request < Rack::Request
<del> # SessionHash is responsible to lazily load the session from store.
<add> # Session is responsible for lazily loading the session from store.
<ide> class Session # :nodoc... | 1 |
Ruby | Ruby | add xcode 7.2 | 6b42a0c1f535676a63cba4e09ebc8e1c618eaf41 | <ide><path>Library/Homebrew/os/mac.rb
<ide> def preferred_arch
<ide> "7.0.1" => { :clang => "7.0", :clang_build => 700 },
<ide> "7.1" => { :clang => "7.0", :clang_build => 700 },
<ide> "7.1.1" => { :clang => "7.0", :clang_build => 700 },
<add> "7.2" => { :clang => "7.0", :clang_build => 700 }... | 1 |
Javascript | Javascript | reset branch to dev | 450e71cba34aa0524e67341548dc7635cdf3fc7f | <ide><path>editor/js/Editor.js
<ide> var Editor = function () {
<ide> this.loader = new Loader( this );
<ide>
<ide> this.camera = this.DEFAULT_CAMERA.clone();
<del> this.sceneCameras = [];
<ide>
<ide> this.scene = new THREE.Scene();
<ide> this.scene.name = 'Scene';
<ide><path>editor/js/Sidebar.Object.js
<ide> Sid... | 6 |
Ruby | Ruby | add support for calling nested direct routes | 35afd2c53b4a49a6b4495b167eef233428123b4a | <ide><path>actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
<ide> module Routing
<ide> #
<ide> # Example usage:
<ide> #
<del> # edit_polymorphic_path(@post) # => "/posts/1/edit"
<add> # edit_polymorphic_path(@post) # => "/posts/1/edit"
<ide> # polymorphic_p... | 4 |
Go | Go | add headers when using exec | f86db80b5ff3250a98482b4dc9ff69effbbf2390 | <ide><path>api/server/router/container/exec.go
<ide> func (s *containerRouter) postContainerExecStart(ctx context.Context, w http.Res
<ide> defer httputils.CloseStreams(inStream, outStream)
<ide>
<ide> if _, ok := r.Header["Upgrade"]; ok {
<del> fmt.Fprintf(outStream, "HTTP/1.1 101 UPGRADED\r\nContent-Type: appl... | 2 |
Python | Python | add input layer to the docs | a2e26b12e2c12eaa1d15debfe697e1354c54b6ed | <ide><path>docs/autogen.py
<ide> layers.Activation,
<ide> layers.Dropout,
<ide> layers.Flatten,
<add> layers.Input,
<ide> layers.Reshape,
<ide> layers.Permute,
<ide> layers.RepeatVector, | 1 |
PHP | PHP | remove unused vars | 2781f6494338c232301359bd027fbf4c95a50998 | <ide><path>src/ORM/ResultSet.php
<ide> public function __construct($query, $statement)
<ide> $repository = $query->repository();
<ide> $this->_query = $query;
<ide> $this->_statement = $statement;
<del> $this->_driver = $driver = $this->_query->connection()->driver();
<add> $this->... | 2 |
Javascript | Javascript | handle inextensible `dataset.data` array | ef507e11bd6936a0a60cbd66822aa6aef23df828 | <ide><path>src/core/core.datasetController.js
<ide> helpers.extend(DatasetController.prototype, {
<ide> unlistenArrayEvents(me._data, me);
<ide> }
<ide>
<del> listenArrayEvents(data, me);
<add> if (data && Object.isExtensible(data)) {
<add> listenArrayEvents(data, me);
<add> }
<ide> me._data = data;... | 2 |
Javascript | Javascript | display values in assertionerrors | 745463a0b72c77cecff60cfda175f6185745799a | <ide><path>test/parallel/test-module-relative-lookup.js
<ide> const _module = require('module'); // avoid collision with global.module
<ide> const lookupResults = _module._resolveLookupPaths('./lodash');
<ide> let paths = lookupResults[1];
<ide>
<del>assert.strictEqual(paths[0], '.',
<del> 'Current d... | 1 |
Ruby | Ruby | remove public/ files for api apps | 985d8b25623dfd11972fa6966d0e47695c347084 | <ide><path>railties/lib/rails/generators/rails/app/app_generator.rb
<ide> def delete_application_layout_file_if_api_option
<ide> end
<ide> end
<ide>
<add> def delete_public_files_if_api_option
<add> if options[:api]
<add> remove_file 'public/404.html'
<add> remove_file 'publ... | 2 |
Javascript | Javascript | remove feature flagging import | c021a5ae2a6a60245ce45d680c5b1e0d79efc097 | <ide><path>packages/ember-htmlbars/lib/env.js
<ide> import _Ember from 'ember-metal';
<del>import isEnabled from 'ember-metal/features';
<ide> import environment from 'ember-metal/environment';
<ide>
<ide> import { hooks } from 'htmlbars-runtime';
<ide><path>packages/ember-htmlbars/lib/helpers/each-in.js
<ide> @submod... | 30 |
Text | Text | update reply template for invalid prs | 40c831bbcd5e52fd192ef2c8cdeabbd70d388d06 | <ide><path>docs/moderator-handbook.md
<ide> Thanks again! 😊
<ide> ```markdown
<ide> Hey @username
<ide>
<del>You have not added any content, We will be closing this PR and marking it as `invalid`. 😓️
<add>Thank you for opening this pull request.
<ide>
<del>Feel free to open another PR though! 👍
<add>This is a stan... | 1 |
Text | Text | replace the deprecated -d with docker daemon | b08c6b17685d4af40e9705ca0efddbdffdf2657e | <ide><path>docs/articles/configuring.md
<ide> or `systemd` to manage the `docker` daemon's start and stop.
<ide>
<ide> ### Running the docker daemon directly
<ide>
<del>The `docker` daemon can be run directly using the `-d` option. By default it listens on
<add>The `docker` daemon can be run directly using the `docke... | 1 |
Javascript | Javascript | redirect error to the correct url | fc08fa0c0e2116a493b85c8226760829a4ded0f0 | <ide><path>packages/next/export/worker.js
<ide> export default async function({
<ide> return results
<ide> } catch (error) {
<ide> console.error(
<del> `\nError occurred prerendering page "${path}". Read more: https://err.sh/next.js/prerender-error:\n` +
<add> `\nError occurred prerendering page "${... | 1 |
Python | Python | fix wrong flag name docstring | 70982107b10a24386edb2bb5d636c71ba744c895 | <ide><path>numpy/add_newdocs.py
<ide> copies those elements indicated by this mask.
<ide> * 'writemasked' indicates that only elements where the chosen
<ide> 'arraymask' operand is True will be written to.
<del> * "overlap_allow_same" can be used to mark operands that are
<add... | 1 |
Ruby | Ruby | fix variable name | 367de3523ae7ae1146b092dbaca3720df9e336c2 | <ide><path>Library/Homebrew/dev-cmd/pr-automerge.rb
<ide> def pr_automerge
<ide> query = "is:pr is:open repo:#{tap.full_name}"
<ide> query += Homebrew.args.ignore_failures? ? " -status:pending" : " status:success"
<ide> query += " review:approved" unless Homebrew.args.without_approval?
<del> query += " l... | 1 |
Javascript | Javascript | update description about removeclippedsubviews | 8080583f528b048f5b2a9fa86580e1055611ce38 | <ide><path>Libraries/CustomComponents/ListView/ListView.js
<ide> var ListView = React.createClass({
<ide> */
<ide> onChangeVisibleRows: React.PropTypes.func,
<ide> /**
<del> * An experimental performance optimization for improving scroll perf of
<add> * A performance optimization for improving scro... | 1 |
Javascript | Javascript | use mapdispatchtoprops to bind actions efficiently | def86ae9af3b85259d167913b7eb81e677c5cb05 | <ide><path>examples/todomvc/containers/App.js
<ide> import * as TodoActions from '../actions/todos';
<ide>
<ide> class App extends Component {
<ide> render() {
<del> const { todos, dispatch } = this.props;
<del> const actions = bindActionCreators(TodoActions, dispatch);
<del>
<add> const { todos, actions } ... | 1 |
Go | Go | use syscall consts, check for errors, | 45262c4cb057e78ba98d02b5e0121ed402779c7f | <ide><path>api/client/cli.go
<ide> func NewDockerCli(in io.ReadCloser, out, err io.Writer, keyFile string, proto, a
<ide> scheme = "https"
<ide> }
<ide> if in != nil {
<del> inFd, isTerminalIn = term.GetHandleInfo(in)
<add> inFd, isTerminalIn = term.GetFdInfo(in)
<ide> }
<ide>
<ide> if out != nil {
<del> outF... | 6 |
Text | Text | remove dead link | 8d291e91e68ce942ed4a2232cc81405b8b432b08 | <ide><path>docs/community/videos.md
<ide> Facebook engineers [Bill Fisher](https://twitter.com/fisherwebdev) and [Jing Che
<ide>
<ide> <iframe width="100%" height="366" src="https://www.youtube-nocookie.com/embed/i__969noyAM" frameborder="0" allowfullscreen></iframe>
<ide>
<del>### Server-Side Rendering of Isomorphic... | 1 |
PHP | PHP | add console events | b26a9faacc933f5c56dd1b72cc5e443627317aa4 | <ide><path>src/Illuminate/Console/Application.php
<ide> use Symfony\Component\Console\Input\ArrayInput;
<ide> use Symfony\Component\Console\Input\InputOption;
<ide> use Symfony\Component\Process\PhpExecutableFinder;
<add>use Symfony\Component\Console\Input\InputInterface;
<ide> use Symfony\Component\Console\Output\Buff... | 3 |
Python | Python | prepare 2.0.8 release | c7dd36a1bab362de478f528078261439b803aaa7 | <ide><path>keras/__init__.py
<ide> # Importable from root because it's technically not a layer
<ide> from .layers import Input
<ide>
<del>__version__ = '2.0.7'
<add>__version__ = '2.0.8'
<ide><path>setup.py
<ide>
<ide>
<ide> setup(name='Keras',
<del> version='2.0.7',
<add> version='2.0.8',
<ide> desc... | 2 |
Javascript | Javascript | add gltfloader pointsmaterial support | 8e56415cc65d0e0d061e559e94b07006f8a2eaa0 | <ide><path>examples/js/loaders/GLTFLoader.js
<ide> THREE.GLTFLoader = ( function () {
<ide>
<ide> } else if ( primitive.mode === WEBGL_CONSTANTS.POINTS ) {
<ide>
<add> var cacheKey = 'PointsMaterial:' + material.uuid;
<add>
<add> var pointsMaterial = scope.cache.get( cacheKey );
<add>
<add> if ( !... | 1 |
PHP | PHP | fix coding standards in datasource tests | 346e048371178d6fbd04f9d611596d4f0eb39350 | <ide><path>lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
<ide> * @package Cake.Test.Case.Model.Datasource.Database
<ide> */
<ide> class MysqlTest extends CakeTestCase {
<add>
<ide> /**
<ide> * autoFixtures property
<ide> *
<ide> public function testIndexDetection() {
<ide> $this->Dbo->rawQuery(... | 4 |
Javascript | Javascript | throw error for invalid remotes | 40be69b50aed925c605216ef6a297f1d2c240cd5 | <ide><path>lib/util/extractUrlAndGlobal.js
<ide> */
<ide> module.exports = function extractUrlAndGlobal(urlAndGlobal) {
<ide> const index = urlAndGlobal.indexOf("@");
<add> if (index <= 0 || index === urlAndGlobal.length - 1) {
<add> throw new Error(`Invalid request "${urlAndGlobal}"`);
<add> }
<ide> return [urlAnd... | 2 |
Ruby | Ruby | remove debug statements | debc202d1e1e819d9263c85c80669252b3dd650c | <ide><path>Library/Homebrew/dev-cmd/bottle.rb
<ide> def bottle_formula(f)
<ide> bottle.sha256 sha256 => Utils::Bottles.tag
<ide>
<ide> old_spec = f.bottle_specification
<del> p root_url
<del> p old_spec.root_url(root_url)
<del> p bottle.root_url(root_url)
<ide> if ARGV.include?("--keep-old") && !o... | 1 |
Text | Text | fix typo in dockerlinks.md | e1f012cf397f170e12443e4993c09171791d37db | <ide><path>docs/userguide/networking/default_network/dockerlinks.md
<ide> in your network stack as `docker0`.
<ide>
<ide> This section briefly discuss connecting via a network port and then goes into
<ide> detail on container linking. While links are still supported on Docker's default
<del>network (`bridge bridge`), ... | 1 |
Javascript | Javascript | fix no nice decoration in webui processlist | e13e37fd685ea6793df5102a304a0d1be764a366 | <ide><path>glances/outputs/static/js/services/plugins/glances_processlist.js
<ide> glancesApp.service('GlancesPluginProcessList', function($filter, GlancesPlugin)
<ide> }
<ide> }
<ide>
<del> process.isNice = process.nice !== undefined && ((data['system'].os_name === 'Windows' && ... | 1 |
Ruby | Ruby | fix typo of using where instead of were | 13b3c4636551e6f3007f701afea17d7aa92f4f76 | <ide><path>activejob/lib/active_job/test_helper.rb
<ide> def assert_enqueued_with(job: nil, args: nil, at: nil, queue: nil, priority: nil
<ide>
<ide> message = +"No enqueued job found with #{expected}"
<ide> if potential_matches.empty?
<del> message << "\n\nNo jobs where enqueued"
<add> messa... | 2 |
Java | Java | add converter support for stream | 018adb04f26ba51e680449eb60b357de0b9c960f | <ide><path>spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
<ide> /*
<del> * Copyright 2002-2014 the original author or authors.
<add> * Copyright 2002-2015 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may no... | 5 |
Javascript | Javascript | remove excess example spacing | f3ac981c46340769beb99efa7957045377bd8813 | <ide><path>packages/rn-tester/js/components/RNTesterBlock.js
<ide> const styles = StyleSheet.create({
<ide> color: 'black',
<ide> },
<ide> children: {
<del> paddingTop: 10,
<del> paddingHorizontal: 10,
<del> margin: 10,
<add> marginHorizontal: 20,
<add> marginVertical: 10,
<ide> },
<ide> });
<i... | 1 |
Javascript | Javascript | remove shoulddeprioritizesubtree from host config | 103ed08c46198d01119ef35c37d78c6bc89705db | <ide><path>packages/react-art/src/ReactARTHostConfig.js
<ide> export function resetTextContent(domElement) {
<ide> // Noop
<ide> }
<ide>
<del>export function shouldDeprioritizeSubtree(type, props) {
<del> return false;
<del>}
<del>
<ide> export function getRootHostContext() {
<ide> return NO_CONTEXT;
<ide> }
<ide... | 17 |
PHP | PHP | add finder options to paginator->paginate method | 56d6f04136b553b1a2ee46c7cedd3b9ca801ce63 | <ide><path>src/Controller/Component/PaginatorComponent.php
<ide> public function paginate($object, array $settings = []) {
<ide> unset($options['finder'], $options['maxLimit']);
<ide>
<ide> if (empty($query)) {
<del> $query = $object->find($type);
<add> $query = $object->find($type, $options);
<ide> }
<ide> ... | 3 |
Python | Python | add network_id to subnet | 38a42b8e9b947370eae2fda487f56fef6226d8c6 | <ide><path>libcloud/compute/drivers/openstack.py
<ide> def _to_subnet(self, obj):
<ide> return OpenStack_2_SubNet(id=obj['id'],
<ide> name=obj['name'],
<ide> cidr=obj['cidr'],
<add> network_id=obj['network_id'],... | 1 |
Javascript | Javascript | track callback invocations | 7e5ed8bad9b135c710a6623ed34e2c78de3b53de | <ide><path>test/sequential/test-net-listen-shared-ports.js
<ide> const net = require('net');
<ide> if (cluster.isMaster) {
<ide> const worker1 = cluster.fork();
<ide>
<del> worker1.on('message', function(msg) {
<add> worker1.on('message', common.mustCall(function(msg) {
<ide> assert.strictEqual(msg, 'success')... | 1 |
PHP | PHP | bind the kernels as singletons | aa8bf8a211fed6413e5c27a687b2a9f227480a3f | <ide><path>bootstrap/app.php
<ide> |
<ide> */
<ide>
<del>$app->bind(
<add>$app->singleton(
<ide> 'Illuminate\Contracts\Http\Kernel',
<ide> 'App\Http\Kernel'
<ide> );
<ide>
<del>$app->bind(
<add>$app->singleton(
<ide> 'Illuminate\Contracts\Console\Kernel',
<ide> 'App\Console\Kernel'
<ide> ); | 1 |
Ruby | Ruby | allow parameter delimiter without space | 6937ecfad39743cf744e4179663b89a944477995 | <ide><path>actionpack/lib/action_dispatch/http/mime_type.rb
<ide> def unregister(symbol)
<ide> MIME_NAME = "[a-zA-Z0-9][a-zA-Z0-9#{Regexp.escape('!#$&-^_.+')}]{0,126}"
<ide> MIME_PARAMETER_KEY = "[a-zA-Z0-9][a-zA-Z0-9#{Regexp.escape('!#$&-^_.+')}]{0,126}"
<ide> MIME_PARAMETER_VALUE = "#{Regexp.escape('"')}?... | 2 |
Ruby | Ruby | add header parsing | b9b917756c6408f20a341fe47fe0385d067f14d1 | <ide><path>Library/Homebrew/utils/curl.rb
<ide> def curl(*args, print_stdout: true, **options)
<ide> result
<ide> end
<ide>
<add> def parse_headers(headers)
<add> headers.split("\n").to_h do |h|
<add> partitioned = h.partition(": ")
<add> [partitioned.first, partitioned.last]
<add> ... | 1 |
Ruby | Ruby | allow keg only berkeley-db | 212a9efaf54ebd0414144059c54bbeead95b137e | <ide><path>Library/Homebrew/rubocops/uses_from_macos.rb
<ide> class ProvidedByMacos < FormulaCop
<ide> PROVIDED_BY_MACOS_FORMULAE = %w[
<ide> apr
<ide> bc
<add> berkeley-db
<ide> bison
<ide> bzip2
<ide> cups | 1 |
Text | Text | replace single bactick with <code> tag for crowdin | 22f017caa2ed57a6f8c61f0d67845472a83a2c26 | <ide><path>curriculum/challenges/english/05-apis-and-microservices/mongodb-and-mongoose/use-model.find-to-search-your-database.md
<ide> In its simplest usage, `Model.find()` accepts a query document (a JSON object) a
<ide>
<ide> # --instructions--
<ide>
<del>Modify the `findPeopleByName` function to find all the peop... | 1 |
Javascript | Javascript | add trump blocker | 69d5ddd349d708cfa549f0a28b08d6d07e83305c | <ide><path>website/src/react-native/showcase.js
<ide> var apps = [
<ide> link: 'https://itunes.apple.com/cn/app/tong-xing-wang/id914254459?mt=8',
<ide> author: 'Ho Yin Tsun Eugene',
<ide> },
<add> {
<add> name: 'Trump Blocker - That Filters Every Link',
<add> icon: 'http://a2.mzstatic.com/us/r30/Purple... | 1 |
PHP | PHP | remove un-necessary calls to constructclasses() | a42d56a55a75a246d9e78fecce4c9f80426bdc2b | <ide><path>src/Controller/Controller.php
<ide> public function components() {
<ide> * This method will also set the component to a property.
<ide> * For example:
<ide> *
<del> * `$this->addComponent('DebugKit.Toolbar');`
<add> * `$this->addComponent('Acl.Acl');`
<ide> *
<ide> * Will result in a `Toolbar` property ... | 10 |
Python | Python | fix multi-target name in `ccompileropt`'s report | d54a45b28fdaad24eedf8a2ffee19d9afc7f2e69 | <ide><path>numpy/distutils/ccompiler_opt.py
<ide> def report(self, full=False):
<ide> else:
<ide> dispatch_rows.append(("Generated", ''))
<ide> for tar in self.feature_sorted(target_sources):
<del> tar_as_seq = [tar] if isinstance(tar, str) else tar
<ide> s... | 1 |
Python | Python | pass conf to subdags | 2e8b4ece36b2edf20e50331fbc55269033755954 | <ide><path>airflow/operators/subdag_operator.py
<ide> The module which provides a way to nest your DAGs and so your levels of complexity.
<ide> """
<ide> from enum import Enum
<del>from typing import Optional
<add>from typing import Dict, Optional
<ide>
<ide> from sqlalchemy.orm.session import Session
<ide>
<ide> cla... | 2 |
Javascript | Javascript | add note about shims needed for ie | eee2ef6e9df90ba41a7a7d8a90d16665272b412c | <ide><path>src/ngComponentRouter/Router.js
<ide> * @installation
<ide> * ## Installation
<ide> *
<del> * Currently use `npm` to install the **Component Router** module:
<add> * Currently, the **Component Router** module must be installed via `npm`, it is not yet available
<add> * on Bower or the Google CDN.
<ide> *... | 1 |
Ruby | Ruby | make index options to kwargs | b9e5859c6f956d25a73bea19133ab65aad41be62 | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
<ide> def add_to(table)
<ide> end
<ide>
<ide> if index
<del> table.index(column_names, index_options)
<add> table.index(column_names, **index_options)
<ide> end
<ide>
<ide> if... | 11 |
Ruby | Ruby | remove reference to 'brew install pip' | cfdca92630aba29dab108bbc965b084ab7a34b37 | <ide><path>Library/Homebrew/exceptions.rb
<ide> def message
<ide>
<ide> def tool
<ide> case type
<del> when :python then 'pip'
<add> when :python then 'easy_install'
<ide> when :ruby, :jruby then 'rubygems'
<ide> when :perl then 'cpan'
<ide> end
<ide> def tool
<ide> def command_line
<... | 1 |
Java | Java | accept double args in scrollview.scrollto | df36e388f17d50a08ec890a0608aec48313684d3 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewCommandHelper.java
<ide> public static <T> void receiveCommand(
<ide> Assertions.assertNotNull(args);
<ide> switch (commandType) {
<ide> case COMMAND_SCROLL_TO: {
<del> int destX = Math.round(PixelUtil.toPixelFromD... | 1 |
Javascript | Javascript | fix bug with tostring | c7fa237e32581da8be1388d7f6a58ce5d8e3a9d5 | <ide><path>dist/Sequence.js
<ide> var Immutable = require('./Immutable');
<ide> };
<ide>
<ide>
<del>Sequence.prototype.inspect = Sequence.prototype.toSource = Sequence.prototype.toString;
<add>Sequence.prototype.inspect = Sequence.prototype.toSource = function() { return this.toString(); };
<ide> Sequence.prototype... | 2 |
Java | Java | avoid npe in hasunresolvablegenerics() | 6cfbcf4f17eb43224cbb1613c0c800a955b40260 | <ide><path>spring-core/src/main/java/org/springframework/core/ResolvableType.java
<ide> public boolean hasUnresolvableGenerics() {
<ide> }
<ide> }
<ide> Class<?> resolved = resolve();
<del> Type[] ifcs = resolved.getGenericInterfaces();
<del> for (Type ifc : ifcs) {
<del> if (ifc instanceof Class) {
<del> ... | 1 |
PHP | PHP | fresh command | f6511d477f73b3033ef2336257f4cac5f20594a0 | <ide><path>src/Illuminate/Database/Console/Migrations/FreshCommand.php
<add><?php
<add>
<add>namespace Illuminate\Database\Console\Migrations;
<add>
<add>use Illuminate\Console\Command;
<add>use Illuminate\Console\ConfirmableTrait;
<add>use Symfony\Component\Console\Input\InputOption;
<add>
<add>class FreshCommand exte... | 2 |
Go | Go | return usage on parseexec error | 7fdbd90f8805736aa78156faf7e6f8fdd2384af7 | <ide><path>api/client/commands.go
<ide> func (cli *DockerCli) CmdExec(args ...string) error {
<ide>
<ide> execConfig, err := runconfig.ParseExec(cmd, args)
<ide> if err != nil {
<add> cmd.Usage()
<ide> return err
<ide> }
<ide> if execConfig.Container == "" {
<ide><path>integration-cli/docker_cli_exec_test.go
<i... | 2 |
Ruby | Ruby | use zero-padding for number_to_rounded_converter | 9bf2e5ec305bcb5aa7713fea66ac0fbfbad0612a | <ide><path>activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb
<ide> def convert
<ide> a, b = s.split('.', 2)
<ide> a + '.' + b[0, precision]
<ide> else
<del> "%01.#{precision}f" % rounded_number
<add> "%00.#{precision}f" % rounded_number... | 1 |
Javascript | Javascript | remove unnecessary timer | 755e07cb738558841880e32795b6f1df4005c5b9 | <ide><path>test/addons-napi/test_callback_scope/test-resolve-async.js
<ide> 'use strict';
<ide>
<ide> const common = require('../../common');
<del>const assert = require('assert');
<ide> const { testResolveAsync } = require(`./build/${common.buildType}/binding`);
<ide>
<del>let called = false;
<del>testResolveAsync()... | 1 |
Text | Text | fix small typo in configuring guide [skip ci] | 6bf5c2af94fb7a9e805e732ad0cb8bafc77c63cb | <ide><path>guides/source/configuring.md
<ide> NOTE: There is no guarantee that your initializers will run after all the gem in
<ide>
<ide> NOTE: You can use subfolders to organize your initializers if you like, because Rails will look into the whole file hierarchy from the initializers folder on down.
<ide>
<del>TIP:... | 1 |
Mixed | Ruby | remove deprecated `databaseconfig#config` method | 7b9d4d2d8a6a7e2bb489343e83e7aa24dbcd2c7e | <ide><path>activerecord/CHANGELOG.md
<add>* Remove deprecated `DatabaseConfig#config` method.
<add>
<add> *Rafael Mendonça França*
<add>
<ide> * Rollback transactions when the block returns earlier than expected.
<ide>
<ide> Before this change, when a transaction block returned early, the transaction would ... | 5 |
Ruby | Ruby | add license field as parsable arg | d92f747b1e1ac9e4fdc4f839174cf36d89aab879 | <ide><path>Library/Homebrew/dev-cmd/create.rb
<ide> def create_args
<ide> description: "Explicitly set the <name> of the new formula."
<ide> flag "--set-version=",
<ide> description: "Explicitly set the <version> of the new formula."
<add> flag "--set-license=",
<add> ... | 2 |
PHP | PHP | info | ce879dd84d2d86023a0d50c6e34873a0b25fddd3 | <ide><path>src/Illuminate/Notifications/Messages/SlackMessage.php
<ide> class SlackMessage
<ide> */
<ide> public $http = [];
<ide>
<add> /**
<add> * Indicate that the notification gives information about an operation.
<add> *
<add> * @return $this
<add> */
<add> public function info()
<a... | 1 |
Text | Text | adjust application pack in webpacker guide | 6d0773a468a1f45e7f35ddfe44af48adeaf0ca76 | <ide><path>guides/source/webpacker.md
<ide> So if you have a file called `app/javascript/packs/application.js`, Webpacker wi
<ide> The default pack created for you by Webpacker will link to Rails default JavaScript packages if they have been included in the project:
<ide>
<ide> ```
<del>require("@rails/ujs").start()
<... | 1 |
Text | Text | update nodejitsu logo | 8bd9c0c71c7b18955d5639b658cccff9a83b12da | <ide><path>README.md
<ide> Add this to `package.json`, after *name* and *version*. This is necessary becaus
<ide> - **Note**: The first time you run this command, you have to pass `-f` (force) flag because OpenShift creates a dummy server with the welcome page when you create a new Node.js app. Passing `-f` flag will ... | 1 |
Text | Text | revise addon mulitple initializations text | 850c4668bad7f705d8a0a0bbbd24b5ea0c4b01c5 | <ide><path>doc/api/addons.md
<ide> There are environments in which Node.js addons may need to be loaded multiple
<ide> times in multiple contexts. For example, the [Electron][] runtime runs multiple
<ide> instances of Node.js in a single process. Each instance will have its own
<ide> `require()` cache, and thus each in... | 1 |
Python | Python | add note for future optimisation | cbf9bdcf5481ed25ea302e85f2b6adf68edf3b5b | <ide><path>glances/plugins/glances_plugin.py
<ide> def set_stats(self, input_stats):
<ide>
<ide> def set_stats_snmp(self, snmp_oid={}):
<ide> # Update stats using SNMP
<add> # TODO: optimisation with bulk command:
<add> # http://pysnmp.sourceforge.net/examples/4.x/v3arch/oneliner/manager/bul... | 1 |
Javascript | Javascript | fix doc api | 7830f434af827923e1c3cdeee4103f5535047183 | <ide><path>packages/ember-runtime/lib/system/array_proxy.js
<ide> var get = Ember.get, set = Ember.set;
<ide> A simple example of usage:
<ide>
<ide> var pets = ['dog', 'cat', 'fish'];
<del> var arrayProxy = Ember.ArrayProxy.create({ content: Ember.A(pets) });
<add> var ap = Ember.ArrayProxy.create({ ... | 1 |
Javascript | Javascript | fix race write() before and after connect() | cd5d2473a463cec5d2d1eeeac4770aa1b20a692a | <ide><path>lib/net.js
<ide> function afterConnect(status, handle, req, readable, writable) {
<ide> handle.readStart();
<ide> }
<ide>
<del> self.emit('connect');
<del>
<ide> if (self._connectQueue) {
<ide> debug('Drain the connect queue');
<ide> for (var i = 0; i < self._connectQueue.length... | 2 |
PHP | PHP | remove unused import | 942f1d38f33bdb6d1bc5f978805836083794a96d | <ide><path>src/Cache/Cache.php
<ide> namespace Cake\Cache;
<ide>
<ide> use Cake\Cache\Engine\NullEngine;
<del>use Cake\Core\ObjectRegistry;
<ide> use Cake\Core\StaticConfigTrait;
<ide> use InvalidArgumentException;
<ide> use RuntimeException; | 1 |
Ruby | Ruby | add tests for argument error cases | 5bbab5110b141df0f856221a59a6f4ad1ea7c88c | <ide><path>actionpack/test/dispatch/routing_test.rb
<ide> def draw(&block)
<ide> @app.draw(&block)
<ide> end
<ide>
<add> def test_missing_controller
<add> ex = assert_raises(ArgumentError) {
<add> draw do
<add> get '/foo/bar', :to => :index
<add> end
<add> }
<add> assert_match(/Missing... | 1 |
Javascript | Javascript | improve concat() performance | 2170259940fc5d1e9d3a6cd425f8e761dbb99432 | <ide><path>benchmark/buffers/buffer-concat-fill.js
<add>'use strict';
<add>const common = require('../common.js');
<add>
<add>const bench = common.createBenchmark(main, {
<add> extraSize: [1, 256, 4 * 256],
<add> n: [8e5]
<add>});
<add>
<add>function main({ n, extraSize }) {
<add> const pieces = 4;
<add> const piec... | 3 |
Ruby | Ruby | apply tables to the whole tree from the outside | c5fe508df19028d9fcb5c958019f61b55b24edb1 | <ide><path>activerecord/lib/active_record/associations/join_dependency.rb
<ide> def initialize(base, associations, joins)
<ide> @alias_tracker.aliased_name_for(base.table_name) # Updates the count for base.table_name to 1
<ide> tree = self.class.make_tree associations
<ide> build tree, @join_roo... | 1 |
Javascript | Javascript | improve the explanation of keys | 9093efe062a9d60a35136e444e2130daa6161988 | <ide><path>src/ng/directive/ngRepeat.js
<ide> * <div ng-repeat="(key, value) in myObj"> ... </div>
<ide> * ```
<ide> *
<del> * You need to be aware that the JavaScript specification does not define what order
<del> * it will return the keys for an object. (To mitigate this in Angular 1.3 the `ngRepeat` directive
<ad... | 1 |
Java | Java | use typereference consistently in hints writer | 100ce9642afb14b806e42ae9277f77171a7bc04c | <ide><path>spring-core/src/main/java/org/springframework/aot/nativex/ProxyHintsWriter.java
<ide>
<ide> import org.springframework.aot.hint.JdkProxyHint;
<ide> import org.springframework.aot.hint.ProxyHints;
<del>import org.springframework.aot.hint.TypeReference;
<ide>
<ide> /**
<ide> * Write {@link JdkProxyHint}s co... | 4 |
Java | Java | fix tests and checkstyle violations | 52453279622a1b2b27c33cfb8d082516be601bbe | <ide><path>spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java
<ide> private class IframeHandler implements SockJsRequestHandler {
<ide> <!DOCTYPE html>
<ide> <html>
<ide> <head>
<del> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<d... | 4 |
Java | Java | isolate thrown exception in asserttests | dba48a1ff5eef94504a129902d59788c4dfd0c6b | <ide><path>spring-core/src/test/java/org/springframework/util/AssertTests.java
<ide> /*
<del> * Copyright 2002-2013 the original author or authors.
<add> * Copyright 2002-2015 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this ... | 1 |
PHP | PHP | update docblocks as suggested | 44a014a9d8e296bf628793eb33646b36360a7b9e | <ide><path>src/View/Helper/UrlHelper.php
<ide> public function build($url = null, $full = false)
<ide> }
<ide>
<ide> /**
<del> * Generate URL for given image file. Depending on options passed provides full URL
<del> * with domain name. Also calls Helper::assetTimestamp() to add timestamp to local files... | 1 |
Python | Python | fix bug in flax seq2seq models | 741e49305d31cd76028cfcf82638b1e40183e8b4 | <ide><path>src/transformers/models/encoder_decoder/modeling_flax_encoder_decoder.py
<ide>
<ide> [What are decoder input IDs?](../glossary#decoder-input-ids)
<ide>
<del> For sequence to sequence training, `decoder_input_ids` should be provided. If no `decoder_input_ids` is
<del> provi... | 2 |
Go | Go | avoid extra notification on node leave | 3e544bc500fee6ac353361bbb2e2092841f8b65b | <ide><path>libnetwork/networkdb/event_delegate.go
<ide> func (e *eventDelegate) NotifyLeave(mn *memberlist.Node) {
<ide> // If the node instead left because was going down, then it makes sense to just delete all its state
<ide> e.nDB.Lock()
<ide> defer e.nDB.Unlock()
<del> e.nDB.deleteNetworkEntriesForNode(mn.Name)
... | 2 |
Python | Python | add test for new __ne__ method on promise | 52d2a8b3119479246225f7f888c370320cf8622f | <ide><path>tests/utils_tests/test_functional.py
<ide> def value(self):
<ide>
<ide> # check that it behaves like a property when there's no instance
<ide> self.assertIsInstance(A.value, cached_property)
<add>
<add> def test_lazy_equality(self):
<add> """
<add> Tests that == and != work ... | 1 |
Python | Python | add tests for basecontentnegotiation | c2ce2fb3f05da00134d5fc671f017ea3eed3c66f | <ide><path>tests/test_negotiation.py
<ide> from django.http import Http404
<ide> from django.test import TestCase
<ide>
<del>from rest_framework.negotiation import DefaultContentNegotiation
<add>from rest_framework.negotiation import (
<add> BaseContentNegotiation, DefaultContentNegotiation
<add>)
<ide> from rest_f... | 1 |
Python | Python | fix typos in docstrings | 67c428f7e0431b1a8197dcf939936653d0a3a059 | <ide><path>keras/callbacks.py
<ide> class BackupAndRestore(Callback):
<ide> >>> history = model.fit(np.arange(100).reshape(5, 20), np.zeros(5),
<ide> ... epochs=10, batch_size=1, callbacks=[callback],
<ide> ... verbose=0)
<del> >>> # Only 6 more epochs are run, sin... | 2 |
Ruby | Ruby | remove unnecessary check for pour_bottle? | d1e6f04651ea87654d13c6a786e57581eb22ec15 | <ide><path>Library/Homebrew/formula_installer.rb
<ide> def summary
<ide> end
<ide>
<ide> def build_time
<del> @build_time ||= Time.now - @start_time unless pour_bottle? or ARGV.interactive? or @start_time.nil?
<add> @build_time ||= Time.now - @start_time unless ARGV.interactive? or @start_time.nil?
<ide> e... | 1 |
Python | Python | fix it to work with bart | c225e872ed4129a8939bfb9fb567ea0cfba797dd | <ide><path>examples/question-answering/run_squad.py
<ide> def train(args, train_dataset, model, tokenizer):
<ide> "end_positions": batch[4],
<ide> }
<ide>
<del> if args.model_type in ["xlm", "roberta", "distilbert", "camembert"]:
<add> if args.model_type in ["xlm", "ro... | 1 |
Ruby | Ruby | add test to make sure pick works in a nullrelation | 4c615a53e0409ddddf13d48cbc328a22d0026ed2 | <ide><path>activerecord/test/cases/calculations_test.rb
<ide> def test_pluck_loaded_relation_sql_fragment
<ide>
<ide> def test_pick_one
<ide> assert_equal "The First Topic", Topic.order(:id).pick(:heading)
<add> assert_nil Topic.none.pick(:heading)
<ide> assert_nil Topic.where("1=0").pick(:heading)
<ide> ... | 1 |
Javascript | Javascript | fix wrong spacing for format 6 | 841fabd4e99214f63f1a0e504e0ac53cec68956c | <ide><path>fonts.js
<ide> var Font = (function Font() {
<ide> var index = firstCode;
<ide> for (var j = start; j <= end; j++) {
<ide> var code = j - firstCode - 1;
<del> var mapping = encoding[index + 1] || {};
<add> var mapping = encoding[index] || {};
<i... | 1 |
Ruby | Ruby | silence all specs by default | 2ad3a87045246f89aa267251315d660f663c42f2 | <ide><path>Library/Homebrew/test/cask/accessibility_spec.rb
<ide> sudo: true,
<ide> )
<ide>
<del> shutup do
<del> installer.enable_accessibility_access
<del> end
<add> installer.enable_accessibility_access
<ide> end
<ide>
<ide> it "warns about disabling accessibility access... | 74 |
Text | Text | add stroeer labs to airflow users list | cc4f245758340f5fc278bbbdc958a40b85f39bb8 | <ide><path>INTHEWILD.md
<ide> Currently, **officially** using Airflow:
<ide> 1. [Strava](https://strava.com) [[@strava](https://github.com/strava), [@dhuang](https://github.com/dhuang) & [@liamstewart](https://github.com/liamstewart)]
<ide> 1. [Stripe](https://stripe.com) [[@jbalogh](https://github.com/jbalogh)]
<ide> ... | 1 |
Ruby | Ruby | skip `mtime` for non-existent symlink | ae18bdf1619103ab6a5b78d94df9c150ae8e0f03 | <ide><path>Library/Homebrew/cleanup.rb
<ide> def prune?(days)
<ide> return false unless days
<ide> return true if days.zero?
<ide>
<add> return true if symlink? && !exist?
<add>
<ide> # TODO: Replace with ActiveSupport's `.days.ago`.
<ide> mtime < ((@time ||= Time.now) - days * 60 * 60 * 2... | 1 |
Javascript | Javascript | remove redundant log in network.js | 0f4fe7f762e60b3add20d7c7d6584b14212a4db1 | <ide><path>src/network.js
<ide> // // TODO(mack): dump() doesn't seem to work here...
<ide> // dump(msg + '\n');
<ide> //}
<del>//#else
<del>function log(aMsg) {
<del> console.log(aMsg);
<del>}
<ide> //#endif
<ide>
<ide> var NetworkManager = (function NetworkManagerClosure() { | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.