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 | add plane.flip() plus unit test | 911146dba1eb2e5e43eb838757ef27fe958407ca | <ide><path>src/math/Plane.js
<ide> THREE.Plane.prototype = {
<ide>
<ide> },
<ide>
<add> flip: function () {
<add>
<add> this.constant *= -1;
<add> this.normal.negate();
<add>
<add> return this;
<add>
<add> },
<add>
<ide> distanceToPoint: function ( point ) {
<ide>
<ide> return this.normal.dot( point ) + this.... | 2 |
Text | Text | fix typo in doc | c5e2116ead1792a9e23d094b6793fad80a979746 | <ide><path>docs/templates/index.md
<ide> Keras is compatible with: __Python 2.7-3.5__.
<ide>
<ide> ## Getting started: 30 seconds to Keras
<ide>
<del>The core data structure of Keras is a __model__, a way to organize layers. The main type of model is the [`Sequential`](http://keras.io/getting-started/sequential-model... | 1 |
Ruby | Ruby | echo any cookies received on a redirect | 7d0a36752b6d9b0fee0b2ae650d9042335f99cd7 | <ide><path>Library/Homebrew/utils/curl.rb
<ide> def curl_args(*extra_args, **options)
<ide> # do not load .curlrc unless requested (must be the first argument)
<ide> args << "--disable" unless Homebrew::EnvConfig.curlrc?
<ide>
<add> # echo any cookies received on a redirect
<add> args << "--cooki... | 1 |
Python | Python | update queue implementation | e6cf13cc03475b3a5e7e3d3bf4723c37c3063dde | <ide><path>graphs/breadth_first_search.py
<ide> """ Author: OMKAR PATHAK """
<ide> from __future__ import annotations
<ide>
<add>from queue import Queue
<add>
<ide>
<ide> class Graph:
<ide> def __init__(self) -> None:
<ide> def bfs(self, start_vertex: int) -> set[int]:
<ide> visited = set()
<ide>
<ide> ... | 3 |
Ruby | Ruby | use attr_accessor for checksum | 7a49c143e4e44a280c7625404d8f84bab5677d88 | <ide><path>Library/Homebrew/resource.rb
<ide> class Resource
<ide> include FileUtils
<ide>
<del> attr_reader :checksum, :mirrors, :specs, :using
<del> attr_writer :checksum, :version
<del> attr_accessor :download_strategy
<add> attr_reader :mirrors, :specs, :using
<add> attr_writer :version
<add> attr_accessor... | 1 |
Text | Text | improve docs for select multiple | 18d574a086f724f3437fd018d787a3110046a55c | <ide><path>docs/docs/forms.md
<ide> class FlavorForm extends React.Component {
<ide>
<ide> Overall, this makes it so that `<input type="text">`, `<textarea>`, and `<select>` all work very similarly - they all accept a `value` attribute that you can use to implement a controlled component.
<ide>
<add>> Note
<add>>
<ad... | 1 |
Javascript | Javascript | fix tests for git version of jquery | 3097ea8f12b53f6e34d559d22f85d81d2f857b1b | <ide><path>packages/ember-handlebars/tests/views/collection_view_test.js
<ide> test("a block passed to a collection helper defaults to the content property of
<ide> view.appendTo('#qunit-fixture');
<ide> });
<ide>
<del> equal(view.$('li:has(label:contains("foo")) + li:has(label:contains("bar")) + li:has(label:c... | 2 |
Ruby | Ruby | initialize our instance variables | 4e3b99dad53a25dd369bef9b19ae1cb794ab3e73 | <ide><path>lib/arel/algebra/relations/utilities/compound.rb
<ide> class Compound
<ide> :to => :relation
<ide>
<ide> def initialize relation
<del> @relation = relation
<del> @attributes = nil
<add> @relation = relation
<add> @attributes = nil
<add> @wheres = nil
<add> ... | 1 |
Python | Python | move optimizer closer to usage | d026991921fe4601f2d7149eda799c3c13cf9581 | <ide><path>tutorials/image/cifar10_estimator/cifar10_main.py
<ide> def _resnet_model_fn(features, labels, mode, params):
<ide> boundaries, staged_lr)
<ide>
<ide> loss = tf.reduce_mean(tower_losses, name='loss')
<del> optimizer = tf.train.MomentumOptimizer(
<... | 1 |
Javascript | Javascript | use inline source maps | 81d1c2563999e97fb3d55cc63ccfa7ef561a8e03 | <ide><path>webpack.config.js
<ide> var path = require('path');
<ide>
<ide> module.exports = {
<del> devtool: 'sourcemap',
<add> devtool: 'inline-source-map',
<ide> entry: './client',
<ide> output: {
<ide> filename: 'bundle.js', | 1 |
Javascript | Javascript | fix typo in commet | 38c03ce00643c02f61bee69fec16459cea01af04 | <ide><path>packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js
<ide> describe('ReactHooks', () => {
<ide> expect(root).toMatchRenderedOutput('1');
<ide>
<ide> // Update to the same state. React doesn't know if the queue is empty
<del> // because the alterate fiber has pending update priority... | 1 |
Java | Java | add set/getacceptlanguage() to httpheaders | 9764d5743384fea77e0894090b6e56418ae82457 | <ide><path>spring-web/src/main/java/org/springframework/http/HttpHeaders.java
<ide> import java.net.InetSocketAddress;
<ide> import java.net.URI;
<ide> import java.nio.charset.Charset;
<add>import java.text.DecimalFormat;
<add>import java.text.DecimalFormatSymbols;
<ide> import java.text.ParseException;
<ide> import ja... | 2 |
Ruby | Ruby | add method `ensure_formula_installed!` | 3376479e955283c6b0bff6e64faf0e500714d733 | <ide><path>Library/Homebrew/dev-cmd/bottle.rb
<ide> def bottle
<ide>
<ide> def ensure_relocation_formulae_installed!
<ide> Keg.relocation_formulae.each do |f|
<del> next if Formula[f].latest_version_installed?
<del>
<del> ohai "Installing #{f}..."
<del> safe_system HOMEBREW_BREW_FILE, "install", f... | 8 |
Javascript | Javascript | remove unnecessary comma in unrealbloompass | 31397f8bb8a2a614e88fdc589af30b5fadc9a43e | <ide><path>examples/js/postprocessing/UnrealBloomPass.js
<ide> THREE.UnrealBloomPass.prototype = Object.assign( Object.create( THREE.Pass.proto
<ide> uniforms: {
<ide> "colorTexture": { value: null },
<ide> "texSize": { value: new THREE.Vector2( 0.5, 0.5 ) },
<del> "direction": { value: new THREE.... | 1 |
Ruby | Ruby | return multiple assingment and response variable | f3101fd0fcfc2b67478ca5c968d5d5394d13ff5f | <ide><path>actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
<ide> def initialize(app, routes_app = nil)
<ide>
<ide> def call(env)
<ide> begin
<del> status, headers, body = @app.call(env)
<add> _, headers, body = response = @app.call(env)
<ide>
<ide> if headers['X-Cascade']... | 1 |
Python | Python | fix syntax error | 49b1e48bf556dc291c0144b6384e7b4c702a3072 | <ide><path>spacy/cli/init_model.py
<ide> def read_vectors(vectors_loc):
<ide> pieces = line.rsplit(' ', vectors_data.shape[1]+1)
<ide> word = pieces.pop(0)
<ide> if len(pieces) != vectors_data.shape[1]:
<del> raise ValueError(Errors.E094.format(line_num=i, loc=vectors_loc)
<add> ... | 1 |
Text | Text | update changelog 2.11.1 | ac1a23823f0439fe7bd8bddbba53a9e899a652cf | <ide><path>CHANGELOG.md
<ide> Changelog
<ide> =========
<ide>
<add>### 2.11.1 [See full changelog](https://gist.github.com/ichernev/8ec3ee25b749b4cff3c2)
<add>
<add>## Bugfixes:
<add>* [#2881](https://github.com/moment/moment/pull/2881) Revert "Merge pull request #2746 from mbad0la:develop" Sep->Sept
<add>* [#2868](ht... | 1 |
Javascript | Javascript | expose d3.timer, for requestanimationframe | 166f8b5868beeae90966876a2a31bbe203cfb21f | <ide><path>d3.js
<del>(function(){d3 = {version: "1.5.3"}; // semver
<add>(function(){d3 = {version: "1.6.0"}; // semver
<ide> if (!Date.now) Date.now = function() {
<ide> return +new Date();
<ide> };
<ide> var d3_timer_queue = null,
<ide> d3_timer_timeout = 0,
<ide> d3_timer_interval;
<ide>
<add>// The time... | 7 |
Python | Python | add quotechar to examples | e15d85324a1f5641aaccafbe3cc87556e88ff0a3 | <ide><path>numpy/lib/npyio.py
<ide> def loadtxt(fname, dtype=float, comments='#', delimiter=None,
<ide>
<ide> Note that with the default ``encoding="bytes"``, the inputs to the
<ide> converter function are latin-1 encoded byte strings. To deactivate the
<del> implicit encoding prior to conversion, behavior ... | 1 |
Ruby | Ruby | use a class for formula_meta_files | 4b72e444613509b3102a94de1d1029a9318fcbad | <ide><path>Library/Homebrew/build.rb
<ide> def install f
<ide> end
<ide>
<ide> # Find and link metafiles
<del> FORMULA_META_FILES.each do |filename|
<del> next if File.directory? filename
<del> target_file = filename
<del> target_file = "#{filename}.txt" if File.exists? "#{filenam... | 4 |
Python | Python | replace assertions with valueerror exception | ebd48c6de544e22dd4c5743fb27039bf24b811e1 | <ide><path>examples/pytorch/language-modeling/run_mlm.py
<ide> def __post_init__(self):
<ide> else:
<ide> if self.train_file is not None:
<ide> extension = self.train_file.split(".")[-1]
<del> assert extension in ["csv", "json", "txt"], "`train_file` should be a csv, a... | 2 |
Python | Python | fix error in documentation | 31e969b33a5e95f4c5248b725d7a5d3f8956f52b | <ide><path>numpy/lib/shape_base.py
<ide> def column_stack(tup):
<ide> --------
<ide> hstack, vstack, concatenate
<ide>
<del> Notes
<del> -----
<del> This function is equivalent to ``np.vstack(tup).T``.
<del>
<ide> Examples
<ide> --------
<ide> >>> a = np.array((1,2,3)) | 1 |
Javascript | Javascript | finish implementation of sortable mixin | 136455596cd02a2b543732f620302cbfd7ee3117 | <ide><path>packages/ember-runtime/lib/mixins/sortable.js
<del>var get = Ember.get;
<add>var get = Ember.get, set = Ember.set, forEach = Ember.ArrayUtils.forEach;
<ide>
<del>Ember.SortableMixin = Ember.Mixin.create({
<del> arrangedContent: Ember.computed('content', 'orderBy', function(key, value) {
<add>Ember.Sortable... | 1 |
Ruby | Ruby | fix code formatting [ci skip] | 25c3eab0dcf09a45bcde905710da6a5f5e502c5c | <ide><path>activerecord/lib/active_record/signed_id.rb
<ide> module ClassMethods
<ide> # a certain time period.
<ide> #
<ide> # You set the time period that the signed id is valid for during generation, using the instance method
<del> # +signed_id(expires_in: 15.minutes)+. If the time has elapsed... | 1 |
Text | Text | clarify descriptions of _writev chunks argument | 96c3498710f48f7f7882c19a4764ebd7cf6fc0d8 | <ide><path>doc/api/stream.md
<ide> user programs.
<ide>
<ide> #### `writable._writev(chunks, callback)`
<ide>
<del>* `chunks` {Object[]} The chunks to be written. Each chunk has following
<del> format: `{ chunk: ..., encoding: ... }`.
<add>* `chunks` {Object[]} The data to be written. The value is an array of {Objec... | 1 |
Ruby | Ruby | remove some unnecessary code etc | bd920eae82f83268b2a6ed31c0275255e01bad9f | <ide><path>activerecord/lib/active_record/attribute_methods/read.rb
<ide> def undefine_attribute_methods
<ide> # The second, slower, branch is necessary to support instances where the database
<ide> # returns columns with extra stuff in (like 'my_column(omg)').
<ide> def define_method_attr... | 2 |
Javascript | Javascript | add ecosystem file for pm2 | 0e77b1523fe15a4bb3c76e57eef15b606adbab11 | <ide><path>api-server/ecosystem.config.js
<add>const fs = require('fs');
<add>const path = require('path');
<add>
<add>const dotenv = require('dotenv');
<add>
<add>const filePath = path.resolve('..', '.env');
<add>const env = dotenv.parse(fs.readFileSync(filePath));
<add>
<add>module.exports = {
<add> apps: [
<add> ... | 1 |
PHP | PHP | fix queue connection binding | c206fa0a7fe6be8087de5b042a8ad8d81885bb2b | <ide><path>src/Illuminate/Foundation/Application.php
<ide> public function registerCoreContainerAliases()
<ide> 'paginator' => 'Illuminate\Pagination\Factory',
<ide> 'auth.reminder' => ['Illuminate\Auth\Reminders\PasswordBroker', 'Illuminate\Contracts\Auth\PasswordBroker'],
<ide> 'queue' => 'Ill... | 2 |
Go | Go | remove ghost state | cf997aa905c5c6f5a29fa3658d904ffc81a1a4a1 | <ide><path>daemon/daemon.go
<ide> func (daemon *Daemon) load(id string) (*Container, error) {
<ide> if container.ID != id {
<ide> return container, fmt.Errorf("Container %s is stored at %s", container.ID, id)
<ide> }
<del> if container.State.IsRunning() {
<del> container.State.SetGhost(true)
<del> }
<ide> return ... | 2 |
Python | Python | add a test for ticket | 103988055053f7a30083fd28c0887a5f2922a67c | <ide><path>numpy/core/tests/test_regression.py
<ide> def test_unicode_alloc_dealloc_match(self):
<ide> a = np.array(['abc'], dtype=np.unicode)[0]
<ide> del a
<ide>
<add> def test_refcount_error_in_clip(self):
<add> # Ticket #1588
<add> a = np.zeros((2,), dtype='>i2').clip(min=0)
<add> ... | 1 |
PHP | PHP | apply fixes from styleci | 9c033c21f32ef6a545ed49ed939d4fbd4b950aab | <ide><path>src/Illuminate/Hashing/BcryptHasher.php
<ide> public function check($value, $hashedValue, array $options = [])
<ide> public function needsRehash($hashedValue, array $options = [])
<ide> {
<ide> return password_needs_rehash($hashedValue, PASSWORD_BCRYPT, [
<del> 'cost' => isset($opt... | 1 |
Text | Text | fix minor typo in pixelratio.md | a1d77af07cd4fb230b838b6981d049c882421554 | <ide><path>docs/PixelRatio.md
<ide> ## Pixel Grid Snapping
<ide>
<del>In iOS, you can specify positions and dimensions for elements with arbitrary precision, for example 29.674825. But, ultimately the physical display only have a fixed number of pixels, for example 640×960 for iphone 4 or 750×1334 for iphone 6. iOS tr... | 1 |
Python | Python | remove dag parsing from standardtaskrunner | ce071172e22fba018889db7dcfac4a4d0fc41cda | <ide><path>airflow/cli/commands/task_command.py
<ide> from airflow.utils import cli as cli_utils
<ide> from airflow.utils.cli import (
<ide> get_dag,
<del> get_dag_by_deserialization,
<ide> get_dag_by_file_location,
<ide> get_dag_by_pickle,
<ide> get_dags,
<ide> def task_run(args, dag=None):
<ide> ... | 4 |
PHP | PHP | add index reflection into describe() | 25863adbfd27f7ad3028ef4b1a9749ad725f90ea | <ide><path>lib/Cake/Database/Schema/Collection.php
<ide> public function describe($name) {
<ide>
<ide> $table = new Table($name);
<ide> $fieldParams = [];
<del> if (method_exists($this->_dialect, 'extraSchemaColumn')) {
<add> if (method_exists($this->_dialect, 'extraSchemaColumns')) {
<ide> $fieldParams = $th... | 1 |
Python | Python | apply `execfile` fixer results | 36e979c465150b1846f37f1811b86f63f9d1e085 | <ide><path>setupegg.py
<ide> setupfile = imp.load_source('setupfile', 'setup.py')
<ide> setupfile.setup_package()
<ide> else:
<del> execfile('setup.py')
<add> exec(compile(open('setup.py').read(), 'setup.py', 'exec')) | 1 |
Text | Text | add @raisinten to the tsc | 46f4d5e2a63977ad9823c3fbf4008212d5126a2e | <ide><path>README.md
<ide> For information about the governance of the Node.js project, see
<ide> **Mary Marchini** <<oss@mmarchini.me>> (she/her)
<ide> * [MylesBorins](https://github.com/MylesBorins) -
<ide> **Myles Borins** <<myles.borins@gmail.com>> (he/him)
<add>* [RaisinTen](https://github.com/RaisinTen) -
<ad... | 1 |
Go | Go | improve performance/reduce allocs of bytespipe | 9a25b1d942da88439ec04797ff6f1c33c3b5562d | <ide><path>pkg/ioutils/buffer.go
<add>package ioutils
<add>
<add>import (
<add> "errors"
<add> "io"
<add>)
<add>
<add>var errBufferFull = errors.New("buffer is full")
<add>
<add>type fixedBuffer struct {
<add> buf []byte
<add> pos int
<add> lastRead int
<add>}
<add>
<add>func (b *fixedBuffer) Write(p []byte) ... | 5 |
Javascript | Javascript | use fixture files | e8e4593bc06ac92081a1c68cafb14f5debbf4544 | <ide><path>node-tests/blueprints/util-test-test.js
<ide> const modifyPackages = blueprintHelpers.modifyPackages;
<ide> const chai = require('ember-cli-blueprint-test-helpers/chai');
<ide> const expect = chai.expect;
<ide>
<add>const fixture = require('../helpers/fixture');
<add>
<ide> describe('Blueprint: util-test', ... | 4 |
Javascript | Javascript | enable more certs | b8b89ed549e6d453bd40d0eef49477c9de57ab58 | <ide><path>config/i18n/all-langs.js
<ide> const auditedCerts = {
<ide> 'front-end-libraries',
<ide> 'data-visualization',
<ide> 'apis-and-microservices',
<del> 'quality-assurance'
<add> 'quality-assurance',
<add> 'scientific-computing-with-python',
<add> 'data-analysis-with-python',
<add> 'in... | 1 |
Ruby | Ruby | escape example interpolation | 91dfb608054aeb373c47643eebfa60ba0058946f | <ide><path>Library/Homebrew/cmd/create.rb
<ide> def install
<ide> # were more thorough. Run the test with `brew test #{name}`.
<ide> #
<ide> # The installed folder is not in the path, so use the entire path to any
<del> # executables being tested: `system "#{bin}/program", "--version"`.
<... | 1 |
PHP | PHP | fix doc block typo in entitytrait | 9e9410c0f646d4cc93544f6b56672112ffda30ef | <ide><path>src/Datasource/EntityTrait.php
<ide> public function accessible($property, $set = null) {
<ide> }
<ide>
<ide> /**
<del> * Returns the alias of the repository from wich this entity came from.
<add> * Returns the alias of the repository from which this entity came from.
<ide> *
<ide> * If called with no ar... | 1 |
Python | Python | fix version comparison when version is none | 6603acb88bd9ebf3dbcdd0f85f555cfc6f952228 | <ide><path>numpy/distutils/fcompiler/nag.py
<ide> def get_flags_opt(self):
<ide> return ['-O4']
<ide> def get_flags_arch(self):
<ide> version = self.get_version()
<del> if version < '5.1':
<add> if version and version < '5.1':
<ide> return ['-target=native']
<ide> e... | 1 |
Ruby | Ruby | add missing require to fix the ci | 69c52b0e9add98741b6c3dd4db26d14aecc9fdb7 | <ide><path>activerecord/test/cases/adapters/postgresql/timestamp_test.rb
<ide> require 'cases/helper'
<add>require 'models/developer'
<ide>
<ide> class TimestampTest < ActiveRecord::TestCase
<ide> def test_load_infinity_and_beyond | 1 |
Python | Python | fix clone_model to consider input_tensors | 304c2d06dc7ab25d7e9bb236e2f514f94bbeb4cb | <ide><path>keras/models.py
<ide> def _clone_functional_model(model, input_tensors=None, layer_fn=_clone_layer):
<ide> newly_created_input_layer = input_tensor._keras_history.layer
<ide> new_input_layers[original_input_layer] = newly_created_input_layer
<ide> else:
<del> new_input_layers[ori... | 2 |
Ruby | Ruby | move condition to nested `if` statement | f762033a57be271b778be6e39fe7d5b9d068ec64 | <ide><path>Library/Homebrew/cmd/search.rb
<ide> def search
<ide> puts Formatter.columns(all_casks)
<ide> end
<ide>
<del> if $stdout.tty? && !local_casks.include?(query)
<add> if $stdout.tty?
<ide> count = all_formulae.count + all_casks.count
<ide>
<del> if reason = MissingFormul... | 1 |
Text | Text | move inactive collaborators to emeriti | b6201abacf36cc49500647f25b604d2216c1d006 | <ide><path>README.md
<ide> For information about the governance of the Node.js project, see
<ide> **Ben Noordhuis** <info@bnoordhuis.nl>
<ide> * [boneskull](https://github.com/boneskull) -
<ide> **Christopher Hiller** <boneskull@boneskull.com> (he/him)
<del>* [brendanashworth](https://github.com/brendanashw... | 1 |
Ruby | Ruby | remove more `env` access | f16a33b68efc3dc57cfafa27651b9a765e363fbf | <ide><path>actionpack/lib/action_controller/test_case.rb
<ide> def initialize(env, session)
<ide> end
<ide>
<ide> def query_string=(string)
<del> @env[Rack::QUERY_STRING] = string
<add> set_header Rack::QUERY_STRING, string
<ide> end
<ide>
<ide> def request_parameters=(params)
<del> @en... | 1 |
Python | Python | allow specification of terms to fit in hermefit | 6411ec505ed7b36c9768accd338a96f5a64eba93 | <ide><path>numpy/polynomial/hermite_e.py
<ide> def hermefit(x, y, deg, rcond=None, full=False, w=None):
<ide> y-coordinates of the sample points. Several data sets of sample
<ide> points sharing the same x-coordinates can be fitted at once by
<ide> passing in a 2D-array that contains one dataset... | 1 |
Ruby | Ruby | fix use of `find` on ruby 1.8 | 482481d24c7d66cdc2a6fdfb9933cf6fb7b429c9 | <ide><path>Library/Homebrew/extend/pathname.rb
<ide> def abv
<ide> def compute_disk_usage
<ide> if self.directory?
<ide> @file_count, @disk_usage = [0, 0]
<del> self.find.each do |f|
<add> self.find do |f|
<ide> if !File.directory?(f) and !f.to_s.match(/\.DS_Store/)
<ide> @file_c... | 1 |
PHP | PHP | correct doc blocks | 55cbcd567bd53a49d492e68e0930e741bf91f041 | <ide><path>src/Utility/Inflector.php
<ide> public static function dasherize($string)
<ide> * (Underscores are replaced by spaces and capitalized following words.)
<ide> *
<ide> * @param string $string String to be made more readable
<del> * @param string $replacement
<add> * @param string $replac... | 1 |
Javascript | Javascript | improve inspect for (async|generator)function | f65aa08b528a17e57471ffece5ee0946c1c72d1b | <ide><path>lib/util.js
<ide> function formatValue(ctx, value, recurseTimes) {
<ide> });
<ide> }
<ide>
<add> var constructor = getConstructorOf(value);
<add>
<ide> // Some type of object without properties can be shortcutted.
<ide> if (keys.length === 0) {
<ide> if (typeof value === 'function') {
<del> ... | 2 |
Javascript | Javascript | fix crash with js-based sticky headers | 94a333a2ead7ea632fe52f0439397c4f3ed11f2a | <ide><path>Libraries/Components/ScrollView/ScrollView.js
<ide> const ScrollView = React.createClass({
<ide> ];
<ide> if (previousHeaderIndex != null) {
<ide> const previousHeader = this._stickyHeaderRefs.get(previousHeaderIndex);
<del> previousHeader && previousHeader.setNextHeaderY(
<del> eve... | 2 |
Python | Python | use self.sdtout and commanderror to print output | 34c38e0cfe5e880e678704c4d473f082787fca64 | <ide><path>rest_framework/authtoken/management/commands/drf_create_token.py
<ide> from django.contrib.auth import get_user_model
<del>from django.core.management.base import BaseCommand
<add>from django.core.management.base import BaseCommand, CommandError
<ide> from rest_framework.authtoken.models import Token
<ide>
... | 1 |
Javascript | Javascript | improve path parsing on windows | 8153a216137728bdb3942d70f4aa52d4644b2ad2 | <ide><path>lib/path.js
<ide> function normalizeArray(parts, allowAboveRoot) {
<ide>
<ide>
<ide> if (isWindows) {
<del>
<del> // Regex to split a filename into [*, dir, basename, ext]
<del> // windows version
<del> var splitPathRe = /^(.+(?:[\\\/](?!$)|:)|[\\\/])?((?:.+?)?(\.[^.]*)?)$/;
<del>
<ide> // Regex to sp... | 2 |
Text | Text | fix typo in release notes | 9edd5dfe5d65b99289b7a6d0d74deab89749a512 | <ide><path>docs/community/release-notes.md
<ide> You can determine your currently installed version using `pip show`:
<ide>
<ide> ---
<ide>
<del>## 3.11.x series
<add>## 3.12.x series
<ide>
<ide> ### 3.12.1
<ide> | 1 |
Javascript | Javascript | improve code in test-http-host-headers | f4fd073f0fc19da226de38eb595007bfee4c17d0 | <ide><path>test/parallel/test-http-host-headers.js
<ide> 'use strict';
<del>require('../common');
<add>const common = require('../common');
<ide> const http = require('http');
<ide> const assert = require('assert');
<ide> const httpServer = http.createServer(reqHandler);
<ide>
<ide> function reqHandler(req, res) {
<de... | 1 |
Python | Python | fix a typo | a0006d6410a586a45830586a0ef0e5bf17c84fee | <ide><path>libcloud/compute/providers.py
<ide> Provider.RACKSPACE_NOVA_DFW:
<ide> ('libcloud.compute.drivers.rackspacenova', 'RackspaceNovaDfwNodeDriver'),
<ide> Provider.LIBVIRT:
<del> ('libcloud.compute.drivers.libvirt_driver', 'LinodeNodeDriver')
<add> ('libcloud.compute.drivers.libvirt... | 1 |
Ruby | Ruby | add tests for path based url_for calls | ea58684b579beb8fbf87dde5dbf8694c453d10f9 | <ide><path>actionview/test/activerecord/polymorphic_routes_test.rb
<ide> def test_string_with_options
<ide>
<ide> def test_symbol
<ide> with_test_routes do
<del> assert_equal "http://example.com/projects", polymorphic_url(:projects)
<del> assert_equal "http://example.com/projects", url_for(:projects)
<... | 1 |
Ruby | Ruby | add missing requires | c59ab795eee288d0a8d6842d2115d14f58f7badd | <ide><path>activemodel/lib/active_model/attribute.rb
<ide> # frozen_string_literal: true
<ide>
<add>require "active_support/core_ext/object/duplicable"
<add>
<ide> module ActiveModel
<ide> class Attribute # :nodoc:
<ide> class << self
<ide><path>activemodel/test/cases/attribute_set_test.rb
<ide> # frozen_string_... | 2 |
PHP | PHP | fix function call | 92b3ac07c1b206f5ff0ddafcc20fa152dc3e8a5c | <ide><path>src/Illuminate/Foundation/Console/AppNameCommand.php
<ide> protected function setPhpSpecNamespace()
<ide> protected function setDatabaseFactoryNamespaces()
<ide> {
<ide> $this->replaceIn(
<del> $this->laravel['database_path'].'/factories', $this->currentRoot, $this->argument('name'... | 1 |
Python | Python | add a docstring for getarrlen | 48a9a519cc7a4d52ff85577efee0048350d07254 | <ide><path>numpy/f2py/crackfortran.py
<ide> def getlincoef(e, xset): # e = a*x+b ; x in xset
<ide>
<ide>
<ide> def getarrlen(dl, args, star='*'):
<add> """
<add> Parameters
<add> ----------
<add> dl : sequence of two str objects
<add> dimensions of the array
<add> args : Iterable[str]
<add> ... | 1 |
Ruby | Ruby | allow symbols for reason | 4d0a1ff775baa02f66d61ce949d6fe32d776f2be | <ide><path>Library/Homebrew/formula.rb
<ide> def link_overwrite?(path)
<ide> # The reason this {Formula} is deprecated.
<ide> # Returns `nil` if no reason is specified or the formula is not deprecated.
<ide> # @method deprecation_reason
<del> # @return [String]
<add> # @return [String, Symbol]
<ide> delegate ... | 4 |
Ruby | Ruby | fix punctuation errors | 6372d23616b13c62c7a12efa89f958b334dd66ae | <ide><path>activesupport/lib/active_support/core_ext/date_time/conversions.rb
<ide> def formatted_offset(colon = true, alternate_utc_string = nil)
<ide> utc? && alternate_utc_string || ActiveSupport::TimeZone.seconds_to_utc_offset(utc_offset, colon)
<ide> end
<ide>
<del> # Overrides the default inspect method w... | 1 |
Text | Text | remove resnet folder from github | aa031d9198b3795cffadddc75fc5782d041dafe2 | <ide><path>official/resnet/README.md
<del># ResNet in TensorFlow
<del>
<del>* For the Keras version of the ResNet model, see
<del> [`official/vision/image_classification`](../vision/image_classification).
<del>* For the Keras custom training loop version, also see
<del> [`official/vision/image_classification`](../vis... | 1 |
Python | Python | add key to the folders | 262a3c72d40408727d220ce0b943ca9f03f06f9a | <ide><path>glances/plugins/glances_folders.py
<ide> def __init__(self, args=None):
<ide>
<ide> # Init stats
<ide> self.glances_folders = None
<add> self.reset()
<add>
<add> def get_key(self):
<add> """Return the key of the list."""
<add> return 'path'
<add>
<add> def reset(se... | 1 |
Javascript | Javascript | expose tech but warn without safety var | 8622b2648e6ad75b9d968e2f2027c6baab27d03f | <ide><path>src/js/player.js
<ide> import Component from './component.js';
<ide>
<ide> import document from 'global/document';
<ide> import window from 'global/window';
<add>import tsml from 'tsml';
<ide> import * as Events from './utils/events.js';
<ide> import * as Dom from './utils/dom.js';
<ide> import * as Fn from... | 2 |
Javascript | Javascript | add key modifiers to press events | 91a044e31fc79e4ea6db97f97de4a9e3a5da8a43 | <ide><path>packages/react-events/src/Press.js
<ide> type PressEvent = {|
<ide> pageY: null | number,
<ide> screenX: null | number,
<ide> screenY: null | number,
<add> x: null | number,
<add> y: null | number,
<add> altKey: boolean,
<add> ctrlKey: boolean,
<add> metaKey: boolean,
<add> shiftKey: boolean,
<id... | 2 |
Javascript | Javascript | fix short name for august in id locale | 6adc6eedd68b99ff28c790d875fc1b6bfb19c71e | <ide><path>src/locale/id.js
<ide> import moment from '../moment';
<ide>
<ide> export default moment.defineLocale('id', {
<ide> months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
<del> monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split... | 2 |
Python | Python | add tests for t and mt in array_api | 18fe695dbc66df660039aca9f76a949de8b9348e | <ide><path>numpy/array_api/tests/test_array_object.py
<ide> import numpy as np
<ide>
<ide> from .. import ones, asarray, result_type, all, equal
<add>from .._array_object import Array
<ide> from .._dtypes import (
<ide> _all_dtypes,
<ide> _boolean_dtypes,
<ide> def test_device_property():
<ide>
<ide> asse... | 1 |
Java | Java | change javadoc explanation for mutable list | ac3b5b195b8abf6086c21c7601ff5d054e0041d4 | <ide><path>src/main/java/io/reactivex/Flowable.java
<ide> public final <K> Flowable<T> distinct(Function<? super T, K> keySelector,
<ide> * {@code CharSequence}s or {@code List}s where the objects will actually have the same
<ide> * references when they are modified and {@code distinctUntilChanged} will evalu... | 2 |
PHP | PHP | add test to check passing $columns in paginate | c158a2e80ed22740e7600e7cc2bd794d14ba886c | <ide><path>tests/Database/DatabaseEloquentBuilderTest.php
<ide> public function testListsWithoutModelGetterJustReturnTheAttributesFoundInDatabas
<ide> $this->assertEquals(['bar', 'baz'], $builder->lists('name')->all());
<ide> }
<ide>
<add> public function testPaginatePassesColumnsToGetCountForPagination... | 1 |
Python | Python | add unittest for wasbtaskhandler | 0ee437547b6c412217ce646d9a831c244ebc4d94 | <ide><path>tests/providers/microsoft/azure/log/__init__.py
<add># Licensed to the Apache Software Foundation (ASF) under one
<add># or more contributor license agreements. See the NOTICE file
<add># distributed with this work for additional information
<add># regarding copyright ownership. The ASF licenses this file
... | 3 |
Ruby | Ruby | remove mentions of nonexistent command `brew diy` | b886b2d1f71813700b1b84aa8a29a89a5c472808 | <ide><path>Library/Homebrew/cmd/link.rb
<ide> def link
<ide> formula = begin
<ide> keg.to_formula
<ide> rescue FormulaUnavailableError
<del> # Not all kegs may belong to formulae e.g. with `brew diy`
<add> # Not all kegs may belong to formulae
<ide> nil
<ide> end
<ide>
<... | 2 |
Ruby | Ruby | fix false negatives in `audit_gcc_dependency` | 1d7856c4f11f92f0e2c26fbf99f4ef26a56c80ee | <ide><path>Library/Homebrew/formula_auditor.rb
<ide> def linux_only_gcc_dep?(formula)
<ide> # This variation either:
<ide> # 1. does not exist
<ide> # 2. has no variation-specific dependencies
<del> # In either case, it matches Linux.
<del> return false if variation_d... | 1 |
Javascript | Javascript | add common.mustcall in test-http-abort-client.js | 578b31e14b6f80e173c6b90b0a9e60b9a14dfca6 | <ide><path>test/parallel/test-http-abort-client.js
<ide> const common = require('../common');
<ide> const http = require('http');
<ide>
<ide> let serverRes;
<del>const server = http.Server((req, res) => {
<add>const server = http.Server(common.mustCall((req, res) => {
<ide> serverRes = res;
<ide> res.writeHead(200... | 1 |
Javascript | Javascript | improve stability of oom test | 7752eedcc7db586fb0a7c586908d4405c6408325 | <ide><path>test/parallel/test-windows-failed-heap-allocation.js
<ide> const tmpdir = require('../common/tmpdir');
<ide> tmpdir.refresh();
<ide>
<ide> // --max-old-space-size=3 is the min 'old space' in V8, explodes fast
<del>const cmd = `"${process.execPath}" --max-old-space-size=3 "${__filename}"`;
<del>exec(`${cmd} ... | 1 |
Ruby | Ruby | use map + flatten here | 933adce8f45b41a5a6b6bb31ba9d6fb5188f4a35 | <ide><path>activemodel/lib/active_model/validations.rb
<ide> def validators
<ide>
<ide> # List all validators that being used to validate a specific attribute.
<ide> def validators_on(*attributes)
<del> attributes.inject([]) do |all, attribute|
<del> all |= _validators[attribute.to_sym] || ... | 1 |
Text | Text | remove backticks around proejct names | b2d9c3f9ca3fb03ec93629c63de03d28457408a5 | <ide><path>guides/source/active_storage_overview.md
<ide> the box, Active Storage supports previewing videos and PDF documents.
<ide> </ul>
<ide> ```
<ide>
<del>WARNING: Extracting previews requires third-party applications, `FFmpeg` for
<del>video and `muPDF` for PDFs, and on macOS also `XQuartz` and `Poppler`.
<add>... | 2 |
PHP | PHP | add controller option | 2b0f45b6abdaced7c96f80b68b6ae4ea81587c7c | <ide><path>src/Console/Command/Task/ViewTask.php
<ide> class ViewTask extends BakeTask {
<ide> */
<ide> public $controllerClass = null;
<ide>
<add>/**
<add> * Name of the table views are being baked against.
<add> *
<add> * @var string
<add> */
<add> public $tableName = null;
<add>
<ide> /**
<ide> * The template fi... | 2 |
Ruby | Ruby | preserve some directories | 876021a926f9ef1ba6c555353f7a43678e97fb8b | <ide><path>Library/Homebrew/cmd/prune.rb
<ide> def prune
<ide> path.unlink
<ide> end
<ide> end
<del> elsif path.directory? && !Keg::PRUNEABLE_DIRECTORIES.include?(path)
<add> elsif path.directory? && !Keg::PRUNEABLE_DIRECTORIES.include?(path) &&
<add> !Keg:... | 1 |
Text | Text | remove old sections [ci skip] (closes ) | 9c08d9baa31622e9e9daff37a9774774e42d8778 | <ide><path>website/docs/usage/facts-figures.md
<ide> next: /usage/spacy-101
<ide> menu:
<ide> - ['Feature Comparison', 'comparison']
<ide> - ['Benchmarks', 'benchmarks']
<del> - ['Powered by spaCy', 'powered-by']
<del> - ['Other Libraries', 'other-libraries']
<ide> ---
<ide>
<ide> ## Feature comparison {#compari... | 1 |
Go | Go | graphdriver dynamic sandbox management | 8c279ef3ad8cd1f019789b8378d0394c80a1807f | <ide><path>daemon/graphdriver/lcow/lcow.go
<ide> //
<ide> // * lcow.vhdx - Specifies a custom vhdx file to boot (instead of a kernel+initrd)
<ide> // -- Possible values: Any valid filename
<del>// -- Default if ommitted: C:\Program Files\Linux Containers\uvm.vhdx
<add>// -- Default if ommit... | 1 |
Go | Go | fix multi-remove during service update | 3249c1d0e79f57642b96f6692ffa44f46f15b602 | <ide><path>api/client/service/update.go
<ide> func updateService(flags *pflag.FlagSet, spec *swarm.ServiceSpec) error {
<ide> }
<ide> }
<ide>
<del> updateListOpts := func(flag string, field *[]string) {
<del> if flags.Changed(flag) {
<del> value := flags.Lookup(flag).Value.(*opts.ListOpts)
<del> *field = value... | 2 |
PHP | PHP | apply fixes from styleci | ea3f1e3e456843fb5b0c5cc67c86c2fe3d87b861 | <ide><path>src/Illuminate/Pagination/AbstractPaginator.php
<ide> public function through(callable $callback)
<ide> $this->items->transform($callback);
<ide>
<ide> return $this;
<del> }
<add> }
<ide>
<ide> /**
<ide> * Get the number of items shown per page. | 1 |
Javascript | Javascript | fix proptypes.{oneof, oneoftype} validation | ac349cfbe520c95bd6ba2d31138569a6750b7ba8 | <ide><path>src/isomorphic/classic/types/ReactPropTypes.js
<ide> function createInstanceTypeChecker(expectedClass) {
<ide>
<ide> function createEnumTypeChecker(expectedValues) {
<ide> if (!Array.isArray(expectedValues)) {
<del> return new Error(
<del> `Invalid argument supplied to oneOf, expected an instance ... | 2 |
Javascript | Javascript | fix animation in fast navigation between scenes | df43cc7f6bf24802275e27a068a7f6a3169d538f | <ide><path>Libraries/NavigationExperimental/NavigationTransitioner.js
<ide> class NavigationTransitioner extends React.Component<any, Props, State> {
<ide> scenes: nextScenes,
<ide> };
<ide>
<del> this._prevTransitionProps = this._transitionProps;
<del> this._transitionProps = buildTransitionProps(next... | 1 |
Java | Java | move some js modules to debug only | bdc47313e8f2020bd3c1b58deccea8418ac4c910 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.java
<ide> public List<Class<? extends JavaScriptModule>> createJSModules() {
<ide> RCTEventEmitter.class,
<ide> RCTNativeAppEventEmitter.class,
<ide> AppRegistry.class,
<del> com.facebook.react.bridge.Systrace.cl... | 1 |
PHP | PHP | fix cs errors | 06d71b5d2c7455c525526bcf541164e494bcc027 | <ide><path>src/Collection/CollectionTrait.php
<ide> public function cartesianProduct(?callable $operation = null, ?callable $filter
<ide> }, $collectionArrays, $collectionArraysKeys, $currentIndexes);
<ide>
<ide> if ($filter === null || $filter($currentCombination)) {
<del> $resu... | 19 |
Mixed | Ruby | fix find_in_batches with customized primary_key | 761bc751d31c22e2c2fdae2b4cdd435b68b6d783 | <ide><path>activerecord/CHANGELOG.md
<ide> ## Rails 4.0.0 (unreleased) ##
<ide>
<add>* Fix `find_in_batches` when primary_key is set other than id.
<add> You can now use this method with the primary key which is not integer-based.
<add>
<add> Example:
<add>
<add> class Post < ActiveRecord::Base
<add> ... | 4 |
PHP | PHP | add methods for sending cookies with test requests | 4542387f4b0ac77726ec970b49c1102509df79e9 | <ide><path>src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
<ide>
<ide> trait MakesHttpRequests
<ide> {
<add> /**
<add> * Additional cookies for the request.
<add> *
<add> * @var array
<add> */
<add> protected $defaultCookies = [];
<add>
<ide> /**
<ide> * Additional heade... | 2 |
Python | Python | introduce notification_sent to slamiss view | 1e2d1a2fe89e290b94c58acde85e94a4900f4073 | <ide><path>airflow/www/views.py
<ide> class SlaMissModelView(AirflowModelView):
<ide> permissions.ACTION_CAN_ACCESS_MENU,
<ide> ]
<ide>
<del> list_columns = ['dag_id', 'task_id', 'execution_date', 'email_sent', 'timestamp']
<add> list_columns = ['dag_id', 'task_id', 'execution_date', 'email_sent', 'n... | 1 |
Ruby | Ruby | fix variable name | cac6f2f07079c28450240800ba2ffd3b4104ea35 | <ide><path>Library/Homebrew/cmd/test.rb
<ide> def test
<ide> Utils.safe_fork do
<ide> if Sandbox.available? && ARGV.sandbox?
<ide> sandbox = Sandbox.new
<del> formula.logs.mkpath
<add> f.logs.mkpath
<ide> sandbox.record_log(f.logs/"sandbox.test.log")
<ide>... | 1 |
Javascript | Javascript | add reactutils and array polyfills | 328274bbba44aa6d75dfa21242ac9f0609c5948f | <ide><path>npm-react-codemod/transforms/utils/ReactUtils.js
<add>/*eslint-disable no-comma-dangle*/
<add>
<add>'use strict';
<add>
<add>module.exports = function(j) {
<add> const REACT_CREATE_CLASS_MEMBER_EXPRESSION = {
<add> type: 'MemberExpression',
<add> object: {
<add> name: 'React',
<add> },
<add> ... | 2 |
PHP | PHP | improve collection extensibility | 39bcf2b439aa2966d4d5be1f53447a2347f7f4c9 | <ide><path>src/Illuminate/Support/Collection.php
<ide> public function __toString()
<ide> * @param \Illuminate\Support\Collection|\Illuminate\Support\Contracts\ArrayableInterface|array $items
<ide> * @return array
<ide> */
<del> private function getArrayableItems($items)
<add> protected function getArrayableI... | 1 |
Javascript | Javascript | add tests for amp style tags | ee18967dfcf9f65a4b2c05620c253deb92b4f360 | <ide><path>test/integration/amphtml/components/Bar.js
<add>export default function Bar () {
<add> return (
<add> <div>
<add> <span>Bar!</span>
<add> <style jsx>{`
<add> span {
<add> color: blue;
<add> }
<add> `}</style>
<add> </div>
<add> )
<add>}
<ide><path>test/integratio... | 4 |
Text | Text | fix wrong command in changelog | 1fe0270e728dd587c724c5f0de211ab739918e4b | <ide><path>CHANGELOG.md
<ide> To manually remove all plugins and resolve this problem, take the following step
<ide> * Remove `--name` from `docker volume create` [#23830](https://github.com/docker/docker/pull/23830)
<ide> + Add `docker stack ls` [#23886](https://github.com/docker/docker/pull/23886)
<ide> + Add a new `... | 1 |
Javascript | Javascript | add macos read and write find pasteboard methods | 7db65ca8997906749207b91b723b3996583e77f1 | <ide><path>src/clipboard.js
<ide> module.exports = class Clipboard {
<ide> return clipboard.readText();
<ide> }
<ide>
<add> // Public: Write the given text to the macOS find pasteboard
<add> writeFindText(text) {
<add> clipboard.writeFindText(text);
<add> }
<add>
<add> // Public: Read the text from the ma... | 1 |
Python | Python | update unittests for allclose, isclose | e2812eddd839ad45f252087ed23a01029e9ecc61 | <ide><path>numpy/core/tests/test_numeric.py
<ide> def test_min_int(self):
<ide> assert_(allclose(a, a))
<ide>
<ide>
<add> def test_equalnan(self):
<add> x = np.array([1.0, np.nan])
<add> assert_(allclose(x, x, equal_nan=True))
<add>
<add>
<ide> class TestIsclose(object):
<ide> rtol = 1e-5... | 1 |
Javascript | Javascript | use ternary operator instead of if-else | efb8211bcf06ef12f45fa54e5654ab3beb8d8ca0 | <ide><path>lib/RuntimeTemplate.js
<ide> class RuntimeTemplate {
<ide> : Template.toNormalComment(propertyAccess(exportName)) + " ";
<ide> const access = `${importVar}${comment}${propertyAccess(used)}`;
<ide> if (isCall && callContext === false) {
<del> if (asiSafe) {
<del> return `(0,${access})`;
<del>... | 1 |
Text | Text | alphabetize auth docs providers. | 4f5b0621c122107e808a7270bd89d3fa0d4a7290 | <ide><path>docs/authentication.md
<ide> To see examples with other authentication providers, check out the [examples fol
<ide> <details open>
<ide> <summary><b>Examples</b></summary>
<ide> <ul>
<del> <li><a href="https://github.com/vercel/next.js/tree/canary/examples/with-firebase-authentication">with-firebase-a... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.