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 |
|---|---|---|---|---|---|
Javascript | Javascript | fix the calculation of default vertical metrics | 99165fb70272f52a2213986bd00dc0f6963a7150 | <ide><path>src/canvas.js
<ide> var CanvasGraphics = (function CanvasGraphicsClosure() {
<ide> var character = glyph.fontChar;
<ide> var vmetric = glyph.vmetric || defaultVMetrics;
<ide> if (vertical) {
<del> var vx = vmetric[1] * fontSize * current.fontMatrix[0];
<add> ... | 2 |
PHP | PHP | keep chain going on explicit delete. add tests | b880ad19282db768718cfd1629ebbc41054daadc | <ide><path>src/Illuminate/Queue/CallQueuedHandler.php
<ide> public function call(Job $job, array $data)
<ide> $command, $handler = $this->resolveHandler($job, $command)
<ide> );
<ide>
<del> if (! $job->isDeletedOrReleased()) {
<del> $this->ensureNextJobIsChainIsDispatched($command... | 2 |
Mixed | Python | update no_trainer examples to use new logger | 35d48db881edec8a5ea60db9cf54cda7dd42506c | <ide><path>examples/pytorch/README.md
<ide> python xla_spawn.py --num_cores 8 \
<ide>
<ide> Most PyTorch example scripts have a version using the [🤗 Accelerate](https://github.com/huggingface/accelerate) library
<ide> that exposes the training loop so it's easy for you to customize or tweak them to your needs. They a... | 13 |
Python | Python | add support for verbose flag to language | 96da86b3e5d3a515f0f8db57ef1704750233ff38 | <ide><path>spacy/language.py
<ide> def begin_training(self, get_gold_tuples=None, **cfg):
<ide> self._optimizer.device = device
<ide> return self._optimizer
<ide>
<del> def evaluate(self, docs_golds):
<add> def evaluate(self, docs_golds, verbose=False):
<ide> scorer = Scorer()
<ide> ... | 1 |
Ruby | Ruby | remove relation#& alias for relation#merge | fbd917f50a6046d02dd6a64ccfb1aed0cbce68d8 | <ide><path>activerecord/lib/active_record/associations/association_proxy.rb
<ide> def send(method, *args)
<ide> end
<ide>
<ide> def scoped
<del> target_scope & @association_scope
<add> target_scope.merge(@association_scope)
<ide> end
<ide>
<ide> protected
<ide><path>activerecord/... | 6 |
Ruby | Ruby | convert `patching` test to spec | af65b07ac944082f5c9a84803690189e403b854a | <ide><path>Library/Homebrew/test/patching_spec.rb
<add>require "formula"
<add>
<add>describe "patching" do
<add> TESTBALL_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz".freeze
<add> TESTBALL_PATCHES_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1-patches.tgz".freeze
<add> PATCH_URL_A = "file://... | 2 |
Ruby | Ruby | fix spelling in compute_class warning | a2fca818c7a9d296cbc193c5abe56aecd226bc4d | <ide><path>activerecord/lib/active_record/reflection.rb
<ide> def compute_class(name)
<ide> msg = <<-MSG.squish
<ide> Rails couldn't find a valid model for #{name} association.
<ide> Please provide the :class_name option on the association declaration.
<del> If :class_name is alread... | 1 |
Javascript | Javascript | allocate iteration structures lazily | 2b460347e7f0f18a19bc559b028cb5d51820a227 | <ide><path>packages/ember-metal/lib/meta.js
<ide> export class Meta {
<ide>
<ide> _forEachIn(key, subkey, fn) {
<ide> let pointer = this;
<del> let seen = new EmptyObject();
<del> let calls = [];
<add> let seen;
<add> let calls;
<ide> while (pointer !== undefined) {
<ide> let map = pointer[... | 1 |
PHP | PHP | fix cs error | 423e6836eb6746d20bb25a7812f99e983a520663 | <ide><path>tests/TestCase/ORM/Locator/TableLocatorTest.php
<ide> use Cake\TestSuite\TestCase;
<ide> use Cake\Validation\Validator;
<ide> use TestApp\Infrastructure\Table\AddressesTable;
<del>use TestApp\Model\Table\ArticlesTable;
<ide> use TestPlugin\Infrastructure\Table\AddressesTable as PluginAddressesTable;
<ide>
<... | 1 |
Ruby | Ruby | add new osxfuse exceptions | 7572e91a6031dfc2c5d12d07686436aa44de501e | <ide><path>Library/Homebrew/diagnostic.rb
<ide> def check_for_stray_dylibs
<ide> "libmacfuse_i64.2.dylib", # OSXFuse MacFuse compatibility layer
<ide> "libosxfuse_i32.2.dylib", # OSXFuse
<ide> "libosxfuse_i64.2.dylib", # OSXFuse
<add> "libosxfuse.2.dylib", # OSXFuse
<ide> ... | 1 |
Javascript | Javascript | apply automatic lint fixes for inspect_repl.js | bdb6c597a7d51035d18d0fee27d8a385998c5084 | <ide><path>lib/internal/inspector/inspect_repl.js
<ide> function createRepl(inspector) {
<ide> })
<ide> .join('\n');
<ide> }
<add>
<ide> function listScripts(displayNatives = false) {
<ide> print(formatScripts(displayNatives));
<ide> }
<ide> function createRepl(inspector) {
<ide> const i =... | 1 |
Javascript | Javascript | fix asset path-traversal outside of roots | 98aea639b235a23f97b435d4803b25bb90cd443e | <ide><path>packager/react-packager/src/AssetServer/index.js
<ide> class AssetServer {
<ide> _findRoot(roots, dir) {
<ide> return Promise.all(
<ide> roots.map(root => {
<del> const absPath = path.join(root, dir);
<add> // important: we want to resolve root + dir
<add> // to ensure the re... | 1 |
Javascript | Javascript | use the correct size for the generated package | b8e8d17b0bf5b37797b9b96f07f1e3fe3fcc7038 | <ide><path>script/lib/create-debian-package.js
<ide> module.exports = function (packagedAppPath) {
<ide> )
<ide>
<ide> console.log(`Writing control file into "${debianPackageConfigPath}"`)
<del> const packageSizeInKilobytes = childProcess.spawnSync('du', ['-sk']).stdout.toString().split(/\s+/)[0]
<add> const pac... | 1 |
Javascript | Javascript | add bambara language. | dccd3884d93e328209440b3b0cbaffa99b893d93 | <ide><path>src/locale/bm.js
<add>//! moment.js locale configuration
<add>//! locale : Bambara [bm]
<add>//! author : Estelle Comment : https://github.com/estellecomment
<add>// Language contact person : Abdoufata Kane : https://github.com/abdoufata
<add>
<add>import moment from '../moment';
<add>
<add>export default mo... | 2 |
Javascript | Javascript | reduce traversing module | 65bdfbf07f911d5014e32ab126ef0c568c22bf49 | <ide><path>src/traversing.js
<ide> var runtil = /Until$/,
<ide>
<ide> jQuery.fn.extend({
<ide> find: function( selector ) {
<del> var i, ret, self;
<add> var self, matched, i,
<add> l = this.length;
<ide>
<ide> if ( typeof selector !== "string" ) {
<ide> self = this;
<ide> return this.pushStack( jQuery( ... | 2 |
Ruby | Ruby | fix the undefined method content_tag | ab2ace6bbef1cc98c98e5a9a6b45e734bc5edd9d | <ide><path>actionview/lib/action_view/helpers/translation_helper.rb
<ide> module ActionView
<ide> # = Action View Translation Helpers
<ide> module Helpers
<ide> module TranslationHelper
<add> include TagHelper
<ide> # Delegates to <tt>I18n#translate</tt> but also performs three additional functions.
... | 2 |
Python | Python | parse deepmac meta arch correctly | 8b45de4ffc7eb8d66f0139ee1f62e699ee401072 | <ide><path>research/object_detection/builders/model_builder.py
<ide> def _build_center_net_model(center_net_config, is_training, add_summaries):
<ide> object_detection_params = object_detection_proto_to_params(
<ide> center_net_config.object_detection_task)
<ide>
<add> if center_net_config.HasField('deepm... | 1 |
Java | Java | fix the usage of deprecated methods | 434f2100cb7f16db8acc52a7a9eb13155a5db57a | <ide><path>rxjava-contrib/rxjava-string/src/main/java/rx/observables/StringObservable.java
<ide> import rx.Observable.OnSubscribe;
<ide> import rx.Observable.Operator;
<ide> import rx.Subscriber;
<del>import rx.Subscription;
<add>import rx.functions.Action1;
<ide> import rx.functions.Func0;
<ide> import rx.functions.Fu... | 2 |
Ruby | Ruby | lock connection before checking it in | ce2abffc0e29f562da26f89d7f07aeaf06a9cbcd | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
<ide> def checkout(checkout_timeout = @checkout_timeout)
<ide> # +conn+: an AbstractAdapter object, which was obtained by earlier by
<ide> # calling #checkout on this pool.
<ide> def checkin(conn)
<del> sy... | 1 |
Javascript | Javascript | use symbol instead of sentinel terminology | bcd1732a98a07df6d49cbdb1cb5ea4aedef15aed | <ide><path>src/CollectionImpl.js
<ide> import {
<ide> isIndexed,
<ide> isAssociative,
<ide> isOrdered,
<del> IS_ITERABLE_SENTINEL,
<del> IS_KEYED_SENTINEL,
<del> IS_INDEXED_SENTINEL,
<del> IS_ORDERED_SENTINEL,
<add> IS_COLLECTION_SYMBOL,
<add> IS_KEYED_SYMBOL,
<add> IS_INDEXED_SYMBOL,
<add> IS_ORDERED_SYM... | 11 |
Text | Text | remove wrong default value in buffer.md | 0cd8359652b39cdb577ac3c67bdea03e6aba9f97 | <ide><path>doc/api/buffer.md
<ide> changes:
<ide> -->
<ide>
<ide> * `value` {integer} Number to be written to `buf`.
<del>* `offset` {integer} Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - byteLength`.
<del>* `byteLength` {integer} Number of bytes to write. Must satisfy: ... | 1 |
Java | Java | update nativemodule specs | 5ffabca0549c78048f35bb726e5e9b12f4cbe8bf | <ide><path>ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeAccessibilityInfoSpec.java
<ide> public NativeAccessibilityInfoSpec(ReactApplicationContext reactContext) {
<ide> }
<ide>
<ide> @ReactMethod
<del> public abstract void isTouchExplorationEnabled(Callback onSuccess);
<add> public abstract void ... | 35 |
Ruby | Ruby | add a form hook to erb scaffold. customize and go! | bcf754d8c471187da386e147707598e5c8e52090 | <ide><path>railties/lib/generators.rb
<ide> module Generators
<ide> },
<ide>
<ide> :erb => {
<add> :form => false,
<ide> :layout => true
<ide> },
<ide>
<ide><path>railties/lib/generators/erb/scaffold/scaffold_generator.rb
<ide> class ScaffoldGenerator < Base
<ide>
<ide> argumen... | 2 |
Javascript | Javascript | fix a bunch of flow annotations | 2a3fe0625d8ec322c468314421326ea512d9c6f9 | <ide><path>packager/src/Bundler/Bundle.js
<ide> class Bundle extends BundleBase {
<ide>
<ide> finalize(options: FinalizeOptions) {
<ide> options = options || {};
<del> if (options.runMainModule) {
<add> if (options.runModule) {
<ide> /* $FlowFixMe: this is unsound, as nothing enforces runBeforeMainMo... | 10 |
Javascript | Javascript | use optional chaining to simplify checks | f34c0e0bc00bac9d1f4e375b81b8669ff0b3ce6e | <ide><path>lib/internal/tls/secure-context.js
<ide> function configSecureContext(context, options = {}, name = 'options') {
<ide> for (let i = 0; i < key.length; ++i) {
<ide> const val = key[i];
<ide> const pem = (
<del> val !== undefined && val !== null &&
<del> val.pem !== unde... | 1 |
Go | Go | remove directory when removing devicemapper device | 2343fe44533f19ebae5e6127f4a2a19d1d8773fa | <ide><path>graphdriver/devmapper/driver.go
<ide> import (
<ide> "github.com/dotcloud/docker/graphdriver"
<ide> "github.com/dotcloud/docker/utils"
<ide> "io/ioutil"
<add> "os"
<ide> "path"
<ide> )
<ide>
<ide> func (d *Driver) Remove(id string) error {
<ide> return err
<ide> }
<ide> // This assumes the device ha... | 1 |
Java | Java | make use of enhanced messageheaderaccessor support | ae942ffdb89ae103b6f9e076ec9548594317e2f9 | <ide><path>spring-messaging/src/main/java/org/springframework/messaging/core/AbstractMessageSendingTemplate.java
<ide> import org.springframework.messaging.converter.MessageConversionException;
<ide> import org.springframework.messaging.converter.MessageConverter;
<ide> import org.springframework.messaging.converter.Si... | 22 |
Python | Python | add serializer tests for tokenizer | de974f7bef19dbddc046f07bb2a58b8afa3dba09 | <ide><path>spacy/tests/serialize/test_serialize_tokenizer.py
<add># coding: utf-8
<add>from __future__ import unicode_literals
<add>
<add>from ..util import make_tempdir
<add>
<add>import pytest
<add>
<add>
<add>@pytest.mark.parametrize('text', ["I can't do this"])
<add>def test_serialize_tokenizer_roundtrip_bytes(en_t... | 1 |
Ruby | Ruby | add tests for empty fetch | 5b5c37eaf7969c15fd59d0e6bbc9972f343ec11f | <ide><path>activesupport/test/cache/behaviors/cache_instrumentation_behavior.rb
<ide> def test_instrumentation_with_fetch_multi_as_super_operation
<ide>
<ide> assert_equal %w[ cache_read_multi.active_support ], events.map(&:name)
<ide> assert_equal :fetch_multi, events[0].payload[:super_operation]
<add> ass... | 1 |
PHP | PHP | fix bug with file conversion | 1f2124ef57bdd647979ab75a2863ce448118cca3 | <ide><path>src/Illuminate/Http/Request.php
<ide> public function allFiles()
<ide> protected function convertUploadedFiles(array $files)
<ide> {
<ide> return array_map(function ($file) {
<add> if (is_array($file) && empty(array_filter($file))) {
<add> return $file;
<add> ... | 1 |
Javascript | Javascript | support multi-dot file extension | 22f7d0a4bdf4e33cfb85be1f341b1f8cadf1b668 | <ide><path>lib/internal/modules/cjs/loader.js
<ide> function tryExtensions(p, exts, isMain) {
<ide> return false;
<ide> }
<ide>
<add>// find the longest (possibly multi-dot) extension registered in
<add>// Module._extensions
<add>function findLongestRegisteredExtension(filename) {
<add> const name = path.basename(f... | 3 |
Text | Text | fix a couple of misspelled words. | 6a43b4d61ebf5194aeef822a06ae33082be11000 | <ide><path>guide/english/ruby/common-array-methods/index.md
<ide> array[5]
<ide> ```
<ide>
<ide> #### .pop
<del>The .pop method will permantently remove the last element of an array and return this element:
<add>The .pop method will permanently remove the last element of an array and return this element:
<ide>
<ide> ... | 1 |
Python | Python | add autobackbone + resnetbackbone | 6b217c52e626729bd5de7142358dbaf67402bb40 | <ide><path>src/transformers/__init__.py
<ide> "MODEL_WITH_LM_HEAD_MAPPING",
<ide> "MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPING",
<ide> "AutoModel",
<add> "AutoBackbone",
<ide> "AutoModelForAudioClassification",
<ide> "AutoModelForAudioFrameClassifi... | 10 |
Text | Text | fix typos in scene graph article | 393bb5838e519dca89e1f9c9c67163db99a7d826 | <ide><path>threejs/lessons/threejs-scenegraph.md
<del>Title: Three.js Scenegraph
<add>Title: Three.js Scene Graph
<ide> Description: What's a scene graph?
<ide>
<ide> This article is part of a series of articles about three.js. The
<ide> first article is [three.js fundamentals](threejs-fundamentals.html). If
<del>you ... | 1 |
Python | Python | add print statement to avoid code quality problem | efb619235ca0574720f84e90a8b0f1b451da0b02 | <ide><path>tests/test_modeling_tf_transfo_xl.py
<ide> def test_lm_generate_transfo_xl_wt103(self):
<ide> # TODO: add this test when trasnfo-xl-lmhead is implemented
<ide> with self.assertRaises(NotImplementedError):
<ide> model.generate(input_ids, max_length=200, do_sample=False)
<add> ... | 1 |
Text | Text | add comparison operators | e6b4de233a5044558a58f2735aa5cab9311c5e8b | <ide><path>guide/english/python/bool-function/index.md
<ide> It takes one argument, `x`. `x` is converted using the standard <a href='https:/
<ide>
<ide> If `x` is false or omitted, this returns `False`; otherwise it returns `True`.
<ide>
<add>## Comparison Operators
<add>
<add>There are three Boolean Operators they ... | 1 |
Ruby | Ruby | fix audit annotations for casks | 72a79d934e9c52a8468a6eab4708f36228fff2c6 | <ide><path>Library/Homebrew/cask/audit.rb
<ide> def warnings
<ide> @warnings ||= []
<ide> end
<ide>
<del> def add_error(message)
<del> errors << message
<add> def add_error(message, location: nil)
<add> errors << ({ message: message, location: location })
<ide> end
<ide>
<del> def add... | 4 |
PHP | PHP | use realpath when checking modification time | ffcd5d8f6621c77dfb98f390452d5980bf329092 | <ide><path>src/Illuminate/Filesystem/Filesystem.php
<ide> public function size($path)
<ide> */
<ide> public function lastModified($path)
<ide> {
<del> return filemtime($path);
<add> return filemtime(realpath($path));
<ide> }
<ide>
<ide> /** | 1 |
Python | Python | add tf bert files | 11fae9e636d9d0ae45d578e05193c52ff40f6e30 | <ide><path>pytorch_transformers/file_utils.py
<ide> def url_to_filename(url, etag=None):
<ide> Convert `url` into a hashed filename in a repeatable way.
<ide> If `etag` is specified, append its hash to the url's, delimited
<ide> by a period.
<add> If the url ends with .h5 (Keras HDF5 weights) ands '.h5' ... | 5 |
PHP | PHP | add tests for single set + accessible properties | bc8f1ced98859f22a957ce85c0f18a94805bd5e7 | <ide><path>Cake/Test/TestCase/ORM/EntityTest.php
<ide> public function testSetWithAccessibleWithArray() {
<ide> $this->assertEquals(5, $entity->get('foo'));
<ide> }
<ide>
<add>/**
<add> * Test that accessible() and single property setting works.
<add> *
<add> * @return
<add> */
<add> public function testSetWithAcce... | 1 |
Mixed | Go | add support for syslog over tls | 4b98193beab00bc6cf48762858570a1bd418c9ef | <ide><path>daemon/logger/syslog/syslog.go
<ide> package syslog
<ide>
<ide> import (
<add> "crypto/tls"
<ide> "errors"
<ide> "fmt"
<del> "log/syslog"
<ide> "net"
<ide> "net/url"
<ide> "os"
<ide> "path"
<ide> "strconv"
<ide> "strings"
<ide>
<add> syslog "github.com/RackSec/srslog"
<add>
<ide> "github.com/Sirup... | 2 |
Javascript | Javascript | call setstate callbacks enqueued in cwm | ef99e7e096cb661de0e72f93a442fbfeaaa07b1c | <ide><path>src/renderers/dom/stack/client/ReactMount.js
<ide> var ReactMount = {
<ide> nextElement,
<ide> container,
<ide> shouldReuseMarkup,
<del> context
<add> context,
<add> callback
<ide> ) {
<ide> // Various parts of our code (such as ReactCompositeComponent's
<ide> // _renderValidat... | 5 |
Go | Go | add debug messages while testing devicemapper | 11d695a2973d67906145e7f0972b6e693bdaa3f9 | <ide><path>devmapper/deviceset_devmapper.go
<ide> func (devices *DeviceSetDM) saveMetadata() error {
<ide> }
<ide>
<ide> func (devices *DeviceSetDM) registerDevice(id int, hash string, size uint64) (*DevInfo, error) {
<add> utils.Debugf("registerDevice(%v, %v)", id, hash)
<ide> info := &DevInfo{
<ide> Hash: ... | 4 |
Javascript | Javascript | fix run-ios when specifying a scheme as cli arg | c58e19ef3397db89ba0a8705d3fcafa17cf4aad7 | <ide><path>local-cli/runIOS/runIOS.js
<ide> function runIOS(argv, config, args) {
<ide> } else if (args.udid) {
<ide> return runOnDeviceByUdid(args, scheme, xcodeProject, devices);
<ide> } else {
<del> return runOnSimulator(xcodeProject, args, inferredSchemeName, scheme);
<add> return runOnSimulator(xcode... | 1 |
PHP | PHP | make striplinks a bit more thorough | 7a59b6bb6365b856850a11ca232a5623b6a73fc5 | <ide><path>src/Utility/Text.php
<ide> public static function highlight($text, $phrase, array $options = [])
<ide> /**
<ide> * Strips given text of all links (<a href=....).
<ide> *
<add> * *Warning* This method is not an robust solution in preventing XSS
<add> * or malicious HTML.
<add> *
<ide... | 2 |
Python | Python | replace codecs.open with io.open | 1a93d7f725d7ca2131942f748a9953dbac8ed026 | <ide><path>bin/get_freqs.py
<ide> import os
<ide> import bz2
<ide> import ujson
<del>import codecs
<ide> from preshed.counter import PreshCounter
<ide> from joblib import Parallel, delayed
<ide> import io
<ide> def count_freqs(input_loc, output_loc):
<ide> doc = tokenizer(json_comment['body'])
<ide> doc... | 1 |
PHP | PHP | unify new lines at the end of the file | 881127ef4d74545ee16802fc06a52e1cd96a9626 | <ide><path>lib/Cake/Cache/Cache.php
<ide> public static function settings($name = 'default') {
<ide> }
<ide>
<ide> }
<del>
<ide><path>lib/Cake/Controller/Component/CookieComponent.php
<ide> protected function _explode($string) {
<ide> return $array;
<ide> }
<ide> }
<del>
<ide><path>lib/Cake/Model/Aco.php
<ide> cla... | 26 |
Javascript | Javascript | fix edge case when parsing top-level this on iife | da6f869c1ef39abd0f1e512b07f41f6bbecd4b88 | <ide><path>lib/Parser.js
<ide> class Parser extends Tapable {
<ide> this.walkClass(expression);
<ide> }
<ide>
<del> walkCallExpression(expression) {
<del> let result;
<del>
<del> const walkIIFE = (functionExpression, options, currentThis) => {
<del> const renameArgOrThis = argOrThis => {
<del> const renameId... | 3 |
Javascript | Javascript | use only polling on travis/sl | c64a9853074a392ba83a0f790b28b3be96c1144a | <ide><path>karma-shared.conf.js
<ide> module.exports = function(config) {
<ide> }
<ide> }
<ide> });
<add>
<add>
<add> // TODO(vojta): remove once SauceLabs supports websockets.
<add> // This speeds up the capturing a bit, as browsers don't even try to use websocket.
<add> if (process.env.TRAVIS) {
<add> ... | 1 |
PHP | PHP | add test for | a40fa5cae95119c81fdda9541f90c9071c7d6d35 | <ide><path>lib/Cake/Test/Case/Utility/HashTest.php
<ide> public function testGet() {
<ide> $this->assertEquals($data[1]['Article'], $result);
<ide> }
<ide>
<add>/**
<add> * Test get() with an invalid path
<add> *
<add> * @expectedException InvalidArgumentException
<add> * @return void
<add> */
<add> public function... | 1 |
PHP | PHP | use field instead of property for entity | b54e93730665cfb818226f1058bb737f7c9c6a20 | <ide><path>src/Auth/BaseAuthenticate.php
<ide> protected function _findUser(string $username, ?string $password = null)
<ide> }
<ide>
<ide> $this->_needsPasswordRehash = $hasher->needsRehash($hashedPassword);
<del> $result->unsetProperty($passwordField);
<add> $result->uns... | 13 |
Javascript | Javascript | fix style errors | b031671138a6b997e934cfafa17f03247c036c71 | <ide><path>lib/readline.js
<ide> Interface.prototype._insertString = function(c) {
<ide> this.cursor += c.length;
<ide>
<ide> if (this._getCursorPos().cols === 0) {
<del> this._refreshLine();
<add> this._refreshLine();
<ide> } else {
<del> this.output.write(c);
<add> this.output.wri... | 2 |
Ruby | Ruby | update docs on object#try | a7e0b2f843c4a6fdfe08a45c09d2ff44bcfe994e | <ide><path>activesupport/lib/active_support/core_ext/object/try.rb
<ide> class Object
<ide> # Without a method argument try will yield to the block unless the receiver is nil.
<ide> # @person.try { |p| "#{p.first_name} #{p.last_name}" }
<ide> #--
<del> # +try+ behaves like +Object#send+, unless called on +NilC... | 1 |
Python | Python | use enumerate instead of range(len(...)) | 15e49b4e59ca20e706dbe8339345a35bd625857b | <ide><path>numpy/lib/index_tricks.py
<ide> def __getitem__(self, key):
<ide> arraytypes = []
<ide> scalartypes = []
<ide>
<del> for k in range(len(key)):
<add> for k, item in enumerate(key):
<ide> scalar = False
<del> if isinstance(key[k], slice):
<del> ... | 1 |
Ruby | Ruby | fix railties tests that were order dependent | 655c2c8b50aa113ffbe5a8eaf1296b52d111ee4a | <ide><path>railties/test/generators_test.rb
<ide> def test_fallbacks_for_generators_on_find_by_namespace
<ide> klass = Rails::Generators.find_by_namespace(:plugin, :remarkable)
<ide> assert klass
<ide> assert_equal "test_unit:plugin", klass.namespace
<add> ensure
<add> Rails::Generators.fallbacks.delete... | 1 |
Go | Go | use containerd client `reconnect()` api | 2c682d5209d1d1cdd232ce3909fa25b6023f9a5b | <ide><path>libcontainerd/client_daemon.go
<ide> type client struct {
<ide> containers map[string]*container
<ide> }
<ide>
<add>func (c *client) reconnect() error {
<add> c.Lock()
<add> err := c.remote.Reconnect()
<add> c.Unlock()
<add> return err
<add>}
<add>
<ide> func (c *client) setRemote(remote *containerd.Client... | 3 |
Ruby | Ruby | add `extract_plist` strategy | a210b1a04ef52354c52ac3851582cc9ead805996 | <ide><path>Library/Homebrew/bundle_version.rb
<ide> class BundleVersion
<ide> sig { params(info_plist_path: Pathname).returns(T.nilable(T.attached_class)) }
<ide> def self.from_info_plist(info_plist_path)
<ide> plist = system_command!("plutil", args: ["-convert", "xml1", "-o", "-", info_plist_path]).plist... | 24 |
Mixed | Go | implement build cache based on history array | 690882c2e79c3f3742c709cf158584e61594ba00 | <ide><path>api/server/router/build/build_routes.go
<ide> func newImageBuildOptions(ctx context.Context, r *http.Request) (*types.ImageBui
<ide> var buildUlimits = []*units.Ulimit{}
<ide> ulimitsJSON := r.FormValue("ulimits")
<ide> if ulimitsJSON != "" {
<del> if err := json.NewDecoder(strings.NewReader(ulimitsJSON)... | 13 |
Ruby | Ruby | add more tests for formulaaudit/miscellaneous cop | 626cb6ca91f99df6f7c646d95cb5e82d0dd6532d | <ide><path>Library/Homebrew/test/rubocops/lines_cop_spec.rb
<ide> class Foo < Formula
<ide> end
<ide> end
<ide>
<add> it "with build.universal? exempted formula" do
<add> source = <<-EOS.undent
<add> class Wine < Formula
<add> desc "foo"
<add> url 'http://example.com/foo-1.0.... | 1 |
PHP | PHP | refactor some code into overridable methods | 5326073c80367c243e523befc39271a9e03172cb | <ide><path>lib/Cake/Network/Email/SmtpTransport.php
<ide> protected function _auth() {
<ide> }
<ide>
<ide> /**
<del> * Send emails
<add> * Prepares the `MAIL FROM` SMTP command.
<ide> *
<del> * @return void
<del> * @throws SocketException
<add> * @param string $email The email address to send with the command.
<add>... | 1 |
Java | Java | use beanutils to instantiate target type | c0269770af0f2f51cc7758aa096d8369907d439f | <ide><path>spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java
<ide> else if (Map.class.isAssignableFrom(type)) {
<ide> return CollectionFactory.createMap(type, (keyDesc != null ? keyDesc.getType() : null), 16);
<ide> }
<ide> else {
<del> return type.newInstance();
<add> return Bea... | 1 |
Ruby | Ruby | fix return types for .can_load? | 4ffca8faa2fb055ec5a8329496fe0bfe532f223a | <ide><path>Library/Homebrew/cask/lib/hbc/cask_loader.rb
<ide> def cask(header_token, &block)
<ide>
<ide> class FromURILoader < FromPathLoader
<ide> def self.can_load?(ref)
<del> ref.to_s =~ ::URI.regexp
<add> ref.to_s.match?(::URI.regexp)
<ide> end
<ide>
<ide> def initialize(url)
<... | 1 |
PHP | PHP | fix doc-blocks | 3913c10a54a967d1a6b4e0fc3b162da4054121fb | <ide><path>src/Illuminate/Translation/Translator.php
<ide> public function has($key, $locale = null, $fallback = true)
<ide> * @param string $key
<ide> * @param array $replace
<ide> * @param string $locale
<del> * @return string|array|null
<add> * @return string|array
<ide> */
<ide> ... | 1 |
PHP | PHP | add getrootname() to command | df32d8556589301e30290392fa5bff969dab09a1 | <ide><path>src/Console/Command.php
<ide> public function getName(): string
<ide> return $this->name;
<ide> }
<ide>
<add> /**
<add> * Get the root command name.
<add> *
<add> * @return string
<add> */
<add> public function getRootName(): string
<add> {
<add> [$root] = explode... | 2 |
Text | Text | add a code format in 2015-02-24-react-v0.13-rc1.md | 1744977201a7206cd8ad48ecee5adc2a713c354a | <ide><path>docs/_posts/2015-02-24-react-v0.13-rc1.md
<ide> We've also published version `0.13.0-rc1` of the `react` and `react-tools` packa
<ide> * Support for using ES6 classes to build React components; see the [v0.13.0 beta 1 notes](http://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html) for detai... | 1 |
Text | Text | remove misterdjules from the ctc members list | 342c5f9d4c2eb8686722388d2ff15e3ae1eb9943 | <ide><path>README.md
<ide> more information about the governance of the Node.js project, see
<ide> **Matteo Collina** <matteo.collina@gmail.com> (he/him)
<ide> * [mhdawson](https://github.com/mhdawson) -
<ide> **Michael Dawson** <michael_dawson@ca.ibm.com> (he/him)
<del>* [misterdjules](https://github.com/m... | 1 |
Javascript | Javascript | remove unused reject handlers | 070995d5866beb31ee2b64ece90b883674a95b40 | <ide><path>test/common/inspector-helper.js
<ide> class NodeInstance extends EventEmitter {
<ide> async connectInspectorSession() {
<ide> console.log('[test]', 'Connecting to a child Node process');
<ide> const upgradeRequest = await this.sendUpgradeRequest();
<del> return new Promise((resolve, reject) => {... | 1 |
PHP | PHP | make resource opt in | 8e6ac01b4a311ec4740ab2bced01fbdf6f1241c5 | <ide><path>src/Illuminate/Routing/Console/ControllerMakeCommand.php
<ide> class ControllerMakeCommand extends GeneratorCommand
<ide> *
<ide> * @var string
<ide> */
<del> protected $description = 'Create a new resource controller class';
<add> protected $description = 'Create a new controller class'... | 1 |
Python | Python | stop worker on sigterm | 3ae14215d0f9298b62961021b4635513c8938c20 | <ide><path>celery/bin/celeryd.py
<ide> def run_worker(self):
<ide> def install_worker_term_handler(worker):
<ide>
<ide> def _stop(signum, frame):
<add> worker.stop()
<ide> raise SystemExit()
<add>
<ide> platform.install_signal_handler("SIGTERM", _stop)
<ide>
<add>
<ide> def install_worker_resta... | 1 |
Ruby | Ruby | set uid/gid, use libarchive on macos | 4a3fc2a8fc562418212b8ffea273ff9a3806c38e | <ide><path>Library/Homebrew/dev-cmd/bottle.rb
<ide> def sudo_purge
<ide> system "/usr/bin/sudo", "--non-interactive", "/usr/sbin/purge"
<ide> end
<ide>
<add> def setup_tar_owner_group_args!
<add> # Unset the owner/group for reproducible bottles.
<add> # Use gnu-tar on Linux
<add> return ["--owner", "0"... | 1 |
PHP | PHP | remove return types | fa6e2f025f61e813de537043f693ea02f661a3e4 | <ide><path>src/Illuminate/Filesystem/FilesystemAdapter.php
<ide> public function size($path)
<ide> *
<ide> * @throws UnableToProvideChecksum
<ide> */
<del> public function checksum(string $path, array $options = []): string|false
<add> public function checksum(string $path, array $options = [])
<id... | 1 |
Go | Go | prevent panic on update --container-label-add | e462b4507a7020ae96ec4f4806877bff3a0cae99 | <ide><path>api/client/service/update.go
<ide> func updatePlacement(flags *pflag.FlagSet, placement *swarm.Placement) {
<ide>
<ide> func updateContainerLabels(flags *pflag.FlagSet, field *map[string]string) {
<ide> if flags.Changed(flagContainerLabelAdd) {
<del> if field == nil {
<add> if *field == nil {
<ide> *f... | 1 |
Text | Text | fix typo in pull_request_template.md | de3976a48655a248a2417fcf2d3a511be02e1996 | <ide><path>.github/PULL_REQUEST_TEMPLATE.md
<ide> Help reviewers and the release process by writing your own release notes
<ide> [----------] TYPE
<ide> [ CLI ] [-------------] LOCATION
<ide> [ DOCS ] [ BREAKING ] [-------------]
<del>[ GENERAl ] [ BUGFIX ] [-{Component}-]
<add>[... | 1 |
Go | Go | reset restart timeout if execution longer than 10s | b6db56b5eba00c4e8ad7a6f6c5b018e15dc883eb | <ide><path>container/container.go
<ide> func copyEscapable(dst io.Writer, src io.ReadCloser, keys []byte) (written int64
<ide> // ShouldRestart decides whether the daemon should restart the container or not.
<ide> // This is based on the container's restart policy.
<ide> func (container *Container) ShouldRestart() bool... | 6 |
Javascript | Javascript | improve error message in async-wrap test | f315081dc7abdcc2e96c55b17ff89e4c76008e9b | <ide><path>test/parallel/test-async-wrap-pop-id-during-load.js
<ide> const ret = spawnSync(
<ide> process.execPath,
<ide> ['--stack_size=50', __filename, 'async']
<ide> );
<del>assert.strictEqual(ret.status, 0);
<add>assert.strictEqual(ret.status, 0,
<add> `EXIT CODE: ${ret.status}, STDERR:\n${ret... | 1 |
Go | Go | fix "docker ps" with no containers regression | f57fc03e3b39c225a05edfe217bd7616949d0dd0 | <ide><path>api/client/ps/custom.go
<ide> func customFormat(ctx Context, containers []types.Container) {
<ide> }
<ide>
<ide> if table {
<add> if len(header) == 0 {
<add> // if we still don't have a header, we didn't have any containers so we need to fake it to get the right headers from the template
<add> contai... | 2 |
Text | Text | add guidance on console output in tests | 4d89fcc6d6581dfbe798fd0dc76d83fda98c1b87 | <ide><path>doc/guides/writing-tests.md
<ide> assert.throws(
<ide> );
<ide> ```
<ide>
<add>### Console output
<add>
<add>Output written by tests to stdout or stderr, such as with `console.log()` or
<add>`console.error()`, can be useful when writing tests, as well as for debugging
<add>them during later maintenance. Th... | 1 |
Javascript | Javascript | expose tech#resize event as player#resize | e176b56843b2084c8b0c985d9ea491b5de1da113 | <ide><path>src/js/component.js
<ide> class Component {
<ide> * The width that you want to set postfixed with '%', 'px' or nothing.
<ide> *
<ide> * @param {boolean} [skipListeners]
<del> * Skip the resize event trigger
<add> * Skip the componentresize event trigger
<ide> *
<ide> *... | 3 |
Python | Python | fix setup.py to work in maintenance branches | 9a37cd93d2e57bb8058921dbff52669365e2f3a8 | <ide><path>setup.py
<ide> import textwrap
<ide> import warnings
<ide> import builtins
<add>import re
<ide>
<ide>
<ide> # Python supported version checks. Keep right after stdlib imports to ensure we
<ide> # The version components are changed from ints to strings, but only VERSION
<ide> # seems to matter outside of th... | 1 |
Python | Python | fix a2dd618 for mysql | 3b765029f04a43a2ba432936553e33d7c4a4ce29 | <ide><path>tests/custom_lookups/tests.py
<ide> def __call__(self, *args, **kwargs):
<ide> return SQLFunc(self.name, *args, **kwargs)
<ide>
<ide>
<del>class CustomField(models.Field):
<add>class CustomField(models.TextField):
<ide>
<ide> def get_lookup(self, lookup_name):
<ide> if lookup_name.star... | 1 |
Python | Python | support py3 for configure.py | a582c6b07ccce44973acaba4c60c4549cbaa5c38 | <ide><path>configure.py
<ide> import shlex
<ide> import subprocess
<ide> import shutil
<del>import string
<ide> from distutils.spawn import find_executable as which
<ide>
<ide> # If not run from node/, cd to node/.
<ide> def print_verbose(x):
<ide>
<ide> def b(value):
<ide> """Returns the string 'true' if value is ... | 1 |
Python | Python | remove unused usage of logging module | 201d6e43f31f2816f4c60ccd225092dc9e6887bd | <ide><path>airflow/api_connexion/endpoints/dag_source_endpoint.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>import logging
<ide>
<ide> from flask import Response, current_app, request
<ide> from itsd... | 2 |
Javascript | Javascript | improve landing example [ci skip] | dcd6e06c47f3804f50251dd82635625c4d83fb4c | <ide><path>website/src/widgets/landing.js
<ide> import Link from '../components/link'
<ide> import BenchmarksChoi from 'usage/_benchmarks-choi.md'
<ide>
<ide> const CODE_EXAMPLE = `# pip install spacy
<del># python -m spacy download en_core_web_md
<add># python -m spacy download en_core_web_sm
<ide>
<ide> import spac... | 1 |
Javascript | Javascript | reduce requestanimationframe polyfill | 4462a2c950b989aabf6d5c50b20b6b79a9e6a2ba | <ide><path>src/helpers/index.js
<ide> export default {
<ide>
<ide> return niceFraction * Math.pow(10, exponent);
<ide> },
<del> // Request animation polyfill - https://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
<add> // Request animation polyfill
<ide> requestAnimFrame: (function() {
<ide> ... | 1 |
Text | Text | harmonize yaml comments | 0aa2c5bec64db87945c66161bac030da20147fc2 | <ide><path>doc/api/buffer.md
<ide> added: v0.5.5
<ide> changes:
<ide> - version:
<ide> - v14.9.0
<del> - 12.19.0
<add> - v12.19.0
<ide> pr-url: https://github.com/nodejs/node/pull/34729
<ide> description: This function is also available as `buf.writeUint16LE()`.
<ide> - version: v10.0.0
<ide><path... | 6 |
Python | Python | add tests for new feature and fix in random.choice | 7f9d7bcf616371f3318513ca5500f19124f573e1 | <ide><path>numpy/random/tests/test_random.py
<ide> def test_choice_nonuniform_noreplace(self):
<ide> np.random.seed(self.seed)
<ide> actual = np.random.choice(4, 3, replace=False,
<ide> p=[0.1, 0.3, 0.5, 0.1])
<del> desired = np.array([2, 1, 3])
<add> desi... | 1 |
Ruby | Ruby | apply suggestions from code review | 3d27894015962a780dc3624ea6284eb303824bef | <ide><path>Library/Homebrew/formula.rb
<ide> def method_added(method)
<ide> # @!attribute [w]
<ide> # The SPDX ID of the open-source license that the formula uses.
<ide> # Shows when running `brew info`.
<add> # Multiple licenses means that the software is licensed under multiple licenses.
<add> # Do ... | 1 |
Javascript | Javascript | remove unused code | 76b718092a0f0aad73300371c2ed43f5388c9dd3 | <ide><path>d3.layout.js
<ide> d3.layout.hierarchy = function() {
<ide> return root;
<ide> };
<ide>
<del> // If the new API is used, enabling inlining.
<del> hierarchy.nodes = function(d) {
<del> d3_layout_hierarchyInline = true;
<del> return (hierarchy.nodes = hierarchy)(d);
<del> };
<del>
<ide> retur... | 5 |
Javascript | Javascript | escape sample code in ng a directive | e34519e93bacfa02e220a663aba671403cdbcada | <ide><path>src/ng/directive/a.js
<ide> *
<ide> * The reasoning for this change is to allow easy creation of action links with `ngClick` directive
<ide> * without changing the location or causing page reloads, e.g.:
<del> * <a href="" ng-click="model.$save()">Save</a>
<add> * `<a href="" ng-click="model.$save()">Save... | 1 |
PHP | PHP | apply styleci fixes | 41df68e606e946d096bf851068d2b988a1a18717 | <ide><path>src/Illuminate/Console/Scheduling/CallbackEvent.php
<ide> use LogicException;
<ide> use InvalidArgumentException;
<ide> use Illuminate\Contracts\Container\Container;
<del>use Illuminate\Contracts\Cache\Repository as Cache;
<ide>
<ide> class CallbackEvent extends Event
<ide> {
<ide><path>src/Illuminate/Conso... | 5 |
Text | Text | specify max size for secret in doc | 5f8fcd9d63c055262da82306273034060a3bb306 | <ide><path>docs/reference/commandline/secret_create.md
<ide> Options:
<ide>
<ide> ## Description
<ide>
<del>Creates a secret using standard input or from a file for the secret content. You must run this
<del>command on a manager node.
<add>Creates a secret using standard input or from a file for the secret content. Y... | 4 |
Python | Python | simplify block implementation | a5c6f0dbfff36956d879010177cfea3eb4f5b04f | <ide><path>numpy/core/shape_base.py
<ide> def stack(arrays, axis=0, out=None):
<ide> return _nx.concatenate(expanded_arrays, axis=axis, out=out)
<ide>
<ide>
<del>class _Recurser(object):
<del> """
<del> Utility class for recursing over nested iterables
<del> """
<del> def __init__(self, recurse_if):
<... | 1 |
PHP | PHP | add method for easier error bag checking | 4287ebc76025cd31e0ba6730481a95aeb471e305 | <ide><path>src/Illuminate/Foundation/Testing/TestResponse.php
<ide> public function assertSessionHasErrors($keys = [], $format = null, $errorBag = '
<ide> return $this;
<ide> }
<ide>
<add> /**
<add> * Assert that the session has the given errors.
<add> *
<add> * @param string $errorBag
<ad... | 1 |
Java | Java | clarify semantics of classpathresource.getpath() | 1052f48eb69c51a63c06864856abd4d9c71d2348 | <ide><path>spring-core/src/main/java/org/springframework/core/io/ClassPathResource.java
<ide> /*
<del> * Copyright 2002-2021 the original author or authors.
<add> * Copyright 2002-2022 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not ... | 1 |
Javascript | Javascript | exclude docs and samples too | 2acf1467fc5bf85c8053820c3b83646946d2255a | <ide><path>script/lib/include-path-in-packaged-app.js
<ide> const EXCLUDE_REGEXPS_SOURCES = [
<ide>
<ide> // Ignore test and example folders
<ide> 'node_modules' + escapeRegExp(path.sep) + '.*' + escapeRegExp(path.sep) + '_*te?sts?_*' + escapeRegExp(path.sep),
<del> 'node_modules' + escapeRegExp(path.sep) + '.*' ... | 1 |
Ruby | Ruby | treat combined durations as a single unit | 32f215c3014e580e512db5e8772d0deadf3d6497 | <ide><path>activesupport/lib/active_support/duration.rb
<ide> class Duration
<ide> autoload :ISO8601Serializer, "active_support/duration/iso8601_serializer"
<ide>
<ide> def initialize(value, parts) #:nodoc:
<del> @value, @parts = value, parts
<add> @value, @parts = value, parts.to_h
<add> @parts... | 2 |
PHP | PHP | add a test demonstrating current behavior | f9de012ca883b2051e4a7bd1013170a9452c46bc | <ide><path>tests/TestCase/ORM/AssociationTest.php
<ide> */
<ide> namespace Cake\Test\TestCase\ORM;
<ide>
<add>use Cake\Core\Plugin;
<ide> use Cake\ORM\Association;
<ide> use Cake\ORM\Table;
<ide> use Cake\ORM\TableRegistry;
<ide> public function testTarget()
<ide> $this->assertSame($other, $this->association-... | 1 |
Text | Text | fix the typo url and info | f6bd62a8d735d4748dc4e5e4235e04284a7f5af6 | <ide><path>experimental/vlan-networks.md
<ide> Macvlan Bridge mode has a unique MAC address per container used to track MAC to
<ide>
<ide> - In Macvlan and Ipvlan L2 mode, containers on separate networks cannot reach one another without an external process routing between the two networks/subnets. This also applies to... | 1 |
PHP | PHP | add getpath() to plugins | 4efb602bd2e5876f7d11e2b8c12bd7db81a8e912 | <ide><path>src/Core/PluginApp.php
<ide> */
<ide> namespace Cake\Core;
<ide>
<add>use ReflectionClass;
<add>
<ide> /**
<ide> * Base Plugin Class
<ide> *
<ide> class PluginApp implements PluginInterface
<ide> */
<ide> protected $consoleEnabled = true;
<ide>
<add> /**
<add> * The path to this plugin.
... | 3 |
PHP | PHP | add getbroker() and getguard() | 3f1c412034d6d3ef233afcb514f65c05a4a2e5b6 | <ide><path>src/Illuminate/Foundation/Auth/ResetsPasswords.php
<ide> trait ResetsPasswords
<ide> {
<ide> use RedirectsUsers;
<ide>
<add> /**
<add> * Get the broker to be used during resetting the password
<add> * @return string|null
<add> */
<add> public function getBroker()
<add> {
<add> ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.