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 |
|---|---|---|---|---|---|---|---|
@@ -263,6 +263,7 @@ public abstract class ElasticsearchStorage extends zipkin2.storage.StorageCompon
public abstract int namesLookback();
@Override
+ @Memoized // Memoized to reduce garbage as this is effectively a singleton.
public SpanStore spanStore() {
ensureIndexTemplates();
return new Elasti... | 1 | /*
* Copyright 2015-2019 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 a... | 1 | 15,327 | why. is this called per request? if so this also adds a lock internally. can we not add this at the moment until analyzed as this assumption isnt carried to the several other impls. the only other consumer of this is the http api and that isnt hit often enough for specializations. | openzipkin-zipkin | java |
@@ -106,7 +106,7 @@ function nativeSelectValue(node) {
}
const options = querySelectorAll(vNode, 'option');
- const selectedOptions = options.filter(option => option.hasAttr('selected'));
+ const selectedOptions = options.filter(option => option.actualNode.selected);
// browser automatically selects the ... | 1 | import getRole from '../aria/get-role';
import unsupported from './unsupported';
import visibleVirtual from './visible-virtual';
import accessibleTextVirtual from './accessible-text-virtual';
import isNativeTextbox from '../forms/is-native-textbox';
import isNativeSelect from '../forms/is-native-select';
import isAriaT... | 1 | 17,031 | I believe this means dependent checks can no longer operate on virtual nodes, which is something we've been pushing for lately. We may need to find a different way to solve this issue, as I don't think we want to cause a regression while fixing a bug. | dequelabs-axe-core | js |
@@ -8,13 +8,15 @@ from kinto.core.storage import (
DEFAULT_ID_FIELD, DEFAULT_MODIFIED_FIELD, DEFAULT_DELETED_FIELD,
MISSING)
from kinto.core.storage.postgresql.client import create_from_config
+from kinto.core.storage.postgresql.migrator import Migrator
from kinto.core.utils import COMPARISON
logger = ... | 1 | import logging
import os
import warnings
from collections import defaultdict
from kinto.core.storage import (
StorageBase, exceptions,
DEFAULT_ID_FIELD, DEFAULT_MODIFIED_FIELD, DEFAULT_DELETED_FIELD,
MISSING)
from kinto.core.storage.postgresql.client import create_from_config
from kinto.core.utils import C... | 1 | 11,366 | ditto about use of `abspath` | Kinto-kinto | py |
@@ -30,13 +30,13 @@ public class Euler05Test {
}
private static long smallestPositiveNumberEvenlyDivisibleByAllNumbersFrom1To(int max) {
- final long smallestStepsNeeded = max * (max - 1);
- return Stream.gen(smallestStepsNeeded, prev -> prev + smallestStepsNeeded)
- .findFirst(... | 1 | /* / \____ _ ______ _____ / \____ ____ _____
* / \__ \/ \ / \__ \ / __// \__ \ / \/ __ \ Javaslang
* _/ // _\ \ \/ / _\ \\_ \/ // _\ \ /\ \__/ / Copyright 2014-2015 Daniel Dietrich
* /___/ \_____/\____/\_____/____/\___\_____/_/ \_/____/ Licensed under the Apache License... | 1 | 6,210 | this reduces the runtime by 50 times | vavr-io-vavr | java |
@@ -0,0 +1,5 @@
+package org.openqa.selenium.grid.distributor.remote;
+
+public class RemoteDistributorTest {
+
+} | 1 | 1 | 16,857 | Probably best not to have an empty test.... | SeleniumHQ-selenium | py | |
@@ -956,10 +956,10 @@ public class TryTest extends AbstractValueTest {
private static <T, X extends Throwable> Try<T> failure(Class<X> exceptionType) {
try {
- final X exception = exceptionType.newInstance();
+ final X exception = exceptionType.getConstructor().newInstance();
... | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _______
* / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io
* /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ... | 1 | 10,153 | direct `newInstance` call is also deprecated now | vavr-io-vavr | java |
@@ -15,14 +15,15 @@ import (
"syscall"
"time"
+ "github.com/vishvananda/netlink"
+ weaveapi "github.com/weaveworks/weave/api"
+ "github.com/weaveworks/weave/common"
+ "golang.org/x/sys/unix"
api "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
"k8s.io/clien... | 1 | /*
Package main deals with weave-net peers on the cluster.
This involves peer management, such as getting the latest peers or removing defunct peers from the cluster
*/
package main
import (
"flag"
"fmt"
"math/rand"
"net"
"os"
"os/signal"
"syscall"
"time"
api "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/... | 1 | 15,743 | We have a bit of a convention where imports are split into three blocks: first Go standard library, then imports from outside the repo, then imports from inside the repo. | weaveworks-weave | go |
@@ -184,7 +184,7 @@ abstract class SnapshotProducer<ThisT> implements SnapshotUpdate<ThisT> {
/**
* Returns the snapshot summary from the implementation and updates totals.
*/
- private Map<String, String> summary(TableMetadata previous) {
+ protected Map<String, String> summary(TableMetadata previous) {
... | 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 | 17,121 | Why was this change needed? | apache-iceberg | java |
@@ -53,12 +53,14 @@ def get_if_raw_addr(ifname):
try:
fd = os.popen("%s %s" % (conf.prog.ifconfig, ifname))
except OSError, msg:
- raise Scapy_Exception("Failed to execute ifconfig: (%s)" % msg)
+ warning("Failed to execute ifconfig: (%s)" % msg)
+ return "\0\0\0\0"
# Get ... | 1 | # Guillaume Valadon <guillaume@valadon.net>
"""
Scapy *BSD native support - core
"""
from scapy.config import conf
from scapy.error import Scapy_Exception
from scapy.data import ARPHDR_LOOPBACK, ARPHDR_ETHER
from scapy.arch.common import get_if
from scapy.consts import LOOPBACK_NAME
from scapy.utils import warning
f... | 1 | 9,068 | can you use this opportunity to remove `.readlines()` useless list creation? (`addresses = [l for l in fd if l.find("netmask") >= 0]`) | secdev-scapy | py |
@@ -51,8 +51,8 @@ test_name "C100554: \
message = "The plan was expected to notify but did not"
assert_match(/Notice:/, result.stdout, message)
winrm_nodes.each do |node|
- message = "The plan was expceted to mention the host #{node.hostname} with _output"
- assert_match(/#{node.hostname}"=>{"_... | 1 | require 'bolt_command_helper'
extend Acceptance::BoltCommandHelper
test_name "C100554: \
bolt plan run executes puppet plan on remote hosts via winrm" do
winrm_nodes = select_hosts(roles: ['winrm'])
skip_test('no applicable nodes to test on') if winrm_nodes.empty?
dir = bolt.tmpdir('C100554')
tes... | 1 | 7,596 | Why does this check differ from `plan_ssh.rb`? | puppetlabs-bolt | rb |
@@ -10,8 +10,8 @@ import (
"encoding/json"
"strconv"
+ "github.com/iotexproject/go-fsm"
"github.com/prometheus/client_golang/prometheus"
- "github.com/zjshen14/go-fsm"
"go.uber.org/zap"
"github.com/iotexproject/iotex-core/consensus" | 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 | 14,398 | File is not `goimports`-ed (from `goimports`) | iotexproject-iotex-core | go |
@@ -16,7 +16,6 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
{
public const int MaxPooledWriteReqs = 1024;
- private const int _maxPendingWrites = 3;
private const int _maxBytesPreCompleted = 65536;
private const int _initialTaskQueues = 64;
private const int _maxPo... | 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.Diagnostics;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using M... | 1 | 7,756 | It was @lodejard who initially suggested this pattern. I think that it had something to do about prioritizing future writes even if there was a pending write operation ready to handle the newly requested write. I'm not sure I fully understood the explanation for having up to 3 pending write requests, because only havin... | aspnet-KestrelHttpServer | .cs |
@@ -34,6 +34,8 @@ int main (int argc, char * const * argv)
("batch_size",boost::program_options::value<std::size_t> (), "Increase sideband batch size, default 512")
("debug_block_count", "Display the number of block")
("debug_bootstrap_generate", "Generate bootstrap sequence of blocks")
+ ("debug_clear_online... | 1 | #include <nano/lib/utility.hpp>
#include <nano/nano_node/daemon.hpp>
#include <nano/node/cli.hpp>
#include <nano/node/node.hpp>
#include <nano/node/rpc.hpp>
#include <nano/node/testing.hpp>
#include <sstream>
#include <argon2.h>
#include <boost/lexical_cast.hpp>
#include <boost/program_options.hpp>
int main (int arg... | 1 | 14,982 | We have cli --online_weight_clear in cli.cpp | nanocurrency-nano-node | cpp |
@@ -225,7 +225,9 @@ func HTTPServerAttributesFromHTTPRequest(serverName, route string, request *http
attrs = append(attrs, HTTPRouteKey.String(route))
}
if values, ok := request.Header["X-Forwarded-For"]; ok && len(values) > 0 {
- attrs = append(attrs, HTTPClientIPKey.String(values[0]))
+ if addresses := strin... | 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 | 16,693 | So the request.Headers is a map of []string. Are you sure that the HTTP library doesn't already do this split for us? | open-telemetry-opentelemetry-go | go |
@@ -93,6 +93,8 @@ public class WebUtils {
return "Killing";
case DISPATCHING:
return "Dispatching";
+ case EXECUTION_STOPPED:
+ return "Execution stopped, crashed executor/container";
default:
}
return "Unknown"; | 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 | 22,162 | How is this message used? Can we remove the "crashed executor/container" part which is an implementation detail? | azkaban-azkaban | java |
@@ -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 | py |
@@ -4,7 +4,13 @@
<div class="text-box">
<% if @purchaseable.video_available?(@video) %>
- <%= render 'watch_video', video: @video, purchase: @purchase %>
+ <div class="purchase-return-link">
+ <%=link_to "Back", purchase_path(@purchase)%>
+ </div>
+
+ <h3 class="video-headline">Watc... | 1 | <% content_for :subject, @purchase.purchaseable_name %>
<div class="text-box-wrapper">
<div class="text-box">
<% if @purchaseable.video_available?(@video) %>
<%= render 'watch_video', video: @video, purchase: @purchase %>
<% else %>
<p>This video is not yet available. It will be released on <%= ... | 1 | 6,856 | Space after `=`. | thoughtbot-upcase | rb |
@@ -59,6 +59,7 @@ public class EdgeInvocation extends AbstractRestInvocation {
this.responseEx = new VertxServerResponseToHttpServletResponse(context.response());
this.httpServerFilters = httpServerFilters;
requestEx.setAttribute(RestConst.REST_REQUEST, requestEx);
+ setAfterCreateInvocationHandler(in... | 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,643 | if just need to do something after createInvocation just override and call super first is enough? | apache-servicecomb-java-chassis | java |
@@ -11,7 +11,7 @@ describe Travis::Build::Script::Scala do
end
it_behaves_like 'a build script'
- # it_behaves_like 'a jdk build'
+ it_behaves_like 'a jvm build'
it 'sets TRAVIS_SCALA_VERSION' do
should set 'TRAVIS_SCALA_VERSION', '2.10.0' | 1 | require 'spec_helper'
describe Travis::Build::Script::Scala do
let(:options) { { logs: { build: false, state: false } } }
let(:data) { PAYLOADS[:push].deep_clone }
subject { described_class.new(data, options).compile }
after :all do
store_example
end
it_behaves_like 'a build script'
# it_behave... | 1 | 10,774 | By the way, I fixed `announce` method (missing `super` call to announce JDK version) | travis-ci-travis-build | rb |
@@ -505,9 +505,10 @@ public final class TreeSet<T> implements SortedSet<T>, Serializable {
}
}
+ @SuppressWarnings("unchecked")
@Override
- public boolean contains(T element) {
- return tree.contains(element);
+ public boolean contains(Object element) {
+ return tree.contains... | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _ _____
* / / \/ \ / \/ \ / /\__\/ // \/ \ / / _ \ Javaslang
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \__/ / Copyright 2014-now Daniel Dietrich
* /___/\_/ \_/\____/\_/ \_/\__\/__/___\_/ \_// \__/_____/ Licensed under... | 1 | 7,279 | I'm not sure about that... This line can produce <code>ClassCastException</code> if <code>Comparator</code> do not check this. | vavr-io-vavr | java |
@@ -737,7 +737,7 @@ type MDOps interface {
// which may not yet be reflected in the MD if the TLF hasn't been rekeyed since it
// entered into a conflicting state.
GetLatestHandleForTLF(ctx context.Context, id TlfID) (
- *BareTlfHandle, error)
+ BareTlfHandle, error)
}
// KeyOps fetches server-side key halv... | 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 (
"reflect"
"time"
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/logger"
keybase1 "github.com/keybase/client/go/protoc... | 1 | 11,265 | There wasn't any special reason for this to return a pointer, right? | keybase-kbfs | go |
@@ -14,15 +14,15 @@ import org.mozilla.vrbrowser.R;
import org.mozilla.vrbrowser.ui.views.UIButton;
import org.mozilla.vrbrowser.ui.widgets.NotificationManager.Notification.NotificationPosition;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import java.util.concurrent.ConcurrentHash... | 1 | package org.mozilla.vrbrowser.ui.widgets;
import android.graphics.Rect;
import android.view.View;
import androidx.annotation.DimenRes;
import androidx.annotation.IntDef;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import org.mozilla.gecko.util.Threa... | 1 | 8,998 | Why the need for a `ConcurrentHashMap`? | MozillaReality-FirefoxReality | java |
@@ -272,8 +272,13 @@ class Note extends BaseItem {
let bProp = b[order.by];
if (typeof aProp === 'string') aProp = aProp.toLowerCase();
if (typeof bProp === 'string') bProp = bProp.toLowerCase();
- if (aProp < bProp) r = +1;
- if (aProp > bProp) r = -1;
+
+ if (order.by == 'title' && Setting.val... | 1 | const BaseModel = require('../BaseModel').default;
const { sprintf } = require('sprintf-js');
const BaseItem = require('./BaseItem.js');
const ItemChange = require('./ItemChange.js');
const Resource = require('./Resource.js');
const Setting = require('./Setting').default;
const shim = require('../shim').default;
const ... | 1 | 15,780 | New code should use strict equality `===` | laurent22-joplin | js |
@@ -84,6 +84,19 @@ describe "apply" do
resources = result[0]['result']['report']['resource_statuses']
expect(resources).to include('Notify[hello world]')
end
+
+ it 'applies the deferred type' do
+ result = run_cli_json(%w[plan run basic::defer] + config_flags)
+ expect(resul... | 1 | # frozen_string_literal: true
require 'spec_helper'
require 'bolt_spec/conn'
require 'bolt_spec/files'
require 'bolt_spec/integration'
require 'bolt_spec/run'
describe "apply" do
include BoltSpec::Conn
include BoltSpec::Files
include BoltSpec::Integration
include BoltSpec::Run
let(:modulepath) { File.join(... | 1 | 9,437 | `expect(resources['Notify[local pid]']['events'][0]['desired_value']).to match(/(\d+)/)` seems clearer. | puppetlabs-bolt | rb |
@@ -54,7 +54,7 @@ const (
// Time out individual tests after 10 seconds.
var individualTestTimeout = 10 * time.Second
-func kbfsOpsInit(t *testing.T, changeMd bool) (mockCtrl *gomock.Controller,
+func kbfsOpsInit(t *testing.T) (mockCtrl *gomock.Controller,
config *ConfigMock, ctx context.Context, cancel context.C... | 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 (
"bytes"
"fmt"
"math/rand"
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/keybase/client/go/libkb"
"github.com/keybase/cl... | 1 | 16,761 | Removed now-unneeded param. | keybase-kbfs | go |
@@ -107,6 +107,7 @@ VIEW DATA STRUCTURES
go-filecoin show - Get human-readable representations of filecoin objects
NETWORK COMMANDS
+ go-filecoin bitswap - Explore libp2p bitswap
go-filecoin bootstrap - Interact with bootstrap addresses
go-filecoin dht ... | 1 | package commands
import (
"context"
"fmt"
"net"
"net/url"
"os"
"path/filepath"
"syscall"
"github.com/ipfs/go-ipfs-cmdkit"
"github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-ipfs-cmds/cli"
cmdhttp "github.com/ipfs/go-ipfs-cmds/http"
"github.com/mitchellh/go-homedir"
ma "github.com/multiformats/go-multiadd... | 1 | 18,342 | (NON-blocking, this can be tracked in follow up issue) @anorth @mishmosh is the toplevel getting too crowded? Should we have a `network` grandparent command, or maybe a `stats` command? | filecoin-project-venus | go |
@@ -85,7 +85,7 @@ storiesOf( 'Analytics Module', module )
title={ __( 'Top acquisition sources over the last 28 days', 'google-site-kit' ) }
headerCtaLink="https://analytics.google.com"
headerCtaLabel={ __( 'See full stats in Analytics', 'google-site-kit' ) }
- footerCtaLabel={ __( 'Analytics', 'googl... | 1 | /**
* External dependencies
*/
import { storiesOf } from '@storybook/react';
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import Layout from 'GoogleComponents/layout/layout';
import AnalyticsDashboardWidgetOverview from 'GoogleModules/analytics/dashboard/dashboard-widget-overview';
import A... | 1 | 25,370 | The `_x` function needs to be imported at the top of the file (in addition to `__`) | google-site-kit-wp | js |
@@ -78,8 +78,9 @@ namespace pwiz.SkylineTestFunctional
RunUI(() =>
{
propDialog.SetQValueTo(0.003f);
+ propDialog.OkDialog();
});
- OkDialog(propDialog, propDialog.OkDialog);
+ WaitForClosedForm(propDialog);
WaitFo... | 1 | /*
* Original author: Rita Chupalov <ritach .at. uw.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2020 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with... | 1 | 13,747 | This is functionally equivalent to the code it replaces. | ProteoWizard-pwiz | .cs |
@@ -26,6 +26,8 @@ import (
type ENI struct {
// ID is the id of eni
ID string `json:"ec2Id"`
+ // ENIType is the type of ENI, valid value: "default", "vlan"
+ ENIType string `json:",omitempty"`
// IPV4Addresses is the ipv4 address associated with the eni
IPV4Addresses []*ENIIPV4Address
// IPV6Addresses is th... | 1 | // Copyright 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" fil... | 1 | 22,273 | can you change the field name here to "InterfaceAssociationProtocol"? same for the Config struct in agent/ecscni/types.go. i think it's better to keep the field name consistent between agent and acs payload | aws-amazon-ecs-agent | go |
@@ -1,5 +1,5 @@
/**
- * core/widgets data store: widget tests.
+ * Widgets data store: widget tests.
*
* Site Kit by Google, Copyright 2020 Google LLC
* | 1 | /**
* core/widgets data store: widget tests.
*
* Site Kit by Google, Copyright 2020 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... | 1 | 32,214 | See above, same for the other cases. | google-site-kit-wp | js |
@@ -301,6 +301,19 @@ public class MetricRegistry implements MetricSet {
});
}
+ /**
+ * Return the {@link Gauge} registered under this name; or create and register
+ * a new {@link SettableGauge} if none is registered.
+ *
+ * @param name the name of the metric
+ * @return a new o... | 1 | package com.codahale.metrics;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util... | 1 | 7,601 | Shouldn't line 313 be public \<T\> SettableGauge\<T\> **settable**Gauge(String name) { ? It would also be good to call it a few times and with differnet types (Long, Integer, String) in the test as well. | dropwizard-metrics | java |
@@ -287,7 +287,7 @@ def _has_bare_super_call(fundef_node):
return False
-def _safe_infer_call_result(node, caller, context=None):
+def _safe_infer_call_result(node, caller, context=None): # pylint: disable=inconsistent-return-statements
"""
Safely infer the return value of a function.
| 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2006-2016 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2012, 2014 Google, Inc.
# Copyright (c) 2013-2016 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2015 Dmitry Pribysh <dmand@yandex.ru>
# Copyright (c) 2016 Moises Lopez - https://www.vauxoo.com/ <mo... | 1 | 9,550 | I would prefer to just fix the occurences of this new check rather than disable them | PyCQA-pylint | py |
@@ -117,9 +117,9 @@ public class UITestUtils {
public void addHostedFeedData() throws IOException {
if (feedDataHosted) throw new IllegalStateException("addHostedFeedData was called twice on the same instance");
for (int i = 0; i < NUM_FEEDS; i++) {
- Feed feed = new Feed(0, null, "Tit... | 1 | package de.test.antennapod.ui;
import android.content.Context;
import android.util.Log;
import de.danoeh.antennapod.core.event.FeedListUpdateEvent;
import de.danoeh.antennapod.core.event.QueueEvent;
import de.danoeh.antennapod.core.feed.Feed;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.... | 1 | 18,260 | The tests should be fixed in #4841, so this is no longer needed | AntennaPod-AntennaPod | java |
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved.
+ * See LICENSE.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Ergonode\Core\Infrastructure\Exception;
+
+class SerializationException extends SerializerException
+{
+ public function __construct(... | 1 | 1 | 9,350 | I think it should been in `SharedKernel` module. | ergonode-backend | php | |
@@ -317,6 +317,9 @@ type ACMEChallengeSolverHTTP01IngressTemplate struct {
// will override the in-built values.
// +optional
ACMEChallengeSolverHTTP01IngressObjectMeta `json:"metadata"`
+
+ // OverrideNginxIngressWhitelistAnnotation add description here
+ OverrideNginxIngressWhitelistAnnotation string `json:"ove... | 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 | 29,137 | Can we add some description for this field? | jetstack-cert-manager | go |
@@ -45,6 +45,7 @@ public class ProtoConverter extends Visitor<Expr, Object> {
.put(TimestampType.class, "Time")
.put(BytesType.class, "String")
.put(StringType.class, "String")
+ .put(TimeType.class, "Duration")
.build();
private final IdentityHashMap<Expression... | 1 | /*
* Copyright 2017 PingCAP, 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 ... | 1 | 8,924 | Should its name be Time or Duration? I can see them both. | pingcap-tispark | java |
@@ -31,6 +31,14 @@ type Option interface {
applyGRPCOption(*otlpconfig.Config)
}
+func asGRPCOptions(opts []Option) []otlpconfig.GRPCOption {
+ converted := make([]otlpconfig.GRPCOption, len(opts))
+ for i, o := range opts {
+ converted[i] = otlpconfig.NewGRPCOption(o.applyGRPCOption)
+ }
+ return converted
+}
+
... | 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 | 16,778 | Is this used anywhere? | open-telemetry-opentelemetry-go | go |
@@ -205,6 +205,17 @@ func TestMerge(t *testing.T) {
}
}
+func TestEmpty(t *testing.T) {
+ var res *resource.Resource
+ require.Equal(t, "", res.SchemaURL())
+ require.Equal(t, "", res.String())
+ require.Equal(t, []attribute.KeyValue(nil), res.Attributes())
+
+ it := res.Iter()
+ require.Equal(t, 0, it.Len())
+ re... | 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 | 16,494 | I believe that you can use `assert` instead of `require` here and in the following lines | open-telemetry-opentelemetry-go | go |
@@ -177,7 +177,7 @@ func (pb *Actor) CreateChannel(vmctx exec.VMContext, target address.Address, eol
err := withPayerChannels(ctx, storage, payerAddress, func(byChannelID exec.Lookup) error {
// check to see if payment channel is duplicate
- _, err := byChannelID.Find(ctx, channelID.KeyString())
+ err := byCha... | 1 | package paymentbroker
import (
"context"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-hamt-ipld"
cbor "github.com/ipfs/go-ipld-cbor"
"github.com/filecoin-project/go-filecoin/abi"
"github.com/filecoin-project/go-filecoin/actor"
"github.com/filecoin-project/go-filecoin/address"
"github.com/filecoin-project/go-... | 1 | 21,314 | In `storagemarket.go` you used `nil` for an unwanted out parameter. Do something consistent (nil seems fine if supported). | filecoin-project-venus | go |
@@ -0,0 +1,8 @@
+package trojan
+
+var (
+ Contains = contains
+ HashBytes = hashBytes
+ PadBytes = padBytesLeft
+ IsPotential = isPotential
+) | 1 | 1 | 10,937 | is this a new pattern we use in bee? interesting | ethersphere-bee | go | |
@@ -382,7 +382,13 @@ func (f *FsS3) Mkdir() error {
if err, ok := err.(*s3.Error); ok {
if err.Code == "BucketAlreadyOwnedByYou" {
return nil
+ } else if err.Code == "BucketAlreadyExists" {
+ // Unfortunately Qstack are not reliably returning
+ // BucketAlreadyOwnedByYou, but instead BucketAlreadyExists.
... | 1 | // S3 interface
package s3
// FIXME need to prevent anything but ListDir working for s3://
import (
"errors"
"fmt"
"io"
"net/http"
"path"
"regexp"
"strconv"
"strings"
"time"
"github.com/ncw/goamz/aws"
"github.com/ncw/goamz/s3"
"github.com/ncw/rclone/fs"
"github.com/ncw/swift"
)
// Register with Fs
func... | 1 | 5,414 | If you think this PR works, i'll clean this up before resubmitting. | rclone-rclone | go |
@@ -148,6 +148,10 @@ public final class Const {
public static final String PATH_CHECKSESSION = "checksession";
public static final String URL_PREFIX = "urlPrefix";
-
+
public static final String INSTANCE_PUBKEY_PRO = "publickey";
+
+ public static final String GROUPID = "io.servicecomb";
+
+ public stati... | 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 | 8,188 | are you sure you can read version by this artifactid? | apache-servicecomb-java-chassis | java |
@@ -32,10 +32,10 @@ import org.openqa.selenium.remote.tracing.HttpTracing;
import org.openqa.selenium.remote.tracing.Tracer;
import java.net.URL;
+import java.util.Objects;
import java.util.UUID;
import java.util.logging.Logger;
-import static org.openqa.selenium.net.Urls.fromUri;
import static org.openqa.sele... | 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,752 | We can get rid of this import then. | SeleniumHQ-selenium | js |
@@ -388,10 +388,13 @@ func (c *client) parse(buf []byte) error {
arg = buf[c.as : i-c.drop]
}
var err error
- if c.typ == CLIENT {
+ switch c.typ {
+ case CLIENT:
err = c.processSub(arg)
- } else {
+ case ROUTER:
err = c.processRemoteSub(arg)
+ case GATEWAY:
+ err = c.p... | 1 | // Copyright 2012-2018 The NATS 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 ... | 1 | 8,266 | Should we do our own vtable? | nats-io-nats-server | go |
@@ -41,7 +41,6 @@ module C2
}
config.roadie.url_options = config.action_mailer.default_url_options
- config.exceptions_app = self.routes
config.autoload_paths << Rails.root.join('lib')
config.assets.precompile << 'common/communicarts.css' | 1 | require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)
module C2
class Application < Rails::Application
# Settings in config/environments/* take prec... | 1 | 12,799 | This is the actual fix. | 18F-C2 | rb |
@@ -173,7 +173,7 @@ const (
// cache idx expiration
defaultCacheIdxExpiration = 5 * time.Minute
// default sync interval
- defaultSyncInterval = 10 * time.Second
+ defaultSyncInterval = 60 * time.Second
// coalesceMinimum
coalesceMinimum = 16 * 1024
// maxFlushWait is maximum we will wait to gather messages... | 1 | // Copyright 2019-2021 The NATS 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 ... | 1 | 12,638 | If sync has really a negative impact, this is just moving the issue from 10sec to 60sec. Wonder if you should not expose the (auto)sync params so users can decide. | nats-io-nats-server | go |
@@ -341,11 +341,12 @@ type Decoder interface {
// (0, false).
MapLen() (int, bool)
- // If MapLen returned true, the DecodeMap will be called. It should iterate over
- // the fields of the value being decoded, invoking the callback on each with the
- // field name and a Decoder for the field value. If the callbac... | 1 | // Copyright 2019 The Go Cloud Development Kit 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | 1 | 18,860 | should be called => will be called | google-go-cloud | go |
@@ -133,12 +133,11 @@ func (c *roundCalculator) roundInfo(
) (roundNum uint32, roundStartTime time.Time, err error) {
lastBlockTime := time.Unix(c.chain.GenesisTimestamp(), 0)
if height > 1 {
- var lastBlock *block.Footer
- if lastBlock, err = c.chain.BlockFooterByHeight(height - 1); err != nil {
+ var lastBloc... | 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,884 | not sure whether we should do this. It may cause problem that delegates upgrade their nodes at different time, that they will have different "last block time", some use "commit time", some use "block time". Potential solution: Only use block time after berling, and then delete it in the next version after berling. Open... | iotexproject-iotex-core | go |
@@ -190,10 +190,12 @@ public class CreateCollectionCmd implements OverseerCollectionMessageHandler.Cmd
try {
replicaPositions = buildReplicaPositions(ocmh.cloudManager, clusterState, clusterState.getCollection(collectionName), message, shardNames, sessionWrapper);
} catch (Assign.AssignmentExcept... | 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,974 | So one question I have is why is the error coming back from `buildReplicaPositions` not an `Assign.AssignmentException`? Is it because it is wrapped in a `SolrException` from the remote node? | apache-lucene-solr | java |
@@ -316,13 +316,13 @@ def test_debug_logger_object():
assert dt.options.debug.enabled is True
DT = dt.rbind([])
- assert "dt.rbind([]) {" in logger.msg
+ assert "datatable.rbind([]) {" in logger.msg
assert re.search(r"} # \d+(?:\.\d+)?(?:[eE][+-]?\d+)? s", logger.msg)
... | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Copyright 2018-2021 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 i... | 1 | 13,117 | `dt` won't work for some reason? | h2oai-datatable | py |
@@ -96,7 +96,7 @@ def add_db(doctest_namespace):
doctest_namespace["db"] = db_name
-@pytest.fixture(autouse=os.getenv("KOALAS_USAGE_LOGGER", None) is not None)
+@pytest.fixture(autouse=os.getenv("KOALAS_USAGE_LOGGER", "") != "")
def add_caplog(caplog):
with caplog.at_level(logging.INFO, logger="databrick... | 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,201 | Is this because "KOALAS_USAGE_LOGGER" can be `None` ?? | databricks-koalas | py |
@@ -0,0 +1,16 @@
+using Nethermind.Int256;
+
+namespace Nethermind.JsonRpc.Modules.Eth
+{
+ public static class GasPriceConfig
+ {
+ public const int NoHeadBlockChangeErrorCode = 7; //Error code used in debug mode when the head block is not changed
+ public const int PercentileOfSortedTxs = 60; //Pe... | 1 | 1 | 25,626 | I like it but maybe the better name will be EthGasPriceConstants or EthGasPriceEstimatorConstants? but Constants not Config | NethermindEth-nethermind | .cs | |
@@ -38,7 +38,9 @@ import (
func TestNew(t *testing.T) {
ctx, _ := SetupFakeContext(t)
- c := NewController(ctx, configmap.NewStaticWatcher(
+ ctor := NewConstructor(&dataresidency.StoreSingleton{})
+
+ c := ctor(ctx, configmap.NewStaticWatcher(
&corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: ... | 1 | /*
Copyright 2020 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | 1 | 18,031 | I would inline the constructor as well | google-knative-gcp | go |
@@ -107,10 +107,10 @@ TEST(Scanner, Basic) {
}; \
GraphScanner lexer; \
lexer.setReadBuffer(input); \
- nebula::GraphParser::semantic_type dumyyylval; ... | 1 | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include <gtest/gtest.h>
#include <sstream>
#include <utility>
#include <vector>
#include "common/base/Base.h"
#include "parser/GraphParser.hpp"
#include "parser/GraphScanner.h"
using testing::Ass... | 1 | 31,980 | I'm not confident about this... | vesoft-inc-nebula | cpp |
@@ -34,6 +34,10 @@ import (
"github.com/jetstack/cert-manager/pkg/util/pki"
)
+var (
+ certificateRequestGvk = v1alpha1.SchemeGroupVersion.WithKind("CertificateRequest")
+)
+
func (c *Controller) Sync(ctx context.Context, cr *v1alpha1.CertificateRequest) (err error) {
c.metrics.IncrementSyncCallCount(Controller... | 1 | /*
Copyright 2019 The Jetstack cert-manager contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | 1 | 18,255 | There is also `v1alpha1.CertificateRequestKind` I think? | jetstack-cert-manager | go |
@@ -49,6 +49,10 @@ func SenderJob(name string, envVars []corev1.EnvVar) *batchv1.Job {
return baseJob(name, "sender", envVars)
}
+func BrokerSenderJob(name string, envVars []corev1.EnvVar) *batchv1.Job {
+ return baseJob(name, "sender_gcpbroker", envVars)
+}
+
// baseJob will return a base Job that has imageName ... | 1 | /*
Copyright 2020 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | 1 | 16,205 | Can we rename it to make it less confusing? Instead of "sender-gcpbroker", maybe name it to "retryable-sender" | google-knative-gcp | go |
@@ -136,9 +136,8 @@ public class UnboundPredicate<T> extends Predicate<T, UnboundTerm<T>> implements
Literal<T> lit = literal().to(boundTerm.type());
if (lit == null) {
- throw new ValidationException(String.format(
- "Invalid value for conversion to type %s: %s (%s)",
- boundTerm.typ... | 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 | 24,332 | So looking at the definition of the `literal()` function in this class, it seems it's possible for it to return null. I guess it's not a concern as we would get NPE on the above call at line 136 when trying to call `.to` if `literal()` returned `null` before even getting to this part that calls `literal().value()`, but... | apache-iceberg | java |
@@ -47,6 +47,19 @@ class OPFMetricsTest(unittest.TestCase):
< OPFMetricsTest.DELTA)
+ def testNRMSE(self):
+ nrmse = getModule(MetricSpec("nrmse", None, None,
+{"verbosity" : OPFMetricsTest.VERBOSITY}))
+ gt = [9, 4, 5, 6]
+ p = [0, 13, 8, 3]
+ for i in xrange(len(gt)):
+ nrmse.addInstance(gt[i],... | 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,120 | Why did you break the line? It looks like it is under 80 characters without the break and it is inside parens so no need for backslash anyway | numenta-nupic | py |
@@ -90,6 +90,19 @@ try:
except ImportError:
GRAPHVIZ_INSTALLED = False
+"""datatable"""
+try:
+ from datatable import DataTable
+ DT_INSTALLED = True
+except ImportError:
+ DT_INSTALLED = False
+
+ class DataTable(object):
+ """Dummy class for DataTable."""
+
+ pass
+
+
"""sklearn"""
... | 1 | # coding: utf-8
# pylint: disable = C0103
"""Compatibility library."""
from __future__ import absolute_import
import inspect
import sys
import numpy as np
is_py3 = (sys.version_info[0] == 3)
"""Compatibility between Python2 and Python3"""
if is_py3:
zip_ = zip
string_type = str
numeric_types = (int, flo... | 1 | 19,670 | @guolinke Don't you mind to rename this variable to `DATATABLE_INSTALLED`, for the consistency with other variables (for example, there are `PANDAS_INSTALLED` but not `PD_INSTALLED`). Also, `DT` is a little bit confusing: sometimes `dt` is used for `datetime`. | microsoft-LightGBM | cpp |
@@ -37,7 +37,7 @@ module RSpec
profile.slowest_examples.each do |example|
@output.puts " #{example.full_description}"
@output.puts " #{bold(Helpers.format_seconds(example.execution_result.run_time))} " \
- "#{bold("seconds")} #{format_caller(example.locat... | 1 | RSpec::Support.require_rspec_core "formatters/console_codes"
module RSpec
module Core
module Formatters
# @api private
# Formatter for providing profile output.
class ProfileFormatter
Formatters.register self, :dump_profile
def initialize(output)
@output = output
... | 1 | 15,404 | We're fine with double quotes here. Just for future reference. | rspec-rspec-core | rb |
@@ -242,9 +242,5 @@ func (c call) maxAttemptsError(err error) {
}
func getErrorName(err error) string {
- errCode := yarpcerrors.ErrorCode(err)
- if errCode == yarpcerrors.CodeOK {
- return "unknown_internal_yarpc"
- }
- return errCode.String()
+ return yarpcerrors.ErrorCode(err).String()
} | 1 | // Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | 1 | 15,267 | can we keep this around? We should make sure we can distinguish between properly wrapped errors and "unwrapped" errors | yarpc-yarpc-go | go |
@@ -14265,6 +14265,10 @@ void PIPELINE_STATE::initGraphicsPipeline(ValidationStateTracker *state_data, co
}
}
graphicsPipelineCI.initialize(pCreateInfo, uses_color_attachment, uses_depthstencil_attachment);
+ if (graphicsPipelineCI.pInputAssemblyState) {
+ topology_at_rasterizer = graphicsP... | 1 | /* Copyright (c) 2015-2019 The Khronos Group Inc.
* Copyright (c) 2015-2019 Valve Corporation
* Copyright (c) 2015-2019 LunarG, Inc.
* Copyright (C) 2015-2019 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You m... | 1 | 11,619 | `RecordPipelineShaderStage()` might change `topology_at_rasterizer `, according to shader code, so we should check `pInputAssemblyState `first. | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -1,6 +1,10 @@
const path = require("path");
+const { CleanWebpackPlugin} = require("clean-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");
+// assets.js
+const Assets = require('./assets');
+
module.exports = {
context: path.resolve(__dirname, "src"),
entry: "./bundle.js", | 1 | const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
context: path.resolve(__dirname, "src"),
entry: "./bundle.js",
resolve: {
modules: [
path.resolve(__dirname, "node_modules")
]
},
plugins: [
new CopyPlugin([{
... | 1 | 12,142 | Should we just inline the assets here? I can't think of an advantage to having them in a separate file. | jellyfin-jellyfin-web | js |
@@ -175,13 +175,13 @@ func (t *endpointsChangesTracker) Update(em types.EndpointsMap) map[k8sproxy.Ser
for spn, endpoints := range change.current {
em[spn] = endpoints
}
- detectStaleConnections(change.previous, change.current, staleEndpoints)
+ detectStale(change.previous, change.current, staleEndpoints)
... | 1 | // Copyright 2020 Antrea 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 ... | 1 | 32,761 | detectStaleEndpoints to be more specific? | antrea-io-antrea | go |
@@ -100,6 +100,8 @@ class SpatialPoolerCompatabilityTest(unittest.TestCase):
cppSp.getMinPctOverlapDutyCycles())
self.assertAlmostEqual(pySp.getMinPctActiveDutyCycles(),
cppSp.getMinPctActiveDutyCycles())
+# self.assertEqual(pySp.getRandomSP(), #FIXME ena... | 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 | 17,394 | Please create a new issue for addressing this (if there isn't one already), so it doesn't get lost. | numenta-nupic | py |
@@ -78,7 +78,7 @@ func NewStorageMiningSubmodule(minerAddr address.Address, ds datastore.Batching,
PoStGenerator: postGen,
minerNode: minerNode,
storageMiner: storageMiner,
- heaviestTipSetCh: c.HeaviestTipSetCh,
+ heaviestTipSetCh: make(chan interface{}),
poster: poster.NewPoster(... | 1 | package submodule
import (
"context"
"github.com/filecoin-project/go-filecoin/internal/pkg/block"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-sectorbuilder"
"github.com/filecoin-project/go-storage-miner"
"github.com/filecoin-project/go-storage-miner/policies/precommit"
"github.com... | 1 | 23,421 | Nothing was ever coming out of this channel because its already being consumed. Create a new channel here and feed it in HandleNewHead method. | filecoin-project-venus | go |
@@ -1,4 +1,4 @@
-//snippet-sourcedescription:[GetPolicy.java demonstrates how to get the details for an AWS Identity and Access Management (IAM) policy.]
+//snippet-sourcedescription:[GetPolicy.java demonstrates how to get the details for an AWS Identity and Access Management (AWS IAM) policy.]
//snippet-keyword:[AWS ... | 1 | //snippet-sourcedescription:[GetPolicy.java demonstrates how to get the details for an AWS Identity and Access Management (IAM) policy.]
//snippet-keyword:[AWS SDK for Java v2]
//snippet-keyword:[Code Sample]
//snippet-service:[AWS IAM]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[11/02/2020]
//snipp... | 1 | 18,243 | AWS Identity and Access Management (IAM) | awsdocs-aws-doc-sdk-examples | rb |
@@ -76,7 +76,7 @@ public class TestEdgeDriver extends RemoteWebDriver implements WebStorage, Locat
.findFirst().orElseThrow(WebDriverException::new);
service = (EdgeDriverService) builder.withVerbose(true).withLogFile(logFile.toFile()).build();
- LOG.info("edgedriver will log to " + l... | 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,118 | This is deliberately at this level. | SeleniumHQ-selenium | js |
@@ -63,8 +63,10 @@ func stake2Transfer(args []string) error {
var payload []byte
if len(args) == 3 {
- payload = make([]byte, 2*len([]byte(args[2])))
- hex.Encode(payload, []byte(args[2]))
+ payload, err = hex.DecodeString(args[2])
+ if err != nil {
+ return output.NewError(output.ConvertError, "failed to d... | 1 | // Copyright (c) 2020 IoTeX Foundation
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use... | 1 | 21,868 | payload entered on command line is in hex-encoded format should use same processing as in ioctl/cmd/action/actiontransfer.go | iotexproject-iotex-core | go |
@@ -37,7 +37,14 @@ class PricingGroupDataFixture extends AbstractReferenceFixture
$pricingGroupData->name = 'Obyčejný zákazník';
$domainId = 2;
- $this->createPricingGroup($pricingGroupData, $domainId, self::PRICING_GROUP_ORDINARY_DOMAIN_2);
+
+ $alreadyCreatedDemoPricingGroupsByDomain... | 1 | <?php
namespace Shopsys\FrameworkBundle\DataFixtures\DemoMultidomain;
use Doctrine\Common\Persistence\ObjectManager;
use Shopsys\FrameworkBundle\Component\DataFixture\AbstractReferenceFixture;
use Shopsys\FrameworkBundle\Model\Pricing\Group\PricingGroupData;
use Shopsys\FrameworkBundle\Model\Pricing\Group\PricingGrou... | 1 | 11,948 | should this be kept in the `else` branch? | shopsys-shopsys | php |
@@ -32,10 +32,11 @@ import (
"strings"
"time"
+ "sync"
+
"cloud.google.com/go/storage"
"github.com/GoogleCloudPlatform/compute-image-tools/daisy/compute"
"google.golang.org/api/option"
- "sync"
)
const defaultTimeout = "10m" | 1 | // Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 6,499 | Why not put this below "strings"? | GoogleCloudPlatform-compute-image-tools | go |
@@ -33,6 +33,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
{
}
+ /// <summary>
+ /// For testing purposes.
+ /// </summary>
+ public int UvPipeCount => _dispatchPipes.Count;
+
private UvPipeHandle ListenPipe { get; set; }
... | 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.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.Asp... | 1 | 13,016 | Make it `internal` if it's just for testing. | aspnet-KestrelHttpServer | .cs |
@@ -1,4 +1,4 @@
-# pylint: disable=missing-docstring,pointless-statement,expression-not-assigned,too-few-public-methods,import-error,no-init,wrong-import-position,no-else-return
+# pylint: disable=missing-docstring,pointless-statement,expression-not-assigned,too-few-public-methods,import-error,no-init,wrong-import-posi... | 1 | # pylint: disable=missing-docstring,pointless-statement,expression-not-assigned,too-few-public-methods,import-error,no-init,wrong-import-position,no-else-return
# standard types
1 in [1, 2, 3]
1 in {'a': 1, 'b': 2}
1 in {1, 2, 3}
1 in (1, 2, 3)
'1' in "123"
'1' in u"123"
'1' in bytearray(b"123")
1 in frozenset([1, 2, ... | 1 | 10,151 | What is triggering this message in this file? | PyCQA-pylint | py |
@@ -212,7 +212,7 @@ def start_workers(args, actions, context, analyzer_config_map, skp_handler,
pool.map_async(check,
analyzed_actions,
1,
- callback=worker_result_handler).get(float('inf'))
+ callback=worker_result_han... | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 6,274 | Are you sure this should be removed? | Ericsson-codechecker | c |
@@ -121,8 +121,7 @@ public class DefaultTrustedSocketFactory implements TrustedSocketFactory {
private Context context;
- private ProxySettings proxySettings;
-
+ private ProxySettings proxySettings = new ProxySettings(false, "", 0);
public DefaultTrustedSocketFactory(Context context, ProxySetting... | 1 | package com.fsck.k9.mail.ssl;
import java.io.IOException;
import java.net.Proxy.Type;
import java.net.Socket;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import android.content.Context;
im... | 1 | 13,552 | What's that good for? The field is initialized in the constructor. | k9mail-k-9 | java |
@@ -484,12 +484,14 @@ class _Connection(object):
if not isinstance(self.connection, SSL.Connection):
if not getattr(self.wfile, "closed", False):
try:
- self.wfile.flush()
- self.wfile.close()
+ if self.wfile:
+ ... | 1 | from __future__ import (absolute_import, print_function, division)
import os
import select
import socket
import sys
import threading
import time
import traceback
import binascii
from typing import Optional # noqa
from netlib import strutils
from six.moves import range
import certifi
from backports import ssl_match... | 1 | 12,168 | This shouldn't be necessary (same below). Do you have a traceback for me? | mitmproxy-mitmproxy | py |
@@ -13,6 +13,8 @@ import (
"strconv"
"syscall" // only for Signal
+ "github.com/opencontainers/runc/libcontainer/logs"
+
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/intelrdt" | 1 | // +build linux
package libcontainer
import (
"encoding/json"
"errors"
"fmt"
"io"
"os"
"os/exec"
"path/filepath"
"strconv"
"syscall" // only for Signal
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/... | 1 | 17,568 | No newline needed here. | opencontainers-runc | go |
@@ -7,11 +7,12 @@ package libkbfs
import (
"errors"
"fmt"
- "io/ioutil"
"os"
"path/filepath"
"sync"
+ "github.com/keybase/kbfs/ioutil"
+
"github.com/keybase/client/go/logger"
"github.com/keybase/kbfs/kbfscodec"
"github.com/keybase/kbfs/kbfscrypto" | 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 (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sync"
"github.com/keybase/client/go/logger"
"github.com/keybase/kbfs/kbfscodec"
"git... | 1 | 14,802 | Why a separate block? | keybase-kbfs | go |
@@ -2531,10 +2531,16 @@ reg_get_size(reg_id_t reg)
return OPSZ_SCALABLE;
if (reg >= DR_REG_P0 && reg <= DR_REG_P15)
return OPSZ_SCALABLE_PRED;
+ if (reg == DR_REG_CNTVCT_EL0)
+ return OPSZ_8;
+ if (reg >= DR_REG_NZCV && reg <= DR_REG_FPSR)
+ return OPSZ_8;
# endif
if ... | 1 | /* **********************************************************
* Copyright (c) 2011-2020 Google, Inc. All rights reserved.
* Copyright (c) 2000-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 25,482 | Probably better to ask @AssadHashmi or another AArch64 expert for a review rather than me -- @AssadHashmi if you could confirm that these status registers are 64-bit despite having only a few fields? | DynamoRIO-dynamorio | c |
@@ -684,11 +684,10 @@ is_private_key = lambda x: is_xprv(x) or is_private_key_list(x)
is_bip32_key = lambda x: is_xprv(x) or is_xpub(x)
-def bip44_derivation(account_id):
- if bitcoin.TESTNET:
- return "m/44'/1'/%d'"% int(account_id)
- else:
- return "m/44'/0'/%d'"% int(account_id)
+def bip44_d... | 1 | #!/usr/bin/env python2
# -*- mode: python -*-
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2016 The Electrum developers
#
# 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... | 1 | 11,776 | `purpose` and `coin_type` and `account` would mimic the BIP-0044 wording, but it's up to you. | spesmilo-electrum | py |
@@ -129,10 +129,10 @@ namespace pwiz.Skyline.Controls.Graphs
public void SetQValueTo(float qValue)
{
if (qValue == .01f)
- rbQValue01.Select();
+ rbQValue01.Checked = true;
else
{
- rbQValueCustom.Select();
+ ... | 1 | /*
* Original author: Rita Chupalov <ritach .at. uw.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2020 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Lic... | 1 | 13,751 | Is this the critical change? It does seem wrong to use Select() instead of Checked = true. Not sure why that would pass sometimes and not others, though. | ProteoWizard-pwiz | .cs |
@@ -111,7 +111,14 @@ func (p *VSphereCloudBuilder) addClusterDeploymentPlatform(o *Builder, cd *hivev
}
func (p *VSphereCloudBuilder) addMachinePoolPlatform(o *Builder, mp *hivev1.MachinePool) {
- mp.Spec.Platform.VSphere = &hivev1vsphere.MachinePool{}
+ mp.Spec.Platform.VSphere = &hivev1vsphere.MachinePool{
+ Num... | 1 | package clusterresource
import (
"fmt"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
installertypes "github.com/openshift/installer/pkg/types"
installervsphere "github.com/openshift/installer/pkg/types/vsphere"
hivev1 "github.com/openshift/hive/pkg/apis/hive/v1"
hivev1vsphere "git... | 1 | 12,323 | Seems a little low, but is this an installer default? | openshift-hive | go |
@@ -10,6 +10,19 @@ from kinto.core import utils
logger = structlog.get_logger()
+def reset_logger():
+ """Hack to work around https://github.com/hynek/structlog/issues/71.
+
+ This clears a magic field in the logger so that it will regenerate
+ the right kind of logger on its next use.
+
+ Do this when... | 1 | import os
import colorama
import six
import structlog
from kinto.core import utils
logger = structlog.get_logger()
def decode_value(value):
try:
return six.text_type(value)
except UnicodeDecodeError: # pragma: no cover
return six.binary_type(value).decode('utf-8')
class ClassicLogRender... | 1 | 9,220 | Maybe we could provide our own `configure` function that includes `logger._logger = None` because I don't see a use case in kinto for using `reset_logger` besides configuring the logger. | Kinto-kinto | py |
@@ -31,11 +31,8 @@ type Block struct {
// holders for an epoch.
Parents SortedCidSet `json:"parents"`
- // ParentWeightNum is the numerator of the aggregate chain weight of the parent set.
- ParentWeightNum Uint64 `json:"parentWeightNumerator"`
-
- // ParentWeightDenom is the denominator of the aggregate chain we... | 1 | package types
import (
"bytes"
"encoding/json"
"fmt"
"sort"
"gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
cbor "gx/ipfs/QmRoARq3nkUb13HSKZGepCZSWe5GrVPwx7xURJGZ7KWv9V/go-ipld-cbor"
node "gx/ipfs/QmcKKBwfz6FyQdHR2jsXrrF6XeSBXYL86anmWNewpFpoF5/go-ipld-format"
"github.com/filecoin-project/go-f... | 1 | 15,666 | This will cause the same breakage that was caused when we added Proof to Block. Be sure to let people (infra?) know ahead of time | filecoin-project-venus | go |
@@ -464,11 +464,9 @@ func TestNodeCacheGCReal(t *testing.T) {
childNode1 = nil
runtime.GC()
- _ = <-finalizerChan
+ <-finalizerChan
- if len(ncs.nodes) != 2 {
- t.Errorf("Expected %d nodes, got %d", 2, len(ncs.nodes))
- }
+ require.Len(t, ncs.nodes, 1)
// Make sure childNode2 isn't GCed until after this po... | 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 (
"runtime"
"testing"
"github.com/keybase/kbfs/kbfsblock"
"github.com/keybase/kbfs/tlf"
"github.com/stretchr/testify/require"
)
func setup... | 1 | 19,784 | Fixed the test; @strib want to validate that this is okay? Seems to be consistent new GC behavior. | keybase-kbfs | go |
@@ -45,7 +45,7 @@ func TestValidJsonAccount(t *testing.T) {
"domain": {
"fulldomain": "fooldom",
"password": "secret",
- "subdomain": "subdoom",
+ "subdomain": "subdom",
"username": "usernom"
}
}`) | 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 | 26,166 | Afaict, nothing cares | jetstack-cert-manager | go |
@@ -507,7 +507,9 @@ func decryptMDPrivateData(ctx context.Context, codec kbfscodec.Codec,
}
}
- // Re-embed the block changes if it's needed.
+ // Re-embed the block changes if it's needed. TODO: we don't need
+ // to do this in minimal mode, since there's no node cache
+ // (KBFS-2026).
err := reembedBlockCh... | 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 (
"fmt"
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/keybase1"
"github... | 1 | 16,227 | I must be missing something, but why does not having a node cache imply not neededing to re-embed the block changes, in particular? Isn't it just the fact that we don't do any writes? | keybase-kbfs | go |
@@ -5,7 +5,7 @@ using System.Linq;
namespace Datadog.Trace.Headers
{
- internal class NameValueHeadersCollection : IHeadersCollection
+ internal readonly struct NameValueHeadersCollection : IHeadersCollection
{
private readonly NameValueCollection _headers;
| 1 | using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
namespace Datadog.Trace.Headers
{
internal class NameValueHeadersCollection : IHeadersCollection
{
private readonly NameValueCollection _headers;
public NameValueHeadersCollection(NameValue... | 1 | 19,699 | Are these changes from `class` to `struct` breaking if called from an older version of `Datadog.Trace.ClrProfiler.Managed`? | DataDog-dd-trace-dotnet | .cs |
@@ -19,9 +19,12 @@ package org.hyperledger.besu.ethereum.api.query;
import org.hyperledger.besu.ethereum.core.Address;
import org.hyperledger.besu.ethereum.core.Log;
import org.hyperledger.besu.ethereum.core.LogTopic;
+import org.hyperledger.besu.ethereum.core.LogsBloomFilter;
import java.util.Arrays;
import jav... | 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 writ... | 1 | 20,104 | These are just aliases now | hyperledger-besu | java |
@@ -1,4 +1,4 @@
-<% content_for :page_title, @video.title %>
+<% content_for :page_title, @video.title.html_safe %>
<% content_for :landing_page_back_link do %>
<%= link_to '← All Videos'.html_safe, '/the-weekly-iteration' %> | 1 | <% content_for :page_title, @video.title %>
<% content_for :landing_page_back_link do %>
<%= link_to '← All Videos'.html_safe, '/the-weekly-iteration' %>
<% end %>
<div class="text-box-wrapper">
<div class="text-box">
<%= render @video.preview, title: @video.title %>
<section class='video-notes'>
... | 1 | 12,771 | Does this mean we can remove `raw` from `_head_contents` partial? | thoughtbot-upcase | rb |
@@ -113,7 +113,9 @@ class CapacitorSplashScreen {
`;
this.mainWindowRef.on('closed', () => {
- this.splashWindow.close();
+ if (this.splashWindow && !this.splashWindow.isDestroyed) {
+ this.splashWindow.close();
+ }
});
this.splashWindow.loadURL(`data:text/html;charset=UT... | 1 | const fs = require('fs');
const path = require('path');
const { app, ipcMain, BrowserWindow } = require('electron');
function getURLFileContents(path) {
console.trace();
return new Promise((resolve, reject) => {
fs.readFile(path, (err, data) => {
if(err)
reject(err);
resolve(data.toString()... | 1 | 8,188 | `isDestroyed` is a function, not a property. This condition will always return false. | ionic-team-capacitor | js |
@@ -30,6 +30,8 @@ const (
Version_1_28 DockerVersion = "1.28"
Version_1_29 DockerVersion = "1.29"
Version_1_30 DockerVersion = "1.30"
+ Version_1_31 DockerVersion = "1.31"
+ Version_1_32 DockerVersion = "1.32"
)
// getKnownAPIVersions returns all of the API versions that we know about. | 1 | // Copyright 2014-2018 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 | 21,165 | Why are we adding these versions? | aws-amazon-ecs-agent | go |
@@ -271,6 +271,8 @@ def process_one_user(user):
spotify.update_latest_listened_at(user.user_id, latest_listened_at)
spotify.update_last_updated(user.user_id)
+ current_app.logger.info('imported %d listens for %s' % (len(listens), str(user)))
+
def process_all_spotify_users():
""" Get a batch of u... | 1 | #!/usr/bin/python3
import time
import listenbrainz.webserver
import json
from listenbrainz.utils import safely_import_config
safely_import_config()
from dateutil import parser
from flask import current_app, render_template
from listenbrainz.domain import spotify
from listenbrainz.webserver.views.api_tools import inse... | 1 | 15,491 | fyi, you can do this by doing `.info("string %s %s", formatparam, formatparam2)` instead of doing a string format with `"str" % (params)` the idea is that it'll only do the string interpolation if logging is enabled for this level, which theoretically is an optimisation, but in this case probably isn't important | metabrainz-listenbrainz-server | py |
@@ -0,0 +1,17 @@
+<%= render "offerings/meta", offering: @offering %>
+
+<p>
+ We're adding you to the GitHub repository, and we'll redirect you as soon it's
+ ready. You may receive an email from GitHub asking you to confirm your
+ membership, so make sure to take quick look in your inbox.
+</p>
+
+<% content_for :... | 1 | 1 | 11,750 | Would this work, as a one liner? `setTimeout(window.location.reload, 5000);` | thoughtbot-upcase | rb | |
@@ -33,16 +33,16 @@ import (
"sync"
"time"
+ "crypto/tls"
"github.com/aws/amazon-ecs-agent/agent/config"
+ "github.com/aws/amazon-ecs-agent/agent/utils"
+ "github.com/aws/amazon-ecs-agent/agent/utils/cipher"
"github.com/aws/amazon-ecs-agent/agent/wsclient/wsconn"
"github.com/aws/aws-sdk-go/aws/credentials"
... | 1 | // Copyright 2014-2018 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 | 21,402 | Can you move `crypto/tls` into the block at the top with all the other stdlib imports? | aws-amazon-ecs-agent | go |
@@ -403,7 +403,7 @@ for steps in config['predictionSteps']:
params={'errorMetric': 'aae', 'window': 1000, 'steps': steps}))
control['metrics'].append(
MetricSpec(field=config['predictedField'], metric='multiStep',
- inferenceElement='multiStepBestPredictions',
+ ... | 1 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | 1 | 17,362 | What is the motivation for this change? | numenta-nupic | py |
@@ -74,9 +74,15 @@ type Topic interface {
// Subscription receives published messages.
type Subscription interface {
// ReceiveBatch should return a batch of messages that have queued up
- // for the subscription on the server. If no messages are available
- // yet, it must block until there is at least one, or the... | 1 | // Copyright 2018 The Go Cloud 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1 | 12,113 | OK, so the concrete implementation will loop? But then it's important that this method waits for a while before it returns no messages. To be specific, a GCP implementation that set `ReturnImmediately` to true or false would both satisfy this requirement, but the first would cause busy-waiting. | google-go-cloud | go |
@@ -45,7 +45,10 @@ Status MatchValidator::validateImpl() {
auto matchClauseCtx = getContext<MatchClauseContext>();
matchClauseCtx->aliasesUsed = aliasesUsed;
- NG_RETURN_IF_ERROR(validatePath(matchClause->path(), *matchClauseCtx));
+ if (matchClause->path()->pathSize() > 1) {
+ ... | 1 | /* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include "graph/validator/MatchValidator.h"
#include "graph/planner/match/MatchSolver.h"
#include "graph/util/ExpressionUtils.h"
#include "graph/visitor/RewriteVisitor.h"
namespace nebula {
namespa... | 1 | 32,088 | The data structure of `MatchClauseContext` may need to be redesigned. | vesoft-inc-nebula | cpp |
@@ -236,8 +236,13 @@ func testSendReceive(t *testing.T, newHarness HarnessMaker) {
}
defer cleanup()
- want := publishN(ctx, t, top, 3)
- got := receiveN(ctx, t, sub, len(want))
+ wantChan := make(chan []*pubsub.Message)
+ gotChan := make(chan []*pubsub.Message)
+ n := 3
+ go func() { gotChan <- receiveN(ctx, t, ... | 1 | // Copyright 2018 The Go Cloud Development Kit 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | 1 | 14,826 | You say on the issue that something has to be receiving while the messages are being published. But here it's possible that the publish goroutine starts, and maybe even completes, before Receive is ever called. | google-go-cloud | go |
@@ -50,7 +50,7 @@ class ProposalsController < ApplicationController
end
def approve
- approval = proposal.existing_approval_for(current_user)
+ approval = proposal.existing_step_for(current_user)
approval.update_attributes!(completer: current_user)
approval.approve!
flash[:success] = "You h... | 1 | class ProposalsController < ApplicationController
include TokenAuth
skip_before_action :authenticate_user!, only: [:approve]
skip_before_action :check_disabled_client, only: [:approve]
# TODO use Policy for all actions
before_action ->{authorize proposal}, only: [:show, :cancel, :cancel_form, :history]
bef... | 1 | 16,210 | how do we know that the step in question is an approval type step? | 18F-C2 | rb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.