content_type stringclasses 8
values | main_lang stringclasses 7
values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
Python | Python | make version number 0.9.9 until 1.0 comes out | ec6d0629236081a4e24e632f603aa4a0b56926a3 | <ide><path>numpy/lib/function_base.py
<ide> def unique(x):
<ide> """
<ide> try:
<ide> tmp = x.flatten()
<add> if tmp.size == 0:
<add> return tmp
<ide> tmp.sort()
<ide> idx = concatenate(([True],tmp[1:]!=tmp[:-1]))
<ide> return tmp[idx]
<ide><path>numpy/version.p... | 2 |
Javascript | Javascript | remove references to internals apis | 94764ee08910726db1db7a1101c3001500306dea | <ide><path>lib/grunt/utils.js
<ide> module.exports = {
<ide> var mapFile = minFile + '.map';
<ide> var mapFileName = mapFile.match(/[^\/]+$/)[0];
<ide> var errorFileName = file.replace(/\.js$/, '-errors.json');
<del> var versionNumber = this.getVersion().number;
<add> var versionNumber = this.getVersi... | 2 |
PHP | PHP | add ability to directly inject an engine instance | 83b4e2577104731a851d864df7d4c8de57ab62cc | <ide><path>lib/Cake/Cache/Cache.php
<ide> protected static function _buildEngine($name) {
<ide> if (!is_subclass_of($cacheClass, 'Cake\Cache\CacheEngine')) {
<ide> throw new Error\CacheException(__d('cake_dev', 'Cache engines must use Cake\Cache\CacheEngine as a base class.'));
<ide> }
<del> static::$_engines[$... | 2 |
PHP | PHP | remove option that does not exist anymore | 61a54c1f5ead3d5d85d21149e21aded259d5fd00 | <ide><path>tests/TestCase/View/Helper/FormHelperTest.php
<ide> public function testInputDate() {
<ide> $this->Form->create($this->article);
<ide> $result = $this->Form->input('month_year', array(
<ide> 'label' => false,
<del> 'div' => false,
<ide> 'type' => 'date',
<ide> 'minYear' => 2006,
<ide> ... | 1 |
Text | Text | add documentation for running multiple daemons | 3152a706c9b662eb30fd571d42a70f92584a0542 | <ide><path>docs/reference/commandline/dockerd.md
<ide> has been provided in flags and `cluster-advertise` not, `cluster-advertise`
<ide> can be added in the configuration file without accompanied by `--cluster-store`
<ide> Configuration reload will log a warning message if it detects a change in
<ide> previously config... | 1 |
Javascript | Javascript | move infinite assertions into constructors | 97556aff45969de4153e1d792076700a0f2c405e | <ide><path>dist/immutable.js
<ide> var $Iterable = Iterable;
<ide> return new ToKeyedSequence(this, true);
<ide> },
<ide> toMap: function() {
<del> assertNotInfinite(this.size);
<ide> return Map(this.toKeyedSeq());
<ide> },
<ide> toObject: function() {
<ide> var $Iterable = Iterable;
<ide> return... | 9 |
Javascript | Javascript | improve proxy inspection | 4bfc06f6b5aa9278f4ed4b84d462448750c840c4 | <ide><path>lib/internal/util/inspect.js
<ide> function formatProxy(ctx, proxy, recurseTimes) {
<ide> formatValue(ctx, proxy[1], recurseTimes)
<ide> ];
<ide> ctx.indentationLvl -= 2;
<del> const str = reduceToSingleString(ctx, res, '', ['[', ']']);
<del> return `Proxy ${str}`;
<add> return reduceToSingleStrin... | 2 |
Python | Python | remove unused schema | 7adffc5361b921e36a8c60a8072c9126650311c4 | <ide><path>spacy/schemas.py
<ide> class ModelMetaSchema(BaseModel):
<ide> # fmt: on
<ide>
<ide>
<del># JSON training format
<del>
<del>
<del>class TrainingSchema(BaseModel):
<del> # TODO: write
<del>
<del> class Config:
<del> title = "Schema for training data in spaCy's JSON format"
<del> extr... | 1 |
Javascript | Javascript | add http header setting scenarios | f53a6fb48b743b20286dd500a4689614ead39e3b | <ide><path>benchmark/http/_http_simple.js
<ide> var http = require('http');
<ide>
<ide> var port = parseInt(process.env.PORT || 8000);
<ide>
<del>var fixed = 'C'.repeat(20 * 1024),
<del> storedBytes = {},
<del> storedBuffer = {},
<del> storedUnicode = {};
<add>var fixed = 'C'.repeat(20 * 1024);
<add>var storedByte... | 2 |
Javascript | Javascript | eliminate capture of clientrequest in agent | c04d4df08c0ba10d4402b09796233fb4f7b52c6c | <ide><path>lib/_http_agent.js
<ide> Agent.prototype.createSocket = function createSocket(req, options, cb) {
<ide> }
<ide> self.sockets[name].push(s);
<ide> debug('sockets', name, self.sockets[name].length);
<del>
<del> function onFree() {
<del> self.emit('free', s, options);
<del> }
<del> s.o... | 1 |
Java | Java | add getters to rsocketmessagehandler | 7b1a6eb50a3ed32dd7158a8553c60ebc115cc296 | <ide><path>spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/RSocketMessageHandler.java
<ide> public void setMetadataExtractor(MetadataExtractor extractor) {
<ide> this.metadataExtractor = extractor;
<ide> }
<ide>
<add> /**
<add> * Return the configured {@link #setMetadataExtr... | 1 |
Ruby | Ruby | add test for per-cask `cleanup` | 911edb0ed77859445c3a48f6abe5b9be5807ebf7 | <ide><path>Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb
<ide> cache_location.rmtree
<ide> end
<ide>
<add> describe "cleanup" do
<add> it "removes cached downloads of given casks" do
<add> cleaned_up_cached_download = 'caffeine'
<add>
<add> cached_downloads = [
<add> ... | 1 |
Python | Python | change dag.tasks from a list to a dict | eca6a5a619bd7f1a995fa1522c5506146ab69882 | <ide><path>airflow/models.py
<ide> def __init__(
<ide> del self.default_args['params']
<ide>
<ide> validate_key(dag_id)
<del> self.tasks = []
<add> self.task_dict = dict()
<ide> self.dag_id = dag_id
<ide> self.start_date = start_date
<ide> self.end_date = end_d... | 4 |
Python | Python | move location of flatnonzero | d372798ae6bf88c3a4414027341d2b0322941c68 | <ide><path>numpy/core/numeric.py
<ide> 'load', 'loads', 'isscalar', 'binary_repr', 'base_repr',
<ide> 'ones', 'identity', 'allclose',
<ide> 'seterr', 'geterr', 'setbufsize', 'getbufsize',
<del> 'seterrcall', 'geterrcall',
<add> 'seterrcall', 'geterrcall', 'flatnonzer... | 3 |
Go | Go | use github.com/pkg/errors to wrap an error | f775005a17c7ae0d3851cc86f46b7c46aafa27d8 | <ide><path>daemon/logger/awslogs/cloudwatchlogs.go
<ide> package awslogs
<ide>
<ide> import (
<ide> "bytes"
<del> "errors"
<ide> "fmt"
<ide> "os"
<ide> "regexp"
<ide> import (
<ide> "github.com/docker/docker/daemon/logger/loggerutils"
<ide> "github.com/docker/docker/dockerversion"
<ide> "github.com/docker/docke... | 1 |
Java | Java | use response encoding when escaping html | a0c210457bda606eba58f367678bdefc69d5cd15 | <ide><path>spring-web/src/main/java/org/springframework/web/util/WebUtils.java
<ide> public abstract class WebUtils {
<ide> */
<ide> public static final String HTML_ESCAPE_CONTEXT_PARAM = "defaultHtmlEscape";
<ide>
<add> /**
<add> * Use of response encoding for HTML escaping parameter at the servlet context level
... | 9 |
Javascript | Javascript | fix non-bound function | fddb3b0737234cdf871291c5fa51cb9e5c3a5d2e | <ide><path>packager/src/lib/GlobalTransformCache.js
<ide> class OptionsHasher {
<ide> }
<ide>
<ide> relativizeFilePaths(filePaths: Array<string>): Array<string> {
<del> return filePaths.map(this.relativizeFilePath);
<add> return filePaths.map(this.relativizeFilePath.bind(this));
<ide> }
<add>
<ide> relat... | 1 |
Python | Python | use serializer instead of modelserializer | c3b841ae449c66102be7305416eca8acb22c8c42 | <ide><path>rest_framework/fields.py
<ide> def from_native(self, value):
<ide> if not self.allow_none:
<ide> return ''
<ide> else:
<del> # return None explicitly because smart_text(None) == 'None'
<del> # see #1834 for details
<add> # R... | 2 |
PHP | PHP | use secret config var consistently | dcd7382c7c71ec86ba772ec83ee471c40e60131c | <ide><path>src/Auth/DigestAuthenticate.php
<ide> class DigestAuthenticate extends BasicAuthenticate
<ide> * Besides the keys specified in BaseAuthenticate::$_defaultConfig,
<ide> * DigestAuthenticate uses the following extra keys:
<ide> *
<del> * - `secret` The secret to use for nonce validation. Def... | 1 |
Text | Text | fix gitpod dead link | 5138c302bb98b4ea0a34fb03bf067c8219058ffd | <ide><path>README.md
<ide> try {
<ide>
<ide> You can use Gitpod, an online IDE(which is free for Open Source) for contributing or running the examples online.
<ide>
<del>[](https://gitpod.io/#https://github.com/axios/axios/blob/master/examples/server.js)
<... | 1 |
Python | Python | fix redefinition of ret type from str to tuple | a9ebe31cdf1f839587403e2a53ede12a3ec6b0a6 | <ide><path>glances/logger.py
<ide>
<ide> """Custom logger class."""
<ide>
<del>import logging
<ide> import os
<ide> import tempfile
<ide> import json
<del>from logging.config import dictConfig
<add>
<add>import logging
<add>import logging.config
<add>
<add>LOG_FILENAME = os.path.join(tempfile.gettempdir(), 'glances.l... | 1 |
Javascript | Javascript | use prettier api | 40fbed572112a4ac90566fc822e33eb8cb4986c3 | <ide><path>scripts/prettier/index.js
<ide>
<ide> const chalk = require('chalk');
<ide> const glob = require('glob');
<del>const path = require('path');
<ide> const execFileSync = require('child_process').execFileSync;
<add>const prettier = require('prettier');
<add>const fs = require('fs');
<ide>
<ide> const mode = p... | 1 |
Ruby | Ruby | remove unused codes | 06c72c43bac5608a9b0623506782144f80e1b150 | <ide><path>activerecord/lib/active_record/associations/alias_tracker.rb
<ide> def aliased_name_for(table_name, aliased_name = nil)
<ide> end
<ide> end
<ide>
<del> def pluralize(table_name, base)
<del> base.pluralize_table_names ? table_name.to_s.pluralize : table_name.to_s
<del> end
<del... | 1 |
Python | Python | fix handling of old entity ruler files | 570ab1f481fabbbc520d965e14494637680a22b9 | <ide><path>spacy/pipeline/entityruler.py
<ide> def from_disk(self, path, **kwargs):
<ide> DOCS: https://spacy.io/api/entityruler#from_disk
<ide> """
<ide> path = ensure_path(path)
<del> if path.is_file():
<del> patterns = srsly.read_jsonl(path)
<add> depr_patterns_path =... | 2 |
Javascript | Javascript | fix path issues in windows | 4f9bd50aced23e48c709b99c7dd51b01ff8a50bf | <ide><path>src/ripgrep-directory-searcher.js
<ide> module.exports = class RipgrepDirectorySearcher {
<ide> const output = []
<ide>
<ide> for (let pattern of globs) {
<add> // we need to replace path separators by slashes since globs should
<add> // always use always slashes as path separators.
<add> ... | 1 |
Text | Text | fix some translation error | c6a59c0ae63834b90f854f32f0b3ebdf2acbe3e9 | <ide><path>docs/docs/01-why-react.zh-CN.md
<ide> React 是一个 Facebook 和 Instagram 用来创建用户界面的 JavaScript
<ide>
<ide> ## 构建可组合的组件
<ide>
<del>React is all about building reusable components. In fact, with React the *only* thing you do is build components. Since they're so encapsulated, components make code reuse, testing,... | 1 |
Mixed | Java | use elevation to implement shadows on android | b65f1f223488b52963f80a67bb41956103263d27 | <ide><path>Libraries/Components/View/ViewStylePropTypes.js
<ide> var ViewStylePropTypes = {
<ide> ),
<ide> shadowOpacity: ReactPropTypes.number,
<ide> shadowRadius: ReactPropTypes.number,
<add> /**
<add> * (Android-only) Sets the elevation of a view, using Android's underlying
<add> * [elevation API](https:... | 3 |
PHP | PHP | add void return type to setup and teardown methods | 8fc3a75b413267a30e41464d358c1d0714a6a186 | <ide><path>src/Illuminate/Foundation/Testing/TestCase.php
<ide> abstract public function createApplication();
<ide> *
<ide> * @return void
<ide> */
<del> protected function setUp()
<add> protected function setUp(): void
<ide> {
<ide> if (! $this->app) {
<ide> $this->refreshA... | 220 |
Ruby | Ruby | adjust link command for updated error handling | 72d83adaf379d69f3b353a55acff7dc9e30a5656 | <ide><path>Library/Homebrew/cmd/link.rb
<ide> def link
<ide> end
<ide>
<ide> keg.lock do
<del> print "Linking #{keg}... " do
<del> puts if ARGV.verbose?
<del> puts "#{keg.link(mode)} symlinks created"
<add> print "Linking #{keg}... "
<add> puts if ARGV.verbose?
<add>
... | 1 |
Javascript | Javascript | remove unused field | 1074c75f32be8932bb0974a044be2717830d3954 | <ide><path>web/viewer.js
<ide> var Cache = function cacheCache(size) {
<ide>
<ide> var RenderingQueue = (function RenderingQueueClosure() {
<ide> function RenderingQueue() {
<del> this.busy = false;
<ide> this.items = [];
<ide> }
<ide> | 1 |
Mixed | Ruby | improve help for rake tasks | 718814a4f2e0430f53d9d45d317da0d2657b98e4 | <ide><path>railties/CHANGELOG.md
<add>* Show Rake task description if command is run with -h.
<add>
<add> Adding `-h` (or `--help`) to a Rails command that's a Rake task, now returns
<add> the task description instead of the general Rake help.
<add>
<add> *Petrik de Heus*
<add>
<ide> * Fix `config_for` err... | 3 |
Mixed | Python | add callback to copy vocab/tokenizer from model | bdb485cc80ca6822471eac0a29ac2782d9b55450 | <ide><path>spacy/errors.py
<ide> class Errors:
<ide> E202 = ("Unsupported alignment mode '{mode}'. Supported modes: {modes}.")
<ide>
<ide> # New errors added in v3.x
<add> E872 = ("Unable to copy tokenizer from base model due to different "
<add> 'tokenizer settings: current tokenizer config "{cu... | 4 |
Ruby | Ruby | fix appcast spec | f0ece0432d8c938d245dbca22fd2b08dc12cf7ff | <ide><path>Library/Homebrew/test/cask/audit_spec.rb
<ide> def tmp_cask(name, text)
<ide> end
<ide> end
<ide>
<del> describe "hosting with appcast checks" do
<del> let(:message) { /please add an appcast/ }
<add> describe "hosting with livecheck checks" do
<add> let(:message) { /please add a li... | 1 |
Python | Python | fix composable permissions | 74574217a4de871ea47cded715caa5e9876d3a6a | <ide><path>rest_framework/permissions.py
<ide> SAFE_METHODS = ('GET', 'HEAD', 'OPTIONS')
<ide>
<ide>
<del>class OperandHolder:
<add>class OperationHolderMixin:
<add> def __and__(self, other):
<add> return OperandHolder(AND, self, other)
<add>
<add> def __or__(self, other):
<add> return OperandHold... | 2 |
Ruby | Ruby | use specs when checking http content problems | 180d8ca2b2aa860e84764469dabfef6c0109fd01 | <ide><path>Library/Homebrew/resource_auditor.rb
<ide> def audit_urls
<ide> # pull request.
<ide> next if url.match?(%r{^https://dl.bintray.com/homebrew/mirror/})
<ide>
<del> if http_content_problem = curl_check_http_content(url)
<add> if http_content_problem = curl_check_http_cont... | 2 |
Javascript | Javascript | avoid redboxes when highlighting | c64f25ac85d32186c0400b8aa27785280cdf2799 | <ide><path>Libraries/Inspector/DevtoolsOverlay.js
<ide> export default function DevtoolsOverlay({
<ide> clearTimeout(hideTimeoutId);
<ide> // Shape of `node` is different in Fabric.
<ide> const component = node.canonical ?? node;
<add> if (!component) {
<add> return;
<add> }
<ide>
<i... | 1 |
Java | Java | log correct class name for introspection failure | d4ee75ddf041835e229d5a7857206030e8c5be65 | <ide><path>spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassUtils.java
<ide> public static boolean isLiteConfigurationCandidate(AnnotationMetadata metadata)
<ide> }
<ide> catch (Throwable ex) {
<ide> if (logger.isDebugEnabled()) {
<del> logger.debug("Failed to introspect @... | 1 |
Javascript | Javascript | stop quotes reloading | 6ce9482b22d6cfd234169fe6706e388e20322e38 | <ide><path>client/src/components/welcome/index.js
<ide> import { randomQuote } from '../../utils/get-words';
<ide>
<ide> import './welcome.css';
<ide>
<add>// created outside the function, so that the quotes don't change unless the
<add>// page is reloaded.
<add>
<add>const { quote, author } = randomQuote();
<add>
<i... | 1 |
Text | Text | update docs to new method of accessing addons | 7fa8c79d403af36871f098cd50cb954aa764ab15 | <ide><path>npm-react/README.md
<ide> To use React in production mode, set the environment variable `NODE_ENV` to `pro
<ide> ```js
<ide> var React = require('react');
<ide>
<del>// You can also access ReactWithAddons.
<del>var React = require('react/addons');
<add>// Addons can be accessed individually from the "addons... | 1 |
PHP | PHP | add more paths | 262dec16f8ee095d12ef10f94e85e442c04e5db2 | <ide><path>bootstrap/paths.php
<ide> */
<ide>
<ide> 'commands' => __DIR__.'/../app/src/Console',
<add> 'config' => __DIR__.'/../app/config',
<ide> 'controllers' => __DIR__.'/../app/src/Http/Controllers',
<add> 'database' => __DIR__.'/../app/database',
<ide> 'filters' => __DIR__.'/../app/src/Http/Filters',
<add> 'l... | 1 |
Javascript | Javascript | use pointer events for hover | 7e8992705a2e5b1721dcb2ffe788342fa6a2f2d0 | <ide><path>Libraries/Inspector/DevtoolsOverlay.js
<ide> import type {PressEvent} from '../Types/CoreEventTypes';
<ide> import type {HostRef} from './getInspectorDataForViewAtPoint';
<ide>
<ide> import View from '../Components/View/View';
<add>import ReactNativeFeatureFlags from '../ReactNative/ReactNativeFeatureFlags'... | 1 |
Javascript | Javascript | simplify expression in duration#as | 935c1fb0454561b377626982312a20f03d53ac4f | <ide><path>src/lib/duration/as.js
<ide> export function as (units) {
<ide> // handle milliseconds separately because of floating point math errors (issue #1867)
<ide> days = this._days + Math.round(yearsToDays(this._months / 12));
<ide> switch (units) {
<del> case 'week' : return da... | 1 |
Ruby | Ruby | fix pool_from_any_process to use most recent spec | e15a23fa355ed29d70c2ec573cd7b2418f7ac8db | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
<ide> def owner_to_pool
<ide> end
<ide>
<ide> def pool_from_any_process_for(spec_name)
<del> owner_to_pool = @owner_to_pool.values.find { |v| v[spec_name] }
<add> owner_to_pool = @owner_to_pool.v... | 2 |
Text | Text | track changes that need noting in 2.4 announcement | a90796c0f0d9db1a7d9bfaca8fbdfed22435c628 | <ide><path>docs/topics/2.4-accouncement.md
<ide> * Writable nested serializers.
<ide> * List/detail routes.
<ide> * 1.3 Support dropped, install six for <=1.4.?.
<del>* Note title ordering changed
<ide>\ No newline at end of file
<add>* `allow_none` for char fields | 1 |
PHP | PHP | implement new mechanism for extending blade | 534689d354261155afd2d0321c16afcac063537f | <ide><path>src/Illuminate/View/Compilers/BladeCompiler.php
<ide> class BladeCompiler extends Compiler implements CompilerInterface {
<ide> */
<ide> protected $extensions = array();
<ide>
<add> /**
<add> * All custom statement handlers.
<add> *
<add> * @var array
<add> */
<add> protected $statements = [];
<add>
... | 1 |
Python | Python | remove whitespace and comment changes | 2b51d5594b727e7a14b6e1c3c94e325898fb5213 | <ide><path>rest_framework/pagination.py
<ide> class CursorPagination(BasePagination):
<ide> http://cramer.io/2011/03/08/building-cursors-for-the-disqus-api/
<ide> """
<ide> cursor_query_param = 'cursor'
<del>
<del> # The default page size.
<del> # Defaults to `None`, meaning pagination is disabled.
<i... | 1 |
Ruby | Ruby | fix trap handling | 56a72fe2b1e35acb0df4179ecc79c7873a6f5d49 | <ide><path>Library/Homebrew/debrew/irb.rb
<ide>
<ide> # @private
<ide> module IRB
<del> def self.parse_opts(argv: nil); end
<del>
<ide> def self.start_within(binding)
<ide> unless @setup_done
<ide> setup(nil, argv: [])
<ide> def self.start_within(binding)
<ide> @CONF[:IRB_RC]&.call(irb.context)
<ide> ... | 1 |
Javascript | Javascript | remove foreach closures to reduce gc | 71f5abf7ae2e7fdf9a10eb16275446c357f442c7 | <ide><path>lib/Parser.js
<ide> class Parser extends Tapable {
<ide> if(classy.superClass)
<ide> this.walkExpression(classy.superClass);
<ide> if(classy.body && classy.body.type === "ClassBody") {
<del> classy.body.body.forEach(methodDefinition => {
<add> for(const methodDefinition of classy.body.body)
<ide> ... | 1 |
Text | Text | realign a wrong indentation. | 8f7f79a1bfcc6c7c19e7256b0909acb058600709 | <ide><path>guide/english/go/functions/index.md
<ide> func duplicate(s string) (first, second string) {
<ide> }
<ide>
<ide> func main() {
<del> fmt.Println(split("Hello world!")) // ("Hello world!", "Hello world!")
<add> fmt.Println(split("Hello world!")) // ("Hello world!", "Hello world!")
<ide> }
<ide> ```
<ide> | 1 |
PHP | PHP | add ability to load template files | 2575b944623d267687767e7eb01162cf27bfc486 | <ide><path>Cake/Test/TestApp/Config/test_templates.php
<add><?php
<add>/**
<add> * Template strings for testing.
<add> */
<add>$config = [
<add> 'link' => '<a href="{{url}}">{{text}}</a>',
<add>];
<ide><path>Cake/Test/TestApp/Plugin/TestPlugin/Config/test_templates.php
<add><?php
<add>$config = [
<add> 'italic' => '<em... | 4 |
Python | Python | add more tests for the kubernetes executor | bb43e06c75dd6cafc094813347f7a7b13cb9374e | <ide><path>tests/executors/test_kubernetes_executor.py
<ide> from kubernetes.client.rest import ApiException
<ide> from urllib3 import HTTPResponse
<ide>
<add>from airflow import AirflowException
<ide> from airflow.utils import timezone
<ide> from tests.test_utils.config import conf_vars
<ide>
<ide> def test_process_... | 1 |
Javascript | Javascript | fix code styling for consistency | 239f120583ddc5c30ee96ccb38f6ba7e74f5f9d8 | <ide><path>packages/container/lib/main.js
<ide> define("container",
<ide> register: function(type, name, factory, options) {
<ide> var fullName;
<ide>
<del> if (type.indexOf(':') !== -1){
<add> if (type.indexOf(':') !== -1) {
<ide> options = factory;
<ide> factory = name... | 140 |
Mixed | Javascript | add capturerejection option | ae8f20ec5eee55f648823392c9c4e9491c958b60 | <ide><path>doc/api/events.md
<ide> myEmitter.emit('error', new Error('whoops!'));
<ide> // Prints: whoops! there was an error
<ide> ```
<ide>
<add>## Capture Rejections of Promises
<add>
<add>> Stability: 1 - captureRejections is experimental.
<add>
<add>Using `async` functions with event handlers is problematic, beca... | 3 |
Python | Python | increase verbosity so we see which tests run | 7bfc0970f7e927b54a216bc82e2a56aee43b3e5b | <ide><path>integration/storage/__main__.py
<ide> if __name__ == '__main__':
<ide> loader = unittest.TestLoader()
<ide> tests = loader.discover(os.path.dirname(__file__))
<del> runner = unittest.runner.TextTestRunner()
<add> runner = unittest.runner.TextTestRunner(verbosity=3)
<ide> result = runner.run... | 1 |
Javascript | Javascript | replace var with let/const | f393d668817ce694466d91e8c5074fc0e123e06a | <ide><path>lib/events.js
<ide> EventEmitter.prototype.emit = function emit(type, ...args) {
<ide> } else {
<ide> const len = handler.length;
<ide> const listeners = arrayClone(handler, len);
<del> for (var i = 0; i < len; ++i) {
<add> for (let i = 0; i < len; ++i) {
<ide> const result = ReflectApp... | 1 |
Go | Go | improve jsonfilelog read benchmark | 961d32868c79d4542d1a2d892344c0ac636166e8 | <ide><path>daemon/logger/jsonfilelog/read_test.go
<ide> import (
<ide> "bytes"
<ide> "encoding/json"
<ide> "io"
<add> "path/filepath"
<ide> "testing"
<ide> "time"
<ide>
<ide> "github.com/docker/docker/daemon/logger"
<ide> "gotest.tools/v3/assert"
<del> "gotest.tools/v3/fs"
<ide> )
<ide>
<ide> func BenchmarkJSO... | 1 |
Text | Text | reset `caching_with_rails.md` file | b2e9c4c4095e6735f6c5e5299c1ff12e9c88d935 | <ide><path>guides/source/caching_with_rails.md
<ide> A more complex, production Redis cache store may look something like this:
<ide> cache_servers = %w(redis://cache-01:6379/0 redis://cache-02:6379/0)
<ide> config.cache_store = :redis_cache_store, { url: cache_servers,
<ide>
<del> connect_timeout: 30, # Defaults... | 1 |
PHP | PHP | fix context/plural related issues in i18n | 0c4ae66fe0401f502115da8c1b3f25ff9b4dbd91 | <ide><path>src/I18n/Formatter/IcuFormatter.php
<ide> public function format($locale, $message, array $vars)
<ide> return $this->_formatMessage($locale, $message, $vars);
<ide> }
<ide>
<del> if (isset($vars['_context'], $message['_context'])) {
<del> $message = $message['_context']... | 6 |
Python | Python | set version to v3.0.0a35 | 1a500f9717bd92b2d376bde6aec387e3dfd92878 | <ide><path>spacy/about.py
<ide> # fmt: off
<ide> __title__ = "spacy-nightly"
<del>__version__ = "3.0.0a34"
<add>__version__ = "3.0.0a35"
<ide> __download_url__ = "https://github.com/explosion/spacy-models/releases/download"
<ide> __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compa... | 1 |
Javascript | Javascript | use getbrowserbodytext for hmr test | 6e4f0d8e700d95ac792f409a4a8c66ea4e74751e | <ide><path>test/integration/basic/test/hmr.js
<ide> import webdriver from 'next-webdriver'
<ide> import { readFileSync, writeFileSync, renameSync, existsSync } from 'fs'
<ide> import { join } from 'path'
<del>import { waitFor, check } from 'next-test-utils'
<add>import { waitFor, check, getBrowserBodyText } from 'next-... | 3 |
Python | Python | pass image object to node constructor | 5da76d6fe9a230a71c1b185bc41ba4aa8d5a890d | <ide><path>libcloud/container/drivers/kubernetes.py
<ide> def _to_node(self, data):
<ide> cpu = data["status"].get("capacity", {}).get("cpu", 1)
<ide> if not isinstance(cpu, int):
<ide> cpu = int(cpu.rstrip("m"))
<del> extra_size = {"cpus": cpu}
<add> # TODO: Find image
<add> ... | 1 |
Javascript | Javascript | escape double quotes in error displays | 1429a71474a3b70a16cba0b82bf23c4f73b63efc | <ide><path>docs/src/ngdoc.js
<ide> Doc.prototype = {
<ide> minerrMsg = lookupMinerrMsg(self);
<ide> dom.tag('pre', {
<ide> class:'minerr-errmsg',
<del> 'error-display': minerrMsg
<add> 'error-display': minerrMsg.replace(/"/g, '"')
<ide> }, minerrMsg);
<ide> ... | 1 |
Javascript | Javascript | update emberarray invoke docs to use native class | fe400156e6ece41739e6dfbb6992fd35b3179a1d | <ide><path>packages/@ember/-internals/runtime/lib/mixins/array.js
<ide> const ArrayMixin = Mixin.create(Enumerable, {
<ide> Prototype 1.6.
<ide>
<ide> ```javascript
<del> const Person = EmberObject.extend({
<del> name: null,
<add> class Person {
<add> name = null;
<add>
<add> constructor(n... | 1 |
Python | Python | fix normalization tests | c98633cd7c0922800bc63656a2d899aa768362e7 | <ide><path>tests/keras/layers/test_normalization.py
<ide> def test_batchnorm_shapes():
<ide> Test batch normalization with various input shapes
<ide> """
<ide> for inp in input_shapes:
<del> norm_m0 = normalization.BatchNormalization(input_shape=inp.shape, mode=0)
<add> norm_m0 = normalization... | 1 |
Javascript | Javascript | accept relative --transformer paths everywhere | 588f01e9982775f0699c7bfd56623d4ed3949810 | <ide><path>local-cli/bundle/buildBundle.js
<ide>
<ide> const log = require('../util/log').out('bundle');
<ide> const outputBundle = require('./output/bundle');
<add>const path = require('path');
<ide> const Promise = require('promise');
<ide> const saveAssets = require('./saveAssets');
<ide> const Server = require('..... | 5 |
Javascript | Javascript | use a callback ref in the real world example | c18266e1f7ef876adca194637da046e87c45a7c1 | <ide><path>examples/real-world/src/components/Explore.js
<ide> export default class Explore extends Component {
<ide> }
<ide>
<ide> getInputValue = () => {
<del> return this.refs.input.value
<add> return this.input.value
<ide> }
<ide>
<ide> setInputValue = (val) => {
<ide> // Generally mutating DOM ... | 1 |
PHP | PHP | use end to get last element of array | 42765659c16f5327c1d5c826b82b71a3c3cef4ee | <ide><path>src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
<ide> public function getForeignKeyName()
<ide> {
<ide> $segments = explode('.', $this->getQualifiedForeignKeyName());
<ide>
<del> return $segments[count($segments) - 1];
<add> return end($segments);
<ide> }
<ide>
<id... | 1 |
Javascript | Javascript | remove default callback context | 76084372c29a59b3fa790ea4d2687f0767514999 | <ide><path>build/tasks/build.js
<ide> module.exports = function( grunt ) {
<ide> baseUrl: "src",
<ide> name: "jquery",
<ide>
<add> // Allow strict mode
<add> useStrict: true,
<add>
<ide> // We have multiple minify steps
<ide> optimize: "none",
<ide>
<ide><path>src/deferred.js
<ide> define( [
<ide> ".... | 4 |
Ruby | Ruby | use nullable `id` column instead of a primary key | 5409e5e31b00f05d4e706d2086a3205974a25886 | <ide><path>activerecord/test/schema/schema.rb
<ide> t.index :id, unique: true
<ide> end
<ide>
<del> create_table :subscribers, force: true do |t|
<add> create_table :subscribers, id: false, force: true do |t|
<ide> t.string :nick, null: false
<ide> t.string :name
<add> t.integer :id
<ide> t.inte... | 1 |
Python | Python | replace assert with assert_ | 33ba9bea35467837de0dedd46ee4b78a17bd8211 | <ide><path>numpy/core/tests/test_regression.py
<ide> def test_endian_bool_indexing(self,level=rlevel):
<ide> yb = ((b>2) & (b<6))
<ide> assert_array_almost_equal(xa,ya.nonzero())
<ide> assert_array_almost_equal(xb,yb.nonzero())
<del> assert(np.all(a[ya] > 0.5))
<del> assert(np.all(... | 2 |
Python | Python | fix meta serialization in train | 27a1cd3c630055802513a20c1e75d0b37943cc39 | <ide><path>spacy/cli/train.py
<ide> def train(
<ide> with nlp.use_params(optimizer.averages):
<ide> final_model_path = output_path / "model-final"
<ide> nlp.to_disk(final_model_path)
<add> srsly.write_json(final_model_path / "meta.json", meta)
<add>
<ide> meta_loc ... | 1 |
Text | Text | add missing date to 4.10.0-beta.2 in changelog | c5d614ad7c1a7b62b797d55b8e5ea2d089dae9e7 | <ide><path>CHANGELOG.md
<ide>
<ide> - [#20284](https://github.com/emberjs/ember.js/pull/20284) [BUGFIX] remove incorrect types for deprecation functions
<ide>
<del>## v4.10.0-beta.2
<add>## v4.10.0-beta.2 (November 30, 2022)
<ide>
<ide> - [#20283](https://github.com/emberjs/ember.js/pull/20283) [BUGFIX] revert TS `c... | 1 |
Python | Python | add test for quadraticequation() | 7cf3db184320a454e545882408b8c2f561ef0cdb | <ide><path>maths/quadratic_equations_complex_numbers.py
<del>import math
<add>from math import sqrt
<add>from typing import Tuple
<ide>
<del>def QuadraticEquation(a,b,c):
<add>
<add>def QuadraticEquation(a: int, b: int, c: int) -> Tuple[str, str]:
<add> """
<add> Given the numerical coefficients a, b and c,
<add... | 1 |
Text | Text | add list of todos | d6651387549688df188a930e1d24f9df39b6ee35 | <ide><path>_randomgen/TODO.md
<add># TODO
<add>0. Use inheritance to simplify CorePRNG structure. The natural base is
<add> xoroshiro128.
<add>1. Add PCG64
<add>2. Add dSFMT
<add>3. Add xorshift2014
<add>4. Augment state to include has_gauss and gauss
<add>5. Augment state to have binomial structure
<add>6. Port ove... | 1 |
Javascript | Javascript | add form "acceptcharset" to htmldompropertyconfig | 70a7506bb9fdb597ea064474ac74a8d084674b96 | <ide><path>src/browser/ui/dom/HTMLDOMPropertyConfig.js
<ide> var HTMLDOMPropertyConfig = {
<ide> * Standard Properties
<ide> */
<ide> accept: null,
<add> acceptCharset: null,
<ide> accessKey: null,
<ide> action: null,
<ide> allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
<ide> var ... | 1 |
Ruby | Ruby | add an option to skip jbuilder | f5c5d21681616c6b9240792092e656d3d1af385b | <ide><path>railties/lib/rails/generators/app_base.rb
<ide> def self.add_shared_options_for(name)
<ide> class_option :skip_sprockets, type: :boolean, aliases: '-S', default: false,
<ide> desc: 'Skip Sprockets files'
<ide>
<add> class_option :skip_jbuilder, ... | 1 |
PHP | PHP | update urlhelper to use asset class | 8d9609313d8d20f199c442e789754639836f821f | <ide><path>src/Routing/Asset.php
<ide> public static function url(string $path, array $options = []): string
<ide> $path .= $options['ext'];
<ide> }
<ide>
<add> // Check again if path has protocol as `pathPrefix` could be for CDNs.
<ide> if (preg_match('|^([a-z0-9]+:)?//|', $path)) {... | 5 |
Python | Python | move batch norm between dense and activation | 859b92b8f8a288fcadeafa93314ea77192a7aca1 | <ide><path>research/object_detection/meta_architectures/context_rcnn_lib_tf2.py
<ide> def __init__(self, projection_dimension, **kwargs):
<ide> momentum=0.97,
<ide> trainable=True)
<ide> self.projection = tf.keras.layers.Dense(units=projection_dimension,
<del> ... | 1 |
PHP | PHP | simplify facade to use swap method only | b3079f35c0470e4615a2aa3abd9a50fff412c3c5 | <ide><path>src/Illuminate/Support/Facades/Date.php
<ide>
<ide> namespace Illuminate\Support\Facades;
<ide>
<del>use DateTimeInterface;
<ide> use ReflectionException;
<del>use InvalidArgumentException;
<ide> use Illuminate\Support\Carbon;
<ide>
<ide> /**
<ide> */
<ide> class Date extends Facade
<ide> {
<del> /**
... | 2 |
Ruby | Ruby | add preferred_perl to built_on | 91ab5fe0cec459978d9809b22e86095797df833d | <ide><path>Library/Homebrew/extend/os/mac/development_tools.rb
<ide> def custom_installation_instructions
<ide>
<ide> def build_system_info
<ide> build_info = {
<del> "xcode" => MacOS::Xcode.version.to_s.presence,
<del> "clt" => MacOS::CLT.version.to_s.presence,
<add> "xcode" ... | 1 |
Javascript | Javascript | move color helpers to helpers.color | 4a737729d5ca1718510796d1391b8a8991968efd | <ide><path>src/helpers/helpers.color.js
<add>import colorLib from '@kurkle/color';
<add>
<add>/**
<add> * @param {string | CanvasGradient | CanvasPattern} value
<add> */
<add>const isPatternOrGradient = (value) => value instanceof CanvasGradient || value instanceof CanvasPattern;
<add>
<add>/**
<add> * @param {string|C... | 2 |
PHP | PHP | apply fixes from styleci | f31557f76ac5a790d66b717e074537031c48085e | <ide><path>src/Illuminate/Testing/TestResponse.php
<ide> public function assertJson($value, $strict = false)
<ide> }
<ide> }
<ide>
<del>
<ide> return $this;
<ide> }
<ide> | 1 |
PHP | PHP | add api docs for encryptedcookiemiddleware | 437cc514422dd31f4e21478a3813d3f70b4a6cb1 | <ide><path>src/Http/Middleware/EncryptedCookieMiddleware.php
<ide> use Psr\Http\Message\ServerRequestInterface;
<ide>
<ide> /**
<del> * Encrypt/Decrypt cookie data.
<add> * Middlware for encrypting & decrypting cookies.
<ide> *
<ide> * This middleware layer will encrypt/decrypt the named cookies with the given key
<... | 1 |
Text | Text | remove useless code block in docs | 6468b6c9bf929bb2bd8177b491d642ebfc7e5f03 | <ide><path>packages/next/README.md
<ide> Please see our [contributing.md](/contributing.md).
<ide> - Tony Kovanen ([@tonykovanen](https://twitter.com/tonykovanen)) – [ZEIT](https://zeit.co)
<ide> - Guillermo Rauch ([@rauchg](https://twitter.com/rauchg)) – [ZEIT](https://zeit.co)
<ide> - Dan Zajdband ([@impronunciable](... | 1 |
Python | Python | fix numpy.distutils to find atlas blas on ubuntu | 3f45eaa310b0ead7270d56697018173dc4b7daad | <ide><path>numpy/distutils/system_info.py
<ide> def _check_libs(self, lib_dirs, libs, opt_libs, exts):
<ide> found_libs, found_dirs = [], []
<ide> for dir_ in lib_dirs:
<ide> found_libs1 = self._lib_list(dir_, libs, exts)
<del> if found_libs1:
<del> ... | 1 |
Ruby | Ruby | allow custom endpoints for s3 | 4dd44bc5e894d5a6e7f40881f318fa67e9aa1a77 | <ide><path>lib/active_storage/service/s3_service.rb
<ide> class ActiveStorage::Service::S3Service < ActiveStorage::Service
<ide> attr_reader :client, :bucket
<ide>
<del> def initialize(access_key_id:, secret_access_key:, region:, bucket:)
<del> @client = Aws::S3::Resource.new(access_key_id: access_key_id, secret... | 1 |
Go | Go | skip testauthapi if no network is available | 2fae3d2693648d1c0f5cc079f37aaba5116ba5f9 | <ide><path>integration-cli/docker_api_auth_test.go
<ide> import (
<ide>
<ide> // Test case for #22244
<ide> func (s *DockerSuite) TestAuthApi(c *check.C) {
<add> testRequires(c, Network)
<ide> config := types.AuthConfig{
<ide> Username: "no-user",
<ide> Password: "no-password", | 1 |
Javascript | Javascript | add test for 18253 | bd7f49282a489663cccdb7a2a948a60c62a51f29 | <ide><path>packages/@ember/-internals/glimmer/tests/integration/components/tracked-test.js
<ide> if (EMBER_METAL_TRACKED_PROPERTIES) {
<ide> runTask(() => this.$('button').click());
<ide>
<ide> this.assertText('1');
<add>
<add> runTask(() => this.$('button').click());
<add>
<add> this.ass... | 1 |
Mixed | Ruby | add upcase_first method | 7047e5562118d23c66c390b004f74ed35b90ab14 | <ide><path>activesupport/CHANGELOG.md
<add>* Add `String#upcase_first` method.
<add>
<add> *Glauco Custódio*
<add>
<ide> ## Rails 5.0.0.beta3 (February 24, 2016) ##
<ide>
<ide> * Deprecate arguments on `assert_nothing_raised`.
<ide><path>activesupport/lib/active_support/core_ext/string/inflections.rb
<ide> def... | 4 |
Javascript | Javascript | remove obsolete locale files | 6382e21fb28541a2484ac1a241d41cf9fbbe9d2c | <ide><path>src/ngLocale/angular-locale_chr.js
<del>angular.module("ngLocale", [], ["$provide", function($provide) {
<del>var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
<del>$provide.value("$locale", {"DATETIME_FORMATS":{"MONTH":["ᎤᏃᎸᏔᏅ","ᎧᎦᎵ","ᎠᏅᏱ","ᎧᏬᏂ","ᎠᏂᏍᎬᏘ",... | 42 |
Javascript | Javascript | remove console log | faf0d78f3e58cb19a89e63788121df79507cf7f9 | <ide><path>src/atom-environment.js
<ide> class AtomEnvironment {
<ide> this.config.resetUserSettings(userSettings)
<ide>
<ide> if (projectSettings != null && projectSettings.config != null) {
<del> console.log(projectSettings)
<ide> this.project.replace(projectSettings)
<ide> }
<ide> | 1 |
Javascript | Javascript | perform hasownproperty check in relay flight | 12627f93b5357032881412abcc014da53a0b70f8 | <ide><path>packages/react-transport-dom-relay/src/ReactFlightDOMRelayServerHostConfig.js
<ide> export function processErrorChunk(
<ide> ];
<ide> }
<ide>
<add>const hasOwnProperty = Object.prototype.hasOwnProperty;
<add>
<ide> function convertModelToJSON(
<ide> request: Request,
<ide> parent: {+[key: string]: Rea... | 4 |
Javascript | Javascript | use result of geturl() | 9a9e35891161d111f5de5d5adc4c3bad620db07e | <ide><path>packages/next-server/lib/router/router.js
<ide> export default class Router {
<ide> if (typeof window !== 'undefined') {
<ide> // in order for `e.state` to work on the `onpopstate` event
<ide> // we have to register the initial route upon initialization
<del> this.changeState('replaceSta... | 1 |
Text | Text | add waffle.io badge | 2eb3ac41a658b86bed79b9712c1c89d7cdacdf11 | <ide><path>README.md
<add>[](https://waffle.io/FreeCodeCamp/freecodecamp)
<ide> <img src="https://s3.amazonaws.com/freecodecamp/logo4.0LG.png">
<ide>
<ide> Free Code Camp! | 1 |
Java | Java | avoid synthesizing annotations unnecessarily | 8265db0ae1d83a1e204e602fa96e542c2677977f | <ide><path>spring-core/src/main/java/org/springframework/core/annotation/AnnotationTypeMapping.java
<ide> final class AnnotationTypeMapping {
<ide>
<ide> private final Map<Method, List<Method>> aliasedBy;
<ide>
<add> private final boolean synthesizable;
<add>
<ide> private final Set<Method> claimedAliases = new Has... | 4 |
Javascript | Javascript | fix whitespaces [ci-skip] | 536b75079328620dcc6e1adf55f6532d9daf2df3 | <ide><path>packages/ember-glimmer/lib/component.js
<ide> export const BOUNDS = symbol('BOUNDS');
<ide> tagName: 'em'
<ide> });
<ide> ```
<del>
<add>
<ide> Would result in instances with the following HTML:
<ide>
<ide> ```html
<ide> const Component = CoreView.extend(
<ide>
<ide> ```javascript
<ide> ... | 1 |
Javascript | Javascript | remove unused variables from net tests | 1762db0142b137d0dcc949cd38894a2b07adf18a | <ide><path>test/parallel/test-net-create-connection.js
<ide> server.listen(tcpPort, 'localhost', function() {
<ide>
<ide> function fail(opts, errtype, msg) {
<ide> assert.throws(function() {
<del> var client = net.createConnection(opts, cb);
<add> net.createConnection(opts, cb);
<ide> }, function(e... | 7 |
Javascript | Javascript | detect missing postmortem metadata | 76b9cf5424d01b7449e3b4902d305d3a04f355ea | <ide><path>test/v8-updates/test-postmortem-metadata.js
<ide> const symbols = nm.stdout.toString().split('\n').reduce((filtered, line) => {
<ide>
<ide> return filtered;
<ide> }, []);
<add>
<add>assert.notStrictEqual(symbols.length, 0, 'No postmortem metadata detected');
<add>
<ide> const missing = getExpectedSymbols(... | 1 |
Javascript | Javascript | add strict equalities in src/display/svg.js | 4a82dac45b7faa6c4d0e825ce84e5b41f614077a | <ide><path>src/display/svg.js
<ide> var SVGGraphics = (function SVGGraphicsClosure(ctx) {
<ide>
<ide> var self = this;
<ide> for (var i = 0; i < fnArrayLen; i++) {
<del> if (OPS.dependency == fnArray[i]) {
<add> if (OPS.dependency === fnArray[i]) {
<ide> var deps = argsArray[i];
<id... | 1 |
Ruby | Ruby | raise error when `from` is used with `delete_all` | 9e477df7c969e6a0590707fe1df0959cfdad52b1 | <ide><path>activerecord/lib/active_record/relation.rb
<ide> class Relation
<ide> :reverse_order, :distinct, :create_with, :skip_query_cache]
<ide>
<ide> CLAUSE_METHODS = [:where, :having, :from]
<del> INVALID_METHODS_FOR_DELETE_ALL = [:distinct, :group, :having]
<add> INVALID_METH... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.