content_type stringclasses 8
values | main_lang stringclasses 7
values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
Text | Text | add missing subtitle | f5e7fefa875887d94827dffea4b47f4cf4f3ed9a | <ide><path>guide/spanish/c/functions/index.md
<ide> Es posible que haya observado un problema similar con cosas como las declaracion
<ide>
<ide> Idealmente, siempre pasará a sus funciones como parámetros, pero es posible que no siempre pueda hacerlo. Escoger la mejor solución es tu trabajo como programador.
<ide>
<de... | 1 |
Javascript | Javascript | add crypto check to http2 tests | 1b719fe3d78e35a494151229b014ebed6a8383bf | <ide><path>test/parallel/test-http2-binding.js
<ide> // Flags: --expose-http2
<ide> 'use strict';
<ide>
<del>require('../common');
<add>const common = require('../common');
<add>if (!common.hasCrypto)
<add> common.skip('missing crypto');
<ide> const assert = require('assert');
<ide>
<ide> assert.doesNotThrow(() => p... | 85 |
Ruby | Ruby | add new intel names | 6d46a4eed744229933e490b8709d11f7ec12d8da | <ide><path>Library/Homebrew/extend/os/linux/hardware/cpu.rb
<ide> def family
<ide> :merom
<ide> when 0x0d
<ide> :dothan
<del> when 0x36, 0x26, 0x1c
<add> when 0x1c, 0x26, 0x27, 0x35, 0x36
<ide> :atom
<del> when 0x3c, 0x3f, 0x46
<add> when... | 1 |
PHP | PHP | change mysql schema grammar to remove default 0 | 6b8f3f96a40ad22f6ac1436eca12f13d4caa0bef | <ide><path>src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
<ide> protected function typeTimestampTz(Fluent $column)
<ide> return 'timestamp default CURRENT_TIMESTAMP';
<ide> }
<ide>
<del> if (! $column->nullable && $column->default === null) {
<del> return 'timestamp defa... | 2 |
PHP | PHP | convert switch to array lookup | d926028341429f7208b1ee419c3117f044b78d2b | <ide><path>lib/Cake/Error/BaseErrorHandler.php
<ide> protected function _getMessage($exception) {
<ide> * @return array Array of error word, and log location.
<ide> */
<ide> public static function mapErrorCode($code) {
<del> $error = $log = null;
<del> switch ($code) {
<del> case E_PARSE:
<del> case E_ERROR:
<... | 1 |
Javascript | Javascript | increase test timeout | e92f9d88d7d9f0224e6782c5454f20758d85a740 | <ide><path>test/ConfigTestCases.template.js
<ide> const describeCases = config => {
<ide> })
<ide> .catch(done);
<ide> });
<del> });
<add> }, 30000);
<ide>
<ide> const {
<ide> it: _it, | 1 |
PHP | PHP | check path in method hasfile | 077a9ef83057e8df5993ef16f1d607640cbb1dc8 | <ide><path>src/Illuminate/Http/Request.php
<ide> public function hasFile($key)
<ide> {
<ide> if (is_array($file = $this->file($key))) $file = head($file);
<ide>
<del> return $file instanceof \SplFileInfo;
<add> return $file instanceof \SplFileInfo && $file->getPath() != '';
<ide> }
<ide>
<ide> /** | 1 |
Javascript | Javascript | enforce blank line between functions | 68abaab8baac203833889c9106abf6fe82a5900f | <ide><path>.eslintrc.js
<ide> module.exports = {
<ide> 'one-var': ['error', { initialized: 'never' }],
<ide> 'one-var-declaration-per-line': 'error',
<ide> 'operator-linebreak': ['error', 'after'],
<add> 'padding-line-between-statements': [
<add> 'error',
<add> { blankLine: 'always', prev: 'fun... | 1 |
Python | Python | move `panopticdeeplabfusion` into project dir | 75f304ddd90e7b6adaecad20ad16817edbd32cc9 | <ide><path>official/vision/beta/projects/panoptic_maskrcnn/modeling/heads/panoptic_deeplab_heads.py
<ide> import tensorflow as tf
<ide>
<ide> from official.modeling import tf_utils
<del>from official.vision.beta.modeling.layers import nn_layers
<add>from official.vision.beta.projects.panoptic_maskrcnn.modeling.layers ... | 2 |
PHP | PHP | fix views overwrite warning text | 6f4c3b2765fbfbff0ef80291f2f31b3ba9b29dfc | <ide><path>lib/Cake/Console/Command/Task/ViewTask.php
<ide> protected function _interactive() {
<ide> $this->Controller->connection = $this->connection;
<ide> $this->controllerName = $this->Controller->getName();
<ide>
<del> $prompt = __d('cake_console', "Would you like bake to build your views interactively?\nWa... | 1 |
Javascript | Javascript | bring box example up-to-date | c8c6292b2663d8a5afb315a8616eb5a9f0d9dac9 | <ide><path>examples/box/box.js
<del>var w = 120,
<del> h = 500,
<del> m = [10, 50, 20, 50], // top right bottom left
<add>var innerWidth = 120,
<add> innerHeight = 500,
<add> margin = {top: 10, right: 50, bottom: 20, left: 50},
<ide> min = Infinity,
<ide> max = -Infinity;
<ide>
<ide> var chart = bo... | 1 |
Text | Text | fix typo and add label to breaking change | f724d676db99c744b0548f9f9ac0d290aad0f7f2 | <ide><path>CHANGELOG.md
<ide> - Added `SESSION_CONNECTION` and `SESSION_STORE` env. variable ([#4735](https://github.com/laravel/laravel/pull/4735))
<ide>
<ide> ### Changed
<del>- Changed `QUEUE_DRIVER` env variable name to `QUEUE_CONNECTION` ([c30adc8](https://github.com/laravel/laravel/commit/c30adc88c1cf3f30618145c... | 1 |
Text | Text | use consistent markdown in readme | cc3a9e79479b9486ba1726889767d44d26bcad81 | <ide><path>README.md
<del>Node.js
<del>=======
<add># Node.js
<ide>
<ide> [](https://gitter.im/nodejs/node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](... | 1 |
Python | Python | fix python3 compatibility | 10f49132889113c44be1e35e8fb7a768dd08a656 | <ide><path>libcloud/compute/drivers/libvirt_driver.py
<ide> def __init__(self, host, user='root', ssh_key=None,
<ide> # if ssh key is string create temp file
<ide> if not os.path.isfile(ssh_key):
<ide> key_temp_file = NamedTemporaryFile(delete=False)
<del> ... | 1 |
Python | Python | change the way sentinel tokens can retrived | 03ae1f060bbb8cfd8ba691385b35a7ae09adcf33 | <ide><path>src/transformers/models/t5/tokenization_t5.py
<ide> class T5Tokenizer(PreTrainedTokenizer):
<ide> pad_token (`str`, *optional*, defaults to `"<pad>"`):
<ide> The token used for padding, for example when batching sequences of different lengths.
<ide> extra_ids (`int`, *optional*, d... | 3 |
Text | Text | remove readme link to non-existent upgrade guide | 6d367b9e2c9be19ab4c4afce7981ff47c4b33eca | <ide><path>README.md
<ide> You can use Gitpod, an online IDE(which is free for Open Source) for contributin
<ide> ## Resources
<ide>
<ide> * [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
<del>* [Upgrade Guide](https://github.com/axios/axios/blob/v1.x/UPGRADE_GUIDE.md)
<ide> * [Ecosystem](https://g... | 1 |
Javascript | Javascript | call gc() explicitly to avoid oom | 4ce744a24b52659dc3b365a32fddcc1b92fd67c0 | <ide><path>test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js
<add>// Flags: --expose-gc
<ide> 'use strict';
<ide>
<ide> const common = require('../../common');
<ide> common.expectsError(function() {
<ide> type: Error
<ide> });
<ide>
<add>// FIXME: Free the memory early ... | 1 |
Javascript | Javascript | remove `chrome` from `testem.travis-browsers.json` | 92b459ca954fe395247a029375b4bd31572a4b83 | <ide><path>bin/run-travis-browser-tests.js
<ide> function run(command, _args) {
<ide> }
<ide>
<ide>
<del>function setupChrome() {
<del> return RSVP.resolve()
<del> .then(function() {
<del> return run('sudo', ['apt-get', 'install', '-y', 'google-chrome-stable']);
<del> })
<del> .then(function() {
<del> ... | 2 |
Python | Python | remove obsolete apps | 03339501ab53794b363df9838978d15631821afe | <ide><path>tests/test_apps/config_module_app.py
<del>import os
<del>import flask
<del>here = os.path.abspath(os.path.dirname(__file__))
<del>app = flask.Flask(__name__)
<ide><path>tests/test_apps/config_package_app/__init__.py
<del>import os
<del>import flask
<del>here = os.path.abspath(os.path.dirname(__file__))
<del>... | 6 |
PHP | PHP | correct phpdoc code style | cd9a86b4c0dfea64b59b56effacaca49769c5ed6 | <ide><path>src/Illuminate/Foundation/Testing/TestResponse.php
<ide> public function assertJsonCount(int $count, $key = null)
<ide> /**
<ide> * Assert that the response has the given JSON validation errors for the given keys.
<ide> *
<del> * @param string|array $keys
<del> * @param string $re... | 1 |
PHP | PHP | fix header manipulation | 210fd896613ff4d550cd51d8963f13f42b1eaf4b | <ide><path>src/TestSuite/IntegrationTestCase.php
<ide> protected function _buildRequest($url, $method, $data) {
<ide> 'session' => $session,
<ide> ];
<ide> if (isset($this->_request['headers'])) {
<del> $props['environment'] = $this->_request['headers'];
<add> $env = [];
<add> foreach ($this->_request['hea... | 2 |
Javascript | Javascript | remove a couple calls to helpers.each | 4d7fefcdb6bd48a078af6378fba33dbcb63cf747 | <ide><path>src/core/core.controller.js
<ide> helpers.extend(Chart.prototype, /** @lends Chart */ {
<ide> buildOrUpdateControllers: function() {
<ide> var me = this;
<ide> var newControllers = [];
<add> var datasets = me.data.datasets;
<add> var i, ilen;
<ide>
<del> helpers.each(me.data.datasets, function(datas... | 1 |
Javascript | Javascript | fix some warnings | 7eab70532ef299fff7de79a7351f6b0ed013c38c | <ide><path>utils/fonts_utils.js
<ide> function readFontIndexData(aStream, aIsByte) {
<ide> return aStream.getByte() << 24 | aStream.getByte() << 16 |
<ide> aStream.getByte() << 8 | aStream.getByte();
<ide> }
<add> error(offsize + " is not a valid offset size");
<add> return null;
<ide> };... | 1 |
Javascript | Javascript | add test case | 85ffe1e8cedb8d574810051e1aba72effa2c36f1 | <ide><path>test/configCases/source-map/module-names/index.js
<add>function getSourceMap(filename) {
<add> var fs = require("fs");
<add> var source = fs.readFileSync(__dirname + "/" + filename + ".map", "utf-8");
<add> var map = JSON.parse(source);
<add> return map;
<add>}
<add>
<add>it("should include test.js in Source... | 3 |
Javascript | Javascript | fix accidental typo | a4a368739c80e799d273b14abf86b49b674df41f | <ide><path>examples/todos-with-undo/components/AddTodo.js
<ide> export default class AddTodo extends Component {
<ide> <form onSubmit={(e) => this.handleSubmit(e)}>
<ide> <input type="text" ref="input" />
<ide> <button>
<del> Addx
<add> Add
<ide> </button>
<id... | 1 |
Ruby | Ruby | expand path of user provided file in runner | 777e5ef3e262b9a5ee79139b7b1befe48faf4307 | <ide><path>railties/lib/rails/commands/runner/runner_command.rb
<ide> def perform(code_or_file = nil, *command_argv)
<ide> if code_or_file == "-"
<ide> eval($stdin.read, TOPLEVEL_BINDING, "stdin")
<ide> elsif File.exist?(code_or_file)
<del> $0 = code_or_file
<del> Kernel.load... | 1 |
Text | Text | fix incorrect code in java strings | 164f165fcaea7fe21429fb6fe4fe3d2b3b8f6b65 | <ide><path>guide/english/java/strings/index.md
<ide> title: Strings
<ide> ---
<ide> # Strings
<ide>
<del>Strings are sequences of characters. In Java, a `String` is an `Object`. Strings should not be confused with `char` as characters are literally 1 value rather than a sequence of characters. You can still use 1 valu... | 1 |
Javascript | Javascript | show correct version number in api index | 433c8714f3d065a9a842502579b65d0388dd47ec | <ide><path>docs/app/src/docs.js
<ide> angular.module('DocsController', [])
<ide> function($scope, $rootScope, $location, $window, $cookies,
<ide> NG_PAGES, NG_NAVIGATION, NG_VERSION) {
<ide>
<del> $scope.docsVersion = NG_VERSION.isSnapshot ? 'snapshot' : NG_VERSION.version;
<del>
<ide> $scope.navCla... | 1 |
Python | Python | remove outdated integration test | 72b55d20899fae554b453a9e67682bb26c2e60d2 | <ide><path>tests/integration_tests/applications_test.py
<ide> def _test_application_notop(app, last_dim):
<ide> assert output_shape[-1] == last_dim
<ide>
<ide>
<del>def test_mobilenet_v2_legacy_import():
<del> from keras.applications import mobilenetv2
<del> assert hasattr(mobilenetv2, 'MobileNetV2')
<del> ... | 1 |
Javascript | Javascript | note input type restrictions | c434bde109b8e131f569808f8b7451013d5b3698 | <ide><path>src/ng/directive/attrs.js
<ide> *
<ide> * @description
<ide> *
<del> * Sets the `readOnly` attribute on the element, if the expression inside `ngReadonly` is truthy.
<add> * Sets the `readonly` attribute on the element, if the expression inside `ngReadonly` is truthy.
<add> * Note that `readonly` applies ... | 1 |
Mixed | Text | linkify missing types | fd3a0cfb7c467c8016ad739a473be864425e645d | <ide><path>doc/api/async_hooks.md
<ide> added: v8.1.0
<ide> * `before` {Function} The [`before` callback][].
<ide> * `after` {Function} The [`after` callback][].
<ide> * `destroy` {Function} The [`destroy` callback][].
<del>* Returns: `{AsyncHook}` Instance used for disabling and enabling hooks
<add>* Returns: {A... | 11 |
Text | Text | update rails on rack guide [ci skip] | aa5e551eb8b8988f5e6430463f01d483b1bd9346 | <ide><path>guides/source/rails_on_rack.md
<ide> use ActionDispatch::Flash
<ide> use Rack::Head
<ide> use Rack::ConditionalGet
<ide> use Rack::ETag
<del>run MyApp.application.routes
<add>run MyApp::Application.routes
<ide> ```
<ide>
<ide> The default middlewares shown here (and some others) are each summarized in the [... | 1 |
Javascript | Javascript | add specs for accessibilityinfo | 67c3ed34ba75500098a16eced5f43b33039b0b14 | <ide><path>Libraries/Components/AccessibilityInfo/AccessibilityInfo.android.js
<ide>
<ide> 'use strict';
<ide>
<del>const NativeModules = require('../../BatchedBridge/NativeModules');
<add>import NativeAccessibilityInfo from './NativeAccessibilityInfo';
<add>
<ide> const RCTDeviceEventEmitter = require('../../EventEm... | 2 |
Javascript | Javascript | add runtime logging | 09103af6c471ca8522499aea638622bfdd7fc052 | <ide><path>lib/Compiler.js
<ide> const RequestShortener = require("./RequestShortener");
<ide> const { makePathsRelative } = require("./util/identifier");
<ide> const ConcurrentCompilationError = require("./ConcurrentCompilationError");
<ide> const { Logger, LogType } = require("./logging/Logger");
<add>const logToCons... | 4 |
Python | Python | add support for keras masking and causal masking | c0293ded9abe8ac7719cceb0095fa9dff807d2fe | <ide><path>keras/layers/attention/multi_head_attention.py
<ide> class MultiHeadAttention(Layer):
<ide> activity_regularizer: Regularizer for dense layer activity.
<ide> kernel_constraint: Constraint for dense layer kernels.
<ide> bias_constraint: Constraint for dense layer kernels.
<add> causal: ... | 2 |
Javascript | Javascript | remove inlined css in htmljs | 5869ea4b331b61e9b7fc90bd689fbe994e6a761f | <ide><path>packages/learn/src/head/index.js
<ide> import favicons from './favicons';
<ide> import meta from './meta';
<del>import styleSheets from './styleSheets';
<ide> import mathjax from './mathjax';
<ide> import sassjs from './sassjs';
<ide>
<ide> const metaAndStyleSheets = meta
<del> .concat(favicons, styleSheet... | 3 |
Javascript | Javascript | add test case | 11bc877b42954b9912f0573e53416373e954cbd9 | <ide><path>test/ProfilingPlugin.test.js
<ide> describe("Profiling Plugin", function () {
<ide> new webpack.debug.ProfilingPlugin({
<ide> outputPath: finalPath
<ide> })
<del> ]
<add> ],
<add> experiments: {
<add> backCompat: false
<add> }
<ide> });
<ide> compiler.run(err => {
<ide> ... | 1 |
Ruby | Ruby | tell users to fix head issues with inreplace | 03a489bf78709f9361109d65817ae8821eeef864 | <ide><path>Library/Homebrew/formula.rb
<ide> class Formula
<ide> extend Cachable
<ide> extend Predicable
<ide>
<del> # @!method inreplace(paths, before = nil, after = nil)
<del> # @see Utils::Inreplace.inreplace
<del>
<ide> # The name of this {Formula}.
<ide> # e.g. `this-formula`
<ide> attr_reader :name
<... | 3 |
Javascript | Javascript | apply linting fixes | e417f3f0d41c9d99bd6eccb71abeb0c8efa86415 | <ide><path>config/env.js
<ide> const {
<ide> FORUM_LOCATION: forum,
<ide> NEWS_LOCATION: news,
<ide> LOCALE: locale,
<del> STRIPE_PUBLIC: stripePublicKey,
<add> STRIPE_PUBLIC: stripePublicKey
<ide> } = process.env;
<ide>
<ide> const locations = { | 1 |
Ruby | Ruby | fix filtering of aliases in results | 79ea14b73867f52a6016c97ca8e38f5c7f7672e9 | <ide><path>Library/Homebrew/cmd/search.rb
<ide> def search_formulae(rx)
<ide> aliases = Formula.aliases
<ide> results = (Formula.full_names+aliases).grep(rx).sort
<ide>
<del> results.each_with_index do |name, i|
<add> results.map do |name|
<ide> canonical_name = Formulary.canonical_name(name)
<del>... | 1 |
Javascript | Javascript | render overlay decorations | b6f71bc64859bec75ec97ce5c0f9705d5cd9f793 | <ide><path>spec/text-editor-component-spec.js
<ide> describe('TextEditorComponent', () => {
<ide> })
<ide> })
<ide>
<add> describe('overlay decorations', () => {
<add> it('renders overlay elements at the specified screen position unless it would overflow the window', async () => {
<add> const {component... | 2 |
Text | Text | improve quiet documentation | 4fd2ca25989bdc48110655aa66e9b474ea229032 | <ide><path>README.md
<ide> The `next` API is as follows:
<ide> Supported options:
<ide> - `dev` (`bool`) whether to launch Next.js in dev mode - default `false`
<ide> - `dir` (`string`) where the Next project is located - default `'.'`
<del>- `quiet` (`bool`) Display error messages with server information - default `fa... | 1 |
Text | Text | add text that elaborates on 'is' with '=' | 38862b6f9cc7884ac2217e58d78d43af3d7d59cf | <ide><path>guide/english/python/difference-between-is-and-equal-equal-operators/index.md
<ide> ---
<ide> title: Difference between Python 'is' and '==' operators
<ide> ---
<del>`is` is a check for object identity - ie, checking if two or more variables are referring to the same object. You can't overload `is`.
<add>`is... | 1 |
Go | Go | adjust api version to match correct release | a061b1e2d8f6117b0524e44de7b6bc391245864e | <ide><path>integration/build/build_test.go
<ide> func TestBuildMultiStageParentConfig(t *testing.T) {
<ide>
<ide> // Test cases in #36996
<ide> func TestBuildLabelWithTargets(t *testing.T) {
<del> skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.37"), "test added after 1.37")
<add> skip.If(t, versions.LessT... | 1 |
Ruby | Ruby | add missing magic comment (linting) | 61bbcb71d502f6bba26cc6334f887975f159c6cb | <ide><path>actioncable/lib/action_cable/zeitwerk.rb
<add># frozen_string_literal: true
<add>
<ide> require "zeitwerk"
<ide>
<ide> lib = File.expand_path("..", __dir__) | 1 |
PHP | PHP | show better exception messages with blade views | bccc3fbaf48bf05800269251fecc6b6f27e3731c | <ide><path>src/Illuminate/View/Engines/CompilerEngine.php
<ide> class CompilerEngine extends PhpEngine {
<ide> */
<ide> protected $compiler;
<ide>
<add> /**
<add> * A stack of the last compiled templates.
<add> *
<add> * @var array
<add> */
<add> protected $lastCompiled = array();
<add>
<ide> /**
<ide> * Cre... | 1 |
Javascript | Javascript | simplify constant decls | 08809f28ad797b914bad2dcd21eefba898eaaa4d | <ide><path>lib/internal/fs.js
<ide> const Buffer = require('buffer').Buffer;
<ide> const Writable = require('stream').Writable;
<ide> const fs = require('fs');
<ide> const util = require('util');
<del>const constants = process.binding('constants').fs;
<del>
<del>const O_APPEND = constants.O_APPEND | 0;
<del>const O_CRE... | 1 |
Mixed | Python | fix icu shrinker and docs | a4ffa0cb948d813ad77998c1d5c60a8e5dc52959 | <ide><path>tools/icu/README.md
<ide> make clean
<ide> tools/license-builder.sh
<ide> ```
<ide>
<del>- Now, fix the default URL for the `full-icu` build in `/configure`, in
<add>- Now, fix the default URL for the `full-icu` build in `/configure.py`, in
<ide> the `configure_intl()` function. It should match the ICU URL ... | 2 |
Python | Python | add example for ctrl text generation in docs | 87c8fca9bc39435f518e0b60e44aafc374333886 | <ide><path>src/transformers/modeling_utils.py
<ide> def generate(
<ide> input_ids = torch.tensor(tokenizer.encode(input_context)).unsqueeze(0) # encode input context
<ide> outputs = model.generate(input_ids=input_ids, max_length=40, do_sample=True, temperature=0.7, bos_token_id=tokenizer.bos_to... | 1 |
PHP | PHP | add more tests for brace style routes | 7968bbeef315211f2af07b19440b64b37a891aff | <ide><path>src/Routing/Route/Route.php
<ide> protected function _writeRoute()
<ide> $parsed = preg_quote($this->template, '#');
<ide>
<ide> if (strpos($route, '{') !== false && strpos($route, '}') !== false) {
<del> preg_match_all('/\{([a-z0-9-_]+)\}/i', $route, $namedElements);
<add> ... | 2 |
Ruby | Ruby | use sprockets-rails from github repo | 757dd93c7fb59965fcb19581281f2f4eec7a7222 | <ide><path>railties/lib/rails/generators/app_base.rb
<ide> def rails_gemfile_entry
<ide> if options.dev?
<ide> [
<ide> GemfileEntry.path('rails', Rails::Generators::RAILS_DEV_PATH),
<add> GemfileEntry.github('sprockets-rails', 'rails/sprockets-rails'),
<ide> GemfileE... | 1 |
Java | Java | avoid possible memory leak in resolvabletype | 29d021ae3ce11dacd0793f08524651a23468a06d | <ide><path>spring-core/src/main/java/org/springframework/core/ResolvableType.java
<ide> VariableResolver asVariableResolver() {
<ide> if (this == NONE) {
<ide> return null;
<ide> }
<del> return new DefaultVariableResolver();
<add> return new DefaultVariableResolver(this);
<ide> }
<ide>
<ide> /**
<ide> inter... | 1 |
Go | Go | use gocheck asserts instead of fatal | 22d0be5797fd5561c999e08701e64258ff9d9536 | <ide><path>integration-cli/docker_cli_rename_test.go
<ide> package main
<ide> import (
<ide> "strings"
<ide>
<add> "github.com/docker/docker/pkg/integration/checker"
<ide> "github.com/docker/docker/pkg/stringid"
<ide> "github.com/go-check/check"
<ide> )
<ide> func (s *DockerSuite) TestRenameStoppedContainer(c *chec... | 1 |
Ruby | Ruby | add support for invalid foreign keys in postgres | 8203482a9ef9bd60d5014745fd7af868d9954b1d | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
<ide> def custom_primary_key?
<ide> options[:primary_key] != default_primary_key
<ide> end
<ide>
<add> def validate?
<add> options.fetch(:validate, true)
<add> end
<add> alias validated? val... | 8 |
Python | Python | enable sphinx.ext.viewcode extenstion | e06179862d25754691b1ef4b5481e3f94cc748ce | <ide><path>docs/conf.py
<ide>
<ide> # Add any Sphinx extension module names here, as strings. They can be extensions
<ide> # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
<del>extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']
<add>extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx... | 1 |
PHP | PHP | add `orm_cache clear` command | 038f1fb3b05d18e47cdcc48db079bcd955ba7cb7 | <ide><path>src/Console/Command/OrmCacheShell.php
<ide> */
<ide> namespace Cake\Console\Command;
<ide>
<add>use Cake\Cache\Cache;
<ide> use Cake\Console\Shell;
<ide> use Cake\Datasource\ConnectionManager;
<ide>
<ide> public function build($name = null) {
<ide> $this->_io->verbose('Building metadata cache for ' . $... | 2 |
Go | Go | add useful comments | ad968ef3ef54f3161e8e1012f0ef20b8757ac0aa | <ide><path>devmapper/deviceset_devmapper.go
<ide> func (devices *DeviceSetDM) hasImage(name string) bool {
<ide> return err == nil
<ide> }
<ide>
<add>// ensureImage creates a sparse file of <size> bytes at the path
<add>// <root>/devicemapper/<name>.
<add>// If the file already exists, it does nothing.
<add>// Either... | 2 |
Python | Python | fix italian tag map | f7485a09c89a071b20189698984af51932c229af | <ide><path>spacy/lang/it/tag_map.py
<ide>
<ide>
<ide> TAG_MAP = {
<del> "AP__Gender=Fem|Number=Plur|Poss=Yes|PronType=Prs": {"pos": "AP"},
<del> "AP__Gender=Fem|Number=Sing|Poss=Yes|PronType=Prs": {"pos": "AP"},
<del> "AP__Gender=Masc|Number=Plur|Poss=Yes|PronType=Prs": {"pos": "AP"},
<del> "AP__Gender=Ma... | 1 |
Javascript | Javascript | add missing param to fetchfrompage() | d2f08dd40d87376d7d2200ab5463cb79e67f343d | <ide><path>packages/react-devtools-extensions/src/main.js
<ide> function createPanelIfReactLoaded() {
<ide> }
<ide>
<ide> // Edge case where getContent() returned null; fall back to fetch.
<del> fetchFromPage(url, resolve);
<add> fet... | 1 |
Javascript | Javascript | remove function redeclaration | 8b3772d47fc94fe3c3175602bba5eef6605fad86 | <ide><path>lib/EntryOptionPlugin.js
<ide> const SingleEntryPlugin = require("./SingleEntryPlugin");
<ide> const MultiEntryPlugin = require("./MultiEntryPlugin");
<ide> const DynamicEntryPlugin = require("./DynamicEntryPlugin");
<ide>
<add>function itemToPlugin(context, item, name) {
<add> if(Array.isArray(item)) {
<ad... | 1 |
Javascript | Javascript | improve ability to detect the format of a stl file | bb64625533a4d74fd0e4fc8bb8ed36abf2a8a2fe | <ide><path>examples/js/loaders/STLLoader.js
<ide> THREE.STLLoader.prototype = {
<ide> face_size = (32 / 8 * 3) + ((32 / 8 * 3) * 3) + (16 / 8);
<ide> n_faces = reader.getUint32(80,true);
<ide> expect = 80 + (32 / 8) + (n_faces * face_size);
<del> return expect === reader.byteLength;
<add>
<add> if ( exp... | 1 |
Python | Python | use sum instead of mean in cosine_proximity | 2dfba02e0a507eddaf3db3d7f3660d75ce740639 | <ide><path>keras/losses.py
<ide> def poisson(y_true, y_pred):
<ide> def cosine_proximity(y_true, y_pred):
<ide> y_true = K.l2_normalize(y_true, axis=-1)
<ide> y_pred = K.l2_normalize(y_pred, axis=-1)
<del> return -K.mean(y_true * y_pred, axis=-1)
<add> return -K.sum(y_true * y_pred, axis=-1)
<ide>
<ide> ... | 1 |
Python | Python | fix function that defines masks in xlm | c5a94a6100afdd550fb3ea445d8bddc6b9769fcc | <ide><path>transformers/modeling_xlm.py
<ide> def get_masks(slen, lengths, causal, padding_mask=None):
<ide> """
<ide> Generate hidden states mask, and optionally an attention mask.
<ide> """
<del> bs = lengths.size(0)
<add> alen = torch.arange(slen, dtype=torch.long, device=lengths.device)
<ide> ... | 1 |
Ruby | Ruby | use dup to preserve previous behavior | fb3ea8b8cb324d174e801d27dc15315b9358486f | <ide><path>activesupport/lib/active_support/hash_with_indifferent_access.rb
<ide> def extractable_options?
<ide> end
<ide>
<ide> def with_indifferent_access
<del> self
<add> dup
<ide> end
<ide>
<ide> def initialize(constructor = {})
<ide><path>activesupport/test/core_ext/hash_ext_test.rb
<id... | 2 |
Java | Java | add logutils and httplogging | 4d6f2df3cbdf956ec22e5dbefe18e79a290b4ea8 | <add><path>spring-core/src/main/java/org/springframework/util/log/CompositeLog.java
<del><path>spring-web/src/main/java/org/springframework/http/HttpLog.java
<ide> * See the License for the specific language governing permissions and
<ide> * limitations under the License.
<ide> */
<del>package org.springframework.ht... | 22 |
Go | Go | fix time setting for old kernels | 55e1782d6623b59af3f1aea1eb9646a36bbb5579 | <ide><path>image.go
<ide> func (image *Image) TarLayer(compression Compression) (Archive, error) {
<ide> type TimeUpdate struct {
<ide> path string
<ide> time []syscall.Timeval
<add> mode uint32
<ide> }
<ide>
<ide> func (image *Image) applyLayer(layer, target string) error {
<ide> func (image *Image) applyLayer(laye... | 1 |
PHP | PHP | add filename option | 2c463284582f9ec43083ccae459838380c87df1d | <ide><path>src/Illuminate/Foundation/Console/EnvironmentDecryptCommand.php
<ide> class EnvironmentDecryptCommand extends Command
<ide> {--key= : The encryption key}
<ide> {--cipher= : The encryption cipher}
<ide> {--env= : The environment to be decrypted}
<del... | 2 |
Javascript | Javascript | add semicolon to make jshint happy | ce072ac3e884f51d3fcbfb78a7beb3c493cbad63 | <ide><path>src/test/moment/format.js
<ide> test('full expanded format is returned from abbreviated formats', function(asser
<ide> assert.equal(false, !!~format.indexOf(token), 'locale ' + locale + ' contains ' + token + ' in ' + i);
<ide> });
<ide> });
<del> })
<add> });
<ide> ... | 1 |
Ruby | Ruby | handle nil qs | 0c92a51dadc48fc64c7c35606c5616d2f40be107 | <ide><path>actionpack/lib/action_dispatch/rack/parse_query.rb
<ide> module Utils
<ide> module_function :parse_query_without_ajax_body_cleanup
<ide>
<ide> def parse_query(qs, d = '&;')
<del> qs = qs.dup
<add> qs = qs.to_s.dup
<ide> qs.chop! if qs[-1] == 0
<ide> qs.gsub!(/&_=$/, '')
<ide> ... | 1 |
Javascript | Javascript | ignore jqlite#append for doc fragment | a2c42711281d6ec61b73190b47743f79143c5bb1 | <ide><path>src/jqLite.js
<ide> forEach({
<ide>
<ide> append: function(element, node) {
<ide> forEach(new JQLite(node), function(child){
<del> element.appendChild(child);
<add> if (element.nodeType === 1)
<add> element.appendChild(child);
<ide> });
<ide> },
<ide>
<ide><path>test/jqLiteSpec... | 2 |
Mixed | Javascript | use bytelength to handle arraybuffer views | 6bbe28552ced571bec3a21861cf16987927fa056 | <ide><path>doc/api/fs.md
<ide> added: v10.0.0
<ide> added: v10.0.0
<ide> -->
<ide>
<del>* `buffer` {Buffer|Uint8Array} A buffer that will be filled with the file
<del> data read.
<add>* `buffer` {Buffer|TypedArray|DataView} A buffer that will be filled with the
<add> file data read.
<ide> * `offset` {integer} The lo... | 4 |
Text | Text | fix inconsistency for | 6d50737355f748cbb49d304d0b2dbfe5a17dfd16 | <ide><path>docs/reference/commandline/service.md
<ide> Commands:
<ide> inspect Display detailed information on one or more services
<ide> logs Fetch the logs of a service
<ide> ls List services
<del> ps List the tasks of a service
<add> ps List the tasks of one or more serv... | 2 |
Python | Python | add set_learning_phase in tf backend | 2cc9ebf28bef640043fc9abc2c61a421ffded792 | <ide><path>keras/backend/tensorflow_backend.py
<ide> def learning_phase():
<ide> return _LEARNING_PHASE
<ide>
<ide>
<add>def set_learning_phase(value):
<add> global _LEARNING_PHASE
<add> _LEARNING_PHASE = tf.constant(value, name='keras_learning_phase')
<add>
<add>
<ide> def get_session():
<ide> '''Retur... | 1 |
Ruby | Ruby | remove download_strategy from softwarespec | 9d3b9edb4dc0303a884d5bd826ad62788ced9c89 | <ide><path>Library/Homebrew/software_spec.rb
<ide> class SoftwareSpec
<ide> attr_reader :build, :resources, :owner
<ide> attr_reader :dependency_collector
<ide>
<del> def_delegators :@resource, :stage, :fetch
<del> def_delegators :@resource, :download_strategy, :verify_download_integrity
<add> def_delegators :@... | 1 |
Javascript | Javascript | use the frustum diagonal | d527e1b7e4b420c0aef99e161934795f6ac4d50f | <ide><path>examples/jsm/csm/CSM.js
<ide> export default class CSM {
<ide> _bbox.getCenter( _center );
<ide> _center.z = _bbox.max.z + this.lightMargin;
<ide>
<del> let squaredBBWidth = _lightSpaceFrustum.vertices.far[ 0 ].distanceTo( _lightSpaceFrustum.vertices.far[ 2 ] );
<add> let squaredBBWidth = _lightSp... | 1 |
Python | Python | forbid resnet v1 from running with fp16 | 4b8fe70416fe4826a3bad622e56780a7c2eb330c | <ide><path>official/resnet/cifar10_test.py
<ide> def test_cifar10_end_to_end_synthetic_v2(self):
<ide> extra_flags=['-resnet_version', '2']
<ide> )
<ide>
<add> def test_flag_restriction(self):
<add> with self.assertRaises(SystemExit):
<add> integration.run_synthetic(
<add> main=cifar10_ma... | 4 |
Javascript | Javascript | remove self.isiinitialized check | 3f87bb809dedba617489e85482615ba79cdcc3c2 | <ide><path>packages/ember-application/lib/system/application.js
<ide> var Application = Ember.Application = Ember.Namespace.extend({
<ide> @method scheduleInitialize
<ide> */
<ide> scheduleInitialize: function() {
<add> var self = this;
<add>
<add> function initialize(){
<add> if (self.isDestroyed) {... | 2 |
PHP | PHP | add pipeline test | d51029a0870e874eff69ad91a5e36dc4d4595a44 | <ide><path>tests/Pipeline/PipelineTest.php
<ide> public function testPipelineUsageWithParameters()
<ide>
<ide> unset($_SERVER['__test.pipe.parameters']);
<ide> }
<add>
<add> public function testPipelineViaChangesTheMethodBeingCalledOnThePipes()
<add> {
<add> $pipelineInstance = new Pipeline(ne... | 1 |
Go | Go | add test coverage to pkg/parsers | b81472a6d861b335d968a1e970d9aebc314530f2 | <ide><path>pkg/parsers/filters/parse_test.go
<ide> func TestParseArgs(t *testing.T) {
<ide> }
<ide> }
<ide>
<del>func TestParam(t *testing.T) {
<add>func TestParseArgsEdgeCase(t *testing.T) {
<add> var filters Args
<add> args, err := ParseFlag("", filters)
<add> if err != nil {
<add> t.Fatal(err)
<add> }
<add> if ar... | 3 |
Javascript | Javascript | add hide threshold to subs-caps button | 88ee6af4310c93e73950a2b0fd8c105678bda338 | <ide><path>src/js/control-bar/text-track-controls/subs-caps-button.js
<ide> class SubsCapsButton extends TextTrackButton {
<ide> return `vjs-subs-caps-button ${super.buildWrapperCSSClass()}`;
<ide> }
<ide>
<del> /**
<del> * Update caption menu items
<del> *
<del> * @param {EventTarget~Event} [event]
<del>... | 1 |
Text | Text | remove guide specific checklist points | dfe2d9136098177dbeded4ea51f46e5a4c3cdd1e | <ide><path>.github/PULL_REQUEST_TEMPLATE.md
<add>Checklist:
<add>
<ide> <!-- Please follow this checklist and put an x in each of the boxes, like this: [x]. It will ensure that our team takes your pull request seriously. -->
<ide>
<ide> - [ ] I have read [freeCodeCamp's contribution guidelines](https://github.com/free... | 1 |
Mixed | Python | add words to portuguese language _num_words | fe515085f332d100b6c2c2c8a08bb7fe14e856f4 | <ide><path>.github/contributors/filipecaixeta.md
<add># spaCy contributor agreement
<add>
<add>This spaCy Contributor Agreement (**"SCA"**) is based on the
<add>[Oracle Contributor Agreement](http://www.oracle.com/technetwork/oca-405177.pdf).
<add>The SCA applies to any contribution that you make to any product or proj... | 2 |
Text | Text | convert celsius to fahrenheit - portuguese | 46df633b74a7c89782e6e894bdd1432b43c9d15a | <ide><path>curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/convert-celsius-to-fahrenheit.portuguese.md
<ide> convertToF(30);
<ide> <section id='solution'>
<ide>
<ide> ```js
<del>// solution required
<add>function convertToF(celsius) {
<add> return (celsius * (9 ... | 1 |
PHP | PHP | fix whitespace errors | 6672eafe539ef36c9ff33147ad37ca616a23e6a1 | <ide><path>lib/Cake/Console/Shell.php
<ide> public function createFile($path, $contents) {
<ide> $this->out(__d('cake_console', '<success>Wrote</success> `%s`', $path));
<ide> return true;
<ide> }
<del>
<add>
<ide> $this->err(__d('cake_console', '<error>Could not write to `%s`</error>.', $path), 2);
<ide> ... | 2 |
Javascript | Javascript | relocate needspinner calls | 5b636feaa8550ca39229e7d8805c73c72f7995dc | <ide><path>src/node.js
<ide> } else {
<ide> nextTickQueue.splice(0, infoBox[index]);
<ide> infoBox[length] = nextTickQueue.length;
<del> if (needSpinner) {
<del> _needTickCallback();
<del> needSpinner = false;
<del> }
<ide> }
<ide> }
<add... | 1 |
Ruby | Ruby | add tests and fix type signature | e13dc902df8fdabfde7f50c1a2a3d772e77d6c5e | <ide><path>Library/Homebrew/dev-cmd/release-notes.rb
<ide> def release_notes_args
<ide> def release_notes
<ide> args = release_notes_args.parse
<ide>
<add> # TODO: (2.8) Deprecate this command now that the `brew release` command exists.
<add> # odeprecated "`brew release-notes`"
<add>
<ide> previous_ta... | 4 |
PHP | PHP | add ftp adapter to filesystem config | 9534ded88310ed9335fd088d639e69b517a7b5be | <ide><path>config/filesystems.php
<ide> | by the framework. A "local" driver, as well as a variety of cloud
<ide> | based drivers are available for your choosing. Just store away!
<ide> |
<del> | Supported: "local", "s3", "rackspace"
<add> | Supported: "local", "ftp", "s3", "rackspace"
<ide> |
<id... | 1 |
Python | Python | use python -m virtualenv in fabfile | ed27ca7e217a23fe48ff1a8f4a61fd380ee3174a | <ide><path>fabfile.py
<ide> def env(lang='python2.7'):
<ide> if path.exists(VENV_DIR):
<ide> local('rm -rf {env}'.format(env=VENV_DIR))
<del> local('virtualenv -p {lang} {env}'.format(lang=lang, env=VENV_DIR))
<add> local('python -m virtualenv -p {lang} {env}'.format(lang=lang, env=VENV_DIR))
<ide>
<... | 1 |
Javascript | Javascript | name anonymous functions in http | accf410eb0992628b4aab3c139242a409874a4fb | <ide><path>lib/http.js
<ide> exports.STATUS_CODES = server.STATUS_CODES;
<ide> exports._connectionListener = server._connectionListener;
<ide> const Server = exports.Server = server.Server;
<ide>
<del>exports.createServer = function(requestListener) {
<add>exports.createServer = function createServer(requestListener) ... | 1 |
Text | Text | use lowercase for 'article' tag | 8cb540fe85f9a02067e8e6d81a656ebefa109ab0 | <ide><path>curriculum/challenges/english/01-responsive-web-design/applied-accessibility/wrap-content-in-the-article-element.english.md
<ide> videoUrl: 'https://scrimba.com/c/cPp79S3'
<ide>
<ide> ## Description
<ide> <section id='description'>
<del><code>article</code> is another one of the new HTML5 elements that adds... | 1 |
Text | Text | update chinese translation of react | 6021a32de99616d38e0ab347ead803b73ef85b91 | <ide><path>curriculum/challenges/chinese/03-front-end-libraries/react/access-props-using-this.props.chinese.md
<ide> id: 5a24c314108439a4d403616e
<ide> title: Access Props Using this.props
<ide> challengeType: 6
<ide> isRequired: false
<del>videoUrl: ''
<del>localeTitle: 使用this.props访问道具
<add>forumTopicId: 301375
<add>... | 47 |
Mixed | Python | update output of debug config command | 9b4cf7b0b6b614ff044ae610217a3a73dcf35851 | <ide><path>spacy/cli/_util.py
<ide> def show_validation_error(
<ide> "fill-config' command to fill in all the defaults, if possible:",
<ide> spaced=True,
<ide> )
<del> print(f"{COMMAND} init fill-config {config_path} --base {config_path}\n")
<add> print(... | 2 |
Javascript | Javascript | improve reliability of the test server | b0ff49e4562ce1546dbd50c05d0ddafef5f076f5 | <ide><path>test/webserver.js
<ide> WebServer.prototype = {
<ide> this.server = null;
<ide> },
<ide> _handler: function (req, res) {
<del> var url = req.url;
<add> var url = req.url.replace(/\/\//g, '/');
<ide> var urlParts = /([^?]*)((?:\?(.*))?)/.exec(url);
<ide> var pathPart = decodeURI(urlParts... | 1 |
Ruby | Ruby | adapt code to use array of licenses | b91587d1716636b345f13e6829e04ab3a684d5ed | <ide><path>Library/Homebrew/dev-cmd/audit.rb
<ide> def audit_formula_name
<ide>
<ide> def audit_license
<ide> if formula.license.present?
<del> if @spdx_data["licenses"].any? { |lic| lic["licenseId"] == formula.license }
<add> if formula.license.any? { |lic| @spdx_data["licenses"].any? { |stand... | 1 |
Python | Python | add error handling for slack api | 6ec028eca2a76b1888d6c5af996f905c1dee1e7a | <ide><path>airflow/operators/slack_operator.py
<ide> from slackclient import SlackClient
<ide> from airflow.models import BaseOperator
<del>from airflow.utils import apply_defaults
<add>from airflow.utils import apply_defaults, AirflowException
<ide> import json
<add>import logging
<ide>
<ide>
<ide> class SlackAPIOpe... | 1 |
Javascript | Javascript | add share to website | 1430053b9f8d2c1a9995c5ef9087d321dc3233b5 | <ide><path>website/server/extractDocs.js
<ide> const apis = [
<ide> '../Libraries/Utilities/PixelRatio.js',
<ide> '../Libraries/PushNotificationIOS/PushNotificationIOS.js',
<ide> '../Libraries/Settings/Settings.ios.js',
<add> '../Libraries/Share/Share.js',
<ide> '../Libraries/Components/StatusBar/StatusBarIOS.... | 1 |
Python | Python | expand the docstring as suggested in review | 0e2503bb6312e089b918c05ea667e5a591910903 | <ide><path>numpy/polynomial/_polybase.py
<ide> def fit(cls, x, y, deg, domain=None, rcond=None, full=False, w=None,
<ide> x : array_like, shape (M,)
<ide> x-coordinates of the M sample points ``(x[i], y[i])``.
<ide> y : array_like, shape (M,)
<del> y-coordinates of the sample poin... | 1 |
Javascript | Javascript | fix jshint issue with _rendertobuffer refactor | 0b7e83b9f0eabe082837b63b6307c8e1096126be | <ide><path>packages/ember-views/lib/views/view.js
<ide> var View = CoreView.extend({
<ide>
<ide> _renderToBuffer: function(buffer) {
<ide> this.lengthBeforeRender = this._childViews.length;
<del> var buffer = this._super(buffer);
<add> buffer = this._super(buffer);
<ide> this.lengthAfterRender = this._... | 1 |
Python | Python | remove some relative imports from django | 87ffc6a6c2475fcbf61b4f27b49152901ca041cc | <ide><path>django/forms/formsets.py
<del>from forms import Form
<add>from __future__ import absolute_import
<add>
<ide> from django.core.exceptions import ValidationError
<add>from django.forms import Form
<add>from django.forms.fields import IntegerField, BooleanField
<add>from django.forms.util import ErrorList
<add>... | 1 |
Go | Go | update iptable.exists api in integration-cli | dfc2d770e47f36ee24ff9b9c3b65683196355ddd | <ide><path>integration-cli/docker_cli_daemon_test.go
<ide> func (s *DockerDaemonSuite) TestDaemonLinksIpTablesRulesWhenLinkAndUnlink(c *tes
<ide>
<ide> sourceRule := []string{"-i", bridgeName, "-o", bridgeName, "-p", "tcp", "-s", childIP, "--sport", "80", "-d", parentIP, "-j", "ACCEPT"}
<ide> destinationRule := []st... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.