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 |
|---|---|---|---|---|---|---|---|
@@ -19,10 +19,10 @@ package v1alpha1
import (
"context"
+ "github.com/google/knative-gcp/pkg/logging"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
"knative.dev/eventing/pkg/apis/messaging"
- "knative.dev/eventing/pkg/logging"
"knative.dev/pkg/apis"
"github.com/google/knative-gcp/p... | 1 | /*
Copyright 2019 The Knative 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, soft... | 1 | 17,867 | did we move the eventing logging here? Probably the eventing logging was removing and they are now using the pkg logging in eventing. If that is the case, we should do the same here | google-knative-gcp | go |
@@ -50,8 +50,7 @@ type Filter func(*http.Request) bool
// the mux are wrapped with WithRouteTag. A Handler will add various attributes
// to the span using the core.Keys defined in this package.
type Handler struct {
- operation string
- handler http.Handler
+ handler http.Handler
tracer trace.Tracer... | 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 | 11,773 | I think that `Handler` should preserve the `operation` member and the span formatter should receive the operation name string as a parameter too, otherwise the `operation` parameter in the `NewHandler` function becomes useless if we pass a custom span formatter. Also, shouldn't it be called `spanNameFormatter`? | open-telemetry-opentelemetry-go | go |
@@ -67,7 +67,7 @@ class HSRPmd5(Packet):
ByteEnumField("algo", 0, {1: "MD5"}),
ByteField("padding", 0x00),
XShortField("flags", 0x00),
- IPField("sourceip", None),
+ IPField("sourceip", "127.0.0.1"),
XIntField("keyid", 0x00),
StrFixedLenField("authdigest", "\00... | 1 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
#############################################################################
## ... | 1 | 9,226 | Can you merge #466? That would make the current `None` default value working and more relevant that `"127.0.0.1"`. | secdev-scapy | py |
@@ -96,14 +96,15 @@ func (v *Validator) Validate(searchAttributes *commonpb.SearchAttributes, namesp
}
for saName, saPayload := range searchAttributes.GetIndexedFields() {
- if IsReservedField(saName) {
- return serviceerror.NewInvalidArgument(fmt.Sprintf("%s is Temporal reserved field name", saName))
+ if !t... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 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 Soft... | 1 | 11,951 | is reserved filed name the only possible reason this could fail? | temporalio-temporal | go |
@@ -169,6 +169,10 @@ func defaultLogPath(ctx Context) string {
// DefaultInitParams returns default init params
func DefaultInitParams(ctx Context) InitParams {
+ journalEnv := os.Getenv("KBFS_ENABLE_JOURNAL")
+ if journalEnv == "" {
+ journalEnv = "true"
+ }
return InitParams{
Debug: BoolForString... | 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 (
"context"
"errors"
"flag"
"fmt"
"os"
"os/signal"
"path/filepath"
"strings"
"time"
"github.com/keybase/client/go/libkb"
"github.com/... | 1 | 18,499 | Would a KBFS_DISABLE_JOURNAL make more sense? | keybase-kbfs | go |
@@ -40,6 +40,8 @@ void DropSpaceExecutor::execute() {
if (*spaceName_ == ectx()->rctx()->session()->spaceName()) {
ectx()->rctx()->session()->setSpace("", -1);
}
+ ectx()->addWarningMsg("Data will be deleted completely after restarting the services");
+
doFinish(Executor::... | 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 "graph/DropSpaceExecutor.h"
namespace nebula {
namespace graph {
DropSpaceExecutor::DropSpaceExecutor(Sentenc... | 1 | 29,850 | BTW. What's the message meaning?... | vesoft-inc-nebula | cpp |
@@ -289,4 +289,15 @@ describe Mongoid::Extensions::Object do
end
end
end
+
+ describe "#numeric?" do
+
+ let(:object) do
+ Object.new
+ end
+
+ it "returns false" do
+ expect(object.numeric?).to eq(false)
+ end
+ end
end | 1 | require "spec_helper"
describe Mongoid::Extensions::Object do
describe "#__evolve_object_id__" do
let(:object) do
Object.new
end
it "returns self" do
expect(object.__evolve_object_id__).to eq(object)
end
end
describe "#__find_args__" do
let(:object) do
Object.new
en... | 1 | 11,163 | this should say false | mongodb-mongoid | rb |
@@ -1,3 +1,4 @@
+//go:build unit
// +build unit
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. | 1 | // +build unit
// Copyright 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 "li... | 1 | 26,583 | for my understanding - are this line and the next line both necessary? they seem to contain duplicate information. same for the other test files | aws-amazon-ecs-agent | go |
@@ -102,6 +102,13 @@ def _get_search_url(txt):
engine = 'DEFAULT'
template = config.val.url.searchengines[engine]
url = qurl_from_user_input(template.format(urllib.parse.quote(term)))
+
+ if config.val.url.open_base_url and \
+ term in config.val.url.searchengines.keys():
+ url =... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2018 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 | 20,785 | No need for the `.keys()`, iterating over a dictionary gives you its keys (and thus you can also do `key in some_dict`). With that, it also fits on one line :wink: | qutebrowser-qutebrowser | py |
@@ -24,14 +24,6 @@ namespace eprosima {
namespace fastrtps {
namespace rtps {
-IPLocator::IPLocator()
-{
-}
-
-IPLocator::~IPLocator()
-{
-}
-
// Factory
void IPLocator::createLocator(
int32_t kindin, | 1 | // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... | 1 | 20,604 | If we want to avoid the user calling constructor and destructor, we should add `= delete` to their declarations. If we just want to avoid writing the default behavior, we should add `= default` to the declarations. I'm more in favor of the second option to avoid an API break. | eProsima-Fast-DDS | cpp |
@@ -269,12 +269,12 @@ class GrapheneObjectStoreOperationResult(graphene.ObjectType):
return _to_metadata_entries(self.metadata_entries) # pylint: disable=no-member
-class GrapheneMaterialization(graphene.ObjectType):
+class GrapheneMaterializationOrObservation(graphene.ObjectType):
assetKey = graphen... | 1 | import graphene
from dagster import check
from dagster.core.events import AssetLineageInfo, DagsterEventType
from dagster.core.execution.plan.objects import ErrorSource
from dagster.core.execution.stats import RunStepKeyStatsSnapshot
from ...implementation.fetch_runs import get_step_stats
from ..asset_key import Graph... | 1 | 18,601 | My preference here is to keep a stricter hierarchy. We should have a mixin or something that is an AssetEvent that Observation and Materialization can both inherit from. That way we can check the type in the frontend if we need to. | dagster-io-dagster | py |
@@ -212,7 +212,7 @@ class SpatialPoolerTest(unittest.TestCase):
# Get only the active column indices
spOutput = [i for i, v in enumerate(activeArray) if v != 0]
- self.assertEqual(spOutput, expectedOutput)
+ self.assertEqual(sorted(spOutput), expectedOutput)
def testStripNeverLearned(self): | 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 | 19,782 | Can also cast them as `set`s and compare them. | numenta-nupic | py |
@@ -0,0 +1 @@
+package trigger | 1 | 1 | 20,991 | Still TODO I guess? | jetstack-cert-manager | go | |
@@ -37,8 +37,6 @@
#include <fastdds/rtps/builtin/BuiltinProtocols.h>
#include <fastdds/rtps/builtin/liveliness/WLP.h>
-#include <functional>
-
using namespace eprosima::fastrtps;
using namespace ::rtps;
using namespace std::chrono; | 1 | // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... | 1 | 17,319 | Another cleanup. There are two additional `using namespace std::chrono;` under this one. Should also remove std::chrono:: from the full file. Please do this on a single commit. | eProsima-Fast-DDS | cpp |
@@ -501,7 +501,7 @@ public final class JavaParserMetaModel {
enclosedExprMetaModel.getDeclaredPropertyMetaModels().add(enclosedExprMetaModel.innerPropertyMetaModel);
fieldAccessExprMetaModel.namePropertyMetaModel = new PropertyMetaModel(fieldAccessExprMetaModel, "name", com.github.javaparser.ast.expr.... | 1 | package com.github.javaparser.metamodel;
import com.github.javaparser.ast.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
/**
* The model contains meta-data about all nodes in the AST.
*/
public final class JavaParserMetaModel {
private JavaParserMetaModel() {
}
privat... | 1 | 10,997 | Looking at this list of boolean flags I wonder if we should create enums for all of these options, so that the code becomes much more readable | javaparser-javaparser | java |
@@ -29,8 +29,11 @@
#include <fastrtps/qos/QosPolicies.h>
#include <fastrtps/utils/TimeConversion.h>
+#include <rtps/builtin/data/ProxyHashTables.hpp>
+
#include <mutex>
#include <chrono>
+#include <unordered_set>
using namespace eprosima::fastrtps;
| 1 | // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... | 1 | 16,468 | Is this necessary? | eProsima-Fast-DDS | cpp |
@@ -0,0 +1,15 @@
+namespace Microsoft.Azure.Cosmos.CosmosElements
+{
+ internal abstract class CosmosElement
+ {
+ protected CosmosElement(CosmosElementType cosmosItemType)
+ {
+ this.Type = cosmosItemType;
+ }
+
+ public CosmosElementType Type
+ {
+ get;
... | 1 | 1 | 15,361 | How about this NS inside query NS? | Azure-azure-cosmos-dotnet-v3 | .cs | |
@@ -53,7 +53,7 @@ func LoadOrCreateAccount(sm protocol.StateManager, encodedAddr string) (*state.A
}
// LoadAccount loads an account state
-func LoadAccount(sm protocol.StateManager, addrHash hash.Hash160) (*state.Account, error) {
+func LoadAccount(sm protocol.StateReader, addrHash hash.Hash160) (*state.Account, e... | 1 | // Copyright (c) 2018 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 | 20,479 | in line 79, sm also can be stateReader | iotexproject-iotex-core | go |
@@ -876,6 +876,13 @@ int32_t MetaClient::partsNum(GraphSpaceID spaceId) {
return it->second->partsAlloc_.size();
}
+std::unordered_map<HostAddr, std::vector<PartitionID>>
+MetaClient::partsBySpace(GraphSpaceID spaceId) {
+ folly::RWSpinLock::ReadHolder holder(localCacheLock_);
+ auto it = localCache_.find... | 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 "meta/common/MetaCommon.h"
#include "meta/client/MetaClient.h"
#include "network/NetworkUtils.h"
#include "meta... | 1 | 21,871 | maybe can not return a map directly, it will be modified by inner thread. | vesoft-inc-nebula | cpp |
@@ -299,7 +299,7 @@ class Diff(unittest.TestCase):
cmp_data)
# Unesolved core checkers.
test_res = {'core.NullDereference': 4, 'core.DivideZero': 3}
- self.assertDictEqual(diff_res, test_res)
+ self.assertDictContainsSubset(test_res, d... | 1 | #
# -----------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------... | 1 | 7,514 | What is the actual change here, why is this test change needed? Now the diff will send back more data? | Ericsson-codechecker | c |
@@ -89,6 +89,17 @@ int RGroupDecomposition::add(const ROMol &inmol) {
const bool addCoords = true;
MolOps::addHs(mol, explicitOnly, addCoords);
+ // mark any wildcards in input molecule:
+ for (auto &atom : mol.atoms()) {
+ if (atom->getAtomicNum() == 0) {
+ atom->setIsotope(1000U);
+ // clean an... | 1 | //
// Copyright (c) 2017-2021, Novartis Institutes for BioMedical Research Inc.
// and other RDKit contributors
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistribut... | 1 | 23,959 | Might be better to use a tag here. I for one have used 1000 isotopes as a tag in the past... | rdkit-rdkit | cpp |
@@ -128,11 +128,11 @@ func TestSetName(t *testing.T) {
}
}
-func TestRecordingIsOff(t *testing.T) {
+func TestRecordingIsOn(t *testing.T) {
tp, _ := NewProvider()
_, span := tp.Tracer("Recording off").Start(context.Background(), "StartSpan")
defer span.End()
- if span.IsRecording() == true {
+ if span.IsReco... | 1 | // Copyright 2019, 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 ag... | 1 | 11,327 | This tests seems it was broken from the start :joy:. It "worked" because the old sample chance was small enough that this have always be off. Thanks for fixing this. Could you also change the strings on this test? `"Recording off"` and `"new span is recording events"` | open-telemetry-opentelemetry-go | go |
@@ -44,6 +44,14 @@ public final class PmdParametersParseResult {
return !isError() && result.isHelp();
}
+ /**
+ * Returns whether parsing just requested the {@code --version} text.
+ * In this case no configuration is produced.
+ */
+ public boolean isVersion() {
+ return !isEr... | 1 | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.cli;
import java.util.Objects;
import net.sourceforge.pmd.PMDConfiguration;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.ParameterException;
/**
* Result of parsing a bunch of ... | 1 | 19,201 | This is not actually the case, you need to modify `toConfiguration` below to prevent a configuration from being produced | pmd-pmd | java |
@@ -88,7 +88,7 @@ func (a *attestor) loadSVID(ctx context.Context) (*x509.Certificate, *ecdsa.Priv
svid := a.readSVIDFromDisk()
if len(fResp.PrivateKey) > 0 && svid == nil {
- a.c.Log.Warn("Private key recovered, but no SVID found")
+ a.c.Log.Debug("Private key recovered, but no SVID found")
}
var keyData... | 1 | package attestor
import (
"context"
"crypto/ecdsa"
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"io"
"net/url"
"path"
"github.com/sirupsen/logrus"
spiffe_tls "github.com/spiffe/go-spiffe/tls"
"github.com/spiffe/spire/pkg/agent/catalog"
"github.com/spiffe/spire/pkg/agent/manager"
"github.com/spiffe/spire/pk... | 1 | 9,958 | I'm worried about we hide some important log here | spiffe-spire | go |
@@ -625,7 +625,7 @@ def start_workers(actions_map, actions, context, analyzer_config_map,
callback=lambda results: worker_result_handler(
results, metadata, output_path,
context.analyzer_binaries)
- ).g... | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 10,402 | Python 3 will throw an exception for inf, but not providing a timeout will result in no timeout exception. | Ericsson-codechecker | c |
@@ -45,6 +45,18 @@ func (s *server) setupRouting() {
"POST": http.HandlerFunc(s.chunkUploadHandler),
})
+ router.Handle("/bzz-tag/name/{name}", jsonhttp.MethodHandler{
+ "GET": http.HandlerFunc(s.getANewTag),
+ })
+
+ router.Handle("/bzz-tag/addr/{addr}", jsonhttp.MethodHandler{
+ "GET": http.HandlerFunc(s.get... | 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 api
import (
"fmt"
"net/http"
"github.com/ethersphere/bee/pkg/jsonhttp"
"github.com/ethersphere/bee/pkg/logging"
"github.com/gorilla/handlers"... | 1 | 10,180 | As this method changes the state, it should be `POST`. Also, maybe to rename it to `createTag`? | ethersphere-bee | go |
@@ -24,6 +24,6 @@ func (e *Executor) ensureTrafficSplit(ctx context.Context) model.StageStatus {
return model.StageStatus_STAGE_SUCCESS
}
-func (e *Executor) rollbackTraffic(ctx context.Context) model.StageStatus {
- return model.StageStatus_STAGE_SUCCESS
+func (e *Executor) rollbackTraffic(ctx context.Context) er... | 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 | 7,930 | `ctx` is unused in rollbackTraffic | pipe-cd-pipe | go |
@@ -0,0 +1,12 @@
+
+using System;
+
+namespace SarifViewer
+{
+ internal sealed partial class Guids
+ {
+ public const string guidVSPackageString = "b97edb99-282e-444c-8f53-7de237f2ec5e";
+
+ public static Guid guidVSPackage = new Guid(guidVSPackageString);
+ }
+} | 1 | 1 | 10,010 | Roslyn conventions have const in PascalCase. | microsoft-sarif-sdk | .cs | |
@@ -112,7 +112,7 @@ public class ZookeeperStatusHandler extends RequestHandlerBase {
.map(h -> h.resolveClientPortAddress() + ":" + h.clientPort)
.sorted().collect(Collectors.toList());
List<String> dynamicHosts = zkDynamicConfig.getServers().stream()
- .map(h -> h.resolveClientPor... | 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 | 35,900 | This is not bullet proof if e.g. user has `clientPort=1234` in `zoo.cfg` and in zkHost connection string. Then we'll add a warning that dynamic config differs from zkHost, which is not entirely true since we just lack the port part. We have no way from client to read the `clientPort` from server except from connecting ... | apache-lucene-solr | java |
@@ -1,8 +1,8 @@
#if MESSAGEPACK_2_1
using System;
using Datadog.Trace.ExtensionMethods;
-using MessagePack;
-using MessagePack.Formatters;
+using Datadog.Trace.Vendors.MessagePack;
+using Datadog.Trace.Vendors.MessagePack.Formatters;
namespace Datadog.Trace.Agent.MessagePack
{ | 1 | #if MESSAGEPACK_2_1
using System;
using Datadog.Trace.ExtensionMethods;
using MessagePack;
using MessagePack.Formatters;
namespace Datadog.Trace.Agent.MessagePack
{
internal class SpanMessagePackFormatter : IMessagePackFormatter<Span>
{
public void Serialize(ref MessagePackWriter writer, Span value, Me... | 1 | 17,382 | We can probably delete this entire file. It's not used now and we'll (probably) write a custom serializer before we ever switch to MessagePack 2.1. | DataDog-dd-trace-dotnet | .cs |
@@ -174,8 +174,11 @@ class ConfigV1(Config):
'limit': 'all',
'playbook': 'playbook.yml',
'raw_ssh_args': [
- '-o UserKnownHostsFile=/dev/null', '-o IdentitiesOnly=yes',
- '-o ControlMaster=auto', '-o ControlPersist=60s'
+ ... | 1 | # Copyright (c) 2015-2016 Cisco Systems, 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 | 6,939 | Aren't you duplicating this option? | ansible-community-molecule | py |
@@ -440,6 +440,17 @@ func (a *Analyzer) IsBuildFile(uri lsp.DocumentURI) bool {
return a.State.Config.IsABuildFile(base)
}
+// IsBuildDefFile takes a uri path and check if it's a valid .build_defs file
+func (a *Analyzer) IsBuildDefFile(uri lsp.DocumentURI) bool {
+ filepath, err := GetPathFromURL(uri, "file")
+ i... | 1 | package langserver
import (
"context"
"core"
"fmt"
"io/ioutil"
"path"
"sort"
"strconv"
"strings"
"parse/asp"
"parse/rules"
"src/fs"
"tools/build_langserver/lsp"
)
// Analyzer is a wrapper around asp.parser
// This is being loaded into a handler on initialization
type Analyzer struct {
parser *asp.Parse... | 1 | 8,541 | I'm not sure we should be doing this based on the extension? Calling them `.build_defs` is just a convention | thought-machine-please | go |
@@ -30,7 +30,6 @@ def unsupported_property(property_name, deprecated=False, reason=""):
class _MissingPandasLikeIndex(object):
# Properties
- T = unsupported_property('T')
nbytes = unsupported_property('nbytes')
shape = unsupported_property('shape')
| 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 | 13,046 | Should remove in `_MissingPandasLikeMultiIndex:` too | databricks-koalas | py |
@@ -107,6 +107,10 @@ type AWSLoadBalancerSpec struct {
// Defaults to false.
// +optional
CrossZoneLoadBalancing bool `json:"crossZoneLoadBalancing,omitempty"`
+
+ // Subnets specifies the subnets that should be used by the load balancer
+ // +optional
+ Subnets Subnets `json:"subnets,omitempty"`
}
// AWSClus... | 1 | /*
Copyright 2019 The Kubernetes 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 | 15,274 | We should scope this down to the bits that we're actually using, otherwise the API is going to be problematic, as it includes references to NAT gateways and public and/or private subnets. Copying the types to be more local to the task in hand is fine. | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -45,6 +45,12 @@ type AWSDNSZoneSpec struct {
// to these tags,the DNS Zone controller will set a hive.openhsift.io/hostedzone tag
// identifying the HostedZone record that it belongs to.
AdditionalTags []AWSResourceTag `json:"additionalTags,omitempty"`
+
+ // Region is the AWS region to use for route53 operati... | 1 | package v1
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
// FinalizerDNSZone is used on DNSZones to ensure we successfully deprovision
// the cloud objects before cleaning up the API object.
FinalizerDNSZone string = "hive.openshift.io/dnszone"
// FinalizerDNSEndp... | 1 | 10,891 | Is it is a hard requirement for this field to be 'cn-northwest-1' when wanting to interact with AWS China? It appears that putting in 'cn-north-1' would also result in using the alternative API endpoint (with the region overridden to use 'cn-northwest-1' for the created AWS client). | openshift-hive | go |
@@ -812,7 +812,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
Assert.IsType<Http2StreamErrorException>(thrownEx.InnerException);
}
- [Fact]
+ [Fact(Skip="Flaky test #2799")]
public async Task ContentLength_Received_MultipleDataFramesOverSize_Reset()
... | 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.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.ExceptionServices;
using System.Threading;
usi... | 1 | 16,364 | Stephen already fixed this one. Only the OverSize test is flaky now right? | aspnet-KestrelHttpServer | .cs |
@@ -0,0 +1,6 @@
+<%= @activity %>
+
+<%= t("mailer.proposal_link_text",
+ proposal_url: proposal_url(@proposal)) %>
+
+<%= t("mailer.footer", feedback_url: feedback_url) %> | 1 | 1 | 16,664 | if the `activity_mailer` has a layout, should we include the footer in that? Realize there may also be conflicts with work @rememberlenny is working on... | 18F-C2 | rb | |
@@ -16,6 +16,12 @@ require 'ruby_smb'
ENV['RACK_ENV'] = 'test'
$LOAD_PATH.unshift File.join(__dir__, 'lib')
+# Disables internationalized strings, which shouldn't be needed for tests.
+# This gets around an issue where Puppet::Environment and GettextSetup in
+# r10k are fighting over the same text domain within the... | 1 | # frozen_string_literal: true
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
require 'bolt'
require 'bolt/logger'
require 'logging'
require 'net/ssh'
require 'rspec/logging_helper'
# Make sure puppet is required for the 'reset puppet settings' context
require 'puppet_pal'
# HACK: must be loaded pr... | 1 | 14,808 | This makes me nervous, mostly because I don't know very much about it. Will users run into the gettext error in the wild? I can't reproduce it locally, but it's hard to be 100% sure. Is disabling gettext in Pal an option? | puppetlabs-bolt | rb |
@@ -388,4 +388,10 @@ public class MockExecutorLoader implements ExecutorLoader {
public void unassignExecutor(int executionId) throws ExecutorManagerException {
executionExecutorMapping.remove(executionId);
}
+
+ @Override
+ public List<ExecutableFlow> fetchRecentlyFinishedFlows(long lifeTimeMs)
+ thr... | 1 | /*
* Copyright 2014 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 | 13,212 | Is Java smart enough to know the generic type here? Never knew this. | azkaban-azkaban | java |
@@ -71,7 +71,7 @@ public class BackupRepositoryFactory {
PluginInfo repo = Objects.requireNonNull(backupRepoPluginByName.get(name),
"Could not find a backup repository with name " + name);
- BackupRepository result = loader.newInstance(repo.className, BackupRepository.class);
+ BackupRepository re... | 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 | 31,650 | no thought given to reload | apache-lucene-solr | java |
@@ -291,8 +291,17 @@ public abstract class ScheduledReporter implements Closeable, Reporter {
return shutdownExecutorOnStop;
}
- protected Set<MetricAttribute> getDisabledMetricAttributes() {
- return disabledMetricAttributes;
+ /**
+ * Check if Attribute disabled to be logged
+ * @... | 1 | package com.codahale.metrics;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Closeable;
import java.util.Collections;
import java.util.Locale;
import java.util.Set;
import java.util.SortedMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.u... | 1 | 6,799 | Please, don't remove the `getDisabledMetricAttributes` method. All changes must be backward-compatible. | dropwizard-metrics | java |
@@ -195,7 +195,11 @@ function prepareDatabaseForSuite(suite, context) {
.admin()
.command({ killAllSessions: [] })
.catch(err => {
- if (err.message.match(/no such (cmd|command)/) || err.code === 11601) {
+ if (
+ err.message.match(/no such (cmd|command)/) ||
+ err.message.match(/... | 1 | 'use strict';
const path = require('path');
const fs = require('fs');
const chai = require('chai');
const expect = chai.expect;
const { EJSON } = require('bson');
const { isRecord } = require('../../../src/utils');
const TestRunnerContext = require('./context').TestRunnerContext;
const resolveConnectionString = require... | 1 | 20,548 | Is this left over from debugging? | mongodb-node-mongodb-native | js |
@@ -86,7 +86,7 @@ before(function(_done) {
}
this.configuration = new TestConfiguration(parsedURI, context);
- done();
+ client.close(done);
});
});
}); | 1 | 'use strict';
const path = require('path');
const fs = require('fs');
const MongoClient = require('../../..').MongoClient;
const TestConfiguration = require('./config');
const parseConnectionString = require('../../../lib/core/uri_parser');
const eachAsync = require('../../../lib/core/utils').eachAsync;
const mock = r... | 1 | 18,747 | I've fallen for this before myself :) We _do_ call `close` inside of `done` on L65 | mongodb-node-mongodb-native | js |
@@ -269,7 +269,9 @@ func (f *Fs) connect(ctx context.Context) (project *uplink.Project, err error) {
fs.Debugf(f, "connecting...")
defer fs.Debugf(f, "connected: %+v", err)
- cfg := uplink.Config{}
+ cfg := uplink.Config{
+ UserAgent: "rclone",
+ }
project, err = cfg.OpenProject(ctx, f.access)
if err != ni... | 1 | // +build go1.13,!plan9
// Package tardigrade provides an interface to Tardigrade decentralized object storage.
package tardigrade
import (
"context"
"fmt"
"io"
"log"
"path"
"strings"
"time"
"github.com/pkg/errors"
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/fs/config"
"github.com/rclone/rclon... | 1 | 11,195 | That looks fine! You could use `"rclone/"+fs.Version` too if you wanted. BTW does tardigrade use http under the hood? If you were using rclone's http Client then you'd get a User-Agent and you'd also get support for `-vv --dump bodies` and other nice things. | rclone-rclone | go |
@@ -260,6 +260,10 @@ class FreeAnchorRetinaHead(RetinaHead):
Tensor: Negative bag loss in shape (num_img, num_anchors, num_classes).
""" # noqa: E501, W605
prob = cls_prob * (1 - box_prob)
- negative_bag_loss = prob**self.gamma * F.binary_cross_entropy(
- prob, torch.ze... | 1 | import torch
import torch.nn.functional as F
from mmdet.core import bbox_overlaps
from ..builder import HEADS
from .retina_head import RetinaHead
@HEADS.register_module()
class FreeAnchorRetinaHead(RetinaHead):
"""FreeAnchor RetinaHead used in https://arxiv.org/abs/1909.02466.
Args:
num_classes (int... | 1 | 21,741 | Adding one line `prob = prob.clamp(min=EPS, max=1-EPS)` already works. | open-mmlab-mmdetection | py |
@@ -118,7 +118,15 @@ namespace NLog.Targets.Wrappers
/// <param name="overflowAction">The action to be taken when the queue overflows.</param>
public AsyncTargetWrapper(Target wrappedTarget, int queueLimit, AsyncTargetWrapperOverflowAction overflowAction)
{
- RequestQueue = new Asy... | 1 | //
// Copyright (c) 2004-2018 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 | 16,976 | another option would be to create a `CreateRequestQueue(bool lockingQeueue)`, and set it only in `InitializeTarget`, isn't? The would prefer having the creation and "business" rules for the creation in one region, I think `InitializeTarget` would be the best place. | NLog-NLog | .cs |
@@ -805,7 +805,7 @@ static void subsurface_handle_place_above(struct wl_client *client,
}
wl_list_remove(&subsurface->parent_pending_link);
- wl_list_insert(sibling->parent_pending_link.prev,
+ wl_list_insert(&sibling->parent_pending_link,
&subsurface->parent_pending_link);
subsurface->reordered = true; | 1 | #include <assert.h>
#include <stdlib.h>
#include <wayland-server.h>
#include <wlr/render/egl.h>
#include <wlr/render/interface.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_linux_dmabuf.h>
#include <wlr/types/wlr_matrix.h>
#include <wlr/types/wlr_region.h>
#include <wlr/types/wlr_surface.h>
#include ... | 1 | 11,733 | Wait, I think the `subsurface_handle_place_above` code was correct before. `place_above` means "place it above in rendering order" right? | swaywm-wlroots | c |
@@ -4,9 +4,10 @@ public class Test {
/**
* Docstring that looks like a list:
*
- * <p>1. hey 2. there
+ * 1. hey
+ * 2. there
*
- * <p>with blank line.
+ * with blank line.
*/
Void test() {
/* | 1 | package test;
public class Test {
/**
* Docstring that looks like a list:
*
* <p>1. hey 2. there
*
* <p>with blank line.
*/
Void test() {
/*
Normal comment
with blank line.
*/
}
}
| 1 | 8,796 | why did this change? | palantir-gradle-baseline | java |
@@ -15,12 +15,13 @@ import (
)
func TestBareRootMetadataVersionV3(t *testing.T) {
- tlfID := tlf.FakeID(1, false)
+ tlfID := tlf.FakeID(1, tlf.Private)
// All V3 objects should have SegregatedKeyBundlesVer.
uid := keybase1.MakeTestUID(1)
- bh, err := tlf.MakeHandle([]keybase1.UID{uid}, nil, nil, nil, nil)
+... | 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 (
"testing"
"github.com/keybase/client/go/protocol/keybase1"
"github.com/keybase/kbfs/kbfscodec"
"github.com/keybase/kbfs/kbfscrypto"
"gith... | 1 | 16,906 | Do you think we should have some tests here for `tlf.SingleTeam` too? | keybase-kbfs | go |
@@ -1,6 +1,8 @@
package table
-import "github.com/influxdata/flux"
+import (
+ "github.com/influxdata/flux"
+)
// Copy returns a buffered copy of the table and consumes the
// input table. If the input table is already buffered, it "consumes" | 1 | package table
import "github.com/influxdata/flux"
// Copy returns a buffered copy of the table and consumes the
// input table. If the input table is already buffered, it "consumes"
// the input and returns the same table.
//
// The buffered table can then be copied additional times using the
// BufferedTable.Copy me... | 1 | 15,878 | No problem with this but might as well revert this file since nothing else changed. | influxdata-flux | go |
@@ -14,18 +14,7 @@ namespace Datadog.Trace.ClrProfiler.Integrations
/// </summary>
public static void Register()
{
- Tracer.Instance = new Tracer(
- settings: null,
- agentWriter: null,
- sampler: null,
- scopeManager: new... | 1 | #if !NETSTANDARD2_0
using System.Web;
namespace Datadog.Trace.ClrProfiler.Integrations
{
/// <summary>
/// Used as the target of a PreApplicationStartMethodAttribute on the assembly to load the AspNetHttpModule into the pipeline
/// </summary>
public static class AspNetStartup
{
/// <s... | 1 | 16,092 | In my changes, I did not create a new `AspNetScopeManager`. I'm not familiar with it enough to know if this is a valid change or not | DataDog-dd-trace-dotnet | .cs |
@@ -0,0 +1,3 @@
+export default message => {
+ throw new Error(message);
+}; | 1 | 1 | 5,570 | Not cool with this. I think we talked about it in past. This is a side effect. If we want to introduce the side effect in our functions like `inRange` (which I am for) the side effect (error) should originate in that function and not in some internal `throwError` function. Every stacktract will start at line `2` of `tr... | char0n-ramda-adjunct | js | |
@@ -25,6 +25,9 @@ public interface Span extends AutoCloseable, TraceContext {
Span setAttribute(String key, Number value);
Span setAttribute(String key, String value);
+ Span addEvent(String name);
+ Span addEvent(String name, long timestamp);
+
Span setStatus(Status status);
@Override | 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 | 17,759 | We don't need this additional method. | SeleniumHQ-selenium | js |
@@ -44,11 +44,10 @@ public class DelegatingOAuth2UserServiceTests {
}
@Test(expected = IllegalArgumentException.class)
- @SuppressWarnings("unchecked")
public void loadUserWhenUserRequestIsNullThenThrowIllegalArgumentException() {
DelegatingOAuth2UserService<OAuth2UserRequest, OAuth2User> delegatingUserServi... | 1 | /*
* Copyright 2002-2017 the original author or 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 ap... | 1 | 10,002 | The purpose of this test is to ensure that the `OAuth2UserRequest` passed into `loadUser` is **not** null else throw `IllegalArgumentException`. Changing the `List` of `OAuth2UserService` mocks to `DefaultOAuth2UserService` doesn't really apply to what is being tested here. Please revert this. Thank you. | spring-projects-spring-security | java |
@@ -124,7 +124,7 @@ func NewProtocol(
getkickoutList GetKickoutList,
getUnproductiveDelegate GetUnproductiveDelegate,
electionCommittee committee.Committee,
- stakingV2 *staking.Protocol,
+ stakingProto *staking.Protocol,
getBlockTimeFunc GetBlockTime,
productivity Productivity,
getBlockHash evm.GetBlockHas... | 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 | 21,455 | nit: rename to nativeStk? proto might lead to think protobuf | iotexproject-iotex-core | go |
@@ -28,6 +28,9 @@ import org.apache.solr.common.util.StrUtils;
public interface ShardParams {
/** the shards to use (distributed configuration) */
String SHARDS = "shards";
+
+ /** UUID of the query */
+ String QUERY_ID = "queryID";
/** per-shard start and rows */
String SHARDS_ROWS = "shards.rows"; | 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 | 40,483 | Why not `queryUUID` (and reference the same constant as in other places)? | apache-lucene-solr | java |
@@ -36,9 +36,9 @@ import (
)
const (
- invalidTrustDomainAttestedNode = "An attested node with trust domain '%v' has been detected, " +
+ invalidTrustDomainAttestedNode = "an attested node with trust domain '%v' has been detected, " +
"which does not match the configured trust domain of '%v'. Agents may need to ... | 1 | package server
import (
"context"
"errors"
"fmt"
"net/http"
_ "net/http/pprof" //nolint: gosec // import registers routes on DefaultServeMux
"net/url"
"os"
"runtime"
"sync"
"github.com/andres-erbsen/clock"
bundlev1 "github.com/spiffe/spire-api-sdk/proto/spire/api/server/bundle/v1"
server_util "github.com/... | 1 | 16,511 | This is also used to log, of which our convention is leading uppercase... | spiffe-spire | go |
@@ -131,7 +131,7 @@ class ReusedSQLTestCase(unittest.TestCase, SQLTestUtils):
# Please see databricks/koalas/conftest.py.
pass
- def assertPandasEqual(self, left, right):
+ def assertPandasEqual(self, left, right, less_precise=False):
if isinstance(left, pd.DataFrame) and isinstance(r... | 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 | 16,065 | What about we just name it `check_exact`? | databricks-koalas | py |
@@ -205,9 +205,10 @@ public abstract class SpanStoreTest {
}
@Test
- public void getAllServiceNames() {
+ public void getAllServiceNames_mergesAnnotation_andBinaryAnnotation() {
+ // creates a span with mutual exclusive endpoints in binary annotations and annotations
BinaryAnnotation yak = BinaryAnnot... | 1 | /**
* Copyright 2015-2016 The OpenZipkin 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 ... | 1 | 11,785 | before, a binary annotation had the same service name as a regular annotation, masking the bug where we weren't querying the latter | openzipkin-zipkin | java |
@@ -1,4 +1,6 @@
class Exercise < ActiveRecord::Base
+ AVERAGE_COMPLETION_TIME_IN_MINUTES = 7
+
has_many :statuses, as: :completeable, dependent: :destroy
has_one :trail, through: :step, as: :completeables
has_one :step, dependent: :destroy, as: :completeable | 1 | class Exercise < ActiveRecord::Base
has_many :statuses, as: :completeable, dependent: :destroy
has_one :trail, through: :step, as: :completeables
has_one :step, dependent: :destroy, as: :completeable
validates :name, presence: true
validates :url, presence: true
def trail_name
trail.try(:name)
end
... | 1 | 18,416 | Where does the `7` come from? | thoughtbot-upcase | rb |
@@ -48,7 +48,7 @@ export default function CountrySelect() {
timezone: countriesByCode[ newCountryCode ].defaultTimeZoneId,
} );
}
- }, [ setValues ] );
+ }, [ setValues, value ] );
return (
<Select | 1 | /**
* CountrySelect component.
*
* 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 | 37,758 | I don't know how we haven't got bugs from some of these! As here this would have had a stale `value` | google-site-kit-wp | js |
@@ -199,6 +199,9 @@ public class SparkCatalog extends BaseCatalog {
setSnapshotId = set;
} else if ("cherry-pick-snapshot-id".equalsIgnoreCase(set.property())) {
pickSnapshotId = set;
+ } else if ("sort-order".equalsIgnoreCase(set.property())) {
+ throw new UnsupportedOper... | 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 | 35,959 | One nit here I forgot about this before but we usually structure error messages as "Cannot X because Y. Then the recommendation goes here" I would also recommend not using "it" in the message since it the pronoun is a bit ambiguous. "to specify write sort-order" may be clearer | apache-iceberg | java |
@@ -26,7 +26,8 @@ import {
} from '../../../../../tests/js/utils';
import * as CacheModule from '../../../googlesitekit/api/cache';
import { STORE_NAME } from './constants';
-import initialState, {
+import {
+ initialState,
FEATURE_TOUR_COOLDOWN_SECONDS,
FEATURE_TOUR_LAST_DISMISSED_AT,
} from './feature-tours'; | 1 | /**
* `core/user` data store: feature tours tests.
*
* 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/li... | 1 | 40,127 | I'm surprised this worked at all! It was importing the default export but `eslint-plugin-import` warned me `warning Using exported name 'initialState' as identifier for default export import/no-named-as-default` | google-site-kit-wp | js |
@@ -1,10 +1,9 @@
class VideoTutorial < Product
- has_many :teachers, dependent: :destroy
- has_many :users, through: :teachers
+ validates :description, :tagline, presence: true
- # Validations
- validates :description, presence: true
- validates :tagline, presence: true
+ def teachers
+ Teacher.joins(:vid... | 1 | class VideoTutorial < Product
has_many :teachers, dependent: :destroy
has_many :users, through: :teachers
# Validations
validates :description, presence: true
validates :tagline, presence: true
def collection?
published_videos.count > 1
end
def included_in_plan?(plan)
plan.has_feature?(:video... | 1 | 13,563 | This was used in `app/views/video_tutorials/_video_tutorial_details.html.erb` how are we handling that now? | thoughtbot-upcase | rb |
@@ -8,8 +8,9 @@ var (
newlineTabRE = regexp.MustCompile(`\n\t`)
certificateTimeErrorRE = regexp.MustCompile(`: current time \S+ is after \S+`)
// aws
- awsRequestIDRE = regexp.MustCompile(`(, )*(?i)(request id: )(?:[-[:xdigit:]]+)`)
- awsNotAuthorized = regexp.MustCompile(`(User: arn:aws:sts::)\S+(:as... | 1 | package utils
import (
"regexp"
)
var (
newlineTabRE = regexp.MustCompile(`\n\t`)
certificateTimeErrorRE = regexp.MustCompile(`: current time \S+ is after \S+`)
// aws
awsRequestIDRE = regexp.MustCompile(`(, )*(?i)(request id: )(?:[-[:xdigit:]]+)`)
awsNotAuthorized = regexp.MustCompile(`(User: arn:a... | 1 | 19,390 | Is `\S+` really the right thing? Anybody know what kind of encoding this is? Perhaps if we know it doesn't have commas, we can just use `[^,]+`. Also, parens around the comma are unnecessary, since we're not using the capture group. | openshift-hive | go |
@@ -1,10 +1,8 @@
tests = [
+ ("python", "UnitTestDocTests.py", {}),
("python", "UnitTestcBitVect.py", {}),
("python", "UnitTestBitEnsemble.py", {}),
("python", "UnitTestTopNContainer.py", {}),
- ("python", "BitUtils.py", {}),
- ("python", "VectCollection.py", {}),
- ("python", "LazySignature.py", {}),
]
... | 1 | tests = [
("python", "UnitTestcBitVect.py", {}),
("python", "UnitTestBitEnsemble.py", {}),
("python", "UnitTestTopNContainer.py", {}),
("python", "BitUtils.py", {}),
("python", "VectCollection.py", {}),
("python", "LazySignature.py", {}),
]
longTests = []
if __name__ == '__main__':
import sys
from rdki... | 1 | 16,217 | This block of changes looks like you removed tests without replacing them anywhere. Did I miss something? | rdkit-rdkit | cpp |
@@ -360,7 +360,10 @@ struct atom_wrapper {
.def("GetPropNames", &Atom::getPropList, (python::arg("self")),
"Returns a list of the properties set on the Atom.\n\n")
- .def("GetPropsAsDict", GetPropsAsDict<Atom>, (python::arg("self")),
+ .def("GetPropsAsDict", GetPropsAsDict<Atom>, ... | 1 | // $Id$
//
// Copyright (C) 2003-2013 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#define NO_... | 1 | 15,048 | n.b. private and computed values are now exposed to the API. They were hidden/not exposed before. | rdkit-rdkit | cpp |
@@ -285,6 +285,13 @@ class WebElementWrapper(collections.abc.MutableMapping):
tag = self._elem.tagName().lower()
return self.get('role', None) in roles or tag in ('input', 'textarea')
+ def remove_target(self):
+ """Remove target from link"""
+ if self._elem.tagName().lower() == 'a'... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2016 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 | 14,439 | Nitpick: Please add a period after `link` :wink: | qutebrowser-qutebrowser | py |
@@ -67,5 +67,8 @@ func (hs *HandlerStub) Start() {
klog.Errorf("New upstream controller failed with error: %v", err)
return
}
- upstream.Start()
+ if err := upstream.Start(); err != nil {
+ klog.Errorf("Failed to start upstream with error: %v", err)
+ return
+ }
} | 1 | /*
Copyright 2019 The KubeEdge 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 | 16,749 | we got no chance that `err` is not nil here, need to revisit how `NewUpstreamController` is defined. | kubeedge-kubeedge | go |
@@ -247,7 +247,8 @@ public class HttpCommandExecutor implements CommandExecutor, NeedsLocalLogs {
.put(GET_LOG, post("/session/:sessionId/log"))
.put(GET_AVAILABLE_LOG_TYPES, get("/session/:sessionId/log/types"))
- .put(STATUS, get("/status"));
+ .put(STATUS, get("/status"))
+ .... | 1 | /*
Copyright 2007-2011 Selenium committers
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 | 10,649 | Instead of building in routing for a browser-specific command, could you refactor the HttpCommandExecutor to allow arbitrary commands to be registered? | SeleniumHQ-selenium | java |
@@ -348,6 +348,12 @@ module RSpec::Core
end
describe "#its" do
+
+ it "should issue deprecation warning" do
+ expect_deprecation_with_call_site(__FILE__, __LINE__+1, '"its" method')
+ RSpec::Core::ExampleGroup.its(nil) {}
+ end
+
subject do
Class.new do
def... | 1 | require 'spec_helper'
module RSpec::Core
describe MemoizedHelpers do
before(:each) { RSpec.configuration.configure_expectation_framework }
def subject_value_for(describe_arg, &block)
group = ExampleGroup.describe(describe_arg, &block)
subject_value = nil
group.example { subject_value = sub... | 1 | 10,694 | It'd be nice to assert the right deprecation is being raised, just add a third argument of `/"its" method/` | rspec-rspec-core | rb |
@@ -87,6 +87,8 @@ public class TableProperties {
public static final String OBJECT_STORE_ENABLED = "write.object-storage.enabled";
public static final boolean OBJECT_STORE_ENABLED_DEFAULT = false;
+ public static final String LOCATION_PROVIDER_IMPL = "write.location-provider.impl";
+
public static final Str... | 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 | 25,793 | Do we want to add this to the docs? | apache-iceberg | java |
@@ -46,7 +46,7 @@ func AssertGRPCStatus(tb testing.TB, err error, code codes.Code, message string)
st := status.Convert(err)
ok := true
- if !assert.Equal(tb, code, st.Code(), "GRPC status code does not match") {
+ if !assert.Equal(tb, code.String(), st.Code().String(), "GRPC status code does not match") {
ok ... | 1 | package spiretest
import (
"reflect"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/testing/protocmp"
)
var (
protoMessageType = reflect.TypeOf((*proto... | 1 | 16,075 | This isn't really related but makes debugging test failures much easier since you see the string representation of the code instead of the integer value. | spiffe-spire | go |
@@ -130,6 +130,18 @@ bool ValueObjectVariable::UpdateValue() {
m_error.Clear();
Variable *variable = m_variable_sp.get();
+ // Check if the type has size 0. If so, there is nothing to update.
+ CompilerType var_type(GetCompilerTypeImpl());
+ if (var_type.IsValid()) {
+ ExecutionContext exe_ctx(GetExecutio... | 1 | //===-- ValueObjectVariable.cpp ---------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | 1 | 19,300 | Because of this new early exit. | apple-swift-lldb | cpp |
@@ -57,8 +57,10 @@ module Selenium
#
# @return [Driver]
#
- # @see Selenium::WebDriver::Remote::Bridge
+ # @see Selenium::WebDriver::Remote::OSSBridge
+ # @see Selenium::WebDriver::Remote::W3CBridge
# @see Selenium::WebDriver::Firefox::Bridge
+ # @see Selenium::WebDriver::Firefox::W3CBri... | 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,227 | Maybe call it `WireBridge`? | SeleniumHQ-selenium | rb |
@@ -150,12 +150,16 @@ public abstract class PrivacyApiGroupJsonRpcMethods extends ApiGroupJsonRpcMetho
private JsonRpcMethod createPrivacyMethod(
final PrivacyParameters privacyParameters, final JsonRpcMethod rpcMethod) {
- if (rpcMethod.getName().equals(RpcMethod.ETH_SEND_RAW_PRIVATE_TRANSACTION.getMeth... | 1 | /*
* Copyright ConsenSys AG.
*
* 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,434 | can this be removed now? | hyperledger-besu | java |
@@ -213,8 +213,11 @@ static pmix_status_t initialize_server_base(pmix_server_module_t *module)
}
/* for now, just setup the v1.1 series rendezvous point
- * we use the pid to reduce collisions */
- if (0 > asprintf(&pmix_pid, "%s/pmix-%d", tdir, mypid)) {
+ * - use userid to avoid situation where... | 1 | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2016 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014-2015 Artem Y. Polyakov <art... | 1 | 6,519 | This is going to create a problem - we are already encountering issues with the length of the usock pathname on recent Linux kernels as the temp directory base has moved down to the var directory under a name created by a hash. So adding another field to it is going to add to the problem. | openpmix-openpmix | c |
@@ -31,3 +31,13 @@ type ApplicationGetter interface {
type ApplicationCreator interface {
CreateApplication(app *Application) error
}
+
+const (
+ // AppCfnTemplateNameFormat is the base output file name when `app package`
+ // is called. This is also used to render the pipeline CFN template.
+ AppCfnTemplateNameFo... | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package archer
// Application represents a deployable service or task.
type Application struct {
Project string `json:"project"` // Name of the project this application belongs to.
Name string `json:... | 1 | 10,984 | What do you think about moving this to the `cloudformation` pkg? | aws-copilot-cli | go |
@@ -63,6 +63,11 @@ abstract class BaseProvider implements MediaProviderInterface
*/
protected $name;
+ /**
+ * @var array
+ */
+ protected $clones = [];
+
/**
* @param string $name
* @param Filesystem $filesystem | 1 | <?php
declare(strict_types=1);
/*
* 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\Provider;... | 1 | 10,631 | Please make this private by default | sonata-project-SonataMediaBundle | php |
@@ -16,6 +16,12 @@
*/
package org.camunda.bpm.engine.impl.util.xml;
+import org.camunda.bpm.engine.impl.ProcessEngineLogger;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.context.Context;
+import org.camunda.bpm.engine.impl.util.EngineUtilLogger;
+
+imp... | 1 | /*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. Camunda licenses this file to you under the Apache License,
* Version 2.0; y... | 1 | 12,656 | We can add `@Override` annotations to all of the implementations of this method. I think this is a best practice for us, but it would be nicer in any case. | camunda-camunda-bpm-platform | java |
@@ -7,5 +7,11 @@ type Resolver interface {
// Detector allows detecting location by current ip
type Detector interface {
- DetectCountry() (string, error)
+ DetectLocation() (Location, error)
+}
+
+// Cache allows caching location
+type Cache interface {
+ Get() (Location, error)
+ RefreshAndGet() (Location, error)... | 1 | package location
// Resolver allows resolving location by ip
type Resolver interface {
ResolveCountry(ip string) (string, error)
}
// Detector allows detecting location by current ip
type Detector interface {
DetectCountry() (string, error)
}
| 1 | 10,990 | Most of uses of `RefreshAndGet` seems to be made only for `Refresh` part, result is ignored. We can simplify this method to assigning single responsibility to it - just `Refresh()`. | mysteriumnetwork-node | go |
@@ -137,7 +137,10 @@ class OptionsManagerMixIn:
def add_optik_option(self, provider, optikcontainer, opt, optdict):
args, optdict = self.optik_option(provider, opt, optdict)
- option = optikcontainer.add_option(*args, **optdict)
+ try:
+ option = optikcontainer.add_option(*args,... | 1 | # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
import collections
import configparser
import contextlib
import copy
import functools
import optparse # pylint: disable=deprecated-module
import os
import sys
from pathlib... | 1 | 18,190 | @Pierre-Sassoulas Are we sure this doesn't create problems? Without it for some reason we get an error on `accept-no-param-docs` being a duplicate error. I couldn't figure out why it did this. This solves the issue and passes the tests, but I wonder if this creates other issues.. | PyCQA-pylint | py |
@@ -169,7 +169,17 @@ func (c *linuxContainer) OCIState() (*specs.State, error) {
}
func (c *linuxContainer) Processes() ([]int, error) {
- pids, err := c.cgroupManager.GetAllPids()
+ var pids []int
+ status, err := c.currentStatus()
+ if err != nil {
+ return pids, err
+ }
+ // for systemd cgroup, the unit's cgrou... | 1 | // +build linux
package libcontainer
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"os/exec"
"path/filepath"
"reflect"
"strings"
"sync"
"time"
securejoin "github.com/cyphar/filepath-securejoin"
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontai... | 1 | 19,361 | Does it make sense to check for "Created" here as well? Or should it return an error in such case? | opencontainers-runc | go |
@@ -93,7 +93,7 @@ public abstract class BaseMetastoreCatalog implements Catalog {
String baseLocation = location != null ? location : defaultWarehouseLocation(identifier);
Map<String, String> tableProperties = properties != null ? properties : Maps.newHashMap();
TableMetadata metadata = TableMetadata.new... | 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 | 19,559 | Did you mean to use `identifier.toString` here as well? | apache-iceberg | java |
@@ -1,6 +1,6 @@
-require 'spec_helper'
+require "rails_helper"
-describe Api::V1::UsersController, '#show' do
+describe Api::V1::UsersController, "#show", type: :controller do
it 'returns a 401 when users are not authenticated' do
get :show
expect(response.code).to eq "401" | 1 | require 'spec_helper'
describe Api::V1::UsersController, '#show' do
it 'returns a 401 when users are not authenticated' do
get :show
expect(response.code).to eq "401"
end
end
| 1 | 10,657 | interesting! didn't realize this was needed in RSpec 3 | thoughtbot-upcase | rb |
@@ -27,7 +27,7 @@ from databricks.koalas.base import _wrap_accessor_pandas, _wrap_accessor_spark
class DatetimeMethods(object):
"""Date/Time methods for Koalas Series"""
- def __init__(self, series: ks.Series):
+ def __init__(self, series: 'ks.Series'):
if not isinstance(series.spark_type, (DateT... | 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,779 | This is to avoid circular reference | databricks-koalas | py |
@@ -93,6 +93,9 @@ class MPLRenderer(Renderer):
'nbagg': (NbAggJupyterComm, None),
'mpld3': (JupyterComm, mpld3_msg_handler)}
+ # Whether in a notebook context
+ _notebook = False
+
def __call__(self, obj, fmt='auto'):
"""
Render the supplied HoloViews compo... | 1 | import sys
from io import BytesIO
from tempfile import NamedTemporaryFile
from contextlib import contextmanager
from itertools import chain
import matplotlib as mpl
from matplotlib import pyplot as plt
from matplotlib.transforms import Bbox, TransformedBbox, Affine2D
import param
from param.parameterized import bot... | 1 | 17,409 | As the bokeh renderer also has a ``load_nb`` classmethod (and notebooks are explicitly mentioned in that method name), I would consider making ``_notebook`` into a constant ``notebook_context`` class parameter. The docstring can say it is set to True if the ``load_nb`` classmethod has been called. | holoviz-holoviews | py |
@@ -2,7 +2,6 @@
const CommandOperation = require('./command');
const handleCallback = require('../utils').handleCallback;
-const MongoError = require('../core').MongoError;
class DropCollectionOperation extends CommandOperation {
constructor(db, command, options) { | 1 | 'use strict';
const CommandOperation = require('./command');
const handleCallback = require('../utils').handleCallback;
const MongoError = require('../core').MongoError;
class DropCollectionOperation extends CommandOperation {
constructor(db, command, options) {
super(db, command, options);
}
execute(callb... | 1 | 15,518 | Where is the actual command generated here? Shouldn't this be taking in `constructor(db, collectionName, options)` and then constructing the command off of that? | mongodb-node-mongodb-native | js |
@@ -55,7 +55,8 @@
int
memquery_library_bounds_by_iterator(const char *name, app_pc *start /*IN/OUT*/,
app_pc *end /*OUT*/, char *fullpath /*OPTIONAL OUT*/,
- size_t path_size)
+ size_t path_size, char *filename,... | 1 | /* *******************************************************************************
* Copyright (c) 2010-2017 Google, Inc. All rights reserved.
* Copyright (c) 2011 Massachusetts Institute of Technology All rights reserved.
* Copyright (c) 2000-2010 VMware, Inc. All rights reserved.
* ****************************... | 1 | 14,385 | Mirror the `OPTIONAL OUT` of fullpath | DynamoRIO-dynamorio | c |
@@ -94,13 +94,16 @@ const ConsensusV17 = ConsensusVersion(
"https://github.com/algorandfoundation/specs/tree/5615adc36bad610c7f165fa2967f4ecfa75125f0",
)
+// ConsensusVNext stand-in for protocol with LogicSig and TEAL v1
+const ConsensusVNext = ConsensusVersion("NEXT!")
+
// !!! ********************* !!!
// !!! ... | 1 | // Copyright (C) 2019 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) any l... | 1 | 36,100 | Please merge with master and replace with with "future" version. | algorand-go-algorand | go |
@@ -55,7 +55,6 @@ export function diff(dom, parentDom, newVNode, oldVNode, context, isSvg, excessD
let cxType = newType.contextType;
let provider = cxType && context[cxType._id];
let cctx = cxType != null ? (provider ? provider.props.value : cxType._defaultValue) : context;
-
// Get component and set it... | 1 | import { EMPTY_OBJ, EMPTY_ARR } from '../constants';
import { Component, enqueueRender } from '../component';
import { coerceToVNode, Fragment } from '../create-element';
import { diffChildren } from './children';
import { diffProps } from './props';
import { assign, removeNode } from '../util';
import options from '..... | 1 | 12,900 | Nit: Change is not needed for this PR :slightly_smiling_face: | preactjs-preact | js |
@@ -11,6 +11,15 @@ module CloudFoundry
end
end
+ def self.app_url
+ if self.is_environment?
+ # (arbitrarily) use the shortest assigned route, if there are multiple
+ self.vcap_data['application_uris'].min_by(&:length)
+ else
+ nil
+ end
+ end
+
# returns `true` if this app is run... | 1 | module CloudFoundry
def self.raw_vcap_data
ENV['VCAP_APPLICATION']
end
def self.vcap_data
if self.is_environment?
JSON.parse(self.raw_vcap_data)
else
nil
end
end
# returns `true` if this app is running in Cloud Foundry
def self.is_environment?
!!self.raw_vcap_data
end
... | 1 | 14,492 | if we are returning `nil` from an `else` I think we can just remove the `else` (and this method will still return `nil`) | 18F-C2 | rb |
@@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace System.Threading.Tests
{
[BenchmarkCategory(Categories.CoreFX)]
- public class TimerPerfTest
+ public class Perf_Timer
{
private readonly Timer[] _timers = new Timer[1_000_000];
private readonly Task[] _tasks = new Task[Environm... | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using BenchmarkDotNet.Attributes;
using MicroBenchmarks;
using System.Threading.Tasks;
namespace System.Threading.T... | 1 | 7,727 | side note: this change is ok as of today because we have not exported the results for this new type to BenchView yet. After we to that the namespace, type name and method name should not be changed (they create a benchmark ID which is used in BenchView). | dotnet-performance | .cs |
@@ -294,7 +294,15 @@ namespace pwiz.Skyline.Model.Lib.Midas
_spectra = null;
if (FilePath == null)
return false;
- var info = new FileInfo(FilePath);
+ FileInfo info;
+ try
+ {
+ info = new FileInfo(FilePath);
+ ... | 1 | /*
* Original author: Kaipo Tamura <kaipot .at. u.washington.edu>,
* 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 complia... | 1 | 12,885 | How exactly are you expecting the user to see issues with their Midas library? It seems like all error information is being swallowed and not clearly reported to the user. Even if the eventual result is to report that loading the file failed, it seems like the exception, in this case, might have more information about ... | ProteoWizard-pwiz | .cs |
@@ -105,6 +105,10 @@ func (wsc *WebSocketClient) UnInit() {
//Send sends the message as JSON object through the connection
func (wsc *WebSocketClient) Send(message model.Message) error {
+ err := wsc.connection.SetWriteDeadline(time.Now().Add(wsc.config.WriteDeadline))
+ if err != nil {
+ return err
+ }
return w... | 1 | package wsclient
import (
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"io/ioutil"
"net/http"
"time"
"k8s.io/klog/v2"
"github.com/kubeedge/beehive/pkg/core/model"
"github.com/kubeedge/kubeedge/edge/pkg/edgehub/config"
"github.com/kubeedge/viaduct/pkg/api"
wsclient "github.com/kubeedge/viaduct/pkg/client"
"... | 1 | 20,105 | Looks good, but seems `ReadMessage` hadn't used this Deadline in Underlying `WSConnection`? | kubeedge-kubeedge | go |
@@ -89,6 +89,8 @@ public class Constants {
// The flow exec id for a flow trigger instance unable to trigger a flow yet
public static final int FAILED_EXEC_ID = -2;
+ // Name of the file which keeps project directory size
+ public static final String PROJECT_DIR_SIZE_FILE_NAME = "_azkaban_project_dir_size_in_... | 1 | /*
* Copyright 2018 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 | 16,513 | Make it "___*" three underscores to make it even less likely to have a collision? I assume it will be hard to change the file name once this change is deployed... | azkaban-azkaban | java |
@@ -432,7 +432,7 @@ public class RecoveryStrategy implements Runnable, Closeable {
/**
* @return true if we have reached max attempts or should stop recovering for some other reason
*/
- private boolean waitBetweenRecoveries(String coreName) {
+ final private boolean waitBetweenRecoveries(String coreName) ... | 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,959 | We don't need this anymore after #2151 | apache-lucene-solr | java |
@@ -48,7 +48,7 @@ namespace NLog.LayoutRenderers
[AppDomainFixedOutput]
[ThreadAgnostic]
[ThreadSafe]
- public class MachineNameLayoutRenderer : LayoutRenderer, IStringValueRenderer
+ public class MachineNameLayoutRenderer : LayoutRenderer
{
internal string MachineName { get; private ... | 1 | //
// Copyright (c) 2004-2018 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 | 17,960 | this is this removed? I don't understand in the context of this PR | NLog-NLog | .cs |
@@ -107,6 +107,9 @@ def getmacbyip6(ip6, chainCC=0):
(chainCC parameter value ends up being passed to sending function
used to perform the resolution, if needed)
"""
+
+ if isinstance(ip6,Net6):
+ ip6 = iter(ip6).next()
if in6_ismaddr(ip6): # Multicast
mac = in6_getnsmac(in... | 1 | #! /usr/bin/env python
#############################################################################
## ##
## inet6.py --- IPv6 support for Scapy ##
## see http://natisbad.org/IPv6/ ... | 1 | 10,289 | `isinstance(ip6, Net6)` instead | secdev-scapy | py |
@@ -359,10 +359,12 @@ ResultCode NebulaStore::get(GraphSpaceID spaceId,
}
-ResultCode NebulaStore::multiGet(GraphSpaceID spaceId,
- PartitionID partId,
- const std::vector<std::string>& keys,
- std::vector<std::string>*... | 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 "kvstore/NebulaStore.h"
#include <folly/Likely.h>
#include <algorithm>
#include <cstdint... | 1 | 28,238 | Do we really need the param here? If only partial results returned, we could return ResultCode::PARTIAL_RESULTS; | vesoft-inc-nebula | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.