patch stringlengths 17 31.2k | y int64 1 1 | oldf stringlengths 0 2.21M | idx int64 1 1 | id int64 4.29k 68.4k | msg stringlengths 8 843 | proj stringclasses 212
values | lang stringclasses 9
values |
|---|---|---|---|---|---|---|---|
@@ -4,12 +4,13 @@ import (
"encoding/json"
"fmt"
+ "github.com/google/uuid"
installertypes "github.com/openshift/installer/pkg/types"
hivev1 "github.com/openshift/hive/pkg/apis/hive/v1"
)
-const fakeMetadataFormatStr = `{"aws":{"identifier":[{"kubernetes.io/cluster/fake-infraid":"owned"},{"openshiftClust... | 1 | package installmanager
import (
"encoding/json"
"fmt"
installertypes "github.com/openshift/installer/pkg/types"
hivev1 "github.com/openshift/hive/pkg/apis/hive/v1"
)
const fakeMetadataFormatStr = `{"aws":{"identifier":[{"kubernetes.io/cluster/fake-infraid":"owned"},{"openshiftClusterID":"fake-cluster-id"}],"reg... | 1 | 16,762 | I think the goal of using `fake-cluster-id` was to make it sure clear that this is a fake cluster, replacing this with UUID only now makes these clusters look very similar to real ones which can cause problems.. any reason why we didn't go for the original recommendation from slack thread of `fake-cluster-UUID` @twiest | openshift-hive | go |
@@ -1719,3 +1719,19 @@ def get_node_first_ancestor_of_type(
if isinstance(ancestor, ancestor_type):
return ancestor
return None
+
+
+def get_node_first_ancestor_of_type_and_its_child(
+ node: nodes.NodeNG, ancestor_type: Union[Type[T_Node], Tuple[Type[T_Node]]]
+) -> Tuple[Optional[T_Node]... | 1 | # Copyright (c) 2006-2007, 2009-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2009 Mads Kiilerich <mads@kiilerich.com>
# Copyright (c) 2010 Daniel Harding <dharding@gmail.com>
# Copyright (c) 2012-2014 Google, Inc.
# Copyright (c) 2012 FELD Boris <lothiraldan@gmail.com>
# Copyright (c) 2013-202... | 1 | 19,468 | I need to spruce up my `mypy` knowledge but I think this is incorrect. Using `T_Node` twice makes it so that both should be the same type. I think this would be better: `Tuple[Optional[T_Node], Optional[nodes.NodeNG ]]`. It might even better to do: `Union[Tuple[None, None]. Tuple[T_Node, nodes.NodeNG ]]` as that shows ... | PyCQA-pylint | py |
@@ -438,10 +438,13 @@ func runTest(t *testing.T, test testT) {
}
controller := certificaterequests.New(apiutil.IssuerCA, ca)
- controller.Register(test.builder.Context)
+ _, _, err := controller.Register(test.builder.Context)
+ if err != nil {
+ t.Errorf("controller.Register failed (%s)", err.Error())
+ }
test... | 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,676 | Nit: below on line 449 we use `%v` to print an error - perhaps would be nice to do it in the same way in both places (but probably not that important). Similar in other places in this PR. | jetstack-cert-manager | go |
@@ -169,6 +169,8 @@ class Flow(stateobject.StateObject):
self.reply.take()
self.reply.kill(force=True)
self.reply.commit()
+ self.live = False
+ master.addons("kill", self)
def intercept(self, master):
""" | 1 | import time
import copy
import uuid
from mitmproxy import controller # noqa
from mitmproxy import stateobject
from mitmproxy import connections
from mitmproxy import version
import typing # noqa
class Error(stateobject.StateObject):
"""
An Error.
This is distinct from an protocol error respon... | 1 | 12,464 | I'm not against adding a kill event, but we need to do it properly, please. That means listing it in events.py, adding docs for it, and so forth. | mitmproxy-mitmproxy | py |
@@ -2083,9 +2083,15 @@ class CppGenerator : public BaseGenerator {
if (!field.deprecated) {
code_.SetValue("FIELD_NAME", Name(field));
if (field.value.type.base_type == BASE_TYPE_STRING) {
- code_ +=
- " auto {{FIELD_NAME}}__ = {{FIELD_NAME}} ? "
- ... | 1 | /*
* Copyright 2014 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 applica... | 1 | 14,993 | this line can be lifted outside of the if-then? In fact only CreateString / CreateSharedString needs to be inside of it. | google-flatbuffers | java |
@@ -386,8 +386,8 @@ public class EpisodesApplyActionFragment extends Fragment implements Toolbar.OnM
mListView.setItemChecked(i, checked);
}
refreshToolbarState();
- toolbar.setTitle(getResources().getQuantityString(R.plurals.num_selected_label,
- checkedIds.size(), ... | 1 | package de.danoeh.antennapod.dialog;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import androidx.annotation.IdRes;
import... | 1 | 20,033 | I think the `EpisodesApplyActionFragment` is unused now. So please delete it :) | AntennaPod-AntennaPod | java |
@@ -863,7 +863,7 @@ module Bolt
end
define('--log-level LEVEL',
"Set the log level for the console. Available options are",
- "debug, info, notice, warn, error, fatal, any.") do |level|
+ "trace, debug, info, warn, error, fatal, any.") do |level|
@options[:lo... | 1 | # frozen_string_literal: true
# Note this file includes very few 'requires' because it expects to be used from the CLI.
require 'optparse'
module Bolt
class BoltOptionParser < OptionParser
OPTIONS = { inventory: %w[targets query rerun description],
authentication: %w[user password password-prom... | 1 | 15,709 | It seems like we should leave `notice` here since it can be configured in Bolt config files, and that's what sets the console config for messages from Puppet. For example, this will break plans that call `notice()` in their apply blocks. | puppetlabs-bolt | rb |
@@ -31,6 +31,7 @@ public enum CommonMetrics {
private Meter dbConnectionMeter;
private Meter flowFailMeter;
+ private Meter OOMwaitingJobMeter;
private AtomicLong dbConnectionTime = new AtomicLong(0L);
private MetricRegistry registry; | 1 | /*
* Copyright 2017 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 12,633 | This metrics is only exposed in executors. Should it be defined in azkaban.execapp.ExecMetrics instead? | azkaban-azkaban | java |
@@ -64,3 +64,14 @@ export function getEffectiveMaxDate ({ maxDate, includeDates }) {
return maxDate
}
}
+
+export function parseDate (value, { dateFormat, locale }) {
+ const m = moment(value, dateFormat, locale || moment.locale(), true)
+ return m.isValid() ? m : null
+}
+
+export function safeDateFormat (d... | 1 | import moment from 'moment'
export function isSameDay (moment1, moment2) {
if (moment1 && moment2) {
return moment1.isSame(moment2, 'day')
} else {
return !moment1 && !moment2
}
}
export function isSameUtcOffset (moment1, moment2) {
if (moment1 && moment2) {
return moment1.utcOffset() === moment2.... | 1 | 5,970 | I originally factored out these functions from date_input. Currently, they are only used in datepicker, but they seemed more general purpose. If you decide we should keep the current date_input API (in case anyone is using it directly), then I think it makes sense to factor these out in order to be able to maintain con... | Hacker0x01-react-datepicker | js |
@@ -204,9 +204,10 @@ func (r *mutableStateTaskGeneratorImpl) generateDelayedWorkflowTasks(
switch startAttr.GetInitiator() {
case enumspb.CONTINUE_AS_NEW_INITIATOR_RETRY:
workflowBackoffType = enumsspb.WORKFLOW_BACKOFF_TYPE_RETRY
- case enumspb.CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE,
- enumspb.CONTINUE_AS_NEW_... | 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 | 10,234 | I think this should never happen and should return an error also. Having `WorkflowBackoffTimerTask` with `UNSPECIFIED` type looks weird. | temporalio-temporal | go |
@@ -9,7 +9,7 @@ import 'webcomponents';
function onKeyDown(e) {
// Don't submit form on enter
// Real (non-emulator) Tizen does nothing on Space
- if (e.keyCode === 13 || e.keyCode === 32) {
+ if (e.keyCode === 13 || (e.keyCode === 32 && browser.tizen)) {
e.preventDefau... | 1 | import layoutManager from 'layoutManager';
import 'css!./emby-radio';
import 'webcomponents';
/* eslint-disable indent */
const EmbyRadioPrototype = Object.create(HTMLInputElement.prototype);
function onKeyDown(e) {
// Don't submit form on enter
// Real (non-emulator) Tizen does nothing on Sp... | 1 | 17,335 | Add `browser` import | jellyfin-jellyfin-web | js |
@@ -0,0 +1,18 @@
+// Copyright 2018 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 config
+
+import (
+ "crypto/sha256"
+ "encoding/hex"
+)
+
+// GenerateSHA256PasswordHash generates a sha256 hashed password hash from
+// ... | 1 | 1 | 19,545 | Would it be good practice to add a nonce in here (that's also stored in the config), so it's harder to tell when passwords are being reused? | keybase-kbfs | go | |
@@ -40,4 +40,8 @@ public interface TelemetryRestService {
@Produces(MediaType.APPLICATION_JSON)
TelemetryConfigurationDto getTelemetryConfiguration();
+ @GET
+ @Path("/data")
+ @Produces(MediaType.APPLICATION_JSON)
+ Object getTelemetryData();
} | 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,543 | For consistency, the return type could be `TelemetryDataDto` here. This would be more consistent with the other REST API interfaces. From a functional perspective, the current code is perfectly fine though. | camunda-camunda-bpm-platform | java |
@@ -133,7 +133,7 @@ PySGDSolver::PySGDSolver(const string& param_file) {
// as in PyNet, (as a convenience, not a guarantee), create a Python
// exception if param_file can't be opened
CheckFile(param_file);
- solver_.reset(new SGDSolver<float>(param_file));
+ solver_ = boost::make_shared<SolvingDriver<float... | 1 | // pycaffe provides a wrapper of the caffe::Net class as well as some
// caffe::Caffe functions so that one could easily call it from Python.
// Note that for Python, we will simply use float as the data type.
#include <Python.h> // NOLINT(build/include_alpha)
#include <boost/make_shared.hpp>
#include <boost/python/... | 1 | 31,890 | I've never seen this `boost::make_shared`...why use it instead of `reset`? | BVLC-caffe | cpp |
@@ -273,6 +273,11 @@ public abstract class AbstractExecutorManagerAdapter extends EventHandler implem
}
}
+ @Override
+ public DispatchMethod getDispatchMethod(final ExecutableFlow flow) {
+ return getDispatchMethod();
+ }
+
protected String uploadExecutableFlow(
final ExecutableFlow exflow, f... | 1 | /*
* Copyright 2020 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 | 21,610 | Wasn't this added as a part of different PR already? | azkaban-azkaban | java |
@@ -8,7 +8,7 @@ class UrlListData
public const FIELD_SLUG = 'slug';
/**
- * @var \Shopsys\FrameworkBundle\Component\Router\FriendlyUrl\FriendlyUrl[]
+ * @var \Shopsys\FrameworkBundle\Component\Router\FriendlyUrl\FriendlyUrl[][]
*/
public $toDelete;
| 1 | <?php
namespace Shopsys\FrameworkBundle\Component\Router\FriendlyUrl;
class UrlListData
{
public const FIELD_DOMAIN = 'domain';
public const FIELD_SLUG = 'slug';
/**
* @var \Shopsys\FrameworkBundle\Component\Router\FriendlyUrl\FriendlyUrl[]
*/
public $toDelete;
/**
* @var \Shopsys... | 1 | 16,306 | hmmmmm, should not be in constructor in this case `$this->toDelete = [[]];` ??? maybe not | shopsys-shopsys | php |
@@ -114,8 +114,11 @@ def toggle_routing_control_state(routing_control_arn, cluster_endpoints):
update_state = 'Off' if state == 'On' else 'On'
print(f"Setting control state to '{update_state}'.")
response = update_routing_control_state(routing_control_arn, cluster_endpoints, update_state)
- if respons... | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Purpose
Shows how to use the AWS SDK for Python (Boto3) with Amazon Route 53 Application
Recovery Controller to manage routing controls.
"""
import argparse
import json
# snippet-start:[python.example_code... | 1 | 21,304 | We can just update it to be as follows: `if response: print("Success") else: print("Error")` | awsdocs-aws-doc-sdk-examples | rb |
@@ -119,6 +119,7 @@ type Helper struct {
matcherDefs map[string]caddy.ModuleMap
parentBlock caddyfile.ServerBlock
groupCounter counter
+ state map[string]interface{}
}
// Option gets the option keyed by name. | 1 | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | 1 | 14,240 | Maybe this should be exported so (external/third-party) plugins can also use it. | caddyserver-caddy | go |
@@ -38,17 +38,9 @@ func (service *servicePFCtl) Add(rule RuleForwarding) {
}
func (service *servicePFCtl) Start() error {
- err := service.ipForward.Enable()
- if err != nil {
- return err
- }
-
+ service.ipForward.Enable()
service.clearStaleRules()
- err = service.enableRules()
- if err != nil {
- return err
-... | 1 | /*
* Copyright (C) 2018 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 12,007 | Warning logging whould be exactly here in high logic. So that everybody understands why we swallow errors | mysteriumnetwork-node | go |
@@ -46,6 +46,7 @@ namespace Nethermind.JsonRpc.WebSockets
string clientName,
ISocketHandler handler,
RpcEndpoint endpointType,
+ JsonRpcUrl? url,
IJsonRpcProcessor jsonRpcProcessor,
IJsonRpcService jsonRpcService,
IJsonRpcLocalStat... | 1 | // Copyright (c) 2021 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of ... | 1 | 26,340 | if its optional, move it to last item an use JsonRpcUrl? url = null | NethermindEth-nethermind | .cs |
@@ -58,6 +58,14 @@ class User < ActiveRecord::Base
user
end
+ def client_model
+ Proposal.client_model_for(self)
+ end
+
+ def client_model_slug
+ client_model.to_s.underscore.tr("/", "_")
+ end
+
def add_role(role_name)
role = Role.find_or_create_by!(name: role_name)
user_roles.find_or... | 1 | class User < ActiveRecord::Base
has_paper_trail class_name: 'C2Version'
validates :client_slug, inclusion: {
in: ->(_) { Proposal.client_slugs },
message: "'%{value}' is not in Proposal.client_slugs #{Proposal.client_slugs.inspect}",
allow_blank: true
}
validates :email_address, presence: true, uni... | 1 | 16,174 | how is this different from the `client_slug` method already available on a `user` ? | 18F-C2 | rb |
@@ -61,7 +61,7 @@ class UnboundZmqEventBus implements EventBus {
return thread;
});
- LOG.info(String.format("Connecting to %s and %s", publishConnection, subscribeConnection));
+ LOG.finest(String.format("Connecting to %s and %s", publishConnection, subscribeConnection));
sub = context.creat... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 16,464 | I'd keep this at `info` level... | SeleniumHQ-selenium | py |
@@ -49,11 +49,14 @@ module Travis
fi
),
redirect_io: %(
- exec > >(
- %{curl}
- %{exports}
- ruby ~/filter.rb %{args}
- ) 2>&1
+ if [[ -z "$TRAVIS_FILTERED" ]]; then
+ export TRAVIS_FILTERED=1
+ ... | 1 | require 'travis/build/appliances/base'
require 'travis/build/git'
require 'travis/rollout'
module Travis
module Build
module Appliances
class SetupFilter < Base
class Rollout < Struct.new(:data)
def matches?
Travis::Rollout.matches?(:redirect_io, uid: repo_id, owner: owner_log... | 1 | 15,462 | I believe this env var won't be set anywhere. Do we need this condition? | travis-ci-travis-build | rb |
@@ -14,7 +14,7 @@ function getWindowLocationSearch(win) {
return search || '';
}
-function getParameterByName(name, url) {
+window.getParameterByName = function (name, url) {
'use strict';
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); | 1 | function getWindowLocationSearch(win) {
'use strict';
var search = (win || window).location.search;
if (!search) {
var index = window.location.href.indexOf('?');
if (-1 != index) {
search = window.location.href.substring(index);
}
}
return search || '';
}
fun... | 1 | 16,734 | why add function explicitly? | jellyfin-jellyfin-web | js |
@@ -92,7 +92,8 @@ func newLevel() *level {
// New will create a default sublist
func NewSublist() *Sublist {
- return &Sublist{root: newLevel(), cache: make(map[string]*SublistResult)}
+ // return &Sublist{root: newLevel(), cache: make(map[string]*SublistResult)}
+ return &Sublist{root: newLevel()}
}
// Insert ... | 1 | // Copyright 2016-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 | 7,715 | Is that intentional? If you don't create the cache here, it will never be created therefore used. | nats-io-nats-server | go |
@@ -136,4 +136,15 @@ func TestStream(t *testing.T) {
require.Greater(t, streamer.fetchCount, 1, "expected more than one call to Fetch within timeout")
require.Greater(t, streamer.notifyCount, 1, "expected more than one call to Notify within timeout")
})
+
+ t.Run("nextFetchDate works correctly to grab times bef... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package stream
import (
"context"
"errors"
"testing"
"time"
"github.com/stretchr/testify/require"
)
// counterStreamer counts the number of times Fetch and Notify are invoked.
type counterStreamer struc... | 1 | 16,415 | I think we can now remove this test case since we can ensure that multiple calls to `Fetch` will double the interval on each call | aws-copilot-cli | go |
@@ -64,7 +64,7 @@ type (
)
const (
- reservedTaskListPrefix = "/__cadence_sys/"
+ reservedTaskListPrefix = "/__temporal_sys/"
)
func newDecisionAttrValidator( | 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 | 9,356 | Not part of this PR but this const seems to be defined in multiple places. Needs to be extracted somewhere. | temporalio-temporal | go |
@@ -2,6 +2,7 @@ package volume
import (
"fmt"
+
"github.com/libopenstorage/openstorage/api"
"github.com/libopenstorage/openstorage/api/client"
"github.com/libopenstorage/openstorage/volume" | 1 | package volume
import (
"fmt"
"github.com/libopenstorage/openstorage/api"
"github.com/libopenstorage/openstorage/api/client"
"github.com/libopenstorage/openstorage/volume"
)
// VolumeDriver returns a REST wrapper for the VolumeDriver interface.
func VolumeDriver(c *client.Client) volume.VolumeDriver {
return new... | 1 | 6,421 | Remove this file from the PR | libopenstorage-openstorage | go |
@@ -55,6 +55,11 @@ namespace Nethermind.Core.Specs
{
return Byzantium.Instance;
}
+
+ if (blockNumber < IstanbulBlockNumber)
+ {
+ return Istanbul.Instance;
+ }
return ConstantinopleFix.Instance;
... | 1 | /*
* Copyright (c) 2018 Demerzel Solutions Limited
* This file is part of the Nethermind library.
*
* The Nethermind library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of th... | 1 | 22,444 | need to add it for ropsten, rinkeby, goerli as well | NethermindEth-nethermind | .cs |
@@ -109,7 +109,7 @@ func (v *VolumeProperty) Execute() ([]byte, error) {
return nil, err
}
// execute command here
- return exec.Command(bin.ZFS, v.Command).CombinedOutput()
+ return exec.Command(bin.BASH, "-c", v.Command).CombinedOutput()
}
// Build returns the VolumeProperty object generated by builder | 1 | /*
Copyright 2019 The OpenEBS Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 1 | 16,752 | G204: Subprocess launching should be audited (from `gosec`) | openebs-maya | go |
@@ -49,11 +49,11 @@ import org.apache.orc.storage.ql.exec.vector.MapColumnVector;
import org.apache.orc.storage.ql.exec.vector.TimestampColumnVector;
import org.apache.orc.storage.serde2.io.HiveDecimalWritable;
-class FlinkOrcReaders {
+public class FlinkOrcReaders {
private FlinkOrcReaders() {
}
- static ... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 37,081 | curious why only making these 3 public. what about other package scope methods like `times`, `timestamps`, `array`? | apache-iceberg | java |
@@ -0,0 +1,15 @@
+<?php
+
+return [
+ /*
+ |--------------------------------------------------------------------------
+ | Exclusion list
+ |--------------------------------------------------------------------------
+ |
+ | This is a list of exclusions for words or phrases where the original
+ | fo... | 1 | 1 | 7,901 | The Email field is not translated into Russian, and into any other. It's kind of a "standard" word. Therefore, we may face the fact that you have to create files with exceptions for all languages. @caouecs, what do you say? | Laravel-Lang-lang | php | |
@@ -32,6 +32,9 @@ int main (int argc, char * const * argv)
("disable_unchecked_drop", "Disables drop of unchecked table at startup")
("fast_bootstrap", "Increase bootstrap speed for high end nodes with higher limits")
("batch_size",boost::program_options::value<std::size_t> (), "Increase sideband batch size, d... | 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 | 15,144 | Should it say `default 0` here? looks a bit confusing. Also following BODMAS we should put: `2048 * (signature checker threads + 1)` | nanocurrency-nano-node | cpp |
@@ -16,6 +16,7 @@
from __future__ import print_function
import os
+import ruamel.yaml
import constants
import utils | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 1 | 28,850 | Add a newline. We group by 1: standard library, 2: 3rd party library, 3: application library | forseti-security-forseti-security | py |
@@ -83,7 +83,9 @@ func (p *Provider) Type() string {
return ProviderType
}
-func (p *Provider) RunQuery(ctx context.Context, query string, queryRange metrics.QueryRange, evaluator metrics.Evaluator) (bool, string, error) {
+// Evaluate queries the range query endpoint and checks if values in all data points are wi... | 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 | 15,466 | So `queryRange.Step` will be ignored? | pipe-cd-pipe | go |
@@ -24,13 +24,13 @@
// making the defines very clear, these represent the host architecture - aka
// the arch on which this code is running
-#if defined(_X86_)
+#if defined(HOST_X86)
#define _HOST_X86_
-#elif defined(_AMD64_)
+#elif defined(HOST_AMD64)
#define _HOST_AMD64_
-#elif defined(_ARM_)
+#elif defined(HOS... | 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.
//*****************************************************************************
// debugshim.cpp
//
//
//**********... | 1 | 10,997 | It would be nice to replace these _HOST_* defines with HOST_*. | dotnet-diagnostics | cpp |
@@ -299,5 +299,9 @@ func doList(dir string, out io.Writer, arg, indent string) error {
// scrub removes dynamic content from recorded files.
func scrub(rootDir string, b []byte) []byte {
const scrubbedRootDir = "[ROOTDIR]"
- return bytes.ReplaceAll(b, []byte(rootDir), []byte(scrubbedRootDir))
+ rootDirWithSeparator... | 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,171 | The problem here was that the record file started with something like `/tmp/whatever/myproj` and was scrubbed to `[ROOTDIR]/myproj`, but the `/` is a `\` on Windows. | google-go-cloud | go |
@@ -33,10 +33,13 @@
#include <rtps/builtin/data/ProxyHashTables.hpp>
+#include "../../../fastdds/core/policy/ParameterList.hpp"
+
#include <mutex>
#include <chrono>
using namespace eprosima::fastrtps;
+using ParameterList = eprosima::fastdds::dds::ParameterList;
namespace eprosima {
namespace 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 | 18,468 | Don't use relative paths. src directory is already on the include search path | eProsima-Fast-DDS | cpp |
@@ -177,8 +177,12 @@ type BuildTarget struct {
// Tools that this rule will use, ie. other rules that it may use at build time which are not
// copied into its source directory.
Tools []BuildInput
+ // Like tools but available to the test_cmd instead
+ TestTools []BuildInput
// Named tools, similar to named sou... | 1 | package core
import (
"fmt"
"github.com/thought-machine/please/src/fs"
"os"
"path"
"path/filepath"
"sort"
"strings"
"sync"
"sync/atomic"
"time"
)
// OutDir is the root output directory for everything.
const OutDir string = "plz-out"
// TmpDir is the root of the temporary directory for building targets & ru... | 1 | 9,335 | if we're introducing this now can we make this private? | thought-machine-please | go |
@@ -103,6 +103,17 @@ namespace pwiz.Skyline.Model.Results
if (_totalSteps == 0)
return measured;
+ // Before we do anything else, make sure the raw files are present
+ foreach (var f in fileInfos)
+ {
+ if (!ScanProvider.FileExists(_documen... | 1 | /*
* Original author: Brian Pratt <bspratt .at. proteinms.net>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2015 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance... | 1 | 14,714 | Something is wrong with the indentation here. | ProteoWizard-pwiz | .cs |
@@ -18,12 +18,13 @@ package importtestsuites
import (
"context"
"fmt"
+ "github.com/GoogleCloudPlatform/compute-image-tools/gce_image_import_export_tests/compute"
"log"
"regexp"
+ "strings"
"sync"
"github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/common/utils/path"
- "github.com/GoogleCloudPl... | 1 | // Copyright 2019 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 8,936 | This should go to the external imports group below | GoogleCloudPlatform-compute-image-tools | go |
@@ -36,6 +36,7 @@ func NewInstaller(dc dynamic.Interface, config map[string]string, paths ...strin
}
for i, p := range paths {
+ log.Println("processing yaml folder", p)
paths[i] = ParseTemplates(p, config)
}
path := strings.Join(paths, ",") | 1 | /*
Copyright 2019 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 | 8,704 | Intended to be checked in? | google-knative-gcp | go |
@@ -307,7 +307,10 @@ public class MicroserviceRegisterTask extends AbstractRegisterTask {
// Currently nothing to do but print a warning
LOGGER.warn("There are schemas only existing in service center: {}, which means there are interfaces changed. "
- + "It's recommended to increment microservic... | 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,861 | I think this warning message is the same as above one. Anyway, it's fine to keep it. | apache-servicecomb-java-chassis | java |
@@ -46,7 +46,7 @@ namespace Nethermind.Logging
if (NLog.LogManager.Configuration?.AllTargets.SingleOrDefault(t => t.Name == "file") is FileTarget target)
{
- target.FileName = !Path.IsPathFullyQualified(fileName) ? Path.Combine("logs", fileName) : fileName;
+ ta... | 1 | /*
* Copyright (c) 2018 Demerzel Solutions Limited
* This file is part of the Nethermind library.
*
* The Nethermind library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of th... | 1 | 22,672 | This is done few times, replace with some well named method | NethermindEth-nethermind | .cs |
@@ -101,14 +101,14 @@ public class CodeGeneratorTool {
private static int generate(
String descriptorSet,
- String[] apiConfigs,
+ String[] configs,
String[] generatorConfigs,
String packageConfig,
String outputDirectory,
String[] enabledArtifacts) {
ToolOptions op... | 1 | /* Copyright 2016 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 may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 22,014 | `configs` isn't very descriptive, especially when there are other config-ish things like `generatorConfigs`. | googleapis-gapic-generator | java |
@@ -192,7 +192,12 @@ class TestGatlingExecutor(BZTestCase):
}]},
{"url": "/",
"think-time": 2,
- "follow-redirects": True}]
+ "follow-redirects": True},
+ ... | 1 | import logging
import os
import shutil
import time
from bzt import ToolError, TaurusConfigError
from bzt.modules.aggregator import DataPoint
from bzt.modules.gatling import GatlingExecutor, DataLogReader
from bzt.modules.provisioning import Local
from bzt.six import u
from bzt.utils import EXE_SUFFIX, get_full_path
fr... | 1 | 15,077 | In my point we have to check conversion with specific (non-ASCII) characters in unicode string. | Blazemeter-taurus | py |
@@ -1,6 +1,7 @@
tests = [
- ("python", "EmbedLib.py", {}),
+ # ("python", "EmbedLib.py", {}),
("python", "UnitTestEmbed.py", {}),
+ ("python", "UnitTestExcludedVolume.py", {}),
("python", "UnitTestPharmacophore.py", {}),
]
| 1 | tests = [
("python", "EmbedLib.py", {}),
("python", "UnitTestEmbed.py", {}),
("python", "UnitTestPharmacophore.py", {}),
]
longTests = []
if __name__ == '__main__':
import sys
from rdkit import TestRunner
failed, tests = TestRunner.RunScript('test_list.py', 0, 1)
sys.exit(len(failed))
| 1 | 16,062 | Given that file still contains doctests (and should still contain doctests), they should be run. Please turn this back on. | rdkit-rdkit | cpp |
@@ -70,6 +70,7 @@ public class SignUtils {
private static final String ATTR_CONTENTS = "contents";
private static final String ATTR_CERT_DNS_DOMAIN = "certDnsDomain";
private static final String ATTR_AUDIT_ENABLED = "auditEnabled";
+ private static final String ATTR_SELF_SERVE = "selfserve";
pr... | 1 | /*
* Copyright 2016 Yahoo 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 | 4,849 | we should keep the camel case format - selfServe | AthenZ-athenz | java |
@@ -17,14 +17,15 @@ package patch
import (
"time"
+ "github.com/GoogleCloudPlatform/compute-image-tools/osconfig_tests/compute"
"github.com/GoogleCloudPlatform/compute-image-tools/osconfig_tests/utils"
- "google.golang.org/api/compute/v1"
+ api "google.golang.org/api/compute/v1"
)
type patchTestSetup struct ... | 1 | // Copyright 2019 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 8,940 | consider the alias `compute` in case this ever references other apis. | GoogleCloudPlatform-compute-image-tools | go |
@@ -392,3 +392,7 @@ func (m *manager) GetFreezerState() (configs.FreezerState, error) {
}
return freezer.(*FreezerGroup).GetState(dir)
}
+
+func (m *manager) Exists() bool {
+ return cgroups.PathExists(m.paths["devices"])
+} | 1 | // +build linux
package fs
import (
"fmt"
"os"
"path/filepath"
"sync"
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/configs"
libcontainerUtils "github.com/opencontainers/runc/libcontainer/utils"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
)
var (
su... | 1 | 19,359 | It probably doesn't matter in practice, but we're not supposed to access a map without holding a lock. This is why I have suggested using `m.Path("devices")` earlier -- it takes a lock before accessing m.paths. Alternatively, you can leave this code as is but add taking a lock (same as `Path()`). | opencontainers-runc | go |
@@ -33,6 +33,8 @@ let baseModuleStore = Modules.createModuleStore( 'tagmanager', {
'internalAMPContainerID',
'useSnippet',
'ownerID',
+ 'gaAMPPropertyID',
+ 'gaPropertyID',
],
submitChanges,
validateCanSubmitChanges, | 1 | /**
* `modules/tagmanager` base data store
*
* 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/L... | 1 | 35,758 | Since `ga` is an acronym here, we should rename the generated actions and selectors to adhere to our naming conventions as it will no longer be capitalized properly. See below for how this is already done for the amp container ID settings. We should add `GA` to our list of checked acronyms as well in `packages/eslint-p... | google-site-kit-wp | js |
@@ -88,12 +88,11 @@ class TransloaditAssembly extends Emitter {
socket.on('assembly_upload_finished', (file) => {
this.emit('upload', file)
- this._fetchStatus({ diff: false })
+ this.status.uploads.push(file)
})
socket.on('assembly_uploading_finished', () => {
this.emit('exec... | 1 | const io = requireSocketIo
const Emitter = require('component-emitter')
const parseUrl = require('./parseUrl')
// Lazy load socket.io to avoid a console error
// in IE 10 when the Transloadit plugin is not used.
// (The console.error call comes from `buffer`. I
// think we actually don't use that part of socket.io
// ... | 1 | 12,203 | uploading_finished and upload_meta_data_extracted can fire very quickly after another, and there is not much difference in the Assembly status that's useful to us. I kept only the Assembly fetch after metadata is extracted, which ensures that we'll have all the correct `uploads.*.meta` properties on the client side. | transloadit-uppy | js |
@@ -53,7 +53,10 @@ func (m *manager) getControllers() error {
file := filepath.Join(m.dirPath, "cgroup.controllers")
data, err := ioutil.ReadFile(file)
- if err != nil && !m.rootless {
+ if err != nil {
+ if m.rootless && m.config.Path == "" {
+ return nil
+ }
return err
}
fields := strings.Fields(stri... | 1 | // +build linux
package fs2
import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/pkg/errors"
)
type manager struct {
config *configs.Cgroup
// dirPath is like "/sys/fs/cgroup/user.slice/us... | 1 | 19,372 | Does it make sense to keep trying to read the file every time the function is called, or should we maybe use `sync.Once()` here? | opencontainers-runc | go |
@@ -59,6 +59,7 @@ type Bee struct {
type Options struct {
DataDir string
+ DbCapacity uint64
Password string
APIAddr string
DebugAPIAddr string | 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 node
import (
"context"
"fmt"
"io"
"log"
"net"
"net/http"
"path/filepath"
"sync"
"sync/atomic"
"github.com/ethersphere/bee/pkg/addressboo... | 1 | 10,304 | `DbCapacity` -> `DBCapacity` | ethersphere-bee | go |
@@ -56,8 +56,10 @@ namespace Nethermind.Network.Test
[TestCase(0, "0xa3f5ab08", 1_561_651L, "Unsynced")]
[TestCase(1_561_650L, "0xa3f5ab08", 1_561_651L, "Last Constantinople block")]
[TestCase(1_561_651L, "0xc25efa5c", 4_460_644L, "First Istanbul block")]
- [TestCase(4_460_644L, "0x757... | 1 | // Copyright (c) 2021 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of ... | 1 | 25,403 | For Berlin I confirmed all the fork hashes with the Geth team. Would you do the same with Martin? He responded quickly the last time. | NethermindEth-nethermind | .cs |
@@ -63,6 +63,19 @@ func Wireguard() error {
return sh.RunV(cmdParts[0], cmdParts[1:]...)
}
+// SOCKS5 builds and starts SOCKS5 service with terms accepted
+func SOCKS5() error {
+ if err := sh.RunV("bin/build"); err != nil {
+ return err
+ }
+ cmd := "build/myst/myst service --agreed-terms-and-conditions socks5"
... | 1 | /*
* Copyright (C) 2019 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 15,535 | Does `sudo` required for `darwin` only? Don't we need it for `linux` too? | mysteriumnetwork-node | go |
@@ -11,11 +11,17 @@ import (
"text/tabwriter"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer"
+ "github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/cloudformation"
+ "github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/resourcegroups"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/session"
"github.com... | 1 | // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package describe
import (
"bytes"
"encoding/json"
"fmt"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/term/color"
"text/tabwriter"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer"
"github.com/aws... | 1 | 12,956 | Can you add description to this exported struct? | aws-copilot-cli | go |
@@ -68,13 +68,14 @@ export function renderComponent(component, opts, mountAll, isChild) {
state = component.state,
context = component.context,
previousProps = component.prevProps || props,
- previousState = component.prevState || state,
+ previousState = extend({}, component.prevState || state),
previous... | 1 | import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';
import options from '../options';
import { extend } from '../util';
import { enqueueRender } from '../render-queue';
import { getNodeProps } from './index';
import { diff, mounts, diffLevel, flushMounts, recollectNodeTree, remo... | 1 | 11,952 | Although this is needed for `getSnapshotBeforeUpdate` this also fixes a bug with `componentDidUpdate`. During rendering, the `state` variable is mutated. This has the consequence, that `previousState` would never hold the previous state, but the most current one. | preactjs-preact | js |
@@ -15,6 +15,7 @@ package ec2
import (
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
+ "github.com/aws/aws-sdk-go/service/elb/elbiface"
)
// Service holds a collection of interfaces. | 1 | // Copyright © 2018 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 ag... | 1 | 6,262 | Should this maybe directly start with ELBv2 aka NLBs or ALBs? | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -59,6 +59,11 @@ describe( 'Tag Manager module setup', () => {
request.respond( {
status: 200,
} );
+ } else if ( request.url().match( 'google-site-kit/v1/core/site/data/notifications' ) ) {
+ request.respond( {
+ status: 200,
+ body: JSON.stringify( [] ),
+ } );
} else if ( reques... | 1 | /**
* TagManager module setup 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/licenses/LICENSE... | 1 | 36,079 | This was the request that was often causing the test to fail as an unexpected API failure (or at least one of them ). | google-site-kit-wp | js |
@@ -0,0 +1,13 @@
+class NetworkError extends Error {
+ constructor (error = null, xhr = null) {
+ super(error.message)
+
+ this.isNetworkError = true
+ this.originalRequest = xhr
+
+ const message = error.message + '. This looks like a network error, the endpoint might be blocked by an ISP or a firewall'
+... | 1 | 1 | 12,845 | I understand why `xhr = null`, but I think adding `error = null` implies that this method should work even if we don't pass the `error` argument. Should we remove it? | transloadit-uppy | js | |
@@ -73,7 +73,8 @@ public abstract class GapicMethodConfig extends MethodConfig {
Method method,
ProtoMethodModel methodModel,
RetryCodesConfig retryCodesConfig,
- ImmutableSet<String> retryParamsConfigNames) {
+ ImmutableSet<String> retryParamsConfigNames,
+ GrpcGapicRetryMapping ret... | 1 | /* Copyright 2016 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | 1 | 29,773 | It is not your code, and it is used like this all over the place in gapic generator, but the general rule is we should prefer using the least specific class/interface in the hierarchy, which still satisfies our requirements. Here, unless we really need anything specific from `ImmutableSet`, please use `Set` (less speci... | googleapis-gapic-generator | java |
@@ -162,9 +162,18 @@ struct flb_elasticsearch *flb_es_conf_create(struct flb_output_instance *ins,
}
ctx->aws_region = (char *) tmp;
+ tmp = flb_output_get_property("aws_sts_endpoint", ins);
+ if (!tmp) {
+ flb_error("[out_es] aws_sts_endpoint not set");
... | 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* Fluent Bit
* ==========
* Copyright (C) 2019-2020 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in co... | 1 | 12,703 | Sorry... I just realized... since we use sts_endpoint in the EKS Provider, this error message is no longer true. Role_arn is not required. | fluent-fluent-bit | c |
@@ -206,6 +206,18 @@ public interface Tree<T> extends Traversable<T>, Serializable {
return io.vavr.collection.Collections.fill(n, s, empty(), Tree::of);
}
+ /**
+ * Returns a Tree containing {@code n} times the given {@code element}
+ *
+ * @param <T> Component type of the Tree
+ ... | 1 | /* __ __ __ __ __ ___
* \ \ / / \ \ / / __/
* \ \/ / /\ \ \/ / /
* \____/__/ \__\____/__/
*
* Copyright 2014-2018 Vavr, http://vavr.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ... | 1 | 12,933 | (...), where each element ~are~ **is the** given {\@code element}. | vavr-io-vavr | java |
@@ -73,6 +73,7 @@ abstract class BaseFile<F>
private long[] splitOffsets = null;
private int[] equalityIds = null;
private byte[] keyMetadata = null;
+ private Integer sortOrderId;
// cached schema
private transient Schema avroSchema = null; | 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 | 30,853 | I think this can be an int because we have a default that is always valid, `0`. | apache-iceberg | java |
@@ -141,6 +141,17 @@ describe Section do
end
end
+ describe '.upcoming?' do
+ it 'knows if it has happened yet' do
+ next_week = Section.new(starts_on: 1.week.from_now)
+ last_week = Section.new(starts_on: 1.week.ago)
+ today = Section.new(starts_on: Date.today)
+ expect(today).to be_u... | 1 | require 'spec_helper'
describe Section do
# Associations
it { should belong_to(:workshop) }
it { should have_many(:paid_purchases) }
it { should have_many(:purchases) }
it { should have_many(:section_teachers) }
it { should have_many(:unpaid_purchases) }
it { should have_many(:teachers).through(:section_... | 1 | 7,006 | I think you can use `build_stubbed` here for the same results but with more speed. | thoughtbot-upcase | rb |
@@ -491,6 +491,11 @@ class JMX(object):
if hold or (rampup and not iterations):
scheduler = True
+ if isinstance(rampup, numeric_types) and isinstance(hold, numeric_types):
+ duration = hold + rampup
+ else:
+ duration = 0
+
trg = etree.Element("Threa... | 1 | """
Module holds base stuff regarding JMX format
Copyright 2015 BlazeMeter 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 ap... | 1 | 14,517 | what if one of them is property and one is not? | Blazemeter-taurus | py |
@@ -277,6 +277,8 @@ module.exports = class Dashboard extends Plugin {
name: file.name,
type: file.type,
data: blob
+ }).catch(() => {
+ // Ignore
})
})
} | 1 | const Plugin = require('../../core/Plugin')
const Translator = require('../../core/Translator')
const dragDrop = require('drag-drop')
const DashboardUI = require('./Dashboard')
const StatusBar = require('../StatusBar')
const Informer = require('../Informer')
const ThumbnailGenerator = require('../ThumbnailGenerator')
c... | 1 | 10,530 | > UI plugins swallow rejection errors so they don't end up in the console with no way to fix But it will still catch upstream in `addFile` and restrictions to show the informer?.. | transloadit-uppy | js |
@@ -378,11 +378,12 @@ const executeOperation = (topology, operation, args, options) => {
// The driver sessions spec mandates that we implicitly create sessions for operations
// that are not explicitly provided with a session.
- let session, opOptions;
+ let session, opOptions, owner;
if (!options.skipSes... | 1 | 'use strict';
var MongoError = require('mongodb-core').MongoError,
ReadPreference = require('mongodb-core').ReadPreference;
var shallowClone = function(obj) {
var copy = {};
for (var name in obj) copy[name] = obj[name];
return copy;
};
// Figure out the read preference
var translateReadPreference = function(... | 1 | 14,201 | can't this just be left undefined/null? | mongodb-node-mongodb-native | js |
@@ -64,8 +64,8 @@ module EsSpecHelper
def es_execute_with_retries(retries = 3, &block)
begin
retries -= 1
- response = block.call
- rescue SearchUnavailable => _error
+ block.call
+ rescue SearchUnavailable => error
if retries > 0
retry
else | 1 | require 'elasticsearch/extensions/test/cluster'
module EsSpecHelper
def es_mock_bad_gateway
allow_any_instance_of(Elasticsearch::Transport::Client)
.to receive(:perform_request)
.and_raise(Elasticsearch::Transport::Transport::Errors::BadGateway, "oops, can't find ES service")
end
def es_mock_con... | 1 | 17,014 | changed bc we are using the `error` var below | 18F-C2 | rb |
@@ -172,13 +172,7 @@ class TestKnowledgeRestfulAPI(APITestCase):
user_id=1,
)
- answer = get_answer.json
-
- expected_result = dict(
- status=404,
- )
-
- assert answer['status'] == expected_result['status']
+ assert get_answer.status_code == 404
... | 1 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014, 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any... | 1 | 16,526 | Is there a reason why this is change is in the same commit? | inveniosoftware-invenio | py |
@@ -77,7 +77,7 @@ func (r *repo) GetClonedBranch() string {
// Copy does copying the repository to the given destination.
func (r *repo) Copy(dest string) (Repo, error) {
- cmd := exec.Command("cp", "-rf", r.dir, dest)
+ cmd := copyCommand(r.dir, dest)
out, err := cmd.CombinedOutput()
if err != nil {
return ... | 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 | 12,565 | @nghialv btw, perhaps was this method originally created for copying the repo root to the given `dest` as a subdirectory? | pipe-cd-pipe | go |
@@ -205,7 +205,7 @@ namespace pwiz.Skyline.Model.Lib
// ReSharper disable LocalizableElement
private bool LoadLibraryFromDatabase(ILoadMonitor loader)
{
- var status = new ProgressStatus(
+ IProgressStatus status = new ProgressStatus(
string.Format(Resou... | 1 | /*
* Original author: Nicholas Shulman <nicksh .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2017 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in comp... | 1 | 13,282 | Just curious - why not var? | ProteoWizard-pwiz | .cs |
@@ -26,6 +26,9 @@ import {
clearWebStorage,
} from './util/standalone';
+// Load image for the parent menu item.
+import '../images/logo-g_white_small.png';
+
if ( 'toplevel_page_googlesitekit-dashboard' !== global.pagenow && 'site-kit_page_googlesitekit-splash' !== global.pagenow && 'admin_page_googlesitekit-spl... | 1 | /**
* Admin utilities.
*
* This JavaScript loads on every admin page. Reserved for later.
*
* Site Kit by Google, Copyright 2019 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 Licen... | 1 | 32,886 | Why would we import this here and not use it? Is there a side-effect of this import? | google-site-kit-wp | js |
@@ -281,8 +281,10 @@ module RSpec::Core
# @attr pending_examples [Array<RSpec::Core::Example>] the pending examples
# @attr load_time [Float] the number of seconds taken to boot RSpec
# and load the spec files
+ # @attr errors [Integer] the number of errors that have occurred p... | 1 | RSpec::Support.require_rspec_core "formatters/console_codes"
RSpec::Support.require_rspec_core "formatters/exception_presenter"
RSpec::Support.require_rspec_core "formatters/helpers"
RSpec::Support.require_rspec_core "shell_escape"
module RSpec::Core
# Notifications are value objects passed to formatters to provide ... | 1 | 16,547 | The name `errors` is a bit mis-leading -- usually I'd expect a field called `errors` to be an array of errors but here it's just a count. And it's not a count of _all_ errors -- it's a count only of some errors. | rspec-rspec-core | rb |
@@ -24,7 +24,6 @@ class AppKernel extends Kernel
new JMS\TranslationBundle\JMSTranslationBundle(),
new Presta\SitemapBundle\PrestaSitemapBundle(),
new Prezent\Doctrine\TranslatableBundle\PrezentDoctrineTranslatableBundle(),
- new RaulFraile\Bundle\LadybugBundle\RaulFrai... | 1 | <?php
use Shopsys\Environment;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
/**
* @{inheritdoc}
*/
public function registerBundles()
{
$bundles = [
new Bmatzner\JQueryBundle\BmatznerJQueryBundle... | 1 | 8,763 | there was no usage of the bundle in the framework? everything works exactly the same after the removal? | shopsys-shopsys | php |
@@ -327,6 +327,14 @@ var _ = infrastructure.DatastoreDescribe("_BPF-SAFE_ IPIP topology before adding
BeforeEach(func() {
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
defer cancel()
+ if bpfEnabled {
+ infra.RemoveNodeAddresses(felixes[0])
+ } else {
+ for _, f := range ... | 1 | // Copyright (c) 2020-2021 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 18,804 | Why this difference? | projectcalico-felix | go |
@@ -6533,6 +6533,8 @@ odbc_SQLSrvr_ExtractLob_sme_(
if (retcode == SQL_ERROR)
{
ERROR_DESC_def *p_buffer = QryLobExtractSrvrStmt->sqlError.errorList._buffer;
+ char errNumStr[128];
+ sprintf(errNumStr, "%d", p_buffer->sqlcode);
strncpy(Reques... | 1 | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. ... | 1 | 20,635 | Surround code issue. RequestError may not be null terminated when the RequestError size is less than the length of the string in p_buffer->errorText. Also, this can cause core dump due to segment violation if length of errorText is less than the size of RequestBuffer. | apache-trafodion | cpp |
@@ -43,6 +43,11 @@ const (
AccountTrieRootKey = "accountTrieRoot"
)
+var (
+ // AccountMaxVersionPrefix is for account history
+ AccountMaxVersionPrefix = []byte("vp.")
+)
+
type (
// Factory defines an interface for managing states
Factory interface { | 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 | 19,199 | `AccountMaxVersionPrefix` is a global variable (from `gochecknoglobals`) | iotexproject-iotex-core | go |
@@ -32,7 +32,6 @@ import (
apicommon "go.temporal.io/api/common/v1"
"go.temporal.io/api/enums/v1"
- apinamespace "go.temporal.io/api/namespace/v1"
apireplication "go.temporal.io/api/replication/v1"
"go.temporal.io/api/serviceerror"
"go.temporal.io/api/workflowservice/v1" | 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 | 13,619 | I see it is not part of this PR but I somehow overlooked it before. Can you use same import aliases as we use everywhere in the project: `apicommon` -> `commonpb` `apireplication` -> `replicationpb` `"go.temporal.io/api/enums/v1"` -> `enumspb "go.temporal.io/api/enums/v1"` | temporalio-temporal | go |
@@ -235,7 +235,7 @@ class Storage(StorageBase, MigratorMixin):
error_msg = (
"Cannot initialize empty resource timestamp " "when running in readonly."
)
- raise exceptions.BackendError(message=error_msg)
+ raise exc... | 1 | import logging
import os
import warnings
from collections import defaultdict
from kinto.core.decorators import deprecate_kwargs
from kinto.core.storage import (
DEFAULT_DELETED_FIELD,
DEFAULT_ID_FIELD,
DEFAULT_MODIFIED_FIELD,
MISSING,
StorageBase,
exceptions,
)
from kinto.core.storage.postgresq... | 1 | 12,709 | Nit: Maybe merge these into one string while you are here? | Kinto-kinto | py |
@@ -0,0 +1,15 @@
+package runtime
+
+// noret is a placeholder that can be used to indicate that an async function is not going to directly return here
+func noret() {}
+
+func getParentHandle() *task {
+ panic("NOPE")
+}
+
+func fakeCoroutine(dst **task) {
+ *dst = getCoroutine()
+ for {
+ yield()
+ }
+} | 1 | 1 | 7,520 | Why make a new file for this? I think keeping everything related to the scheduler in a single file increases readability. Especially when there is no API-boundary in between. Functions like `getCoroutine` and `yield` also live in the normal scheduler files so it doesn't seem consistent. | tinygo-org-tinygo | go | |
@@ -132,9 +132,10 @@ func (c *endpointManagerCallbacks) InvokeRemoveWorkload(old *proto.WorkloadEndpo
// that fail are left in the pending state so they can be retried later.
type endpointManager struct {
// Config.
- ipVersion uint8
- wlIfacesRegexp *regexp.Regexp
- kubeIPVSSupportEnabled bool... | 1 | // Copyright (c) 2016-2021 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 19,088 | tiniest of nits: why would you abbreviate "interface" but not "configuration" ? | projectcalico-felix | c |
@@ -19,9 +19,6 @@ namespace Samples.HttpMessageHandler
private static string Url;
-#if NETFRAMEWORK
- [LoaderOptimization(LoaderOptimization.MultiDomainHost)]
-#endif
public static void Main(string[] args)
{
bool tracingDisabled = args.Any(arg => arg.Equals("TracingDis... | 1 | using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Datadog.Core.Tools;
namespace Samples.HttpMessageHandler
{
public static class Program
{
private const string RequestContent = "PING"... | 1 | 17,074 | Removing since all of the domain-neutral testing will be done in the new `Samples.MultiDomainHost.Runner` app | DataDog-dd-trace-dotnet | .cs |
@@ -50,6 +50,8 @@ def getpcmd(pid):
spid, scmd = line.strip().split(' ', 1)
if int(spid) == int(pid):
return scmd
+ # Fallback instead of None, for e.g. Cygwin where -o is an "unknown option" for the ps command:
+ return '[PROCESS_WITH_PID={}]'.format(pid)
... | 1 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 1 | 14,328 | is there a better way to detect this rather than just always assuming it's cygwin if everything else fails? i think you can check `if sys.platform == 'cygwin'` | spotify-luigi | py |
@@ -410,6 +410,10 @@ def _build_internal(package, path, dry_run, env):
try:
_clone_git_repo(url, branch, tmpdir)
build_from_path(package, tmpdir, dry_run=dry_run, env=env)
+ except yaml.scanner.ScannerError as ex:
+ message_parts = str(ex).split('... | 1 | # -*- coding: utf-8 -*-
"""
Command line parsing and command dispatch
"""
from __future__ import print_function
from builtins import input # pylint:disable=W0622
from datetime import datetime
import gzip
import hashlib
import json
import os
import re
from shutil import copyfileobj, move, rmtree
import stat
import... | 1 | 15,378 | duplicate code - can you move into build_from_path() ? | quiltdata-quilt | py |
@@ -9,3 +9,6 @@ def toto(): #pylint: disable=C0102,R1711
# +1: [missing-function-docstring]
def test_enabled_by_id_msg(): #pylint: enable=C0111
pass
+
+def baz(): #pylint: disable=blacklisted-name
+ return 1 | 1 | # -*- encoding=utf-8 -*-
#pylint: disable=C0111
def foo(): #pylint: disable=C0102
return 1
def toto(): #pylint: disable=C0102,R1711
return
# +1: [missing-function-docstring]
def test_enabled_by_id_msg(): #pylint: enable=C0111
pass
| 1 | 12,634 | very important test as we want to make sure the old name still work. | PyCQA-pylint | py |
@@ -1191,5 +1191,5 @@ This code is executed if a gain focus event is received by this object.
Fetches the number of descendants currently selected.
For performance, this method will only count up to the given maxCount number, and if there is one more above that, then sys.maxint is returned stating that many items... | 1 | # -*- coding: UTF-8 -*-
#NVDAObjects/__init__.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2017 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Patrick Zajda, Babbage B.V., Davy Kager
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
"""Modul... | 1 | 23,765 | I think returning 1 should some how be moved in to specific support for LibreOffice.. | nvaccess-nvda | py |
@@ -85,6 +85,8 @@ byte *app_sysenter_instr_addr = NULL;
static bool sysenter_hook_failed = false;
#endif
+bool d_r_avx512_code_in_use = false;
+
/* static functions forward references */
static byte *
emit_ibl_routines(dcontext_t *dcontext, generated_code_t *code, byte *pc, | 1 | /* **********************************************************
* Copyright (c) 2010-2019 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 | 17,650 | Should be inside `ifdef X86` I would think (or moved to ... I guess arch/x86/emit_utils.c) | DynamoRIO-dynamorio | c |
@@ -10,12 +10,14 @@ import (
// LocationCache cache the map of node, pod, configmap, secret
type LocationCache struct {
- //edgeNodes is a list of valid edge nodes
- edgeNodes []string
+ // EdgeNodes is a list of valid edge nodes
+ EdgeNodes []string
// configMapNode is a map, key is namespace/configMapName, valu... | 1 | package manager
import (
"fmt"
"sync"
"github.com/kubeedge/beehive/pkg/common/log"
"k8s.io/api/core/v1"
)
// LocationCache cache the map of node, pod, configmap, secret
type LocationCache struct {
//edgeNodes is a list of valid edge nodes
edgeNodes []string
// configMapNode is a map, key is namespace/configMa... | 1 | 11,453 | Using sync.Map(key: nodename; value: state) instead of this "EdgeNodes" string slice here would be much better. Reasons: 1. Using sync.Map makes the time complexity of function UpdateEdgeNode and IsEdgeNode O(1), while using string slice with for loop makes it O(n). 2. Later we could be checking node state whether it's... | kubeedge-kubeedge | go |
@@ -20,6 +20,10 @@ namespace AutoRest.Go
public const string ReadOnlyConstraint = "ReadOnly";
+ private static readonly Regex IsApiVersionPattern = new Regex(@"^api[^a-zA-Z0-9_]?version", RegexOptions.IgnoreCase);
+
+ private static readonly Regex UnwrapAnchorTagsPattern = new Regex("([^<>]*)<a\\s*.*\\sh... | 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using AutoRest.Core.Model;
using AutoRest.Core.Utilities;
using AutoRest.Core.Utilities.Collections;
using AutoRest.Extensions;
using AutoRest.Go.Mode... | 1 | 24,268 | nit, does it make sense to get this variables outside the func where they are used? | Azure-autorest | java |
@@ -3,7 +3,7 @@
# Purpose:
# sns-ruby-example-show-subscriptions.rb demonstrates how to list subscriptions to the Amazon Simple Notification Services (SNS) topic using
-# the AWS SDK for JavaScript (v3).
+# the AWS SDK for Ruby.
# Inputs:
# - REGION | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
# Purpose:
# sns-ruby-example-show-subscriptions.rb demonstrates how to list subscriptions to the Amazon Simple Notification Services (SNS) topic using
# the AWS SDK for JavaScript (v3).
# Inputs:
# - RE... | 1 | 20,568 | to **an** Amazon... Simple Notification **Service** (singular) | awsdocs-aws-doc-sdk-examples | rb |
@@ -297,10 +297,13 @@ func TestOpenTopicFromURL(t *testing.T) {
ctx := context.Background()
for _, test := range tests {
- _, err := pubsub.OpenTopic(ctx, test.URL)
+ top, err := pubsub.OpenTopic(ctx, test.URL)
if (err != nil) != test.WantErr {
t.Errorf("%s: got error %v, want error %v", test.URL, err, 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 | 16,640 | Nit: is "top" a short name we use frequently? Seems a bit mysterious, and saves only 2 chars. | google-go-cloud | go |
@@ -52,7 +52,9 @@ import (
// R represents row type in executions table, valid values are:
// R = {Shard = 1, Execution = 2, Transfer = 3, Timer = 4, Replication = 5}
const (
- cassandraProtoVersion = 4
+ // ProtoVersion is the protocol version used to communicate with Cassandra cluster
+ ProtoVersion = 4
+
defaul... | 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,084 | This name is really confusing. May be just remove this const completely and hardcode `4` where it is used? | temporalio-temporal | go |
@@ -558,12 +558,6 @@ module RSpec::Core
context "with single pattern" do
before { config.pattern = "**/*_foo.rb" }
- it "loads files following pattern" do
- file = File.expand_path(File.dirname(__FILE__) + "/resources/a_foo.rb")
- assign_files_or_directories_to_run file
- ... | 1 | require 'spec_helper'
require 'tmpdir'
require 'rspec/support/spec/in_sub_process'
module RSpec::Core
RSpec.describe Configuration do
include RSpec::Support::InSubProcess
let(:config) { Configuration.new }
let(:exclusion_filter) { config.exclusion_filter.rules }
let(:inclusion_filter) { config.incl... | 1 | 13,613 | Why did you remove this spec? | rspec-rspec-core | rb |
@@ -284,7 +284,6 @@ function getDefaultService() {
Options.prototype.CAPABILITY_KEY = 'goog:chromeOptions'
Options.prototype.BROWSER_NAME_VALUE = Browser.CHROME
Driver.getDefaultService = getDefaultService
-Driver.prototype.VENDOR_COMMAND_PREFIX = 'goog'
// PUBLIC API
exports.Driver = Driver | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 18,744 | The vendor prefix is still being used on Chromium based browsers like Edge Chromium and Chrome. Did you mean to remove this? | SeleniumHQ-selenium | js |
@@ -33,6 +33,12 @@ class Config(object):
datetime.datetime.now().strftime('%Y%m%d%H%M%S'))
self.identifier = None
self.force_no_cloudshell = bool(kwargs.get('no_cloudshell'))
+ self.project_id = kwargs.get('project_id') or None
+ if kwargs.get('composite_ro... | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 1 | 33,644 | .get will return None if there is no project_id key, so the or None part is redundant | forseti-security-forseti-security | py |
@@ -22,11 +22,16 @@ namespace OpenTelemetry.Metrics
{
public struct MetricPoint
{
+ internal DateTimeOffset StartTime;
+ internal DateTimeOffset EndTime;
+
private readonly AggregationType aggType;
private readonly HistogramBuckets histogramBuckets;
private long longV... | 1 | // <copyright file="MetricPoint.cs" company="OpenTelemetry Authors">
// 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... | 1 | 22,729 | Do they need to be `internal`? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -176,7 +176,7 @@ func (b *PinnedMap) Iter(f MapIter) error {
args := cmd[1:]
printCommand(prog, args...)
- output, err := exec.Command(prog, args...).CombinedOutput()
+ output, err := exec.Command(prog, args...).Output()
if err != nil {
return errors.Errorf("failed to dump in map (%s): %s\n%s", b.versione... | 1 | // Copyright (c) 2019-2020 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 17,841 | Hit a flake here where I think there may have been some output to stderr that got mixed in with the output from Stdout. Hence switching to `Output()`, which does also capture stderr as `err.Stderr` | projectcalico-felix | go |
@@ -175,8 +175,8 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DRIVER_FUNCTION_MAP{
{"cuMemcpy", {"hipMemcpy_", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}},
// no analogue
// NOTE: Not equal to cudaMemcpy2D due to... | 1 | /*
Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved.
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 us... | 1 | 7,610 | Is there any official CUDA API called cuMemcpy2D_v2? | ROCm-Developer-Tools-HIP | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.