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
@@ -4,7 +4,11 @@ describe TrailWithProgress do it "decorates its component" do user = double("user") trail = build_stubbed(:trail) - trail_with_progress = TrailWithProgress.new(trail, user: user) + trail_with_progress = TrailWithProgress.new( + trail, + user: user, + status_finder: dou...
1
require "rails_helper" describe TrailWithProgress do it "decorates its component" do user = double("user") trail = build_stubbed(:trail) trail_with_progress = TrailWithProgress.new(trail, user: user) expect(trail_with_progress).to be_a(SimpleDelegator) expect(trail_with_progress.name).to eq(trai...
1
16,198
Put a comma after the last parameter of a multiline method call.
thoughtbot-upcase
rb
@@ -183,6 +183,11 @@ fpga_result errors_filter(fpga_properties *filter, int argc, char *argv[]) FPGA_ACCELERATOR); ON_FPGAINFO_ERR_GOTO( res, out, "setting type to FPGA_ACCELERATOR"); + + res = fpgaPropertiesSetInterface(*filter, + FPGA_IFC_DFL); + ON_FPGAINFO_ERR_GOTO( + res, out, "setting...
1
// Copyright(c) 2018-2021, Intel Corporation // // Redistribution and use 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 list of conditions and...
1
21,228
Is this going to restrict the output to *ONLY* ports that are bound to vfio-pci? That's not what we discussed yesterday.
OPAE-opae-sdk
c
@@ -18,6 +18,13 @@ var _ specsruntime.Syscalls = (*syscalls)(nil) // VerifySignature implements Syscalls. func (sys syscalls) VerifySignature(signature specscrypto.Signature, signer address.Address, plaintext []byte) error { + // Dragons: this lets all id addresses off the hook -- we need to remove this + // once m...
1
package vmcontext import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-filecoin/internal/pkg/crypto" "github.com/filecoin-project/specs-actors/actors/abi" specscrypto "github.com/filecoin-project/specs-actors/actors/crypto" specsruntime "github.com/filecoin-project/specs-actors/actors...
1
23,129
Intention is to do the lookup here, I believe (where we can cache it). This would make the call non-pure function though. I'll confirm with lotus. ID addresses are the *only* addresses I expect to actually see here.
filecoin-project-venus
go
@@ -5,7 +5,7 @@ Purpose Shows how to run an EMRFS command as a job step on an Amazon EMR cluster. This -can be used to automate ERMFS commands and is an alternative to connecting through +can be used to automate EMRFS commands and is an alternative to connecting through SSH to run the commands manually. """
1
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Shows how to run an EMRFS command as a job step on an Amazon EMR cluster. This can be used to automate ERMFS commands and is an alternative to connecting through SSH to run the commands manually. """...
1
18,134
electronic medical record file system (EMRFS)
awsdocs-aws-doc-sdk-examples
rb
@@ -438,6 +438,7 @@ var directives = []string{ "mailout", // github.com/SchumacherFM/mailout "awslambda", // github.com/coopernurse/caddy-awslambda "filter", // github.com/echocat/caddy-filter + "maxrequestbody", } const (
1
package httpserver import ( "flag" "fmt" "log" "net" "net/url" "os" "strings" "time" "github.com/mholt/caddy" "github.com/mholt/caddy/caddyfile" "github.com/mholt/caddy/caddytls" ) const serverType = "http" func init() { flag.StringVar(&Host, "host", DefaultHost, "Default host") flag.StringVar(&Port, "...
1
9,235
Put this higher in the list, like after "bind", since I guess we're considering the max request body size to be kind of a native/fundamental feature, built directly into the vhosts.
caddyserver-caddy
go
@@ -37,13 +37,11 @@ import ( ) var ( - ErrInvalidOrderType = status.Errorf(codes.InvalidArgument, "invalid order type") - ErrAskNotFound = status.Errorf(codes.NotFound, "ask not found") - ErrDeviceNotFound = status.Errorf(codes.NotFound, "device not found") - ErrMinerNotFound = status.Errorf(codes.NotFoun...
1
package hub import ( "crypto/ecdsa" "encoding/hex" "fmt" "io" "math/rand" "net" "reflect" "strings" "sync" "time" "github.com/docker/distribution/reference" "github.com/ethereum/go-ethereum/common" log "github.com/noxiouz/zapctx/ctxlog" "github.com/pkg/errors" "github.com/sonm-io/core/blockchain" "go....
1
6,123
oh come on :(
sonm-io-core
go
@@ -76,7 +76,7 @@ public class ProtocolHandshake { if (result.isPresent()) { Result toReturn = result.get(); - LOG.info(String.format("Detected dialect: %s", toReturn.dialect)); + LOG.finest(String.format("Detected dialect: %s", toReturn.dialect)); return toReturn; ...
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,445
This is an incorrect change. The dialect spoken is an important part of the handshake and should be communicated to users.
SeleniumHQ-selenium
java
@@ -30,6 +30,7 @@ def get_gcloud_info(): str: GCP project id str: GCP Authenticated user bool: Whether or not the installer is running in cloudshell + bool: Whether or not authenticated user is a service account """ return_code, out, err = utils.run_command( ['gcloud...
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 a...
1
31,029
Remove as this is not needed anymore.
forseti-security-forseti-security
py
@@ -10,3 +10,11 @@ class Interface: class DoNothing: pass class DoNothing2: pass + +class DoSomething: + def __init__(self, a_string: str, optional_int: int = None): + self.my_string = a_string + self.my_int = optional_int + + def do_it(self, new_int: int) -> int: + return self.my_int + n...
1
""" file suppliermodule.py """ class Interface: def get_value(self): raise NotImplementedError def set_value(self, value): raise NotImplementedError class DoNothing: pass class DoNothing2: pass
1
15,210
This new class is for checking that #4551 works correctly with PlantUML output too.
PyCQA-pylint
py
@@ -168,6 +168,11 @@ func (c *controller) buildCertificates(ctx context.Context, ing *networkingv1bet Kind: issuerKind, Group: issuerGroup, }, + Usages: []cmapi.KeyUsage{ + cmapi.UsageDigitalSignature, + cmapi.UsageKeyEncipherment, + cmapi.UsageServerAuth, // default for web facing cert...
1
/* Copyright 2020 The cert-manager 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 agreed to in writing...
1
24,668
Will this cause all certificates to be re-issued?
jetstack-cert-manager
go
@@ -215,6 +215,10 @@ fpga_result enum_max10_metrics_info(struct _fpga_handle *_handle, } metric_name[strlen(metric_name)-1] = '\0'; + if (tmp) { + free(tmp); + } + // Metrics typw result = read_sensor_sysfs_file(pglob.gl_pathv[i], SENSOR_SYSFS_TYPE, (void **)&tmp, &tot_bytes); if (FPGA_OK != resu...
1
// Copyright(c) 2018-2019, Intel Corporation // // Redistribution and use 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 list of conditions and...
1
19,191
I think tmp is also leaked at the end of this loop if no error cases are encountered.
OPAE-opae-sdk
c
@@ -165,13 +165,14 @@ class BuildAvroProjection extends AvroCustomOrderSchemaVisitor<Schema, Schema.Fi try { Schema keyValueSchema = array.getElementType(); Schema.Field keyField = keyValueSchema.getFields().get(0); + Schema.Field keyProjection = element.get().getField("key"); S...
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 ...
1
13,794
The previous version didn't use `keyProjection` because the entire key must be projected. If the key is a struct of multiple columns, then projecting a subset of those columns can easily introduce key collisions that aren't in the original data.
apache-iceberg
java
@@ -26,14 +26,13 @@ void UseExecutor::execute() { auto spaceName = *sentence_->space(); // Check from the cache, if space not exists, schemas also not exist - auto status = ectx()->schemaManager()->checkSpaceExist(spaceName); - if (!status.ok()) { + auto spaceId = ectx()->schemaManager()->toGraphSp...
1
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "base/Base.h" #include "graph/UseExecutor.h" #include "meta/SchemaManager.h" namespace nebula { namespace grap...
1
17,082
Why not use StatusOr ? We can't ensure spaceId is greater than zero, especially when AdHocSchemaManager is used.
vesoft-inc-nebula
cpp
@@ -17,11 +17,15 @@ import ( "context" "encoding/json" "fmt" + "io" "os" "strings" + "time" "github.com/shirou/gopsutil/process" + jrpc "github.com/ethereum/go-ethereum/rpc" + "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" "github.com/chaos-mesh/chaos-mesh/pkg/bpm" pb "github.com/chaos-mesh/chaos...
1
// Copyright 2020 Chaos Mesh 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
20,126
Does it seem we only use that as the json-rpc client? Do we have any other choice? It's a little weird.
chaos-mesh-chaos-mesh
go
@@ -68,12 +68,13 @@ class ControlField(Field): or (role in (controlTypes.ROLE_TABLE, controlTypes.ROLE_TABLECELL, controlTypes.ROLE_TABLEROWHEADER, controlTypes.ROLE_TABLECOLUMNHEADER) and not formatConfig["reportTables"]) or (role in (controlTypes.ROLE_LIST, controlTypes.ROLE_LISTITEM) and controlTypes.STATE_R...
1
#textInfos/__init__.py #A part of NonVisual Desktop Access (NVDA) #This file is covered by the GNU General Public License. #See the file COPYING for more details. #Copyright (C) 2006-2014 NV Access Limited """Framework for accessing text content in widgets. The core component of this framework is the L{TextInfo...
1
22,830
Could you split this into multiple lines?
nvaccess-nvda
py
@@ -19,14 +19,11 @@ package org.apache.iceberg; -import java.util.Collection; import java.util.List; import java.util.Set; -import org.apache.iceberg.expressions.Expression; import org.apache.iceberg.io.CloseableIterable; import org.apache.iceberg.relocated.com.google.common.base.Preconditions; import org.apa...
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 ...
1
20,735
Doesn't the snapshot ID start off as null? It seems like we don't need to set it here.
apache-iceberg
java
@@ -93,7 +93,7 @@ func (t *V4Trie) Get(cidr V4CIDR) interface{} { } func (t *V4Trie) LookupPath(buffer []V4TrieEntry, cidr V4CIDR) []V4TrieEntry { - return t.root.lookupPath(buffer, cidr) + return t.root.lookupPath(buffer[:0], cidr) } // LPM does a longest prefix match on the trie
1
// Copyright (c) 2020 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 applica...
1
17,500
I wondered why `buffer` was passed into `LookupPath`. What is happening here? Is `buffer[:0]` equivalent to `[]V4TrieEntry{}`, and hence `buffer` isn't needed any more?
projectcalico-felix
go
@@ -173,7 +173,9 @@ func (c *Expected) validateMining(ctx context.Context, parentWeight fbig.Int, parentReceiptRoot cid.Cid) error { - powerTable := NewPowerTableView(c.state.StateView(parentStateRoot)) + stateView := c.state.StateView(parentStateRoot) + sigValidator := NewSignatureValidator(stateView) + powerTab...
1
package consensus import ( "context" "math/big" "time" address "github.com/filecoin-project/go-address" "github.com/filecoin-project/specs-actors/actors/abi" fbig "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin/miner" cid "github.com/ipfs/go-c...
1
23,220
nit: Ideally we would would use this abstraction everywhere we need this translation. I believe it's needed in the mining worker and the storage and market connectors.
filecoin-project-venus
go
@@ -169,6 +169,13 @@ func (c *CStorPoolController) cStorPoolAddEventHandler(cStorPoolGot *apis.CStorP glog.Infof("Pool %v is online", string(pool.PoolPrefix)+string(cStorPoolGot.GetUID())) c.recorder.Event(cStorPoolGot, corev1.EventTypeNormal, string(common.AlreadyPresent), string(common.MessageResourceAlre...
1
/* Copyright 2018 The OpenEBS 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 agreed to in writing, sof...
1
11,338
need to fix the error message here
openebs-maya
go
@@ -17,7 +17,7 @@ namespace Microsoft.CodeAnalysis.Sarif internal const string DEFAULT_POLICY_NAME = "default"; public PropertyBagDictionary() : base() { } - + //CA1026 not fixed public PropertyBagDictionary( PropertyBagDictionary initializer = null, IEquali...
1
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; using System.Collections.Immutable; using System.ComponentModel; using System.IO; using System.Runtime.Serialization; u...
1
11,053
Unsure of how to handle this one.
microsoft-sarif-sdk
.cs
@@ -1268,7 +1268,9 @@ public class FlowRunner extends EventHandler<Event> implements Runnable { public void kill() { synchronized (this.mainSyncObj) { - if (isKilled()) { + if (isKilled() || this.flowFinished) { + this.logger.info( + "Dropping Kill action as execution " + this.exec...
1
/* * Copyright 2013 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 in...
1
21,042
Will this.flowFinished verify with every finished state stated in Status.isStatusFinished method? If so, no need to verify isKilled.
azkaban-azkaban
java
@@ -0,0 +1,11 @@ +package common + +// DefaultRetrySettings indicates what the "default" retry settings +// are if it is not specified on an Activity or for any unset fields +// if a policy is explicitly set on a Child Workflow +type DefaultRetrySettings struct { + InitialIntervalInSeconds int32 + MaximumIntervalCoef...
1
1
10,040
replace "Child Workflow" with "any workflow"
temporalio-temporal
go
@@ -426,7 +426,9 @@ footer { <span class="name">{{html .Name}}</span> </a> </td> - {{- if .IsDir}} + {{- if .IsSymlink }} + <td data-order="-1">symbolic link</td> + {{- else if .IsDir}} <td data-order="-1">&mdash;</td> {{- else}} <td data-order="{{.Size}}...
1
package browse import ( "fmt" "io/ioutil" "net/http" "text/template" "github.com/mholt/caddy" "github.com/mholt/caddy/caddyhttp/httpserver" "github.com/mholt/caddy/caddyhttp/staticfiles" ) func init() { caddy.RegisterPlugin("browse", caddy.Plugin{ ServerType: "http", Action: setup, }) } // setup co...
1
10,837
Instead of showing the words "symbolic link" under the "Size" column, how about we introduce new icons for symbolic link to file and symbolic link to directory?
caddyserver-caddy
go
@@ -47,9 +47,10 @@ class DateRange implements FilterEncoder, FacetBuilder * Parses the given date range from a GET parameter and returns a Solr * date range filter. * - * @param string $rangeFilter The range filter query string from the query URL + * @param string $dateRange * @param arr...
1
<?php namespace ApacheSolrForTypo3\Solr\Query\FilterEncoder; /*************************************************************** * Copyright notice * * (c) 2010-2011 Markus Goldbach <markus.goldbach@dkd.de> * (c) 2012-2015 Ingo Renner <ingo@typo3.org> * All rights reserved * * This script is part of the TYPO3...
1
5,914
Please add back the description of the parameter
TYPO3-Solr-ext-solr
php
@@ -17,7 +17,7 @@ function GraphiteBrowser () { var searchPanel = createSearchPanel(); var completerPanel = createCompleterPanel(); var treeRoot = treePanel.getRootNode(); - + this.trees = { graphite: treeRoot.findChild('id', 'GraphiteTree'), mygraphs: treeRoot.findChild('id', 'MyGraphsTree'),
1
/* Copyright 2008 Orbitz WorldWide 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...
1
8,721
Superfluous space inserted.
graphite-project-graphite-web
py
@@ -8,7 +8,9 @@ * @returns {Object} */ dom.urlPropsFromAttribute = function urlPropsFromAttribute(node, attribute) { - const value = node[attribute]; + const value = !node.ownerSVGElement + ? node[attribute] + : node.getAttribute(attribute); if (!value) { return undefined; }
1
/* global dom */ /** * Parse resource object for a given node from a specified attribute * @method urlPropsFromAttribute * @param {HTMLElement} node given node * @param {String} attribute attribute of the node from which resource should be parsed * @returns {Object} */ dom.urlPropsFromAttribute = function urlPro...
1
15,349
Didn't fix the problem. `href=""` for SVG will still result in `undefined` getting returned by this function.
dequelabs-axe-core
js
@@ -69,13 +69,13 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates_fixture) json::Object{{ {"location", location}, {"bearing_before", 0}, - ...
1
#include <boost/test/test_case_template.hpp> #include <boost/test/unit_test.hpp> #include "coordinates.hpp" #include "equal_json.hpp" #include "fixture.hpp" #include "osrm/coordinate.hpp" #include "osrm/engine_config.hpp" #include "osrm/exception.hpp" #include "osrm/json_container.hpp" #include "osrm/osrm.hpp" #inclu...
1
23,305
This seems like a strange change ... I wouldn't think that a change to access tags in the profiles would result in different bearings in this tests?
Project-OSRM-osrm-backend
cpp
@@ -90,10 +90,10 @@ class AppModule(appModuleHandler.AppModule): # Move the review cursor so others can't access its previous position. self._oldReviewPos = api.getReviewPosition() self._oldReviewObj = self._oldReviewPos.obj - api.setNavigatorObject(eventHandler.lastQueuedFocusObject) + api.setNavigator...
1
#A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2015 NV Access Limited #This file is covered by the GNU General Public License. #See the file COPYING for more details. import appModuleHandler import controlTypes import inputCore import api import eventHandler import config from NVDAObjects.UIA imp...
1
20,311
As isCaret is False by default, explicitly specifying isCaret=False here is not needed, and is perhaps a little confusing. I'd prefer that anywhere in the codebase that isCaret is only ever specified if it needs to be set to true. Mirroring that of isFocus for setNavigatorObject.
nvaccess-nvda
py
@@ -38,7 +38,7 @@ module Selenium port end - IGNORED_ERRORS = [Errno::EADDRNOTAVAIL] + IGNORED_ERRORS = [Errno::EADDRNOTAVAIL].freeze IGNORED_ERRORS << Errno::EBADF if Platform.cygwin? IGNORED_ERRORS.freeze
1
# encoding: utf-8 # # 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 # "Li...
1
14,876
We can't freeze this and then add something to it in the next line. The `freeze` on line 43 is sufficient. If Rubocop flags this we need to exclude it.
SeleniumHQ-selenium
py
@@ -368,5 +368,9 @@ func consolidateAutomationPolicies(aps []*caddytls.AutomationPolicy) []*caddytls return len(aps[i].Subjects) > len(aps[j].Subjects) }) + for i := 0; i < len(aps); i++ { + sort.Strings(aps[i].Subjects) + } + return aps }
1
// Copyright 2015 Matthew Holt and The Caddy 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 applicab...
1
14,555
Why is this needed?
caddyserver-caddy
go
@@ -215,6 +215,9 @@ func RegisterRoutes(m *macaron.Macaron) { }, reqToken()) // Repositories + m.Get("/users/:username/repos", repo.ListUserRepos) + m.Get("/orgs/:org/repos", repo.ListOrgRepos) + m.Combo("/user/repos", reqToken()).Get(repo.ListMyRepos). Post(bind(api.CreateRepoOption{}), repo.Create) ...
1
// Copyright 2015 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package v1 import ( "strings" "github.com/go-macaron/binding" "gopkg.in/macaron.v1" api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/mo...
1
11,855
Why not put two other routes after this line (221)?
gogs-gogs
go
@@ -25,9 +25,10 @@ ExecutionEngine::~ExecutionEngine() { Status ExecutionEngine::init(std::shared_ptr<folly::IOThreadPoolExecutor> ioExecutor) { auto addrs = network::NetworkUtils::toHosts(FLAGS_meta_server_addrs); - if (!addrs.ok()) { + if (!addrs.ok() || addrs.value().empty()) { return addrs.st...
1
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "base/Base.h" #include "graph/ExecutionEngine.h" #include "graph/ExecutionContext.h" #include "graph/ExecutionP...
1
17,631
If FLAGS_meta_server_addrs is not empty, in which case "toHosts" return empty array?
vesoft-inc-nebula
cpp
@@ -216,6 +216,8 @@ void ResetFactory() */ Settings.I2C_clockSpeed = DEFAULT_I2C_CLOCK_SPEED; + Settings.JSONBoolWithQuotes(DEFAULT_JSON_USE_QUOTES); + #ifdef PLUGIN_DESCR strcpy_P(Settings.Name, PSTR(PLUGIN_DESCR)); #endif // ifdef PLUGIN_DESCR
1
#include "ESPEasy_FactoryDefault.h" #include "../../ESPEasy_common.h" #include "../../_Plugin_Helper.h" #include "../CustomBuild/StorageLayout.h" #include "../DataStructs/ControllerSettingsStruct.h" #include "../DataStructs/FactoryDefaultPref.h" #include "../DataStructs/GpioFactorySettingsStruct.h" #include "../ESP...
1
21,648
There is a function to output a "JSONBool" string. That would be a good start for finding uses. But maybe just have a look at where we decide whether it is a numerical or not, thus wrapping quotes around its value. Then you have it all I guess.
letscontrolit-ESPEasy
cpp
@@ -90,8 +90,9 @@ class SampledPlot: sampled = data._sdf.sample(fraction=float(self.fraction)) return DataFrame(data._internal.copy(sdf=sampled)).to_pandas() elif isinstance(data, Series): + scol = data._kdf._internal.data_scols[0] sampled = data._kdf._sdf.samp...
1
# # Copyright (C) 2019 Databricks, Inc. # # 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
11,155
oops, it should be `data._scol` so that it respects the expression stored in Series. Let me fix it quick.
databricks-koalas
py
@@ -1,6 +1,7 @@ <% administrator = Role.new(administrator: true, editor: true, commenter: true) %> <% editor = Role.new(editor: true, commenter: true) %> <% commenter = Role.new(commenter: true) %> +<% administerable = @plan.administerable_by?(current_user) %> <h2><%= _('Set plan visibility') %></h2> <p class="f...
1
<% administrator = Role.new(administrator: true, editor: true, commenter: true) %> <% editor = Role.new(editor: true, commenter: true) %> <% commenter = Role.new(commenter: true) %> <h2><%= _('Set plan visibility') %></h2> <p class="form-control-static"><%= _('Public or organisational visibility is intended for finish...
1
18,308
Thanks for moving this up with the rest of the variables. Much tidier :)
DMPRoadmap-roadmap
rb
@@ -38,6 +38,12 @@ import ( // DefaultAccountantFailureCount defines how many times we're allowed to fail to reach accountant in a row before announcing the failure. const DefaultAccountantFailureCount uint64 = 3 +// DefaultPaymentInfo represents the default payment info for the alpha release +var DefaultPaymentInf...
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,147
I think `Rate` is a more precise and concise term for `PaymentPerTime`.
mysteriumnetwork-node
go
@@ -213,7 +213,7 @@ namespace pwiz.Skyline.Util { // No leading + or - : is it because description starts with a label, or because + mode is implied? var limit = input.IndexOfAny(new[] { '+', '-', ']' }); - if (limit < 0) + ...
1
/* * Original author: Brian Pratt <bspratt .at. proteinms.net>, * MacCoss Lab, Department of Genome Sciences, UW * * Copyright 2016 University of Washington - Seattle, WA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance...
1
14,699
I think this should maybe be: var limit = input.IndexOfAny(new[] { '+', '-', ']' }, **posNext**); You pretty much want to ignore any sign that is before the "M". But, if there is a sign somewhere before the M, and also after the M, you'd want to be able to find the sign after the M, right?
ProteoWizard-pwiz
.cs
@@ -263,7 +263,12 @@ class OrderController extends BaseFrontController /* check cart count */ $this->checkCartNotEmpty(); - + + /* check stock not empty */ + if(true === ConfigQuery::checkAvailableStock()) { + $this->checkStockNotEmpty(); + } + ...
1
<?php /*************************************************************************************/ /* */ /* Thelia */ /* ...
1
10,680
if `checkStockNotEmpty` returns a reponse, you must return it or your script will continue its execution.
thelia-thelia
php
@@ -46,7 +46,7 @@ import ( "github.com/prometheus/common/version" "golang.org/x/sync/errgroup" v1 "k8s.io/api/core/v1" - "k8s.io/klog/v2" + klogv2 "k8s.io/klog/v2" ) const (
1
// Copyright 2016 The prometheus-operator 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 ...
1
15,185
Any specific reason for this change? klog should work correctly here.
prometheus-operator-prometheus-operator
go
@@ -243,6 +243,9 @@ class Storage(StorageBase): VALUES (:object_id, :parent_id, :collection_id, (:data)::JSONB, from_epoch(:last_modified)) + ON CONFLICT (id, parent_id, collection_id) DO UPDATE + SET data = (:data)::JSONB, + last_modified = from_epoch...
1
import os import warnings from collections import defaultdict from kinto.core import logger from kinto.core.storage import ( StorageBase, exceptions, DEFAULT_ID_FIELD, DEFAULT_MODIFIED_FIELD, DEFAULT_DELETED_FIELD) from kinto.core.storage.postgresql.client import create_from_config from kinto.core.utils import...
1
10,737
we don't mention `last_modified` here?
Kinto-kinto
py
@@ -1,6 +1,10 @@ -const html = require('yo-yo') const ActionBrowseTagline = require('./ActionBrowseTagline') const { localIcon } = require('./icons') +const { h } = require('preact') +const hyperx = require('hyperx') +const html = hyperx(h) + +let inputEl module.exports = (props) => { const isHidden = Object.ke...
1
const html = require('yo-yo') const ActionBrowseTagline = require('./ActionBrowseTagline') const { localIcon } = require('./icons') module.exports = (props) => { const isHidden = Object.keys(props.files).length === 0 if (props.acquirers.length === 0) { return html` <div class="UppyDashboardTabs" aria-hi...
1
10,255
same deal about the global state maybe interfering as in ActionBrowseTagline
transloadit-uppy
js
@@ -172,5 +172,17 @@ namespace Nethermind.Core.Test.Caching count.Should().Be(itemsToKeep); } + + [Test] + public void Wrong_capacity_number_at_constructor() + { + int maxCapacity = 0; + + Assert.Throws<ArgumentOutOfRangeException>(() => + ...
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
25,528
so sweet to see a test as the first thing
NethermindEth-nethermind
.cs
@@ -161,6 +161,12 @@ struct flb_config *flb_config_init() config->http_port = flb_strdup(FLB_CONFIG_HTTP_PORT); #endif + config->http_proxy = getenv("HTTP_PROXY"); + if (strcmp(config->http_proxy, "")) { + /* Proxy should not be set when the `HTTP_PROXY` is set to "" */ + config->http_pro...
1
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Fluent Bit * ========== * Copyright (C) 2019-2020 The Fluent Bit Authors * Copyright (C) 2015-2018 Treasure Data Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in co...
1
13,004
usually when HTTP_PROXY="" (empty), proxy should be disabled. could you set it to NULL when it's empty string?
fluent-fluent-bit
c
@@ -62,6 +62,10 @@ class SimpleResizer implements ResizerInterface if ($settings['height'] == null) { $settings['height'] = (int) ($settings['width'] * $size->getHeight() / $size->getWidth()); } + + if ($settings['width'] == null) { + $settings['width'] = (int) (...
1
<?php /* * This file is part of the Sonata project. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\MediaBundle\Resizer; use Imagine\Image\ImagineInterfac...
1
5,874
Can you throw an exception if width or height are both null
sonata-project-SonataMediaBundle
php
@@ -26,8 +26,8 @@ import ( ) var ( - HTTPSchemeHTTP = HTTPSchemeKey.String("http") - HTTPSchemeHTTPS = HTTPSchemeKey.String("https") + httpSchemeHTTP = HTTPSchemeKey.String("http") + httpSchemeHTTPS = HTTPSchemeKey.String("https") ) // NetAttributesFromHTTPRequest generates attributes of the net
1
// Copyright The OpenTelemetry 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 agre...
1
15,565
This is a breaking change. I guess these might have been intentionally exported.
open-telemetry-opentelemetry-go
go
@@ -225,6 +225,8 @@ abstract class BaseTableScan implements TableScan { long splitSize; if (options.containsKey(TableProperties.SPLIT_SIZE)) { splitSize = Long.parseLong(options.get(TableProperties.SPLIT_SIZE)); + } else if (options.containsKey(TableProperties.METADATA_SPLIT_SIZE)) { + splitSiz...
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 ...
1
18,208
I don't think this is necessary. When options are used to set the split size in the Spark reader, it uses `TableProperties.SPLIT_SIZE` to pass it here. That should work for metadata tables as well, right? The situation that we need to handle in this PR is setting the default, like you had before. We just want to use a ...
apache-iceberg
java
@@ -267,6 +267,10 @@ const ( Add Operator = '+' // Subtract implements binary - (only works on integers) Subtract = '-' + // Multiply implements multiplication between two types + Multiply = '×' + // Divide implements division, currently only between integers + Divide = '÷' // Modulo implements % (including str...
1
package asp import "fmt" // A FileInput is the top-level structure of a BUILD file. type FileInput struct { Statements []*Statement } // A Position describes a position in a source file. // All properties in Position are one(1) indexed type Position struct { Filename string Offset int Line int Column in...
1
9,434
wait a sec, shouldn't this be `'*'`?
thought-machine-please
go
@@ -127,6 +127,9 @@ func (oi *OVFImporter) buildDaisyVars(bootDiskImageURI string, machineType strin varMap["boot_disk_image_uri"] = bootDiskImageURI if oi.params.IsInstanceImport() { varMap["instance_name"] = oi.params.InstanceNames + if oi.params.ComputeServiceAccount != "" { + varMap["compute_service_accou...
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
13,309
It think you'll want the var for GMI import as well: daisy_workflows/ovf_import/create_gmi.wf.json (Unfortunately there's duplication between the two :/ )
GoogleCloudPlatform-compute-image-tools
go
@@ -21,6 +21,7 @@ from selenium.webdriver.remote.remote_connection import RemoteConnection class FirefoxRemoteConnection(RemoteConnection): def __init__(self, remote_server_addr, keep_alive=True): RemoteConnection.__init__(self, remote_server_addr, keep_alive) + self._commands["GET_CONTEXT"] = ('G...
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
13,619
Nit: Group this with the other commands by moving it down one line.
SeleniumHQ-selenium
js
@@ -512,6 +512,9 @@ public class VectorizedPageIterator extends BasePageIterator { throw new ParquetDecodingException("could not read page in col " + desc, e); } } else { + if (dataEncoding != Encoding.PLAIN) { + throw new UnsupportedOperationException("Unsupported encoding: " + dataEnc...
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 ...
1
38,665
I would like to emphasize that a user can use non-vectorized reads to handle this file so maybe something like "Cannot perform a vectorized read of ParquetV2 File with encoding %s, disable vectorized reading with $param to read this table/file"
apache-iceberg
java
@@ -101,6 +101,10 @@ class RangeBase(luigi.WrapperTask): now = luigi.IntParameter( default=None, description="set to override current time. In seconds since epoch") + param_name = luigi.Parameter( + default=None, + description="parameter name used to pass in parameterized value. ...
1
# -*- coding: utf-8 -*- # Copyright (c) 2014 Spotify AB # # 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...
1
13,099
Maybe add `positional=False`. It does not need it more than the other parameters, but one must start somewhere.
spotify-luigi
py
@@ -9,8 +9,8 @@ const expect = require('chai').expect, MongoError = require('../../../lib/core/error').MongoError, ReadPreference = require('../../../lib/core/topologies/read_preference'); -const rsWithPrimaryPath = f('%s/../spec/max-staleness/ReplicaSetWithPrimary', __dirname); -const rsWithoutPrimaryPath = f(...
1
'use strict'; const expect = require('chai').expect, p = require('path'), f = require('util').format, fs = require('fs'), Server = require('../../../lib/core/topologies/server'), ReplSetState = require('../../../lib/core/topologies/replset_state'), MongoError = require('../../../lib/core/error').MongoError...
1
16,883
Since we're here, can we use a template?
mongodb-node-mongodb-native
js
@@ -214,3 +214,10 @@ def postgres_db_info_resource(init_context): dialect='postgres', load_table=_do_load, ) + + +if __name__ == '__main__': + # This is a brutal hack. When the SparkSession is created for the first time there is a lengthy + # download process from Maven. This allows us to r...
1
import contextlib import os import shutil import tempfile from pyspark.sql import SparkSession from dagster import Field, resource, check, Dict, String, Path, Bool from dagster.utils import safe_isfile, mkdir_p from .types import DbInfo, PostgresConfigData, RedshiftConfigData from .utils import ( create_postgres...
1
13,074
saw you're also doing this in `test_types.py`: `spark = _spark_context()['test'].resources['spark'].resource_fn(None)` since `_spark_context()` uses `spark_session_local` won't the above break the tests?
dagster-io-dagster
py
@@ -49,10 +49,10 @@ var _ = Context("with initialized Felix, etcd datastore, 3 workloads", func() { defaultProfile := api.NewProfile() defaultProfile.Name = "default" defaultProfile.Spec.LabelsToApply = map[string]string{"default": ""} - defaultProfile.Spec.EgressRules = []api.Rule{{Action: "allow"}} + defau...
1
// +build fvtests // Copyright (c) 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 // // Unles...
1
15,865
`has(default)` i think is the preferred way of doing this
projectcalico-felix
go
@@ -35,9 +35,11 @@ class ScalarSpaceEncoderTest(unittest.TestCase): def testScalarSpaceEncoder(self): """scalar space encoder""" # use of forced=True is not recommended, but used in the example for readibility, see scalar.py - sse = ScalarSpaceEncoder(1,1,2,False,2,1,1,None,0,False,"delta", forced=True)...
1
#!/usr/bin/env python # ---------------------------------------------------------------------- # 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 ...
1
16,117
always put a space after a comma
numenta-nupic
py
@@ -289,6 +289,10 @@ public class LFMainActivity extends SharedMediaActivity { mediaAdapter.notifyItemChanged(toggleSelectPhoto(m)); editMode = true; } + else + { + selectAllPhotosUpToFav(getImagePosition(m.getPa...
1
package org.fossasia.phimpme.gallery.activities; import android.animation.Animator; import android.annotation.TargetApi; import android.content.ContentResolver; import android.content.ContentUris; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.con...
1
12,797
@angmas1 move the else up, next to the closing bracket of the if block. Also, there is no need for the braces as your else statement contains only a single line. Make your if-else block similar to the block in lines 277-280.
fossasia-phimpme-android
java
@@ -111,7 +111,7 @@ class WebDriver(object): def __init__(self, command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities=None, browser_profile=None, proxy=None, - keep_alive=False, file_detector=None): + keep_alive=False, file_detector=None, options=...
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,946
@AutomatedTester @davehunt thoughts on a new keyword argument?
SeleniumHQ-selenium
py
@@ -44,7 +44,7 @@ public class NodeStatus { public NodeStatus( NodeId nodeId, URI externalUri, - int maxSessionCount, + Integer maxSessionCount, Set<Slot> slots, Availability availability) { this.nodeId = Require.nonNull("Node id", nodeId);
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
18,479
This change shouldn't be necessary for this PR. Please remove it.
SeleniumHQ-selenium
py
@@ -27,7 +27,8 @@ import ( ) func testAlertmanagerInstanceNamespacesAllNs(t *testing.T) { - ctx := framework.NewTestCtx(t) + testCtx := framework.NewTestCtx(t) + ctx := &testCtx defer ctx.Cleanup(t) // create 3 namespaces:
1
// Copyright 2019 The prometheus-operator 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 ...
1
16,316
This variable is mostly unused, how about we make `NewTestCtx` return a pointer?
prometheus-operator-prometheus-operator
go
@@ -7,6 +7,10 @@ import ( "k8s.io/klog/v2" ) +const ( + maxPayloadLen = 32 * 1 << 20 // 32Mi +) + type Reader struct { reader io.Reader }
1
package packer import ( "fmt" "io" "k8s.io/klog/v2" ) type Reader struct { reader io.Reader } func NewReader(r io.Reader) *Reader { return &Reader{reader: r} } // Read message raw data from reader // steps: // 1)read the package header // 2)unpack the package header and get the payload length // 3)read the pa...
1
21,179
What is the basis of this value?
kubeedge-kubeedge
go
@@ -28,6 +28,7 @@ #include <sys/types.h> #include <sys/stat.h> +#include "gce_metadata.h" #include "stackdriver.h" #include "stackdriver_conf.h"
1
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Fluent Bit * ========== * Copyright (C) 2019-2020 The Fluent Bit Authors * Copyright (C) 2015-2018 Treasure Data Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in co...
1
13,390
Nit: was this extra blank line added intentionally?
fluent-fluent-bit
c
@@ -5837,6 +5837,12 @@ initialize_exception_record(EXCEPTION_RECORD* rec, app_pc exception_address, case ILLEGAL_INSTRUCTION_EXCEPTION: rec->ExceptionCode = EXCEPTION_ILLEGAL_INSTRUCTION; break; + case GUARD_PAGE_EXCEPTION: + rec->ExceptionCode = STATUS_GUARD_PAGE_VIOLATION; + re...
1
/* ********************************************************** * Copyright (c) 2010-2017 Google, Inc. All rights reserved. * Copyright (c) 2002-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
10,611
nit: inconsistent spacing around =
DynamoRIO-dynamorio
c
@@ -12,7 +12,6 @@ namespace Sonata\MediaBundle\Model; use Imagine\Image\Box; -use Sonata\ClassificationBundle\Model\CategoryInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\ExecutionContextInterface as LegacyExecutionContextInterface;
1
<?php /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\MediaBundle\Model; use Imagine\Image\Box; use ...
1
8,688
We still need this import
sonata-project-SonataMediaBundle
php
@@ -60,7 +60,7 @@ public class TestBinPackStrategy extends TableTestBase { } @Override - public Set<DataFile> rewriteFiles(String groupId, List<FileScanTask> filesToRewrite) { + public Set<DataFile> rewriteFiles(List<FileScanTask> filesToRewrite) { throw new UnsupportedOperationException(); ...
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 ...
1
37,514
We are pulling this because we removed "groupID" state and put it into the strategy implementations
apache-iceberg
java
@@ -17,8 +17,7 @@ #include <CL/sycl.hpp> #include "gtest/gtest.h" -#define ONEAPI_DAL_DATA_PARALLEL -#include "oneapi/dal/algo/kmeans_init.hpp" +#include "oneapi/dal/algo/kmeans_init/compute.hpp" #include "oneapi/dal/table/homogen.hpp" #include "oneapi/dal/table/row_accessor.hpp"
1
/******************************************************************************* * Copyright 2020 Intel Corporation * * 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.o...
1
24,855
Is this file actually related to PCA?
oneapi-src-oneDAL
cpp
@@ -6,7 +6,7 @@ import createEnableTracking from './createEnableTracking'; import createTrackEvent from './createTrackEvent'; const DEFAULT_CONFIG = { - isFirstAdmin: false, + isOwner: false, trackingEnabled: false, trackingID: '', referenceSiteURL: '',
1
/** * Internal dependencies */ import createEnableTracking from './createEnableTracking'; import createTrackEvent from './createTrackEvent'; const DEFAULT_CONFIG = { isFirstAdmin: false, trackingEnabled: false, trackingID: '', referenceSiteURL: '', userIDHash: '', }; /** * Initializes tracking. * * @param ...
1
31,172
See above, this should probably remain `isFirstAdmin`.
google-site-kit-wp
js
@@ -499,7 +499,7 @@ type ArrayExpression struct { Elements []Expression - typ MonoType + Type MonoType } func (*ArrayExpression) NodeType() string { return "ArrayExpression" }
1
package semantic import ( "regexp" "time" "github.com/influxdata/flux/ast" ) type Node interface { node() NodeType() string Copy() Node Location() ast.SourceLocation } type loc ast.SourceLocation func (l loc) Location() ast.SourceLocation { return ast.SourceLocation(l) } func (*Package) node() ...
1
13,624
Why the change to make it public? The expression interface has the `TypeOf` method?
influxdata-flux
go
@@ -1562,7 +1562,7 @@ namespace NLog.UnitTests.Targets } [Fact] - public void Single_Archive_File_Rolls_Correctly() + public void SingleArchiveFileRollsCorrectly() { var tempPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); var tempF...
1
// // Copyright (c) 2004-2011 Jaroslaw Kowalski <jaak@jkowalski.net> // // 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 source code must retain the above co...
1
12,290
don't mind the snake cases in the test names. If there are in the test cases, it's fine IMO
NLog-NLog
.cs
@@ -28,6 +28,11 @@ type identityRegistrationDto struct { Registered bool `json:"registered"` } +type identityUnlockingDto struct { + Id string `json:"id"` + Passphrase string `json:"passphrase"` +} + type identitiesApi struct { idm identity.IdentityManagerInterface mysteriumClient server.C...
1
package endpoints import ( "net/http" "encoding/json" "errors" "github.com/julienschmidt/httprouter" "github.com/mysterium/node/identity" "github.com/mysterium/node/server" "github.com/mysterium/node/tequilapi/utils" "github.com/mysterium/node/tequilapi/validation" ) type identityDto struct { Id string `jso...
1
10,131
`Id` defines REST resource address and should not be in payload
mysteriumnetwork-node
go
@@ -20,8 +20,11 @@ def main(): nargs='+', default=[100, 300, 1000], help='proposal numbers, only used for recall evaluation') + parser.add_argument( + '--class_wise', action='store_true', help='whether eval class wise ap') args = parser.parse_args() - coco_eval(args.result, ...
1
from argparse import ArgumentParser from mmdet.core import coco_eval def main(): parser = ArgumentParser(description='COCO Evaluation') parser.add_argument('result', help='result file path') parser.add_argument('--ann', help='annotation file path') parser.add_argument( '--types', type...
1
18,171
We can omit the underscore and just use `classwise`.
open-mmlab-mmdetection
py
@@ -77,10 +77,12 @@ class MediaAdminController extends Controller $datagrid->setValue('context', null, $context); // retrieve the main category for the tree view - $category = $this->container->get('sonata.classification.manager.category')->getRootCategory($context); + $rootCategory = ...
1
<?php /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\MediaBundle\Controller; use Sonata\AdminBundle...
1
8,844
Why not throw an exception instead then?
sonata-project-SonataMediaBundle
php
@@ -71,8 +71,7 @@ abstract class DataIterator<T> implements CloseableIterator<T> { InputFile getInputFile(FileScanTask task) { Preconditions.checkArgument(!task.isDataTask(), "Invalid task type"); - - return inputFiles.get(task.file().path().toString()); + return getInputFile(task.file().path().toString...
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 ...
1
32,843
Looks like this doesn't need to change. Can you revert this?
apache-iceberg
java
@@ -3,6 +3,7 @@ import sys from cliquet.scripts import cliquet from pyramid.scripts import pserve from pyramid.paster import bootstrap +from config import template CONFIG_FILE = 'config/kinto.ini'
1
import argparse import sys from cliquet.scripts import cliquet from pyramid.scripts import pserve from pyramid.paster import bootstrap CONFIG_FILE = 'config/kinto.ini' def main(args=None): """The main routine.""" if args is None: args = sys.argv[1:] parser = argparse.ArgumentParser(description="...
1
8,234
please import it like `from kinto.config import template`
Kinto-kinto
py
@@ -173,7 +173,7 @@ public final class Configuration { } public boolean isIsolationFilterOpen(String microservice) { - String p = getStringProperty("false", + String p = getStringProperty("true", PROP_ROOT + microservice + "." + FILTER_ISOLATION + FILTER_OPEN, PROP_ROOT + FILTER_ISOLATIO...
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,998
There are lots of default value changed, not sure if it break the old behavior.
apache-servicecomb-java-chassis
java
@@ -10,13 +10,15 @@ import ( "context" "encoding/hex" "math/big" + "net" + "strconv" - "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" - peerstore "github.com/libp2p/go-libp2p-peerstore" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "go.uber.org/zap" + "...
1
// Copyright (c) 2019 IoTeX // 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 of the cod...
1
15,185
File is not `goimports`-ed (from `goimports`)
iotexproject-iotex-core
go
@@ -29,9 +29,9 @@ namespace Nethermind.Cli.Modules public object[] Peers() => NodeManager.Post<object[]>("admin_peers").Result; [CliFunction("admin", "addPeer")] - public string AddPeer(string enode) => NodeManager.Post<string>("admin_addPeer", enode).Result; + public string Ad...
1
// Copyright (c) 2018 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
22,986
parameter should be called removeFromStaticNodes
NethermindEth-nethermind
.cs
@@ -221,7 +221,9 @@ class RequestContext: ServiceRequestHandler = Callable[[RequestContext, ServiceRequest], Optional[ServiceResponse]] -def handler(operation: str = None, context: bool = True, expand: bool = True): +def handler( + operation: str = None, context: bool = True, expand: bool = True, override: bool...
1
import functools import json import sys from io import BytesIO from typing import IO, Any, Callable, Dict, NamedTuple, Optional, Type, Union from localstack.utils.common import to_bytes if sys.version_info >= (3, 8): from typing import TypedDict else: from typing_extensions import TypedDict from botocore.mod...
1
14,305
The handler will have an extra property in the marker to signal the implementation is in the provider, for the cases we want to add functionality, for example, custom implementations not in moto.
localstack-localstack
py
@@ -14,6 +14,18 @@ class Subscription < ActiveRecord::Base notifier.send_notifications end + def active? + deactivated_on.nil? + end + + def deactivate + update_column(:deactivated_on, Date.today) + end + + def activate + update_column(:deactivated_on, nil) + end + private def self.subs...
1
# This class represents a user's subscription to Learn content class Subscription < ActiveRecord::Base belongs_to :user delegate :stripe_customer, to: :user def self.deliver_welcome_emails recent.each do |subscription| Mailer.welcome_to_prime(subscription.user).deliver end end def self.deliver...
1
7,327
Is this method actually being used anywhere? If not, I think we should remove it.
thoughtbot-upcase
rb
@@ -400,7 +400,7 @@ namespace AutoRest.Extensions { var bodyParameterType = bodyParameter.ModelType as CompositeType; if (bodyParameterType != null && - (bodyParameterType.ComposedProperties.Count(p => !p.IsConstant) <= Settings.Instance...
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.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Linq; using System.T...
1
23,314
Thanks! I somehow lost this between my far too many branchs.
Azure-autorest
java
@@ -30,13 +30,14 @@ import socket import sys from .firefox_binary import FirefoxBinary +from .options import Options from .remote_connection import FirefoxRemoteConnection from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.firefox.extension_connection import Ex...
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
13,574
i think this should get put into its own file. This could start to grow :)
SeleniumHQ-selenium
java
@@ -39,6 +39,13 @@ const ( // variable containers' config, which will be used by the AWS SDK to fetch // credentials. awsSDKCredentialsRelativeURIPathEnvironmentVariableName = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" + // pauseContainerName is the internal name for the pause container + pauseContainerName = "~int...
1
// Copyright 2014-2017 Amazon.com, Inc. or its affiliates. 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. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license...
1
15,084
Can you add a TODO for loading the tarball of the pause image into Docker?
aws-amazon-ecs-agent
go
@@ -259,7 +259,6 @@ public class ProcessJob extends AbstractProcessJob { } throw new RuntimeException(e); } finally { - this.process = null; info("Process completed " + (success ? "successfully" : "unsuccessfully") + " in " + ((System.currentTimeMillis(...
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
14,024
Is there any value in setting the process to null like this?
azkaban-azkaban
java
@@ -35,6 +35,14 @@ void SoftmaxWithLossLayer<Dtype>::Reshape( const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { LossLayer<Dtype>::Reshape(bottom, top); softmax_layer_->Reshape(softmax_bottom_vec_, softmax_top_vec_); + softmax_axis_ = this->layer_param_.softmax_param().axis(); + outer_n...
1
#include <algorithm> #include <cfloat> #include <vector> #include "caffe/layer.hpp" #include "caffe/layer_factory.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/vision_layers.hpp" namespace caffe { template <typename Dtype> void SoftmaxWithLossLayer<Dtype>::LayerSetUp( const vector<Blob<Dtype>*>& ...
1
32,303
This could be a good time to add a check that the prediction and target dimensions (except channel) agree?
BVLC-caffe
cpp
@@ -3920,6 +3920,11 @@ build_bb_ilist(dcontext_t *dcontext, build_bb_t *bb) if (!bb_process_interrupt(dcontext, bb)) break; } +#ifdef AARCH64 + /* OP_isb, when mangled, has a potential side exit. */ + else if (instr_get_opcode(bb->instr) == OP_isb) + break...
1
/* ********************************************************** * Copyright (c) 2011-2017 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
12,073
The requirement that OP_isb is bb-final needs to be a rule for clients, just like the rule that syscalls and interrupts must be bb-final: i.e., please add it to the dr_register_bb_event() docs.
DynamoRIO-dynamorio
c
@@ -83,7 +83,7 @@ define(["userSettings"], function (userSettings) { if (html += '<div class="listPaging">', showControls) { html += '<span style="vertical-align:middle;">'; - html += (totalRecordCount ? startIndex + 1 : 0) + "-" + recordsEnd + " of " + totalRecordCount; +...
1
define(["userSettings"], function (userSettings) { "use strict"; var libraryBrowser = { getSavedQueryKey: function (modifier) { return window.location.href.split("#")[0] + (modifier || ""); }, loadSavedQueryValues: function (key, query) { var values = userSetting...
1
13,741
The translate library has a method to replace the variables.
jellyfin-jellyfin-web
js
@@ -155,6 +155,18 @@ class SeriesTest(ReusedSQLTestCase, SQLTestUtils): with self.assertRaisesRegex(TypeError, msg): ds.isin(1) + def test_fillna(self): + ps = pd.Series([np.nan, 2, 3, 4, np.nan, 6], name='x') + ks = koalas.from_pandas(ps) + + self.assert_eq(ks.fillna(0),...
1
# # Copyright (C) 2019 Databricks, Inc. # # 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
9,215
i don't think this test case is correct. in both cases inpalce=True returns nothing. We need to compare the ks. Also we probably need to make a copy of it. Otherwise you pollute the following "ks" because ks has been changed.
databricks-koalas
py
@@ -124,6 +124,7 @@ with outfile.open("w") as f, contextlib.redirect_stdout(f): tls.TlsClienthelloHook, tls.TlsStartClientHook, tls.TlsStartServerHook, + tls.TlsHandshakeHook, ] )
1
#!/usr/bin/env python3 import contextlib import inspect import textwrap from pathlib import Path from typing import List, Type import mitmproxy.addons.next_layer # noqa from mitmproxy import hooks, log, addonmanager from mitmproxy.proxy import server_hooks, layer from mitmproxy.proxy.layers import http, modes, tcp, t...
1
15,883
Any proposals how to make the naming somehow include the "completed" idea of this hook? `TlsHandshakeCompletedHook` or similar? Or using the `...Start/End...` scheme?
mitmproxy-mitmproxy
py
@@ -157,6 +157,7 @@ namespace Nethermind.Blockchain.Synchronization if (headersSynced > 0) { + _blockTree.Flush(); _syncReport.FullSyncBlocksDownloaded.Update(_blockTree.BestSuggestedHeader?.Number ?? 0); _syncReport.FullSy...
1
// Copyright (c) 2018 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
23,465
it introduces a lot of complexity to the state, can we flush straightaway or create a two level flush store where the questions are read form unflushed data?
NethermindEth-nethermind
.cs
@@ -220,10 +220,10 @@ class JSTree extends AbstractBase if ('collection' === $type && !$this->collectionsEnabled) { $type = 'record'; } - $url = $this->getUrlFromRouteCache($type, $node->id); + $url = $this->getUrlFromRouteCache($type, urlencode($node->id...
1
<?php /** * Hierarchy Tree Renderer for the JS_Tree plugin * * PHP version 7 * * Copyright (C) Villanova University 2010. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. *...
1
27,292
There are two calls to getUrlFromRouteCache, but you're only urlencoding one of them. Is that intentional? Would it make more sense to do the url-encoding inside the getUrlFromRouteCache function?
vufind-org-vufind
php
@@ -142,7 +142,11 @@ class EditorManager { if (editorClass) { this.activeEditor = getEditorInstance(editorClass, this.instance); + this.activeEditor.row = row; // pre-preparation needed by getEditedCell + this.activeEditor.col = col; const td = this.activeEditor.getEditedCell(); + th...
1
import { CellCoords } from './3rdparty/walkontable/src'; import { KEY_CODES, isMetaKey, isCtrlMetaKey } from './helpers/unicode'; import { stopPropagation, stopImmediatePropagation, isImmediatePropagationStopped } from './helpers/dom/event'; import { getEditorInstance } from './editors'; import EventManager from './eve...
1
15,739
Maybe we can use `this.instance.getCell` with `topMost` flag to get `TD` element?
handsontable-handsontable
js
@@ -280,7 +280,11 @@ func (cs *ChainService) HandleAction(_ context.Context, actPb *iotextypes.Action if err := act.LoadProto(actPb); err != nil { return err } - return cs.actpool.Add(act) + err := cs.actpool.Add(act) + if err != nil { + log.L().Info(err.Error()) + } + return err } // HandleBlock handles in...
1
// Copyright (c) 2019 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
18,939
Change this to Debug Level
iotexproject-iotex-core
go
@@ -521,9 +521,9 @@ namespace NLog.Targets { _allLayoutsAreThreadSafe = _allLayouts.All(layout => layout.ThreadSafe); } - StackTraceUsage = _allLayouts.DefaultIfEmpty().Max(layout => layout?.StackTraceUsage ?? StackTraceUsage.None); - if (this is IUsesSta...
1
// // Copyright (c) 2004-2019 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
19,418
I refactored the Aggregate, those are hard to read
NLog-NLog
.cs
@@ -290,14 +290,6 @@ describe('region', function() { assert.isTrue(checkEvaluate.apply(checkContext, checkArgs)); }); - it('treats iframe elements as regions', function() { - var checkArgs = checkSetup( - '<iframe id="target"></iframe><div role="main">Content</div>' - ); - - assert.isTrue(check...
1
// NOTE: due to how the region check works to return the top-most // node that is outside the region, all fixture content will need // a region node (in most cases the <div role="main">Content</div>) // in order for the check to not give false positives/negatives. // adding the region node forces the check to not retur...
1
16,577
This is now done in the after method, so this test won't pass any more.
dequelabs-axe-core
js
@@ -152,10 +152,14 @@ class ApplicationController < ActionController::Base # have we identified the user? if @user # check if the user has been banned - if @user.blocks.active.exists? - # NOTE: need slightly more helpful message than this. + user_block = @user.blocks.active.take + ...
1
class ApplicationController < ActionController::Base include SessionPersistence protect_from_forgery before_action :fetch_body def authorize_web if session[:user] @user = User.where(:id => session[:user]).where("status IN ('active', 'confirmed', 'suspended')").first if @user.status == "suspe...
1
10,519
What was the point of creating `user_block` if you're then not going to use it ;-)
openstreetmap-openstreetmap-website
rb
@@ -22,9 +22,6 @@ from decorator import decorator import types import logging -from databricks.koalas.frame import PandasLikeDataFrame -from databricks.koalas.series import PandasLikeSeries - logger = logging.getLogger('spark') _TOUCHED_TEST = "_pandas_updated"
1
# # Copyright (C) 2019 Databricks, Inc. # # 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
8,355
@ueshin, I thought we can remove this entire file. Does that require some more works?
databricks-koalas
py
@@ -39,7 +39,7 @@ def evaluateTokens(requestContext, tokens): return float(tokens.number.scientific[0]) elif tokens.string: - return str(tokens.string)[1:-1] + return unicode(tokens.string)[1:-1] elif tokens.boolean: return tokens.boolean[0] == 'true'
1
import datetime import time from django.conf import settings from graphite.render.grammar import grammar from graphite.render.datalib import fetchData, TimeSeries def evaluateTarget(requestContext, target): tokens = grammar.parseString(target) result = evaluateTokens(requestContext, tokens) if type(result) is ...
1
8,372
Just `return tokens.string[1:-1]` is enough
graphite-project-graphite-web
py
@@ -0,0 +1,3 @@ +resources :quizzes, only: [:show] do + resources :questions, only: [:show] +end
1
1
14,618
1 trailing blank lines detected.
thoughtbot-upcase
rb
@@ -29,7 +29,7 @@ public class LeftButton extends Button { super(name); this.name = name; this.getStyleClass().add("leftButton"); - this.setPrefWidth(Double.MAX_VALUE); + this.setMaxWidth(Double.MAX_VALUE); this.setAlignment(Pos.CENTER_LEFT); this.setPadding(ne...
1
/* * Copyright (C) 2015-2017 PÂRIS Quentin * * 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 2 of the License, or * (at your option) any later version. * * This program is...
1
10,640
Isn't this the default max width? In any case I would prefer to see these definitions in the css files.
PhoenicisOrg-phoenicis
java
@@ -34,10 +34,11 @@ func redirParse(c *caddy.Controller) ([]Rule, error) { cfg := httpserver.GetConfig(c) initRule := func(rule *Rule, defaultCode string, args []string) error { - if cfg.TLS.Enabled { - rule.FromScheme = "https" - } else { - rule.FromScheme = "http" + rule.FromScheme = func() string { + ...
1
package redirect import ( "net/http" "github.com/mholt/caddy" "github.com/mholt/caddy/caddyhttp/httpserver" ) func init() { caddy.RegisterPlugin("redir", caddy.Plugin{ ServerType: "http", Action: setup, }) } // setup configures a new Redirect middleware instance. func setup(c *caddy.Controller) error {...
1
9,986
Is this thread-safe? (If not, and if the solution is to introduce locking, let's reconsider how we do the scheme changing instead...)
caddyserver-caddy
go
@@ -21,8 +21,8 @@ # IN THE SOFTWARE. #------------------------------------------------------------------------------- from datatable.lib._datatable import ( - Ftrl, aggregate, + Ftrl, kfold, kfold_random, )
1
#!/usr/bin/env python #------------------------------------------------------------------------------- # Copyright 2018 H2O.ai # # 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 restri...
1
12,211
Looks like this file has tabs instead of spaces.
h2oai-datatable
py