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 |
|---|---|---|---|---|---|
Python | Python | fix multi heuristic astar algo | cd987372e4c3a9f87d65b757ab46a48527fc9fa9 | <ide><path>graphs/multi_heuristic_astar.py
<ide>
<ide> import numpy as np
<ide>
<add>TPos = tuple[int, int]
<add>
<ide>
<ide> class PriorityQueue:
<ide> def __init__(self):
<ide> def get(self):
<ide> return (priority, item)
<ide>
<ide>
<del>def consistent_heuristic(P, goal):
<add>def consistent_heurist... | 1 |
Java | Java | turn flatviewmanager into viewgroupmanager | 85cdfcd1f78fa70ff913570d831c9994f604fab0 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/flat/FlatViewManager.java
<ide> package com.facebook.react.flat;
<ide>
<ide> import com.facebook.react.uimanager.ThemedReactContext;
<del>import com.facebook.react.uimanager.BaseViewManager;
<add>import com.facebook.react.uimanager.ViewGroupManager;
<ide>
<del>... | 4 |
PHP | PHP | make line shorter | f00fb8c92285f1e9eeb087d25f8058f173159f5e | <ide><path>src/Illuminate/Bus/Dispatcher.php
<ide> protected function commandShouldBeQueued($command)
<ide> */
<ide> public function dispatchToQueue($command)
<ide> {
<del> $queue = call_user_func($this->queueResolver, isset($command->connection) ? $command->connection : null);
<add> $connect... | 1 |
PHP | PHP | register symfony console namespace with autoloader | 2c12be305d99020f1213bf680a60d14ea5638988 | <ide><path>laravel/core.php
<ide> => path('sys').'database/eloquent/relationships/has_one_or_many'.EXT,
<ide> ));
<ide>
<add>/*
<add>|--------------------------------------------------------------------------
<add>| Register The Symfony Components
<add>|---------------------------------------------... | 1 |
Text | Text | point people to prod build in perf docs | 43b63995a8c7233569c142840ca73f653bbfcabf | <ide><path>docs/docs/10.9-perf.md
<ide> In addition to giving you an overview of your app's overall performance, ReactPe
<ide>
<ide> See these two articles by the [Benchling Engineering Team](http://benchling.engineering) for a in-depth introduction to performance tooling: ["Performance Engineering with React"](http:/... | 2 |
Python | Python | add tests for basis and cast static class methods | 8ad18ab3799d669d93759e7c20ff6457ed1e2bc2 | <ide><path>numpy/polynomial/tests/test_chebyshev.py
<ide> def test_call(self) :
<ide> xx = 2*x - 1
<ide> assert_almost_equal(self.p2(x), self.p1(xx))
<ide>
<del> def test_degree(self) :
<del> assert_equal(self.p1.degree(), 2)
<del>
<ide> def test_cutdeg(self) :
<ide> assert_raises... | 7 |
Mixed | Python | add token_splitter component | bf0cdae8d41f2cc458739c2512c8bdb625757770 | <ide><path>spacy/pipeline/functions.py
<add>import srsly
<add>from thinc.api import Config
<add>from typing import Dict, Any
<ide> from ..language import Language
<ide> from ..matcher import Matcher
<ide> from ..tokens import Doc
<ide> from ..util import filter_spans
<add>from .. import util
<ide>
<ide>
<ide> @Langua... | 4 |
Javascript | Javascript | add portal support to react.children calls | 0752a63f59168b56b14ec45220bad97b39222604 | <ide><path>packages/react/src/ReactChildren.js
<ide> var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
<ide> var REACT_ELEMENT_TYPE =
<ide> (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) ||
<ide> 0xeac7;
<del>
<add>const REACT_PORTAL_TYPE =
<add> (typeof Symbol === 'funct... | 2 |
Ruby | Ruby | create project view with subl, too | 5ce864176a34215b0991ed30b93732b830dced66 | <ide><path>Library/Homebrew/cmd/edit.rb
<ide> def edit
<ide> # If no brews are listed, open the project root in an editor.
<ide> if ARGV.named.empty?
<ide> editor = File.basename which_editor
<del> if editor == "mate"
<del> # If the user is using TextMate, give a nice project view instead.
<de... | 1 |
Ruby | Ruby | remove hardcoded paths in keg tests | bca37554b7f0f7fbd671ee714e435445141137f0 | <ide><path>Library/Homebrew/test/test_keg.rb
<ide> def test_link_dry_run
<ide> assert !@keg.linked?
<ide>
<ide> ['hiworld', 'helloworld', 'goodbye_cruel_world'].each do |file|
<del> assert_match "/private/tmp/testbrew/prefix/bin/#{file}", $stdout.string
<add> assert_match "#{HOMEBREW_PREFIX}/bin/#{fi... | 1 |
Go | Go | use flag constants for swarm flag | c08a50dbd1bac8a0bf1c9be5e617273c19a54a2e | <ide><path>api/client/swarm/init.go
<ide> type initOptions struct {
<ide> }
<ide>
<ide> func newInitCommand(dockerCli *client.DockerCli) *cobra.Command {
<del> var flags *pflag.FlagSet
<ide> opts := initOptions{
<ide> listenAddr: NewListenAddrOption(),
<ide> autoAccept: NewAutoAcceptOption(),
<ide> func newInitCo... | 4 |
Javascript | Javascript | allow multiple loading of function modules | 2f0a4488731fdb0e8217325dbb52a576defd09bd | <ide><path>src/apis.js
<ide> * @returns {string} hash string such that the same input will have the same hash string.
<ide> * The resulting string key is in 'type:hashKey' format.
<ide> */
<del>function hashKey(obj) {
<add>function hashKey(obj, nextUidFn) {
<ide> var objType = typeof obj,
<ide> key;
... | 6 |
Text | Text | add missing entries in ap changelog | 0654f76a5ae5c7c34d22da0f732d45d9300c0762 | <ide><path>actionpack/CHANGELOG.md
<ide> ## Rails 4.0.0 (unreleased) ##
<ide>
<add>* Sprockets integration has been extracted from Action Pack and the `sprockets-rails`
<add> gem should be added to Gemfile (under the assets group) in order to use Rails asset
<add> pipeline in future versions of Rails.
<add>
... | 1 |
Ruby | Ruby | fix rubocop warnings | dab681e71563b8d633d290f2f381a2101b56a3d8 | <ide><path>Library/Homebrew/requirements/perl_requirement.rb
<ide> class PerlRequirement < Requirement
<ide> default_formula "perl"
<ide>
<ide> def initialize(tags)
<del> @version = tags.shift if /^\d+\.\d+$/ === tags.first
<add> @version = tags.shift if /^\d+\.\d+$/ =~ tags.first
<ide> raise "PerlRequir... | 1 |
Ruby | Ruby | remove ruby 1.8 support code | 44bd9719e938dd8e8e6764f00d2c6ba40b4d34e3 | <ide><path>railties/lib/rails/generators/base.rb
<ide> def class_collisions(*class_names) #:nodoc:
<ide> nesting = class_name.split('::')
<ide> last_name = nesting.pop
<ide>
<del> # Hack to limit const_defined? to non-inherited on 1.9
<del> extra = []
<del> extr... | 1 |
Javascript | Javascript | convert anim values back to arrays | 5b1441a0e9422d25bf0343aae9fca2f3df8b5504 | <ide><path>examples/js/loaders/FBXLoader.js
<ide>
<ide> if ( rawTracks.transform ) rawTracks.transform.decompose( initialPosition, initialRotation, initialScale );
<ide>
<add> initialPosition = initialPosition.toArray();
<add> initialRotation = new THREE.Euler().setFromQuaternion( initialRotation ).toArray(); // ... | 1 |
Javascript | Javascript | remove stray copyright notices | c2b8b308369e37b31c00fd30918e2dd84522b993 | <ide><path>test/message/eval_messages.js
<ide> 'use strict';
<del>// USE OR OTHER DEALINGS IN THE SOFTWARE.
<ide>
<ide> var common = require('../common');
<ide> var assert = require('assert');
<ide><path>test/message/stdin_messages.js
<ide> 'use strict';
<del>// USE OR OTHER DEALINGS IN THE SOFTWARE.
<ide>
<ide> var ... | 4 |
Ruby | Ruby | determine revision more reliably | 1b7718f6a744881c853f258e40ab874cd975db58 | <ide><path>Library/Homebrew/cmd/bottle.rb
<ide> def bottle_formula f
<ide> return ofail "Formula not installed with '--build-bottle': #{f.name}"
<ide> end
<ide>
<del> master_bottle_filenames = f.bottle_filenames 'origin/master'
<del> bottle_revision = -1
<del> begin
<del> bottle_revision += 1
<... | 2 |
Javascript | Javascript | improve inspect edge cases | 892c51f330f99b7eb57481e183df61530a9c5956 | <ide><path>lib/internal/util/inspect.js
<ide> function formatProxy(ctx, proxy, recurseTimes) {
<ide> formatValue(ctx, proxy[1], recurseTimes)
<ide> ];
<ide> ctx.indentationLvl -= 2;
<del> return reduceToSingleString(ctx, res, '', ['Proxy [', ']']);
<add> return reduceToSingleString(
<add> ctx, res, '', ['P... | 2 |
Ruby | Ruby | add bottle regex | 28a20b70fc6874e6b3329e729bd199816281ed4a | <ide><path>Library/Homebrew/bottle_version.rb
<ide> def self._parse spec
<ide> return m.captures.first unless m.nil?
<ide>
<ide> # e.g. ssh-copy-id-6.2p2.bottle.tar.gz
<del> m = /(\d\.(\d)+(p(\d)+)?)/.match(stem)
<add> # e.g. icu4c-52.1.bottle.tar.gz
<add> m = /(\d+\.(\d)+(p(\d)+)?)/.match(stem)
<ide>... | 2 |
Javascript | Javascript | remove throughput (covered by benchmark/net) | 051c1317f99ede15a831d1f542bd89a47ab77397 | <ide><path>benchmark/throughput-child.js
<del>var net = require('net');
<del>var received = 0;
<del>var start = process.hrtime();
<del>var socket = net.connect(8000);
<del>
<del>socket.on('data', function(d) {
<del> received += d.length;
<del>});
<del>
<del>var interval = setInterval(function() {
<del> // After 1 gig... | 2 |
Go | Go | set correct default shell for platform in builder | fe7b4d8fcd737b9162540149acc427d51d1ddfb9 | <ide><path>builder/dockerfile/builder_unix.go
<ide>
<ide> package dockerfile
<ide>
<del>var defaultShell = []string{"/bin/sh", "-c"}
<add>func defaultShellForPlatform(platform string) []string {
<add> return []string{"/bin/sh", "-c"}
<add>}
<ide><path>builder/dockerfile/builder_windows.go
<ide> package dockerfile
<id... | 6 |
Java | Java | add websockethandlerinvoker class | 5f22cf053279b4a692eac95b5fbfb9701110cd4e | <ide><path>spring-websocket/src/main/java/org/springframework/sockjs/AbstractSockJsSession.java
<ide> import org.springframework.websocket.TextMessage;
<ide> import org.springframework.websocket.WebSocketHandler;
<ide> import org.springframework.websocket.WebSocketSession;
<add>import org.springframework.websocket.adap... | 13 |
Ruby | Ruby | add collectionproxy#<< documentation | bb887b92f8ed119641d68487cef1b5b34b2518a1 | <ide><path>activerecord/lib/active_record/associations/collection_proxy.rb
<ide> def to_ary
<ide> end
<ide> alias_method :to_a, :to_ary
<ide>
<add> # Adds one or more +records+ to the collection by setting their foreign keys
<add> # to the collection‘s primary key. Returns +self+, so several appe... | 1 |
Ruby | Ruby | turn scope in to a linked list | dc3f25c8a5aa64de9225f11498a389a2d31e880a | <ide><path>actionpack/lib/action_dispatch/routing/mapper.rb
<ide> module Scoping
<ide> # end
<ide> def scope(*args)
<ide> options = args.extract_options!.dup
<del> recover = {}
<add> scope = {}
<ide>
<ide> options[:path] = args.flatten.join('/') if args.any?
<ide... | 1 |
Text | Text | remove obsolete warning about regular expression | 96c525f2509a9ec1890c5218f6a65b22660b97f7 | <ide><path>guides/source/active_record_validations.md
<ide> If you set `:only_integer` to `true`, then it will use the
<ide> regular expression to validate the attribute's value. Otherwise, it will try to
<ide> convert the value to a number using `Float`.
<ide>
<del>WARNING. Note that the regular expression above allo... | 1 |
PHP | PHP | make testremove meaningful | f2a61e270cdaf1a480f6e64fff22010f2552dd83 | <ide><path>tests/TestCase/ORM/TableRegistryTest.php
<ide> public function testGenericInstances()
<ide> */
<ide> public function testRemove()
<ide> {
<del> Plugin::load('TestPlugin');
<del>
<del> $pluginTable = TableRegistry::get('TestPlugin.Comments');
<del> $cachedTable = TableRegistr... | 1 |
Ruby | Ruby | add support for the --git option | 128f63db53db07a59d7df19748fc95b34a86f83c | <ide><path>Library/Homebrew/cmd/reinstall.rb
<ide> def reinstall_args
<ide> env: :display_install_times,
<ide> description: "Print install times for each formula at the end of the run.",
<ide> }],
<add> [:switch, "-g", "--git", {
<add> description: "Create a Git repos... | 2 |
Python | Python | add support for grouped choices | 56b3f196057732ec441fe0f5982538431f1b069f | <ide><path>rest_framework/fields.py
<ide> import datetime
<ide> import decimal
<ide> import inspect
<add>import itertools
<ide> import re
<ide> import uuid
<ide>
<ide> class ChoiceField(Field):
<ide> }
<ide>
<ide> def __init__(self, choices, **kwargs):
<del> # Allow either single or paired choices styl... | 3 |
Python | Python | fix ticket #944 | 4a632534604d686ff9ac5a9629ce06f7c895cd1e | <ide><path>numpy/lib/polynomial.py
<ide> def polyint(p, m=1, k=None):
<ide> else:
<ide> truepoly = isinstance(p, poly1d)
<ide> p = NX.asarray(p)
<del> y = NX.zeros(len(p)+1, float)
<add> y = NX.zeros(len(p) + 1, p.dtype)
<ide> y[:-1] = p*1.0/NX.arange(len(p), 0, -1)
<ide> ... | 2 |
Javascript | Javascript | use const where applicable in uglifyjsplugin | 1d78f990a6af1a5b85e45b345b4f7861b03bb12b | <ide><path>lib/optimize/UglifyJsPlugin.js
<ide> class UglifyJsPlugin {
<ide> }
<ide>
<ide> apply(compiler) {
<del> let options = this.options;
<add> const options = this.options;
<ide> options.test = options.test || /\.js($|\?)/i;
<ide>
<del> let requestShortener = new RequestShortener(compiler.context);
<add>... | 1 |
Javascript | Javascript | add test for async hooks parity for async/await | e993e45dbf99a155583ed4c7e933ceae926f597c | <ide><path>test/async-hooks/hook-checks.js
<ide> exports.checkInvocations = function checkInvocations(activity, hooks, stage) {
<ide> );
<ide>
<ide> // Check that actual invocations for all hooks match the expected invocations
<del> [ 'init', 'before', 'after', 'destroy' ].forEach(checkHook);
<add> [ 'init', 'be... | 3 |
PHP | PHP | fix handling of head http requests | f624a6849f6d4b32ce6187bffaf6293cad5277c7 | <ide><path>laravel/request.php
<ide> public static function uri()
<ide> */
<ide> public static function method()
<ide> {
<add> if ($_SERVER['REQUEST_METHOD'] == 'HEAD')
<add> {
<add> return 'GET';
<add> }
<add>
<ide> return (static::spoofed()) ? $_POST[Request::spoofer] : $_SERVER['REQUEST_METHOD'];
<ide> }... | 2 |
Text | Text | add javascript jquery book by duckett | d5177b4bea9f25714e95aa15859cb36df0160e2f | <ide><path>guide/english/book-recommendations/javascript/index.md
<ide> A collection of articles covering the basics (core language and working with a b
<ide> - [Online](https://javascript.info/)
<ide> - [E-book](https://javascript.info/ebook)
<ide>
<add>#### Javascript and Jquery: Interactive Front End Web Developmen... | 1 |
PHP | PHP | add validate mac address | 69179b843b2b43abd28744a0f25656455870a44e | <ide><path>src/Illuminate/Validation/Concerns/ValidatesAttributes.php
<ide> public function validateIpv6($attribute, $value)
<ide> return filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false;
<ide> }
<ide>
<add> /**
<add> * Validate that an attribute is a valid MAC address.
<add> *... | 2 |
Javascript | Javascript | run jshint and jscs on release scripts | b80700c75f2d4920ebdd81b6122fa0c4f65723b1 | <ide><path>Gruntfile.js
<ide> module.exports = function( grunt ) {
<ide> jshint: {
<ide> all: {
<ide> src: [
<del> "src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/tasks/*",
<del> "build/{bower-install,release-notes,release}.js"
<add> "src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/**/*.... | 2 |
PHP | PHP | cleanup the caster | ae0e42fb7ff008e48abd4baa7427bba3232ab9fe | <ide><path>src/Illuminate/Foundation/Console/IlluminateCaster.php
<ide> use Illuminate\Support\Collection;
<ide> use Illuminate\Foundation\Application;
<ide> use Illuminate\Database\Eloquent\Model;
<del>use Symfony\Component\VarDumper\Cloner\Stub;
<ide> use Symfony\Component\VarDumper\Caster\Caster;
<ide>
<ide> class ... | 1 |
Python | Python | install typing package under python 2.7 | 7416379d1bb1bc1ece5ce9f621222318234de77d | <ide><path>setup.py
<ide> def run(self):
<ide> if PY2_pre_279:
<ide> install_requires.append('backports.ssl_match_hostname')
<ide>
<add>if PY2:
<add> install_requires.append('typing')
<add>
<ide> needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
<ide> pytest_runner = ['pytest-runner'] if needs_pyt... | 1 |
Go | Go | use device id as specified by caller | 7b2b15d3e9f9b7ad898a36bbe5ceb42c9ca58d47 | <ide><path>daemon/graphdriver/devmapper/deviceset.go
<ide> func (devices *DeviceSet) initMetaData() error {
<ide> return nil
<ide> }
<ide>
<add>func (devices *DeviceSet) incNextDeviceId() {
<add> // Ids are 24bit, so wrap around
<add> devices.NextDeviceId = (devices.NextDeviceId + 1) & 0xffffff
<add>}
<add>
<add>func... | 2 |
Javascript | Javascript | remove file from tree | 4960478a4794429a47b7de6942abcfb71a6adda9 | <ide><path>gulpfile.js
<del>var gulp = require( 'gulp' );
<del>var pump = require( 'pump' );
<del>var connect = require( 'gulp-connect' );
<del>
<del>
<del>gulp.task('runserver', function() {
<del>
<del> connect.server( { root: '.', port: 8888 } );
<del>
<del>});
<del>
<del> gulp.task( 'default', [ 'runserver' ]... | 1 |
Javascript | Javascript | fix some errors in debugger tests | aea568b04a26cb7d725df57e5c593a1e0d5147b3 | <ide><path>lib/_debugger.js
<ide> function Client() {
<ide> this._reqCallbacks = [];
<ide> var socket = this;
<ide>
<del> this.currentFrame = 0;
<add> this.currentFrame = NO_FRAME;
<ide> this.currentSourceLine = -1;
<ide> this.currentSource = null;
<ide> this.handles = {};
<ide><path>test/simple/test-debug... | 2 |
Javascript | Javascript | fix multifile tests | 51bb887a28a5f71aab543108d6207df34df19ee5 | <ide><path>cypress/integration/learn/challenges/multifile.js
<ide> describe('Challenge with multifile editor', () => {
<ide> });
<ide>
<ide> it('renders the file tab buttons', () => {
<del> cy.get(selectors.monacoTabs).should('exist');
<ide> cy.get(selectors.monacoTabs).contains('index.html');
<ide> cy.... | 1 |
Go | Go | use defer to unlock mutex | 7ce810c7717ec171892370c13bd3da6290cb8940 | <ide><path>pkg/ioutils/bytespipe.go
<ide> func NewBytesPipe() *BytesPipe {
<ide> // It can allocate new []byte slices in a process of writing.
<ide> func (bp *BytesPipe) Write(p []byte) (int, error) {
<ide> bp.mu.Lock()
<add> defer bp.mu.Unlock()
<ide>
<ide> written := 0
<ide> loop0:
<ide> for {
<ide> if bp.close... | 1 |
Text | Text | fix header examples and add codesandbox for part 6 | c0ac9d38d2f8fd3f0b03d685e5a1fe070a07e132 | <ide><path>docs/tutorials/fundamentals/part-5-ui-and-react.md
<ide> const Header = () => {
<ide> // highlight-next-line
<ide> const dispatch = useDispatch()
<ide>
<del> const handleChange = e => setText(e.target.value.trim())
<add> const handleChange = e => setText(e.target.value
<ide>
<ide> const handleKeyDo... | 2 |
Python | Python | remove unused function | 0b1dcbac1488e62379c2da326d666b39221e84e9 | <ide><path>spacy/_ml.py
<ide> def backward(d_output, sgd=None):
<ide> return vectors, backward
<ide>
<ide>
<del>def fine_tune(embedding, combine=None):
<del> if combine is not None:
<del> raise NotImplementedError(
<del> "fine_tune currently only supports addition. Set combine=None")
<del> ... | 1 |
Python | Python | remove match_mlperf from expected cache keys | fefe47ee1f557ed13fc2fbcd7d5e0b6c11e5121b | <ide><path>official/recommendation/data_preprocessing.py
<ide>
<ide> _EXPECTED_CACHE_KEYS = (
<ide> rconst.TRAIN_USER_KEY, rconst.TRAIN_ITEM_KEY, rconst.EVAL_USER_KEY,
<del> rconst.EVAL_ITEM_KEY, rconst.USER_MAP, rconst.ITEM_MAP, "match_mlperf")
<add> rconst.EVAL_ITEM_KEY, rconst.USER_MAP, rconst.ITEM_MAP)
<... | 1 |
Text | Text | trim training 101 | fb5dbe30b5cb662113d77903cb64552c57aa6ef9 | <ide><path>website/docs/usage/101/_training.md
<ide> it's learning the right things, you don't only need **training data** – you'll
<ide> also need **evaluation data**. If you only test the model with the data it was
<ide> trained on, you'll have no idea how well it's generalizing. If you want to train
<ide> a model fr... | 1 |
Javascript | Javascript | remove ie9 testing checks | a8d8c9ad00d34d1b1f461212942def6b0c528933 | <ide><path>packages/ember-glimmer/tests/integration/helpers/custom-helper-test.js
<ide> moduleFor('Helpers test: custom helpers', class extends RenderingTest {
<ide> }
<ide> });
<ide>
<del>// these feature detects prevent errors in these tests
<del>// on platforms (*cough* IE9 *cough*) that do not
<del>// property s... | 1 |
Javascript | Javascript | expand helper function | 6f6e7103d174be95cc62e87f28bcc753d6045062 | <ide><path>packages/ember-metal/lib/property_get.js
<ide> if (Ember.config.overrideAccessors) {
<ide> get = Ember.get;
<ide> }
<ide>
<del>function firstKey(path) {
<del> return path.match(FIRST_KEY)[0];
<del>}
<del>
<ide> /**
<ide> @private
<ide>
<ide> var normalizeTuple = Ember.normalizeTuple = function(target,... | 1 |
Text | Text | add example for beforeexit event | ed24b8f10ac34a1191c0d884b3074f15f0ba6e70 | <ide><path>doc/api/process.md
<ide> termination, such as calling [`process.exit()`][] or uncaught exceptions.
<ide> The `'beforeExit'` should *not* be used as an alternative to the `'exit'` event
<ide> unless the intention is to schedule additional work.
<ide>
<add>```js
<add>process.on('beforeExit', (code) => {
<add>... | 1 |
Ruby | Ruby | build the reverse_order on its proper method | 6c311e0b7538e8c55797aa889fdf66780ab283a4 | <ide><path>activerecord/lib/active_record/relation/merger.rb
<ide> def merge_multi_values
<ide> def merge_single_values
<ide> relation.from_value = values[:from] unless relation.from_value
<ide> relation.lock_value = values[:lock] unless relation.lock_value
<del> relation.... | 4 |
Python | Python | fix indentation to follow pep8 | 9ef15659f5003121605ba5096405276dcdf54254 | <ide><path>numpy/random/setup.py
<ide> def generate_libraries(ext, build_dir):
<ide> defs = [('_LARGE_FILES', None)]
<ide> else:
<ide> defs = [('_FILE_OFFSET_BITS', '64'),
<del> ('_LARGEFILE_SOURCE', '1'),
<del> ('_LARGEFILE64_SOURCE', '1')]
<add> ('_LARGEFILE_SO... | 1 |
Javascript | Javascript | add validatebuffer to improve error | bb4891d8d465c951e0ab1c10346251f61f60e8c4 | <ide><path>lib/fs.js
<ide> function read(fd, buffer, offsetOrOptions, length, position, callback) {
<ide> }
<ide> ({
<ide> offset = 0,
<del> length = buffer.byteLength - offset,
<add> length = buffer?.byteLength - offset,
<ide> position = null,
<ide> } = params ?? kEmptyObject);
<ide> ... | 2 |
PHP | PHP | refactor the config class for more simplicity | d9b7b7dc52b7f700e50bb4f06258011dc8f7232b | <ide><path>system/config.php
<ide> public static function get($key, $default = null)
<ide> {
<ide> list($module, $file, $key) = static::parse($key);
<ide>
<del> if ( ! static::load($module, $file))
<del> {
<del> return is_callable($default) ? call_user_func($default) : $default;
<del> }
<add> static::load($mo... | 1 |
Ruby | Ruby | convert `polymorphicarrayvalue` to poro queries | 8170bcd99ad3ee4ac4ddf9e28a7c2a5fb93f1b0c | <ide><path>activerecord/lib/active_record/relation/predicate_builder.rb
<ide> def initialize(table)
<ide> register_handler(RangeHandler::RangeWithBinds, RangeHandler.new)
<ide> register_handler(Relation, RelationHandler.new)
<ide> register_handler(Array, ArrayHandler.new(self))
<del> register_han... | 3 |
Go | Go | remove an unit test from integrations test | 2ec1146679598837cd8bab62dc672bcda2a9610c | <ide><path>integration/commands_test.go
<ide> func TestCmdLogs(t *testing.T) {
<ide> }
<ide> }
<ide>
<del>// Expected behaviour: using / as a bind mount source should throw an error
<del>func TestRunErrorBindMountRootSource(t *testing.T) {
<del>
<del> cli := docker.NewDockerCli(nil, nil, ioutil.Discard, testDaemonPro... | 1 |
Javascript | Javascript | improve time scale for zoom and pan | 38373300eef9fe31204e8421cae1263a5f3b94d0 | <ide><path>src/scales/scale.category.js
<ide> module.exports = function(Chart) {
<ide> // Implement this so that
<ide> determineDataLimits: function() {
<ide> this.minIndex = 0;
<del> this.maxIndex = this.chart.data.labels.length;
<add> this.maxIndex = this.chart.data.labels.length - 1;
<ide> var findInd... | 3 |
Python | Python | add drf settings + output format + testcases | f208d8d2bbe2f418caa51199070f703fba544d49 | <ide><path>rest_framework/fields.py
<ide> from django.forms import widgets
<ide> from django.utils.encoding import is_protected_type
<ide> from django.utils.translation import ugettext_lazy as _
<del>from rest_framework.compat import parse_date, parse_datetime
<add>
<ide> from rest_framework.compat import timezone
<ide... | 6 |
Javascript | Javascript | check sizzle or jquery | 872d18c10e8ad1583b3a40671527355aa930aea7 | <ide><path>test/unit/selector.js
<ide> test("pseudo - position", function() {
<ide> t( "Check element position", "div#nothiddendiv:first > div:first", ["nothiddendivchild"] );
<ide> });
<ide>
<del>if ( Sizzle.selectors.filters.visibility ) {
<add>if ( (window.Sizzle || jQuery.find).selectors.filters.visibility ) {
<i... | 1 |
Text | Text | fix some inconsistent use of hostname | 3833d69936ada7e1e1a68dc73dd31d31423fbbaf | <ide><path>doc/api/async_hooks.md
<ide> of propagating what resource is responsible for the new resource's existence.
<ide> been initialized. This can contain useful information that can vary based on
<ide> the value of `type`. For instance, for the `GETADDRINFOREQWRAP` resource type,
<ide> `resource` provides the host... | 3 |
Java | Java | convert networkingmodule to support web workers | 9a3f11d3e701e36dfae1cb55864f7efebc171935 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.java
<ide> import javax.annotation.Nullable;
<ide>
<ide> import com.facebook.react.bridge.ReactApplicationContext;
<del>import com.facebook.react.bridge.ReactContext;
<ide> import com.facebook.react.bridge.ReactContextBaseJa... | 3 |
Text | Text | replace line items with chapters [ci skip] | f0c161cc05f4964ce3316c14e2dc2b6c445c5cd6 | <ide><path>guides/source/association_basics.md
<ide> end
<ide> You can use the `includes` method to specify second-order associations that should be eager-loaded when this association is used. For example, consider these models:
<ide>
<ide> ```ruby
<del>class LineItem < ApplicationRecord
<add>class Chapter < Applicati... | 1 |
Javascript | Javascript | add missing semicolon in firstpersoncontrols | 189969453917a350ff2e6af4eaf256642bb84e41 | <ide><path>examples/js/controls/FirstPersonControls.js
<ide> THREE.FirstPersonControls = function ( object, domElement ) {
<ide> window.removeEventListener( 'keydown', _onKeyDown, false );
<ide> window.removeEventListener( 'keyup', _onKeyUp, false );
<ide>
<del> }
<add> };
<ide>
<ide> var _onMouseMove = bind( th... | 1 |
Ruby | Ruby | fix x11 proxy constant lookup under 1.9+ | 9561b4bc8e0fee449af60f8957c7ea510e41b561 | <ide><path>Library/Homebrew/requirements.rb
<ide> def self.inherited(mod)
<ide> class Proxy < self
<ide> PACKAGES = [:libpng, :freetype, :fontconfig]
<ide>
<del> def self.for(name, *tags)
<del> constant = name.capitalize
<del>
<del> if const_defined?(constant)
<del> klass = const_get(constant... | 1 |
Ruby | Ruby | extract constant io_default_buffer_size | 09d7889ed8f6eee000c523a7ada42b850ec64e04 | <ide><path>Library/Homebrew/utils/popen.rb
<ide> # frozen_string_literal: true
<ide>
<ide> module Utils
<add> IO_DEFAULT_BUFFER_SIZE = 4096
<add> private_constant :IO_DEFAULT_BUFFER_SIZE
<add>
<ide> def self.popen_read(*args, **options, &block)
<ide> popen(args, "rb", options, &block)
<ide> end
<ide> def sel... | 1 |
Text | Text | remove braces which shouldn't be there | a80b1621b034b6bcd920805681db22e1f6c5a282 | <ide><path>doc/api/http2.md
<ide> added: v8.4.0
<ide>
<ide> Shortcut for `http2stream.rstStream()` using error code `0x00` (No Error).
<ide>
<del>#### http2stream.rstWithProtocolError() {
<add>#### http2stream.rstWithProtocolError()
<ide> <!-- YAML
<ide> added: v8.4.0
<ide> -->
<ide> added: v8.4.0
<ide>
<ide> Shortc... | 1 |
Go | Go | send the images in correct order | 3cbf5670c5de9948dedf439defb0d772531e717d | <ide><path>registry.go
<ide> func (graph *Graph) pushPrimitive(stdout io.Writer, remote, tag, imgId, registry
<ide> return nil
<ide> }
<ide>
<del>// Push a repository to the registry.
<del>// Remote has the format '<user>/<repo>
<del>func (graph *Graph) PushRepository(stdout io.Writer, remote string, localRepo Reposi... | 1 |
Javascript | Javascript | improve output for more common case | e880673950810a06c25b3cb9d763cc7513927285 | <ide><path>packages/ember-handlebars/lib/ext.js
<ide> Ember.Handlebars.Compiler.prototype.mustache = function(mustache) {
<ide> // Update the mustache node to include a hash value indicating whether the original node
<ide> // was escaped. This will allow us to properly escape values when the underlying value
<i... | 2 |
Go | Go | remove redundant variable | 1f7beb85949c4c31b3b5874510531021d5a2b45b | <ide><path>daemon/events/testutils/testutils.go
<ide> func Scan(text string) (*events.Message, error) {
<ide> attrs[kv[0]] = kv[1]
<ide> }
<ide>
<del> tu := time.Unix(t, tn)
<ide> return &events.Message{
<ide> Time: t,
<del> TimeNano: tu.UnixNano(),
<add> TimeNano: time.Unix(t, tn).UnixNano(),
<ide> Type... | 1 |
Mixed | Python | make get_reference public | 563a20a04098937db1e2c353b2ee6a3059e92ebf | <ide><path>docs/api-guide/schemas.md
<ide> Computes the component's name from the serializer.
<ide>
<ide> You may see warnings if your API has duplicate component names. If so you can override `get_component_name()` or pass the `component_name` `__init__()` kwarg (see below) to provide different names.
<ide>
<add>###... | 2 |
Ruby | Ruby | finalize metadata handling and uninstall logic | 7f2e4f583a5789a86712322818612c439307b90d | <ide><path>Library/Homebrew/cask/lib/hbc/cli/upgrade.rb
<ide> def run
<ide>
<ide> old_cask_installer = Installer.new(old_cask, binaries: binaries?, verbose: verbose?, force: force?, upgrade: true)
<ide>
<del> old_cask_installer.uninstall
<del>
<del> begin
<del> odebug "Installin... | 2 |
Ruby | Ruby | optimize the performance of #delegate | 1bac04e854b42fc0e47162e251105434d356d2b4 | <ide><path>activesupport/lib/active_support/core_ext/module/delegation.rb
<ide> def delegate(*methods)
<ide> file, line = caller.first.split(':', 2)
<ide> line = line.to_i
<ide>
<del> if allow_nil
<del> methods.each do |method|
<add> methods.each do |method|
<add> method = method.to_s
<add>
<ad... | 2 |
Javascript | Javascript | implement template scopes as classes | 87190229e133deab859fbc935e8241f8c667936d | <ide><path>packages/ember-htmlbars/lib/env.js
<ide> import merge from 'ember-metal/merge';
<ide> import subexpr from 'ember-htmlbars/hooks/subexpr';
<ide> import concat from 'ember-htmlbars/hooks/concat';
<ide> import linkRenderNode from 'ember-htmlbars/hooks/link-render-node';
<del>import createFreshScope from 'ember-... | 23 |
Go | Go | fix incorrect info and format of error in image | b2ec509a3f9e50980fe3733500df56289c174252 | <ide><path>image/fs.go
<ide> func (s *fs) Walk(f DigestWalkFunc) error {
<ide> for _, v := range dir {
<ide> dgst := digest.NewDigestFromHex(string(digest.Canonical), v.Name())
<ide> if err := dgst.Validate(); err != nil {
<del> logrus.Debugf("Skipping invalid digest %s: %s", dgst, err)
<add> logrus.Debugf("sk... | 5 |
Javascript | Javascript | set the correct initial value on input range | 36546b5137e9012ebdc62fc9ec11e3518c9e0aab | <ide><path>packages/react-dom/src/__tests__/ReactDOMServerIntegrationForms-test.js
<ide> describe('ReactDOMServerIntegration', () => {
<ide> ControlledSelect;
<ide> beforeEach(() => {
<ide> ControlledInput = class extends React.Component {
<add> static defaultProps = {
<add> ty... | 3 |
Ruby | Ruby | use the database type to deserialize enum | 67c1719012506c3387df067961252b5df50a97ce | <ide><path>activerecord/lib/active_record/enum.rb
<ide> def inherited(base) # :nodoc:
<ide> end
<ide>
<ide> class EnumType < Type::Value # :nodoc:
<del> def initialize(name, mapping)
<add> def initialize(name, mapping, subtype)
<ide> @name = name
<ide> @mapping = mapping
<add> ... | 4 |
Python | Python | update irnn example | df860fdb94c63cf7898315277fe951d1c0ba16a9 | <ide><path>examples/mnist_irnn.py
<ide> Optimizer is replaced with RMSprop which yields more stable and steady
<ide> improvement.
<ide>
<del> Reaches 0.93 train/test accuracy after 900 epochs (which roughly corresponds
<del> to 1687500 steps in the original paper.)
<add> Reaches 0.93 train/test accura... | 1 |
Javascript | Javascript | fix instrumentation patterns | 0ddf21a77620b88ddd9a7f679c98f88df8a95b1a | <ide><path>packages/ember-metal/lib/instrumentation.js
<ide> Ember.Instrumentation.instrument = function(name, payload, callback, binding) {
<ide> };
<ide>
<ide> Ember.Instrumentation.subscribe = function(pattern, object) {
<del> var paths = pattern.split("."), path, regex = "^";
<add> var paths = pattern.split(".")... | 1 |
Go | Go | use flags.ipvar() instead of custom type | ccb75439fff3f09ac4fa4daea787db5cb5438468 | <ide><path>cmd/dockerd/config.go
<ide> func installCommonConfigFlags(conf *config.Config, flags *pflag.FlagSet) error {
<ide> flags.Var(opts.NewListOptsRef(&conf.DNS, opts.ValidateIPAddress), "dns", "DNS server to use")
<ide> flags.Var(opts.NewNamedListOptsRef("dns-opts", &conf.DNSOptions, nil), "dns-opt", "DNS optio... | 2 |
PHP | PHP | add more tests | ec30b5ecf94071058ac19e88c93126d7c0275bdf | <ide><path>tests/Support/SupportStrTest.php
<ide> public function testStrBeforeLast()
<ide>
<ide> public function testStrBetween()
<ide> {
<add> $this->assertSame('abc', Str::between('abc', '', 'c'));
<add> $this->assertSame('abc', Str::between('abc', 'a', ''));
<add> $this->assertSame('ab... | 1 |
PHP | PHP | fix bug with root routing | 597feed4a740ba54cd97c0e48922886ccf1f4516 | <ide><path>laravel/routing/router.php
<ide> protected static function root($identifier, $controller, $root)
<ide> // to point the pattern to the controller's index method.
<ide> $pattern = trim($root.'/'.$home, '/') ?: '/';
<ide>
<del> $attributes = array('uses' => "{$identifier}@(:1)", 'defaults' => 'index');
<a... | 1 |
PHP | PHP | add array mailer | 672f626da1788a46bf6bc830d15725ee3ae668d8 | <ide><path>config/mail.php
<ide> 'transport' => 'log',
<ide> 'channel' => env('MAIL_LOG_CHANNEL'),
<ide> ],
<add>
<add> 'array' => [
<add> 'transport' => 'array',
<add> ],
<ide> ],
<ide>
<ide> /* | 1 |
PHP | PHP | upgrade shell - refactoring | 3dddcf87572e99406467bc54a7c6eac43ee92dd1 | <ide><path>cake/console/shells/upgrade.php
<ide> class UpgradeShell extends Shell {
<ide> * @return void
<ide> */
<ide> function helpers() {
<del> if (!empty($this->params['plugin'])) {
<del> $this->_paths = array(App::pluginPath($this->params['plugin']));
<del> } else {
<del> $this->_paths = array(
<del> V... | 1 |
Javascript | Javascript | use consistent timeouts | c3aa86d6784af77121e5e98e75c6dc12e5bb39ec | <ide><path>test/parallel/test-http-server-headers-timeout-delayed-headers.js
<ide> const { connect } = require('net');
<ide> // pauses before start sending the request.
<ide>
<ide> let sendDelayedRequestHeaders;
<del>const headersTimeout = common.platformTimeout(1000);
<add>const headersTimeout = common.platformTimeou... | 11 |
Mixed | Javascript | remove web-worker example | 6c27c5f22e0ae94663d5e11a5e2a4fd8adf4b4da | <ide><path>examples/web-worker/README.md
<del>
<del># example.js
<del>
<del>``` javascript
<del>var Worker = require("worker-loader?name=hash.worker.js!./worker");
<del>var worker = new Worker;
<del>worker.postMessage("b");
<del>worker.onmessage = function(event) {
<del> var templateB = event.data; // "This text was ge... | 6 |
Javascript | Javascript | fix style issue | c3c7be5eb59252da8ba079971d50656f4e8ce44f | <ide><path>test/locale/my.js
<ide> exports['locale:my'] = {
<ide> ],
<ide> b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
<ide> i;
<del> test.expect( a.length );
<add> test.expect(a.length);
<ide> for (i = 0; i < a.length; i++) {
<ide> test.equa... | 1 |
Text | Text | remove contacts of exgoogler | ba72997d46b3c5fd6f5998394e04224788ec33b2 | <ide><path>research/differential_privacy/README.md
<ide> <font size=4><b>Deep Learning with Differential Privacy</b></font>
<ide>
<del>Open Sourced By: Xin Pan (xpan@google.com, github: panyx0718)
<add>Open Sourced By: Xin Pan
<ide>
<ide>
<ide> ### Introduction for [dp_sgd/README.md](dp_sgd/README.md)
<ide><path>res... | 5 |
Text | Text | fix typo and wording in readme.md | 297d1466e7dd03dd178778d5c5e5ec8d8d19486a | <ide><path>examples/with-dotenv/README.md
<ide> This example shows how to inline env vars.
<ide> **Please note**:
<ide>
<ide> - It is a bad practice to commit env vars to a repository. Thats why you should normally [gitignore](https://git-scm.com/docs/gitignore) your `.env` file.
<del>- In this example, as soon as you... | 1 |
Ruby | Ruby | add audit for xcodebuild | ace8723caffbb0de638a5fb75242dfbd4a8b08a0 | <ide><path>Library/Homebrew/cmd/audit.rb
<ide> require 'formula'
<ide> require 'utils'
<ide>
<add># Use "brew audit --strict" to enable even stricter checks.
<add>
<add>def strict?
<add> ARGV.flag? "--strict"
<add>end
<add>
<ide> def ff
<ide> return Formula.all if ARGV.named.empty?
<ide> return ARGV.formulae
<ide... | 1 |
Ruby | Ruby | fix bottle domain fallback handling | 635e58e9aaf692e3006c216916b17a2c13f51d0c | <ide><path>Library/Homebrew/formula.rb
<ide> def head_only?
<ide> # @private
<ide> sig { returns(T.nilable(Bottle)) }
<ide> def bottle
<del> Bottle.new(self, bottle_specification) if bottled?
<add> @bottle ||= Bottle.new(self, bottle_specification) if bottled?
<ide> end
<ide>
<ide> # The description of... | 4 |
Ruby | Ruby | use consistent method calls for column inspection | 5e77872ac9da3007d6bc0b86428dca9ac8881936 | <ide><path>activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
<ide> def unescape_bytea(value)
<ide> def quote(value, column = nil) #:nodoc:
<ide> return super unless column
<ide>
<del> if value.kind_of?(String) && column.type == :binary
<add> if value.kind_of?(String) ... | 1 |
Text | Text | remove duplicate section from hex guide | aff06dc01276b5a227262c7bd80a24d331948b09 | <ide><path>client/src/pages/guide/english/computer-science/hexcode/index.md
<ide> The proposed CSS4 Draft<sup>1</sup> includes a proposal to allow for an extra by
<ide>
<ide> For now, use of the standard `rgba()` function is the recommended way to add an alpha value to your colors.
<ide>
<del>#### More Information:
<... | 1 |
Go | Go | remove use of servicespecisupdated | 94429d40787f0267fd515c80c332d800ee58b609 | <ide><path>integration/service/update_test.go
<ide> func TestServiceUpdateLabel(t *testing.T) {
<ide> service.Spec.Labels["foo"] = "bar"
<ide> _, err := cli.ServiceUpdate(ctx, serviceID, service.Version, service.Spec, types.ServiceUpdateOptions{})
<ide> assert.NilError(t, err)
<del> poll.WaitOn(t, serviceSpecIsUpdat... | 1 |
Mixed | Text | add readme.me, contributor update | e8cb8757653e03a1c25014d9403f3f32d3a2515a | <ide><path>CONTRIBUTING.md
<ide> your pull request should be accepted quickly.
<ide>
<ide> Some things that will increase the chance that your pull request is accepted:
<ide>
<del>* Write tests
<add>* [Write tests](./test/README.md)
<ide> * Follow the existing coding style
<ide> * Write a [good commit message](http:/... | 3 |
Mixed | Python | fix the first `nlp` call for `ja` (closes ) | 2fb004832f48750a9cf35e1f89e4118ccc70da30 | <ide><path>.github/contributors/kbulygin.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 project
<... | 3 |
Javascript | Javascript | fix lint error regarding unused commons const | 690bdede1307b4499683c417784e3c84b74bfb45 | <ide><path>test/parallel/test-stream-writableState-ending.js
<ide> 'use strict';
<ide>
<del>const common = require('../common');
<add>require('../common');
<ide>
<ide> const assert = require('assert');
<ide> const stream = require('stream'); | 1 |
Python | Python | avoid indexing with list | a4cc361003d3b2b241b826372d9691187b47f86f | <ide><path>numpy/ma/extras.py
<ide> def _median(a, axis=None, out=None, overwrite_input=False):
<ide> ind = np.meshgrid(*axes_grid, sparse=True, indexing='ij')
<ide> # insert indices of low and high median
<ide> ind.insert(axis, h - 1)
<del> low = asorted[ind]
<add> low = asorted[tuple(ind)]
<ide> ... | 1 |
Python | Python | fix bucket sort | 2fa009aa530ee1c243090c31b69bbf7effc754e2 | <ide><path>sorts/bucket_sort.py
<ide>
<ide> Source: https://en.wikipedia.org/wiki/Bucket_sort
<ide> """
<del>DEFAULT_BUCKET_SIZE = 5
<ide>
<ide>
<del>def bucket_sort(my_list: list, bucket_size: int = DEFAULT_BUCKET_SIZE) -> list:
<add>def bucket_sort(my_list: list) -> list:
<ide> """
<ide> >>> data = [-1, 2,... | 1 |
Javascript | Javascript | add runtime block | 5cdfe45aa3e50fabad44009c1b8511253c6e4915 | <ide><path>src/Injector.js
<ide> function createInjector(modulesToLoad) {
<ide> }));
<ide>
<ide>
<del> loadModules(modulesToLoad);
<add> forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });
<ide>
<ide> return instanceInjector;
<ide>
<ide> function createInjector(... | 5 |
Python | Python | remove asunicode where a u prefix would suffice | 09a21de418ef8df60a0121637cb213e0fa778e5d | <ide><path>numpy/core/tests/test_numerictypes.py
<ide> import sys
<ide>
<ide> import numpy as np
<del>from numpy.compat import asunicode
<ide> from numpy.testing import (
<ide> TestCase, run_module_suite, assert_, assert_equal
<ide> )
<ide> # x Info color info... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.