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 |
|---|---|---|---|---|---|
Ruby | Ruby | fix typo in time#change docs | fefa4018cb3c6ef731a80dc58587387ff75b224c | <ide><path>activesupport/lib/active_support/core_ext/time/calculations.rb
<ide> def seconds_until_end_of_day
<ide> # and minute is passed, then sec, usec and nsec is set to 0. The +options+
<ide> # parameter takes a hash with any of these keys: <tt>:year</tt>, <tt>:month</tt>,
<ide> # <tt>:day</tt>, <tt>:hour</tt... | 1 |
Javascript | Javascript | improve the @usage example | 85c31e068821f412128d98265ed439a725400528 | <ide><path>src/ng/directive/ngSwitch.js
<ide> * ngSwitchWhen or ngSwitchDefault directives will be preserved at the location
<ide> * as specified in the template
<ide> *
<del> * @usageContent
<del> * <ANY ng-switch-when="matchValue1">...</ANY>
<add> * @usage
<add> * <ANY ng-switch="expression">
<add> * <ANY ng-swi... | 1 |
Javascript | Javascript | remove most usage of innerhtml | eb8f802391392406ad9801a76934aa7a98dd1bdb | <ide><path>src/js/button.js
<ide> import Component from './component';
<ide> import log from './utils/log.js';
<ide> import {assign} from './utils/obj';
<ide> import keycode from 'keycode';
<add>import {createEl} from './utils/dom.js';
<ide>
<ide> /**
<ide> * Base class for all buttons.
<ide> class Button extends Cli... | 15 |
Python | Python | add test for hash consistency | 3fa5b40b5cace40a5b8fde8112354abce6488b77 | <ide><path>spacy/tests/stringstore/test_stringstore.py
<ide> import pytest
<ide>
<ide>
<add>def test_string_hash(stringstore):
<add> '''Test that string hashing is stable across platforms'''
<add> ss = stringstore
<add> assert ss.add('apple') == 8566208034543834098
<add> heart = '\U0001f499'
<add> prin... | 1 |
Javascript | Javascript | run all tests | ca37eaeba4106f473da45510da10d474e8022f65 | <ide><path>test/Redux.spec.js
<ide> describe('Redux', () => {
<ide> expect(redux.dispatchFn).toBeA('function');
<ide> });
<ide>
<del> it.only('should subscribe to changes', done => {
<add> it('should subscribe to changes', done => {
<ide> let state = redux.getState();
<ide> expect(state.fakeStore).toEq... | 1 |
Text | Text | fix broken links in deprecations.md | 2f6bf7a79124e76792c7bbdf344009e214bd051b | <ide><path>doc/api/deprecations.md
<ide> The [`crypto.Certificate()` constructor][] is deprecated. Use
<ide> [`response.connection`]: http.html#http_response_connection
<ide> [`response.end()`]: http.html#http_response_end_data_encoding_callback
<ide> [`response.finished`]: http.html#http_response_finished
<del>[`respo... | 1 |
PHP | PHP | add tests for testsession | 13926504497cd18dbbf9756531e954f5995d86bf | <ide><path>src/TestSuite/TestSession.php
<ide> public function check(?string $name = null): bool
<ide> return false;
<ide> }
<ide>
<add> if ($name === null) {
<add> return (bool)$this->session;
<add> }
<add>
<ide> return Hash::get($this->session, $name) !== null;
<i... | 2 |
Javascript | Javascript | put everything else back | b18ca74e498c4e9e6d6e1eaf9ca9e91152e18620 | <ide><path>script/lib/include-path-in-packaged-app.js
<ide> const EXCLUDE_REGEXPS_SOURCES = [
<ide> escapeRegExp(path.join('build', 'Release', 'obj.target')),
<ide> escapeRegExp(path.join('build', 'Release', 'obj')),
<ide> escapeRegExp(path.join('build', 'Release', '.deps')),
<add> escapeRegExp(path.join('deps',... | 1 |
Text | Text | add v3.5.0-beta.1 to changelog | 428e41e864a2b109174b1c5111b2e10619a3c62d | <ide><path>CHANGELOG.md
<ide> # Ember Changelog
<ide>
<add>### v3.5.0-beta.1 (August 28, 2018)
<add>
<add>- [#16877](https://github.com/emberjs/ember.js/pull/16877) [CLEANUP] Allow routes to be named "array" and "object"
<add>- [#16907](https://github.com/emberjs/ember.js/pull/16907) Upgrade to TypeScript 3.0
<add>
<i... | 1 |
Ruby | Ruby | fix a warning in prototype_helper_test, fixes | 984312cf85d40b9fae9e88dfc80ae61f085b36d1 | <ide><path>actionpack/lib/action_view/helpers/prototype_helper.rb
<ide> def update_page_tag(&block)
<ide>
<ide> protected
<ide> def loop_on_multiple_args(method, ids)
<del> record (if ids.size>1
<del> "#{javascript_object_for(ids)}.each(#{method})"
<del> else
<del> "#{method}... | 1 |
Ruby | Ruby | optimize active record batching | 2a42f444305a2413d1e3a78d5cecebe045901a94 | <ide><path>activerecord/lib/active_record/relation/batches.rb
<ide> def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore:
<ide> end
<ide>
<ide> relation = relation.reorder(batch_order(order)).limit(batch_limit)
<del> relation = apply_limits(relation, start, finish, order)
<de... | 4 |
Javascript | Javascript | remove the callback from node.cat, node.fs.cat | e8a5d3d31141cca1bda02acd579da5a6eb5e4a44 | <ide><path>src/file.js
<ide> node.fs.exists = function (path, callback) {
<ide> p.addErrback(function () { callback(false); });
<ide> }
<ide>
<del>node.fs.cat = function (path, encoding, callback) {
<add>node.fs.cat = function (path, encoding) {
<ide> var open_promise = node.fs.open(path, node.O_RDONLY, 0666);
<id... | 2 |
Text | Text | fix ubuntu installation instructions page | eb0a208f4bad5623e360fa936bfd230cd72414c4 | <ide><path>docs/installation/ubuntulinux.md
<ide> your `apt` sources to the new Docker repository.
<ide> Docker's `apt` repository contains Docker 1.7.1 and higher. To set `apt` to use
<ide> packages from the new repository:
<ide>
<del>1. If you haven't already done so, log into your Ubuntu instance.
<add>1. If you ha... | 1 |
Python | Python | update build script | aa4bc9eb83d61f4c6bf62cf09c986ec11d8106df | <ide><path>tools/win32build/build.py
<ide> def build(arch, pyver):
<ide>
<ide> try:
<ide> try:
<del> print "Executing command %s" % cmd
<ide> subprocess.check_call(cmd, shell = True, stderr = subprocess.STDOUT, stdout = f)
<ide> finally:
<ide> f.close()
<ide> def ... | 1 |
Python | Python | add tests for 0-dim array | f9a3e177f8cb08aeac2cccdb1067871c97bbe065 | <ide><path>numpy/core/tests/test_ufunc.py
<ide> def test_inplace_fancy_indexing(self):
<ide> np.negative.at(a, [2,5,2])
<ide> assert_equal(a, [0, 1, 2, 3, 4, -5, 6, 7, 8, 9])
<ide>
<del> # test exception when indices dimensions < first operand dimensions
<del> a = np.arange(27).reshape(3,... | 1 |
Ruby | Ruby | add requires for mimemagic | f4aa54d48793339386d10ff9a3675d749e65a022 | <ide><path>activestorage/app/models/active_storage/blob/representable.rb
<ide> # frozen_string_literal: true
<ide>
<add>require "mimemagic"
<add>
<ide> module ActiveStorage::Blob::Representable
<ide> extend ActiveSupport::Concern
<ide>
<ide><path>activestorage/app/models/active_storage/variation.rb
<ide> # frozen_s... | 2 |
Python | Python | add a keys method to bindingdict | 4248a6c499cf31d2e38199f05a42e7a131dc014e | <ide><path>rest_framework/serializers.py
<ide> def __delitem__(self, key):
<ide> def items(self):
<ide> return self.fields.items()
<ide>
<add> def keys(self):
<add> return self.fields.keys()
<add>
<ide> def values(self):
<ide> return self.fields.values()
<ide> | 1 |
Text | Text | apply suggestions from code review | c8554296125ad858ac1130e0ec5572007d67cb7a | <ide><path>docs/Manpage.md
<ide> Note that environment variables must have a value set to be detected. For exampl
<ide> *Default:* `15`.
<ide>
<ide> * `HOMEBREW_FORBIDDEN_LICENSES`:
<del> Use this environment variable to define a blacklist of space separated licenses and Homebrew will avoid installing the pac... | 1 |
Javascript | Javascript | fix bug in getrawstack | d17ab332ec5d117e5849af935c9bfcaea19f828c | <ide><path>src/compile-cache.js
<ide> require('source-map-support').install({
<ide> })
<ide>
<ide> var sourceMapPrepareStackTrace = Error.prepareStackTrace
<del>var prepareStackTrace = sourceMapPrepareStackTrace
<add>
<add>// Enable Grim to access the raw stack by customizing Error.prepareStackTrace
<add>function prep... | 1 |
Text | Text | remove schema mention | be655b4742d175cf6b3ce19d2304d2059b68684e | <ide><path>docs/how-to-translate-the-website.md
<ide> To change text on the client side of things, go to the relevant `.json` file, fi
<ide>
<ide> If the text you want to add to the client exists in the relevant `.json` file, use the existing key. Otherwise, create a new key.
<ide>
<del>The matching filename`-schema.... | 1 |
Python | Python | fix a bug with referencing an invalid variable | 90951ebaa277140a8ffeff4110aab77bebc753da | <ide><path>libcloud/compute/drivers/cloudstack.py
<ide> def create_node(self, name, size, image, location=None, extra_args=None,
<ide> location = self.list_locations()[0]
<ide>
<ide> if 'network_id' in kwargs:
<del> request_args['networkids'] = network_id
<add> request_args['n... | 1 |
Python | Python | fix documented return value of tostring/tobytes | ef269d55dfc11b9ca3a66b71c8d0e64703a8f359 | <ide><path>numpy/add_newdocs.py
<ide> def luf(lamdaexpr, *args, **kwargs):
<ide>
<ide>
<ide> tobytesdoc = """
<del> a.tostring(order='C')
<add> a.{name}(order='C')
<ide>
<del> Construct a Python string containing the raw data bytes in the array.
<add> Construct Python bytes containing the raw data bytes ... | 1 |
PHP | PHP | remove extra space | 8444190a742d7d77818f3938b214a95a4585ea35 | <ide><path>src/Illuminate/Support/Collection.php
<ide> public function toArray()
<ide> {
<ide> return array_map(function ($value) {
<ide> return $value instanceof Arrayable ? $value->toArray() : $value;
<del>
<ide> }, $this->items);
<ide> }
<ide> | 1 |
Ruby | Ruby | push module building to the constructor | 71aba97d8d0c1b0264646c64aa3dc5661a90424c | <ide><path>activerecord/lib/active_record/associations/builder/collection_association.rb
<ide> def valid_options
<ide>
<ide> attr_reader :block_extension
<ide>
<del> def initialize(*args, &extension)
<add> def initialize(*args)
<ide> super(*args)
<del> @block_extension = extension
<add> @mod... | 1 |
Java | Java | fix padding with text on android | 7562f9d6f501ce2f57153e4f62aed15e7ae4c709 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/flat/RCTTextInput.java
<ide> public void setBackgroundColor(int backgroundColor) {
<ide> public void onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue) {
<ide> super.onCollectExtraUpdates(uiViewOperationQueue);
<ide> if (mJsEventCount != U... | 1 |
Python | Python | simplify test settings | 76ede5beda74c1bb224f038d635ab586416bfca8 | <ide><path>tests/conftest.py
<ide> def pytest_configure():
<ide> MIDDLEWARE_CLASSES=(
<ide> 'django.middleware.common.CommonMiddleware',
<ide> 'django.contrib.sessions.middleware.SessionMiddleware',
<del> 'django.middleware.csrf.CsrfViewMiddleware',
<ide> 'django.c... | 1 |
Ruby | Ruby | add sprockets environment to application | 3e7985c9c1a6899ac06857bd8e6f29b48ad87cea | <ide><path>railties/lib/rails/application.rb
<ide> def config
<ide> @config ||= Application::Configuration.new(find_root_with_flag("config.ru", Dir.pwd))
<ide> end
<ide>
<add> def self.default_sprockets_paths
<add> [
<add> "app/assets",
<add> "app/javascripts",
<add> "app/stylesheet... | 1 |
Ruby | Ruby | avoid dupes add fallback logic for coders | 975c9c9d4498a4b4a00de713e932abe3299a4007 | <ide><path>activerecord/lib/active_record/attribute_methods/read.rb
<ide> def read_attribute(attr_name)
<ide> # We use #[] first as a perf optimization for non-nil values. See https://gist.github.com/jonleighton/3552829.
<ide> name = attr_name.to_s
<ide> @attributes_cache[name] || @attributes_ca... | 4 |
Text | Text | update quickstart to django 2.0 routing syntax | 0860ef9eeebf77e1780b0d86b3fdf01f5aaa5cc3 | <ide><path>docs/tutorial/quickstart.md
<ide> We can easily break these down into individual views if we need to, but using vi
<ide>
<ide> Okay, now let's wire up the API URLs. On to `tutorial/urls.py`...
<ide>
<del> from django.conf.urls import url, include
<add> from django.urls import include, path
<ide> ... | 1 |
Javascript | Javascript | fix intersection uv for non-indexed buffergeometry | 6dffe4a2bf5213b4eb29d50b92f59f6d7656c3d5 | <ide><path>src/objects/Mesh.js
<ide> THREE.Mesh.prototype.raycast = ( function () {
<ide>
<ide> if ( distance < raycaster.near || distance > raycaster.far ) continue;
<ide>
<add> a = i / 3;
<add> b = a + 1;
<add> c = a + 2;
<add>
<ide> var uv;
<ide>
<ide> if ( attributes.uv !== undefined )... | 1 |
Ruby | Ruby | log unnamed bind params | fe62bb5762edfc7ee4c3bc3048b77dcb5c4c8136 | <ide><path>activerecord/lib/active_record/log_subscriber.rb
<ide> def sql(event)
<ide>
<ide> binds = []
<ide> payload[:binds].each_with_index do |attr, i|
<del> attribute_name = attr.respond_to?(:name) ? attr.name : attr[i].name
<add> attribute_name = if attr.respond_to?(:name)
<add> ... | 1 |
PHP | PHP | change config option in file driver | 1ca831d5f646e7985c5e4b8f2497a6f3b142fd5b | <ide><path>src/Illuminate/Session/SessionManager.php
<ide> protected function createCookieDriver()
<ide> */
<ide> protected function createFileDriver()
<ide> {
<del> $path = $this->app['config']['session.path'];
<add> $path = $this->app['config']['session.files'];
<ide>
<ide> return new FileStore($this->app['f... | 1 |
Text | Text | fix typo on line 47 "make" to "makes" | 7fbb46c31656e552a5b02c7dbc656b437f851136 | <ide><path>docs/Networking.md
<ide> Take a look at the [Fetch Request docs](https://developer.mozilla.org/en-US/docs
<ide>
<ide> The above examples show how you can make a request. In many cases, you will want to do something with the response.
<ide>
<del>Networking is an inherently asynchronous operation. Fetch meth... | 1 |
Text | Text | improve build instructions | 2e9c1ead76aaae8fde004e3cacde1e36c5fd2104 | <ide><path>README.md
<ide> Environments in which to use jQuery
<ide> What you need to build your own jQuery
<ide> --------------------------------------
<ide>
<del>In order to build jQuery, you need to have Node.js/npm latest and git 1.7 or later.
<del>(Earlier versions might work OK, but are not tested.)
<add>In orde... | 1 |
Javascript | Javascript | add new rule disallownewlinebeforeblockstatements | fb210eb85e9a4baaefc20109a9b41e134c0568df | <ide><path>examples/js/Octree.js
<ide> tmin;
<ide>
<ide> // ray would intersect in reverse direction, i.e. this is behind ray
<del> if ( tmax < 0 )
<del> {
<add> if ( tmax < 0 ) {
<ide>
<ide> return false;
<ide>
<ide><path>examples/js/SimplexNoise.js
<ide> SimplexNoise.prototype.noise3d = function( ... | 9 |
Javascript | Javascript | simplify loop in parser | 26ce1ae647d75dfda2359412cc7add0c26f77484 | <ide><path>lib/url.js
<ide> Url.prototype.resolveObject = function resolveObject(relative) {
<ide>
<ide> // if the path is allowed to go above the root, restore leading ..s
<ide> if (!mustEndAbs && !removeAllDots) {
<del> for (; up--; up) {
<add> while (up--) {
<ide> srcPath.unshift('..');
<ide> }
... | 1 |
Ruby | Ruby | fuse the `rpath` loops | ffb3c9cff9bf56b9f920f6b8ae84d38c2bc34a2b | <ide><path>Library/Homebrew/extend/os/mac/keg_relocate.rb
<ide> def fix_dynamic_linkage
<ide> change_install_name(bad_name, new_name, file) unless new_name == bad_name
<ide> end
<ide>
<del> # Count duplicate rpaths. We need to keep track of this ourselves
<del> # because the MachO data ... | 1 |
Javascript | Javascript | fix deopt for the field load of `.concat` | 9616516c95bf2c5a4c32b5269555b397897c4d6e | <ide><path>packages/ember-metal/lib/mixin.js
<ide> import {
<ide> function ROOT() {}
<ide> ROOT.__hasSuper = false;
<ide>
<del>const a_slice = [].slice;
<add>const a_slice = Array.prototype.slice;
<add>const a_concat = Array.prototype.concat;
<add>const isArray = Array.isArray;
<ide>
<ide> function isMethod(obj) {
<i... | 3 |
PHP | PHP | use default cipher | 1ce080b131b643b9c91bb5f7f1a245f4735879e8 | <ide><path>src/Illuminate/Foundation/Console/EnvironmentDecryptCommand.php
<ide> public function handle()
<ide> return Command::FAILURE;
<ide> }
<ide>
<del> $cipher = $this->option('cipher') ?: 'aes-128-cbc';
<add> $cipher = $this->option('cipher') ?: 'AES-256-CBC';
<ide>
<ide> ... | 2 |
Javascript | Javascript | fix typo in docstring | e8a9ad9adeaeda88c7afea2bb15562dac2f72b43 | <ide><path>packages/ember-routing/lib/helpers/render.js
<ide> Ember.onLoad('Ember.Handlebars', function(Handlebars) {
<ide> Example:
<ide>
<ide> ```javascript
<del> App.NavigationController = Ember.Controller.extned({
<add> App.NavigationController = Ember.Controller.extend({
<ide> who: "world"
<id... | 1 |
PHP | PHP | add api docs for new countercache option | d768eef98b885b85effcff3634666fe745d79268 | <ide><path>src/ORM/Behavior/CounterCacheBehavior.php
<ide> * ]
<ide> * ]
<ide> * ```
<add> *
<add> * You can disable counter updates entirely by sending the `ignoreCounterCache` option
<add> * to your save operation:
<add> *
<add> * ```
<add> * $this->Articles->save($article, ['ignoreCounterCache' => true]);
<ad... | 1 |
Python | Python | fix flaky backfill test | 4746882e7b27c996047cff29bc831e0fa3c9b0f2 | <ide><path>tests/jobs/test_backfill_job.py
<ide> def test_backfill_skip_active_scheduled_dagrun(self, dag_maker, caplog):
<ide> start_date=DEFAULT_DATE,
<ide> end_date=DEFAULT_DATE + datetime.timedelta(days=2),
<ide> )
<del> job.run()
<del> error_log_records = [record for r... | 1 |
PHP | PHP | apply fixes from styleci | c3befd2a42222aa1c0760c72c4234ac4120ecc63 | <ide><path>tests/Validation/ValidationRuleParserTest.php
<ide> public function testExplodeHandlesArraysOfNestedRules()
<ide>
<ide> $results = $parser->explode([
<ide> 'users.*.name' => Rule::forEach(function ($value, $attribute, $data) {
<del> $this->assertEquals([
<del> ... | 1 |
Text | Text | clarify the position argument for fs.read | 680285c3b427a698fa254e51d5bf2fba59af2f2a | <ide><path>doc/api/fs.md
<ide> Read data from the file specified by `fd`.
<ide> `length` is an integer specifying the number of bytes to read.
<ide>
<ide> `position` is an integer specifying where to begin reading from in the file.
<del>If `position` is `null`, data will be read from the current file position.
<add>If... | 1 |
Python | Python | use tf.nn.relu6 when appropriate in k.relu | f8763efb371f355e65473e7c59a8715cb06bdd0c | <ide><path>keras/backend/tensorflow_backend.py
<ide> def relu(x, alpha=0., max_value=None):
<ide> # Returns
<ide> A tensor.
<ide> """
<add> if alpha == 0 and max_value == 6:
<add> return tf.nn.relu6(x)
<add>
<ide> if alpha != 0.:
<ide> x = tf.nn.leaky_relu(x, alpha)
<ide> else:... | 2 |
PHP | PHP | remove redundant class import | 86b67fa1982736a87a935ef1b33f471ffff5b5e7 | <ide><path>src/Illuminate/Support/Testing/Fakes/MailFake.php
<ide> namespace Illuminate\Support\Testing\Fakes;
<ide>
<ide> use InvalidArgumentException;
<del>use Illuminate\Contracts\Mail\Mailable;
<ide> use Illuminate\Contracts\Mail\Mailer;
<del>use Illuminate\Contracts\Mail\Mailable as MailableContract;
<add>use Ill... | 1 |
Mixed | Ruby | add reversible syntax for change_column_default | a4128725f5a2c6cbf3e963e2b78ba9382732728a | <ide><path>activerecord/CHANGELOG.md
<add>* Add alternate syntax to make `change_column_default` reversible.
<add>
<add> User can pass in `:from` and `:to` to make `change_column_default` command
<add> become reversible.
<add>
<add> Example:
<add>
<add> change_column_default :posts, :status, from: nil... | 9 |
Javascript | Javascript | unify another test | 2f5f485d15ea180e4f1733f8f7e06d8d29314f9e | <ide><path>packages/ember-glimmer/tests/integration/components/curly-components-test.js
<ide> moduleFor('Components test: curly components', class extends RenderingTest {
<ide> this.assertText('In layout - someProp: value set in instance');
<ide> }
<ide>
<del> // Note: Hooks are not re-run for idempotent re-ren... | 1 |
Python | Python | fix the test for numpy.ndindex() | dd146b6929f79fd6af27528dd4370eaebd5c57a6 | <ide><path>numpy/lib/tests/test_index_tricks.py
<ide> def test_ndindex():
<ide>
<ide> # Make sure size argument is optional
<ide> x = list(np.ndindex())
<del> assert_equal(x, [(0,)])
<add> assert_equal(x, [()])
<ide>
<ide>
<ide> if __name__ == "__main__": | 1 |
Python | Python | implement sdbm hash algorithm | ec2d900b03dbc511504819caf353310b0a997fa6 | <ide><path>conversions/decimal_to_any.py
<ide> def decimal_to_any(num: int, base: int) -> str:
<ide> for base in range(2, 37):
<ide> for num in range(1000):
<ide> assert int(decimal_to_any(num, base), base) == num, (
<del> num, base, decimal_to_any(num, base),
<del> ... | 2 |
Javascript | Javascript | add azendoo to showcase | 63211596e37d7dabe946d88c8b8a9acdda2d2a1a | <ide><path>website/src/react-native/showcase.js
<ide> var featured = [
<ide> },
<ide> {
<ide> name: 'Zhopout',
<del> icon: 'http://zhopout.com/Content/Images/zhopout-logo-app-3.png',
<add> icon: 'http://zhopout.com/Content/Images/zhopout-logo-app-3.png',
<ide> link: 'https://play.google.com/store/... | 1 |
Javascript | Javascript | add lorenz attractor | 88c17cd1cb75e92dbc052b13c93d054410062d03 | <ide><path>examples/files.js
<ide> var files = {
<ide> "webvr_cubes",
<ide> "webvr_daydream",
<ide> "webvr_gearvr",
<add> "webvr_lorenz_attractor",
<ide> "webvr_oculus-go",
<ide> "webvr_panorama",
<ide> "webvr_rollercoaster", | 1 |
Text | Text | fix wrong link in readme | c6a08f51b1ea0f0debdc7dbf1aa4192b3d67009d | <ide><path>examples/with-stripe-typescript/README.md
<ide> Once you have access to [the environment variables you'll need](#required-config
<ide> - Checkout payment result page that uses [SWR](https://github.com/vercel/swr) hooks to fetch the CheckoutSession status from the API route: [pages/result.tsx](pages/resul... | 1 |
Ruby | Ruby | fix example in flash middleware | 86b30c4347640965a6b3ae6a52c5ca9691a585c0 | <ide><path>actionpack/lib/action_dispatch/middleware/flash.rb
<ide> def flash
<ide> # def create
<ide> # # save post
<ide> # flash[:notice] = "Post successfully created"
<del> # redirect_to posts_path(@post)
<add> # redirect_to @post
<ide> # end
<ide> #
<ide> # def show | 1 |
Javascript | Javascript | fix comparison dagtz with localtz | fe0ee585d11474a0c99e51a4400dc16f643ea14b | <ide><path>airflow/www/static/js/task-instances.js
<ide> function generateTooltipDateTimes(startDate, endDate, dagTZ) {
<ide> }
<ide>
<ide> const tzFormat = 'z (Z)';
<del> const localTZ = moment.defaultZone.name;
<add> const localTZ = moment.defaultZone.name.toUpperCase();
<ide> startDate = moment.utc(startDat... | 1 |
Ruby | Ruby | prevent extra `sync_with_transaction_state` | f5f7ca57da2a486b4d2493cb70479174f2968ada | <ide><path>activerecord/lib/active_record/attribute_methods/primary_key.rb
<ide> module PrimaryKey
<ide> # Returns this record's primary key value wrapped in an array if one is
<ide> # available.
<ide> def to_key
<del> sync_with_transaction_state
<ide> key = id
<ide> [key] if ke... | 1 |
Go | Go | remove some outdated comments | c523d6d25ce394046b2f0d057274adf7dac5b43c | <ide><path>libnetwork/sandbox.go
<ide> type sandbox struct {
<ide>
<ide> // These are the container configs used to customize container /etc/hosts file.
<ide> type hostsPathConfig struct {
<del> // Note(cpuguy83): The linter is drunk and says none of these fields are used while they are
<ide> hostName string
<... | 1 |
PHP | PHP | log a warning when headers have been sent | 5c8a0ce361f008c24d70bc0d577148eb121aeb0a | <ide><path>src/Network/Response.php
<ide>
<ide> use Cake\Core\Configure;
<ide> use Cake\Filesystem\File;
<add>use Cake\Log\Log;
<ide> use Cake\Network\Exception\NotFoundException;
<ide> use DateTime;
<ide> use DateTimeZone;
<ide> public function send()
<ide> */
<ide> public function sendHeaders()
<ide> {
... | 1 |
Python | Python | use sb.array to handle the array interface | 0934daa01a823c3511511528586de2e9238c478f | <ide><path>numpy/core/records.py
<ide> def array(obj, dtype=None, shape=None, offset=0, strides=None, formats=None,
<ide> interface = getattr(obj, "__array_interface__", None)
<ide> if interface is None or not isinstance(interface, dict):
<ide> raise ValueError("Unknown input type")
<del> ... | 1 |
Ruby | Ruby | add test for nested model translation | 7a8031b578582e07dc11fa1f5c8977f049a313da | <ide><path>activemodel/test/cases/translation_test.rb
<ide> def test_translated_model_names_with_sti
<ide> assert_equal 'child model', Child.model_name.human
<ide> end
<ide>
<add> def test_translated_model_with_namespace
<add> I18n.backend.store_translations 'en', activemodel: { models: { 'person/gender': 'g... | 1 |
Java | Java | ensure code compiles with eclipse jdt | 2bae0613a35251c03d56204a2927d200abf9a9ef | <ide><path>spring-beans/src/main/java/org/springframework/beans/factory/config/YamlMapFactoryBean.java
<ide> private void merge(Map<String, Object> output, Map<String, Object> map) {
<ide> Object value = entry.getValue();
<ide> Object existing = output.get(key);
<ide> if (value instanceof Map && existing insta... | 1 |
Python | Python | fix pre-commit check | b3cc2f5d102214067c40b3c120364918556e7cca | <ide><path>airflow/providers/google/cloud/links/datastore.py
<ide> def persist(
<ide> value={
<ide> "project_id": task_instance.project_id,
<ide> },
<del> )
<ide>\ No newline at end of file
<add> )
<ide><path>airflow/providers/google/cloud/operators/datastore.py
<id... | 2 |
Javascript | Javascript | remove dead code | ee050f46f6e5c94266db56292ad7a67d64af6333 | <ide><path>packages/ember-views/lib/system/platform.js
<del>import { environment } from 'ember-environment';
<del>
<del>// IE 6/7 have bugs around setting names on inputs during creation.
<del>// From http://msdn.microsoft.com/en-us/library/ie/ms536389(v=vs.85).aspx:
<del>// "To include the NAME attribute at run time o... | 1 |
Ruby | Ruby | add support for pending | 9744f687ccfe83bde52696985030225919c2e681 | <ide><path>actionpack/test/controller/render_test.rb
<ide> def test_explicitly_rendering_an_html_template_with_implicit_html_template_rende
<ide> end
<ide>
<ide> def test_should_implicitly_render_html_template_from_xhr_request
<del> get :render_implicit_html_template_from_xhr_request, :format => :js
<del> as... | 3 |
Go | Go | remove unused method for dnetconnection struct | b5d09df0c388921fd4d32f002bd21150c258fa87 | <ide><path>libnetwork/cmd/dnet/dnet.go
<ide> func (d *dnetConnection) GetRemoteAddressList() []string {
<ide> return []string{d.Orchestration.Peer}
<ide> }
<ide>
<del>func (d *dnetConnection) GetNetworkKeys() []*types.EncryptionKey {
<del> return nil
<del>}
<del>
<del>func (d *dnetConnection) SetNetworkKeys([]*types.... | 1 |
Text | Text | simplify usage example with pipelines | 72768b6b9c2083d9f2d075d80ef199a3eae881d8 | <ide><path>model_cards/dkleczek/bert-base-polish-uncased-v1/README.md
<ide> Polbert is released via [HuggingFace Transformers library](https://huggingface.c
<ide> For an example use as language model, see [this notebook](https://github.com/kldarek/polbert/blob/master/LM_testing.ipynb) file.
<ide>
<ide> ```python
<del... | 1 |
PHP | PHP | create a helper as a shortcut for method spoofing | 23c21e7958bdefc18c8b26a065f2feda48805adc | <ide><path>src/Illuminate/Foundation/helpers.php
<ide> function logger($message = null, array $context = [])
<ide> }
<ide> }
<ide>
<add>if (!function_exists('method_spoof')) {
<add> /**
<add> * Generate a method spoof form field for POST method's.
<add> *
<add> * @param string $method
<add> * @r... | 1 |
PHP | PHP | change exception message to actual model path | d4a4c802a4d57800af2f980ecee1d1ebcc318235 | <ide><path>src/Illuminate/Database/Eloquent/Builder.php
<ide> public function getRelation($name)
<ide> try {
<ide> return $this->getModel()->$name();
<ide> } catch (BadMethodCallException $e) {
<del> throw new RelationNotFoundException("Call to undefined relationsh... | 1 |
PHP | PHP | remove trailing comma | f22333a7c0bb550a9bc9463f26695c256cbfb10e | <ide><path>src/Illuminate/Bus/BusServiceProvider.php
<ide> protected function registerBatchServices()
<ide> return new DatabaseBatchRepository(
<ide> $app->make(BatchFactory::class),
<ide> $app->make('db')->connection(config('queue.batching.database')),
<del> c... | 1 |
Ruby | Ruby | modify strategy and tests | d173b57c4203915365b967d1c61fad49bd325536 | <ide><path>Library/Homebrew/livecheck/strategy/github_latest.rb
<ide> module Strategy
<ide> # The {GithubLatest} strategy identifies versions of software at
<ide> # github.com by checking a repository's latest release page.
<ide> #
<del> # GitHub URLs take a few differemt formats:
<add> # Gi... | 2 |
Javascript | Javascript | remove unnecessary variable declaration | 8fd648b1754f2ab6c7c6c3e7a15023502189dc44 | <ide><path>controllers/user.js
<ide> exports.getAccount = function(req, res) {
<ide> res.render('account/profile', {
<ide> title: 'Manage your Free Code Camp Account',
<ide> c: c,
<del> u: req.user,
<ide> cc: req.user.challengesHash,
<ide> moment: moment
<ide> }); | 1 |
Ruby | Ruby | remove stray ( | caa8ab09f769b57bb06a333f5e81d6ad10be1495 | <ide><path>activemodel/lib/active_model/validations/length.rb
<ide> module HelperMethods
<ide> # validates_length_of :user_name, :within => 6..20, :too_long => "pick a shorter name", :too_short => "pick a longer name"
<ide> # validates_length_of :zip_code, :minimum => 5, :too_short => "please enter ... | 1 |
Python | Python | remove unsupported qa env | 8db131a743ee4a8940bc8687ec6b20a505872fa3 | <ide><path>libcloud/common/dimensiondata.py
<ide> 'name': 'Africa (AF)',
<ide> 'host': 'afapi.bsnlcloud.com',
<ide> 'vendor': 'BSNL'
<del> },
<del> 'dd-qa': {
<del> 'name': 'Test(QA)',
<del> 'host': 'apiqa1geo1.itaas.dimensiondata.com',
<del> 'vendor': 'DimensionData'
... | 1 |
Ruby | Ruby | improve router test | 92120426317083ae90cb64cff07a7dd3a8acdc65 | <ide><path>actionpack/test/journey/router_test.rb
<ide> def test_recognize_head_request_as_get_route
<ide> def test_recognize_cares_about_verbs
<ide> path = Path::Pattern.from_string "/books(/:action(.:format))"
<ide> app = Object.new
<del> conditions = {
<del> :request_method... | 1 |
Python | Python | remove default none value for required params | bbabe7316e6d5e02f46150bd6fb204e4c2588a67 | <ide><path>libcloud/compute/drivers/outscale.py
<ide> def ex_list_vpn_connections(
<ide>
<ide> def ex_create_certificate_authority(
<ide> self,
<del> ca_perm: str = None,
<add> ca_perm: str,
<ide> description: str = None,
<ide> dry_run: bool = False
<ide> ):
<ide> def ex_c... | 1 |
Java | Java | improve initialization of assume class | 264edb3fb5de63051e6a66a533e40dadee253ae0 | <ide><path>spring-core/src/test/java/org/springframework/tests/Assume.java
<ide> /*
<del> * Copyright 2002-2016 the original author or authors.
<add> * Copyright 2002-2017 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this file... | 4 |
Python | Python | add unit test to check if steps are updated | e4bf9498724fc472b124cf98ec11fac2b84098b8 | <ide><path>keras/engine/data_adapter_test.py
<ide> import tensorflow.compat.v2 as tf
<ide>
<ide> import math
<add>from typing import List, Union, Text, Optional, Any, Tuple, Dict, ItemsView, overload, DefaultDict
<ide>
<ide> from absl.testing import parameterized
<ide> import numpy as np
<ide> from keras.testing_infr... | 1 |
PHP | PHP | update helpers to use urlhelper | 6cd3dcafa2c118a8d6f28b8045765c9a6fa3d1b6 | <ide><path>src/View/Helper/FormHelper.php
<ide> class FormHelper extends Helper {
<ide> *
<ide> * @var array
<ide> */
<del> public $helpers = array('Html');
<add> public $helpers = ['Url', 'Html'];
<ide>
<ide> /**
<ide> * The various pickers that make up a datetime picker.
<ide> public function create($model = nul... | 7 |
Text | Text | add more info to benchmark/readme.md | 514b1d964b2e67d0594c6a44a22fbc29fe71454b | <ide><path>benchmark/README.md
<ide> This folder contains benchmark tests to measure the performance for certain
<ide> io.js APIs.
<ide>
<add>## prerequisites
<add>
<add>Most of the http benchmarks require `wrk` to be compiled beforehand.
<add>
<add>```sh
<add>make wrk
<add>```
<add>
<ide> ## How to run tests
<ide>
<... | 1 |
PHP | PHP | apply fixes from styleci | fde66bfae0b37be4ff78f7aa1f1c15d6de602f77 | <ide><path>tests/Queue/RedisQueueIntegrationTest.php
<ide> <?php
<ide>
<ide> use Mockery as m;
<del>use Carbon\Carbon;
<ide> use Illuminate\Redis\Database;
<ide> use Illuminate\Queue\RedisQueue;
<ide> use Illuminate\Container\Container; | 1 |
Text | Text | use babelhook file instead the compilers option | ed322322e431e1b21d28f92244564c72742ac30d | <ide><path>docs/recipes/WritingTests.md
<ide> To use it together with [Babel](http://babeljs.io), add this to `scripts` in you
<ide> ...
<ide> "scripts": {
<ide> ...
<del> "test": "mocha --compilers js:babel/register --recursive",
<add> "test": "mocha --require babelhook --recursive",
<ide> "test:watc... | 1 |
PHP | PHP | remove unused namespace | df15753b6d42ac777527361aa206dfc7239138ee | <ide><path>src/Error/Middleware/ErrorHandlerMiddleware.php
<ide> use Cake\Core\Configure;
<ide> use Cake\Core\InstanceConfigTrait;
<ide> use Cake\Error\ExceptionRenderer;
<del>use Cake\Error\ExceptionRendererInterface;
<ide> use Cake\Log\Log;
<ide> use Exception;
<ide>
<ide><path>src/Http/Response.php
<ide>
<ide> use... | 31 |
Python | Python | fix failing tests, format responding csv | 5c27a9274e1d554c41b1efd8871b4941e185e387 | <ide><path>libcloud/common/base.py
<ide> def request(self, action, params=None, data=None, headers=None,
<ide> try:
<ide> # @TODO: Should we just pass File object as body to request method
<ide> # instead of dealing with splitting and sending the file ourselves?
<del> if raw a... | 4 |
PHP | PHP | ) | 791dcdbf9c250ad064cad5264bf29069406cfc5d | <ide><path>src/Illuminate/Redis/Database.php
<ide> public function subscribe($channels, Closure $callback, $connection = null, $met
<ide> call_user_func_array([$loop, $method], (array) $channels);
<ide>
<ide> foreach ($loop as $message) {
<del> echo $message->kind.PHP_EOL;
<ide> if ($message->kind === 'messag... | 1 |
Javascript | Javascript | fix usage suggestions for min and max | 6397a9e05f20ad94f891596e3453a98222c99422 | <ide><path>src/lib/moment/min-max.js
<ide> import { createLocal } from '../create/local';
<ide> import { createInvalid } from '../create/valid';
<ide>
<ide> export var prototypeMin = deprecate(
<del> 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',
<add> 'mome... | 1 |
PHP | PHP | add test for content-type json and charset | 58df515a6dca61ea7f50d2a36372393831e89868 | <ide><path>lib/Cake/Test/Case/Network/CakeResponseTest.php
<ide> public function testSend() {
<ide> * Tests the send method and changing the content type
<ide> *
<ide> */
<del> public function testSendChangingContentYype() {
<add> public function testSendChangingContentType() {
<ide> $response = $this->getMock('Ca... | 1 |
Text | Text | add easy taxi to list of companies using airflow | cf05feb612d4690f2eab95949685e98b6afe03c6 | <ide><path>README.md
<ide> if you may.
<ide>
<ide> Currently **officially** using Airflow:
<ide>
<del>* Agari [@r39132](https://github.com/r39132)
<ide> * Airbnb [@mistercrunch]
<add>* Agari [@r39132](https://github.com/r39132)
<ide> * BlueApron [[@jasonjho](https://github.com/jasonjho) & [@matthewdavidhauser](https:... | 1 |
Ruby | Ruby | fix nil outdated comparison | 90c696ea6714c4aad1a279e4e77b6811c08f0847 | <ide><path>Library/Homebrew/os/mac/xcode.rb
<ide> def latest_version
<ide>
<ide> def outdated?
<ide> version = `/usr/bin/clang --version`[%r{clang-(\d+\.\d+\.\d+)}, 1]
<add> return true unless version
<ide> version < latest_version
<ide> end
<ide> | 1 |
Text | Text | improve docker man page | 29f379ea6e2a68d8ac4bf41d3559a52066a275a0 | <ide><path>docs/man/docker.1.md
<ide> unix://[/path/to/socket] to use.
<ide> Enable selinux support. Default is false. SELinux does not presently support the BTRFS storage driver.
<ide>
<ide> # COMMANDS
<del>**docker-attach(1)**
<add>**attach**
<ide> Attach to a running container
<add> See **docker-attach(1)** fo... | 1 |
Python | Python | add lfs flags to node addon script | aef0d8086b233f97535841c9ea91f7139f8fc3bb | <ide><path>tools/wafadmin/Tools/node_addon.py
<ide> def detect(conf):
<ide>
<ide> conf.env['LIBPATH_NODE'] = lib
<ide> conf.env['CPPPATH_NODE'] = join(prefix, 'include', 'node')
<del> conf.env['CPPFLAGS_NODE'] = '-D_GNU_SOURCE'
<del> conf.env['CPPFLAGS_NODE'] = '-DEV_MULTIPLICITY=0'
<add>
<add> conf.env.append_... | 1 |
PHP | PHP | fix postgres dump | 1c7cfe2b0b29b427d442e20b767e7b67fe5af2bb | <ide><path>src/Illuminate/Database/Console/DumpCommand.php
<ide> class DumpCommand extends Command
<ide> */
<ide> public function handle(ConnectionResolverInterface $connections, Dispatcher $dispatcher)
<ide> {
<del> $this->schemaState(
<del> $connection = $connections->connection($databa... | 5 |
Ruby | Ruby | define weblog controller for url helper test | 213c920e4f0b1efeaccc4377dfebb41a5873efcf | <ide><path>actionpack/test/lib/controller/fake_controllers.rb
<ide> class CController < ActionController::Base; end
<ide> class HiController < ActionController::Base; end
<ide> class BraveController < ActionController::Base; end
<ide> class ImageController < ActionController::Base; end
<add>class WeblogController < Act... | 2 |
Python | Python | fix crash on non-void structured array repr | 7a3344a461fdb25c55cd5e4fa52abda895f01e20 | <ide><path>numpy/core/arrayprint.py
<ide> def _get_format_function(data, **options):
<ide> find the right formatting function for the dtype_
<ide> """
<ide> dtype_ = data.dtype
<del> if dtype_.fields is not None:
<del> return StructureFormat.from_data(data, **options)
<del>
<ide> dtypeobj = dt... | 2 |
Ruby | Ruby | add kaby lake to linux hardware list | ebb659af7da12771efe134e1f9386324423f4246 | <ide><path>Library/Homebrew/extend/os/linux/hardware/cpu.rb
<ide> def family
<ide> :haswell
<ide> when 0x3d, 0x47, 0x4f, 0x56
<ide> :broadwell
<add> when 0x8e
<add> :kabylake
<ide> else
<ide> cpu_family_model
<ide> end
<ide><path>Libr... | 2 |
PHP | PHP | remove config for workbench | 90f8e8bd9ce1c46db31ab63f31a9558b12fdc318 | <ide><path>config/workbench.php
<del><?php
<del>
<del>return [
<del>
<del> /*
<del> |--------------------------------------------------------------------------
<del> | Workbench Author Name
<del> |--------------------------------------------------------------------------
<del> |
<del> | When you create new packages via... | 1 |
Python | Python | add support for lvis metrics | 4437d7b4b17c5535d516bcb4038ff9397ae9eef9 | <ide><path>research/object_detection/core/standard_fields.py
<ide> class InputDataFields(object):
<ide> groundtruth_keypoint_visibilities: ground truth keypoint visibilities.
<ide> groundtruth_keypoint_weights: groundtruth weight factor for keypoints.
<ide> groundtruth_label_weights: groundtruth label weigh... | 10 |
Ruby | Ruby | add tests for selecting aggregates | 05300be6351c988e9c30fa745ba645baec49de65 | <ide><path>activerecord/test/cases/calculations_test.rb
<ide> def test_group_by_attribute_with_custom_type
<ide> assert_equal({ "proposed" => 2, "published" => 2 }, Book.group(:status).count)
<ide> end
<ide>
<add> def test_select_avg_with_group_by_as_virtual_attribute_with_sql
<add> rails_core = companies(:r... | 1 |
PHP | PHP | improve wording of variables | 20ad313598ad98b5a54a702169248e7f179efd89 | <ide><path>src/Command/RoutesCommand.php
<ide> public function execute(Arguments $args, ConsoleIo $io): ?int
<ide> $header[] = 'Defaults';
<ide> }
<ide>
<del> $routeCollection = Router::routes();
<add> $availableRoutes = Router::routes();
<ide> $output = $duplicateRoutesCounte... | 1 |
Python | Python | use decimal (properly) everywhere | 1d054f95725e5bec7d4ba9d23717897ef80b7388 | <ide><path>rest_framework/tests/filterset.py
<ide> def test_get_filtered_fields_root_view(self):
<ide> self.assertEquals(response.data, self.data)
<ide>
<ide> # Tests that the decimal filter works.
<del> search_decimal = 2.25
<add> search_decimal = Decimal('2.25')
<ide> request = ... | 2 |
Ruby | Ruby | reset callbacks after test | 5faf77fe7abffed40e3a4110cf33f83c99e90ce4 | <ide><path>actionpack/test/dispatch/reloader_test.rb
<ide> class ReloaderTest < ActiveSupport::TestCase
<ide> Reloader = ActionDispatch::Reloader
<ide>
<add> teardown do
<add> Reloader.reset_callbacks :prepare
<add> Reloader.reset_callbacks :cleanup
<add> end
<add>
<ide> def test_prepare_callbacks
<ide> ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.