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 | remove first guards | acaf8a0316ec7bd737a3bdd813c1f02262fc80f6 | <ide><path>src/config.js
<ide> sizes. See [this document][watches] for more info.
<ide> })
<ide> }
<ide>
<del> getRawValue (keyPath, options) {
<add> getRawValue (keyPath, options = {}) {
<ide> let defaultValue, value
<del> if (!(__guard__(options != null ? options.excludeSources : undefined, x => x.ind... | 1 |
Go | Go | use prefix naming for attach tests | f312f784e18f3a0a087e615162c1e38b1bae8e51 | <ide><path>integration-cli/docker_cli_attach_test.go
<ide> import (
<ide>
<ide> const attachWait = 5 * time.Second
<ide>
<del>func TestMultipleAttachRestart(t *testing.T) {
<add>func TestAttachMultipleAndRestart(t *testing.T) {
<ide> defer deleteAllContainers()
<ide>
<ide> endGroup := &sync.WaitGroup{} | 1 |
Ruby | Ruby | remove arity check for `routeset#draw` | 8d23f37b15e1b3eca694ebbd6dd7dbf0016c5fbe | <ide><path>actionpack/lib/action_dispatch/routing/route_set.rb
<ide> def prepend(&block)
<ide> end
<ide>
<ide> def eval_block(block)
<del> if block.arity == 1
<del> raise "You are using the old router DSL which has been removed in Rails 3.1. " <<
<del> "Please check how to update... | 2 |
Ruby | Ruby | remove unnecessary deletes | 3e3e23f0484b4891a70eecd89f30b8ad81852e8b | <ide><path>actionpack/lib/action_dispatch/routing/mapper.rb
<ide> class Mapping #:nodoc:
<ide> def self.build(scope, set, path, as, controller, default_action, to, via, formatted, options)
<ide> options = scope[:options].merge(options) if scope[:options]
<ide>
<del> options.delete :shallow_p... | 1 |
PHP | PHP | fix cs and doc blocks | 117de2a24cb0885ea68b6564747cf84d62672e2b | <ide><path>src/Illuminate/Redis/PhpRedisDatabase.php
<ide> class PhpRedisDatabase extends Database
<ide> * Create a new Redis connection instance.
<ide> *
<ide> * @param array $servers
<add> * @return void
<ide> */
<ide> public function __construct(array $servers = [])
<ide> {
<ide> publ... | 4 |
Text | Text | fix broken links | 36506b7944cf9cea9b3618f00ecfc68a41f86dd8 | <ide><path>man/docker-daemon.8.md
<ide> multiple plugins installed, at least one must allow the request for it to
<ide> complete.
<ide>
<ide> For information about how to create an authorization plugin, see [authorization
<del>plugin](https://docs.docker.com/engine/extend/plugins_authorization.md) section in the
<add>... | 2 |
Ruby | Ruby | fix filesystem race condition | abd74308957b383777c6a391017d39097309fe07 | <ide><path>actionpack/test/controller/log_subscriber_test.rb
<ide> def setup
<ide>
<ide> @old_logger = ActionController::Base.logger
<ide>
<del> @cache_path = File.expand_path('../temp/test_cache', File.dirname(__FILE__))
<add> @cache_path = File.join Dir.tmpdir, Dir::Tmpname.make_tmpname('tmp', 'cache')
<i... | 1 |
Python | Python | add random graph generator | ba710054844fde4ccca666464c4bd08207e64a0d | <ide><path>graphs/random_graph_generator.py
<add>"""
<add>* Author: Manuel Di Lullo (https://github.com/manueldilullo)
<add>* Description: Random graphs generator.
<add> Uses graphs represented with an adjacency list.
<add>
<add>URL: https://en.wikipedia.org/wiki/Random_graph
<add>"""
<add>
<add>import ra... | 1 |
Text | Text | fix filehandle.truncate() sample codes | ac8226115e2192a7a46ba07789fa5136f74223e1 | <ide><path>doc/api/fs.md
<ide> console.log(fs.readFileSync('temp.txt', 'utf8'));
<ide> // Prints: Node.js
<ide>
<ide> async function doTruncate() {
<del> const fd = await fsPromises.open('temp.txt', 'r+');
<del> await fsPromises.ftruncate(fd, 4);
<add> let filehandle = null;
<add> try {
<add> filehandle = await... | 1 |
Javascript | Javascript | relax permissionsandroid enforcement | f6e1c164c2021fdaa8a8b0659dd341343594bd61 | <ide><path>Libraries/PermissionsAndroid/NativePermissionsAndroid.js
<ide> export interface Spec extends TurboModule {
<ide> ) => Promise<{[permission: PermissionType]: PermissionStatus}>;
<ide> }
<ide>
<del>export default TurboModuleRegistry.get<Spec>('PermissionsAndroid');
<add>export default TurboModuleRegistry.ge... | 2 |
Text | Text | update fips instructions in readme.md | d98eed51f782ea44c3fd7823b2912f7fb30ab185 | <ide><path>README.md
<ide> NOTE: Windows is not yet supported
<ide> It is possible to build io.js with
<ide> [OpenSSL FIPS module](https://www.openssl.org/docs/fips/fipsnotes.html).
<ide>
<add>**Note** that building in this way does **not** allow you to
<add>claim that the runtime is FIPS 140-2 validated. Instead you... | 1 |
Javascript | Javascript | fix merge issue | 249e7d56bb83337596ef24d4936682f5b8cf700e | <ide><path>lib/DefinePlugin.js
<ide> const {
<ide> const NullFactory = require("./NullFactory");
<ide>
<ide> /** @typedef {import("./Compiler")} Compiler */
<del>/** @typedef {import("./Parser")} Parser */
<add>/** @typedef {import("./JavascriptParser")} JavascriptParser */
<ide> /** @typedef {null|undefined|RegExp|Fu... | 1 |
Ruby | Ruby | improve doc of automatic inverse_of detection | 323cfe1aaaf82774503f72a51f91ef2c9b909a1b | <ide><path>activerecord/lib/active_record/associations.rb
<ide> def association_instance_set(name, association)
<ide> # #belongs_to associations.
<ide> #
<ide> # Extra options on the associations, as defined in the
<del> # <tt>AssociationReflection::INVALID_AUTOMATIC_INVERSE_OPTIONS</tt> constant... | 1 |
Go | Go | fix outdated comment | 137c8601a8c744d464855755ce756f07e83aa0b7 | <ide><path>registry/endpoint_v1.go
<ide> type V1Endpoint struct {
<ide> IsSecure bool
<ide> }
<ide>
<del>// NewV1Endpoint parses the given address to return a registry endpoint. v can be used to
<del>// specify a specific endpoint version
<add>// NewV1Endpoint parses the given address to return a registry endpoint.
... | 1 |
Java | Java | fix several typos | d747d5259280ad1c7a17415e51082c614d1b2ab7 | <ide><path>src/test/java/rx/internal/operators/OperatorOnBackpressureBufferTest.java
<ide> public void testFixBackpressureBufferNegativeCapacity() throws InterruptedExcept
<ide>
<ide> @Test(expected = IllegalArgumentException.class)
<ide> public void testFixBackpressureBufferZeroCapacity() throws InterruptedEx... | 2 |
Go | Go | convert dockerd to use cobra and pflag | fb83394714a9797f8ca5a08023a89560ce6c4aa3 | <ide><path>cli/flags/client.go
<ide> package flags
<ide>
<del>import flag "github.com/docker/docker/pkg/mflag"
<add>import (
<add> "github.com/spf13/pflag"
<add>)
<ide>
<ide> // ClientFlags represents flags for the docker client.
<ide> type ClientFlags struct {
<del> FlagSet *flag.FlagSet
<del> Common *CommonFla... | 15 |
Text | Text | update feluelle user in airflow inthewild users | 5e9589c685bcec769041e0a1692035778869f718 | <ide><path>INTHEWILD.md
<ide> Currently, **officially** using Airflow:
<ide> 1. [Arrive](https://www.arrive.com/)
<ide> 1. [Artelys](https://www.artelys.com/) [[@fortierq](https://github.com/fortierq)]
<ide> 1. [Asana](https://asana.com/) [[@chang](https://github.com/chang), [@dima-asana](https://github.com/dima-asana)... | 1 |
Ruby | Ruby | remove delegation test | d1987846b3857f49db8c15f2d1ae8dc8a14d8a2f | <ide><path>activerecord/test/cases/relations_test.rb
<ide> def test_presence
<ide> assert !Post.all.respond_to?(:by_lifo)
<ide> end
<ide>
<del> class OMGTopic < ActiveRecord::Base
<del> self.table_name = 'topics'
<add> test "merge collapses wheres from the LHS only" do
<add> left = Post.where(title: "om... | 1 |
Java | Java | support @cache* as merged composed annotations | 59c88eb3c0611aac802e162d53503ce71864baef | <ide><path>spring-context/src/main/java/org/springframework/cache/annotation/SpringCacheAnnotationParser.java
<ide> import org.springframework.cache.interceptor.CacheOperation;
<ide> import org.springframework.cache.interceptor.CachePutOperation;
<ide> import org.springframework.cache.interceptor.CacheableOperation;
<a... | 2 |
Go | Go | use opencontainers/go-digest package | 7a855799175b6b984886ef1cfa337d6df1d4c668 | <ide><path>api/types/reference/image_reference_test.go
<ide> package reference
<ide>
<ide> import (
<add> _ "crypto/sha256"
<ide> "testing"
<ide> )
<ide>
<ide><path>cli/command/image/trust.go
<ide> import (
<ide> "sort"
<ide>
<ide> "github.com/Sirupsen/logrus"
<del> "github.com/docker/distribution/digest"
<ide> ... | 53 |
Python | Python | fix scalar case for corrcoef | 9003457feff1a215d296a300dc8e2682fa797592 | <ide><path>numpy/lib/function_base.py
<ide> def corrcoef(x, y=None):
<ide> """The correlation coefficients
<ide> """
<ide> c = cov(x, y)
<del> d = diag(c)
<add> try:
<add> d = diag(c)
<add> except ValueError: # scalar covariance
<add> return 1
<ide> return c/sqrt(multiply.outer(d,... | 1 |
Ruby | Ruby | use -= in place of the expanded form | 132f3e2d37057eb4de13e32bf52c13097183c622 | <ide><path>actionpack/lib/action_view/helpers/number_helper.rb
<ide> def number_with_precision(number, options = {})
<ide> digits = (Math.log10(number.abs) + 1).floor
<ide> rounded_number = BigDecimal.new((number / 10 ** (digits - precision)).to_s).round.to_f * 10 ** (digits - precision)
<ide> ... | 1 |
Python | Python | remove an annoying line feed from skipif decorator | 9d849ede86cdb156a124722ce14abf1e985e6d0b | <ide><path>numpy/testing/decorators.py
<ide> def get_msg(func,msg=None):
<ide> if msg is None:
<ide> out = 'Test skipped due to test condition'
<ide> else:
<del> out = '\n'+msg
<add> out = msg
<ide>
<del> return "Skipping test: %s%s" % (f... | 1 |
Text | Text | update readme with escape sequence | 2e6a5bc7ee932b3d723ca4b0a319477310b12c34 | <ide><path>README.md
<ide> docker pull base
<ide> docker run -i -t base /bin/bash
<ide> ```
<ide>
<add>Detaching from the interactive shell
<add>------------------------------------
<add>```
<add># In order to detach without killing the shell, you can use the escape sequence Ctrl-p + Ctrl-q
<add># Note: this works onl... | 1 |
Ruby | Ruby | remove unused event_object_subscriber method | c816006a73dda484a9cd043f5d9e276e5dfc3213 | <ide><path>activesupport/lib/active_support/notifications/fanout.rb
<ide> def self.new(pattern, listener, monotonic)
<ide> wrap_all pattern, subscriber_class.new(pattern, listener)
<ide> end
<ide>
<del> def self.event_object_subscriber(pattern, block)
<del> wrap_all pattern, EventObje... | 1 |
Javascript | Javascript | fix apm bin path on appveyor | 748e61c88f4e688ec139dfe6d9e984f17fdbfcb0 | <ide><path>script/config.js
<ide> function isBuildingPR () {
<ide>
<ide> function getApmBinPath () {
<ide> const apmBinName = process.platform === 'win32' ? 'apm.cmd' : 'apm'
<del> return path.join(apmRootPath, 'node_modules', '.bin', apmBinName)
<add> return path.join(apmRootPath, 'node_modules', 'atom-package-ma... | 1 |
Python | Python | make openmp on windows optional | 5f699883dd5b68998846443d9d34faba79758ff6 | <ide><path>setup.py
<ide> # which is really known only after finalize_options
<ide> # http://stackoverflow.com/questions/724664/python-distutils-how-to-get-a-compiler-that-is-going-to-be-used
<ide> compile_options = {
<del> 'msvc': ['/Ox', '/EHsc', '/openmp'],
<add> 'msvc': ['/Ox', '/EHsc'],
<ide> 'mingw32' ... | 1 |
Javascript | Javascript | move no hits case into own component | 00e0f574dfbd431d714a0086e3803982e5a9a846 | <ide><path>client/src/components/search/searchBar/NoHitsSuggestion.js
<add>import React from 'react';
<add>import PropTypes from 'prop-types';
<add>
<add>const NoHitsSuggestion = ({ title, handleMouseEnter, handleMouseLeave }) => {
<add> return (
<add> <div
<add> className={'no-hits-footer fcc_suggestion_item'... | 3 |
PHP | PHP | fix import order | 01a79b4a9695999b5f7a24de1553916e70e233e5 | <ide><path>tests/TestCase/Auth/FallbackPasswordHasherTest.php
<ide> use Cake\Auth\DefaultPasswordHasher;
<ide> use Cake\Auth\FallbackPasswordHasher;
<ide> use Cake\Auth\WeakPasswordHasher;
<del>use Cake\Utility\Security;
<ide> use Cake\TestSuite\TestCase;
<add>use Cake\Utility\Security;
<ide>
<ide> /**
<ide> * Test c... | 1 |
Java | Java | fix non-deterministic test | a5d885d15164eda588d63170e1340a74579f0d83 | <ide><path>rxjava-core/src/test/java/rx/internal/util/RxRingBufferWithoutUnsafeTest.java
<ide> protected RxRingBuffer createRingBuffer() {
<ide> /**
<ide> * Single producer, 2 consumers. The request() ensures it gets scheduled back on the same Producer thread.
<ide> */
<del> @Test(timeout = 2000)
<add>... | 1 |
Ruby | Ruby | add which method | cc78050dc5607ac827429fe27686f71a7e77716c | <ide><path>Library/Homebrew/utils.rb
<ide> def puts_columns items, star_items=[]
<ide> end
<ide> end
<ide>
<add>def which cmd
<add> path = `/usr/bin/which #{cmd}`.chomp
<add> if path.empty?
<add> nil
<add> else
<add> Pathname.new(path)
<add> end
<add>end
<add>
<ide> def which_editor
<ide> editor = ENV['H... | 1 |
Python | Python | remove duplicate entry in __all__ | 6a1c30344b42d3fb49fa80e5a4e0d04493166f25 | <ide><path>celery/worker/state.py
<ide>
<ide> __all__ = ['SOFTWARE_INFO', 'reserved_requests', 'active_requests',
<ide> 'total_count', 'revoked', 'task_reserved', 'maybe_shutdown',
<del> 'task_accepted', 'task_ready', 'task_reserved', 'task_ready',
<del> 'Persistent']
<add> 'ta... | 1 |
Javascript | Javascript | move check into parse arc function | 139866dd3ff4b6a57074cd9c691aa4846393d3d6 | <ide><path>examples/jsm/loaders/SVGLoader.js
<ide> SVGLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
<ide> }
<ide>
<ide> break;
<del>
<add>
<ide> case 'L':
<ide> var numbers = parseFloats( data );
<ide>
<ide> SVGLoader.prototype = Object.assign( Object.create( Loader.pr... | 1 |
Python | Python | fix mape objective | 32f483fe33fc9ff5474067b4a284616def479d8f | <ide><path>keras/objectives.py
<ide> def mean_absolute_error(y_true, y_pred):
<ide> return T.abs_(y_pred - y_true).mean(axis=-1)
<ide>
<ide> def mean_absolute_percentage_error(y_true, y_pred):
<del> return T.abs_((y_true - y_pred) / y_true).mean() * 100
<add> return T.abs_((y_true - y_pred) / y_true).mean(ax... | 1 |
Text | Text | add docs for catch all routes | 23a04e466c9c82ad6a6ef0fd9c46102d7512bbe3 | <ide><path>docs/routing/dynamic-routes.md
<ide> Multiple dynamic route segments work the same way. The page `pages/post/[pid]/[c
<ide>
<ide> Client-side navigations to a dynamic route can be handled with [`next/link`](/docs/api-reference/next/link.md#dynamic-routes).
<ide>
<add>### Catch all routes
<add>
<add>Dynamic... | 2 |
Mixed | Python | fix reversions plus a few improvements | 50ec3371b10a6eaafe73b903760eb43c869ea285 | <ide><path>slim/README.md
<ide> Model | TF-Slim File | Checkpoint | Top-1 Accuracy| Top-5 Accuracy |
<ide> [Inception V2](http://arxiv.org/abs/1502.03167)|[Code](https://github.com/tensorflow/models/blob/master/slim/nets/inception_v2.py)|[inception_v2_2016_08_28.tar.gz](http://download.tensorflow.org/models/inception_v... | 3 |
PHP | PHP | fix typos and cs | d0cbb90a310b6842c80867c9ab3d83be5b866c8f | <ide><path>src/Database/Type/DateTimeType.php
<ide> class DateTimeType extends \Cake\Database\Type
<ide> protected $_useLocaleParser = false;
<ide>
<ide> /**
<del> * The date formate to use for parsing incoming dates for marshalling.
<add> * The date format to use for parsing incoming dates for marshal... | 2 |
Ruby | Ruby | mind the order of things | 74b7bfa6d2c5c777b11cb6ea8687c0461b579f7e | <ide><path>activerecord/lib/active_record/connection_adapters/frontbase_adapter.rb
<ide> def native_database_types #:nodoc
<ide> # Quotes the column value to help prevent
<ide> # {SQL injection attacks}[http://en.wikipedia.org/wiki/SQL_injection].
<ide> def quote(value, column = nil)
<add> retu... | 5 |
Text | Text | add changelog entry for precompile config | a3913ca3ba0141d58e2e8c89dad268245e19ddb7 | <ide><path>actionpack/CHANGELOG.md
<ide> ## Rails 4.0.0 (unreleased) ##
<ide>
<add>* Only non-js/css under app/assets path will be included in default config.assets.precompile.
<add>
<add> *Josh Peek*
<add>
<ide> * Remove support for the RAILS_ASSET_ID environment configuration
<ide> (no longer needed now t... | 1 |
Python | Python | add more info to the docstrings | dd804f25dac715c399ad805e116d36c952612207 | <ide><path>libcloud/storage/drivers/s3.py
<ide> def delete_object(self, obj):
<ide> def ex_iterate_multipart_uploads(self, container, prefix=None,
<ide> delimiter=None):
<ide> """
<del> Extension method for listing all S3 multipart uploads.
<add> Extension ... | 1 |
Text | Text | add a new blog post about mixins | b0136b37c5dc7ea25fff139dd74397a6ef140b35 | <ide><path>docs/_posts/2016-07-13-mixins-considered-harmful.md
<add>---
<add>title: "Mixins Considered Harmful"
<add>author: gaearon
<add>---
<add>
<add>“How do I share the code between several components?” is one of the first questions that people ask when they learn React. Our answer has always been to use component ... | 1 |
PHP | PHP | fix wrong docblock | 5797f2f41dba876f1597bb552eda8be9e4e4bc97 | <ide><path>src/TestSuite/Constraint/Console/ContentsBase.php
<ide> abstract class ContentsBase extends Constraint
<ide> /**
<ide> * Constructor
<ide> *
<del> * @param int $contents Contents
<add> * @param array $contents Contents
<ide> * @param string $output Output type
<ide> */
<ide> ... | 1 |
Javascript | Javascript | provide support for staggering animations with css | 74848307443c00ab07552336c56ddfa1e9ef6eff | <ide><path>src/ngAnimate/animate.js
<ide> * immediately resulting in a DOM element that is at its final state. This final state is when the DOM element
<ide> * has no CSS transition/animation classes applied to it.
<ide> *
<add> * <h3>CSS Staggering Animations</h3>
<add> * A Staggering animation is a collection of a... | 2 |
PHP | PHP | unskip test for sqlserver and belongstomany | a12b65dd77426495313087c7442180927c22a15d | <ide><path>tests/TestCase/ORM/Association/BelongsToManyTest.php
<ide> public function testReplaceLinkFailingDomainRules()
<ide> */
<ide> public function testReplaceLinkBinaryUuid()
<ide> {
<del> $this->skipIf(
<del> ConnectionManager::get('test')->getDriver() instanceof \Cake\Database\Dri... | 1 |
Python | Python | fix resnet lr comment | e7957b7f4a51b871578cc96808b5568ce8ce78b5 | <ide><path>official/resnet/resnet_run_loop.py
<ide> def learning_rate_with_decay(
<ide> initial_learning_rate = 0.1 * batch_size / batch_denom
<ide> batches_per_epoch = num_images / batch_size
<ide>
<del> # Multiply the learning rate by 0.1 at 100, 150, and 200 epochs.
<add> # Reduce the learning rate at certain... | 1 |
PHP | PHP | update behavior generation and some internals | eea446891576259802cdb7aaed8001abfde0eabd | <ide><path>src/Console/Command/Task/ModelTask.php
<ide> public function generate($name) {
<ide> $displayField = $this->getDisplayField($model);
<ide> $fields = $this->getFields($model);
<ide> $validation = $this->getValidation($model);
<add> $behaviors = $this->getBehaviors($model);
<ide>
<del> $this->bake($ob... | 2 |
Python | Python | use string name in setup.py | a8416c46f74a6a9d159090ad6dbc644cd6d40e92 | <ide><path>setup.py
<ide> def setup_package():
<ide> generate_cython(root, "spacy")
<ide>
<ide> setup(
<del> name=about["__title__"],
<add> name="spacy",
<ide> zip_safe=False,
<ide> packages=PACKAGES,
<ide> package_data=PACKAGE_DATA, | 1 |
Javascript | Javascript | use local bootstrap css | cfe7b0e9efbcbc4d6dafef568895be265842c071 | <ide><path>src/ng/directive/ngShowHide.js
<ide> var NG_HIDE_IN_PROGRESS_CLASS = 'ng-hide-animate';
<ide> </div>
<ide> </file>
<ide> <file name="glyphicons.css">
<del> @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);
<add> @import url(../../components/bootstrap... | 1 |
Javascript | Javascript | hoist exports declarations too | a44694aa4e6369892f2fa455b15c1d19a13d1f56 | <ide><path>lib/Parser.js
<ide> Parser.prototype.walkStatements = function walkStatements(statements) {
<ide> Parser.prototype.isHoistedStatement = function isHoistedStatement(statement) {
<ide> switch(statement.type) {
<ide> case "ImportDeclaration":
<add> case "ExportAllDeclaration":
<add> case "ExportNamedDeclar... | 4 |
Text | Text | add a note about hover options | 81e28c9895ad685b2b567a5de4b70ea591d275ae | <ide><path>docs/docs/general/interactions/index.md
<ide> The interaction configuration is passed into the `options.interaction` namespace
<ide> | `mode` | `string` | `'nearest'` | Sets which elements appear in the tooltip. See [Interaction Modes](./modes.md#interaction-modes) for details.
<ide> | `intersect` | `boolean... | 1 |
PHP | PHP | filter optional | b38bb6bc6d0dd831a334f8bbde6bd757bee694cb | <ide><path>src/Illuminate/Support/Collection.php
<ide> public function fetch($key)
<ide> /**
<ide> * Run a filter over each of the items.
<ide> *
<del> * @param callable $callback
<add> * @param callable|null $callback
<ide> * @return static
<ide> */
<del> public function filter(c... | 2 |
Javascript | Javascript | use dasherizedmodulename for test description | 06e86935339148ecc18d91fd76484d3b3a90100f | <ide><path>blueprints/controller-test/index.js
<ide> 'use strict';
<ide>
<ide> const stringUtil = require('ember-cli-string-utils');
<del>const testInfo = require('ember-cli-test-info');
<ide>
<ide> const useTestFrameworkDetector = require('../test-framework-detector');
<ide>
<ide> module.exports = useTestFrameworkD... | 1 |
PHP | PHP | throw exception for unsafe order() usage | 4a04aedeed9cab7532eb5f3bde1ab2faaeaee87e | <ide><path>src/Database/Expression/OrderByExpression.php
<ide>
<ide> use Cake\Database\ExpressionInterface;
<ide> use Cake\Database\ValueBinder;
<add>use RuntimeException;
<ide>
<ide> /**
<ide> * An expression object for ORDER BY clauses
<ide> public function sql(ValueBinder $generator): string
<ide> */
<ide> ... | 2 |
Python | Python | add example to compare relu with selu | 8d5b2ce60c21a0c18c00610dda41687b42fd5c13 | <ide><path>examples/reuters_mlp_relu_vs_selu.py
<add>'''Compares self-normalizing MLPs with regular MLPs.
<add>
<add>Compares the performance of a simple MLP using two
<add>different activation functions: RELU and SELU
<add>on the Reuters newswire topic classification task.
<add>
<add># Reference:
<add> Klambauer, G.,... | 1 |
Python | Python | catch eof error while readin glances version file | faa7edfd64c09889c34b4a439b9455e9f0f120fd | <ide><path>glances/outdated.py
<ide> def _load_cache(self):
<ide> try:
<ide> with open(os.path.join(self._cache_path(), 'glances-version.db'), 'rb') as f:
<ide> cached_data = pickle.load(f)
<del> except IOError as e:
<add> except (EOFError, IOError) as e:
<ide> ... | 1 |
Go | Go | ensure timestamps set for metadata commands | 1a2bd3cf7dab6f4e2e96a44fe2084bc06044802b | <ide><path>builder/builder-next/exporter/writer.go
<ide> func normalizeLayersAndHistory(diffs []digest.Digest, history []ocispec.History,
<ide> history[i] = h
<ide> }
<ide>
<add> // Find the first new layer time. Otherwise, the history item for a first
<add> // metadata command would be the creation time of a base ... | 1 |
PHP | PHP | fix code standards | fd5a8a8d6b1557df4fc0c2cd1256e874bdb2dd21 | <ide><path>lib/Cake/Test/Case/Utility/CakeTimeTest.php
<ide> public function testTimeAgoInWords() {
<ide> $result = $this->Time->timeAgoInWords('+1 week');
<ide> $this->assertEquals('On ' . date('l d/m, H:i', strtotime('+1 week')), $result);
<ide>
<del> $result = $this->Time->timeAgoInWords(strtotime('+4 months +... | 1 |
Python | Python | set version to v3.0.0.dev13 | 52338a07bba66da549a55391747d74a4a7e6aba3 | <ide><path>spacy/about.py
<ide> # fmt: off
<ide> __title__ = "spacy"
<del>__version__ = "3.0.0.dev12"
<add>__version__ = "3.0.0.dev13"
<ide> __release__ = True
<ide> __download_url__ = "https://github.com/explosion/spacy-models/releases/download"
<ide> __compatibility__ = "https://raw.githubusercontent.com/explosion/sp... | 1 |
Mixed | Javascript | improve error messages | 2d9e87695e16d80ecffc8eab50e9fe1dfa7005f5 | <ide><path>doc/api/assert.md
<ide> For more information about the used equality comparisons see
<ide> <!-- YAML
<ide> added: REPLACEME
<ide> changes:
<add> - version: REPLACEME
<add> pr-url: https://github.com/nodejs/node/pull/REPLACEME
<add> description: Added error diffs to the strict mode
<ide> - version: R... | 4 |
Ruby | Ruby | reduce thread locals | e4de78aec504b885d40c0244ce3222c05ca3dc2e | <ide><path>activesupport/lib/active_support/notifications.rb
<ide> module ActiveSupport
<ide> module Notifications
<ide> @instrumenters = Hash.new { |h,k| h[k] = notifier.listening?(k) }
<ide>
<add> class Registry # :nodoc:
<add> def self.instance
<add> Thread.current[name] ||= new
<add> end
... | 1 |
Python | Python | improve docs on providers and types | caeeeee2846f172c3216be9856b1f726180b331c | <ide><path>libcloud/providers.py
<ide> }
<ide>
<ide> def get_driver(provider):
<add> """ Gets a driver
<add> @param provider: Id of provider to get driver
<add> @type provider: L{libcloud.types.Provider}
<add> """
<ide> if provider in DRIVERS:
<ide> mod_name, driver_name = DRIVERS[provider]
<id... | 2 |
Javascript | Javascript | add more options to threejs-lesson-utils | 65d6bb7ba09261858930ab4a19781a640739ee32 | <ide><path>threejs/lessons/resources/threejs-lesson-utils.js
<ide> window.threejsLessonUtils = {
<ide> this.init();
<ide>
<ide> const scene = new THREE.Scene();
<del> const fov = 60;
<add> let targetFOVDeg = 60;
<ide> const aspect = 1;
<ide> const zNear = 0.1;
<ide> const zFar = 50;
<del> ... | 1 |
Python | Python | use numpy version for f2py version | 8a6bcbcfe8db6cf2fd784631b480d5865077ad98 | <ide><path>numpy/f2py/__version__.py
<del>major = 2
<del>
<del>try:
<del> from __svn_version__ import version
<del> version_info = (major, version)
<del> version = '%s_%s' % version_info
<del>except (ImportError, ValueError):
<del> version = str(major)
<add>from numpy.version import version
<ide><path>numpy... | 6 |
Text | Text | create separate instruction | fab60e7faad8421be639c0887740489244079dc0 | <ide><path>docs/build-instructions/windows.md
<ide> * [Python 2.7.x](http://www.python.org/download/)
<ide> * [GitHub for Windows](http://windows.github.com/)
<ide> * Open the Windows GitHub shell (NOT the Standard PowerShell, the shortcut labeled 'Git Shell' - make sure you have logged in at least once to the Gi... | 1 |
PHP | PHP | fix exception handling | e2b48c006965ccce5c0a98b11a974c97cf410198 | <ide><path>src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php
<ide> trait InteractsWithExceptionHandling
<ide> {
<ide> /**
<del> * The previous exception handler.
<add> * The original exception handler.
<ide> *
<ide> * @var ExceptionHandler|null
<ide> */
<del> pr... | 1 |
Text | Text | add vsts ci badge to readme.md | 2f15551ec23cd4868b67bbccc21ff1ceebd42d71 | <ide><path>README.md
<ide> 
<ide>
<del>[](https://circleci.com/gh/atom/atom) [ use outside of constructor" issues | 81a375b24351dc90db40b55f4fee4ce1b75c0ec2 | <ide><path>packages/ember-glimmer/tests/integration/components/closure-components-test.js
<ide> moduleFor('@htmlbars Components test: closure components', class extends Renderi
<ide>
<ide> class ClosureComponentMutableParamsTest extends RenderingTest {
<ide> render(templateStr, context = {}) {
<del> super(`${temp... | 5 |
Text | Text | remove unnecessary whitespace | e7ba7c3b95be4f46d7d27fcfd82dd4865c159393 | <ide><path>guides/source/rails_application_templates.md
<ide> CODE
<ide> These methods let you ask questions from templates and decide the flow based on the user’s answer. Lets say you want to freeze rails only if the user want to:
<ide>
<ide> ```ruby
<del>rake("rails:freeze:gems") if yes?("Freeze rails gems ?")
<add>... | 1 |
Javascript | Javascript | fix doc typo | 96522474290fd46353045b1655febf349843fba2 | <ide><path>packages/ember-handlebars/lib/helpers/binding.js
<ide> var helpers = EmberHandlebars.helpers;
<ide>
<ide> (function() {
<ide> // Binds a property into the DOM. This will create a hook in DOM that the
<del> // KVO system will look for and upate if the property changes.
<add> // KVO system will look for a... | 1 |
Javascript | Javascript | update permissionsandroid docs to use new apis | 9338fbd7810e8b7b3b0cfe467ca63601b8f43d50 | <ide><path>Libraries/PermissionsAndroid/PermissionsAndroid.js
<ide> type PermissionStatus = 'granted' | 'denied' | 'never_ask_again';
<ide> * permissions.
<ide> *
<ide> * On devices before SDK version 23, the permissions are automatically granted
<del> * if they appear in the manifest, so `checkPermission` and `requ... | 1 |
Python | Python | fix 'from_native' method when rel is none | 756297ad1d07f56459471bff041828850ace0496 | <ide><path>rest_framework/fields.py
<ide> def __init__(self, *args, **kwargs):
<ide> def from_native(self, value):
<ide> try:
<ide> rel = self.model_field.rel
<add> return rel.to._meta.get_field(rel.field_name).to_python(value)
<ide> except:
<ide> return self.model... | 1 |
Ruby | Ruby | add docs for `rails.env` and `rails.env=` | a770d7e404f994d717843035eba9c1094a6e90d8 | <ide><path>railties/lib/rails.rb
<ide> def root
<ide> application && application.config.root
<ide> end
<ide>
<add> # Returns the current Rails environment.
<add> #
<add> # Rails.env # => "development"
<add> # Rails.env.development? # => true
<add> # Rails.env.production? # => false
<ide>... | 1 |
Ruby | Ruby | remove initialize method | 70e48a6ac34615ba5ed3b807917c3b099256d67c | <ide><path>activerecord/lib/active_record/associations/preloader/through_association.rb
<ide> module ActiveRecord
<ide> module Associations
<ide> class Preloader
<ide> module ThroughAssociation #:nodoc:
<del> def initialize(klass, owners, reflection, preload_scope)
<del> super
<del> e... | 1 |
Mixed | Javascript | fix auto refresh for graph view | 64622929a043436b235b9fb61fb076c5d2e02124 | <ide><path>airflow/www/static/js/graph.js
<ide> function handleRefresh() {
<ide> // only refresh if the data has changed
<ide> if (prevTis !== tis) {
<ide> // eslint-disable-next-line no-global-assign
<del> taskInstances = JSON.parse(tis);
<del> updateNodesStates(taskInstances)... | 2 |
Javascript | Javascript | add test for buffer.slice | 2f7234d89c3b7e17d6cf341ab12aaffebb337470 | <ide><path>test/simple/test-buffer-slice.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 restr... | 1 |
Java | Java | expose prestartallcorethreads on executorservice | 2c53e9e308dc39c5988c014a12d32917f0b5528d | <ide><path>spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java
<ide> public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport
<ide>
<ide> private int keepAliveSeconds = 60;
<ide>
<del> private boolean allowCoreThreadTimeOut = false;
<del>
<... | 2 |
Javascript | Javascript | add benchmark for fspromises.writefile | a97f01ea8cb3b421dfe70c0271b9b37e549b8b0b | <ide><path>benchmark/fs/writefile-promises.js
<add>// Call fs.promises.writeFile over and over again really fast.
<add>// Then see how many times it got called.
<add>// Yes, this is a silly benchmark. Most benchmarks are silly.
<add>'use strict';
<add>
<add>const path = require('path');
<add>const common = require('..... | 1 |
Javascript | Javascript | remove a duplicate file in angularfiles.js | 8c269883fd4353414ea5b6cf77c80bfa54a4ae2f | <ide><path>angularFiles.js
<ide> angularFiles = {
<ide> 'src/ngScenario/Describe.js',
<ide> 'src/ngScenario/Future.js',
<ide> 'src/ngScenario/ObjectModel.js',
<del> 'src/ngScenario/Describe.js',
<ide> 'src/ngScenario/Runner.js',
<ide> 'src/ngScenario/SpecRunner.js',
<ide> 'src/ngScenario/dsl.... | 1 |
Ruby | Ruby | fix typo on method name | 3f866cbdabaa2f85c5aef754aa9a3127c99fba20 | <ide><path>activejob/lib/active_job/test_helper.rb
<ide> def assert_enqueued_with(args = {}, &_block)
<ide> serialized_args.all? { |key, value| value == job[key] }
<ide> end
<ide> assert matching_job, "No enqueued job found with #{args}"
<del> instanciate_job(matching_job)
<add> ... | 1 |
Python | Python | remove two todo notes that got outdated | 3139a881346ff7ad4326ecd296e6eeddf6c268a0 | <ide><path>numpy/core/tests/test_datetime.py
<ide> def test_different_unit_comparison(self):
<ide> casting='unsafe'))
<ide>
<ide> # Shouldn't be able to compare datetime and timedelta
<del> # TODO: Changing to 'same_kind' or 'safe' casting in the ufuncs by
<del> # defau... | 2 |
Javascript | Javascript | normalize controller lookup, fix | 532dec210363bc7f412eb2ac5bef9e8a9adc52fd | <ide><path>packages/container/lib/main.js
<ide> define("container",
<ide> register: function(type, name, factory, options) {
<ide> var fullName;
<ide>
<del>
<ide> if (type.indexOf(':') !== -1){
<ide> options = factory;
<ide> factory = name;
<ide> define("container",
<ide> ... | 5 |
PHP | PHP | add tests for gh-558 | 381e5b10bc4041038e14a4825212f340a620671b | <ide><path>lib/Cake/Test/Case/View/Helper/FormHelperTest.php
<ide> public function testFormSecurityArrayFields() {
<ide> $this->Form->create('Address');
<ide> $this->Form->input('Address.primary.1');
<ide> $this->assertEquals('Address.primary', $this->Form->fields[0]);
<add>
<add> $this->Form->input('Address.sec... | 1 |
Go | Go | add parent img refcount for faster rmi | 292a1564dca2f32b9158a6886fadee1cc184f987 | <ide><path>graph/graph.go
<ide> type Graph struct {
<ide> imageMutex imageMutex // protect images in driver.
<ide> retained *retainedLayers
<ide> tarSplitDisabled bool
<add>
<add> parentRefs map[string]int
<add> parentRefsMutex sync.Mutex
<ide> }
<ide>
<ide> // file names for ./graph/<ID>/
<ide> ... | 2 |
Javascript | Javascript | use standard for loop instead of for..of | ad6cd7fa9cd31d6997bd7505e5b77587441491c4 | <ide><path>lib/internal/streams/duplex.js
<ide> ObjectSetPrototypeOf(Duplex.prototype, Readable.prototype);
<ide> ObjectSetPrototypeOf(Duplex, Readable);
<ide>
<ide> {
<add> const keys = ObjectKeys(Writable.prototype);
<ide> // Allow the keys array to be GC'ed.
<del> for (const method of ObjectKeys(Writable.protot... | 1 |
PHP | PHP | add operator support to collection@where | 83c3c56df9ec1ee764134021ce055db7bdc26038 | <ide><path>src/Illuminate/Support/Collection.php
<ide> public function filter(callable $callback = null)
<ide> * Filter items by the given key value pair.
<ide> *
<ide> * @param string $key
<add> * @param mixed $operator
<ide> * @param mixed $value
<del> * @param bool $strict
<ide> ... | 2 |
Text | Text | update maintainer documentation | 1b609ceeb344512319edc50ff72e0d0026f702a7 | <ide><path>docs/Maintainer-Guidelines.md
<ide> This document is current practice. If you wish to change or discuss any of the b
<ide>
<ide> ## Mission
<ide>
<del>Homebrew aims to be the missing package manager for macOS. Its primary goal is to be useful to as many people as possible, while remaining maintainable to a... | 4 |
Mixed | Javascript | add `imagesizes` and `imagesrcset` to know props | ca106a02d1648f4f0048b07c6b88f69aac175d3c | <ide><path>fixtures/attribute-behavior/AttributeTableSnapshot.md
<ide> | `imageRendering=(null)`| (initial)| `<null>` |
<ide> | `imageRendering=(undefined)`| (initial)| `<null>` |
<ide>
<add>## `imageSizes` (on `<link>` inside `<div>`)
<add>| Test Case | Flags | Result |
<add>| --- | --- | --- |
<add>| `imageSizes=(st... | 3 |
Python | Python | use absolute import style | 3032a06c9bd8cc98387b14f7feceb1f5d76041fd | <ide><path>rest_framework/authtoken/admin.py
<ide> from django.contrib import admin
<del>from .models import Token
<add>from rest_framework.authtoken.models import Token
<ide>
<ide>
<ide> class TokenAdmin(admin.ModelAdmin): | 1 |
Javascript | Javascript | use regular require paths | bdebe575b7d5faeafcc2b99f598904328bfa2fbd | <ide><path>static/index.js
<ide> window.onload = function() {
<del> var path = require('path');
<ide> var ipc = require('ipc');
<ide> try {
<ide> // Skip "?loadSettings=".
<ide> window.onload = function() {
<ide>
<ide> require('vm-compatibility-layer');
<ide> require('coffee-script').register();
<del>... | 1 |
Javascript | Javascript | harmonize progress bar + stderr output | 4b841cb0b6d765813a02f9b348f9ff04854ee969 | <ide><path>benchmark/_benchmark_progress.js
<ide> class BenchmarkProgress {
<ide> `| ${fraction(completedFiles, scheduledFiles)} files ` +
<ide> `| ${fraction(completedRunsForFile, runsPerFile)} runs ` +
<ide> `| ${fraction(completedConfig, scheduledConfig)} configs]` +
<del> `: $... | 1 |
Javascript | Javascript | fix datepickerios e2e tests | 8270de9c2cfad721b554201ab97d645ffbfdc84b | <ide><path>RNTester/e2e/__tests__/DatePickerIOS-test.js
<ide> describe('DatePickerIOS', () => {
<ide> it('Should change indicator with datetime picker', async () => {
<ide> await openExampleWithTitle('Date and time picker');
<ide> const testID = 'date-and-time';
<del> const indicatorID = 'date-and-time-ind... | 2 |
Javascript | Javascript | implement identifierprefix option for useid | 4729ff6d1f191902897927ff4ecd3d1f390177fa | <ide><path>packages/react-art/src/ReactART.js
<ide> class Surface extends React.Component {
<ide>
<ide> this._surface = Mode.Surface(+width, +height, this._tagRef);
<ide>
<del> this._mountNode = createContainer(this._surface, LegacyRoot, false, null);
<add> this._mountNode = createContainer(
<add> this... | 21 |
Javascript | Javascript | use worker scope in wpt | 2742f3869a540b01ed51ca91075af9215c13bd54 | <ide><path>test/common/wpt.js
<ide> class WPTRunner {
<ide> sandbox.self = sandbox;
<ide> // TODO(joyeecheung): we are not a window - work with the upstream to
<ide> // add a new scope for us.
<del> sandbox.document = {}; // Pretend we are Window
<add>
<add> const { Worker } = require('worker_threads... | 3 |
PHP | PHP | fix typeerror on invalid base64 data | e9c9bbcc55e052ebbdf7408f096a5983c6b4f552 | <ide><path>src/Http/Middleware/CsrfProtectionMiddleware.php
<ide> protected function _verifyToken(string $token): bool
<ide> } else {
<ide> $decoded = base64_decode($token, true);
<ide> }
<del> if (strlen($decoded) <= static::TOKEN_VALUE_LENGTH) {
<add> if (!$decoded || strlen(... | 2 |
Javascript | Javascript | fix path for schedulerfeatureflags | 13a62feab8c39bc0292eb36d636af0bb4f3a78df | <ide><path>packages/scheduler/src/forks/SchedulerFeatureFlags.www.js
<ide> export const {
<ide> enableIsInputPending,
<ide> enableSchedulerDebugging,
<ide> enableProfiling: enableProfilingFeatureFlag,
<del>} = require('packages/scheduler/src/SchedulerFeatureFlags');
<add>} = require('SchedulerFeatureFlags');
<ide... | 1 |
Ruby | Ruby | fix an ar test of schema dump when using oracle | 569cd97c80de95154312a0b33596211e55722a9e | <ide><path>activerecord/test/cases/comment_test.rb
<ide> def test_schema_dump_with_comments
<ide> assert_match %r[t\.string\s+"name",\s+comment: "Comment should help clarify the column purpose"], output
<ide> assert_match %r[t\.string\s+"obvious"\n], output
<ide> assert_match %r[t\.string\s+"content",... | 1 |
Javascript | Javascript | remove global store (#908) | ee717af0889312cc6cc6337da0d405356a5a2a58 | <ide><path>examples/with-redux/store.js
<ide> export const startClock = () => dispatch => {
<ide> return setInterval(() => dispatch({ type: 'TICK', light: true, ts: Date.now() }), 800)
<ide> }
<ide>
<add>let store = null
<add>
<ide> export const initStore = (reducer, initialState, isServer) => {
<ide> if (isServer... | 1 |
PHP | PHP | add doc block return | 11f410a3439f47efb60f19cf100e719e461fd75b | <ide><path>src/Illuminate/Http/Resources/Json/ResourceCollection.php
<ide> public function __construct($resource)
<ide>
<ide> /**
<ide> * Indicate that all current query parameters should be appended to pagination links.
<add> *
<add> * @return $this
<ide> */
<ide> public function preserveQue... | 1 |
Javascript | Javascript | clarify value and constant injectability | 67a98112e424f5c6a490bc8719f01057ff110ba4 | <ide><path>src/auto/injector.js
<ide> function annotate(fn, strictDi, name) {
<ide> * @description
<ide> *
<ide> * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a
<del> * number, an array, an object or a function. This is short for registering a service where its
<add> * ... | 1 |
PHP | PHP | fix missing default values for datetime/timestamp | f5a4c3b84958b9057ac6d6acf5b2a0a385e0be51 | <ide><path>src/Database/Schema/MysqlSchema.php
<ide> public function columnSql(Table $table, $name)
<ide> $out .= ' NULL';
<ide> unset($data['default']);
<ide> }
<del> if (isset($data['default']) && !in_array($data['type'], ['timestamp', 'datetime'])) {
<del> $out .= ' ... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.