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 |
|---|---|---|---|---|---|
PHP | PHP | fix truncate tests for postgres | 47464352c579c6867313ca2c85d9028fc54634c0 | <ide><path>tests/TestCase/Database/Schema/PostgresSchemaTest.php
<ide> public function testTruncateSql() {
<ide> ]);
<ide> $result = $table->truncateSql($connection);
<ide> $this->assertCount(1, $result);
<del> $this->assertEquals('TRUNCATE "schema_articles" RESTART IDENTITY', $result[0]);
<add> $this->assertE... | 1 |
Ruby | Ruby | create directory when dumping schema cache | ca4f10ece430a41b95362e5a8d2f9d2e83535239 | <ide><path>activerecord/lib/active_record/connection_adapters/schema_cache.rb
<ide> def prepare_data_sources
<ide> end
<ide>
<ide> def open(filename)
<add> FileUtils.mkdir_p(File.dirname(filename))
<add>
<ide> File.atomic_write(filename) do |file|
<ide> if File.extname(fi... | 2 |
Ruby | Ruby | fix small typo in link_to_function doc | 979f3f894bf1034d4e9ee5ab9e285713f63c2824 | <ide><path>actionpack/lib/action_view/helpers/javascript_helper.rb
<ide> def button_to_function(name, function=nil, html_options={})
<ide> # If +html_options+ has an <tt>:onclick</tt>, that one is put before +function+. Once all
<ide> # the JavaScript is set, the helper appends "; return false;".
<ide> ... | 1 |
Python | Python | add flags info when reporting benchmarks | 1e527fb5ce7b8bcfcb5d07891f60824d042a973c | <ide><path>official/resnet/ctl/ctl_imagenet_benchmark.py
<ide> from official.resnet.ctl import ctl_imagenet_main
<ide> from official.resnet.ctl import ctl_common
<ide> from official.utils.testing.perfzero_benchmark import PerfZeroBenchmark
<add>from official.utils.flags import core as flags_core
<ide>
<ide>
<ide> MIN... | 1 |
Ruby | Ruby | show real name for aliases | 124ddce2627d7205191e095d28d695e69da6c378 | <ide><path>Library/Homebrew/cmd/audit.rb
<ide> def audit_deps
<ide> # Don't depend_on aliases; use full name
<ide> @@aliases ||= Formula.aliases
<ide> f.deps.select { |d| @@aliases.include? d.name }.each do |d|
<del> problem "Dependency #{d} is an alias; use the canonical name."
<add> real_name = ... | 1 |
Javascript | Javascript | remove unused parameters in function definition | 49b0f7fa19ce4b8fc3930124e58496894d4ea932 | <ide><path>test/async-hooks/test-async-await.js
<ide> const hooks = initHooks({
<ide> });
<ide> hooks.enable();
<ide>
<del>function oninit(asyncId, type, triggerAsyncId, resource) {
<add>function oninit(asyncId, type) {
<ide> if (type === 'PROMISE') {
<ide> promisesInitState.set(asyncId, 'inited');
<ide> } | 1 |
Javascript | Javascript | update code for `@enum` breaking change | a736c3ea496daf50d64b975a51b611a9171d2de2 | <ide><path>lib/logging/Logger.js
<ide> const LogType = Object.freeze({
<ide>
<ide> exports.LogType = LogType;
<ide>
<del>/** @typedef {LogType} LogTypeEnum */
<add>/** @typedef {keyof LogType} LogTypeEnum */
<ide>
<ide> const LOG_SYMBOL = Symbol("webpack logger raw log method");
<ide> const TIMERS_SYMBOL = Symbol("w... | 2 |
Python | Python | remove unused imports | 5f0f940a1f42fe899604b39e4422d30791831e6f | <ide><path>bin/parser/train.py
<ide> import shutil
<ide> import codecs
<ide> import random
<del>import time
<del>import gzip
<ide>
<ide> import plac
<ide> import cProfile
<ide><path>bin/prepare_vecs.py
<ide> """Read a vector file, and prepare it as binary data, for easy consumption"""
<ide>
<del>import bz2
<ide> impo... | 7 |
Javascript | Javascript | improve ipc performance | 59be97532269a208f0121060772528690a63677b | <ide><path>lib/child_process.js
<ide> function setupChannel(target, channel) {
<ide> if (pool) {
<ide> jsonBuffer += pool.toString('ascii', offset, offset + length);
<ide>
<del> var i;
<del> while ((i = jsonBuffer.indexOf('\n')) >= 0) {
<del> var json = jsonBuffer.slice(0, i);
<add> var... | 1 |
Python | Python | add test for issue #758 | e854f28304bfea7d7b80e2f52d8a514418a53553 | <ide><path>spacy/tests/regression/test_issue758.py
<add>from ... import load as load_spacy
<add>from ...attrs import LEMMA
<add>from ...matcher import merge_phrase
<add>
<add>import pytest
<add>
<add>
<add>
<add>
<add>@pytest.mark.models
<add>def test_issue758():
<add> '''Test parser transition bug after label added... | 1 |
Text | Text | use udpv4/udpv6 consistently with tcpv4/tcpv6 | 68ef009f828fb79d8aba85ff63be87152a8dbc49 | <ide><path>doc/api/cluster.md
<ide> The `addressType` is one of:
<ide> * `4` (TCPv4)
<ide> * `6` (TCPv6)
<ide> * `-1` (Unix domain socket)
<del>* `'udp4'` or `'udp6'` (UDP v4 or v6)
<add>* `'udp4'` or `'udp6'` (UDPv4 or UDPv6)
<ide>
<ide> ## Event: `'message'`
<ide> | 1 |
Javascript | Javascript | fix minor typo in panresponder | 857dd59340ec3436a098627e948cb5f909c6fafb | <ide><path>Libraries/vendor/react/browser/eventPlugins/PanResponder.js
<ide> var currentCentroidY = TouchHistoryMath.currentCentroidY;
<ide> * - `dy` - accumulated distance of the gesture since the touch started
<ide> * - `vx` - current velocity of the gesture
<ide> * - `vy` - current velocity of the gesture
<del... | 1 |
PHP | PHP | correct docblock for connection manager parsedsn | 74ec45d7113694b7d32e6c2c1b6861b970f12d5d | <ide><path>src/Datasource/ConnectionManager.php
<ide> public static function config($key, $config = null)
<ide> *
<ide> * Note that querystring arguments are also parsed and set as values in the returned configuration.
<ide> *
<del> * @param array $config An array with a `url` key mapping to a string... | 1 |
Javascript | Javascript | fix code style(2) | e432081bc1adbff01c8ad7ba32eeb37c89a74eb7 | <ide><path>examples/jsm/renderers/nodes/accessors/CameraNode.js
<ide> class CameraNode extends Node {
<ide>
<ide> if ( scope === CameraNode.PROJECTION || scope === CameraNode.VIEW ) {
<ide>
<del> if ( !inputNode || !inputNode.isMatrix4Node !== true ) {
<add> if ( inputNode === undefined || !inputNode.isMatri... | 1 |
PHP | PHP | improve error message | 38967f3aa811c7f371e81db792102fd561e0f291 | <ide><path>src/View/Helper/FormHelper.php
<ide> public function getFormProtector(): FormProtector
<ide> {
<ide> if ($this->formProtector === null) {
<ide> throw new CakeException(
<del> 'FormHelper::create() must be called first for FormProtector instance to be created.'
<add> ... | 1 |
Ruby | Ruby | use a set for skip_clean_paths | d8756075f4e44fd4e431e39fbbe6ce5c85813f5f | <ide><path>Library/Homebrew/formula.rb
<ide> def skip_clean *paths
<ide> return
<ide> end
<ide>
<del> @skip_clean_paths ||= []
<ide> paths.each do |p|
<ide> p = p.to_s unless p == :la # Keep :la in paths as a symbol
<del> @skip_clean_paths << p unless @skip_clean_paths.include? ... | 1 |
Javascript | Javascript | fix redeclared vars in test-vm-* | 5f44475b5ad9a7ddf6aea4350c0dc9cced4954e8 | <ide><path>test/parallel/test-vm-basic.js
<ide> assert.strictEqual(result, 'function');
<ide> // Test 2: vm.runInContext
<ide> var sandbox2 = { foo: 'bar' };
<ide> var context = vm.createContext(sandbox2);
<del>var result = vm.runInContext(
<add>result = vm.runInContext(
<ide> 'baz = foo; this.typeofProcess = typeof ... | 4 |
Go | Go | avoid parallel layer downloads in load command | de35ef2ebed3a7e8173abae39933d04e9874790c | <ide><path>graph/load.go
<ide> func (s *TagStore) recursiveLoad(eng *engine.Engine, address, tmpImageDir string
<ide> log.Debugf("Error validating ID: %s", err)
<ide> return err
<ide> }
<add>
<add> // ensure no two downloads of the same layer happen at the same time
<add> if c, err := s.poolAdd("pull", "layer... | 1 |
PHP | PHP | fix user and request info not persisting | 8aacf5ccbd590573ab8c80a656c2a7ae81433dc4 | <ide><path>src/Illuminate/Session/DatabaseSessionHandler.php
<ide> protected function getDefaultPayload($data)
<ide> return $payload;
<ide> }
<ide>
<del> return tap($payload, function ($payload) {
<add> return tap($payload, function (&$payload) {
<ide> $this->addUserInform... | 1 |
Javascript | Javascript | add ipv6 brackets but no port to test-dns | 8afab1a5a7ad1106d3199a36eb221a130d6f832b | <ide><path>test/parallel/test-dns.js
<ide> const ports = [
<ide> '4.4.4.4:53',
<ide> '[2001:4860:4860::8888]:53',
<ide> '103.238.225.181:666',
<del> '[fe80::483a:5aff:fee6:1f04]:666'
<add> '[fe80::483a:5aff:fee6:1f04]:666',
<add> '[fe80::483a:5aff:fee6:1f04]',
<ide> ];
<ide> const portsExpected = [
<ide> '4.... | 1 |
Ruby | Ruby | fix tests for sqlite3 3.6.xx | 6513dde490ac35aa6974d85377ecc9af4d2e20fd | <ide><path>activerecord/test/models/project.rb
<ide> class Project < ActiveRecord::Base
<ide> :after_add => Proc.new {|o, r| o.developers_log << "after_adding#{r.id || '<new>'}"},
<ide> :before_remove => Proc.new {|o, r| o.developers_log << "before_removing#{r.id}... | 1 |
Python | Python | follow symlinks in dag_folder and plugins_folder | 80caf6a38c011673d89883faed931255df416064 | <ide><path>airflow/models.py
<ide> def collect_dags(
<ide> self.process_file(dag_folder, only_if_updated=only_if_updated)
<ide> elif os.path.isdir(dag_folder):
<ide> patterns = []
<del> for root, dirs, files in os.walk(dag_folder):
<add> for root, dirs, files in os.... | 2 |
Java | Java | implement touch intercepting in rctview | d23f86e47b2e4364b4b56649ea64bd48faf4c5e5 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/flat/FlatViewGroup.java
<ide> import android.content.Context;
<ide> import android.graphics.Canvas;
<ide> import android.graphics.drawable.Drawable;
<add>import android.view.MotionEvent;
<ide> import android.view.View;
<ide> import android.view.ViewGroup;
<ide> i... | 3 |
Go | Go | add more tests to unix_test.go | e802b69146ac7a008d943a3a289fba56150b4f81 | <ide><path>pkg/beam/unix_test.go
<ide> func TestSocketPair(t *testing.T) {
<ide> fmt.Printf("still open: %v\n", a.Fd())
<ide> }
<ide>
<add>func TestUSocketPair(t *testing.T) {
<add> a, b, err := USocketPair()
<add> if err != nil {
<add> t.Fatal(err)
<add> }
<add>
<add> data := "hello world!"
<add> go func() {
<add> ... | 1 |
Ruby | Ruby | fix rubocop offenses | 7d9758a05ecf8cef93ba919568579cd0bee58c82 | <ide><path>Library/Homebrew/extend/os/mac/hardware/cpu.rb
<ide> def features
<ide> "machdep.cpu.features",
<ide> "machdep.cpu.extfeatures",
<ide> "machdep.cpu.leaf7_features",
<del> ).split(" ").map { |s| s.downcase.to_sym }
<add> ).split.map { |s| s.downcase.to_sym }
<ide> ... | 5 |
Go | Go | stop invalid calls to registry | d47507791e14908e78cf38d415a9863c9ef75c5e | <ide><path>server.go
<ide> func (srv *Server) ImagePull(localName string, tag string, out io.Writer, sf *ut
<ide> localName = remoteName
<ide> }
<ide>
<del> err = srv.pullRepository(r, out, localName, remoteName, tag, endpoint, sf, parallel)
<del> if err == registry.ErrLoginRequired {
<add> if err = srv.pullReposit... | 1 |
Javascript | Javascript | increase default idletimeout to 1 minute | a7128eebe7e72859af878c61a1600b26239d02df | <ide><path>lib/WebpackOptionsDefaulter.js
<ide> class WebpackOptionsDefaulter extends OptionsDefaulter {
<ide> value.store = "pack";
<ide> }
<ide> if (value.idleTimeout === undefined) {
<del> value.idleTimeout = 10000;
<add> value.idleTimeout = 60000;
<ide> }
<ide> if (value.idleTimeoutForI... | 1 |
Python | Python | move lookuplemmatizer to spacy.lemmatizer | 820bf850752962714a378b20de12ddbefe69f3e8 | <ide><path>spacy/lemmatizer.py
<ide> def lemmatize(string, index, exceptions, rules):
<ide> if not forms:
<ide> forms.append(string)
<ide> return set(forms)
<add>
<add>
<add>class LookupLemmatizer(Lemmatizer):
<add> @classmethod
<add> def load(cls, path, lookup):
<add> return cls(lookup or ... | 2 |
Javascript | Javascript | remove log in jsdevsupportmodule | 87690570c8147f57db2af2f4c9984ac5db9ec5c9 | <ide><path>Libraries/Utilities/JSDevSupportModule.js
<ide> var JSDevSupportModule = {
<ide>
<ide> var result = renderer.getInspectorDataForViewTag(tag);
<ide> var path = result.hierarchy.map( (item) => item.name).join(' -> ');
<del> console.error('StackOverflowException rendering JSComponent: ' + path);
<id... | 1 |
Java | Java | improve behaviorprocessor javadoc | a1c3ba9c885ac6b069b304f6b18c2bfe37278fdc | <ide><path>src/main/java/io/reactivex/processors/BehaviorProcessor.java
<ide> * <p>
<ide> * <img width="640" height="460" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/S.BehaviorProcessor.png" alt="">
<ide> * <p>
<add> * This processor does not have a public constructor by design; a new empty... | 1 |
Javascript | Javascript | replace 2 spaces with 1 tab | 859e0ddab6045e5d697daacf72e26f95f6e4f797 | <ide><path>lib/Compiler.js
<ide> Watching.prototype._done = function(err, compilation) {
<ide> this.handler(null, stats);
<ide> if(!this.closed) {
<ide> this.watch(compilation.fileDependencies, compilation.contextDependencies, compilation.missingDependencies);
<del> }
<add> }
<ide> this.callbacks.forEach(function... | 1 |
PHP | PHP | update the listsources | 3f984b68facd9ba3c1eaa49d87d2bd115a87ce61 | <ide><path>lib/Cake/Model/Datasource/Database/Mssql.php
<ide> public function enabled() {
<ide> *
<ide> * @return array Array of tablenames in the database
<ide> */
<del> function listSources() {
<add> public function listSources() {
<ide> $cache = parent::listSources();
<del>
<del> if ($cache != null) {
<add> i... | 1 |
Text | Text | add a period at the end of an ul tag | dba157e7c058469f66f62b898b12990ae0388364 | <ide><path>curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-bulleted-unordered-list.md
<ide> dashedName: create-a-bulleted-unordered-list
<ide>
<ide> HTML has a special element for creating <dfn>unordered lists</dfn>, or bullet point style lists.
<ide>
<del>Unordered lists start wi... | 1 |
Javascript | Javascript | make hostcomponent inexact | 9354dd2752239b72b3c183c75256a7830d2938c0 | <ide><path>packages/react-native-renderer/src/ReactNativeTypes.js
<ide> export type NativeMethods = {
<ide> };
<ide>
<ide> export type NativeMethodsMixinType = NativeMethods;
<del>export type HostComponent<T> = AbstractComponent<
<del> T,
<del> $ReadOnly<$Exact<NativeMethods>>,
<del>>;
<add>export type HostComponent... | 1 |
Ruby | Ruby | remove duplicated tests from shared generator | 2b355757d5485beb42a4184e28621d86daced862 | <ide><path>railties/test/generators/app_generator_test.rb
<ide> def test_http_only_generates_config_middleware_and_generator_http_only_setup
<ide>
<ide> def test_http_only_generates_application_controller_with_action_controller_http
<ide> run_generator [destination_root, "--http-only"]
<del> assert_file "app/... | 2 |
Python | Python | correct openapi test for common prefixes | 178a2dc786461fdd03da0496dccdce7fb4676072 | <ide><path>tests/schemas/test_openapi.py
<ide> def test_paths_construction(self):
<ide> assert 'post' in example_operations
<ide>
<ide> def test_prefixed_paths_construction(self):
<del> """Construction of the `paths` key with a common prefix."""
<add> """Construction of the `paths` key mainta... | 1 |
Text | Text | update troubleshooting guide from slack to discord | 2f4a8f33a3fffa4085a9e66fabfa1e715296e257 | <ide><path>docs/Troubleshooting.md
<ide> You can then pass `dispatch` down to other components manually, if you want to.
<ide>
<ide> ## Something else doesn’t work
<ide>
<del>Ask around on the **#redux** [Reactiflux](http://reactiflux.com/) Slack channel, or [create an issue](https://github.com/rackt/redux/issues). ... | 1 |
Text | Text | add note about next_data hydration | f7ac942e6ae990d6fedaae487f00ed777ef65f02 | <ide><path>docs/api-reference/data-fetching/get-initial-props.md
<ide> For the initial page load, `getInitialProps` will run on the server only. `getIn
<ide> - `getInitialProps` can **not** be used in children components, only in the default export of every page
<ide> - If you are using server-side only modules inside ... | 3 |
Javascript | Javascript | fix bug in `classed` operator | be857135840e4b276c57920f980a50aedc18cdab | <ide><path>d3.js
<del>d3 = {version: "0.28.0"}; // semver
<add>d3 = {version: "0.28.1"}; // semver
<ide> if (!Date.now) Date.now = function() {
<ide> return +new Date();
<ide> };
<ide> function d3_selection(groups) {
<ide> // If no value is specified, return the first value.
<ide> if (arguments.length < 2) {
... | 4 |
Mixed | Ruby | add days_in_year method | 55b463f599dafc719da4a395f77482049b00f2d7 | <ide><path>activesupport/CHANGELOG.md
<add>* Added `Time#days_in_year` to return the number of days in the given year, or the
<add> current year if no argument is provided.
<add>
<add> *Jon Pascoe*
<add>
<ide> * Updated `parameterize` to preserve the case of a string, optionally.
<ide>
<ide> Example:
<ide><path>... | 3 |
Text | Text | clarify section introducing callbacks | 90888debd00b752a0cdc446dae4067ee2ce7037f | <ide><path>docs/docs/tutorial.md
<ide> We use the `ref` attribute to assign a name to a child component and `this.refs`
<ide>
<ide> When a user submits a comment, we will need to refresh the list of comments to include the new one. It makes sense to do all of this logic in `CommentBox` since `CommentBox` owns the stat... | 1 |
Text | Text | fix align documentation with the code | b22769194262a700728be9b912cce2f63383bca0 | <ide><path>docs/basic-features/data-fetching.md
<ide> export async function getStaticProps(context) {
<ide> The `context` parameter is an object containing the following keys:
<ide>
<ide> - `params` contains the route parameters for pages using dynamic routes. For example, if the page name is `[id].js` , then `params`... | 1 |
Ruby | Ruby | remove html_types set | 1fe0a1b5ebebb1372968606b85ce08b93bc145c8 | <ide><path>actionpack/lib/action_dispatch/http/mime_type.rb
<del>require 'set'
<ide> require 'singleton'
<ide> require 'active_support/core_ext/module/attribute_accessors'
<ide> require 'active_support/core_ext/string/starts_ends_with'
<ide> def const_defined?(sym, inherit = true)
<ide> # end
<ide> # end
<ide... | 2 |
Java | Java | add missing completable marbles (+19, 07/19a) | 382ba69afe6fdaab90682f9d37c32b4f538bb5c0 | <ide><path>src/main/java/io/reactivex/Completable.java
<ide> public final Completable compose(CompletableTransformer transformer) {
<ide>
<ide> /**
<ide> * Concatenates this Completable with another Completable.
<add> * <p>
<add> * <img width="640" height="317" src="https://raw.github.com/wiki/Reactiv... | 1 |
Text | Text | add command for e2e tests to docs | 68ba32d356326f1ce1dc6fbf99af4ad5fe92e0ea | <ide><path>docs/how-to-setup-freecodecamp-locally.md
<ide> A quick reference to the commands that you will need when working locally.
<ide> | `npm run test:curriculum --block='Basic HTML and HTML5'` | Test a specific Block. |
<ide> | `npm run test:curri... | 1 |
Javascript | Javascript | ensure dom ready before testing | daed7ad5dd4c86ea88932d2e9ed8f184bb5a603b | <ide><path>client/src/client/frame-runner.js
<ide> async function initTestFrame(e = {}) {
<ide> // eval test string to actual JavaScript
<ide> // This return can be a function
<ide> // i.e. function() { assert(true, 'happy coding'); }
<del> // eslint-disable-next-line no-eval
<del> const tes... | 1 |
Text | Text | use code markup/markdown in headers | d592efe10acb04ae64fbc5b17cac518abc418b2b | <ide><path>doc/api/querystring.md
<ide> query strings. It can be accessed using:
<ide> const querystring = require('querystring');
<ide> ```
<ide>
<del>## querystring.decode()
<add>## `querystring.decode()`
<ide> <!-- YAML
<ide> added: v0.1.99
<ide> -->
<ide>
<ide> The `querystring.decode()` function is an alias for ... | 1 |
Javascript | Javascript | check challenges for all langs | 515999070d208306a29ef82a226efa2955452ca6 | <ide><path>curriculum/test/test-challenges.js
<ide> const ChallengeTitles = require('./utils/challengeTitles');
<ide> const { challengeSchemaValidator } = require('../schema/challengeSchema');
<ide> const { challengeTypes } = require('../../client/utils/challengeTypes');
<ide>
<add>const { supportedLangs } = require('... | 2 |
Java | Java | fix wrong upstream type | 85da0a8f68cae914e85b9e674431fa9531f94f20 | <ide><path>src/main/java/io/reactivex/internal/operators/observable/ObservableSubscribeOn.java
<ide> public final class ObservableSubscribeOn<T> extends AbstractObservableWithUpstream<T, T> {
<ide> final Scheduler scheduler;
<ide>
<del> public ObservableSubscribeOn(Observable<T> source, Scheduler scheduler) {
<... | 1 |
PHP | PHP | update doc block | 631da2d04adbe2838a757a85ded421c0ae88393f | <ide><path>lib/Cake/Controller/Component/CookieComponent.php
<ide> public function startup(Controller $controller) {
<ide> * @param string|array $key Key for the value
<ide> * @param mixed $value Value
<ide> * @param boolean $encrypt Set to true to encrypt value, false otherwise
<del> * @param integer|string $expire... | 1 |
Javascript | Javascript | fix lint error | acb36abf753e524b03c15558537ef52f53e8f170 | <ide><path>test/parallel/test-tls-net-connect-prefer-path.js
<ide> common.refreshTmpDir();
<ide>
<ide> const tls = require('tls');
<ide> const net = require('net');
<del>const fs = require('fs');
<ide> const assert = require('assert');
<ide>
<ide> function libName(lib) { | 1 |
Javascript | Javascript | distribute crypto tests into separate files | becb4e980e9fde8f2e49f5d0326fed787bcc0c76 | <ide><path>test/parallel/test-crypto-cipher-decipher.js
<add>var common = require('../common');
<add>var assert = require('assert');
<add>
<add>try {
<add> var crypto = require('crypto');
<add>} catch (e) {
<add> console.log('Not compiled with OPENSSL support.');
<add> process.exit();
<add>}
<add>
<add>function test... | 8 |
Python | Python | serialize sequential models as yaml | f142d34ffc43b6eb7f57b21d2fa742585e1dbe60 | <ide><path>keras/models.py
<ide> import theano
<ide> import theano.tensor as T
<ide> import numpy as np
<del>import warnings, time, copy
<add>import warnings, time, copy, yaml
<add>
<add>from .layers.convolutional import *
<add>from .layers.core import *
<add>from .layers.embeddings import *
<add>from .layers.noise imp... | 1 |
Python | Python | support python 2 | 6a43dc9d7d592362d144209097e1d93876f8e88a | <ide><path>transformers/tokenization_bert_japanese.py
<ide> import collections
<ide> import logging
<ide> import os
<add>import six
<ide> import unicodedata
<ide> from io import open
<ide>
<ide> def tokenize(self, text, never_split=None, **kwargs):
<ide> never_split = self.never_split + (never_split if never_s... | 1 |
Ruby | Ruby | ignore memcached shadowing | 36576333274a609b6546d7f4c05f05909d87cfda | <ide><path>Library/Homebrew/formula_cellar_checks.rb
<ide> def check_shadowed_headers
<ide> return if formula.name == formula_name
<ide> end
<ide>
<del> return if MacOS.version < :mavericks && formula.name.start_with?("postgresql")
<add> if MacOS.version < :mavericks &&
<add> (formula.name.start_w... | 1 |
Java | Java | find exact matches in webjarsresourceresolver | 3d290165fb6b37544d23755f5182fac3478210f4 | <ide><path>spring-webmvc/src/main/java/org/springframework/web/servlet/resource/WebJarsResourceResolver.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");
... | 1 |
Go | Go | fix docker build | 5248f5c3d1d91ea4235ffe57962e38293af18f34 | <ide><path>pkg/chrootarchive/chroot_linux.go
<ide> func chroot(path string) (err error) {
<ide> }
<ide>
<ide> errCleanup := os.Remove(pivotDir)
<del> if errCleanup != nil {
<add> // pivotDir doesn't exist if pivot_root failed and chroot+chdir was successful
<add> // but we already cleaned it up on failed pivot_... | 1 |
Text | Text | delete unused definition in readme.md | ca3f9b75851aea0f82860ee17ddd907b57129121 | <ide><path>README.md
<ide> Information on the current Node.js Working Groups can be found in the
<ide> [Code of Conduct]: https://github.com/nodejs/TSC/blob/master/CODE_OF_CONDUCT.md
<ide> [Contributing to the project]: CONTRIBUTING.md
<ide> [Node.js Help]: https://github.com/nodejs/help
<del>[Node.js Moderation Policy... | 1 |
Text | Text | make enabling/disabling jupyter mode more explicit | cc66f47893a60596145cd62cba501d0d1410779e | <ide><path>website/docs/usage/visualizers.md
<ide> doc2 = nlp(LONG_NEWS_ARTICLE)
<ide> displacy.render(doc2, style="ent")
<ide> ```
<ide>
<del>> #### Enabling or disabling Jupyter mode
<del>>
<del>> To explicitly enable or disable "Jupyter mode", you can use the jupyter`
<del>> keyword argument – e.g. to return raw HT... | 1 |
Javascript | Javascript | exclude dotfiles when copying assets | 764bd8fa142c98979744027315f110718fba5953 | <ide><path>build/lib/include-path-in-packaged-app.js
<ide> module.exports = function (path) {
<ide> }
<ide>
<ide> const EXCLUDE_REGEXPS_SOURCES = [
<add> escapeRegExp('.DS_Store'),
<add> escapeRegExp('.jshintrc'),
<add> escapeRegExp('.npmignore'),
<add> escapeRegExp('.pairs'),
<add> escapeRegExp('.travis.yml'),
<... | 1 |
PHP | PHP | add whenempty + variants to collection | dfe84e68eee50fa53a8ca886628b6b8a3275a1ad | <ide><path>src/Illuminate/Support/Collection.php
<ide> public function when($value, callable $callback, callable $default = null)
<ide> return $this;
<ide> }
<ide>
<add> /**
<add> * Apply the callback if the collection is empty.
<add> *
<add> * @param bool $value
<add> * @param callab... | 2 |
Javascript | Javascript | fix components inside group helper | 6d9a2e5d4a042424f0f2f90c885c3d80224a6bc1 | <ide><path>packages/ember-handlebars/lib/helpers/binding.js
<ide> function bind(property, options, preserveContext, shouldDisplay, valueNormalizer
<ide> if ('object' === typeof this) {
<ide> if (data.insideGroup) {
<ide> observer = function() {
<add> while (view._contextView) {
<add> view = ... | 3 |
PHP | PHP | create enumerable contract | 7657da10f2a3b9e49270d371685fb836947ca724 | <ide><path>src/Illuminate/Support/Collection.php
<ide> * @property-read HigherOrderCollectionProxy $sum
<ide> * @property-read HigherOrderCollectionProxy $unique
<ide> */
<del>class Collection implements Arrayable, ArrayAccess, Countable, IteratorAggregate, Jsonable, JsonSerializable
<add>
<add>class Collection impl... | 2 |
Ruby | Ruby | remove useless call to mb_chars | 803e9bab84df9a93ca5f4613f710b6e088fbe64b | <ide><path>actionpack/lib/action_view/helpers/text_helper.rb
<ide> def excerpt(text, phrase, *args)
<ide> options.reverse_merge!(:radius => 100, :omission => "...")
<ide>
<ide> phrase = Regexp.escape(phrase)
<del> return unless found_pos = text.mb_chars =~ /(#{phrase})/i
<add> return unle... | 2 |
Javascript | Javascript | simplify diffiehellman getformat function | 3b8ab2ac7f875e39de446d8a7a98f824a5dae5b9 | <ide><path>lib/internal/crypto/diffiehellman.js
<ide> function encode(buffer, encoding) {
<ide> }
<ide>
<ide> function getFormat(format) {
<del> let f;
<ide> if (format) {
<ide> if (format === 'compressed')
<del> f = POINT_CONVERSION_COMPRESSED;
<del> else if (format === 'hybrid')
<del> f = POINT_C... | 1 |
Ruby | Ruby | fix fish caveats under env filtering | 55d97500565c02a70feb68dc747d9e4ef673068e | <ide><path>Library/Homebrew/caveats.rb
<ide> def keg_only_text
<ide>
<ide> def function_completion_caveats(shell)
<ide> return unless keg
<del> return unless which(shell.to_s)
<add> return unless which(shell.to_s, ENV["HOMEBREW_PATH"])
<ide>
<ide> completion_installed = keg.completion_installed?(shell... | 1 |
PHP | PHP | fix style issue | 84cc466c0e78140b15aade306dee6cea3dac5b59 | <ide><path>tests/Database/DatabaseEloquentRelationTest.php
<ide> public function testIgnoredModelsStateIsResetWhenThereAreExceptions()
<ide>
<ide> $this->fail('Exception was not thrown');
<ide> } catch (\Exception $exception) {
<del>
<add> // Does nothing.
<ide> }
<ide>
<ide> ... | 1 |
Python | Python | remove self.using_mysql attribute | 2ac45b011d04ac141a15abfc24cc054687cadbc2 | <ide><path>airflow/jobs/scheduler_job.py
<ide> def __init__(
<ide> # Check what SQL backend we use
<ide> sql_conn: str = conf.get_mandatory_value('database', 'sql_alchemy_conn').lower()
<ide> self.using_sqlite = sql_conn.startswith('sqlite')
<del> self.using_mysql = sql_conn.startswith('m... | 1 |
Python | Python | solve pr issues | 9c0da3dd4655ee7c58fee2c709670bec518c6354 | <ide><path>libcloud/compute/drivers/openstack.py
<ide> def _to_volume(self, api_node):
<ide>
<ide> return StorageVolume(
<ide> id=api_node['id'],
<del> name=api_node.get('name', api_node.get('displayName', None)),
<add> name=api_node.get('name', api_node.get('displayName')),
<... | 1 |
PHP | PHP | fix formattting and make getter | bba04a1598c44a892e918c4f308407b0d297f217 | <ide><path>src/Illuminate/Routing/Route.php
<ide> public function secure()
<ide> }
<ide>
<ide> /**
<del> * Get the domain defined for the route.
<add> * Get or set the domain for the route.
<ide> *
<del> * @return string|null
<add> * @param string|null $domain
<add> * @return $this
<... | 1 |
PHP | PHP | add grammar typehint | a2e186009d10523ecdcb8037c8522f772342818a | <ide><path>src/Illuminate/Database/Schema/Grammars/RenameColumn.php
<ide> class RenameColumn
<ide> * @param \Illuminate\Database\Connection $connection
<ide> * @return array
<ide> */
<del> public static function compile($grammar, Blueprint $blueprint, Fluent $command, Connection $connection)
<add> ... | 1 |
Ruby | Ruby | restore x11 description to --config output | 2761d3ee49cd3e2f9006733b8b1084cccb063e28 | <ide><path>Library/Homebrew/cmd/--config.rb
<ide> def describe_path path
<ide>
<ide> def describe_x11
<ide> return "N/A" unless MacOS::XQuartz.installed?
<del> return "#{MacOS::XQuartz.version} in " + describe_path(MacOS::XQuartz.prefix)
<add> return "#{MacOS::XQuartz.version} => " + describe_path(MacOS::X... | 1 |
Ruby | Ruby | add cask#outdated_info to format output | 65ff9155f8bb5b4e598fa015431b856b6115184b | <ide><path>Library/Homebrew/cask/cask.rb
<ide> def outdated_versions(greedy = false)
<ide> installed.reject { |v| v == version }
<ide> end
<ide>
<add> def outdated_info(greedy, verbose, json)
<add> if json
<add> {
<add> name: token,
<add> installed_versions: outdated_versions... | 1 |
Javascript | Javascript | replace react transform hmr with react refresh | d7c8ace00174d1b298e6520fb06035b664bf28ab | <ide><path>Libraries/Core/setUpDeveloperTools.js
<ide> if (__DEV__) {
<ide> });
<ide> }
<ide>
<del> // This is used by the require.js polyfill for hot reloading.
<del> // TODO(t9759686) Scan polyfills for dependencies, too
<del> const reload = require('../NativeModules/specs/NativeDevSettings').defa... | 2 |
Text | Text | fix minor typo | b2dc442a30303b9c27f3c8a44eed778223bd28ce | <ide><path>README.md
<ide> These inbound emails are routed asynchronously using Active Job to one or severa
<ide>
<ide> ## How does this compare to Action Mailer's inbound processing?
<ide>
<del>Rails has long had an anemic way of [receiving emails using Action Mailer](https://guides.rubyonrails.org/action_mailer_bas... | 1 |
Java | Java | protect stomp passcode from showing up in logs | 80812d30d4283c11ad74befa5879e4412e4e34be | <ide><path>spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaderAccessor.java
<ide> */
<ide> public class StompHeaderAccessor extends SimpMessageHeaderAccessor {
<ide>
<add> private static final AtomicLong messageIdCounter = new AtomicLong();
<add>
<ide> // STOMP header names
<ide>
<id... | 4 |
Javascript | Javascript | add missing semicolons | eecd123ecc7dc1365a3342077558694711101fbf | <ide><path>test/core/selection-test.js
<ide> suite.addBatch({
<ide> },
<ide> "selection prototype can be extended": function(selection) {
<ide> d3.selection.prototype.foo = function(v) { return this.attr("foo", v); };
<del> selection.select("body").foo(42)
<add> selection.select("body").foo(42);... | 2 |
Javascript | Javascript | handle ime input | 00933c7c637f374c7c20d4e23d59781d95a15810 | <ide><path>src/text-editor-component.js
<ide> class TextEditorComponent {
<ide> this.previousScrollHeight = 0
<ide> this.lastKeydown = null
<ide> this.lastKeydownBeforeKeypress = null
<del> this.openedAccentedCharacterMenu = false
<add> this.accentedCharacterMenuIsOpen = false
<ide> this.decoratio... | 1 |
Javascript | Javascript | fix nits in update view api documentation | 678ea5b2331fe48bb1f36a8a09fde713f2b73eeb | <ide><path>Libraries/Components/View/View.js
<ide> *
<ide> * @providesModule View
<ide> * @flow
<del> * @jsdoc
<ide> */
<ide> 'use strict';
<ide>
<ide> const View = React.createClass({
<ide>
<ide> propTypes: {
<ide> /**
<del> * When true, indicates that the view is an accessibility element. By default,
... | 1 |
Java | Java | use concurrent pattern with `mtagtoviewstate` | 99f2f5ffdd4b35e4d9b15ccc6deb55714fd686ef | <ide><path>ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java
<ide> public void run() {
<ide> });
<ide> }
<ide>
<del> /** Delete rootView and all children/ */
<add> /** Delete rootView and all children recursively. */
<ide> @UiThread
<ide> public void deleteRootView(int ... | 1 |
Ruby | Ruby | add json support to brew cask outdated | f2fa2c5d3095438b4bb387d58c426ad91f2b1378 | <ide><path>Library/Homebrew/cask/cmd/outdated.rb
<ide> class Cmd
<ide> class Outdated < AbstractCommand
<ide> option "--greedy", :greedy, false
<ide> option "--quiet", :quiet, false
<add> option "--json", :json, false
<ide>
<ide> def initialize(*)
<ide> super
<ide> self.ve... | 2 |
Java | Java | fix crash in fabricuimanager.onmeasure | 0f0c9866cacf29aac408be88894e262e8991890e | <ide><path>ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java
<ide> public void updateRootLayoutSpecs(
<ide> if (ENABLE_FABRIC_LOGS) {
<ide> FLog.d(TAG, "Updating Root Layout Specs");
<ide> }
<add>
<add> ThemedReactContext reactContext = mReactContextForRootTag.get(rootTag);
<add... | 1 |
Java | Java | remove functionlanguageadaptor from rxjava-core | 9fd3f3ed6ab9f70b0d61fc930b52c6b16d28faad | <ide><path>rxjava-core/src/main/java/rx/Observable.java
<ide> import rx.util.functions.Func4;
<ide> import rx.util.functions.FuncN;
<ide> import rx.util.functions.Function;
<del>import rx.util.functions.FunctionLanguageAdaptor;
<ide> import rx.util.functions.Functions;
<ide>
<ide> /**
<ide><path>rxjava-core/src/main/j... | 3 |
Python | Python | fix typo in 'self' | 20f5774acba6195fbf0611f37770a3490bb27f24 | <ide><path>numpy/distutils/fcompiler/__init__.py
<ide> def set_exe(exe_key, f77=None, f90=None):
<ide> set_exe('archiver')
<ide> set_exe('ranlib')
<ide>
<del> def update_executables(elf):
<add> def update_executables(self):
<ide> """Called at the beginning of customisation. Subclasses sho... | 1 |
Ruby | Ruby | reduce surface area of connectionspecification | b8fc0150d66866ce7e86c2608dc779fdd7688a61 | <ide><path>activerecord/lib/active_record/connection_adapters.rb
<ide> module ConnectionAdapters
<ide>
<ide> autoload :Column
<ide> autoload :ConnectionSpecification
<add> autoload :Resolver
<ide>
<ide> autoload_at "active_record/connection_adapters/abstract/schema_definitions" do
<ide> autoload ... | 22 |
Javascript | Javascript | expose posix realpath on windows as well | 6332a4cf00425c63ae476d89f6705881eb06a3e1 | <ide><path>lib/fs.js
<ide> fs.unwatchFile = function(filename) {
<ide>
<ide> var normalize = pathModule.normalize;
<ide>
<del>if (isWindows) {
<del> // Node doesn't support symlinks / lstat on windows. Hence realpath is just
<del> // the same as path.resolve that fails if the path doesn't exists.
<del>
<del> // wi... | 1 |
Python | Python | remove use of q objects | 894f63259880252ed5317ce485eb13c4429b65c1 | <ide><path>djangorestframework/mixins.py
<ide> from django.contrib.auth.models import AnonymousUser
<ide> from django.core.paginator import Paginator
<ide> from django.db.models.fields.related import ForeignKey
<del>from django.db.models.query import Q
<ide> from django.http import HttpResponse
<ide> from urlobject imp... | 1 |
PHP | PHP | fix paginatorcomponent tests | b02a34366c884ccac96bc61d2e1b69e2179d7db1 | <ide><path>lib/Cake/Test/TestCase/Controller/Component/PaginatorComponentTest.php
<ide> <?php
<ide> /**
<del> * PaginatorComponentTest file
<del> *
<del> * Series of tests for paginator component.
<del> *
<del> * PHP 5
<del> *
<ide> * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
<ide> *... | 1 |
Ruby | Ruby | rename the classes | 6d81eab13d65b7239444c9d0bfb14518755ddbc9 | <ide><path>activerecord/lib/active_record/connection_adapters.rb
<ide> module ConnectionAdapters
<ide> end
<ide>
<ide> autoload :Column
<del> autoload :Role
<del> autoload :RoleManager
<add> autoload :PoolConfig
<add> autoload :PoolManager
<ide> autoload :Resolver
<ide>
<ide> autoload_at "... | 16 |
Text | Text | add list of translatable footer links | 0a027ca2a5efa1e9e4921bc4da1b34eced415e05 | <ide><path>docs/language-lead-handbook.md
<ide> You can convert from one format to the other carefully changing it manually. Or
<ide> > [!TIP]
<ide> > A new workflow is being worked on, there will be only one place to change in the future.
<ide>
<add>## How to translate articles in the footer links
<add>
<add>There ar... | 1 |
Go | Go | fix the overlay cleanup in the multi-subnet case | 0b40559c694fe8077bc3e1c12971344579ccbf97 | <ide><path>libnetwork/drivers/overlay/joinleave.go
<ide> func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo,
<ide> return fmt.Errorf("subnet sandbox join failed for %q: %v", s.subnetIP.String(), err)
<ide> }
<ide>
<add> // joinSubnetSandbox gets called when an endpoint comes up on a new... | 2 |
Javascript | Javascript | fix alertios examples | a6bca4041bc95eb9fe43a61e1f4552c5551d9575 | <ide><path>Examples/UIExplorer/AlertIOSExample.js
<ide> exports.examples = [{
<ide> 'Hello World',
<ide> null,
<ide> [
<del> {text: 'OK', onPress: (text) => console.log('OK pressed')},
<del> ],
<del> 'default'
<add> {text: 'OK', onPress... | 1 |
Javascript | Javascript | remove unnecessary property and method | 6ad458b752e2c2818244714e499e560f6e668c87 | <ide><path>lib/module.js
<ide> Module.prototype._compile = function(content, filename) {
<ide> return Module._resolveFilename(request, self);
<ide> };
<ide>
<del> Object.defineProperty(require, 'paths', { get: function() {
<del> throw new Error('require.paths is removed. Use ' +
<del> 'nod... | 2 |
Ruby | Ruby | handle devel-only correctly | 3f318b8ed4f33fa1f27f5ce1816ca72513196208 | <ide><path>Library/Homebrew/cmd/install.rb
<ide> def install
<ide> end
<ide>
<ide> ARGV.formulae.each do |f|
<del> # Building head-only without --HEAD is an error
<del> if not ARGV.build_head? and f.stable.nil?
<add> # head-only without --HEAD is an error
<add> if not ARGV.build... | 1 |
Python | Python | add assert that git version is available. | 0498afea94525ea157e52b8edc255f13ed7d4004 | <ide><path>setup.py
<ide> def _minimal_ext_cmd(cmd):
<ide> except (subprocess.SubprocessError, OSError):
<ide> GIT_REVISION = "Unknown"
<ide>
<add> if not GIT_REVISION:
<add> # this shouldn't happen but apparently can (see gh-8512)
<add> GIT_REVISION = "Unknown"
<add>
<ide> return GIT_... | 1 |
Text | Text | update 11.0.0 changelog with missing commit | b32c5f04084a20e0db950a0b74b7b69d776e5e3f | <ide><path>doc/changelogs/CHANGELOG_V11.md
<ide> * [[`42bded83e8`](https://github.com/nodejs/node/commit/42bded83e8)] - **(SEMVER-MAJOR)** **fs**: throw ERR\_INVALID\_ARG\_VALUE when buffer being written is empty (AdityaSrivast) [#21262](https://github.com/nodejs/node/pull/21262)
<ide> * [[`7bd48896e9`](https://github.... | 1 |
Python | Python | add better error for failed model shortcut loading | 2a1fa86a0d90e555574801bda5d04a38b34b620a | <ide><path>spacy/cli/download.py
<ide> from ._util import app, Arg, Opt
<ide> from .. import about
<ide> from ..util import is_package, get_base_version, run_command
<del>
<del># These are the old shortcuts we previously supported in spacy download. As of
<del># v3, shortcuts are deprecated so we're not expecting to ad... | 3 |
Text | Text | update some literal translations in index.md | f48af0d2f66c9a4c05f806819cdb7aae64189513 | <ide><path>guide/spanish/agile/the-agile-manifesto/index.md
<ide> Estamos descubriendo mejores formas de desarrollar software haciéndolo y ayudan
<ide> A través de este trabajo, hemos llegado a valorar.
<ide>
<ide> * **Individuos e interacciones** sobre procesos y herramientas.
<del>* **Software de trabajo** sobre... | 1 |
Text | Text | commit 7/8 rosetta tokenize | ca2b97f11e4d8a9067fe1f3458368e215fc8cee0 | <ide><path>curriculum/challenges/english/10-coding-interview-prep/rosetta-code/tokenize-a-string-with-escaping.english.md
<ide> tests:
<ide> <div id='js-seed'>
<ide>
<ide> ```js
<del>function tokenize(str, esc, sep) {
<add>function tokenize(str, sep, esc) {
<ide> return true;
<ide> }
<ide> ``` | 1 |
Python | Python | avoid recalculation of output in join merge | 5352e46e09c1f586cb173f6bb2f0d6a01a9aa0a9 | <ide><path>keras/layers/core.py
<ide> def get_output(self, train=False):
<ide> if X.name is None:
<ide> raise ValueError("merge_mode='join' only works with named inputs")
<ide> else:
<del> inputs[X.name] = self.layers[i].get_output(train)
<add> ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.