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 | add tests for chebfit with deg specified as list | 1a9fb061bb4f217f335616c65abd36644c2f2ac7 | <ide><path>numpy/polynomial/tests/test_chebyshev.py
<ide> def test_chebfit(self):
<ide> def f(x):
<ide> return x*(x - 1)*(x - 2)
<ide>
<add> def f2(x):
<add> return x**4 + x**2 + 1
<add>
<ide> # Test exceptions
<ide> assert_raises(ValueError, cheb.chebfit, [1], [1]... | 1 |
Javascript | Javascript | fix failing test | 43f4cc160811657135508cdefe6aed2b3522a905 | <ide><path>packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js
<ide> describe('ReactSuspense', () => {
<ide> expect(Scheduler).toFlushAndYield(['Child 1', 'create layout']);
<ide> expect(root).toMatchRenderedOutput('Child 1');
<ide>
<del> ReactTestRenderer.act(() => {
<add> act(() => {... | 1 |
Ruby | Ruby | copy hidden files from bottles | 3cb2d62a1b13d4e71c8c5deeb6250fc594f14ec8 | <ide><path>Library/Homebrew/formula.rb
<ide> require "language/python"
<ide> require "tab"
<ide> require "mktemp"
<add>require "find"
<ide>
<ide> # A formula provides instructions and metadata for Homebrew to install a piece
<ide> # of software. Every Homebrew formula is a {Formula}.
<ide> def run_post_install
<ide> ... | 1 |
Ruby | Ruby | fix reference to issues_url | 1e184138489707dcbaef73dd23a600d63ab661cf | <ide><path>Library/brew.rb
<ide> def require? path
<ide> rescue Exception => e
<ide> onoe e
<ide> puts "#{Tty.white}Please report this bug:"
<del> puts " #{Tty.em}#{ISSUES_URL}#{Tty.reset}"
<add> puts " #{Tty.em}#{OS::ISSUES_URL}#{Tty.reset}"
<ide> puts e.backtrace
<ide> exit 1
<ide> else | 1 |
PHP | PHP | add missing docblock | 97b6deec70ed6592b529b29f13c1b10a05c2be5c | <ide><path>src/Illuminate/Routing/Console/ControllerMakeCommand.php
<ide> protected function buildModelReplacements(array $replace)
<ide> *
<ide> * @param string $model
<ide> * @return string
<add> *
<add> * @throws \InvalidArgumentException
<ide> */
<ide> protected function parseModel... | 1 |
Text | Text | clarify case conventions in formula naming | 57a81f9e22ef2db7fefc432adafe2d63a2206bc8 | <ide><path>share/doc/homebrew/Formula-Cookbook.md
<ide> When importing classes, Homebrew will require the formula and then create an ins
<ide> * `foo-bar.rb` => `FooBar`
<ide> * `foobar.rb` => `Foobar`
<ide>
<del>Thus, if you change the name of the class, you must also rename the file. Filenames should be all lowe... | 1 |
Javascript | Javascript | add logging level for rnpm previous linking | 85a2d6a65d373b0f3cc94d1ad2ca1dc9b7717809 | <ide><path>local-cli/link/link.js
<ide> const log = require('npmlog');
<ide> const path = require('path');
<ide> const uniq = require('lodash').uniq;
<ide> const flatten = require('lodash').flatten;
<add>const chalk = require('chalk');
<ide>
<ide> const isEmpty = require('lodash').isEmpty;
<ide> const promiseWaterfall... | 1 |
Text | Text | fix callbacks doc | 6c55dbd6d55f7882334d1bb9cc1f08b17abfe677 | <ide><path>docs/sources/callbacks.md
<ide> Save the model after every epoch. If `save_best_only=True`, the latest best mode
<ide>
<ide>
<ide> ```python
<del>keras.callbacks.EarlyStopping(patience=0, verbose=0)
<add>keras.callbacks.EarlyStopping(monitor='val_loss', patience=0, verbose=0)
<ide> ```
<ide>
<del>Stop tra... | 1 |
Ruby | Ruby | fix simple_format output example ending tag | 7e1cb39f7257e24672761e4e309330bf85d7c270 | <ide><path>actionview/lib/action_view/helpers/text_helper.rb
<ide> def word_wrap(text, options = {})
<ide> # # => "<p>Unblinkable.</p>"
<ide> #
<ide> # simple_format("<blink>Blinkable!</blink> It's true.", {}, sanitize: false)
<del> # # => "<p><blink>Blinkable!</span> It's true.</p>"
<add> ... | 1 |
Text | Text | move getconfig message to the line above in readme | 341c34d4bfc0b001b2dc018c44676368a289be84 | <ide><path>readme.md
<ide> module.exports = {
<ide> ```js
<ide> // pages/index.js
<ide> import getConfig from 'next/config'
<del>const {serverRuntimeConfig, publicRuntimeConfig} = getConfig() // Only holds serverRuntimeConfig and publicRuntimeConfig from next.config.js nothing else.
<add>// Only holds serverRuntimeConf... | 1 |
Javascript | Javascript | add missing copyright headers | 220288725fc05f9838ec0a77876d9d9f1491da5a | <ide><path>test/simple/test-eio-limit.js
<add>// Copyright Joyent, Inc. and other Node contributors.
<add>//
<add>// Permission is hereby granted, free of charge, to any person obtaining a
<add>// copy of this software and associated documentation files (the
<add>// "Software"), to deal in the Software without restrict... | 1 |
Javascript | Javascript | remove unnecessary comma in transformcontrols | a2a0c8879d63abd2697d80a396d842f343875542 | <ide><path>examples/js/controls/TransformControls.js
<ide> var group = {
<ide>
<ide> handles: this[ "handles" ],
<del> pickers: this[ "pickers" ],
<add> pickers: this[ "pickers" ]
<ide>
<ide> };
<ide> | 1 |
Ruby | Ruby | remove test file | 019c8ae814d0e89af3da543a956f22a4db92c5a3 | <ide><path>test.rb
<del># frozen_string_literal: true
<del>begin
<del> require "bundler/inline"
<del>rescue LoadError => e
<del> $stderr.puts "Bundler version 1.10 or later is required. Please update
<del> your Bundler"
<del> raise e
<del>end
<del>
<del>gemfile(true) do
<del> source "https://rubygems... | 1 |
Javascript | Javascript | add withcredentials config option | 86182a9415b9209662b16c25c180b958ba7e6cf9 | <ide><path>src/ng/http.js
<ide> function $HttpProvider() {
<ide> * {@link angular.module.ng.$cacheFactory $cacheFactory}, this cache will be used for
<ide> * caching.
<ide> * - **timeout** – `{number}` – timeout in milliseconds.
<add> * - **withCredentials** - `{boolean}` - whether to... | 4 |
PHP | PHP | respect them when previewing notification | ed4411d310f259f75e95e882b748ba9d76d7cfad | <ide><path>src/Illuminate/Notifications/Messages/MailMessage.php
<ide> public function render()
<ide>
<ide> return Container::getInstance()
<ide> ->make(Markdown::class)
<add> ->theme($this->theme ?: 'default')
<ide> ->render($this->markdown, $this->data());
<ide> }
<ide>... | 1 |
Ruby | Ruby | use enumerable#with_index. we're on ruby > 1.8.7 | 49bf8597e674eafc2f180360e0c3c52f2b343a72 | <ide><path>activerecord/lib/active_record/relation.rb
<ide> def update_all(updates, conditions = nil, options = {})
<ide> # Person.update(people.keys, people.values)
<ide> def update(id, attributes)
<ide> if id.is_a?(Array)
<del> idx = -1
<del> id.collect { |one_id| idx += 1; update(one_id... | 1 |
Text | Text | update changelog for 16.7 | 84b86471ea12bd1f5994d878a318dcdead1137e9 | <ide><path>CHANGELOG.md
<ide> </summary>
<ide> </details>
<ide>
<add>## 16.7.0 (December 19, 2018)
<add>
<add>### React DOM
<add>
<add>* Fix performance of `React.lazy` for large numbers of lazily-loaded components. ([@acdlite](http://github.com/acdlite) in [#14429](https://github.com/facebook/react/pull/14429))
<ad... | 1 |
Text | Text | add note about polyfilling css grid for ie11. | 16ee0fe2dcf9fe1ad6ff28b1b93a709aa0cc16e7 | <ide><path>docs/advanced-features/customizing-postcss-config.md
<ide> Out of the box, with no configuration, Next.js compiles CSS with the following t
<ide> - [Break Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/break-after)
<ide> - [`font-variant` Property](https://developer.mozilla.org/en-US/docs... | 1 |
Javascript | Javascript | name anonymous function for debugging | 65dbc52a9beacb23a45ed5d7b1fa4bce792e8142 | <ide><path>lib/internal/modules/cjs/loader.js
<ide> Module._initPaths = function() {
<ide> }
<ide>
<ide> if (nodePath) {
<del> paths = nodePath.split(path.delimiter).filter(function(path) {
<add> paths = nodePath.split(path.delimiter).filter(function pathsFilterCB(path) {
<ide> return !!path;
<ide> ... | 1 |
PHP | PHP | refresh the cache event dispatcher when faked | d5c46e5f7b07fb6524a16f88c809ca9f2f7789f3 | <ide><path>src/Illuminate/Cache/CacheManager.php
<ide> protected function setEventDispatcher(Repository $repository): void
<ide> );
<ide> }
<ide>
<add> /**
<add> * Refreshes the event dispatcher of all resolved repositories
<add> * with the currently bound event dispatcher implementation.
<add> ... | 3 |
Javascript | Javascript | add matrix calcs to direction shadow class | 0442b430be43b04580abcdcc7cdbbbaed5540c44 | <ide><path>src/lights/DirectionalLightShadow.js
<ide> import { OrthographicCamera } from '../cameras/OrthographicCamera.js';
<ide> * @author mrdoob / http://mrdoob.com/
<ide> */
<ide>
<del>function DirectionalLightShadow( ) {
<add>function DirectionalLightShadow() {
<ide>
<ide> LightShadow.call( this, new Orthogra... | 1 |
Javascript | Javascript | fix tests after reverting commits | e86de0db56e156d6c603584c440026effaf19b82 | <ide><path>test/ng/rootScopeSpec.js
<ide> describe('Scope', function() {
<ide> $browser.defer.flush(0);
<ide> expect(log).toEqual(['eval-ed 1!', 'eval-ed 2!']);
<ide>
<del> expect(function() {
<del> $browser.defer.flush(0);
<del> }).toThrow('No deferred tasks with delay up to 0ms... | 1 |
Javascript | Javascript | avoid non-alphanumeric chars in expando properties | 0cdec797de23555c95a70978f4d9e06f3b041330 | <ide><path>src/data/Data.js
<ide> function Data() {
<ide> }
<ide> });
<ide>
<del> this.expando = jQuery.expando + Math.random();
<add> this.expando = jQuery.expando + Data.uid++;
<ide> }
<ide>
<ide> Data.uid = 1; | 1 |
Python | Python | fix message formatting | e2f75eb492c8f8747d8c752f3869f329dfcd3086 | <ide><path>spacy/cli/download.py
<ide> def download(model, direct=False, *pip_args):
<ide> # Dirty, but since spacy.download and the auto-linking is
<ide> # mostly a convenience wrapper, it's best to show a success
<ide> # message and loading instructions, even if linking fails.
<del... | 1 |
Ruby | Ruby | remove unnecessary `assert_valid_default` | 59c218ea9b41e3ef5cef571f31fb83a7ec72e9a4 | <ide><path>activerecord/lib/active_record/connection_adapters/mysql/column.rb
<ide> class Column < ConnectionAdapters::Column # :nodoc:
<ide>
<ide> def initialize(*)
<ide> super
<del> assert_valid_default
<ide> extract_default
<ide> end
<ide>
<ide> def extract_default
<ide... | 2 |
Python | Python | remove numpy.compat._pep440 from default imports | 4c986e7cedde18530745dca072e06659f1fb20a9 | <ide><path>numpy/compat/__init__.py
<ide>
<ide> """
<ide> from . import _inspect
<del>from . import _pep440
<ide> from . import py3k
<ide> from ._inspect import getargspec, formatargspec
<ide> from .py3k import * | 1 |
Javascript | Javascript | add touch (pan) support to d3.behavior.zoom | 2d98bf10a4b4e41c5df54e0a1febb22ab687c48f | <ide><path>d3.behavior.js
<ide> d3.behavior.zoom = function() {
<ide> .on("mousedown", mousedown)
<ide> .on("mousewheel", mousewheel)
<ide> .on("DOMMouseScroll", mousewheel)
<del> .on("dblclick", mousewheel);
<add> .on("dblclick", mousewheel)
<add> .on("touchstart", mousedow... | 3 |
Python | Python | replace instance of md5.new() with hashlib.md5() | b27c8683f0ed046bf78f465cf15c52a7df0681cd | <ide><path>py/libcloud/drivers/gogrid.py
<ide> from libcloud.interface import INodeDriver
<ide> from zope.interface import implements
<ide> import httplib
<del>import md5
<ide> import time
<ide> import urllib
<ide> import hashlib
<ide> def make_request(self, action, params, data=''):
<ide>
<ide> def get_signature(se... | 1 |
PHP | PHP | shorten a long exception message | 2a1b5d55ae88d8edd3a56a6eac3f61ce74668548 | <ide><path>laravel/lang.php
<ide> protected function parse($key)
<ide> return array($segments[0], implode('.', array_slice($segments, 1)));
<ide> }
<ide>
<del> throw new \InvalidArgumentException("Invalid language line [$key]. A specific line must be specified.");
<add> throw new \InvalidArgumentException("Inva... | 1 |
Javascript | Javascript | resolve merge conflict in unknown property test | 1cc312437c249fcae4d4e25dd8b18b1eb562d9ba | <ide><path>packages/sproutcore-metal/lib/properties.js
<ide> var WATCHED_DESC = {
<ide>
<ide> function w_get(obj, keyName) {
<ide> var m = meta(obj, false);
<del> return m.values ? m.values[keyName] : undefined;
<add> if (m.values) {
<add> if (m.values[keyName] !== undefined) { return m.values[keyName]; }
<add>... | 2 |
Ruby | Ruby | disambiguate uses of post/post by using "article" | 9a2b18cfd34dedcd73d3f03e681272366708740b | <ide><path>actionpack/lib/action_view/helpers/date_helper.rb
<ide> def time_ago_in_words(from_time, include_seconds = false)
<ide> # NOTE: Discarded selects will default to 1. So if no month select is available, January will be assumed.
<ide> #
<ide> # ==== Examples
<del> # # Generates a date s... | 1 |
Javascript | Javascript | remove usage of require('util') | a89451409ed00d9bbc037e13b4f939b4a4ee93b3 | <ide><path>lib/trace_events.js
<ide> if (!hasTracing || !ownsProcessState)
<ide>
<ide> const { CategorySet, getEnabledCategories } = internalBinding('trace_events');
<ide> const { customInspectSymbol } = require('internal/util');
<del>const { format } = require('util');
<add>const { format } = require('internal/util/i... | 1 |
Java | Java | improve perf of operatorignoreelements | 6db98f8750f580995657f83b5620b579c97e6a06 | <ide><path>src/main/java/rx/Observable.java
<ide> public final <T2, D1, D2, R> Observable<R> groupJoin(Observable<T2> right, Func1
<ide> * @see <a href="http://reactivex.io/documentation/operators/ignoreelements.html">ReactiveX operators documentation: IgnoreElements</a>
<ide> */
<ide> public final Observ... | 4 |
Text | Text | fix myspace samy worm link [ci skip] | 1502c60ec270cb6b92af151637fc8b47f42b2816 | <ide><path>guides/source/security.md
<ide> In December 2006, 34,000 actual user names and passwords were stolen in a [MySpa
<ide>
<ide> INFO: _CSS Injection is actually JavaScript injection, because some browsers (IE, some versions of Safari and others) allow JavaScript in CSS. Think twice about allowing custom CSS in... | 1 |
Java | Java | fix element inspector | a876b234c6473fdabfef9b1ff728cd7e8ff62a52 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java
<ide> public void findSubviewIn(
<ide> final Callback callback) {
<ide> mOperationsQueue.enqueueFindTargetForTouch(
<ide> reactTag,
<del> point.getInt(0),
<del> point.getInt(1),
<add> Math.roun... | 2 |
PHP | PHP | update query building in translatebehavior | 0fc9a2c29c489177afeecaccf4eb7ddb7ab153a7 | <ide><path>lib/Cake/Model/Behavior/TranslateBehavior.php
<ide> public function beforeFind(Model $Model, $query) {
<ide> if (empty($query['fields'])) {
<ide> $addFields = $fields;
<ide> } elseif (is_array($query['fields'])) {
<add> $isAllFields = (
<add> in_array($Model->alias . '.' . '*', $query['fields']) ... | 1 |
Javascript | Javascript | fix warnings of styleinspector | 97741af8b99ea8e443d41b80c4d9a8fd843a96ab | <ide><path>Libraries/Inspector/StyleInspector.js
<ide> class StyleInspector extends React.Component {
<ide> return (
<ide> <View style={styles.container}>
<ide> <View>
<del> {names.map(name => <Text style={styles.attr}>{name}:</Text>)}
<add> {names.map(name => <Text key={name} style=... | 1 |
Mixed | Text | add docs update - part 1 | a9d36d4726fc8eea02184b089ee6ed1d02e4c75e | <ide><path>docs/api-guide/fields.md
<ide> Corresponds to `django.forms.fields.RegexField`
<ide>
<ide> A date representation.
<ide>
<del>Uses `DATE_INPUT_FORMATS` to validate date.
<del>
<ide> Optionally takes `format` as parameter to replace the matching pattern.
<ide>
<ide> Corresponds to `django.db.models.fields.D... | 4 |
Text | Text | add performance notes for fs.readfile | 408e9d3a3a26834a83cc3e77269ccbd3047a8903 | <ide><path>doc/api/fs.md
<ide> system requests but rather the internal buffering `fs.readFile` performs.
<ide> the call to `fs.readFile()` with the same file descriptor, would give
<ide> `'World'`, rather than `'Hello World'`.
<ide>
<add>### Performance Considerations
<add>
<add>The `fs.readFile()` method asynch... | 1 |
Text | Text | fix docs for | 857e0ba32e38f02b96e7c6753d902aca7a7922fc | <ide><path>docs/reference/commandline/version.md
<ide> weight=1
<ide>
<ide> Show the Docker version information.
<ide>
<del>Show the Docker version, API version, Git commit, Go version and
<del>OS/architecture of both Docker client and daemon. Example use:
<add>Show the Docker version, API version, Go version, Gi... | 2 |
Javascript | Javascript | follow jquery for index of arrays of objects | 18a2e4fbfc44216c31bbcdf7705ca87c53e6f1fa | <ide><path>src/ng/http.js
<ide> function $HttpParamSerializerJQLikeProvider() {
<ide> function serialize(toSerialize, prefix, topLevel) {
<ide> if (toSerialize === null || isUndefined(toSerialize)) return;
<ide> if (isArray(toSerialize)) {
<del> forEach(toSerialize, function(value) {
<del... | 2 |
Ruby | Ruby | push the collectors up to the abstract adapter | 8caaa08ae1cd76b26a89b0d29d50396ffd76882e | <ide><path>activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
<ide> require 'active_record/connection_adapters/abstract/schema_dumper'
<ide> require 'active_record/connection_adapters/abstract/schema_creation'
<ide> require 'monitor'
<add>require 'arel/collectors/bind'
<add>require 'arel/collectors/... | 3 |
Mixed | Text | add changelog enty for | f875d319ad32d63ce2d3e8a343b059858f28dd97 | <ide><path>activerecord/CHANGELOG.md
<add>* Support array as root element in JSON fields.
<add>
<add> *Alexey Noskov & Francesco Rodriguez*
<add>
<ide> * Removed support for deprecated `counter_sql` in associations.
<ide>
<ide> *Neeraj Singh*
<ide><path>activerecord/test/cases/adapters/postgresql/json_test.... | 2 |
Text | Text | update security docs for seccomp/apparmor | 61553fc2f538a7fe8f83e6b41a93722b5c61d374 | <ide><path>docs/installation/binaries.md
<ide> need to add `sudo` to all the client commands.
<ide>
<ide> > **Warning**:
<ide> > The *docker* group (or the group specified with `-G`) is root-equivalent;
<del>> see [*Docker Daemon Attack Surface*](../articles/security.md#docker-daemon-attack-surface) details.
<add>> s... | 12 |
Javascript | Javascript | set initial opacity based on style | f66fba83cf34424128378ae740597c679e0ad8e8 | <ide><path>Libraries/Components/Touchable/TouchableOpacity.js
<ide> var TouchableOpacity = React.createClass({
<ide> getInitialState: function() {
<ide> return {
<ide> ...this.touchableGetInitialState(),
<del> anim: new Animated.Value(1),
<add> anim: new Animated.Value(this._getChildStyleOpacityWi... | 1 |
Javascript | Javascript | change == to === in linkedlist | 62d8134c50a1f65d6c0ae139e60e0cac701c8a84 | <ide><path>lib/internal/linkedlist.js
<ide> exports.create = create;
<ide>
<ide> // show the most idle item
<ide> function peek(list) {
<del> if (list._idlePrev == list) return null;
<add> if (list._idlePrev === list) return null;
<ide> return list._idlePrev;
<ide> }
<ide> exports.peek = peek;
<ide> function appen... | 1 |
Go | Go | fix package on debugtrap_unsupported.go | 1e78eec8261d93bcf3eeb7aad123032d81fcbb83 | <ide><path>daemon/debugtrap_unsupported.go
<ide> // +build !linux,!darwin,!freebsd
<ide>
<del>package signal
<add>package daemon
<ide>
<ide> func setupSigusr1Trap() {
<ide> return | 1 |
Ruby | Ruby | fix docs about etag | 15365de5a47f57fb1050664532f2f1600237eff1 | <ide><path>actionpack/lib/action_controller/metal/conditional_get.rb
<ide> module ClassMethods
<ide> # def show
<ide> # # Etag will differ even for the same invoice when it's viewed by a different current_user
<ide> # @invoice = Invoice.find(params[:id])
<del> # fresh_when(@... | 1 |
Text | Text | remove unadvisable cluster example | 6fc6ba74f557ef83492be3671fdaf103a58b6fc9 | <ide><path>doc/api/cluster.md
<ide> for (const worker of Object.values(cluster.workers)) {
<ide> }
<ide> ```
<ide>
<del>Using the worker's unique id is the easiest way to locate the worker.
<del>
<del>```js
<del>socket.on('data', (id) => {
<del> const worker = cluster.workers[id];
<del>});
<del>```
<del>
<ide> [Advan... | 1 |
PHP | PHP | keep the lines sorted | fa6c48d27c54d7495e64a9ace39392d29014e46a | <ide><path>resources/lang/en/validation.php
<ide> ],
<ide> 'not_in' => 'The selected :attribute is invalid.',
<ide> 'numeric' => 'The :attribute must be a number.',
<del> 'regex' => 'The :attribute format is invalid.',
<ide> 'present' => 'The :at... | 1 |
Mixed | Javascript | support untagged releases | 58b3ee7a889b62fefb9cc64962819795bebce7b8 | <ide><path>scripts/release/README.md
<ide> The high level process of creating releases is [documented below](#process). Ind
<ide>
<ide> If this is your first time running the release scripts, go to the `scripts/release` directory and run `yarn` to install the dependencies.
<ide>
<del>## Publishing Without Tags
<add>#... | 10 |
Javascript | Javascript | emit didfocus after routestack reset | 7fdabd8f14e0aefc4efb7b05c0cb5d019f2a699f | <ide><path>Libraries/CustomComponents/Navigator/Navigator.js
<ide> var Navigator = React.createClass({
<ide> }, () => {
<ide> this._handleSpringUpdate();
<ide> this._navBar && this._navBar.immediatelyRefresh();
<add> this._emitDidFocus(this.state.routeStack[this.state.presentedIndex]);
<ide> })... | 1 |
Text | Text | add the link to editor setup tutorials | 8ec3f38df60b2dd8a05da88bfdf14aec5707fdba | <ide><path>CONTRIBUTING.md
<ide> Now, the environment setup is complete. You are ready to run the tests.
<ide>
<ide> You may modify the Dockerfile to your specific needs, like installing your own
<ide> dev tools. You may also mount more volumes with the `-v` option, like your SSH
<del>credentials. Besides the editors ... | 1 |
Python | Python | remove k from order parameter options | 5300d20fec0d3b06c1e7e5623db06c2e6f8eaee9 | <ide><path>numpy/core/_add_newdocs.py
<ide>
<ide> Parameters
<ide> ----------
<del> order : {'C', 'F', 'A', 'K'}, optional
<add> order : {'C', 'F', 'A'}, optional
<ide> Controls the memory layout of the bytes object. 'C' means C-order,
<del> 'F' means F-order, 'A' means 'F' if `a` is Fortr... | 1 |
Mixed | Javascript | improve mode and flags validation | a13500f5037c1eede3a2d0a0db5fc532c05e14a8 | <ide><path>doc/api/fs.md
<ide> On Linux, positional writes don't work when the file is opened in append mode.
<ide> The kernel ignores the position argument and always appends the data to
<ide> the end of the file.
<ide>
<del>Modifying a file rather than replacing it may require a flags mode of `'r+'`
<del>rather than... | 12 |
Go | Go | use a structure to keep the allocated ips pool | 7e95b13460a58db75630d2d795482f39c68762c2 | <ide><path>daemon/networkdriver/bridge/driver.go
<ide> var (
<ide>
<ide> defaultBindingIP = net.ParseIP("0.0.0.0")
<ide> currentInterfaces = ifaces{c: make(map[string]*networkInterface)}
<add> ipAllocator = ipallocator.New()
<ide> )
<ide>
<ide> func InitDriver(job *engine.Job) engine.Status {
<ide> func Init... | 3 |
Python | Python | use fresh state between tests | 4a3f6c48e6f65203d7a1b4883a92fae2a2d043ab | <ide><path>numpy/core/tests/test_datetime.py
<ide> def test_pydatetime_creation(self):
<ide> def test_datetime_string_conversion(self):
<ide> a = ['2011-03-16', '1920-01-01', '2013-05-19']
<ide> str_a = np.array(a, dtype='S')
<add> uni_a = np.array(a, dtype='U')
<ide> dt_a = np.array(... | 1 |
Go | Go | add more import comments | c725eff3e2ecb1701b1ecb7b61c926b467be0b3a | <ide><path>pkg/capabilities/caps.go
<ide> // Package capabilities allows to generically handle capabilities.
<del>package capabilities
<add>package capabilities // import "github.com/docker/docker/pkg/capabilities"
<ide>
<ide> // Set represents a set of capabilities.
<ide> type Set map[string]struct{}
<ide><path>pkg/c... | 4 |
Javascript | Javascript | add "keyboardexample" to rntester | 584b968683167249b98304eeff2fb711fcbc51e8 | <ide><path>packages/rn-tester/js/examples/Keyboard/KeyboardExample.js
<add>/**
<add> * Copyright (c) Meta Platforms, Inc. and affiliates.
<add> *
<add> * This source code is licensed under the MIT license found in the
<add> * LICENSE file in the root directory of this source tree.
<add> *
<add> * @format
<add> * @flow ... | 3 |
Python | Python | fix outstanding typo in numpy version | 60608572d7740dabf287d2536684eacbc46561ab | <ide><path>numpy/f2py/cfuncs.py
<ide> 'ARRSIZE'] = '#define ARRSIZE(dims,rank) (_PyArray_multiply_list(dims,rank))'
<ide> cppmacros['OLDPYNUM'] = """\
<ide> #ifdef OLDPYNUM
<del>#error You need to install NumPy version 13 or higher. See https://scipy.org/install.html
<add>#error You need to install NumPy version 0.... | 1 |
Javascript | Javascript | remove three-math from npm build, never used | 87b5f7e9bdc2de3b9e41e9f117d04f079bb73b7e | <ide><path>utils/npm/build.js
<ide> buildAll.stderr.on('data', function (data) {
<ide> buildAll.on( 'exit', function ( exitCode ) {
<ide> console.log( "exitCode: " + exitCode );
<ide> buildModule( "three" );
<del> buildModule( "three-math" );
<ide> }); | 1 |
Text | Text | add object.freeze to polyfill list | e954a1c0d992408748abf39d058a44cc19f5ab63 | <ide><path>docs/docs/07-working-with-the-browser.md
<ide> In addition to that philosophy, we've also taken the stance that we, as authors
<ide> `es5-sham.js`, also from [kriskowal's es5-shim](https://github.com/kriskowal/es5-shim), provides the following that React needs:
<ide>
<ide> * `Object.create`
<add>* `Object.f... | 1 |
Javascript | Javascript | use file url instead of relative url | 8a12e9994f047888ce25e0cc196e5da7f7c3dcae | <ide><path>lib/internal/bootstrap/pre_execution.js
<ide> function initializePolicy() {
<ide> // no bare specifiers for now
<ide> let manifestURL;
<ide> if (require('path').isAbsolute(experimentalPolicy)) {
<del> manifestURL = new URL(experimentalPolicy, 'file://');
<add> manifestURL = new URL(`fil... | 1 |
Javascript | Javascript | simplify rtladapter export | 10c3c3bbc9dfdf18a817f7a48acba1a334e39632 | <ide><path>src/helpers/helpers.rtl.js
<del>const getRtlAdapter = function(rectX, width) {
<add>const getRightToLeftAdapter = function(rectX, width) {
<ide> return {
<ide> x(x) {
<ide> return rectX + rectX + width - x;
<ide> const getRtlAdapter = function(rectX, width) {
<ide> };
<ide> };
<ide>
<del>const getLtr... | 1 |
PHP | PHP | add findorfail to query builder | bcf036f35ac78e469e9bf8c00d7dbf47bda972d1 | <ide><path>src/Illuminate/Database/Eloquent/Builder.php
<ide> public function first($columns = array('*'))
<ide> return $this->take(1)->get($columns)->first();
<ide> }
<ide>
<add> /**
<add> * Find a model by its primary key or throw an exception.
<add> *
<add> * @param mixed $id
<add> * @param array $column... | 1 |
Javascript | Javascript | deprecate the module and its contents | 67f54b660038de2b4346b3e76d66a8dc8ccb1f9b | <ide><path>src/ngTouch/directive/ngSwipe.js
<ide> * @ngdoc directive
<ide> * @name ngSwipeLeft
<ide> *
<add> * @deprecated
<add> * sinceVersion="1.7.0"
<add> *
<add> * See the {@link ngTouch module} documentation for more information.
<add> *
<ide> * @description
<ide> * Specify custom behavior when an element is ... | 3 |
Text | Text | fix typos and wording [ci skip] | 25a595dc10ef60ee5d20b6f06bf123119e2a0238 | <ide><path>website/docs/api/language.md
<ide> subclass of the built-in `dict`. It supports the additional methods `to_disk`
<ide>
<ide> ## Language.to_disk {#to_disk tag="method" new="2"}
<ide>
<del>Save the current state to a directory. If a trained pipeline is loaded, this
<del>will **include all model data**.
<add... | 2 |
Python | Python | add assertisinstance to flasktestcase on 2.6 | d43bfb261a0cb562fdfec6d94768c80d95844578 | <ide><path>flask/testsuite/__init__.py
<ide> def assertIn(self, x, y):
<ide> def assertNotIn(self, x, y):
<ide> assert x not in y, "%r unexpectedly in %r" % (x, y)
<ide>
<add> def assertIsInstance(self, x, y):
<add> assert isinstance(x, y), "not isinstance(%r, %r)" % (x, y)
<add>
... | 1 |
Text | Text | fix typos in text | d76bccc2f85c5eaa768ef12bc24159800ae19e24 | <ide><path>guide/english/vim/useful-commands/index.md
<ide> Depending on the configuration, you may enter a file browser by typing and enter
<ide> ## Pasting blocks of code
<ide>
<ide> Very often you will find yourself looking for solutions to problems, and finding someone has written a block of code that does exactly... | 1 |
Go | Go | fix a typo | 4ddc721f234ebb721b9540af3a9358da2f3e6e58 | <ide><path>integration-cli/docker_api_resize_test.go
<ide> func TestResizeApiResponseWhenContainerNotStarted(t *testing.T) {
<ide> defer deleteAllContainers()
<ide> cleanedContainerID := strings.TrimSpace(out)
<ide>
<del> // make sure the exited cintainer is not running
<add> // make sure the exited container is not... | 1 |
Ruby | Ruby | make some constant strings into actual constants | 33cdff99bad133f36935dce23f0889c71d70105b | <ide><path>Library/Homebrew/cmd/bottle.rb
<ide>
<ide> BOTTLE_ERB = <<-EOS
<ide> bottle do
<del> <% if root_url != BottleSpecification.new.root_url %>
<add> <% if root_url != BottleSpecification::DEFAULT_ROOT_URL %>
<ide> root_url "<%= root_url %>"
<ide> <% end %>
<ide> <% if prefix.to_s != "/usr/lo... | 2 |
Text | Text | fix logo path | 230dc07d372cccb1aa1198ae300d06e418c73af6 | <ide><path>README.md
<ide> Platform-as-a-Service. It benefits directly from the experience
<ide> accumulated over several years of large-scale operation and support of
<ide> hundreds of thousands of applications and databases.
<ide>
<del>
<add>![Docke... | 1 |
Python | Python | convert fortran flags from environment variable | eb85c3fda4a1a2687745d7ac5d0a96fc94691f77 | <ide><path>numpy/distutils/fcompiler/environment.py
<ide> def _get_var(self, name, conf_desc):
<ide> if envvar is not None:
<ide> envvar_contents = os.environ.get(envvar)
<ide> if envvar_contents is not None:
<del> if var and append:
<add> if convert:
<add> ... | 1 |
Javascript | Javascript | fix fingerprint name | fbd9fcd8fbfa14688e60c58cf062b55d04c2bfe0 | <ide><path>src/api.js
<ide> return this.pdf.numPages;
<ide> },
<ide> get fingerprint() {
<del> return this.pdf.fingerPrint;
<add> return this.pdf.fingerprint;
<ide> },
<ide> getPage: function(number) {
<ide> var promise = new PDFJS.Promise(); | 1 |
Go | Go | add cleanupin tests to remove leftover containers | f854529ae8c9e0139e9ca0466c597b133e3bf41e | <ide><path>runtime_test.go
<ide> func init() {
<ide> globalRuntime = runtime
<ide> }
<ide>
<add> // Cleanup any leftover container
<add> for _, container := range globalRuntime.List() {
<add> if err := globalRuntime.Destroy(container); err != nil {
<add> log.Fatalf("Error destroying leftover container: %s", err)... | 1 |
Javascript | Javascript | remove debug code from tests + re-enable tests | a29d67eea3c852385bf0c1f4e9e00400c7aedc66 | <ide><path>packager/react-packager/src/Bundler/__tests__/Bundle-test.js
<ide> describe('Bundle', () => {
<ide> });
<ide> });
<ide>
<del> fpit('should insert modules in a deterministic order, independent from timing of the wrapping process', () => {
<add> pit('should insert modules in a deterministic or... | 1 |
Javascript | Javascript | add default attribute for use with track element | bb3a326ecd38698ac02d93019f7ff126e8ef4a11 | <ide><path>src/renderers/dom/shared/HTMLDOMPropertyConfig.js
<ide> var HTMLDOMPropertyConfig = {
<ide> crossOrigin: null,
<ide> data: null, // For `<object />` acts as `src`.
<ide> dateTime: MUST_USE_ATTRIBUTE,
<add> default: HAS_BOOLEAN_VALUE,
<ide> defer: HAS_BOOLEAN_VALUE,
<ide> dir: null,
<id... | 1 |
Javascript | Javascript | add error for new behavior | 7851e77cefefdb589b3f844b23a73366e3488f64 | <ide><path>src/geometries/ParametricGeometry.js
<ide> function ParametricBufferGeometry( func, slices, stacks ) {
<ide>
<ide> var i, j;
<ide>
<add> if ( func.length < 3 ) {
<add>
<add> console.error( 'Parametric geometries now require modification of a third THREE.Vector3 argument.' );
<add>
<add> }
<add>
<ide> //... | 1 |
Java | Java | add gson converter to mvc config | e3a6fce403901499c18b8a794be02e7b46af268b | <ide><path>spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java
<ide> import java.util.Properties;
<ide>
<ide> import org.springframework.web.servlet.mvc.method.annotation.JsonViewResponseBodyInterceptor;
<add>import org.springframework.http.converter.json.GsonHt... | 2 |
Python | Python | apply `print` fixer | bb726ca19f434f5055c0efceefe48d89469fcbbe | <ide><path>doc/cdoc/numpyfilter.py
<ide> Also, add Doxygen /** and /**< syntax automatically where appropriate.
<ide>
<ide> """
<del>from __future__ import division, absolute_import
<add>from __future__ import division, absolute_import, print_function
<ide>
<ide> import sys
<ide> import re
<ide><path>doc/cython/run_t... | 300 |
Python | Python | add openstackidentity_2_0_connection_voms class | ec125bffd07f925083dce81fb1b1768f862e8723 | <ide><path>libcloud/common/openstack_identity.py
<ide> from libcloud.utils.py3 import httplib
<ide> from libcloud.utils.iso8601 import parse_date
<ide>
<del>from libcloud.common.base import ConnectionUserAndKey, Response
<add>from libcloud.common.base import (ConnectionUserAndKey, Response,
<add> ... | 2 |
Python | Python | avoid none callback | d53c84b6d6717375ee91d2847a3d0f24beafd8d1 | <ide><path>spacy/pipeline/tok2vec.py
<ide> def predict(self, docs: Iterable[Doc]):
<ide> tokvecs = self.model.predict(docs)
<ide> batch_id = Tok2VecListener.get_batch_id(docs)
<ide> for listener in self.listeners:
<del> listener.receive(batch_id, tokvecs, None)
<add> listen... | 2 |
Python | Python | fix epsilon in objectives | 61b30997eb7e8833484e74ea1bc9df0bcb4b7617 | <ide><path>keras/objectives.py
<ide> def mean_absolute_error(y_true, y_pred):
<ide>
<ide>
<ide> def mean_absolute_percentage_error(y_true, y_pred):
<del> diff = K.abs((y_true - y_pred) / K.clip(K.abs(y_true), K._EPSILON, np.inf))
<add> diff = K.abs((y_true - y_pred) / K.clip(K.abs(y_true), K.epsilon(), np.inf))... | 1 |
Javascript | Javascript | fix assert.strictequal params order | cb6c33e368d97c0c61a085e56b7196a676a09d85 | <ide><path>test/sequential/test-pipe.js
<ide> const tcp = net.Server(common.mustCall((s) => {
<ide> s.on('data', (d) => {
<ide> tcpLengthSeen += d.length;
<ide> for (let j = 0; j < d.length; j++) {
<del> assert.strictEqual(buffer[i], d[j]);
<add> assert.strictEqual(d[j], buffer[i]);
<ide> i++;... | 1 |
Python | Python | fix cpplint --quiet option | b8a98a807f32bf7c1a99e9a8c3f644c85b977523 | <ide><path>tools/cpplint.py
<ide> def ParseArguments(args):
<ide> except ValueError:
<ide> PrintUsage('Extensions must be comma seperated list.')
<ide> elif opt == '--recursive':
<del> PrintUsage('Extensions must be comma separated list.')
<del> elif opt == '--logfile':
<ide> recursi... | 1 |
Ruby | Ruby | move digest path calculation out of loop | 99d260298c3b70d70042c872841b5e81c938fd5b | <ide><path>actionview/lib/action_view/helpers/cache_helper.rb
<ide> def cache_unless(condition, name = {}, options = {}, &block)
<ide> #
<ide> # The digest will be generated using +virtual_path:+ if it is provided.
<ide> #
<del> def cache_fragment_name(name = {}, skip_digest: nil, virtual_path: n... | 2 |
Python | Python | remove broken import | b82227e517bb7baced840b29d04a545a7b7557ae | <ide><path>rest_framework/relations.py
<ide> from django.utils.translation import ugettext_lazy as _
<ide> from rest_framework.fields import Field, WritableField
<ide> from rest_framework.reverse import reverse
<del>from urlparse import urlparse
<ide> from rest_framework.compat import urlparse
<ide> from rest_framework... | 1 |
Python | Python | increase type coverage for imap provider | 08dfd8cd00dae2d7aad53018af04428d933b1ceb | <ide><path>airflow/providers/imap/hooks/imap.py
<ide> def __init__(self, imap_conn_id: str = 'imap_default') -> None:
<ide> self.imap_conn_id = imap_conn_id
<ide> self.mail_client: Optional[imaplib.IMAP4_SSL] = None
<ide>
<del> def __enter__(self):
<add> def __enter__(self) -> 'ImapHook':
<ide> ... | 2 |
Python | Python | convert optimization_test.py to pytorch | 629bd006bfd7e6210dcc95198be9b65614e4f051 | <ide><path>optimization_test_pytorch.py
<add># coding=utf-8
<add># Copyright 2018 The Google AI Language Team Authors.
<add>#
<add># Licensed under the Apache License, Version 2.0 (the "License");
<add># you may not use this file except in compliance with the License.
<add># You may obtain a copy of the License at
<add... | 1 |
Python | Python | add tests for the bitwise ufuncs | 3ed543e996b23418f78fc25e77e06b1f0e29f65f | <ide><path>numpy/core/tests/test_umath.py
<ide> def test_truth_table_bitwise(self):
<ide> assert_equal(np.bitwise_xor(arg1, arg2), out)
<ide>
<ide>
<add>class TestBitwiseUFuncs(TestCase):
<add>
<add> bitwise_types = [np.dtype(c) for c in '?' + 'bBhHiIlLqQ' + 'O']
<add>
<add> def test_values(self):
<add>... | 1 |
Javascript | Javascript | fix missing types in xhrexample | 38f76b32c111854b7414af69bd1f3b251f8a8ba6 | <ide><path>Examples/UIExplorer/XHRExample.js
<ide> var PAGE_SIZE = 20;
<ide>
<ide> class FormUploader extends React.Component {
<ide>
<add> _isMounted: boolean;
<add> _fetchRandomPhoto: () => void;
<add> _addTextParam: () => void;
<add> _upload: () => void;
<add>
<ide> constructor(props) {
<ide> super(props... | 1 |
Java | Java | add backpressure support for defaultifempty() | 60924afdc5c05f51470141877a455e887a7b3415 | <ide><path>src/main/java/rx/Observable.java
<ide> import rx.exceptions.*;
<ide> import rx.functions.*;
<ide> import rx.internal.operators.*;
<add>import rx.internal.producers.SingleProducer;
<ide> import rx.internal.util.*;
<ide> import rx.observables.*;
<ide> import rx.observers.SafeSubscriber;
<ide> public final Obse... | 3 |
Text | Text | move boron releases to lts column | 6d31bdb8722d609b38b74d04f95da07c62d29b8d | <ide><path>doc/changelogs/CHANGELOG_V6.md
<ide> </tr>
<ide> <tr>
<ide> <td valign="top">
<del> <a href="#6.9.4">6.9.4</a><br/>
<del></td>
<del><td valign="top">
<add><a href="#6.9.4">6.9.4</a><br/>
<ide> <a href="#6.9.3">6.9.3</a><br/>
<ide> <a href="#6.9.2">6.9.2</a><br/>
<ide> <a href="#6.9.1">6.9.1</a><br/>
<ide> <... | 1 |
Python | Python | use sysconfig to determine if x86_64 linux | d669e7a716afd8eb5628cae2210d079c76f5b45c | <ide><path>numpy/core/setup.py
<ide> import os
<ide> import sys
<add>import sysconfig
<ide> import pickle
<ide> import copy
<ide> import warnings
<del>import platform
<ide> import textwrap
<ide> import glob
<ide> from os.path import join
<ide> def can_link_svml():
<ide> """
<ide> if NPY_DISABLE_SVML:
<ide> ... | 1 |
PHP | PHP | add checks to fail early | f21f218d93d317636f16d4d8a4d6133938155f75 | <ide><path>src/Validation/Validation.php
<ide> public static function lengthBetween($check, int $min, int $max): bool
<ide> */
<ide> public static function cc($check, $type = 'fast', $deep = false, $regex = null): bool
<ide> {
<del> if (!is_scalar($check)) {
<add> if (!is_numeric($check)) {
<... | 1 |
Python | Python | add working graph container | 2ab9f0ef616c6d05124bdf9c81eb542d73f8e5b6 | <ide><path>keras/layers/containers.py
<ide> # -*- coding: utf-8 -*-
<ide> from __future__ import absolute_import
<add>from __future__ import print_function
<ide>
<ide> import theano.tensor as T
<del>from ..layers.core import Layer
<add>from ..layers.core import Layer, Merge
<ide> from six.moves import range
<ide>
<id... | 4 |
Ruby | Ruby | add documentation on app_generators | adfd43a4daf08cc9a801a0b6a039dd109ce4e81f | <ide><path>railties/lib/rails/engine.rb
<ide> module Rails
<ide> # end
<ide> # end
<ide> #
<add> # == Generators
<add> #
<add> # You can set up generators for engine with config.generators method:
<add> #
<add> # class MyEngine < Rails::Engine
<add> # config.generators do |g|
<add> # g.or... | 1 |
Javascript | Javascript | add a whole ton of missing documentation | 352f4064e9720b91b77ad477321492074899dc5b | <ide><path>src/git-repository-async.js
<ide> export default class GitRepositoryAsync {
<ide> }
<ide> }
<ide>
<add> // Public: Destroy this {GitRepositoryAsync} object.
<add> //
<add> // This destroys any tasks and subscriptions and releases the underlying
<add> // libgit2 repository handle. This method is id... | 1 |
Javascript | Javascript | increase runinasyncscope() coverage | 73b8909501e5f68b7b4131ea1bf13dd454b18749 | <ide><path>test/parallel/test-async-hooks-run-in-async-scope-this-arg.js
<add>'use strict';
<add>
<add>// Test that passing thisArg to runInAsyncScope() works.
<add>
<add>const common = require('../common');
<add>const assert = require('assert');
<add>const { AsyncResource } = require('async_hooks');
<add>
<add>const t... | 1 |
Text | Text | fix typo for object oriented programming article | a7ad6dff118ccec62971f8b793c04da06517e366 | <ide><path>guide/english/design-patterns/object-oriented-programming/index.md
<ide> In procedural programming, we simply create variables and change them when requi
<ide>
<ide> Another extremely useful concept is that of inheritance. The idea is that a class can inherit attributes and behaviour from a base class. For ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.