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 |
|---|---|---|---|---|---|
PHP | PHP | add integration test for route fluent methods | ebee4628ec72349e685c304bc598b0f47d07f98c | <ide><path>tests/TestCase/Routing/RouteBuilderTest.php
<ide> public function testHttpMethods($method)
<ide> $route->defaults
<ide> );
<ide> }
<add>
<add> /**
<add> * Integration test for http method helpers and route fluent method
<add> *
<add> * @return void
<add> */
<add> ... | 1 |
Python | Python | correct an issue if section did not exist | aea9942361b15e6c071bc05a6b07c13053e4086a | <ide><path>glances/config.py
<ide> from io import open
<ide> import re
<ide>
<del>from glances.compat import ConfigParser, NoOptionError, system_exec
<add>from glances.compat import ConfigParser, NoOptionError, NoSectionError, system_exec
<ide> from glances.globals import BSD, LINUX, MACOS, SUNOS, WINDOWS
<ide> from g... | 2 |
Python | Python | fix broken test | 3d8ee16fde083e712e70b0a8066924e044c8dbe5 | <ide><path>libcloud/test/storage/test_aurora.py
<ide> # See the License for the specific language governing permissions and
<ide> # limitations under the License.
<ide>
<add>import sys
<ide> import unittest
<ide>
<ide> from libcloud.storage.drivers.auroraobjects import AuroraObjectsStorageDriver
<ide> class AuroraObj... | 1 |
Python | Python | fix printing of complicated dtypes | 984bd6ce8c464f921d273898a2546506778986a7 | <ide><path>numpy/core/_internal.py
<ide> def _usefields(adict, align):
<ide> def _array_descr(descriptor):
<ide> fields = descriptor.fields
<ide> if fields is None:
<del> return descriptor.str
<add> subdtype = descriptor.subdtype
<add> if subdtype is None:
<add> return descriptor... | 1 |
Mixed | Javascript | handle runtime errors (#268) | c7ba914f527ebcfe084cb0e36946b9dee00d25fa | <ide><path>README.md
<ide> import React from 'react'
<ide>
<ide> export default class Error extends React.Component {
<ide> static getInitialProps ({ res, xhr }) {
<del> const statusCode = res ? res.statusCode : xhr.status
<add> const statusCode = res ? res.statusCode : (xhr ? xhr.status : null)
<ide> retu... | 9 |
Javascript | Javascript | use proper clearcoat variable | b5c1e4d96e962e09646ab29e507a3bb1a2b23725 | <ide><path>src/renderers/shaders/ShaderLib/meshphysical.glsl.js
<ide> void main() {
<ide>
<ide> vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
<ide>
<del> outgoingLight = outgoingLight * ( 1.0 - clearcoat * Fcc ) + clearcoatSpecular * clearcoat;
<add> outgoingLight = outgoingLight *... | 1 |
Python | Python | fix coercion of unicode object to chararray | 1857cf27034c639a27044308c39211a811678054 | <ide><path>numpy/core/defchararray.py
<ide> class adds the following functionality:
<ide> ucs4 = numpy.array(ucs2, 'u4')
<ide> obj = ucs4.data
<ide> else:
<del> obj = unicode(obj)
<add> obj = _unicode(obj)
<ide> else:
<ide... | 1 |
Java | Java | add photoviewer component | d403ac6a3147784787fb0602ed62ef37cd65fd71 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/views/image/ImageLoadEvent.java
<ide>
<ide> package com.facebook.react.views.image;
<ide>
<add>import javax.annotation.Nullable;
<add>
<ide> import android.support.annotation.IntDef;
<ide>
<add>import com.facebook.react.bridge.Arguments;
<add>import com.facebo... | 1 |
Ruby | Ruby | return delete result instead arel object | 324f265c1de98212f59f42c287d441b85b2350b7 | <ide><path>lib/arel/session.rb
<ide> def read(select)
<ide>
<ide> def update(update)
<ide> update.call
<del> update
<ide> end
<ide>
<ide> def delete(delete)
<ide> delete.call
<del> delete
<ide> end
<ide> end
<ide> include CRUD | 1 |
Javascript | Javascript | change calls to deprecated util.print() | 306936e98fa6c06b52095f5a369a03c6e722b285 | <ide><path>test/fixtures/net-fd-passing-receiver.js
<ide> receiver = net.createServer(function(socket) {
<ide>
<ide> /* To signal the test runne we're up and listening */
<ide> receiver.on('listening', function() {
<del> common.print('ready');
<add> console.log('ready');
<ide> });
<ide>
<ide> receiver.listen(path);... | 4 |
Java | Java | remove xresource classes | 68a9a66d27386e0fce7196f2797446676f1206a6 | <ide><path>src/main/java/io/reactivex/Completable.java
<ide> public interface CompletableTransformer extends Function<Completable, Completabl
<ide> * @return the source or its wrapper Completable
<ide> * @throws NullPointerException if source is null
<ide> */
<del> static Completable wrap(CompletableC... | 52 |
PHP | PHP | add missing import | 14beafaebbd6fe0f1a48942389c57a67b69f23a2 | <ide><path>src/Illuminate/Foundation/Testing/Concerns/InteractsWithRedis.php
<ide>
<ide> namespace Illuminate\Foundation\Testing\Concerns;
<ide>
<add>use Exception;
<ide> use Illuminate\Redis\RedisManager;
<ide>
<ide> trait InteractsWithRedis
<ide> public function setUpRedis()
<ide>
<ide> try {
<ide> ... | 1 |
Javascript | Javascript | simplify bundle building for non-production assets | 31477ddc14b7e8fcc3ebeb7c69788aacdd0408d3 | <ide><path>broccoli/packages.js
<ide> module.exports.qunit = function _qunit() {
<ide>
<ide> module.exports.getPackagesES = function getPackagesES() {
<ide> let input = new Funnel(`packages`, {
<del> exclude: ['packages/node-module/**', 'packages/loader/**', 'packages/external-helpers/**'],
<add> exclude: ['no... | 2 |
Mixed | Javascript | capitalize more comments | b08a867d6016ccf04783a0f91fdbcc3460daf234 | <ide><path>benchmark/_cli.js
<ide> function CLI(usage, settings) {
<ide> if (!(this instanceof CLI)) return new CLI(usage, settings);
<ide>
<ide> if (process.argv.length < 3) {
<del> this.abort(usage); // abort will exit the process
<add> this.abort(usage); // Abort will exit the process
<ide> }
<ide>
<id... | 232 |
Python | Python | correct os assignment in _to_node() | d41d5cf9b7d07780e15ea9f9ca86ce744fbb7a87 | <ide><path>libcloud/container/drivers/kubernetes.py
<ide> def _to_node(self, data):
<ide> extra=extra_size,
<ide> )
<ide> extra = {"memory": memory, "cpu": cpu}
<del> labels = data["metadata"]["labels"]
<del> os = labels.get("beta.kubernetes.io/os") or labels.get("kubernetes.io... | 1 |
Javascript | Javascript | use strict equality comparison | 9c460e10d10570c6783fd51e885a50ea99464943 | <ide><path>lib/internal/v8_prof_polyfill.js
<ide> const os = {
<ide> // Filter out vdso and vsyscall entries.
<ide> const arg = args[args.length - 1];
<ide> if (arg === '[vdso]' ||
<del> arg == '[vsyscall]' ||
<add> arg === '[vsyscall]' ||
<ide> /^[0-9a-f]+-[0-9a-f]+$/.test... | 2 |
Javascript | Javascript | enable tests that are now passing | c43cb492c073b079a6a69fc71a2c1e42ff837d83 | <ide><path>packages/ember-htmlbars/tests/helpers/input_test.js
<ide> QUnit.test("cursor position is not lost when updating content", function() {
<ide> input.selectionStart = 3;
<ide> input.selectionEnd = 3;
<ide> });
<del>
<ide> run(null, set, controller, 'val', 'derp');
<ide>
<ide> equal(view.$('input'... | 2 |
Text | Text | add more lts update steps to release guide | e17e903188b30a1acd3a65594dc5a1847b24ac73 | <ide><path>doc/contributing/releases.md
<ide> existing labels for that release line, such as `vN.x`.
<ide> If the release is transitioning from Active LTS to Maintenance, the
<ide> `backport-requested-vN.x` label must be deleted.
<ide>
<add>### Add new codename to nodejs-latest-linker
<add>
<add>In order to make sure ... | 1 |
Ruby | Ruby | fix error message when cask fails to install | 3088faaf9c1bea9fdbf923a05a6aea984d32fedd | <ide><path>Library/Homebrew/cask/lib/hbc/installer.rb
<ide> def install_artifacts
<ide> end
<ide> rescue StandardError => e
<ide> begin
<del> ofail e.message
<ide> already_installed_artifacts.each do |artifact|
<ide> odebug "Reverting installation of artifact of class #{artifact... | 1 |
Text | Text | clarify collaborators & ctc members relationships | accaa3437773b6f5b6a4853f4c4a1ed568379490 | <ide><path>README.md
<ide> more information about the governance of the Node.js project, see
<ide> * [zkat](https://github.com/zkat) -
<ide> **Kat Marchán** <kzm@sykosomatic.org>
<ide>
<del>Collaborators & CTC members follow the [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md) in
<del>maintaining the Node.js pro... | 1 |
Text | Text | improve http.request documentation | 27ee08363b0465e2a4fbe1833f31b049a42f90a0 | <ide><path>doc/api/http.md
<ide> const req = http.request(options, (res) => {
<ide> });
<ide> ```
<ide>
<add>In a successful request, the following events will be emitted in the following
<add>order:
<add>
<add>* `socket`
<add>* `response`
<add> * `data` any number of times, on the `res` object
<add> (`data` will ... | 1 |
Python | Python | update dummy compute driver | 68a51380d7b9a06149d55be97a11ce891c6b0418 | <ide><path>libcloud/compute/drivers/dummy.py
<ide> import socket
<ide> import struct
<ide>
<del>from libcloud.base import ConnectionKey, NodeDriver, NodeSize, NodeLocation
<del>from libcloud.compute.base import NodeImage, Node
<add>from libcloud.common.base import ConnectionKey
<add>from libcloud.compute.base import N... | 1 |
Text | Text | update suse docs | 5d6bb52976456d35e3d3a725b8c93992b3e69f31 | <ide><path>docs/installation/SUSE.md
<ide> parent = "smn_linux"
<ide> +++
<ide> <![end-metadata]-->
<ide>
<del># openSUSE
<add># openSUSE and SUSE Linux Enterprise
<ide>
<del>Docker is available in **openSUSE 12.3 and later**. Please note that due
<del>to its current limitations Docker is able to run only **64 bit** ... | 1 |
PHP | PHP | add cookie helper | c8257cd9daad692a35087d8e22629f1c32bd1045 | <ide><path>src/Illuminate/Foundation/helpers.php
<ide> function config($key, $default = null)
<ide> }
<ide> }
<ide>
<add>if ( ! function_exists('cookie'))
<add>{
<add> /**
<add> * Create a new cookie instance.
<add> *
<add> * @param string $name
<add> * @param string $value
<add> * @param int $minutes
<... | 1 |
Mixed | Javascript | add updatesettings to both http2 servers | 629e1ab5aa84b75cd26ee9208c909eff500a3a88 | <ide><path>doc/api/http2.md
<ide> A value of `0` will disable the timeout behavior on incoming connections.
<ide> The socket timeout logic is set up on connection, so changing this
<ide> value only affects new connections to the server, not any existing connections.
<ide>
<add>#### `server.updateSettings([settings])`
... | 3 |
Mixed | Javascript | expose stream api in cursorto() | 462f43824f6af577bde27da76d9f33365eddcfe7 | <ide><path>doc/api/readline.md
<ide> function completer(linePartial, callback) {
<ide> }
<ide> ```
<ide>
<del>## readline.cursorTo(stream, x, y)
<add>## readline.cursorTo(stream, x, y[, callback])
<ide> <!-- YAML
<ide> added: v0.7.7
<add>changes:
<add> - version: REPLACEME
<add> pr-url: https://github.com/nodejs/n... | 3 |
Python | Python | update pool module import for theano | 379966050454151db016f427dd7dae24a35e45e0 | <ide><path>keras/backend/theano_backend.py
<ide> import theano
<ide> from theano import tensor as T
<ide> from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
<del>from theano.tensor.signal import downsample
<add>from theano.tensor.signal import pool
<ide> from theano.tensor.nnet import conv3d2d
<ide> ... | 1 |
Text | Text | remove unneeded dependencies from readme | fc72a809c1c60569fb1d70a95f5296feaa5220f8 | <ide><path>README.md
<ide> Installing on Ubuntu 12.04 and 12.10
<ide> 1. Install dependencies:
<ide>
<ide> ```bash
<del> sudo apt-get install lxc wget bsdtar curl
<add> sudo apt-get install lxc bsdtar
<ide> sudo apt-get install linux-image-extra-`uname -r`
<ide> ```
<ide> | 1 |
PHP | PHP | fix cs errors in skel/ | 8f5acb09328395c71744eb1f9a1b49bb8488482e | <ide><path>app/Config/Schema/db_acl.php
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<ide>
<del>/*
<add>/**
<ide> *
<ide> * Using the Schema command line utility
<ide> * cake schema run create DbAcl
<ide> *
<ide> */
<ide> class DbAclSchema extends CakeSchema {
<... | 6 |
Go | Go | remove unnecessary conversions | 33d8492ce413780e4e339631386541410677ecf3 | <ide><path>pkg/system/syscall_windows.go
<ide> func IsWindowsClient() bool {
<ide>
<ide> // Unmount is a platform-specific helper function to call
<ide> // the unmount syscall. Not supported on Windows
<del>func Unmount(dest string) error {
<add>func Unmount(_ string) error {
<ide> return nil
<ide> }
<ide>
<ide> fun... | 1 |
Javascript | Javascript | increase querystring coverage | dc7d9eb0a94c6ca97c5ee0a06a6c4ae84b5b8575 | <ide><path>test/parallel/test-querystring-escape.js
<ide> assert.deepStrictEqual(qs.escape('test'), 'test');
<ide> assert.deepStrictEqual(qs.escape({}), '%5Bobject%20Object%5D');
<ide> assert.deepStrictEqual(qs.escape([5, 10]), '5%2C10');
<ide> assert.deepStrictEqual(qs.escape('Ŋōđĕ'), '%C5%8A%C5%8D%C4%91%C4%95');
<add... | 2 |
PHP | PHP | fix comment mistakes | 95989bd97efa7544ae596de1d2ca95ad74e6303e | <ide><path>Cake/Database/Connection.php
<ide> public function supportsQuoting() {
<ide>
<ide> /**
<ide> * Quotes a database identifier (a column name, table name, etc..) to
<del> * be used safely in queries without the risk of using reserver words
<add> * be used safely in queries without the risk of using reserved w... | 6 |
Ruby | Ruby | remove unused argument | 45f8848ca7d7a1065c4c9f3d73946d908a382a9d | <ide><path>actionview/lib/action_view/template/text.rb
<ide> class Template
<ide> class Text #:nodoc:
<ide> attr_accessor :type
<ide>
<del> def initialize(string, type = nil)
<add> def initialize(string)
<ide> @string = string.to_s
<del> @type = Types[type] || type if type
<del> ... | 2 |
Java | Java | remove unused field | 883f4651bc5cc744cd10bc646e41a981c71c4b1a | <ide><path>ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java
<ide> public class SurfaceMountingManager {
<ide>
<ide> // This is null *until* StopSurface is called.
<ide> private Set<Integer> mTagSetForStoppedSurface;
<del> private long mLastSuccessfulQueryTime = -1;
<ide>
... | 1 |
Python | Python | fix compatibility with old maxpooling interface | ca4fc2e72f4a841e9230d9e4241893f0381f3fdf | <ide><path>keras/layers/convolutional.py
<ide> def get_config(self):
<ide> class MaxPooling1D(Layer):
<ide> def __init__(self, pool_length=2, stride=1, ignore_border=True):
<ide> super(MaxPooling1D, self).__init__()
<del> if type(stride) is not int or not stride:
<add> if stride is None:
<add>... | 1 |
Javascript | Javascript | remove sharedcreds in server constructor | 161182ec05191b0e1f6e58ced1c8b567393aceda | <ide><path>lib/_tls_wrap.js
<ide> function Server(options, listener) {
<ide> // Handle option defaults:
<ide> this.setOptions(options);
<ide>
<del> var sharedCreds = tls.createSecureContext({
<add> this._sharedCreds = tls.createSecureContext({
<ide> pfx: this.pfx,
<ide> key: this.key,
<ide> passphras... | 1 |
Javascript | Javascript | add tests for weird moment clones | d08df925a5e5c132b366957567c484724a29cd12 | <ide><path>test/moment/create.js
<ide> exports.create = {
<ide> test.done();
<ide> },
<ide>
<add> "cloning moment works with weird clones" : function (test) {
<add> var extend = function(a, b) {
<add> var i;
<add> for (i in b) {
<add> a[i] = b[i];
... | 2 |
PHP | PHP | pass primary to insertgetid | 340810a187804801f078e054172750e7d998e7f4 | <ide><path>src/Illuminate/Database/Eloquent/Model.php
<ide> public function save()
<ide> {
<ide> if ($this->incrementing)
<ide> {
<del> $this->$keyName = $query->insertGetId($this->attributes);
<add> $this->$keyName = $query->insertGetId($this->attributes, $keyName);
<ide> }
<ide> else
<ide> {
<i... | 2 |
Javascript | Javascript | ignore link routes in lang redirects | 1981e5b1a97150db2a0b5ad5ce0911657f81a2e7 | <ide><path>server/utils/lang-passthrough-urls.js
<ide> export default [
<ide> 'auth',
<del> 'services'
<add> 'services',
<add> 'link'
<ide> ].reduce((throughs, route) => {
<del> throughs[route] = true; return throughs;
<add> throughs[route] = true;
<add> return throughs;
<ide> }, {}); | 1 |
Go | Go | move systemd code into pkg | ec43ec50b44cff3f043c78cad97466c68e2ba8cd | <ide><path>pkg/cgroups/apply_nosystemd.go
<del>// +build !linux
<del>
<del>package cgroups
<del>
<del>import (
<del> "fmt"
<del>)
<del>
<del>func useSystemd() bool {
<del> return false
<del>}
<del>
<del>func systemdApply(c *Cgroup, pid int) (ActiveCgroup, error) {
<del> return nil, fmt.Errorf("Systemd not supported")
<... | 5 |
PHP | PHP | add constraint class for header not contains | c160876124eb6a1633f803cecfe7fd31e02403ad | <ide><path>src/TestSuite/Constraint/Response/HeaderNotContains.php
<add><?php
<add>/**
<add> * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
<add> * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
<add> *
<add> * Licensed under The MIT License
<add> * For full copyright and lic... | 1 |
Javascript | Javascript | fix merge issue | 0b69db201f88be725b6751999c09bce56951f012 | <ide><path>test/hotCases/child-compiler/issue-9706/report-child-assets-loader.js
<ide> module.exports = function(source) {
<ide> compilerCache.set(this._compiler, childCompiler);
<ide> }
<ide> const callback = this.async();
<add> childCompiler.parentCompilation = this._compilation;
<ide> childCompiler.runAsChild((... | 1 |
Javascript | Javascript | pass the original listener added by once | 706778a90247937af0af0ae668fabf03e142640b | <ide><path>lib/events.js
<ide> EventEmitter.prototype.prependOnceListener =
<ide> // emits a 'removeListener' event iff the listener was removed
<ide> EventEmitter.prototype.removeListener =
<ide> function removeListener(type, listener) {
<del> var list, events, position, i;
<add> var list, events, positi... | 2 |
Ruby | Ruby | rescue any systemcallerror from atomic_write | fb1250a012f6f7896d601c70ef6f8db90a76263d | <ide><path>Library/Homebrew/keg_fix_install_names.rb
<ide> def relocate_install_names old_prefix, new_prefix, old_cellar, new_cellar, optio
<ide>
<ide> begin
<ide> first.atomic_write(s)
<del> rescue Errno::EACCES
<add> rescue SystemCallError
<ide> first.ensure_writable do
<ide> ... | 1 |
Javascript | Javascript | add redirect for now vanished field guide articles | 989cb87c00738a245ac10a5165d8a58e06278cb5 | <ide><path>server/boot/redirects.js
<ide> module.exports = function(app) {
<ide> router.get('/nonprofit-project-instructions', function(req, res) {
<ide> res.redirect(
<ide> 301,
<del> "https://github.com/FreeCodeCamp/freecodecamp/wiki/How-Free-Code-Camp's-Nonprofit-Projects-work"
<add> "//github.... | 1 |
Javascript | Javascript | suggest git apply --reject for failed upgrades | 4fbd244b9a6b62e0efe1b4b5a7ec3de468f020f6 | <ide><path>react-native-git-upgrade/cliEntry.js
<ide> async function run(requestedVersion, cliArgs) {
<ide> } catch (err) {
<ide> log.warn(
<ide> 'The upgrade process succeeded but there might be conflicts to be resolved. ' +
<del> 'See above for the list of files that have merge conflicts.');
... | 1 |
Go | Go | implement plugin restore after daemon restart | dfd91873056c172ffc061d882da0cd18204b521a | <ide><path>cmd/dockerd/daemon_plugin_support.go
<ide> import (
<ide> )
<ide>
<ide> func pluginInit(config *daemon.Config, remote libcontainerd.Remote, rs registry.Service) error {
<del> return plugin.Init(config.Root, config.ExecRoot, remote, rs)
<add> return plugin.Init(config.Root, config.ExecRoot, remote, rs, confi... | 5 |
Javascript | Javascript | remove invalid jsdoc tags for patch() method | a2c7cf9fb26637b89633cb7f33f97a9da76cfdb9 | <ide><path>src/ng/http.js
<ide> function $HttpProvider() {
<ide>
<ide> /**
<ide> * @ngdoc method
<del> * @name ng.$http#patch
<del> * @methodOf ng.$http
<add> * @name $http#patch
<ide> *
<ide> * @description
<ide> * Shortcut method to perform `PATCH` request. | 1 |
Javascript | Javascript | add explanation for processdependency method | a7b85301a71e4ddfcfaf53c5f2b82db69dbe1ac5 | <ide><path>lib/Compilation.js
<ide> BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
<ide> this.moduleGraph.setParents(dep, currentBlock, module);
<ide> const resourceIdent = dep.getResourceIdentifier();
<ide> if (resourceIdent) {
<add> // Here webpack is using heuristic that... | 1 |
Go | Go | fix tests depending on entrypoint split behavior | 86ab343c3e98ded1ee1b12f04396ae011a0e6de6 | <ide><path>integration-cli/docker_cli_run_test.go
<ide> func (s *DockerSuite) TestRunWithVolumesFromExited(c *check.C) {
<ide>
<ide> // Create a file in a volume
<ide> if daemonPlatform == "windows" {
<del> out, exitCode = dockerCmd(c, "run", "--name", "test-data", "--volume", `c:\some\dir`, WindowsBaseImage, `cmd ... | 1 |
PHP | PHP | add use ...\str to helpers.php | 1d4265dbfb4da567943c196b4e7162002ed54bde | <ide><path>src/Illuminate/Support/helpers.php
<ide> <?php
<ide>
<add>use Illuminate\Support\Str;
<add>
<ide> if ( ! function_exists('action'))
<ide> {
<ide> /**
<ide> function base_path($path = '')
<ide> */
<ide> function camel_case($value)
<ide> {
<del> return Illuminate\Support\Str::camel($value);
<add> retur... | 1 |
PHP | PHP | use str_random instead of str_shuffle | 2b59a8ff744a490a9f4f5f16057386ef7b79f6e6 | <ide><path>src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php
<ide> public function deleteExpired()
<ide> */
<ide> public function createNewToken(CanResetPasswordContract $user)
<ide> {
<del> $email = $user->getEmailForPasswordReset();
<del>
<del> $value = str_shuffle(sha1($email.spl_object_hash($this).mic... | 1 |
Python | Python | enhance percpu/cpu switch | 74ebc9bff8fc2ed365c64ad30130131e050bc493 | <ide><path>glances/outputs/glances_curses.py
<ide> class _GlancesCurses(object):
<ide> 'cpu_times', 'io_counters', 'name']
<ide>
<ide> # Define top menu
<del> _top = ['quicklook', 'cpu', 'gpu', 'mem', 'memswap', 'load']
<add> _top = ['quicklook', 'cpu', 'percpu', 'gpu', 'mem', 'memswap', 'l... | 3 |
Python | Python | fix error about pep8 | 21bce2b8e649d37da4e58dc5c8be51a50bdd60e7 | <ide><path>celery/backends/elasticsearch.py
<ide> def __init__(self, url=None, *args, **kwargs):
<ide> self.port = port or self.port
<ide>
<ide> self.es_retry_on_timeout = (
<del> _get('elasticsearch_retry_on_timeout') or self.es_retry_on_timeout
<del> )
<add> _... | 1 |
Javascript | Javascript | convert easy files to flow strict-local | e36247030575e93c1d7087cdb04e1498e9577056 | <ide><path>IntegrationTests/LayoutEventsTest.js
<ide> * LICENSE file in the root directory of this source tree.
<ide> *
<ide> * @format
<del> * @flow
<add> * @flow strict-local
<ide> */
<ide>
<ide> 'use strict';
<ide><path>IntegrationTests/ReactContentSizeUpdateTest.js
<ide> * LICENSE file in the root directory o... | 165 |
Text | Text | add link to primitives article | fe99d38f51cdc05ac6c564d0881b062453db60e1 | <ide><path>threejs/lessons/threejs-responsive.md
<ide> display and you compare this sample to those above you should
<ide> notice the edges are more crisp.
<ide>
<ide> This article covered a very basic but fundamental topic. Next up lets quickly
<del>go over the basic primitives that three.js provides.
<add>[go over t... | 1 |
Text | Text | allow any response status for error response | 2ac98e39a262f318974ad50e9e1068291b760dea | <ide><path>curriculum/challenges/english/05-apis-and-microservices/apis-and-microservices-projects/timestamp-microservice.md
<ide> If the input date string is invalid, the api returns an object having the struct
<ide> assert.equal(data.error.toLowerCase(), 'invalid date');
<ide> },
<ide> (xhr) => {
<del> ... | 1 |
Python | Python | fix documentation rendering, | 043799295f82b01235479d5b323de4598dca48a0 | <ide><path>numpy/core/multiarray.py
<ide> def packbits(a, axis=None, bitorder='big'):
<ide> ``None`` implies packing the flattened array.
<ide> bitorder : {'big', 'little'}, optional
<ide> The order of the input bits. 'big' will mimic bin(val),
<del> ``[0, 0, 0, 0, 0, 0, 1, 1] => 3 = 0b000000... | 1 |
Javascript | Javascript | satisfy linter requirements | 24365b95df18b79fd8f995007a5d2735fecae424 | <ide><path>src/timeout-cop.js
<del>var parentProcessId = process.argv[2];
<del>var timeoutInMinutes = process.argv[3];
<del>var timeoutInMilliseconds = timeoutInMinutes * 1000 * 60
<add>'use strict'
<ide>
<del>function exitTestRunner() {
<del> process.kill(parentProcessId, "SIGINT");
<del> var errorMessage = "The te... | 1 |
Ruby | Ruby | make sure timestamp is properly referenced | a4207c1084439051ca0d828768382bcff86c5d92 | <ide><path>activerecord/lib/active_record/attribute_methods/dirty.rb
<ide> module Dirty
<ide> include AttributeMethods::Write
<ide>
<ide> included do
<del> if self < Timestamp
<add> if self < ::ActiveRecord::Timestamp
<ide> raise "You cannot include Dirty after Timestamp"
<ide> ... | 1 |
Ruby | Ruby | add major/minor/patch examples | 919e94bb9273a48ade57a2be184e9c3ee5e8dc07 | <ide><path>Library/Homebrew/test/version_spec.rb
<ide> expect(v2.to_str).to eq("HEAD-ffffff")
<ide> end
<ide>
<add> describe "#major" do
<add> it "returns major version token" do
<add> expect(described_class.create("1").major).to be == Version::Token.create("1")
<add> expect(described_class.create(... | 1 |
PHP | PHP | make readbase64 an instance method | 4a4ca7c8d40fb94b50740a6998f9238b7f7b4f5b | <ide><path>lib/Cake/Network/Email/CakeEmail.php
<ide> protected function _attachFiles($boundary = null) {
<ide> * @return string File contents in base64 encoding
<ide> */
<ide> protected function _readFile($file) {
<del> return File::readAndBase64Encode($file);
<add> $f = new File($file);
<add> return $f->readBas... | 2 |
PHP | PHP | remove resource class | 074cc3cc5df1062fa6ae7e274ad0c73721e6d897 | <ide><path>src/Illuminate/Http/Resources/Json/Resource.php
<del><?php
<del>
<del>namespace Illuminate\Http\Resources\Json;
<del>
<del>class Resource extends JsonResource
<del>{
<del> //
<del>} | 1 |
Text | Text | add note about new binaries to changelog | 32b8a6e735ef674e1ea2415915e41531bcd4a9c8 | <ide><path>CHANGELOG.md
<ide> To resolve this:
<ide> After making those changes, run `sudo systemctl daemon-reload`, and `sudo
<ide> systemctl restart docker` to reload changes and (re)start the docker daemon.
<ide>
<add>**IMPORTANT**: With Docker 1.12, a Linux docker installation now has two
<add>additional binaries;... | 1 |
Ruby | Ruby | add missing requires | c53d3929cd5d7a2ac39411c8137d469e5047a4f4 | <ide><path>activerecord/test/cases/associations/inner_join_association_test.rb
<ide> require 'models/post'
<ide> require 'models/comment'
<ide> require 'models/author'
<add>require 'models/essay'
<ide> require 'models/category'
<ide> require 'models/categorization'
<ide> require 'models/person'
<ide><path>activesupport... | 2 |
Javascript | Javascript | remove duplicate this.errno assignment | 2b569deed32d7f601e9c5af0415e842e1440d46e | <ide><path>lib/cluster.js
<ide> Worker.prototype.send = function() {
<ide>
<ide> function SharedHandle(key, address, port, addressType, backlog, fd) {
<ide> this.key = key;
<del> this.errno = '';
<ide> this.workers = [];
<ide> this.handle = null;
<ide> this.errno = 0; | 1 |
Go | Go | move cgmounts to be a field in sysinfo | 6677ab6a63014237b8149b2aeba48fccf43ac7c1 | <ide><path>pkg/sysinfo/cgroup2_linux.go
<ide> func newV2(quiet bool, options ...Opt) *SysInfo {
<ide> applyCgroupNsInfo,
<ide> }
<ide> for _, o := range ops {
<del> w := o(sysInfo, nil)
<add> w := o(sysInfo)
<ide> warnings = append(warnings, w...)
<ide> }
<ide> if !quiet {
<ide><path>pkg/sysinfo/sysinfo.go
<i... | 3 |
Text | Text | fix minor typo in n-api.md | 4f0971d3665e0a946d3799f0398b7a4cfd43bddf | <ide><path>doc/api/n-api.md
<ide> NAPI_EXTERN napi_status napi_is_error(napi_env env,
<ide> bool* result);
<ide> ```
<ide> - `[in] env`: The environment that the API is invoked under.
<del>- `[in] msg`: The `napi_value` to be checked.
<add>- `[in] value`: The `napi_value` to be che... | 1 |
Java | Java | remove outdated comment in nativedetector | 77a8cbcbecc54744b059e41f24c362f587db21d2 | <ide><path>spring-core/src/main/java/org/springframework/core/NativeDetector.java
<ide> /**
<ide> * A common delegate for detecting a GraalVM native image environment.
<ide> *
<del> * <p>Requires using the {@code -H:+InlineBeforeAnalysis} native image compiler flag in order to allow code removal at
<del> * build time... | 1 |
Ruby | Ruby | add a small dsl for setting requirement options | f8d253950fe9c711a3743266d09effb37cdc5bd3 | <ide><path>Library/Homebrew/dependencies.rb
<ide> def initialize(*tags)
<ide> # Should return true if this requirement is met.
<ide> def satisfied?; false; end
<ide> # Should return true if not meeting this requirement should fail the build.
<del> def fatal?; false; end
<add> def fatal?
<add> self.class.fata... | 2 |
PHP | PHP | use contract for email address | 2b77ef07db52f634d1b488b745bb8ff22376942d | <ide><path>src/Illuminate/Auth/Notifications/VerifyEmail.php
<ide> protected function verificationUrl($notifiable)
<ide> return URL::temporarySignedRoute(
<ide> 'verification.verify',
<ide> Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),
<del> ['id' => ... | 1 |
Javascript | Javascript | reduce string concatenations | 8b76c3e60c7b5c274c757257580a2c0faae69097 | <ide><path>test/addons/repl-domain-abort/test.js
<ide> process.on('exit', function() {
<ide>
<ide> const lines = [
<ide> // This line shouldn't cause an assertion error.
<del> 'require(\'' + buildPath + '\')' +
<add> `require('${buildPath}')` +
<ide> // Log output to double check callback ran.
<ide> '.method(f... | 300 |
PHP | PHP | fix tests for php7.2 session_id problems | f541bdcb551d35a1894ae4624bb8d5e1429696d3 | <ide><path>tests/TestCase/Controller/Component/SecurityComponentTest.php
<ide> class SecurityComponentTest extends TestCase
<ide> public function setUp()
<ide> {
<ide> parent::setUp();
<del> session_id('cli');
<ide>
<ide> $this->server = $_SERVER;
<ide> $session = new Session();
... | 3 |
Ruby | Ruby | unify param.require tests | aae53d2175b306bf9e085a86d9e5d8a194fcf63b | <ide><path>actionpack/test/controller/parameters/parameters_require_test.rb
<del>require 'abstract_unit'
<del>require 'action_controller/metal/strong_parameters'
<del>
<del>class ParametersRequireTest < ActiveSupport::TestCase
<del> test "required parameters must be present not merely not nil" do
<del> assert_raise... | 2 |
PHP | PHP | add tests for method retrievechannelsoptions | 304de5fc046c16eb08ab1415cc7755981ac1f3cb | <ide><path>tests/Broadcasting/BroadcasterTest.php
<ide> public function testCanRegisterChannelsWithOptions()
<ide>
<ide> $options = [ 'a' => [ 'b', 'c' ] ];
<ide> $broadcaster->channel('somechannel', function () {}, $options);
<add> }
<add>
<add> public function testCanRetrieveChannelsOptions()
<... | 1 |
Javascript | Javascript | fix indentation of polyfills/require.js | 5b3920567d98f4b6219b6752dd06e1a5a82f9755 | <ide><path>packager/src/Resolver/polyfills/require.js
<ide> * @flow
<ide> */
<ide>
<del> 'use strict';
<add>'use strict';
<ide>
<del> declare var __DEV__: boolean;
<add>declare var __DEV__: boolean;
<ide>
<del> type DependencyMap = Array<ModuleID>;
<del> type Exports = any;
<del> type FactoryFn = (
<add>type Depen... | 1 |
Ruby | Ruby | remove new line between doc and method | 164be37da5bdcf99a941ab221b90d8c8adfd1a82 | <ide><path>actionpack/lib/action_dispatch/request/session.rb
<ide> class Session # :nodoc:
<ide> Unspecified = Object.new
<ide>
<ide> # Creates a session hash, merging the properties of the previous session if any
<del>
<ide> def self.create(store, env, default_options)
<ide> sess... | 1 |
Ruby | Ruby | fix xmlschema output with fraction_digits >0 | c2b79c011f4ec39426c93812ab58660718c7cb92 | <ide><path>activesupport/lib/active_support/time_with_zone.rb
<ide> def inspect
<ide>
<ide> def xmlschema(fraction_digits = 0)
<ide> fraction = if fraction_digits > 0
<del> ".%i" % time.usec.to_s[0, fraction_digits]
<add> (".%06i" % time.usec)[0, fraction_digits + 1]
<ide> end
<ide>
<ide... | 2 |
Text | Text | add missing set_visibility_filter import | 9df3c15023e3362959d7e56aa36989f1e84a46c7 | <ide><path>docs/basics/Reducers.md
<ide> Note that:
<ide> We have two more actions to handle! Just like we did with `SET_VISIBILITY_FILTER`, we'll import the `ADD_TODO` and `TOGGLE_TODO` actions and then extend our reducer to handle `ADD_TODO`.
<ide>
<ide> ```js
<del>import { VisibilityFilters, ADD_TODO, TOGGLE_TODO }... | 1 |
Java | Java | remove exception declaration in abstract encoder | aaa128180958d4b6d420cb7e4a955bb2edab0c0b | <ide><path>spring-core/src/main/java/org/springframework/core/codec/AbstractSingleValueEncoder.java
<ide> public final Flux<DataBuffer> encode(Publisher<? extends T> inputStream, DataBuf
<ide>
<ide> return Flux.from(inputStream).
<ide> take(1).
<del> concatMap(t -> {
<del> try {
<del> return encode(t... | 2 |
Go | Go | fix empty-lines (revive) | 0c7b93095219e0856eaa50fedc5ec53bea243c76 | <ide><path>daemon/cluster/convert/container.go
<ide> func configReferencesToGRPC(sr []*types.ConfigReference) ([]*swarmapi.ConfigRefe
<ide> func configReferencesFromGRPC(sr []*swarmapi.ConfigReference) []*types.ConfigReference {
<ide> refs := make([]*types.ConfigReference, 0, len(sr))
<ide> for _, s := range sr {
<de... | 6 |
Ruby | Ruby | convert x11requirement test to spec | 26c01b4c43c5bf45799d81cd0e86ebca61a328c6 | <ide><path>Library/Homebrew/test/os/mac/x11_requirement_test.rb
<del>require "testing_env"
<del>require "requirements/x11_requirement"
<del>
<del>class OSMacX11RequirementTests < Homebrew::TestCase
<del> def test_satisfied
<del> MacOS::XQuartz.stubs(:version).returns("2.7.5")
<del> MacOS::XQuartz.stubs(:installe... | 2 |
Ruby | Ruby | apply time column precision on assignment | 4d9126cfccefdb69149caf7681d674b50335e9b4 | <ide><path>activemodel/lib/active_model/type/time.rb
<ide> def user_input_in_time_zone(value)
<ide> private
<ide>
<ide> def cast_value(value)
<del> return value unless value.is_a?(::String)
<add> return apply_seconds_precision(value) unless value.is_a?(::String)
<ide> return i... | 3 |
Text | Text | fix typo in part-8-rtk-query-advanced.md | 8685630b415ee7a81718032b72f648b7d3e7a741 | <ide><path>docs/tutorials/essentials/part-8-rtk-query-advanced.md
<ide> In this case, we'll call the field `postsForUser`, and we can destructure that n
<ide> We've now seen three different ways that we can manage transforming responses:
<ide>
<ide> - Keep original response in cache, read full result in component and ... | 1 |
Python | Python | improve detr post-processing methods | 01eb34ab45a8895fbd9e335568290e5d0f5f4491 | <ide><path>src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py
<ide>
<ide> import io
<ide> import pathlib
<add>import warnings
<ide> from collections import defaultdict
<ide> from typing import Dict, List, Optional, Union
<ide>
<ide> def __call__(
<ide> if annotations is not No... | 6 |
Ruby | Ruby | remove buggy and unnecessary logic | 4e35dc0ebec33905a05dca1fdeecc6a39e87e9cc | <ide><path>railties/lib/rails/generators/app_base.rb
<ide> def assets_gemfile_entry
<ide> GEMFILE
<ide> end
<ide>
<del> if options[:skip_javascript]
<del> gemfile += <<-GEMFILE.gsub(/^ {12}/, '')
<del> #{coffee_gemfile_entry}
<del> #{javascript_runtime_gemfile_en... | 1 |
PHP | PHP | fix issue with find(count) and translatebehavior | 55e1619c59e5b01fcb540de468bce3dd3884d170 | <ide><path>lib/Cake/Model/Behavior/TranslateBehavior.php
<ide> public function afterFind(Model $Model, $results, $primary = false) {
<ide> }
<ide> } else {
<ide> $value = '';
<del> if (is_numeric($row[$Model->alias][$aliasVirtual]) || !empty($row[$Model->alias][$aliasVirtual])) {
<add> if (isset($... | 2 |
Javascript | Javascript | improve error messages in test-npm-install | 6ca1bdfeb158aa8a4b981b715278b30c4a019ff0 | <ide><path>test/parallel/test-npm-install.js
<ide> const proc = spawn(process.execPath, args, {
<ide> });
<ide>
<ide> function handleExit(code, signalCode) {
<del> assert.strictEqual(code, 0, 'npm install should run without an error');
<del> assert.ok(signalCode === null, 'signalCode should be null');
<add> assert.... | 1 |
Ruby | Ruby | use #grep where it will suffice | 62a0b3f18dc8c52cce89943c82d1a232552e2493 | <ide><path>Library/Homebrew/cmd/audit.rb
<ide> def audit_urls
<ide> urls = [(f.stable.url rescue nil), (f.devel.url rescue nil), (f.head.url rescue nil)].compact
<ide>
<ide> # Check GNU urls; doesn't apply to mirrors
<del> urls.select { |u| u =~ %r[^(https?|ftp)://(?!alpha).+/gnu/] }.each do |u|
<add> ur... | 2 |
Ruby | Ruby | use topological sort to upgrade formulae | 0c3e49092c2e807092d157f3723d712a807e37b1 | <ide><path>Library/Homebrew/cask.rb
<ide> require "cask/pkg"
<ide> require "cask/quarantine"
<ide> require "cask/staged"
<del>require "cask/topological_hash"
<ide> require "cask/url"
<ide> require "cask/utils"
<ide><path>Library/Homebrew/cask/installer.rb
<ide>
<ide> require "formula_installer"
<ide> require "unpack_s... | 6 |
Ruby | Ruby | extract array to a constant | d46cf353d6cd9aaaa69c72599bef3ea43977a610 | <ide><path>activesupport/lib/active_support/callbacks.rb
<ide> module Callbacks
<ide> extend ActiveSupport::DescendantsTracker
<ide> end
<ide>
<add> CALLBACK_FILTER_TYPES = [:before, :after, :around]
<add>
<ide> # Runs the callbacks for the given event.
<ide> #
<ide> # Calls the before and aro... | 1 |
Javascript | Javascript | test identifier caching | 80d713ec7e00a0b63de68ce71cf218f50d1907cf | <ide><path>test/RecordIdsPlugin.test.js
<add>var should = require("should");
<add>
<add>var path = require("path");
<add>var webpack = require("../lib/webpack");
<add>
<add>var RecordIdsPlugin = require("../lib/RecordIdsPlugin");
<add>
<add>function makeRelative(compiler, identifier) {
<add> var context = compiler.cont... | 1 |
Python | Python | remove schema=none until optional | 65448b2e34ab55291a52caaa950e9c427f85902c | <ide><path>spacy/util.py
<ide> def resolve_dot_names(config: Config, dot_names: List[Optional[str]]) -> List[Op
<ide> section = name.split(".")[0]
<ide> # We want to avoid resolving the same thing twice.
<ide> if section not in resolved:
<del> resolved[section] = regis... | 1 |
Javascript | Javascript | use blue on non-windows systems for number/bigint" | 1329844a0808705091891175a6bee58358380af6 | <ide><path>lib/util.js
<ide> inspect.colors = Object.assign(Object.create(null), {
<ide> });
<ide>
<ide> // Don't use 'blue' not visible on cmd.exe
<del>const windows = process.platform === 'win32';
<ide> inspect.styles = Object.assign(Object.create(null), {
<ide> 'special': 'cyan',
<del> 'number': windows ? 'yello... | 2 |
Python | Python | default it to none | 36d2332ae8bb96664a268d043a40a967d8d01412 | <ide><path>libcloud/storage/drivers/s3.py
<ide> def _put_object(self, container, object_name, method='PUT',
<ide> response = response
<ide> server_hash = headers.get('etag', '').replace('"', '')
<ide> server_side_encryption = headers.get('x-amz-server-side-encryption',
<del> ... | 1 |
Ruby | Ruby | simplify version checks | 8c6defd9cf58840bd08af30147a9f6305a219712 | <ide><path>Library/Homebrew/extend/os/mac/diagnostic.rb
<ide> def check_for_unsupported_macos
<ide> end
<ide>
<ide> def check_xcode_up_to_date
<del> return unless MacOS::Xcode.installed?
<ide> return unless MacOS::Xcode.outdated?
<ide>
<ide> # Travis CI images are going to end up ou... | 1 |
Javascript | Javascript | remove unused catch bindings | 5407690bd79a4aa9b5ea72acb98d1a8efd309029 | <ide><path>benchmark/_http-benchmarkers.js
<ide> class AutocannonBenchmarker {
<ide> let result;
<ide> try {
<ide> result = JSON.parse(output);
<del> } catch (err) {
<add> } catch {
<ide> return undefined;
<ide> }
<ide> if (!result || !result.requests || !result.requests.average) {
<id... | 10 |
Java | Java | reuse existing methods | faea9b54ecd5f9790382eb94e8a97aa462fb7663 | <ide><path>rxjava-core/src/main/java/rx/Observable.java
<ide> public final static <T> Observable<T> from(T[] items, Scheduler scheduler) {
<ide> * @see <a href="http://msdn.microsoft.com/en-us/library/hh229027.aspx">MSDN: Observable.Interval</a>
<ide> */
<ide> public final static Observable<Long> interval... | 1 |
Javascript | Javascript | remove unnecessary variables | ec39e62ff26b3efcdcf1bbfd423c452008ea9028 | <ide><path>lib/net.js
<ide> Server.prototype.listen = function(...args) {
<ide> throw new ERR_SERVER_ALREADY_LISTEN();
<ide> }
<ide>
<del> var hasCallback = (cb !== null);
<del> if (hasCallback) {
<add> if (cb !== null) {
<ide> this.once('listening', cb);
<ide> }
<ide> var backlogFromArgs =
<ide> if (... | 1 |
Ruby | Ruby | use formula path when installing bottle | 687c87d74d76b4b7f6264f7508f92f3521327ebb | <ide><path>Library/Homebrew/formulary.rb
<ide> def initialize(bottle_name)
<ide> def get_formula(spec, force_bottle: false, flags: [], **)
<ide> contents = Utils::Bottles.formula_contents @bottle_filename, name: name
<ide> formula = begin
<del> Formulary.from_contents(name, @bottle_filename, cont... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.