text
stringlengths
5.51k
28.1k
// Code generated by protoc-gen-go. DO NOT EDIT. // source: config/service/db/postgres/v1/database.proto package postgresv1 import ( fmt "fmt" _ "github.com/envoyproxy/protoc-gen-validate/validate" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not othe...
// Copyright 2021 Security Scorecard 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 ...
package app import ( "bytes" "encoding/json" "errors" "fmt" "math/big" "os" "os/signal" "sync" "syscall" log "github.com/Sirupsen/logrus" "github.com/google/uuid" "github.com/ubclaunchpad/cumulus/blockchain" "github.com/ubclaunchpad/cumulus/conf" "github.com/ubclaunchpad/cumulus/conn" "github.com/ubcl...
/* Copyright 2018 the Heptio Ark contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writ...
/* * 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 ...
// transform cbor encoded data into golang native data. // cnf: - package gson import "math" import "math/big" import "regexp" import "time" import "encoding/binary" import "fmt" func cbor2value(buf []byte, config *Config) (interface{}, int) { item, n := cbor2valueM[buf[0]](buf, config) if _, ok := item.(CborIndef...
/* * * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
package sql import ( "context" "fmt" "strings" "github.com/znbasedb/znbase/pkg/internal/client" "github.com/znbasedb/znbase/pkg/roachpb" "github.com/znbasedb/znbase/pkg/security/privilege" "github.com/znbasedb/znbase/pkg/sql/parser" "github.com/znbasedb/znbase/pkg/sql/pgwire/pgcode" "github.com/znbasedb/znba...
// 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 not...
package earthquake import ( "math" "net/url" "strconv" "time" ) type ( // Query method Parameters // These parameters should be submitted as key=value pairs using the HTTP GET method and may not be specified more than once; if a parameter is submitted multiple times the result is undefined. queryParameters str...
/* * Copyright (C) 2019 ING BANK N.V. * * This program 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 the License, or * (at your option) any later version. * * This program ...
package node import ( "context" "encoding/binary" "fmt" "io" "net" "strconv" "strings" "sync" "time" "github.com/ergo-services/ergo/lib" ) const ( EPMD_ALIVE2_REQ = 120 EPMD_ALIVE2_RESP = 121 EPMD_PORT_PLEASE2_REQ = 122 EPMD_PORT2_RESP = 119 EPMD_NAMES_REQ = 110 // $n EPMD_DUMP_REQ = 100 //...
package irmaclient import ( "crypto/rand" "crypto/sha256" "encoding/base64" "math/big" "strconv" "github.com/go-errors/errors" "github.com/mhe/gabi" "github.com/privacybydesign/irmago" ) // This file contains an implementation of the client side of the keyshare protocol, // as well as the keyshareSessionHand...
package smugmug import ( "encoding/json" "io" "strconv" "time" ) type Fault struct { Code int `json:"code"` Message string `json:"message"` } func (f *Fault) Error() string { return f.Message } type Coordinate float64 // UnmarshalJSON converts the json value to a coordinate func (c *Coordinate) Unmars...
package meta import ( "fmt" "io" "io/ioutil" "net/url" "reflect" "strconv" ) type Valuer interface { ParseOptions(tag reflect.StructTag) interface{} JSONValue(path string, value interface{}, options interface{}) Errorable } var ( reflectTypeValuer = reflect.TypeOf((*Valuer)(nil)).Elem() ) type Optionaler i...
package cyclonedx import ( "io" "sort" "strconv" "strings" "time" cdx "github.com/CycloneDX/cyclonedx-go" "github.com/google/uuid" "golang.org/x/exp/maps" "golang.org/x/xerrors" "k8s.io/utils/clock" ftypes "github.com/aquasecurity/fanal/types" dtypes "github.com/aquasecurity/trivy-db/pkg/types" "github....
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.6.1 // source: protos/output/languageSpecific/buildDirectory.proto package languageSpecific import ( helpers "code-analyser/protos/pb/helpers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" ...
package state import ( "bytes" "crypto/sha256" "encoding/binary" "errors" "fmt" "sort" "sync" "time" "github.com/AccumulateNetwork/accumulated/smt/common" "github.com/AccumulateNetwork/accumulated/smt/managed" "github.com/AccumulateNetwork/accumulated/smt/pmt" "github.com/AccumulateNetwork/accumulated/smt...
package fcfonts import ( "fmt" "os" "strings" fc "github.com/benoitkugler/textlayout/fontconfig" "github.com/benoitkugler/textlayout/fonts" "github.com/benoitkugler/textlayout/harfbuzz" "github.com/benoitkugler/textlayout/pango" ) // pangofc-fontmap.c: Base fontmap type for fontconfig-based backends /* * Pa...
/* Copyright 2016 The Rook 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 applicable law or agreed to ...
/* Copyright 2021 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, ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: pkg/webview/log.proto package webview import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" ) // Reference imports to suppress errors if they are not otherwise used. var _ = prot...
package runner import ( "github.com/Athena1337/blackJack/brute" "github.com/Athena1337/blackJack/config" "github.com/Athena1337/blackJack/finger" "github.com/Athena1337/blackJack/utils" "crypto/tls" "errors" "fmt" "github.com/hashicorp/go-retryablehttp" "github.com/projectdiscovery/cdncheck" "github.com/proj...
// fzgo is a simple prototype of integrating dvyukov/go-fuzz into 'go test'. // // See the README at https://github.com/thepudds/fzgo for more details. // // There are three main directories used: // // 1. cacheDir is the location for the instrumented binary, and would typically be something like: // GOPATH/pkg...
package rsyncd import ( "bufio" "context" "encoding/binary" "fmt" "io" "log" "math" "net" "os" "os/user" "path/filepath" "strconv" "strings" "syscall" "github.com/DavidGamba/go-getoptions" "github.com/stapelberg/rsync-os/rsync" "golang.org/x/crypto/md4" ) type Module struct { name string path stri...
package search import ( "fmt" "sync" "sync/atomic" "time" . "github.com/amanjpro/zahak/engine" . "github.com/amanjpro/zahak/evaluation" ) type Runner struct { mu sync.RWMutex Engines []*Engine globalInfo Info nodesVisited int64 Stop bool TimeManager *TimeManager DebugMode bo...
package main import ( "archive/tar" "bytes" "compress/gzip" "context" "encoding/base64" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "os" "path" "sort" "strings" "time" "github.com/blang/semver" "github.com/google/go-github/v28/github" "github.com/h2non/filetype" svg "github.com/h2non/go-is-sv...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: proto/target/target.proto // Package target contains messages for defining a configuration of a caching // collector to connect to multiple gNMI targets. package target import ( fmt "fmt" proto "github.com/golang/protobuf/proto" gnmi "github.com/openconf...
/* Copyright 2019 The saiki 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, softwa...
package fakers import ( "fmt" "math/rand" "strconv" "time" "github.com/icrowley/fake" ) // NewFakers returns a map of the available fakers func NewFakers() map[string]func(args ...interface{}) interface{} { return map[string]func(args ...interface{}) interface{}{ "brand": Brand, "charact...
// // Copyright 2016, <NAME> // // 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 w...
/* SPDX-License-Identifier: BSD-3-Clause-Open-MPI */ package plugin import ( "encoding/json" "fmt" "os" "regexp" "strings" "github.com/open-dovetail/fabric-chaincode/plugin/contract" "github.com/pkg/errors" "github.com/project-flogo/cli/common" // Flogo CLI support code "github.com/project-flogo/core/action...
package controllers import ( "context" "encoding/json" "fmt" "strings" "time" dioscuriv1 "github.com/amazeeio/dioscuri/api/v1" "github.com/go-logr/logr" routev1 "github.com/openshift/api/route/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.i...
package nais_io_v1alpha1 import ( "encoding/json" "fmt" "strconv" "github.com/google/uuid" hash "github.com/mitchellh/hashstructure" "github.com/nais/liberator/pkg/apis/nais.io/v1" log "github.com/sirupsen/logrus" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/ru...
package auth import ( "go.uber.org/zap" "goskeleton/app/global/variable" "goskeleton/app/model" "strconv" "strings" ) func CreateAuthMenuAssignFactory(sqlType string) *AuthMenuAssignModel { return &AuthMenuAssignModel{BaseModel: model.BaseModel{DB: model.UseDbConn(sqlType)}} } type AuthMenuAssignModel struct {...
package main import ( "flag" "fmt" "math/rand" "os" "os/signal" "path/filepath" "strconv" "syscall" "time" "github.com/cenkalti/backoff" "github.com/pkg/errors" "github.com/yahoo/k8s-athenz-identity/pkg/log" "github.com/yahoo/k8s-athenz-identity/pkg/util" "github.com/AthenZ/k8s-athenz-sia/pkg/identity"...
package main import "sync" import "sort" import "fmt" type Canvas interface { PutRGB(ObjectPosition, [][3]byte, int, [3]byte, [3]byte, bool) GetTime() uint32 } type ObjectPosition struct { X, Y int } func (o *ObjectPosition) Less(p *ObjectPosition) bool { if o.Y < p.Y { return true } if o.Y == p.Y && o.X < ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v1/common/asset_types.proto package common // import "google.golang.org/genproto/googleapis/ads/googleads/v1/common" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import wrappers "github.com/golang/p...
package parser import ( . "lxa/compiler/ast" . "lxa/compiler/token" ) /* stat ::= ';' | assignment ';' | break | continue | while {assignment ';'} exp '{' block '}' | if {assignment ';'} exp '{' block '}' {else if {assignment ';'} exp '{' block '}'} [else '{' block '}'] | for assignment ';' exp ...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.15.7 // source: clusterpb/cluster.proto package clusterpb import ( projectpb "bitbucket.org/latonaio/aion-core/proto/projectpb" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc...
package github import ( "bytes" "context" "encoding/json" "fmt" "net/http" "net/url" "strconv" "strings" "time" "github.com/Masterminds/semver" "github.com/graphql-go/graphql/language/ast" "github.com/graphql-go/graphql/language/parser" "github.com/graphql-go/graphql/language/visitor" "github.com/incons...
// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // The sandbox program is an HTTP server that receives untrusted // linux/amd64 binaries in a POST request and then executes them in // a gvisor sandbox using D...
// Copyright 2015 The Go 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 obj import ( "bufio" "bytes" "fmt" "io" "log" "os" "strings" "time" ) const REG_NONE = 0 var start time.Time func Cputime() float64 { if s...
// Copyright 2013 The Go 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 types2 import ( "bytes" "cmd/compile/internal/syntax" "fmt" "go/constant" "go/token" ) // An Object describes a named language entity such as a p...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package service import ( "github.com/hyperledger/fabric/fastfabric/cached" "sync" "github.com/hyperledger/fabric/common/metrics" "github.com/hyperledger/fabric/core/committer" "github.com/hyperledger/fabric/core/committer/txvali...
// Copyright 2017 gf Author(https://github.com/jin502437344/gf). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/jin502437344/gf. package ghttp import ( "crypto/tls" "...
// Copyright 2019 Drone IO, 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...
/* Copyright IBM Corp All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package ledger import ( "encoding/json" "io/ioutil" "os" "path/filepath" "syscall" docker "github.com/fsouza/go-dockerclient" "github.com/Randyshu2018/fabric/integration/nwo" "github.com/Randyshu2018/fabric/integration/nwo/com...
// Copyright 2018 <NAME> // // 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 writi...
/* * Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licen...
// Copyright 2016-2019 Authors of Cilium // // 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...
// Copyright 2018 The gVisor 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...
package puddle import ( "context" "errors" "sync" "time" ) const ( resourceStatusConstructing = 0 resourceStatusIdle = iota resourceStatusAcquired = iota resourceStatusHijacked = iota ) // ErrClosedPool occurs on an attempt to acquire a connection from a closed pool // or a pool that is close...
package main import ( "fmt" "log" "net" "strconv" "strings" "sync" "time" "github.com/btcsuite/btcd/wire" ) const ( // NOUNCE is used to check if we connect to ourselves // as we don't listen we can use a fixed value nounce = 0x0539a019ca550825 minPort = 0 maxPort = 65535 crawlDelay = 22 // seconds ...
// Copyright 2021 The Chromium OS 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 tlslib import ( "context" "encoding/json" "fmt" "log" "net/url" "path" "regexp" "strconv" "strings" "go.chromium.org/chromiumos/con...
package airgap // An InstallBundle is a binary file with a magic number AIB-1\n\n followed by a tar: // // hab/cache/artifacts/ // contains all the required hartifacts. These will be moved into /hab/cache/artifacts // // hab/cache/keys/ // contains all the keys for the artifacts. These will be moved into /hab/...
// Copyright 2017 Monax Industries Limited // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
package cpu import ( "testing" ) var sbcTruthTable [72][10]uint8 = [72][10]uint8{ // a, r, C before, a-r, C, N, PV, H, Z, S [10]uint8{0, 0, 0, 0, 0, 1, 0, 0, 1, 0}, [10]uint8{0, 1, 0, 255, 1, 1, 0, 1, 0, 1}, [10]uint8{0, 127, 0, 129, 1, 1, 0, 1, 0, 1}, [10]uint8{0, 128, 0, 128, 1, 1, 1, 0, 0, 1}, [10]uint8{0, ...
// Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum 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 the License...
package pod_scaler import ( "encoding/json" "fmt" "math" "sort" "strings" "time" "github.com/openhistogram/circonusllhist" "github.com/prometheus/common/model" "github.com/sirupsen/logrus" prowv1 "k8s.io/test-infra/prow/apis/prowjobs/v1" "k8s.io/test-infra/prow/kube" buildv1 "github.com/openshift/api/bu...
package http import ( "bytes" "context" "fmt" "io" "mime" "mime/multipart" "net/http" "net/textproto" "net/url" "strconv" "strings" "sync" "time" "github.com/benthosdev/benthos/v4/internal/bloblang/field" "github.com/benthosdev/benthos/v4/internal/bundle" "github.com/benthosdev/benthos/v4/internal/com...
package main import ( "bytes" "flag" "fmt" "go/token" "io" "io/fs" "log" "math" "os" "path/filepath" "regexp" "runtime" "runtime/pprof" "strings" "sync" "sync/atomic" "text/template" "time" "github.com/google/pprof/profile" "github.com/quasilyte/gogrep" "github.com/quasilyte/gogrep/filters" "git...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v2/errors/billing_setup_error.proto package errors import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" ) // Reference imports to suppress errors if they ...
package bot import ( "errors" "fmt" "sync" ) var ( // ErrProtocolServerMismatch server && proto must match ErrProtocolServerMismatch = errors.New("the specified protocol and server do not correspond to this bot instance") errNoChannelSpecified = errors.New("no channel was specified for this message") ) // ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v2/resources/ad_group_extension_setting.proto package resources import ( fmt "fmt" math "math" proto "github.com/catper/protobuf/proto" wrappers "github.com/catper/protobuf/ptypes/wrappers" enums "google.golang.org/genproto/googlea...
package website import ( "fmt" "log" "net/http" "net/http/pprof" "strconv" "strings" "text/template" "time" "github.com/gbl08ma/ankiddie" "github.com/underlx/disturbancesmlx/compute" "github.com/underlx/disturbancesmlx/utils" "github.com/gbl08ma/keybox" "github.com/gbl08ma/sqalx" "github.com/gbl08ma/ss...
package main import ( "bytes" "fmt" "io/ioutil" "os" "path/filepath" "sort" "strconv" "strings" ) var maxKey int func die(why string, args ...interface{}) { fmt.Fprintf(os.Stderr, why+"\n", args...) os.Exit(1) } type ( // LineWriter writes lines at a time. LineWriter struct { buf *bytes.Buffer line...
// Copyright (c) 2019, The GoKi 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 gi3d import ( "fmt" "image" "log" "reflect" "sync" "github.com/goki/gi/gi" "github.com/goki/gi/oswin" "github.com/goki/gi/oswin/mouse" ...
// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the Lice...
package workerutil import ( "context" "database/sql" "time" "github.com/keegancsmith/sqlf" "github.com/sourcegraph/sourcegraph/internal/db/basestore" ) // Store is the database layer for the workerutil package that handles worker-side operations. type Store interface { basestore.ShareableStore // Done perfor...
package main import ( "encoding/hex" "encoding/json" "flag" "fmt" "io/ioutil" "log" "os" "runtime/pprof" "strconv" "time" "github.com/lengzhao/govm/wallet" ) // Config config type Config struct { WalletFile string `json:"wallet_file,omitempty"` Password string `json:"password,omitemp...
// Copyright © 2019 The VirusTotal CLI 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 require...
package tc import ( "time" "github.com/apache/trafficcontrol/lib/go-util" ) /* * 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 t...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc v3.12.3 // source: planet_express_service.proto package planetexpress import ( context "context" proto "github.com/golang/protobuf/proto" empty "github.com/golang/protobuf/ptypes/empty" grpc "google.golang.or...
package ibc import ( "bytes" "encoding/json" "errors" "fmt" "net/url" "strconv" "strings" abci "github.com/tendermint/abci/types" "github.com/internet-com/go-wire" merkle "github.com/tendermint/merkleeyes/iavl" cmn "github.com/tendermint/tmlibs/common" "github.com/tendermint/basecoin/types" tm "github.c...
// Copyright (c) 2019 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...
// Copyright 2014 Docker authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the DOCKER-LICENSE file. package archive import ( "archive/tar" "bufio" "compress/gzip" "fmt" "io" "log" "os" "path/filepath" "strings" "github.com/docker/docker/pkg/...
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
// Copyright (c) 2019-2020 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. /* Package blockcf2 provides functions for building committed filters for blocks using Golomb-coded sets in a way that is useful for light clients such as SPV wallets. Co...
package mpjvm import ( "flag" "fmt" "io/ioutil" "os" "os/exec" "strconv" "strings" "time" "github.com/Songmu/timeout" mp "github.com/mackerelio/go-mackerel-plugin-helper" "github.com/mackerelio/golib/logging" ) var logger = logging.GetLogger("metrics.plugin.jvm") // JVMPlugin plugin for JVM type JVMPlugi...
/*** Copyright 2018 Cisco Systems 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 applicable law or agreed to...
/* * Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licen...
// Package calc implements the mathematical formulas for modelling road cycling // power outlined by Martin et al's 'Validation of a Mathematical Model for // Road Cycling Power' (https://www.ncbi.nlm.nih.gov/pubmed/28121252) and other // miscellaenous cycling power related formulas. package calc import ( "math" ) /...
/* * * Copyright 2020 gRPC 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...
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // TODO(andybons): add logging // TODO(andybons): restrict memory use package main import ( "bytes" "context" "crypto/sha256" "encoding/json" "fmt" "go/...
// This module manages Cisco's intercept feature for IP. // // This MIB is used along with CISCO-TAP2-MIB to // intercept IP traffic. CISCO-TAP2-MIB along with // specific filter MIBs like this MIB replace // CISCO-TAP-MIB. // // To create an IP intercept, an entry citapStreamEntry // is created which contains the ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: peer/proposal.proto package peer import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This s...
// Package ec provides erasure coding (EC) based data protection for AIStore. /* * Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved. */ package ec import ( "bytes" "errors" "fmt" "io" "os" "sync" "time" "github.com/NVIDIA/aistore/3rdparty/atomic" "github.com/NVIDIA/aistore/3rdparty/glog" "...
package proto import ( "fmt" "reflect" "strconv" "strings" "sync" "sync/atomic" ) // Kind is an enumeration representing the various data types supported by the // protobuf language. type Kind int const ( Bool Kind = iota Int32 Int64 Sint32 Sint64 Uint32 Uint64 Fix32 Fix64 Sfix32 Sfix64 Float Doub...
// Copyright 2019 The Cockroach Authors. // // Licensed as a CockroachDB Enterprise file under the Cockroach Community // License (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // https://github.com/cockroachdb/cockroach/blob/master/li...
package box2d import ( "math" ) /// Friction mixing law. The idea is to allow either fixture to drive the friction to zero. /// For example, anything slides on ice. func B2MixFriction(friction1, friction2 float64) float64 { return math.Sqrt(friction1 * friction2) } /// Restitution mixing law. The idea is allow for...
// Package ais provides core functionality for the AIStore object storage. /* * Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved. */ package ais import ( "errors" "flag" "fmt" "os" "strings" "github.com/NVIDIA/aistore/3rdparty/glog" "github.com/NVIDIA/aistore/cluster" "github.com/NVIDIA/aist...
package parser import ( "encoding/json" "fmt" "io/ioutil" "regexp" "strings" "testing" "github.com/actions/workflow-parser/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestParseEmptyConfig(t *testing.T) { workflow, err := parseString("") assertParseSuccess(t, er...
// Copyright (c) 2022 Zededa, Inc. // SPDX-License-Identifier: Apache-2.0 package depgraph import ( "fmt" "sort" ) // graph implements Graph interface. type graph struct { name string description string parent *graph root *graph pathFromRoot SubGraphPath subgraphs graphs nodes map[...
// Copyright 2019 Hewlett Packard Enterprise Development LP package logger import ( "context" "fmt" "io" "io/ioutil" "net/http" "os" "path" "runtime" "strconv" "strings" "sync" "time" log "github.com/sirupsen/logrus" "golang.org/x/crypto/ssh/terminal" "gopkg.in/natefinch/lumberjack.v2" ) const ( Def...
package siteConfig import ( "bytes" base64 "encoding/base64" "errors" "fmt" "io" "log" "path/filepath" "reflect" "strings" "text/template" "unicode" yaml "gopkg.in/yaml.v3" ) type SiteConfigBuilder struct { SourceClusterCRs []interface{} scBuilderExtraManifestPath string } func NewSiteConfig...
package proxy import ( "bytes" "encoding/base64" "fmt" "io" "io/ioutil" "log" "net" "net/http" "net/http/httputil" "net/url" "regexp" "strings" "sync" "time" ) func (apiServer *APIServer) newHandler(api *apiStruct) func(http.ResponseWriter, *http.Request) { bindPath := api.Path log.Println(apiServer.S...
package color /* */ import ( "math" "strconv" ) // Custom types to hold return values // The RGB type holds three values: one for red (R), green, (G) and // blue (B). Each of these colors are on the domain of [0, 255]. type RGB struct { R int `json:"R"` G int `json:"G"` B int `json:"B"` } // HSV type holds t...
/* * Copyright NetApp Inc, 2021 All rights reserved Package Description: The Prometheus exporter exposes metrics to the Prometheus DB over an HTTP server. It consists of two concurrent components: - the "actual" exporter (this file): receives metrics from collectors, renders into the Prometheus ...
/* Package ring implements a simple ring CRDT. */ package ring import ( "bytes" "errors" "fmt" "io" "math/rand" "sort" "time" "github.com/weaveworks/mesh" "github.com/weaveworks/weave/common" "github.com/weaveworks/weave/net/address" ) type OnUpdate func(prev, curr []address.Range, local bool) // Ring re...