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 |
|---|---|---|---|---|---|---|---|
@@ -649,6 +649,19 @@ func (engine *DockerTaskEngine) deleteTask(task *apitask.Task) {
}
}
+ for _, container := range task.Containers {
+ for _, resource := range container.GetResources() {
+ err := resource.Cleanup()
+ if err != nil {
+ seelog.Warnf("Task engine [%s]/[%s]: unable to cleanup resource %s:... | 1 | // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file acco... | 1 | 26,660 | Hmm should we clean up container resources before task resources here? or the order does not really matter here? | aws-amazon-ecs-agent | go |
@@ -44,7 +44,6 @@ def temporary_download_dir(quteproc, tmpdir):
unwritable.ensure(dir=True)
unwritable.chmod(0)
-
@bdd.given("I clean old downloads")
def clean_old_downloads(quteproc):
quteproc.send_cmd(':download-cancel --all') | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 17,117 | Please undo this :wink: | qutebrowser-qutebrowser | py |
@@ -25,6 +25,12 @@ class ApiClient < ActiveRecord::Base
include DeviseInvitable::Inviter
include ValidationMessages
+ # ================
+ # = Associations =
+ # ================
+
+ has_many :plans
+
# If the Client_id or client_secret are nil generate them
before_validation :generate_credentials,
... | 1 | # frozen_string_literal: true
# == Schema Information
#
# Table name: api_clients
#
# id :integer not null, primary key
# name :string, not null
# homepage :string
# contact_name :string
# contact_email :string, not null
# client_id :string, ... | 1 | 19,018 | thanks for adding this missing association | DMPRoadmap-roadmap | rb |
@@ -11,6 +11,11 @@ namespace Microsoft.AspNet.Server.Kestrel.Https
public static class HttpsApplicationBuilderExtensions
{
public static IApplicationBuilder UseKestrelHttps(this IApplicationBuilder app, X509Certificate2 cert)
+ {
+ return app.UseKestrelHttps(new HttpsConnectionFilte... | 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.Security.Cryptography.X509Certificates;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http.Features;
using Microsoft.AspNet.Serve... | 1 | 6,788 | Should I remove this in favor of the HttpsConnectionFilterOptions overload? | aspnet-KestrelHttpServer | .cs |
@@ -109,6 +109,15 @@ class DbalStatusQuery implements StatusQueryInterface
return array_values($result);
}
+ public function getMaxIndex(): ?int
+ {
+ return $this->connection->createQueryBuilder()
+ ->select('max(index)')
+ ->from(self::STATUS_TABLE)
+ ->ex... | 1 | <?php
/**
* Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved.
* See LICENSE.txt for license details.
*/
declare(strict_types=1);
namespace Ergonode\Workflow\Infrastructure\Persistence\Query;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Query\QueryBuilder;
use Ergonode\Core\Domain\ValueObject\Lan... | 1 | 9,699 | This shode be nullable, there alway sholud be at least one status in system , if not exist that mean data problme | ergonode-backend | php |
@@ -32,6 +32,10 @@ class Auth extends Controller
public function __construct()
{
parent::__construct();
+
+ // Add JS File to unistall SW to avoid Cookie Cache Issues when Signin, see github issue: #3707
+ $this->addJs('../../../modules/backend/assets/js/auth/unistall-sw.js');
+
$this-... | 1 | <?php namespace Backend\Controllers;
use Mail;
use Flash;
use Backend;
use Validator;
use BackendAuth;
use Backend\Models\AccessLog;
use Backend\Classes\Controller;
use System\Classes\UpdateManager;
use ApplicationException;
use ValidationException;
use Exception;
/**
* Authentication controller
*
* @package octob... | 1 | 13,849 | Spaces not tabs | octobercms-october | php |
@@ -160,6 +160,15 @@ class FsDriverNode extends FsDriverBase {
}
}
+ async readDir(path) {
+ try {
+ // return fs.readdirSync(path, {withFileTypes: true}).map(e => e.name); // From Node v10
+ return fs.readdirSync(path); // For Node v8
+ } catch (error) {
+ throw this.fsErrorToJsError_(error, path);
+ }... | 1 | const fs = require('fs-extra');
const { time } = require('lib/time-utils.js');
const FsDriverBase = require('lib/fs-driver-base');
class FsDriverNode extends FsDriverBase {
fsErrorToJsError_(error, path = null) {
let msg = error.toString();
if (path !== null) msg += `. Path: ${path}`;
let output = new Error(msg... | 1 | 10,875 | To get the files inside a directory, please use `readDirStats()`. | laurent22-joplin | js |
@@ -34,8 +34,11 @@ const LocalConfigFileName string = ".plzconfig.local"
// for a particular machine (eg. build machine with different caching behaviour).
const MachineConfigFileName = "/etc/plzconfig"
-const TestContainerDocker = "docker"
-const TestContainerNone = "none"
+const (
+ ContainerImplementationNone =... | 1 | // Utilities for reading the Please config files.
package core
import (
"crypto/sha1"
"encoding/gob"
"fmt"
"os"
"path"
"reflect"
"runtime"
"strconv"
"strings"
"time"
"github.com/jessevdk/go-flags"
"gopkg.in/gcfg.v1"
"cli"
)
// File name for the typical repo config - this is normally checked in
const C... | 1 | 8,011 | might be worth to call these `Isolation` instead of containers here and when presented to the user -- docker/rkt , in addition to cgroups and namespaces, also provide image discovery and filesystem preparation; there's also the security context and probably 1-2 other small things | thought-machine-please | go |
@@ -0,0 +1,5 @@
+// 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 batchstore_test | 1 | 1 | 13,200 | File is empty, consider removing? | ethersphere-bee | go | |
@@ -237,6 +237,16 @@ def _refresh_credentials():
return result
+def logged_in():
+ """
+ Return registry URL if Quilt client is authenticated. Otherwise
+ return `None`.
+ """
+ url = get_registry_url()
+ if url in _load_auth():
+ return url
+
+
class QuiltProvider(CredentialProvider)... | 1 | """
Helper functions for connecting to the Quilt Registry.
"""
import json
import os
import platform
import stat
import subprocess
import sys
import time
from botocore.credentials import CredentialProvider, CredentialResolver, RefreshableCredentials
import pkg_resources
import requests
from .util import BASE_PATH, g... | 1 | 18,470 | This seems to return the registry_url. The more meaningful URL is the catalog URL, which is the URL the user specifies in `quilt3.login`. The username might also be as useful here if not more useful. | quiltdata-quilt | py |
@@ -23,8 +23,9 @@ type Config struct {
L1CrossDomainMessengerAddress common.Address
L1FeeWalletAddress common.Address
AddressManagerOwnerAddress common.Address
- L1ETHGatewayAddress common.Address
GasPriceOracleOwnerAddress common.Address
+ L1StandardBridgeAddress common.Address... | 1 | package rollup
import (
"math/big"
"time"
"github.com/ethereum/go-ethereum/common"
)
type Config struct {
// Maximum calldata size for a Queue Origin Sequencer Tx
MaxCallDataSize int
// Verifier mode
IsVerifier bool
// Enable the sync service
Eth1SyncServiceEnable bool
// Ensure that the correct layer 1 ch... | 1 | 17,304 | Was the addition of `GasPriceOracleAddress` here erroneous? | ethereum-optimism-optimism | go |
@@ -121,6 +121,11 @@ module Beaker
:project => 'Beaker',
:department => 'unknown',
:created_by => ENV['USER'] || ENV['USERNAME'] || 'unknown',
+ :host_tags => {
+ :project => 'Beaker',
+... | 1 | module Beaker
module Options
#A class representing the environment variables and preset argument values to be incorporated
#into the Beaker options Object.
class Presets
# This is a constant that describes the variables we want to collect
# from the environment. The keys correspond to the key... | 1 | 11,386 | I believe that you are going to have to do some work here to get the env var support for these values to still work correctly, otherwise they will get stored as :department instead of host_tags[:department]. | voxpupuli-beaker | rb |
@@ -149,8 +149,12 @@ public class SessionStore implements
if (BuildConfig.DEBUG) {
mStoreSubscription = ComponentsAdapter.get().getStore().observeManually(browserState -> {
Log.d(LOGTAG, "Session status BEGIN");
- browserState.getTabs().forEach(tabSessionState -> Lo... | 1 | package org.mozilla.vrbrowser.browser.engine;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Bundle;
import android.util.Log;
import android.util.Pair;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.mozilla.geckoview.GeckoRuntime;
impo... | 1 | 9,523 | How was this causing the exception? | MozillaReality-FirefoxReality | java |
@@ -57,6 +57,12 @@ define(['connectionManager', 'userSettings', 'events'], function (connectionMana
currentDateTimeCulture = currentCulture;
}
ensureTranslations(currentCulture);
+ // FIXME: See GH #1027 and #913. This should be configurable and not strictly based on locale.
+ ... | 1 | define(['connectionManager', 'userSettings', 'events'], function (connectionManager, userSettings, events) {
'use strict';
var fallbackCulture = 'en-us';
var allTranslations = {};
var currentCulture;
var currentDateTimeCulture;
function getCurrentLocale() {
return currentCulture;
}... | 1 | 14,395 | I still have issues with it loading Simplified Chinese by default over Japanese, since they also share characters and we're not sure if characters are different or not. As-is, this fixes Traditional Chinese and Simplified Chinese, but we're not sure if it'd still screw up Japanese text or not. I maintain that, in my op... | jellyfin-jellyfin-web | js |
@@ -96,7 +96,7 @@ class MultiTermIntervalsSource extends IntervalsSource {
@Override
public void visit(String field, QueryVisitor visitor) {
-
+ visitor.visitLeaf(new IntervalQuery(field, this));
}
@Override | 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,233 | Isn't it better to stub AtomatonQuery and yield it here. IIRC it resolves simplest MTQ highlighting cases as nobrainer. | apache-lucene-solr | java |
@@ -9,11 +9,11 @@ class CancellationAlternative
end
def discount_percentage_vs_current_plan_annualized
- ((1 - (@discounted_plan.price / (@current_plan.price * 12.0))) * 100).
+ ((1 - (@discounted_plan.price_in_dollars / (@current_plan.price_in_dollars * 12.0))) * 100).
round(0)
end
def dis... | 1 | class CancellationAlternative
def initialize(current_plan:, discounted_plan:)
@current_plan = current_plan
@discounted_plan = discounted_plan
end
def can_switch_to_discounted_plan?
@current_plan != @discounted_plan
end
def discount_percentage_vs_current_plan_annualized
((1 - (@discounted_pla... | 1 | 14,449 | Line is too long. [96/80] | thoughtbot-upcase | rb |
@@ -167,6 +167,9 @@ func (s *Solver) buildDefaultPod(ch *cmacme.Challenge) *corev1.Pod {
OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(ch, challengeGvk)},
},
Spec: corev1.PodSpec{
+ NodeSelector: map[string]string{
+ "kubernetes.io/os": "linux",
+ },
RestartPolicy: corev1.Restar... | 1 | /*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing... | 1 | 24,791 | My only concern with changing the node selector here is that someone else _could_ have built their own images for other platforms and set them to be used using the flag override on the controller, which in turn this change would break. Perhaps not changing the selector for acmesolver pods makes most sense, and then wor... | jetstack-cert-manager | go |
@@ -24,7 +24,7 @@ import (
type Controller string
type Object struct {
- Object v1alpha1.InnerObject
+ Object v1alpha1.InnerObjectWithSelector
Name string
}
| 1 | // Copyright 2021 Chaos Mesh Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | 1 | 25,176 | Why do we need interface `InnerObjectWithSelector`, I searched the usage with this field, it seems nowhere use `GetSelectorSpecs()` methods provided by `InnerObjectWithSelector` | chaos-mesh-chaos-mesh | go |
@@ -20,8 +20,12 @@ var (
once sync.Once
)
-// GetContext gets global context instance
-func GetContext(contextType string) *Context {
+func init() {
+ InitContext(MsgCtxTypeChannel)
+}
+
+// InitContext gets global context instance
+func InitContext(contextType string) {
once.Do(func() {
context = &Contex... | 1 | package context
import (
"sync"
"time"
"k8s.io/klog"
"github.com/kubeedge/beehive/pkg/core/model"
)
//define channel type
const (
MsgCtxTypeChannel = "channel"
)
var (
// singleton
context *Context
once sync.Once
)
// GetContext gets global context instance
func GetContext(contextType string) *Context ... | 1 | 14,735 | Do we need this `init` here? We have already called the `InitContext` in `StartModule` directly. | kubeedge-kubeedge | go |
@@ -619,6 +619,14 @@ class WebDriver(object):
else:
return self.execute(Command.GET_WINDOW_HANDLES)['value']
+ def minimize_window(self):
+ """
+ Miniimizes the current window that webdriver is using
+ """
+ if self.w3c:
+ command = Command.W3C_MINIMIZE_... | 1 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 1 | 14,687 | This `if` is not necessary | SeleniumHQ-selenium | java |
@@ -255,6 +255,10 @@ function diffElementNodes(dom, newVNode, oldVNode, context, isSvg, excessDomChil
// (as above, don't diff props during hydration)
if (!isHydrating) {
if (('value' in newProps) && newProps.value!==undefined && newProps.value !== dom.value) dom.value = newProps.value==null ? '' : newProps.v... | 1 | import { EMPTY_OBJ, EMPTY_ARR } from '../constants';
import { Component, enqueueRender } from '../component';
import { Fragment } from '../create-element';
import { diffChildren } from './children';
import { diffProps } from './props';
import { assign, removeNode } from '../util';
import options from '../options';
/**... | 1 | 14,195 | should we add a `mangle.json` mapping for this? We could reuse a property name that's only used on component or vnode objects right now, like `__s` ("next state"). | preactjs-preact | js |
@@ -717,6 +717,7 @@ module Beaker
args << "--parseonly" if opts[:parseonly]
args << "--trace" if opts[:trace]
args << "--parser future" if opts[:future_parser]
+ args << "--modulepath #{opts[:modulepath]}" if opts[:modulepath]
# From puppet help:
# "... an exit code... | 1 | require 'resolv'
require 'inifile'
require 'timeout'
require 'beaker/dsl/outcomes'
module Beaker
module DSL
# This is the heart of the Puppet Acceptance DSL. Here you find a helper
# to proxy commands to hosts, more commands to move files between hosts
# and execute remote scripts, confine test cases to ... | 1 | 5,632 | Please update the yard docs to indicate this new option. | voxpupuli-beaker | rb |
@@ -52,6 +52,10 @@ type AWSLoadBalancerSpec struct {
// Scheme sets the scheme of the load balancer (defaults to Internet-facing)
// +optional
Scheme *ClassicELBScheme `json:"scheme,omitempty"`
+
+ // Subnets specifies the subnets that should be used by the load balancer
+ // +optional
+ Subnets Subnets `json:"su... | 1 | /*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 1 | 11,726 | Can you provide an example in the godoc section on how to use this? From the implementation it looks like the AvailabilityZone field is required for example, otherwise it can fail / error, is that correct? | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -185,7 +185,10 @@ func initDB(db *gorm.DB, dbType string, log hclog.Logger) (err error) {
return sqlError.Wrap(err)
}
- if err := tx.Assign(Migration{Version: latestSchemaVersion}).FirstOrCreate(&Migration{}).Error; err != nil {
+ if err := tx.Assign(Migration{
+ Version: latestSchemaVersion,
+ CodeVers... | 1 | package sql
import (
"errors"
"fmt"
"math"
"strconv"
"time"
"github.com/blang/semver"
"github.com/golang/protobuf/proto"
hclog "github.com/hashicorp/go-hclog"
"github.com/jinzhu/gorm"
"github.com/spiffe/spire/pkg/common/bundleutil"
"github.com/spiffe/spire/pkg/common/idutil"
"github.com/spiffe/spire/pkg/c... | 1 | 14,823 | It would be great if this could be captured by a test. | spiffe-spire | go |
@@ -441,10 +441,15 @@ func NewConfig(dc *dynamicconfig.Collection, numberOfShards int32, isAdvancedVis
ESIndexMaxResultWindow: dc.GetIntProperty(dynamicconfig.FrontendESIndexMaxResultWindow, 10000),
IndexerConcurrency: dc.GetIntProperty(dynamicconfig.WorkerIndexerConcurrency, 100),
ES... | 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 | 12,010 | 1000 -> 100 maybe too much, 200 ish to 500ish maybe a good option | temporalio-temporal | go |
@@ -60,5 +60,5 @@ func (a *ChecksumAddress) UnmarshalText(text []byte) error {
// MarshalText implements the encoding.TextMarshaler interface
func (a ChecksumAddress) MarshalText() (text []byte, err error) {
addr := basics.Address(a)
- return []byte(addr.GetChecksumAddress().String()), nil
+ return []byte(addr.Stri... | 1 | // Copyright (C) 2019 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any l... | 1 | 35,474 | Any reason we need to keep this package's `ChecksumAddress` type or can we get rid of it too? | algorand-go-algorand | go |
@@ -248,7 +248,7 @@ events.on(serverNotifications, 'RestartRequired', function (e, apiClient) {
[
{
action: 'restart',
- title: globalize.translate('ButtonRestart'),
+ title: globalize.translate('HeaderRestart'),
icon: getIconUrl()
... | 1 | import serverNotifications from 'serverNotifications';
import playbackManager from 'playbackManager';
import events from 'events';
import globalize from 'globalize';
function onOneDocumentClick() {
document.removeEventListener('click', onOneDocumentClick);
document.removeEventListener('keydown', onOneDocumentC... | 1 | 17,446 | Above the one that was picked was the Button* prefix, and here it's the Header* prefix. Maybe the Button prefix is more general. | jellyfin-jellyfin-web | js |
@@ -1250,7 +1250,7 @@ namespace Nethermind.Blockchain
public Keccak HeadHash => Head?.Hash;
public Keccak GenesisHash => Genesis?.Hash;
- public Keccak PendingHash => BestSuggestedHeader?.Hash;
+ public Keccak PendingHash => Head?.Hash;
public Block FindBlock(Keccak blockHas... | 1 | // Copyright (c) 2018 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of ... | 1 | 23,558 | I might prefer changing: public Block FindPendingBlock() => FindBlock(PendingHash, BlockTreeLookupOptions.None); public BlockHeader FindPendingHeader() => FindHeader(PendingHash, BlockTreeLookupOptions.None); in IBlockFinder, what do you think? | NethermindEth-nethermind | .cs |
@@ -206,6 +206,7 @@ type SyncStatus struct {
type SyncSetCommonSpec struct {
// Resources is the list of objects to sync from RawExtension definitions.
// +optional
+ // +kubebuilder:pruning:PreserveUnknownFields
Resources []runtime.RawExtension `json:"resources,omitempty"`
// ResourceApplyMode indicates if ... | 1 | package v1
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
// SyncSetResourceApplyMode is a string representing the mode with which to
// apply SyncSet Resources.
type SyncSetResourceApplyMode string
const (
// UpsertResourceApplyMode indicat... | 1 | 17,906 | This is necessary due to a bug in 4.7. Follow HIVE-1561 for getting rid of it. | openshift-hive | go |
@@ -2,8 +2,10 @@ class Topic < ActiveRecord::Base
# Associations
has_many :classifications
with_options(through: :classifications, source: :classifiable) do |options|
+ options.has_many :exercises, source_type: 'Exercise'
options.has_many :products, source_type: 'Product'
options.has_many :topics,... | 1 | class Topic < ActiveRecord::Base
# Associations
has_many :classifications
with_options(through: :classifications, source: :classifiable) do |options|
options.has_many :products, source_type: 'Product'
options.has_many :topics, source_type: 'Topic'
options.has_many :workshops, source_type: 'Workshop'
... | 1 | 10,911 | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. | thoughtbot-upcase | rb |
@@ -38,7 +38,7 @@
#include "common/xutil.h"
#include "xkb.h"
-/* XStringToKeysym() and XKeysymToString */
+/* XStringToKeysym() */
#include <X11/Xlib.h>
#include <xkbcommon/xkbcommon.h>
#include <glib.h> | 1 | /*
* key.c - Key bindings configuration management
*
* Copyright © 2008-2009 Julien Danjou <julien@danjou.info>
* Copyright © 2008 Pierre Habouzit <madcoder@debian.org>
*
* 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
... | 1 | 11,837 | Some day (tm) I will also get rid of that one. But today is not that day... | awesomeWM-awesome | c |
@@ -206,6 +206,17 @@ class CombineAssets
// Disable cache always
$this->storagePath = null;
+ // Prefix all assets
+ if($localPath) {
+ if (substr($localPath, -1) !== '/') {
+ $localPath = $localPath.'/';
+ }
+ $assets = array_map(functio... | 1 | <?php namespace System\Classes;
use App;
use Url;
use File;
use Lang;
use Event;
use Cache;
use Route;
use Config;
use Request;
use Response;
use Assetic\Asset\FileAsset;
use Assetic\Asset\GlobAsset;
use Assetic\Asset\AssetCache;
use Assetic\Asset\AssetCollection;
use Assetic\Factory\AssetFactory;
use October\Rain\Par... | 1 | 13,596 | Add a space between if and opening parenthesis please (i.e. `if (`) | octobercms-october | php |
@@ -827,8 +827,9 @@ class Series(_Frame, IndexOpsMixin, Generic[T]):
Name: my_name, dtype: int64
"""
if index is None:
- return self
- scol = self._scol.alias(index)
+ scol = self._scol
+ else:
+ scol = self._scol.alias(index)
if kwargs.... | 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 | 10,682 | nit: `rename` instead of `alias`? | databricks-koalas | py |
@@ -113,11 +113,17 @@ func (d *Driver) freeDevices() (string, string, error) {
return "", "", err
}
devPrefix := "/dev/sd"
+
for _, dev := range self.BlockDeviceMappings {
if dev.DeviceName == nil {
return "", "", fmt.Errorf("Nil device name")
}
devName := *dev.DeviceName
+
+ // sda1 is reserved ... | 1 | package aws
import (
"fmt"
"io/ioutil"
"net/http"
"os"
"os/exec"
"strings"
"syscall"
"time"
"go.pedge.io/dlog"
"go.pedge.io/proto/time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
"github.co... | 1 | 5,902 | Per AWS docs EC instances have the root mounted at /dev/sda1. This label should be skipped. | libopenstorage-openstorage | go |
@@ -92,7 +92,6 @@ func (q *ChannelEventQueue) dispatchMessage() {
event := model.MessageToEvent(&msg)
select {
case rChannel <- event:
- default:
}
}
} | 1 | package channelq
import (
"fmt"
"strings"
"sync"
"github.com/kubeedge/beehive/pkg/common/log"
"github.com/kubeedge/beehive/pkg/core/context"
"github.com/kubeedge/kubeedge/cloud/pkg/cloudhub/common/model"
)
// Read channel buffer size
const (
rChanBufSize = 10
)
// EventSet holds a set of events
type EventSet... | 1 | 11,370 | I'm not sure it is a better way to address lose message, if wait here, edge controller cant process message, event from watching api-server will be lost yet, right? | kubeedge-kubeedge | go |
@@ -539,11 +539,12 @@ class EAP_MD5(EAP):
ByteEnumField("code", 1, eap_codes),
ByteField("id", 0),
FieldLenField("len", None, fmt="H", length_of="optional_name",
- adjust=lambda p, x: x + p.value_size + 6),
+ adjust=lambda p, x: (x + p.value_size + 6) if p.... | 1 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
Classes and functions for layer 2 protocols.
"""
import os, struct, time, socket
from scapy.base_classes import Net... | 1 | 9,856 | Please keep the correct alignment, it seems broken now (at least in Github). Can you reverse the test (`if p.value_size is None`)? Also, do you want `6` when `p.value_size is None` or `x + 6`? Maybe, in that case, something like `lambda p, x: x + 6 + (0 if p.value_size is None else p.value_size)` would be easier to rea... | secdev-scapy | py |
@@ -238,6 +238,10 @@ type Container struct {
Secrets []*Secret `locationName:"secrets" type:"list"`
+ StartTimeout *int64 `locationName:"startTimeout" type:"integer"`
+
+ StopTimeout *int64 `locationName:"stopTimeout" type:"integer"`
+
VolumesFrom []*VolumeFrom `locationName:"volumesFrom" type:"list"`
}
| 1 | // Copyright 2014-2019 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 | 22,183 | Can we make sure ECS service treats it as int64 as well? | aws-amazon-ecs-agent | go |
@@ -178,6 +178,15 @@ class UIProperty(UIA):
return value
return value.replace(CHAR_LTR_MARK,'').replace(CHAR_RTL_MARK,'')
+class ReadOnlyEditBox(IAccessible):
+#Used for read-only edit boxes in a properties window.
+#These can contain dates that include unwanted left-to-right and right-to-left indicator charac... | 1 | #appModules/explorer.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2018 NV Access Limited, Joseph Lee
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
"""App module for Windows Explorer (aka Windows shell).
Provides workarounds for controls suc... | 1 | 23,104 | Please follow the naming convention for variables, i.e. `windowText`. | nvaccess-nvda | py |
@@ -21,8 +21,8 @@ import (
yaml "github.com/ghodss/yaml"
"github.com/openebs/maya/pkg/apis/openebs.io/v1alpha1"
+ castv1alpha1 "github.com/openebs/maya/pkg/castemplate/v1alpha1"
m_k8s_client "github.com/openebs/maya/pkg/client/k8s"
- "github.com/openebs/maya/pkg/engine"
menv "github.com/openebs/maya/pkg/env/v... | 1 | /*
Copyright 2018 The OpenEBS Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... | 1 | 11,796 | alias can be `cast` | openebs-maya | go |
@@ -97,13 +97,14 @@ static h2o_iovec_t events_status_final(void *priv, h2o_globalconf_t *gconf, h2o_
" \"http2-errors.inadequate-security\": %" PRIu64 ", \n"
" \"http2.read-closed\": %" PRIu64 ", \n"
" \"http2.write-closed\": %" PRIu64 ", \n"
- ... | 1 | /*
* Copyright (c) 2016 Fastly
*
* 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, publish, dis... | 1 | 13,792 | Let's use `%zu` instead of casting to `uint64_t` and using `PRIu64`. The alternative is to change the type of `mmap_errors` to `uint64_t`, though I'd prefer not doing that because some 32-bit platforms might not provide atomic operation support for `uint64_t`. | h2o-h2o | c |
@@ -57,7 +57,7 @@ import javax.lang.model.element.Name;
name = "CatchSpecificity",
link = "https://github.com/palantir/gradle-baseline#baseline-error-prone-checks",
linkType = BugPattern.LinkType.CUSTOM,
- severity = BugPattern.SeverityLevel.SUGGESTION,
+ severity = BugPattern.S... | 1 | /*
* (c) Copyright 2019 Palantir Technologies 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 ... | 1 | 8,470 | I recall there being a reason we had this one set only to suggeation. @carterkozak do you remember why? or is my memory getting corrupted? | palantir-gradle-baseline | java |
@@ -72,7 +72,7 @@ class CppGenerator : public BaseGenerator {
}
for (auto it = parser_.included_files_.begin();
it != parser_.included_files_.end(); ++it) {
- auto noext = flatbuffers::StripExtension(it->first);
+ auto noext = flatbuffers::StripExtension(it->second);
auto basename =... | 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 | 11,993 | This should now be made into `if (it->second.empty())` ? | google-flatbuffers | java |
@@ -126,13 +126,19 @@ class WebEngineSearch(browsertab.AbstractSearch):
def __init__(self, parent=None):
super().__init__(parent)
self._flags = QWebEnginePage.FindFlags(0)
+ self.num_of_searches = 0
def _find(self, text, flags, callback, caller):
"""Call findText on the wid... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 19,716 | Do we need to worry about a race condition on this decrement (@The-Compiler)? I'm not sure how the python callbacks work, so this might not need to be something to worry about. | qutebrowser-qutebrowser | py |
@@ -100,7 +100,7 @@ func TestMultiplePropagators(t *testing.T) {
// generates the valid span context out of thin air
{
ctx := ootaProp.Extract(bg, ns)
- sc := trace.RemoteSpanContextFromContext(ctx)
+ sc := trace.SpanContextFromContext(ctx)
require.True(t, sc.IsValid(), "oota prop failed sanity check")
}
... | 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 | 14,659 | Should these assert that the extracted `SpanContext` is remote? | open-telemetry-opentelemetry-go | go |
@@ -27,6 +27,9 @@ class ApproxMaxIoUAssigner(MaxIoUAssigner):
ignoring any bboxes.
ignore_wrt_candidates (bool): Whether to compute the iof between
`bboxes` and `gt_bboxes_ignore`, or the contrary.
+ match_low_quality (bool): Whether to allow quality matches. This is
+ ... | 1 | import torch
from ..geometry import bbox_overlaps
from .max_iou_assigner import MaxIoUAssigner
class ApproxMaxIoUAssigner(MaxIoUAssigner):
"""Assign a corresponding gt bbox or background to each bbox.
Each proposals will be assigned with `-1`, `0`, or a positive integer
indicating the ground truth index... | 1 | 18,975 | typo: allow low quality matches. | open-mmlab-mmdetection | py |
@@ -49,7 +49,7 @@ func ResolveDataDir(dataDir string) (string, error) {
return filepath.Join(dataDir, "server"), err
}
-func StartServer(ctx context.Context, config *Config) error {
+func StartServer(ctx context.Context, config *Config, cfg *cmds.Server) error {
if err := setupDataDirAndChdir(&config.ControlConf... | 1 | package server
import (
"context"
"fmt"
"io/ioutil"
net2 "net"
"os"
"path"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
"github.com/k3s-io/helm-controller/pkg/helm"
"github.com/pkg/errors"
"github.com/rancher/k3s/pkg/apiaddresses"
"github.com/rancher/k3s/pkg/cli/cmds"
"github.com/rancher/k3s/pkg/... | 1 | 9,950 | At some point we need to condense down and refactor our "configs" as we have too many in too many places and we're starting to get more illegible code. No change necessary but calling out for future reference. | k3s-io-k3s | go |
@@ -39,7 +39,8 @@ module Blacklight
def options
{
class: classes,
- "aria-hidden": (true if aria_hidden)
+ "aria-hidden": (true if aria_hidden),
+ "aria-label": icon_label
}
end
| 1 | # frozen_string_literal: true
module Blacklight
class Icon
attr_reader :icon_name, :aria_hidden, :label, :role, :additional_options
##
# @param [String, Symbol] icon_name
# @param [Hash] options
# @param [String] classes additional classes separated by a string
# @param [Boolean] aria_hidden ... | 1 | 8,738 | Can we add the `if label` conditional to this please? | projectblacklight-blacklight | rb |
@@ -40,6 +40,7 @@ setup(
packages=['databricks', 'databricks.koalas', 'databricks.koalas.missing'],
extras_require={
'spark': ['pyspark>=2.4.0'],
+ 'mlflow': ['mlflow>=0.2.0'],
},
python_requires='>=3.5',
install_requires=[ | 1 | #!/usr/bin/env python
#
# 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 applic... | 1 | 9,403 | @thunterdb, can we increase the minimal version to almost the latest ones? I was thinking people will mostly use the latest version of mlflow | databricks-koalas | py |
@@ -669,6 +669,8 @@ const REGISTERED_HOOKS = [
* @param {CellRange} sourceRange The range values will be filled from.
* @param {CellRange} targetRange The range new values will be filled into.
* @param {string} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.... | 1 | import { arrayEach } from './helpers/array';
import { objectEach } from './helpers/object';
import { substitute } from './helpers/string';
import { warn } from './helpers/console';
import { toSingleLine } from './helpers/templateLiteralTag';
/**
* @description
* Handsontable events are the common interface that func... | 1 | 18,980 | If the last argument is going to be removed, why would we add it to the API docs? Shouldn't it be private for internal use? | handsontable-handsontable | js |
@@ -37,13 +37,18 @@ from .execution_context import (
SystemPipelineExecutionContext,
)
-
from .errors import DagsterInvariantViolationError
from .events import construct_event_logger
from .execution_plan.create import create_execution_plan_core
+from .execution_plan.intermediates_manager import (
+ ... | 1 | '''
Naming conventions:
For public functions:
execute_*
These represent functions which do purely in-memory compute. They will evaluate expectations
the core transform, and exercise all logging and metrics tracking (outside of outputs), but they
will not invoke *any* outputs (and their APIs don't allow the user to).... | 1 | 12,636 | `Intermediates` or `Intermediate` | dagster-io-dagster | py |
@@ -95,6 +95,8 @@ class visibility_of(object):
def _element_if_visible(element, visibility=True):
+ if isinstance(element, str) or isinstance(element, dict):
+ raise StaleElementReferenceException("Invalid locator")
return element if element.is_displayed() == visibility else False
| 1 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 1 | 14,205 | This is not the right exception class. There is an InvalidSelectorException class that covers bad locators. | SeleniumHQ-selenium | py |
@@ -52,8 +52,9 @@ func (c *Cluster) Bootstrap(ctx context.Context, snapshot bool) error {
// instance of etcd in the event that etcd certificates are unavailable,
// reading the data, and comparing that to the data on disk, all the while
// starting normal etcd.
- isHTTP := c.config.JoinURL != "" && c.con... | 1 | package cluster
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"path"
"path/filepath"
"reflect"
"strconv"
"strings"
"time"
"github.com/k3s-io/kine/pkg/client"
"github.com/k3s-io/kine/pkg/endpoint"
"github.com/otiai10/copy"
"github.com/rancher/k3s/pkg/bootstrap... | 1 | 10,806 | If this code isn't needed, it should be removed. | k3s-io-k3s | go |
@@ -145,10 +145,13 @@ func (md *metricsDriver) uploadMetrics(ctx context.Context, protoMetrics []*metr
if md.metricsClient == nil {
return errNoClient
}
- _, err := md.metricsClient.Export(ctx, &colmetricpb.ExportMetricsServiceRequest{
- ResourceMetrics: protoMetrics,
- })
- return err
+ req := func(ctx... | 1 | // Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... | 1 | 15,012 | Should the `doRequest` func be a method on the `connection` type instead of passing state from the type? | open-telemetry-opentelemetry-go | go |
@@ -99,8 +99,8 @@ var _ = Describe("init flow", func() {
Expect(len(app.Variables)).To(Equal(5))
expectedVars := map[string]string{
"ECS_CLI_APP_NAME": appName,
- "ECS_CLI_ENVIRONMENT_NAME": "test",
- "ECS_CLI_LB_DNS": strings.TrimPrefix(app.Routes[0].URL, "http://"),
+ "CO... | 1 | package init_test
import (
"fmt"
"net/http"
"strings"
"github.com/aws/amazon-ecs-cli-v2/e2e/internal/client"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("init flow", func() {
var (
appName string
initErr error
)
BeforeAll(func() {
appName = "front-end"
_, initErr = cli... | 1 | 12,926 | we'll probably tackle these e2e tests at the end | aws-copilot-cli | go |
@@ -0,0 +1,19 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using BenchmarkDotNet.Attributes;
+using MicroBenchmarks;
+
+namespace System.Net.Tests
+{
+ ... | 1 | 1 | 8,932 | what is this address pointing to? what are we measuring here? I want to have a better understanding. | dotnet-performance | .cs | |
@@ -101,7 +101,8 @@ public class JdbcFlowTriggerInstanceLoaderImpl implements FlowTriggerInstanceLoa
+ "project_json, flow_exec_id \n"
+ "FROM execution_dependencies JOIN (\n"
+ "SELECT trigger_instance_id FROM execution_dependencies WHERE trigger_instance_id not in (\n"
- + "S... | 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 | 15,625 | Would it be better to pass the dependency status as the parameter into the SQL string? In case the enum value is changed in the future, we don't need to change the code here. | azkaban-azkaban | java |
@@ -1,3 +1,9 @@
+// Copyright 2017 Keybase Inc. All rights reserved.
+// Use of this source code is governed by a BSD
+// license that can be found in the LICENSE file.
+
+// +build windows
+
package libdokan
import ( | 1 | package libdokan
import (
"os"
"syscall"
)
func isSet(bit, value int) bool {
return value&bit == bit
}
// OpenFile opens a file with FILE_SHARE_DELETE set.
// This means that the file can be renamed or deleted while it is open.
func OpenFile(filename string, mode, perm int) (*os.File, error) {
path, err := sysca... | 1 | 18,189 | Hah I had `gorename` failing without this too. | keybase-kbfs | go |
@@ -597,6 +597,12 @@ namespace Datadog.Trace
writer.WritePropertyName("appsec_blocking_enabled");
writer.WriteValue(Security.Instance.Settings.BlockingEnabled);
+ writer.WritePropertyName("rules_file_path");
+ writer.WriteValue(Security.I... | 1 | // <copyright file="Tracer.cs" company="Datadog">
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>
using System;
using System.Coll... | 1 | 22,775 | maybe prefix these with `appsec_` for consistency? | DataDog-dd-trace-dotnet | .cs |
@@ -7,11 +7,19 @@ import (
"crypto/x509"
"errors"
"fmt"
+ "github.com/spiffe/spire/pkg/common/profiling"
+ "net/http"
+ _ "net/http/pprof"
"net/url"
"path"
+ "runtime"
+
+ "strconv"
"sync"
"syscall"
+ _ "golang.org/x/net/trace"
+
"github.com/spiffe/spire/pkg/agent/catalog"
"github.com/spiffe/spire/p... | 1 | package agent
import (
"context"
"crypto/ecdsa"
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"net/url"
"path"
"sync"
"syscall"
"github.com/spiffe/spire/pkg/agent/catalog"
"github.com/spiffe/spire/pkg/agent/endpoints"
"github.com/spiffe/spire/pkg/agent/manager"
"github.com/spiffe/spire/pkg/common/util"
"gi... | 1 | 9,155 | nit: this should be down further with the other github imports | spiffe-spire | go |
@@ -560,6 +560,11 @@ def main():
else:
log.debug("initializing updateCheck")
updateCheck.initialize()
+ # If running from source, try to disconnect from the console we may have been executed in.
+ # NVDA may reconnect to read it later,
+ # but it is better to assume we are not connected to anything at the start... | 1 | # -*- coding: UTF-8 -*-
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2006-2019 NV Access Limited, Aleksey Sadovoy, Christopher Toth, Joseph Lee, Peter Vágner,
# Derek Riemer, Babbage B.V., Zahari Yurukov, Łukasz Golonka
# This file is covered by the GNU General Public License.
# See the file COPYING... | 1 | 31,728 | Why is this change necessary or related to the rest of the PR? | nvaccess-nvda | py |
@@ -31,7 +31,7 @@ class ConsoleReport extends Report
$issue_string .= 'INFO';
}
- $issue_reference = $issue_data->link ? ' (see ' . $issue_data->link . ')' : '';
+ $issue_reference = $issue_data->link ? ' - see: ' . $issue_data->link : '';
$issue_string .= ': ' . $issue_... | 1 | <?php
namespace Psalm\Report;
use Psalm\Config;
use Psalm\Internal\Analyzer\DataFlowNodeData;
use Psalm\Report;
use function substr;
class ConsoleReport extends Report
{
public function create(): string
{
$output = '';
foreach ($this->issues_data as $issue_data) {
$output .= $this... | 1 | 10,694 | Hm, I wonder if the `see:` prefix is even necessary? | vimeo-psalm | php |
@@ -261,7 +261,13 @@ import 'emby-button';
minutes = minutes || 1;
- miscInfo.push(`${Math.round(minutes)} mins`);
+ if (item.UserData?.PlaybackPositionTicks) {
+ let remainingMinutes = (item.RunTimeTicks - item.UserData.PlaybackPositionTicks) / 6000... | 1 | import datetime from 'datetime';
import globalize from 'globalize';
import appRouter from 'appRouter';
import itemHelper from 'itemHelper';
import indicators from 'indicators';
import 'material-icons';
import 'css!./mediainfo.css';
import 'programStyles';
import 'emby-button';
/* eslint-disable indent */
function ... | 1 | 18,059 | This should be translated. | jellyfin-jellyfin-web | js |
@@ -294,13 +294,15 @@ class Booster {
void ResetConfig(const char* parameters) {
UNIQUE_LOCK(mutex_)
auto param = Config::Str2Map(parameters);
- if (param.count("num_class")) {
+ Config new_config;
+ new_config.Set(param);
+ if (param.count("num_class") && new_config.num_class != config_.num_cl... | 1 | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include <LightGBM/c_api.h>
#include <LightGBM/boosting.h>
#include <LightGBM/config.h>
#include <LightGBM/dataset.h>
#include <LightGBM/dataset_loa... | 1 | 27,437 | I originally had this PR only changing the R package, but then ran into this error > Error: [LightGBM] [Fatal] Cannot change metric during training This is thrown even if you aren't actually CHANGING `metric`. I think the change here in `c_api` is closer to the desired behavior, only throwing an error if the parameter ... | microsoft-LightGBM | cpp |
@@ -356,9 +356,9 @@ describe 'run_task' do
is_expected.to run.with_params(task_name, hostname, task_params).and_raise_error(
Puppet::ParseError,
- /Task\ test::params:\n
+ %r{Task\ test::params:\n
\s*has\ no\ parameter\ named\ 'foo'\n
- \s*has\ no\ parameter\ named\ 'ba... | 1 | # frozen_string_literal: true
require 'spec_helper'
require 'bolt/executor'
require 'bolt/inventory'
require 'bolt/result'
require 'bolt/result_set'
require 'bolt/target'
require 'puppet/pops/types/p_sensitive_type'
require 'rspec/expectations'
class TaskTypeMatcher < Mocha::ParameterMatchers::Equals
def initialize... | 1 | 16,544 | These changes are just to make cli_spec a little more readable for VS Code users, as there's a bug with the Ruby plugin's syntax highlighting when you use multi-line regex literals. | puppetlabs-bolt | rb |
@@ -1564,7 +1564,7 @@ func (r *ReconcileClusterDeployment) mergePullSecrets(cd *hivev1.ClusterDeployme
globalPullSecretName := os.Getenv(constants.GlobalPullSecret)
var globalPullSecret string
if len(globalPullSecretName) != 0 {
- globalPullSecret, err = controllerutils.LoadSecretData(r.Client, globalPullSecretN... | 1 | package clusterdeployment
import (
"context"
"fmt"
"os"
"reflect"
"sort"
"strings"
"time"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
routev1 "github.com/openshift/api/route/v1"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
apier... | 1 | 11,459 | Shouldn't the global pull secret by in the namespace of the hive-operator? It is part of the operand. | openshift-hive | go |
@@ -23,11 +23,13 @@ class TestKinesis(unittest.TestCase):
# create stream and assert 0 consumers
client.create_stream(StreamName=stream_name, ShardCount=1)
+ sleep(1)
assert_consumers(0)
# create consumer and assert 1 consumer
consumer_name = 'cons1'
resp... | 1 | import base64
import logging
import unittest
import re
from time import sleep
from datetime import datetime
from localstack.utils.aws import aws_stack
from localstack.utils.common import retry, short_uid
from localstack.utils.kinesis import kinesis_connector
class TestKinesis(unittest.TestCase):
def test_stream_... | 1 | 12,580 | kinesis-mock applies KINESIS_LATENCY to RegisterStreamConsumer actions so I added a sleep here. | localstack-localstack | py |
@@ -145,13 +145,8 @@ std::unique_ptr<nebula::kvstore::KVStore> initKV(std::vector<nebula::HostAddr> p
LOG(ERROR) << "Meta version is invalid";
return nullptr;
} else if (version == nebula::meta::MetaVersion::V1) {
- auto ret = nebula::meta::MetaVersionMan::updateMetaV1ToV2(engine);
- if (!ret.ok()) {... | 1 | /* Copyright (c) 2021 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include "MetaDaemonInit.h"
#include <folly/ssl/Init.h>
#include <thrift/lib/cpp2/server/ThriftServer.h>
#include "common/base/Base.h"
#include "common/base/SignalHandler.h"
#include "common/fs/Fil... | 1 | 33,431 | Only V1 or V3 is return from `getMetaVersionFromKV`. So where do we call `updateMetaV2ToV3`? | vesoft-inc-nebula | cpp |
@@ -26,7 +26,7 @@ func (repo *nodeAttestorRepository) Constraints() catalog.Constraints {
}
func (repo *nodeAttestorRepository) Versions() []catalog.Version {
- return []catalog.Version{nodeAttestorV0{}}
+ return []catalog.Version{nodeAttestorV1{}}
}
func (repo *nodeAttestorRepository) LegacyVersion() (catalog.... | 1 | package catalog
import (
"github.com/spiffe/spire/pkg/agent/plugin/nodeattestor"
"github.com/spiffe/spire/pkg/agent/plugin/nodeattestor/aws"
"github.com/spiffe/spire/pkg/agent/plugin/nodeattestor/azure"
"github.com/spiffe/spire/pkg/agent/plugin/nodeattestor/gcp"
"github.com/spiffe/spire/pkg/agent/plugin/nodeattes... | 1 | 16,667 | I think that V0 is missing here, which will prevent plugins that haven't been converted to work. | spiffe-spire | go |
@@ -4,6 +4,7 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
})
module.exports = withBundleAnalyzer({
+ // sitemap: () => [{uri: "/wow", type: "pages", verb: "get"}],
middleware: [
sessionMiddleware({
unstable_isAuthorized: unstable_simpleRolesIsAuthorized, | 1 | const {sessionMiddleware, unstable_simpleRolesIsAuthorized} = require("@blitzjs/server")
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
})
module.exports = withBundleAnalyzer({
middleware: [
sessionMiddleware({
unstable_isAuthorized: unstable_simple... | 1 | 10,898 | Should we remove this? | blitz-js-blitz | js |
@@ -6,12 +6,14 @@ import (
"go.uber.org/zap"
+ "github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
"github.com/gliderlabs/ssh"
log "github.com/noxio... | 1 | package miner
import (
"context"
"path/filepath"
"go.uber.org/zap"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
"github.com/gliderlabs/ssh"
log "github.com/noxiouz/zapctx/ctxlog"
)
type con... | 1 | 5,762 | Put on top of the import. | sonm-io-core | go |
@@ -46,6 +46,7 @@ domReady( () => {
Modules.registerModule(
'analytics',
{
+ name: 'Analytics',
settingsEditComponent: SettingsEdit,
settingsViewComponent: SettingsView,
setupComponent: SetupMain, | 1 | /**
* Analytics module initialization.
*
* 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/LICEN... | 1 | 34,289 | See above, this shouldn't be added. | google-site-kit-wp | js |
@@ -505,8 +505,8 @@ public enum ItemMapping
ITEM_ANGUISH_ORNAMENT_KIT(ANGUISH_ORNAMENT_KIT, NECKLACE_OF_ANGUISH_OR),
ITEM_OCCULT_NECKLACE(OCCULT_NECKLACE, OCCULT_NECKLACE_OR),
ITEM_OCCULT_ORNAMENT_KIT(OCCULT_ORNAMENT_KIT, OCCULT_NECKLACE_OR),
- ITE_AMULET_OF_FURY(AMULET_OF_FURY, AMULET_OF_FURY_OR),
- ITE_FURY_ORN... | 1 | /*
* Copyright (c) 2018, Tomas Slusny <slusnucky@gmail.com>
* Copyright (c) 2018, Seth <Sethtroll3@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions... | 1 | 14,963 | This'll likely get fixed upstream, we should let them deal with it. | open-osrs-runelite | java |
@@ -93,6 +93,7 @@ type Options struct {
LightNodeLimit int
WelcomeMessage string
Transaction []byte
+ HostFactory func(context.Context, ...libp2p.Option) (host.Host, error)
}
func New(ctx context.Context, signer beecrypto.Signer, networkID uint64, overlay swarm.Address, addr string, ab addressbook.Putte... | 1 | // Copyright 2020 The Swarm Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package libp2p
import (
"context"
"crypto/ecdsa"
"errors"
"fmt"
"net"
"sync"
"time"
"github.com/ethersphere/bee/pkg/addressbook"
"github.com/ether... | 1 | 15,200 | Somehow, this field does not seems useful for the exposed package api, only for the tests. Would you consider having an unexported field in `hostFactory func(context.Context, ...libp2p.Option) (host.Host, error)` instead to be set only by a new helper function defined in export_test.go. This is just a suggestion, not a... | ethersphere-bee | go |
@@ -111,6 +111,18 @@ class Time {
sleep(seconds) {
return this.msleep(seconds * 1000);
}
+
+
+ goBackInTime(n, timeDuration) {
+ // Note that we are starting from the first ms of the current timeDuration
+ // eg. If we go back by one day we are subtracting (24*60*60*1000) ms from the start ms of today
+ retur... | 1 | const moment = require('moment');
class Time {
constructor() {
this.dateFormat_ = 'DD/MM/YYYY';
this.timeFormat_ = 'HH:mm';
this.locale_ = 'en-us';
}
locale() {
return this.locale_;
}
setLocale(v) {
moment.locale(v);
this.locale_ = v;
}
dateFormat() {
return this.dateFormat_;
}
setDateFormat... | 1 | 14,561 | As a first argument to these function, please pass the date that should go forward/backward. Also please clarify what is "n" (possible values, unit) and what is timeDuration (possible values, unit, as from your code it seems to be "day", "hours", etc. but from your example it seems to be milliseconds). | laurent22-joplin | js |
@@ -71,7 +71,11 @@ class AppModule(appModuleHandler.AppModule):
ui.message(_("No track playing"))
return elapsedAndTotalTime
- def script_reportRemainingTime(self,gesture):
+ def script_reportRemainingTime(self, gesture):
+ import config
+ from languageHandler import setLanguage
+ lang = config.conf["genera... | 1 | # A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2009-2020 NV Access Limited, Aleksey Sadovoy, James Teh, Joseph Lee, Tuukka Ojala,
# Bram Duvigneau
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
import appModuleHandler
import calendar
import colle... | 1 | 32,077 | Are you sure you really need this code here? that script will be certainly run in NVDA's main thread, and core would have already called setLanguage. | nvaccess-nvda | py |
@@ -276,7 +276,7 @@ var _ = Describe("Application deployment in edge_core Testing", func() {
It("TC_TEST_APP_DEPLOYMENT_16: Test application deployment with container network configuration as port mapping", func() {
//Generate the random string and assign as a UID
UID = "deployment-app-" + edge.GetRandomStri... | 1 | /*
Copyright 2019 The KubeEdge Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 1 | 12,394 | why is this changed ? | kubeedge-kubeedge | go |
@@ -182,8 +182,9 @@ func (l *ActionList) Get(doc Document, fps ...FieldPath) *ActionList {
// mod "a.b": 2, then either Update will fail, or it will succeed with the result
// {a: {b: 2}}.
//
-// Update does not modify its doc argument. To obtain the new value of the document,
-// call Get after calling Update.
+// ... | 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,032 | Should this be "the new revision value"? | google-go-cloud | go |
@@ -13,7 +13,7 @@
return [
'accepted' => ':attribute må aksepteres.',
- 'accepted_if' => 'The :attribute must be accepted when :other is :value.',
+ 'accepted_if' => 'Dette feltet må aksepteres når :other er :value.',
'active_url' => ':attribute er ikke en gyld... | 1 | <?php
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multip... | 1 | 9,274 | You have deleted :attribute | Laravel-Lang-lang | php |
@@ -1,12 +1,11 @@
/*
- * 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
- * (... | 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,067 | The license header should be updated to the Apache one. | apache-servicecomb-java-chassis | java |
@@ -22,6 +22,10 @@ namespace Datadog.Trace.ClrProfiler.IntegrationTests
[Trait("RunOnWindows", "True")]
public void HttpClient()
{
+ int expectedSpanCount = EnvironmentHelper.IsCoreClr() ? 2 : 1;
+ const string expectedOperationName = "http.request";
+ const s... | 1 | using System.Globalization;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text.RegularExpressions;
using Datadog.Trace.TestHelpers;
using Xunit;
using Xunit.Abstractions;
namespace Datadog.Trace.ClrProfiler.IntegrationTests
{
public class HttpClientTests : TestHelper
{
public... | 1 | 16,733 | @zacharycmontoya Is there any way to distinguish a `SocketHttpHandler` from another `HttpMessageHandler` request? | DataDog-dd-trace-dotnet | .cs |
@@ -883,3 +883,17 @@ instr_is_exclusive_store(instr_t *instr)
return (opcode == OP_strex || opcode == OP_strexb || opcode == OP_strexd ||
opcode == OP_strexh);
}
+
+DR_API
+bool
+instr_is_scatter(instr_t *instr)
+{
+ return false;
+}
+
+DR_API
+bool
+instr_is_gather(instr_t *instr)
+{
+ return ... | 1 | /* **********************************************************
* Copyright (c) 2014-2018 Google, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following ... | 1 | 18,984 | Not sure about this one -- did you check somehow? | DynamoRIO-dynamorio | c |
@@ -157,8 +157,15 @@ module Beaker
@options = @options.merge(env_vars)
if @options.is_pe?
- @options['pe_ver'] = Beaker::Options::PEVersionScraper.load_pe_version(@options[:pe_dir], @options[:pe_version_file])
- @options['pe_ver_win'] = Beaker::Options::PEVersionScr... | 1 | module Beaker
module Options
#An Object that parses, merges and normalizes all supported Beaker options and arguments
class Parser
GITREPO = 'git://github.com/puppetlabs'
#These options can have the form of arg1,arg2 or [arg] or just arg,
#should default to []
LONG_OPTS = [:he... | 1 | 4,588 | Is there a good reason to keep this at the `pe_ver_win` name now that it's per-host? | voxpupuli-beaker | rb |
@@ -97,7 +97,9 @@ public class ProductActivity extends BaseActivity {
String[] menuTitles = getResources().getStringArray(R.array.nav_drawer_items_product);
ProductFragmentPagerAdapter adapterResult = new ProductFragmentPagerAdapter(getSupportFragmentManager());
- adapterResult.addFragment(ne... | 1 | package openfoodfacts.github.scrachx.openfood.views;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.support.customtabs.CustomTabsIntent;
import android.support.design.widget.TabLayout;
import android.support.v4.app.NavUtils;
import android... | 1 | 62,402 | Not in the order of display : Front, Ingredient, Nutrition here (which is the right thing), Actually displayed: Front, Nutrition, Ingredients | openfoodfacts-openfoodfacts-androidapp | java |
@@ -119,9 +119,6 @@ type StressInstance struct {
// UID is the instance identifier
// +optional
UID string `json:"uid"`
- // StartTime specifies when the instance starts
- // +optional
- StartTime *metav1.Time `json:"startTime"`
}
// GetDuration gets the duration of StressChaos | 1 | // Copyright 2020 Chaos Mesh Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 16,706 | Why delete `StartTime`? This `StartTime` was used to avoid the PID was reused. | chaos-mesh-chaos-mesh | go |
@@ -489,6 +489,10 @@ module Beaker
end
rescue Exception => teardown_exception
+ if !host.is_pe?
+ dump_puppet_log(host)
+ end
+
if original_exception
logger.error("Raised during attempt to teardown with_puppet_running_on: #{teardow... | 1 | require 'resolv'
require 'inifile'
require 'timeout'
require 'beaker/dsl/outcomes'
module Beaker
module DSL
# This is the heart of the Puppet Acceptance DSL. Here you find a helper
# to proxy commands to hosts, more commands to move files between hosts
# and execute remote scripts, confine test cases to ... | 1 | 5,322 | My concern here, is that if the dump_puppet_log also throws then we will lose the data about the teardown_exception. | voxpupuli-beaker | rb |
@@ -53,10 +53,11 @@ static infer_result<task::classification> call_daal_kernel(
const std::int64_t dummy_seed = 777;
const auto data_use_in_model = daal_knn::doNotUse;
- daal_knn::Parameter daal_parameter(desc.get_class_count(),
- desc.get_neighbor_count(),
- ... | 1 | /*******************************************************************************
* Copyright 2020 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... | 1 | 25,940 | Should it be `int64_t`? | oneapi-src-oneDAL | cpp |
@@ -26,10 +26,14 @@ import java.util.concurrent.TimeUnit;
import com.google.common.base.Stopwatch;
import org.apache.logging.log4j.Logger;
+import org.apache.tuweni.bytes.Bytes;
+import org.apache.tuweni.concurrent.ExpiringMap;
import org.apache.tuweni.units.bigints.UInt256;
public class PoWSolver {
+ privat... | 1 | /*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... | 1 | 25,600 | is this value related to something ? | hyperledger-besu | java |
@@ -23,6 +23,6 @@ namespace Nethermind.TxPool
{
public interface ITxSender
{
- ValueTask<Keccak?> SendTransaction(Transaction tx, TxHandlingOptions txHandlingOptions);
+ ValueTask<(Keccak?, AddTxResult?)> SendTransaction(Transaction tx, TxHandlingOptions txHandlingOptions);
}
} | 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,569 | Add names to tuple elements ValueTask<(Keccak? Hash, AddTxResult? AddResult)>, should they both be nullable? | NethermindEth-nethermind | .cs |
@@ -136,6 +136,7 @@ public class Name {
private String toUnderscore(CaseFormat caseFormat) {
List<String> newPieces = new ArrayList<>();
for (NamePiece namePiece : namePieces) {
+ namePiece = replaceAcronyms(namePiece);
newPieces.add(namePiece.caseFormat.to(caseFormat, namePiece.identifier));
... | 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 | 17,861 | I think it might make more sense to do this in Name.upperCamel; it is the entry point for upper camel strings. | googleapis-gapic-generator | java |
@@ -53,7 +53,7 @@ public class TypeTest {
assertTrue(type.isArrayType());
ArrayType arrayType = type.asArrayType();
final ArrayType[] s = new ArrayType[1];
- type.ifArrayType(t -> s[0] = t);
+ type.ifArrayType(t -> s[0] = (ArrayType)t);
assertNotNull(s[0]);
}
} | 1 | package com.github.javaparser.ast.type;
import com.github.javaparser.JavaParser;
import com.github.javaparser.ParseProblemException;
import com.github.javaparser.ParseResult;
import com.github.javaparser.ParserConfiguration;
import com.github.javaparser.ast.expr.VariableDeclarationExpr;
import com.github.javaparser.as... | 1 | 11,639 | Huh? The point is that a cast isn't necessary | javaparser-javaparser | java |
@@ -35,4 +35,12 @@ const (
//
// Default is "true"
CreateDefaultStorageConfig menv.ENVKey = "OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG"
+
+ // InstallCRD is the environment
+ // variable that flags if maya apiserver should install the CRDs
+ // As the installation moves towards helm 3, the responsibility of instal... | 1 | /*
Copyright 2018-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,... | 1 | 18,461 | can we name it like `InstallV1Alpha1CRDs` ? | openebs-maya | go |
@@ -79,6 +79,7 @@ const (
deleteAfterAnnotation = "hive.openshift.io/delete-after"
tryInstallOnceAnnotation = "hive.openshift.io/try-install-once"
tryUninstallOnceAnnotation = "hive.openshift.io/try-uninstall-once"
+ hiveutilCreatedLabel = "hive.openshift.io/hiveutil-created"
cloudAWS ... | 1 | package createcluster
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"os/user"
"path/filepath"
"strings"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachiner... | 1 | 10,345 | I need something to match when creating selectorsyncsets so added this label. | openshift-hive | go |
@@ -47,7 +47,9 @@ module RSpec
return nil if line == '-e:1'.freeze
line
rescue SecurityError
+ # :nocov:
nil
+ # :nocov:
end
# @private | 1 | module RSpec
module Core
# Each ExampleGroup class and Example instance owns an instance of
# Metadata, which is Hash extended to support lazy evaluation of values
# associated with keys that may or may not be used by any example or group.
#
# In addition to metadata that is used internally, this ... | 1 | 15,838 | Isn't `nil` the default return value from an empty `rescue` clause? If that's correct, then we could just remove the `nil` line entirely as it doesn't serve a purpose. | rspec-rspec-core | rb |
@@ -1,11 +1,14 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX - License - Identifier: Apache - 2.0
+# Purpose
+# This code example demonstrates how to add a cross-origin resource sharing (CORS)
+# configuration containing a single rule to an Amazon Simple Storage Solution (Amazon S3)... | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX - License - Identifier: Apache - 2.0
require 'aws-sdk-s3'
# Adds a cross-origin resource sharing (CORS) configuration containing
# a single rule to an Amazon S3 bucket.
#
# Prerequisites:
#
# - An Amazon S3 bucket.
#
# @param s3... | 1 | 20,547 | Simple Storage **Service** | awsdocs-aws-doc-sdk-examples | rb |
@@ -471,6 +471,9 @@ func (r *Repository) LoadIndex(ctx context.Context) error {
return err
}
+ // remove obsolete indexes
+ validIndex.Sub(r.idx.Obsolete())
+
// remove index files from the cache which have been removed in the repo
return r.PrepareCache(validIndex)
} | 1 | package repository
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"os"
"sync"
"github.com/restic/chunker"
"github.com/restic/restic/internal/backend/dryrun"
"github.com/restic/restic/internal/cache"
"github.com/restic/restic/internal/crypto"
"github.com/restic/restic/internal/debug"
"github.com/re... | 1 | 13,486 | Wouldn't that cause the obsolete indexes to be downloaded over and over again? After all these are still stored in the repository. | restic-restic | go |
@@ -0,0 +1,19 @@
+class FeedbackController < ApplicationController
+ # note that index is rendered implicitly as it's just a template
+
+ def create
+ message = []
+ [:bug, :context, :expected, :actually, :comments, :satisfaction, :referral].each do |key|
+ if !params[key].blank?
+ message << "#{key... | 1 | 1 | 13,254 | We might want to move this logic to a Plain Old Ruby Object down the road. Not a blocker. | 18F-C2 | rb | |
@@ -1482,7 +1482,9 @@ Blockly.WorkspaceSvg.prototype.updateToolbox = function(tree) {
this.options.languageTree = tree;
this.flyout_.show(tree.childNodes);
}
- this.toolbox_.position();
+ if (this.toolbox_) {
+ this.toolbox_.position();
+ }
};
/** | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2014 Google Inc.
* https://developers.google.com/blockly/
*
* 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.apach... | 1 | 8,271 | move `this.toolbox_.position();` to just after line 1477. Context: the if statement on line 1472 checks whether this is a toolbox with categories, and if so it populates the toolbox. Positioning the toolbox is a reasonable followup to that, and means you don't need an extra if. You may also need to call `this.flyout_.p... | LLK-scratch-blocks | js |
@@ -364,10 +364,10 @@ namespace pwiz.Skyline.EditUI
var peptideDocNode = tuple.Item2;
HashSet<Protein> proteins = new HashSet<Protein>();
var peptideGroupDocNode = PeptideGroupDocNodes.First(g => ReferenceEquals(g.PeptideGroup, pepti... | 1 | /*
* Original author: Nick Shulman <nicksh .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2009 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in complia... | 1 | 14,331 | Should the function above be .FirstOrDefault() instead? Otherwise, why check for null and tell ReSharper to ignore the fact that it can never be null? | ProteoWizard-pwiz | .cs |
@@ -17,7 +17,9 @@ var fetch = {},
_ = require('underscore'),
crypto = require('crypto'),
usage = require('./usage.js'),
- plugins = require('../../../plugins/pluginManager.js');
+ STATUS_MAP = require('../jobs/job').STATUS_MAP,
+ plugins = require('../../../plugins/pluginManager.js'),
+ count... | 1 | /**
* This module is meant from fetching data from db and processing and outputting
* @module api/parts/data/fetch
*/
/** @lends module:api/parts/data/fetch */
var fetch = {},
common = require('./../../utils/common.js'),
async = require('async'),
countlyModel = require('../../lib/countly.model.js'),
co... | 1 | 13,634 | Let's not create new connection, but rather user `common.db` one | Countly-countly-server | js |
@@ -0,0 +1,11 @@
+module OpenGraphHelper
+ def open_graph_tags
+ tag('meta', property: 'og:image', content: image_url('learn/learn-ralph.png'))
+ end
+
+ private
+
+ def image_url(filename)
+ URI.join(root_url, image_path(filename))
+ end
+end | 1 | 1 | 6,519 | Can this use asset_path rather than defining an image_url helper? | thoughtbot-upcase | rb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.