patch
stringlengths
17
31.2k
y
int64
1
1
oldf
stringlengths
0
2.21M
idx
int64
1
1
id
int64
4.29k
68.4k
msg
stringlengths
8
843
proj
stringclasses
212 values
lang
stringclasses
9 values
@@ -0,0 +1,10 @@ +class CreateTestClientRequests < ActiveRecord::Migration + def change + create_table :test_client_requests do |t| + t.decimal :amount + t.string :project_title + + t.timestamps null: false + end + end +end
1
1
16,008
did you mean to leave this in here?
18F-C2
rb
@@ -54,6 +54,7 @@ var ( labels = flag.String("labels", "", "List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores (_), lowercase characters, and numbers. Values must contain only hyphens (-), underscores (_), lowercase characters, and ...
1
// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
10,339
Mention that it only applies to Windows. This is kind of implied, but better to be explicit.
GoogleCloudPlatform-compute-image-tools
go
@@ -28,6 +28,8 @@ var ( autoStake = true index = uint64(10) senderKey = identityset.PrivateKey(27) + zero = "0" + negtive = "-10" ) func TestCreateStake(t *testing.T) {
1
// Copyright (c) 2020 IoTeX Foundation // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use...
1
21,173
again: it is a bad practice to have some global parameters with such common names for unit test purpose.
iotexproject-iotex-core
go
@@ -21,10 +21,7 @@ class Shopware6Connector private ?string $token; - /** - * @var \DateTimeInterface - */ - private $expiresAt; + private \DateTimeInterface $expiresAt; public function __construct(Configurator $configurator) {
1
<?php /** * Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved. * See LICENSE.txt for license details. */ declare(strict_types=1); namespace Ergonode\ExporterShopware6\Infrastructure\Connector; use Ergonode\ExporterShopware6\Infrastructure\Connector\Action\PostAccessToken; use GuzzleHttp\Client; use G...
1
9,029
Should we use `\DateTimeInterface` or `DateTimeInterface` and declaration of `DateTimeInterface` in `use`?
ergonode-backend
php
@@ -7,11 +7,15 @@ import ( "errors" "fmt" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/aws/cloudformation" "github.com/aws/copilot-cli/internal/pkg/deploy" + "github.com/aws/copilot-cli/internal/pkg/deploy/cloudformation/stack" ) +const taskStackPrefix = "task-" + // Deploy...
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cloudformation import ( "errors" "fmt" "github.com/aws/copilot-cli/internal/pkg/aws/cloudformation" "github.com/aws/copilot-cli/internal/pkg/deploy" "github.com/aws/copilot-cli/internal/pkg/deplo...
1
16,017
What do you think of moving this stack related constant to the `stack` pkg?
aws-copilot-cli
go
@@ -100,6 +100,9 @@ func TxnPool(s *transactions.SignedTxn, ctx Context, verificationPool execpool.B if s.Txn.Src() == zeroAddress { return errors.New("empty address") } + if !proto.SupportRekeying && (s.AuthAddr != basics.Address{}) { + return errors.New("nonempty AuthAddr but rekeying not supported") + } ...
1
// Copyright (C) 2019-2020 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) ...
1
38,028
Hm, I guess that you're doing this here since `WellFormed` is on a `transactions.Transaction` and not a `transactions.SignedTxn`, but quickly grepping through our code, it looks like we always a `SignedTxn` around when calling `WellFormed` (except maybe some tests?)... this doesn't have to happen here, but maybe we sho...
algorand-go-algorand
go
@@ -39,4 +39,6 @@ storiesOf( 'Global', module ) <ModulesList /> </WithTestRegistry> ); + }, { + padding: 0, } );
1
/** * Modules List stories. * * Site Kit by Google, Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * ...
1
38,265
This story also needs the default padding.
google-site-kit-wp
js
@@ -745,7 +745,7 @@ public class MockDirectoryWrapper extends BaseDirectoryWrapper { maybeThrowDeterministicException(); } if (!LuceneTestCase.slowFileExists(in, name)) { - throw randomState.nextBoolean() ? new FileNotFoundException(name + " in dir=" + in) : new NoSuchFileException(name + " in dir...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
38,198
Hmm why did we remove the randomness about which (confusingly) different exception to throw here? This randomness was (is?) useful to help test that Lucene indeed catches `FNFE` and `NSFE` interchangeably.
apache-lucene-solr
java
@@ -1215,10 +1215,10 @@ ostree_repo_list_collection_refs (OstreeRepo *self, continue; } - if (match_collection_id != NULL && g_strcmp0 (match_collection_id, current_collection_id) != 0) + if (match_collection_id != NULL && g_strcmp0 (match_...
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2011,2013 Colin Walters <walters@verbum.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; eith...
1
11,944
Hm, so before in that case `current_collection_id` looks like it was actually an uninitialized pointer. It seems weird to me that the tests pass both ways. I haven't looked closely at the tests - is there something wrong there that causes this to spuriously pass before?
ostreedev-ostree
c
@@ -46,9 +46,13 @@ * If you will separate the definitions for the parsers, you must revise the * code related to the symbol table. */ typedef enum { - K_IGNORE = -2, - K_UNDEFINED, - K_CONSTANT, + /* parser private items */ + K_IGNORE = -16, + K_DEFINE, + + K_UNDEFINED = KEYWORD_NONE, + /* the followings items are...
1
/* * Copyright (c) 2003, Darren Hiebert * * This source code is released for free distribution under the terms of the * GNU General Public License version 2 or (at your option) any later version. * * This module contains functions for generating tags for the Verilog HDL * (Hardware Description Language). * * ...
1
19,419
s it the best way to tag "foo" of "`define foo ..." with constant kind? Introducing "d/definition" kind and tagging the "foo" with the definition kind is an alternative way. Using the unified kind "constant" in many areas reduces the information that client tools get from a tags file. In my experience, it is better to ...
universal-ctags-ctags
c
@@ -213,7 +213,6 @@ const CASE_TRANSLATION = { tlscafile: 'tlsCAFile', tlscertificatekeyfile: 'tlsCertificateKeyFile', tlscertificatekeyfilepassword: 'tlsCertificateKeyFilePassword', - wtimeout: 'wTimeoutMS', j: 'journal' };
1
'use strict'; const URL = require('url'); const qs = require('querystring'); const dns = require('dns'); const MongoParseError = require('./error').MongoParseError; const ReadPreference = require('./topologies/read_preference'); /** * The following regular expression validates a connection string and breaks the * pr...
1
16,461
is this a breaking change? If I'm not mistaken, this is translating a user-provided `wtimeout` in the connection string into `wTimeoutMS`
mongodb-node-mongodb-native
js
@@ -0,0 +1,7 @@ +import json + + +def lambda_handler(event, context): + # Just print the event was passed to lambda + print('{}'.format(json.dumps(event))) + return 0
1
1
10,657
Can we rename this file to `lambda_echo.py`, to be more descriptive and in line with the other files in this directory? (all files in this folder are lambda functions, after all)
localstack-localstack
py
@@ -33,9 +33,10 @@ type Seccomp struct { type Action int const ( - Kill Action = iota - 4 + Kill Action = iota - 5 Errno Trap + Trace Allow )
1
package configs import ( "bytes" "encoding/json" "os/exec" ) type Rlimit struct { Type int `json:"type"` Hard uint64 `json:"hard"` Soft uint64 `json:"soft"` } // IDMap represents UID/GID Mappings for User Namespaces. type IDMap struct { ContainerID int `json:"container_id"` HostID int `json:"host_id"...
1
8,588
why not do it like this ? <pre><code> const ( Kill Action = iota Errno Trap Allow Trace ) <pre><code>
opencontainers-runc
go
@@ -265,6 +265,7 @@ namespace NLog.Internal.FileAppenders /// <param name="expireTime">The time which prior the appenders considered expired</param> public void CloseAppenders(DateTime expireTime) { + lock(this) for (int i = 0; i < this.appenders.Length; ++i) ...
1
// // Copyright (c) 2004-2016 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of s...
1
13,087
lock(this) is a bad practise, since you lock the entire instance. cosider: var appenderCache = xxxx. lock(appenderCache) { Thread.Sleep(TimeSpan.FromHours(5)); } while inside AppenderCache instance lock(this) { is blocked 5 hours. } Its always better to make a class private lock objects.
NLog-NLog
.cs
@@ -135,7 +135,10 @@ func WithClientInfo(serviceName string, procedures []transport.Procedure, transp &ClientInfo{ clientDispatcher.ClientConfig(serviceName), grpcClientConn, - grpcheader.NewContextWrapper().WithCaller(serviceName + "-client").WithService(serviceName), + grpcheader.NewContextWrapper(). +...
1
// Copyright (c) 2017 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
13,714
should we use the constant above?
yarpc-yarpc-go
go
@@ -6979,8 +6979,8 @@ os_seek(file_t f, int64 offset, int origin) case OS_SEEK_END: { uint64 file_size = 0; - bool res = os_get_file_size_by_handle(f, &file_size); - ASSERT(res && "bad file handle?"); /* shouldn't fail */ + bool result = os_get_file_size_by_ha...
1
/* ********************************************************** * Copyright (c) 2010-2017 Google, Inc. All rights reserved. * Copyright (c) 2000-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
12,676
I think something like `size_res` would be more descriptive.
DynamoRIO-dynamorio
c
@@ -96,9 +96,9 @@ module Bolt @target = target @value = {} @action = 'apply' - value['report'] = report if report - value['_error'] = error if error - value['_output'] = metrics_message if metrics_message + @value['report'] = report if report + @value['_error'] = error if e...
1
# frozen_string_literal: true require 'json' require 'bolt/error' require 'bolt/result' module Bolt class ApplyResult < Result def self.puppet_missing_error(result) error_hash = result.error_hash exit_code = error_hash['details']['exit_code'] if error_hash && error_hash['details'] # If we get ...
1
17,145
Oh lol so this was...really more of a bug?
puppetlabs-bolt
rb
@@ -7,11 +7,11 @@ using System.Threading.Tasks; namespace Microsoft.Rest { - public class PlatformTaskEx + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", + "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", + Justification="We think with Ex is better than using 2")] + pu...
1
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System; using System.Threading; using System.Threading.Tasks; namespace Microsoft.Rest { public class PlatformTaskEx { //Per FxCop perform...
1
20,611
Well, it is providing a platform neutral way of calling Task or TaskEx. We could just call it PlatformTask.
Azure-autorest
java
@@ -89,7 +89,7 @@ struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display, }; xwayland->server = wlr_xwayland_server_create(wl_display, &options); if (xwayland->server == NULL) { - free(xwayland->server); + free(xwayland); return NULL; }
1
#define _POSIX_C_SOURCE 200809L #include <errno.h> #include <fcntl.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <stdlib.h> #include <sys/socket.h> #include <sys/types.h> #include <sys/wait.h> #include <time.h> #include <unistd.h> #include <wayland-server-core.h> #include <wlr/util/log.h> #incl...
1
15,476
Typo: this should free `xwayland` instead
swaywm-wlroots
c
@@ -19,9 +19,9 @@ package pingpong import ( "bytes" - "crypto/rand" "encoding/hex" "math" + "math/rand" "strings" "sync" "sync/atomic"
1
/* * Copyright (C) 2019 The "MysteriumNetwork/node" Authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
1
15,361
Is it ok to use "math/rand" instead of "crypto/rand" here? Do we need to protect this ID somehow?
mysteriumnetwork-node
go
@@ -2,7 +2,7 @@ package nats_dialog import ( "fmt" - "github.com/mgutz/logxi/v1" + log "github.com/cihub/seelog" "github.com/mysterium/node/communication" "github.com/mysterium/node/communication/nats" "github.com/mysterium/node/communication/nats_discovery"
1
package nats_dialog import ( "fmt" "github.com/mgutz/logxi/v1" "github.com/mysterium/node/communication" "github.com/mysterium/node/communication/nats" "github.com/mysterium/node/communication/nats_discovery" "github.com/mysterium/node/identity" dto_discovery "github.com/mysterium/node/service_discovery/dto" ) ...
1
9,993
Why did we have `logxi` in the first place? Maybe it makes sense to remove it from `glide.lock? It will safe us in the future from using logger which is not working.
mysteriumnetwork-node
go
@@ -269,9 +269,17 @@ public class DataCitation { out.write(title); out.write("},\r\n"); } + if(getUNF() != null){ + out.write("UNF = {"); + out.write(UNF); + out.write("},\r\n"); + } out.write("year = {"); out.write(year...
1
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.harvard.iq.dataverse; import edu.harvard.iq.dataverse.harvest.client.HarvestingClient; import java.io.BufferedWriter; imp...
1
39,153
Is there a reason to use `getUNF()` and `UNF` in the same block?
IQSS-dataverse
java
@@ -198,7 +198,7 @@ func TestParse(t *testing.T) { }, { name: "regex match operators", - raw: `"a" =~ /.*/ and "b" !~ /c/`, + raw: `"a" =~ /.*/ and "b" !~ /c$/`, want: &ast.Program{ Body: []ast.Statement{ &ast.ExpressionStatement{
1
package parser_test import ( "regexp" "testing" "github.com/google/go-cmp/cmp" "github.com/influxdata/flux/ast" "github.com/influxdata/flux/ast/asttest" "github.com/influxdata/flux/parser" ) func TestParse(t *testing.T) { tests := []struct { name string raw string want *ast.Program wantErr b...
1
8,793
Again this seems odd that megacheck cares
influxdata-flux
go
@@ -49,6 +49,9 @@ module Bolt @sudo_password = transport_conf[:sudo_password] @run_as = transport_conf[:run_as] @tmpdir = transport_conf[:tmpdir] + @service_url = transport_conf[:service_url] + @token_file = transport_conf[:token_file] + @environment = transport_conf[:environment] ...
1
require 'logger' require 'bolt/node_uri' require 'bolt/formatter' require 'bolt/result' require 'bolt/config' module Bolt class Node STDIN_METHODS = %w[both stdin].freeze ENVIRONMENT_METHODS = %w[both environment].freeze def self.from_uri(uri_string, **kwargs) uri = NodeURI.new(uri_string, k...
1
7,224
I assume this will resolve to nil if this isn't in the config?
puppetlabs-bolt
rb
@@ -17,6 +17,18 @@ namespace Datadog.Trace.Configuration /// <param name="data">A string containing key-value pairs which are comma-separated, and for which the key and value are colon-separated.</param> /// <returns><see cref="IDictionary{TKey, TValue}"/> of key value pairs.</returns> public...
1
using System.Collections.Concurrent; using System.Collections.Generic; using Datadog.Trace.ExtensionMethods; namespace Datadog.Trace.Configuration { /// <summary> /// A base <see cref="IConfigurationSource"/> implementation /// for string-only configuration sources. /// </summary> public abstract c...
1
19,521
I looks like we can make `allowOptionalMappings` non-optional since we have another overload without it. (I thought this generated a compiler warning, but maybe it's just R#)
DataDog-dd-trace-dotnet
.cs
@@ -76,12 +76,13 @@ class YOLOV3Neck(BaseModule): Args: num_scales (int): The number of scales / stages. - in_channels (int): The number of input channels. - out_channels (int): The number of output channels. - conv_cfg (dict): Config dict for convolution layer. Default: None. - ...
1
# Copyright (c) 2019 Western Digital Corporation or its affiliates. import torch import torch.nn.functional as F from mmcv.cnn import ConvModule from mmcv.runner import BaseModule from ..builder import NECKS class DetectionBlock(BaseModule): """Detection block in YOLO neck. Let out_channels = n, the Detect...
1
23,656
` per scale.` -> ` per scale.` need to clean the unnecessary blank space
open-mmlab-mmdetection
py
@@ -79,7 +79,8 @@ public class class194 { descriptor = "(IS)Ljava/lang/String;", garbageValue = "4096" ) - static final String method3712(int var0) { + @Export("inventoryQuantityFormat") + static final String inventoryQuantityFormat(int var0) { if (var0 < 100000) { // L: 421 return "<col=ffff00>" + var0 ...
1
import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; @ObfuscatedName("gd") public class class194 { @ObfuscatedName("z") @ObfuscatedSignature( descriptor = "Lgd;" ) public static final class194 field2371; @ObfuscatedName("k") @ObfuscatedSignature( descriptor = "Lgd;" )...
1
16,496
there's no import for Export
open-osrs-runelite
java
@@ -51,7 +51,7 @@ func (e *endpoints) ListenAndServe(ctx context.Context) error { tcpServer := e.createTCPServer(ctx) udsServer := e.createUDSServer(ctx) - e.registerNodeAPI(tcpServer) + e.registerNodeAPI(tcpServer, udsServer) e.registerRegistrationAPI(tcpServer, udsServer) err := util.RunTasks(ctx,
1
package endpoints import ( "crypto/ecdsa" "crypto/tls" "crypto/x509" "errors" "fmt" "net" "os" "sync" "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "github.com/spiffe/spire/pkg/common/auth" "github.com/spiffe/spire/pkg/common/util" "github.com/spiffe/spire/pkg...
1
10,349
i don't think we want/need to make the node API available over UDS
spiffe-spire
go
@@ -113,7 +113,7 @@ class LegalConditionsFacade $articleId = $this->setting->getForDomain($settingKey, $domainId); if ($articleId !== null) { - return $this->articleFacade->getById($articleId); + return $this->articleFacade->findById($articleId); } return nu...
1
<?php namespace Shopsys\FrameworkBundle\Model\LegalConditions; use Shopsys\FrameworkBundle\Component\Domain\Domain; use Shopsys\FrameworkBundle\Component\Setting\Setting; use Shopsys\FrameworkBundle\Model\Article\Article; use Shopsys\FrameworkBundle\Model\Article\ArticleFacade; class LegalConditionsFacade { /** ...
1
18,088
How about to skip if and returning null and return a result of `ArticleFacade::findById` directly?
shopsys-shopsys
php
@@ -180,6 +180,11 @@ class CoreDocumentArray extends CoreMongooseArray { return arr; } + map() { + const arr = [].concat(Array.prototype.map.apply(this,arguments)); + return arr; + } + /** * Wraps [`Array#push`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/push) wi...
1
'use strict'; /*! * Module dependencies. */ const CoreMongooseArray = require('./core_array'); const Document = require('../document'); const ObjectId = require('./objectid'); const castObjectId = require('../cast/objectid'); const getDiscriminatorByValue = require('../queryhelpers').getDiscriminatorByValue; const ...
1
14,096
I think this change is currently unnecessary. I like the idea of `map()`, `filter()`, etc. returning vanilla JavaScript arrays rather than mongoose arrays, but I think that's a bit too heavy of a change for a patch release. I think that all we need for this release is the `if (!parent || parent.$__.populated == null) r...
Automattic-mongoose
js
@@ -10,6 +10,11 @@ module Travis BUILD_DIR = File.join(HOME_DIR, 'build') class << self + def version + @version ||= `git rev-parse HEAD 2>/dev/null || \\ + echo "${SOURCE_VERSION:-fafafaf}"`.strip + end + def self.register(key) Travis.services.add(key...
1
require 'core_ext/hash/deep_symbolize_keys' require 'travis/shell' require 'travis/build/data' require 'travis/build/env' require 'travis/build/script' module Travis module Build HOME_DIR = '$HOME' BUILD_DIR = File.join(HOME_DIR, 'build') class << self def self.register(key) Travis.servic...
1
14,467
how about "unknown" instead of "fafafaf"?
travis-ci-travis-build
rb
@@ -0,0 +1,14 @@ +package api2 + +import ( + "context" + + "github.com/filecoin-project/go-filecoin/address" + "github.com/filecoin-project/go-filecoin/exec" +) + +// Actor is the actor-related Filecoin plumbing interface. +type Actor interface { + // ActorGetSignature returns the signature of the given actor's given m...
1
1
15,673
nit: do we gain anything from naming the output error `err` in this definition?
filecoin-project-venus
go
@@ -188,6 +188,11 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f stopInterval(); }); + // Blur foreign element to prevent starting of "nested" slideshow + if (document.activeElement && !dlg.contains(document.activeElement)) { + ...
1
define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'focusManager', 'browser', 'apphost', 'loading', 'css!./style', 'material-icons', 'paper-icon-button-light'], function (dialogHelper, inputManager, connectionManager, layoutManager, focusManager, browser, appHost, loading) { 'use strict';...
1
13,639
This can happen with any dialog. Maybe the best place to add this change would be the dialog component instead.
jellyfin-jellyfin-web
js
@@ -46,6 +46,10 @@ func NewTestEnvironment(ctx context.Context, t *testing.T, fastenvOpts fast.Envi env, err := fast.NewEnvironmentMemoryGenesis(big.NewInt(1000000), dir, types.TestProofsMode) require.NoError(err) + defer func() { + dumpEnvOutputOnFail(t, env.Processes()) + }() + // Setup options for nodes. ...
1
package fastesting import ( "context" "io/ioutil" "math/big" "strings" "testing" "time" "github.com/ipfs/go-ipfs-files" "github.com/stretchr/testify/require" "github.com/filecoin-project/go-filecoin/testhelpers" "github.com/filecoin-project/go-filecoin/tools/fast" "github.com/filecoin-project/go-filecoin/...
1
18,701
Should this be `TearDown` since it now calls this method? Something I would like to see is, on test failure don't teardown completely instead leave the FAST repo in place with the stderr and stdout files and direct the user to that location. What do you think?
filecoin-project-venus
go
@@ -190,6 +190,8 @@ def getModule(metricSpec): return MetricMAPE(metricSpec) elif metricName == 'multi': return MetricMulti(metricSpec) + elif metricName == 'negLL': + return MetricNegLogLikelihood(metricSpec) else: raise Exception("Unsupported metric type: %s" % metricName)
1
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
1
19,401
There's not particular reason to use a short name. Can we use a more descriptive name for the metric? Perhaps "negativeLogLikelihood"?
numenta-nupic
py
@@ -745,7 +745,10 @@ static void skipArgumentList (tokenInfo *const token, boolean include_newlines, while (nest_level > 0 && ! isType (token, TOKEN_EOF)) { readTokenFull (token, FALSE, repr); - if (isType (token, TOKEN_OPEN_PAREN)) + if (isType (token, TOKEN_KEYWORD) && token->keyword == KEYWORD_function...
1
/* * Copyright (c) 2003, Darren Hiebert * * This source code is released for free distribution under the terms of the * GNU General Public License version 2 or (at your option) any later version. * * This module contains functions for generating tags for JavaScript language * files. * * This is a good re...
1
13,945
not handling in case of `repr` makes the behavior probably a little too unpredictable. Is there a reason not to, apart missing stuff in the `repr`? Does it lead to some problem?
universal-ctags-ctags
c
@@ -93,12 +93,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http BadHttpRequestException.Throw(RequestRejectionReason.UnexpectedEndOfRequestContent); } - awaitable = _context.Input.ReadAsync(); } ...
1
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Buffers; using System.Collections; using System.IO; using System.IO.Pipelines; using System.Threading.Tasks; using Microsoft....
1
15,082
Remove the finally?
aspnet-KestrelHttpServer
.cs
@@ -378,7 +378,7 @@ reboot_system() * and then checking error codes; but the problem there is that C:\\ * returns PATH_NOT_FOUND regardless. */ bool -file_exists(const TCHAR *fn) +file_exists(const WCHAR *fn) { #ifdef WINDOWS WIN32_FIND_DATA fd;
1
/* ********************************************************** * Copyright (c) 2011-2017 Google, Inc. All rights reserved. * Copyright (c) 2005-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
12,797
Build on AArch64 fails because WCHAR is not defined.
DynamoRIO-dynamorio
c
@@ -20,6 +20,7 @@ import ( func TestRDWS_Template(t *testing.T) { const ( + envName = "test" manifestFileName = "rdws-manifest.yml" stackTemplateFileName = "rdws.stack.yml" )
1
// +build integration localintegration // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package stack_test import ( "io/ioutil" "path/filepath" "testing" "gopkg.in/yaml.v3" "github.com/aws/copilot-cli/internal/pkg/deploy" "github.com/aws/copilot-cli...
1
19,363
Do we use this const?
aws-copilot-cli
go
@@ -139,3 +139,9 @@ func SetCertificateRequestFailureTime(p metav1.Time) CertificateRequestModifier cr.Status.FailureTime = &p } } + +func SetAnnotations(annotations map[string]string) CertificateRequestModifier { + return func(cr *v1alpha2.CertificateRequest) { + cr.SetAnnotations(annotations) + } +}
1
/* Copyright 2019 The Jetstack cert-manager contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
1
20,330
I think this may need to be `SetCertificateRequestAnnotations` as it returns a `CertificateRequestModifier`
jetstack-cert-manager
go
@@ -234,6 +234,7 @@ class User < ActiveRecord::Base # # Returns UserIdentifier def identifier_for(scheme) + scheme = scheme.instance_of?(IdentifierScheme) ? scheme.name : scheme identifiers.by_scheme_name(scheme, "User").first end
1
# frozen_string_literal: true # == Schema Information # # Table name: users # # id :integer not null, primary key # accept_terms :boolean # active :boolean default(TRUE) # api_token :string # confirmation_sent_at :datetime # confirmat...
1
19,128
it would likely be better to do this in the Identifier.by_scheme_name method itself.
DMPRoadmap-roadmap
rb
@@ -129,6 +129,10 @@ class DatasetContext extends RawDKANEntityContext { } switch ($orderby) { + case 'Date created': + $orderby = 'created'; + break; + case 'Date changed': $orderby = 'changed'; break;
1
<?php namespace Drupal\DKANExtension\Context; use Behat\Behat\Hook\Scope\BeforeScenarioScope; use Behat\Gherkin\Node\TableNode; use SearchApiQuery; /** * Defines application features from the specific context. */ class DatasetContext extends RawDKANEntityContext { use ModeratorTrait; /** * */ public ...
1
20,604
@janette looking at this test code, I'm pretty sure that it's going to give a false positive. Where is it actually checking the contents of the first four datasets against expected values? All the assertion at the end of the test seems to check is that at least four datasets exist.
GetDKAN-dkan
php
@@ -68,6 +68,14 @@ module.exports = function (defaults) { optional: ['es6.spec.symbols'], includePolyfill: true }, + 'ember-service-worker': { + rootUrl: '/ghost/' + }, + 'esw-cache-fallback': { + patterns: [ + '/ghost/api/(.+)...
1
/* eslint-disable */ /* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'), concat = require('broccoli-concat'), mergeTrees = require('broccoli-merge-trees'), uglify = require('broccoli-uglify-js'), cleanCSS = require('broccoli-clean-css'), environment = EmberApp.e...
1
7,844
Would this break things if Ghost is run in a subdirectory or no?
TryGhost-Admin
js
@@ -24,7 +24,11 @@ class ProposalUpdateRecorder end def update_comment_format(key) - "#{bullet}*#{property_name(key)}* was changed " + former_value(key) + "to #{new_value(key)}" + if key !~ /id/ + "#{bullet}*#{property_name(key)}* was changed " + former_value(key) + "to #{new_value(key)}" + else +...
1
class ProposalUpdateRecorder include ValueHelper def initialize(client_data) @client_data = client_data end def run comment_texts = changed_attributes.map do |key, _value| update_comment_format(key) end if comment_texts.any? create_comment(comment_texts) end end private ...
1
16,312
maybe switch the order in order to make this a positive assertion instead of a negative one? i.e. `if key =~ /id/` first.
18F-C2
rb
@@ -20,6 +20,7 @@ from selenium.common.exceptions import NoSuchFrameException from selenium.common.exceptions import StaleElementReferenceException from selenium.common.exceptions import WebDriverException from selenium.common.exceptions import NoAlertPresentException +from selenium.common.exceptions import ElementN...
1
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
1
14,271
Is this an oversight for some code in the body?
SeleniumHQ-selenium
py
@@ -922,6 +922,8 @@ public class AddProductActivity extends AppCompatActivity { toast.show(); mOfflineSavedProductDao.deleteInTx(mOfflineSavedProductDao.queryBuilder().where(OfflineSavedProductDao.Properties.Barcode.eq(code)).list()); Intent int...
1
package openfoodfacts.github.scrachx.openfood.views; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Build; import android.os.Bundle; import android.support.design.widget.Snackbar; import android.support.v4.app.ActivityOptionsCompat; import and...
1
66,410
Reason for adding this? I couldn't find where you are retrieving it back.
openfoodfacts-openfoodfacts-androidapp
java
@@ -62,6 +62,10 @@ static void setup_globals(mrb_state *mrb) h2o_mruby_eval_expr(mrb, "$LOAD_PATH << \"#{$H2O_ROOT}/share/h2o/mruby\""); h2o_mruby_assert(mrb); + + /* require core modules and include built-in libraries */ + h2o_mruby_eval_expr(mrb, "require \"preloads.rb\""); + h2o_mruby_assert(mrb...
1
/* * Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Ryosuke Matsumoto, * Masayoshi Takahashi * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restr...
1
11,305
Can we expect adequate information emitted to the log in case either requiring preloads.rb or doing the requires in preloads.rb fails? If the answer is yes, I think we can merge this PR right away.
h2o-h2o
c
@@ -1,2 +1,3 @@ -class PagesController < ApplicationController -end +class PagesController < HighVoltage::PagesController + layout false +end
1
class PagesController < ApplicationController end
1
6,422
How about a `app/views/layouts/pages.html.erb` layout that contains the HTML head, body, wrappers and yield's the `new-topics` template into it? I think we might be able to delete the `app/controllers/pages_controller.rb` file at that point.
thoughtbot-upcase
rb
@@ -2218,7 +2218,9 @@ Document.prototype.isSelected = function isSelected(path) { if (this.$__.selected == null) { return true; } - + if (!path) { + return false; + } if (path === '_id') { return this.$__.selected._id !== 0; }
1
'use strict'; /*! * Module dependencies. */ const EventEmitter = require('events').EventEmitter; const InternalCache = require('./internal'); const MongooseError = require('./error/index'); const MixedSchema = require('./schema/mixed'); const ObjectExpectedError = require('./error/objectExpected'); const ObjectPara...
1
14,918
This is a coarse solution. This check is helpful, but you should also add a check in `$__version()` to avoid calling `isSelected()` if `key === false`
Automattic-mongoose
js
@@ -37,8 +37,10 @@ type Planner interface { } type Input struct { - // Readonly deployment model. - Deployment *model.Deployment + ApplicationID string + ApplicationName string + GitPath model.ApplicationGitPath + Trigger ...
1
// Copyright 2020 The PipeCD Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
1
17,742
Passing only needed data to make it can be reused by `planpreview` package where there is no deployment data.
pipe-cd-pipe
go
@@ -71,6 +71,9 @@ type Options struct { TLSCaCert string `json:"-"` TLSConfig *tls.Config `json:"-"` WriteDeadline time.Duration `json:"-"` + + CustomClientAuth Auth `json:"-"` + CustomRouterAuth Auth `json:"-"` } // Clone performs a deep copy of the Options struct, returning a new clone
1
// Copyright 2012-2017 Apcera Inc. All rights reserved. package server import ( "crypto/tls" "crypto/x509" "fmt" "io/ioutil" "net" "net/url" "os" "strconv" "strings" "time" "github.com/nats-io/gnatsd/conf" "github.com/nats-io/gnatsd/util" ) // Options for clusters. type ClusterOpts struct { Host ...
1
7,272
Could we rename those to `CustomClientAuthentication` (same for Router) to remove ambiguity between Authentication and Authorization (permissions)?
nats-io-nats-server
go
@@ -1,11 +1,15 @@ using System; +using MvvmCross.Core.Views; using MvvmCross.Forms.Platform; namespace MvvmCross.Forms.Views { - public interface IMvxFormsViewPresenter + public interface IMvxFormsViewPresenter : IMvxAttributeViewPresenter { MvxFormsApplication FormsApplication { get; set; } ...
1
using System; using MvvmCross.Forms.Platform; namespace MvvmCross.Forms.Views { public interface IMvxFormsViewPresenter { MvxFormsApplication FormsApplication { get; set; } IMvxFormsPagePresenter FormsPagePresenter { get; set; } } }
1
13,646
Is the name "IMvxFormsViewPresenter" too close to "IMvxFormsPagePresenter"? Perhaps something like "IMvxFormsNativeViewPresenter" or "IMvxFormsPlatformViewPresenter" or inline with Forms naming "IMvxFormsOnPlatformViewPresenter"
MvvmCross-MvvmCross
.cs
@@ -28,8 +28,8 @@ export function h(nodeName, attributes) { if ((child = stack.pop()) instanceof Array) { for (i=child.length; i--; ) stack.push(child[i]); } - else if (child!=null && child!==false) { - if (typeof child=='number' || child===true) child = String(child); + else if (child!=null && child!==tr...
1
import { VNode } from './vnode'; import options from './options'; const stack = []; /** JSX/hyperscript reviver * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0 * @see http://jasonformat.com/wtf-is-jsx * @public * @example * /** @jsx h *\/ * import { render, h } from 'preact'; * render(<sp...
1
10,285
`typeof child != 'boolean'` maybe?
preactjs-preact
js
@@ -220,7 +220,7 @@ public class ErrorHandler { private Throwable rebuildServerError(Map<String, Object> rawErrorData, int responseStatus) { - if (!rawErrorData.containsKey(CLASS) && !rawErrorData.containsKey(STACK_TRACE)) { + if (rawErrorData.get(CLASS) == null || rawErrorData.get(STACK_TRACE) == null) { ...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
15,006
Why && changed to || ?
SeleniumHQ-selenium
js
@@ -26,6 +26,11 @@ func init() { panic(err) } + InitAddress, err = NewIDAddress(4) + if err != nil { + panic(err) + } + StorageMarketAddress, err = NewIDAddress(2) if err != nil { panic(err)
1
package address import ( "encoding/base32" "github.com/minio/blake2b-simd" errors "github.com/pkg/errors" ) func init() { var err error TestAddress, err = NewActorAddress([]byte("satoshi")) if err != nil { panic(err) } TestAddress2, err = NewActorAddress([]byte("nakamoto")) if err != nil { panic(err)...
1
21,018
nit: not a big deal right now but spec assigns ID 0 to InitAddress
filecoin-project-venus
go
@@ -533,13 +533,13 @@ nsCommandProcessor.prototype.execute = function(jsonCommandString, * Changes the context of the caller to the specified window. * @param {fxdriver.CommandResponse} response The response object to send the * command response in. - * @param {{name: string}} parameters The command parameter...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
13,586
/javascript/firefox-driver is the Selenium implementation of a WebDriver for Firefox. Since it generally isn't W3C compatible, it shouldn't change. We can just drop this change.
SeleniumHQ-selenium
rb
@@ -361,6 +361,11 @@ class WebView(QWebView): message.info(self.win_id, "Zoom level: {}%".format(perc)) self._default_zoom_changed = True + def setZoomFactor(self, fact): + self._zoom.fuzzyval = int(fact * 100) + super().setZoomFactor(fact) + self._default_zoom_changed = True...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
1
13,096
There are various places where `setZoomFactor` is used but `fuzzyval` isn't set: - `__init__` and `on_config_changed` (should be okay as `init_neighborlist` gets called which essentially does the same) - `zoom` (calls `zoom_perc` with `fuzzyval=False`), which is used by `:zoom-in` and `:zoom-out`. Are you sure this won...
qutebrowser-qutebrowser
py
@@ -889,12 +889,12 @@ namespace pwiz.Skyline.Model string pathForLibraryFiles, // In case we translate libraries etc ConvertToSmallMoleculesMode mode = ConvertToSmallMoleculesMode.formulas, ConvertToSmallMoleculesChargesMode invertChargesMode = ConvertToSmallMoleculesChargesMode....
1
/* * Original author: Brendan MacLean <brendanx .at. u.washington.edu>, * MacCoss Lab, Department of Genome Sciences, UW * * Copyright 2009 University of Washington - Seattle, WA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complianc...
1
12,967
Is there a benefit to keeping this in RefinementSettings? Or could we move it into its own class in TestUtil?
ProteoWizard-pwiz
.cs
@@ -6,14 +6,10 @@ import ( // Query represents an active query. type Query interface { - // Spec returns the spec used to execute this query. - // Spec must not be modified. - Spec() *Spec - - // Ready returns a channel that will deliver the query results. + // Results returns a channel that will deliver the query ...
1
package flux import ( "time" ) // Query represents an active query. type Query interface { // Spec returns the spec used to execute this query. // Spec must not be modified. Spec() *Spec // Ready returns a channel that will deliver the query results. // Its possible that the channel is closed before any result...
1
10,002
I would have expected the Ready method to need to change to be a `<-chan Result` instead of a `<-chan map[string]Result`. The difference being that now the Ready channel can produce more than one set of results. In fact the name Ready is inaccurate now since its not about the query being ready but just a mechanism to d...
influxdata-flux
go
@@ -36,7 +36,7 @@ public interface ProjectLoader { * @return * @throws ProjectManagerException */ - public List<Project> fetchAllActiveProjects() throws ProjectManagerException; + List<Project> fetchAllActiveProjects() throws ProjectManagerException; /** * Loads whole project, including permissio...
1
/* * Copyright 2012 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
1
12,796
why? what if we want to access those methods outside of azkaban-common?
azkaban-azkaban
java
@@ -45,9 +45,9 @@ namespace Nethermind.Merge.Plugin.Test { private async Task<MergeTestBlockchain> CreateBlockChain() => await new MergeTestBlockchain(new ManualTimestamper()).Build(new SingleReleaseSpecProvider(Berlin.Instance, 1)); - private IConsensusRpcModule CreateConsensusModule(MergeTestBl...
1
// Copyright (c) 2021 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of...
1
26,113
Rename file too
NethermindEth-nethermind
.cs
@@ -27,7 +27,11 @@ func Unmarshal(r *request.Request) { decoder := xml.NewDecoder(r.HTTPResponse.Body) err := xmlutil.UnmarshalXML(r.Data, decoder, "") if err != nil { - r.Error = awserr.New("SerializationError", "failed decoding EC2 Query response", err) + r.Error = awserr.NewRequestFailure( + awserr.N...
1
package ec2query //go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/ec2.json unmarshal_test.go import ( "encoding/xml" "io" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol/...
1
9,367
Need to populate the `RequestID` field for these errors. This can be obtained from r.RequestID i think, but need to make sure. The `r.RequestID` should of been populated from the `UnmarshalMeta` handler list.
aws-aws-sdk-go
go
@@ -35,8 +35,8 @@ public class LongRunningConfigTest { private static final String GAPIC_CONFIG_METADATA_TYPE = "HeaderType"; private static final String ANNOTATIONS_RETURN_TYPE_NAME = "BookType"; private static final String ANNOTATIONS_METADATA_TYPE = "FooterType"; - private static final boolean TEST_IMPLEME...
1
/* Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
1
27,325
Why is the `final` being removed here?
googleapis-gapic-generator
java
@@ -1,13 +1,14 @@ // // Bismillah ar-Rahmaan ar-Raheem // -// Easylogging++ v9.95.0 +// Easylogging++ v9.96.4 // Cross-platform logging library for C++ applications // -// Copyright (c) 2017 muflihun.com +// Copyright (c) 2012-2018 Muflihun Labs +// Copyright (c) 2012-2018 @abumusamq // // This library i...
1
// // Bismillah ar-Rahmaan ar-Raheem // // Easylogging++ v9.95.0 // Cross-platform logging library for C++ applications // // Copyright (c) 2017 muflihun.com // // This library is released under the MIT Licence. // http://labs.muflihun.com/easyloggingpp/licence.php // // https://github.com/muflihun/easyloggingpp...
1
12,128
Maybe let's take this opportunity to change easylogging to a git submodule?
stellar-stellar-core
c
@@ -30,6 +30,9 @@ func extractFrontMatter(input string) (map[string]interface{}, string, error) { } firstLine := input[firstLineStart:firstLineEnd] + // ensure residue windows newline is removed + firstLine = strings.Trim(firstLine, "\r") + // see what kind of front matter there is, if any var closingFence st...
1
package templates import ( "encoding/json" "fmt" "strings" "unicode" "github.com/naoina/toml" "gopkg.in/yaml.v2" ) func extractFrontMatter(input string) (map[string]interface{}, string, error) { // get the bounds of the first non-empty line var firstLineStart, firstLineEnd int lineEmpty := true for i, b :=...
1
15,018
Should we just be generous and elide all extra whitespace? `strings.TrimSpace`
caddyserver-caddy
go
@@ -900,18 +900,6 @@ public class SalesforceSDKManager { return context.getString(getSalesforceR().stringAccountType()); } - /** - * Indicates whether the app is running on a tablet. - * - * @return True if the application is running on a tablet. - */ - public static boolean isTabl...
1
/* * Copyright (c) 2014, salesforce.com, inc. * All rights reserved. * Redistribution and use of this software in source and binary forms, with or * without modification, are permitted provided that the following conditions * are met: * - Redistributions of source code must retain the above copyright notice, this...
1
15,025
This is an inaccurate API that has outlived it's purpose. We can't make the determination of phone (vs) tablet, with a 7" screen in the mix. Also, with the advent of fragments, this API means very little now. It's not being used anywhere, since we switched to `ActionBar`.
forcedotcom-SalesforceMobileSDK-Android
java
@@ -230,7 +230,7 @@ public class GridLauncherV3 { } configureLogging(common.getLog(), common.getDebug()); - log.info(version()); + log.finest(version()); return true; }
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
16,456
This change means that users can't easily see which version of the selenium server they're using. This is `info` level information.
SeleniumHQ-selenium
java
@@ -455,8 +455,8 @@ class AuthTestCase(QuiltTestCase): def testCodeExpires(self): self.code_immediate_expire_mock = mock.patch('quilt_server.auth.CODE_TTL_DEFAULT', {'minutes': 0}) - self.code_immediate_expire_mock.start() token = self....
1
import itsdangerous import json import jwt import time import requests import unittest from unittest import mock from unittest.mock import patch from .utils import QuiltTestCase from quilt_server import app, db from quilt_server.models import Code, User from quilt_server.auth import (_create_user, _delete_user, issue_t...
1
16,908
You should just use `with patch(...):`, so it unpatches it automatically. Also, much simpler.
quiltdata-quilt
py
@@ -28,14 +28,15 @@ namespace MvvmCross.Navigation private IMvxViewDispatcher _viewDispatcher; public IMvxViewDispatcher ViewDispatcher { - get => _viewDispatcher ?? (IMvxViewDispatcher)MvxMainThreadDispatcher.Instance; + get => _viewDispatcher ?? (_viewDispatcher = Mvx....
1
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MS-PL license. // See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Runtime....
1
13,990
This didn't use to work for me. Are you sure that returns the correct instance from startup?
MvvmCross-MvvmCross
.cs
@@ -65,6 +65,14 @@ public final class MethodCallExpr extends Expression implements NodeWithTypeArgu this(null, scope, new NodeList<>(), new SimpleName(name), new NodeList<>()); } + public MethodCallExpr(final Expression scope, final SimpleName name) { + this(null, scope, new NodeList<>(), name...
1
/* * Copyright (C) 2007-2010 Júlio Vilmar Gesser. * Copyright (C) 2011, 2013-2016 The JavaParser Team. * * This file is part of JavaParser. * * JavaParser can be used either under the terms of * a) the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the ...
1
11,013
Looks good. Eventually we could remove some of these constructors, but for now adding these two seems the way to go
javaparser-javaparser
java
@@ -180,7 +180,7 @@ def parse_bwids(bwolist): return list(ast.literal_eval(bwolist)) -def get_holdingpen_objects(ptags=[]): +def get_holdingpen_objects(ptags=["Need action"]): """Get BibWorkflowObject's for display in Holding Pen. Uses DataTable naming for filtering/sorting. Work in progress.
1
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2012, 2013, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at yo...
1
13,985
@jalavik should be have somewhere enum/list/registry of possible tags?
inveniosoftware-invenio
py
@@ -155,6 +155,7 @@ class SecurityCenterClient(object): finding.get('source_properties').get('violation_data')) raise api_errors.ApiExecutionError(violation_data, e) + # pylint: disable=logging-too-many-args def list_findings(self, source_id): """Lists all the fi...
1
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
1
35,485
why is this pylint disable needed?
forseti-security-forseti-security
py
@@ -44,6 +44,7 @@ def GenerateConfig(context): FORSETI_HOME = '$USER_HOME/forseti-security' POLICY_LIBRARY_HOME = '$USER_HOME/policy-library' + POLICY_LIBRARY_SYNC_ENABLED = 'false' DOWNLOAD_FORSETI = ( "git clone {src_path}.git".format(
1
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
1
34,670
The new sync feature is only being supported from within Terraform. Installations using the deprecated method will have this feature disabled.
forseti-security-forseti-security
py
@@ -79,3 +79,7 @@ class DropBlock(nn.Module): factor = (1.0 if self.iter_cnt > self.warmup_iters else self.iter_cnt / self.warmup_iters) return gamma * factor + + def extra_repr(self): + return (f'drop_prob={self.drop_prob}, block_size={self.block_size}, ' + ...
1
# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import PLUGIN_LAYERS eps = 1e-6 @PLUGIN_LAYERS.register_module() class DropBlock(nn.Module): """Randomly drop some regions of feature maps. Please refer to the method proposed in...
1
25,876
This type of return (f'xxx') is not recommended, it is recommended to return 'xxx'
open-mmlab-mmdetection
py
@@ -2836,8 +2836,11 @@ client_process_bb(dcontext_t *dcontext, build_bb_t *bb) # ifdef X86 if (!d_r_is_avx512_code_in_use()) { if (ZMM_ENABLED()) { - if (instr_may_write_zmm_register(inst)) + if (instr_may_write_zmm_register(inst)) { + LOG(THREA...
1
/* ********************************************************** * Copyright (c) 2011-2019 Google, Inc. All rights reserved. * Copyright (c) 2001-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
17,749
I would make this level 1 or 2.
DynamoRIO-dynamorio
c
@@ -0,0 +1,17 @@ +require 'beaker/hypervisor/vagrant' + +class Beaker::VagrantFusion < Beaker::Vagrant + def provision(provider = 'vmware_fusion') + # By default vmware_fusion creates a .vagrant directory relative to the + # Vagrantfile path. That means beaker tries to scp the VM to itself unless + # we move ...
1
1
5,862
Is that path in a variable anyway? Not a big fan of hard coding it here.
voxpupuli-beaker
rb
@@ -16,14 +16,18 @@ limitations under the License. package controllers import ( + "bytes" "context" + "errors" + "strings" + "text/template" "github.com/sirupsen/logrus" federation "github.com/spiffe/spire/support/k8s/k8s-workload-registrar/federation" spiffeidv1beta1 "github.com/spiffe/spire/support/k8s/...
1
/* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License ...
1
17,377
nit: Move `IdentityTemplateLabel` to be under `IdentityTemplate` to match the struct in config_crd.go
spiffe-spire
go
@@ -1,8 +1,13 @@ class Analytics include AnalyticsHelper - SAMPLER = "sampler" - SUBSCRIBER = "subscriber" + SAMPLER = "sampler".freeze + SUBSCRIBER = "subscriber".freeze + TRACKERS = { + "Video" => VideoTracker, + "Exercise" => ExerciseTracker, + "Trail" => TrailTracker, + }.freeze class_attr...
1
class Analytics include AnalyticsHelper SAMPLER = "sampler" SUBSCRIBER = "subscriber" class_attribute :backend self.backend = AnalyticsRuby def initialize(user) @user = user end def track_updated backend.identify(user_id: user.id, traits: identify_hash(user)) end def track_video_finishe...
1
16,756
Not necessarily related to this PR, but don't you think having a centralized place for all interactions with analytics might make this into a very big class? Is that something that you don't worry about until it happens?
thoughtbot-upcase
rb
@@ -670,6 +670,13 @@ func (w *Workflow) runStep(ctx context.Context, s *Step) DError { select { case err := <-e: return err + case <-ctx.Done(): + if err := ctx.Err(); err == context.DeadlineExceeded { + return s.getTimeoutError() + } else if err != nil { + return Errf("step %q error: %s", s.name, err) + ...
1
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
11,514
it seems that my terminal is dead when I press ctrl+c during running daisy cli today, is this PR fixing that?
GoogleCloudPlatform-compute-image-tools
go
@@ -403,7 +403,7 @@ func (nc *Config) Build(ctx context.Context) (*Node, error) { // only the syncer gets the storage which is online connected chainSyncer := chain.NewDefaultSyncer(&cstOffline, nodeConsensus, chainStore, fetcher) - msgPool := core.NewMessagePool(chainStore, consensus.NewIngestionValidator(chainS...
1
package node import ( "context" "encoding/json" "fmt" "os" "sync" "time" "github.com/ipfs/go-bitswap" bsnet "github.com/ipfs/go-bitswap/network" bserv "github.com/ipfs/go-blockservice" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-hamt-ipld" bstore "github.com/ipfs/go-ipfs-b...
1
18,520
If we are going to add config to specify the maximum message pool size, we should probably also add a parameter for the maximum nonce gap and pass it into the `IngestionValidator`. This could be done in this PR or added as an issue.
filecoin-project-venus
go
@@ -12,10 +12,8 @@ */ package org.camunda.bpm.container.impl.spi; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; + import org.camunda.bpm.container.impl.ContainerIntegrationLogger; import org.camunda.bpm.engine.impl.ProcessEngineLogger;...
1
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed...
1
8,993
please inline imports
camunda-camunda-bpm-platform
java
@@ -113,7 +113,7 @@ type Config struct { IptablesRefreshInterval time.Duration `config:"seconds;90"` IptablesPostWriteCheckIntervalSecs time.Duration `config:"seconds;30"` IptablesLockFilePath string `config:"file;/run/xtables.lock"` - IptablesLockTimeoutSecs time.Durati...
1
// Copyright (c) 2016-2017 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
1
15,520
Should IptablesPostWriteCheckIntervalSecs be set back to its previous smaller value, if use of the iptables lock is disabled?
projectcalico-felix
c
@@ -313,7 +313,11 @@ class JoplinDatabase extends Database { // currentVersionIndex < 0 if for the case where an old version of Joplin used with a newer // version of the database, so that migration is not run in this case. - if (currentVersionIndex < 0) throw new Error('Unknown profile version. Most likely th...
1
const { promiseChain } = require('lib/promise-utils.js'); const { Database } = require('lib/database.js'); const { sprintf } = require('sprintf-js'); const Resource = require('lib/models/Resource'); const structureSql = ` CREATE TABLE folders ( id TEXT PRIMARY KEY, title TEXT NOT NULL DEFAULT "", created_time INT N...
1
11,293
Please use packageInfo here instead. As it is used in `app.js`.
laurent22-joplin
js
@@ -49,7 +49,10 @@ public class AnalysisResult { // the analysis will fail and report the error on it's own since the checksum won't match } - return 0; + // we couldn't read the file, maybe the file doesn't exist + // in any case, we can't use the cache. Returning here the ...
1
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.cache; import java.io.BufferedInputStream; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.util.ArrayList; import java.util.List; import java.util.zip.Adler32; i...
1
16,422
this seems unrelated to the rest of the PR, although related to the original report
pmd-pmd
java
@@ -11386,7 +11386,7 @@ NABoolean HbaseAccess::isHbaseFilterPredV2(Generator * generator, ItemExpr * ie, } //check if not an added column with default non null if ((foundBinary || foundUnary)&& (NOT hbaseLookupPred)){ - if (colVID.isAddedColumnWithNonNullDefault()){ + if (colVID.isColumnWithNonNu...
1
/********************************************************************** // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. ...
1
10,685
Would a check for added columns with non-null default be sufficient for aligned format?
apache-trafodion
cpp
@@ -69,6 +69,7 @@ var ( hostname = flag.String(ovfimportparams.HostnameFlagKey, "", "Specify the hostname of the instance to be created. The specified hostname must be RFC1035 compliant.") machineImageStorageLocation = flag.String(ovfimportparams.MachineImageStorageLocationFlagKey, "", "GCS bucke...
1
// Copyright 2019 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
12,925
Is this PR implementing compute service account for OVF import as well? I thought it's only image/one-step import? Btw, OVF importer uses "-" instead of "_" in flags (should be `compute-service-account`).
GoogleCloudPlatform-compute-image-tools
go
@@ -23,7 +23,7 @@ use Symfony\Component\Routing\Annotation\Route; /** * @Route( * name="ergonode_product_collection_element_delete", - * path="/collections/{collection}/elements/{product}", + * path="/collections/{collection}/element/{product}", * methods={"DELETE"}, * requirements={ * ...
1
<?php /** * Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved. * See LICENSE.txt for license details. */ declare(strict_types = 1); namespace Ergonode\ProductCollection\Application\Controller\Api\Element; use Ergonode\Api\Application\Response\EmptyResponse; use Ergonode\EventSourcing\Infrastructure\...
1
8,564
Why change to element ?? in whole application use plural convention ??
ergonode-backend
php
@@ -23,7 +23,7 @@ const renderInnerPanel = (props) => { } const poweredByUppy = (props) => { - return <a href="https://uppy.io" rel="noreferrer noopener" target="_blank" class="uppy-Dashboard-poweredBy">Powered by <svg aria-hidden="true" class="UppyIcon uppy-Dashboard-poweredByIcon" width="11" height="11" viewBox=...
1
const FileList = require('./FileList') const Tabs = require('./Tabs') const FileCard = require('./FileCard') const classNames = require('classnames') const { isTouchDevice } = require('../../core/Utils') const { h } = require('preact') // http://dev.edenspiekermann.com/2016/02/11/introducing-accessible-modal-dialog //...
1
10,835
Tiniest nit but this can be `tabindex={-1}`, `width={11}`, `height={11}`
transloadit-uppy
js
@@ -344,6 +344,16 @@ try: cast = image.astype(np.float32) assert cast.dtype == np.float32 + # Test .astype for conversion between vector-like pixel types. + components = 3 + numpyImage = np.random.randint(0, 256, (12,8,components)).astype(np.uint8) + input_image = itk.image_from_array(numpyImage...
1
#========================================================================== # # Copyright NumFOCUS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/l...
1
14,045
Unrelated to this PR, we should remove this exception. We now require `numpy`.
InsightSoftwareConsortium-ITK
py
@@ -29,7 +29,7 @@ type SubWorkflow struct { func (s *SubWorkflow) populate(ctx context.Context, st *Step) DError { if s.Path != "" { var err error - if s.Workflow, err = st.w.NewSubWorkflowFromFile(s.Path); err != nil { + if s.Workflow, err = st.w.NewSubWorkflowFromFile(s.Path, s.Vars); err != nil { return ...
1
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
10,391
Is the loop over vars and adding them to the subworkflow below in this file needed, since it's already done by NewSubWorkflowFromFile?
GoogleCloudPlatform-compute-image-tools
go
@@ -0,0 +1,19 @@ +module LicensesHelper + def license_date_range(license) + formatted_date_range(license.starts_on, license.ends_on) + end + + def formatted_date_range(starts_on, ends_on) + if starts_on.nil? || ends_on.nil? + nil + elsif starts_on == ends_on + starts_on.to_s :simple + elsif sta...
1
1
10,348
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
thoughtbot-upcase
rb
@@ -0,0 +1,5 @@ +import dagster.pandas_kernel as dagster_pd + + +def simple_csv_input(name): + return dagster_pd.dataframe_input(name, sources=[dagster_pd.csv_dataframe_source()])
1
1
11,602
Having to write this util makes me think that maybe we should have kept the csv_input stuff. I don't know.
dagster-io-dagster
py
@@ -21,9 +21,10 @@ var _ BlockOps = (*BlockOpsStandard)(nil) // NewBlockOpsStandard creates a new BlockOpsStandard func NewBlockOpsStandard(config Config, queueSize int) *BlockOpsStandard { + q := newBlockRetrievalQueue(queueSize, config.Codec(), config.BlockCache()) bops := &BlockOpsStandard{ config: config,...
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "github.com/keybase/kbfs/tlf" "golang.org/x/net/context" ) // BlockOpsStandard implements the BlockOps interface by relaying // requests to ...
1
14,729
Passing in and saving a reference to the `BlockCache` at init time is going to break if something calls `config.ResetCaches()`, because it replaces the `BlockCache` instance completely. This happens on user logout or by a manual write to `.kbfs_reset_caches`. So you probably want to give it the whole `config`, or maybe...
keybase-kbfs
go
@@ -462,6 +462,9 @@ func (s *Service) newStreamForPeerID(ctx context.Context, peerID libp2ppeer.ID, swarmStreamName := p2p.NewSwarmStreamName(protocolName, protocolVersion, streamName) st, err := s.host.NewStream(ctx, peerID, protocol.ID(swarmStreamName)) if err != nil { + if st != nil { + _ = st.Close() + } ...
1
// Copyright 2020 The Swarm Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libp2p import ( "context" "crypto/ecdsa" "errors" "fmt" "net" "github.com/ethersphere/bee/pkg/addressbook" "github.com/ethersphere/bee/pkg/b...
1
10,740
I am not sure this could happen. st should be nil if the error happens. If it does happen, we could also do st.Reset(), since it is an erroureous state so it closes both sides of the stream.
ethersphere-bee
go
@@ -239,6 +239,7 @@ var requirejs, require, define; } function delayedError(e) { + console.log(e.stack); return setTimeout(function() { e.dynaId && trackedErrors[e.dynaId] || (trackedErrors[e.dynaId] = !0, req.onError(e)) }), e
1
var requirejs, require, define; ! function(global, Promise, undef) { function commentReplace(match, singlePrefix) { return singlePrefix || "" } function hasProp(obj, prop) { return hasOwn.call(obj, prop) } function getOwn(obj, prop) { return obj && hasProp(obj, prop) && obj...
1
11,303
I'm guessing this was just added for debugging? Should probably remove it so we aren't modifying 3rd party libs.
jellyfin-jellyfin-web
js
@@ -15,10 +15,17 @@ module Bolt @object_open = true end + def print_event(node, event) + case event[:type] + when :node_result + print_result(node, event[:result]) + end + end + def print_result(node, result) item = { name: node.uri, -...
1
module Bolt class Outputter class JSON < Bolt::Outputter def initialize(stream = $stdout) @items_open = false @object_open = false @preceding_item = false super(stream) end def print_head @stream.puts '{ "items": [' @preceding_item = false ...
1
7,014
This seems reversed... if `success?` is true, wouldn't we use `success`?
puppetlabs-bolt
rb
@@ -0,0 +1,12 @@ +namespace Datadog.Trace +{ + internal enum LogEventLevel + { + Verbose, + Debug, + Information, + Warning, + Error, + Fatal + } +}
1
1
16,494
This seemed like the easiest way to allow log level checks, it will require an update to the vendors tool, to ignore that file on update.
DataDog-dd-trace-dotnet
.cs
@@ -21,6 +21,11 @@ <%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %> <%= submit_tag t('diary_entry.view.save_button') %> <% end %> + <% if @user and @entry.subscribers.exists?(@user.id) %> + <div style='position:relative; top: -30px; left: 130px'><%= link_to t('javascripts.changesets...
1
<% content_for :heading do %> <div id="userinformation" > <%= user_image @entry.user %> <h2><%= link_to t('diary_entry.view.user_title', :user => h(@entry.user.display_name)), :action => :list %></h2> <p><%= rss_link_to :action => :rss, :display_name => @entry.user.display_name %></p> </div> <% end %> ...
1
10,180
Should we disallow entry authors to unsubscribe to their entries?
openstreetmap-openstreetmap-website
rb
@@ -1,7 +1,7 @@ # -*- coding: UTF-8 -*- #core.py #A part of NonVisual Desktop Access (NVDA) -#Copyright (C) 2006-2016 NV Access Limited, Aleksey Sadovoy, Christopher Toth, Joseph Lee, Peter Vágner +#Copyright (C) 2006-2016 NV Access Limited, Aleksey Sadovoy, Christopher Toth, Joseph Lee, Peter Vágner, Derek Riemer ...
1
# -*- coding: UTF-8 -*- #core.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2006-2016 NV Access Limited, Aleksey Sadovoy, Christopher Toth, Joseph Lee, Peter Vágner #This file is covered by the GNU General Public License. #See the file COPYING for more details. """NVDA core""" # Do this first ...
1
18,529
2016 should be 2017.
nvaccess-nvda
py
@@ -155,7 +155,7 @@ public class MicroserviceRegisterTask extends AbstractRegisterTask { String curSchemaSumary = existSchema.getSummary(); String schemaSummary = Hashing.sha256().newHasher().putString(content, Charsets.UTF_8).hash().toString(); if (!schemaSummary.equals(curSchemaSumary)) { -...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
9,551
boolean exists = (existSchema != null) && (existSchema .getSummary() != null);
apache-servicecomb-java-chassis
java