text
stringlengths
5.51k
28.1k
/* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License ...
// Copyright 2021 IBM 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 in w...
// 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 loganal import ( "fmt" "regexp" "strconv" "strings" "sync" ) // Failure records a failure extracted from an all.bash log. type Failure struct { ...
package main import ( "encoding/json" "fmt" "net" "net/http" "os" "runtime" "strings" "time" "github.com/bborbe/auth-http-proxy/auth" flag "github.com/bborbe/flagenv" http_client_builder "github.com/bborbe/http/client_builder" "github.com/bborbe/http_handler/auth_basic" "github.com/bborbe/http_handler/au...
// +build f746xx package flash // DO NOT EDIT THIS FILE. GENERATED BY xgen. import ( "bits" "mmio" "unsafe" "stm32/o/f746xx/mmap" ) type FLASH_Periph struct { ACR RACR KEYR RKEYR OPTKEYR ROPTKEYR SR RSR CR RCR OPTCR [2]ROPTCR } func (p *FLASH_Periph) BaseAddr() uintptr { return uintp...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.19.4 // source: envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.proto package v1alpha1 import ( _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate"...
package validator var iso3166_1_alpha2 = map[string]bool{ // see: https://www.iso.org/iso-3166-country-codes.html "AF": true, "AX": true, "AL": true, "DZ": true, "AS": true, "AD": true, "AO": true, "AI": true, "AQ": true, "AG": true, "AR": true, "AM": true, "AW": true, "AU": true, "AT": true, "AZ": true, "BS": tr...
// Copyright 2019 Liquidata, 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 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
package iris_test import ( "encoding/json" "encoding/xml" "fmt" "io/ioutil" "net/http" "net/url" "strconv" "strings" "testing" "time" "github.com/iris-contrib/httpexpect" "github.com/iris-framework/iris" "github.com/iris-framework/iris/adaptors/httprouter" "github.com/iris-framework/iris/httptest" ) //...
/* Package main implements a simple web app for collecting and charging credit cards. This app was designed for use in companies that collect their clients cards and process charges without the client needing to provide card information with every purchase. Companies that use this app don't have to store credit card i...
package memberlist import ( "bytes" "crypto/md5" "flag" "fmt" "io" "io/ioutil" "net" "sync" "sync/atomic" "time" "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" "github.com/hashicorp/go-sockaddr" "github.com/hashicorp/memberlist" "github.com/prometheus/client_golang/prometheus" "github....
// Code generated by protoc-gen-go. // source: github.com/golang/protobuf/ptypes/struct/struct.proto // DO NOT EDIT! /* Package structpb is a generated protocol buffer package. It is generated from these files: github.com/golang/protobuf/ptypes/struct/struct.proto It has these top-level messages: Struct Value Li...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v1/services/geographic_view_service.proto package services import ( context "context" fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" resources "google.golang.org/genproto/googleapis/ads/googleads/v1/resources" _ "g...
package rtnetlink import ( "errors" "fmt" "net" "github.com/mdlayher/netlink" "github.com/mdlayher/netlink/nlenc" "golang.org/x/sys/unix" ) var ( // errInvalidLinkMessage is returned when a LinkMessage is malformed. errInvalidLinkMessage = errors.New("rtnetlink LinkMessage is invalid or too short") // errI...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/admin/v2alpha/clusters.proto /* Package envoy_admin_v2alpha is a generated protocol buffer package. It is generated from these files: envoy/admin/v2alpha/clusters.proto envoy/admin/v2alpha/config_dump.proto envoy/admin/v2alpha/metrics.proto It has ...
// Package server runs the http server after initializing the database. package server import ( "compress/gzip" "encoding/json" "fmt" "html/template" "io" "io/fs" "log" "net/http" "strconv" "strings" "time" "github.com/jacobpatterson1549/nate-mlb/go/db" "github.com/jacobpatterson1549/nate-mlb/go/request"...
package main import ( "fmt" "forjj/creds" "forjj/forjfile" "forjj/utils" "log" "net/url" "os" "path" "strings" "github.com/forj-oss/forjj-modules/cli" "github.com/forj-oss/forjj-modules/trace" ) const Workspace_Name = ".forj-workspace" // ParseContext : Load cli context to adapt the list of options/flags...
// Copyright (c) 2020 Red Hat, Inc. // Copyright Contributors to the Open Cluster Management project package controllers import ( "context" "fmt" "os" "reflect" "strconv" "time" "github.com/go-logr/logr" searchv1alpha1 "github.com/stolostron/search-operator/api/v1alpha1" appv1 "k8s.io/api/apps/v1" corev1 "...
package leaves import ( "errors" "fmt" "io" "sort" "strings" "time" "github.com/gogo/protobuf/proto" "gopkg.in/src-d/go-git.v4" "gopkg.in/src-d/go-git.v4/plumbing" "gopkg.in/src-d/go-git.v4/plumbing/object" "gopkg.in/src-d/hercules.v10/internal/core" "gopkg.in/src-d/hercules.v10/internal/pb" items "gopkg...
package server import ( "context" "encoding/json" "fmt" "log" "math/big" "sync" "time" "github.com/DisgoOrg/disgohook/api" "github.com/hectorchu/gonano/rpc" "github.com/hectorchu/gonano/wallet" "github.com/palantir/stacktrace" "github.com/patrickmn/go-cache" uuid "github.com/satori/go.uuid" "github.com/...
// Copyright (c) 2019, The Emergent 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 pbwm import ( "github.com/chewxy/math32" "github.com/emer/etable/minmax" "github.com/emer/leabra/deep" "github.com/dhairyyas/leabra-slee...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v3/resources/geo_target_constant.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/googleapis/ads...
package mos65c02 import ( "reflect" "runtime" "strings" ) // An AddrMode is a function which resolves what the effective address // (EffAddr) is given the current state of the CPU. type AddrMode func(c *CPU) // AddrSpace is the total number of addressable values that an MOS 65c02 // processor can work with. It's ...
package godog import ( "bytes" "fmt" "io" "os" "reflect" "regexp" "strconv" "strings" "sync" "text/template" "time" "unicode" "github.com/cucumber/godog/colors" "github.com/cucumber/messages-go/v10" ) // some snippet formatting regexps var snippetExprCleanup = regexp.MustCompile("([\\/\\[\\]\\(\\)\\\\...
package voice import ( "context" "net" "sync" "time" "github.com/diamondburned/arikawa/v3/state" "github.com/diamondburned/arikawa/v3/utils/handler" "github.com/diamondburned/arikawa/v3/utils/ws/ophandler" "github.com/pkg/errors" "github.com/diamondburned/arikawa/v3/discord" "github.com/diamondburned/arik...
package zff0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f import ( "encoding/json" "github.com/govm-net/govm/runtime" ) type dbTransInfo struct{} type dbCoin struct{} type dbStat struct{} type dbApp struct{} type dbDepend struct{} type logBlockInfo struct{} type logSync struct{} // Hash The KEY of...
package integration_tests import ( "fmt" "io/ioutil" "net" "os" "os/exec" "time" "bosh-dns/acceptance_tests/helpers" "bosh-dns/dns/server/handlers" "bosh-dns/dns/server/record" testrecursor "bosh-dns/acceptance_tests/dns-acceptance-release/src/test-recursor/config" gomegadns "bosh-dns/gomega-dns" "git...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: lint.proto package gitalypb import ( fmt "fmt" proto "github.com/golang/protobuf/proto" descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto....
// Package photosrv is a sharding http reverse proxy library supporting CHash and JumpHash // (see github.com/dgryski/go-shardedkv/). See the README for more details and examples. package photosrv import ( "bufio" "bytes" "errors" "expvar" "flag" "fmt" "io" "io/ioutil" "math/rand" "net/http" "net/http/httpu...
/* Copyright 2014 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, ...
package datamatrix import ( "testing" "github.com/makiuchi-d/gozxing" "github.com/makiuchi-d/gozxing/testutil" ) const ( dm4str = "" + " \n" + " \n" + " ## ## ## ## ## ## ## ## \n" + " ## #### #### ## ####...
// Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. package arbostestcontracts import ( "math/big" "strings" ethereum "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "githu...
package proxy import ( "fmt" "log" "os" "os/exec" "path/filepath" "sync" "time" "github.com/hashicorp/consul/agent/local" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/go-multierror" ) const ( // ManagerCoalescePeriod and ManagerQuiescentPeriod relate to how // notifications in update...
// Copyright Istio 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 wri...
/* Copyright 2017 Heptio 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 writing, software dis...
package metrics import ( "context" "fmt" "net/http" "net/http/pprof" "regexp" "strconv" "strings" "time" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_go...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v2/resources/feed_item_target.proto package resources import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" common "google.golang.org/genproto/googleapis/ads/g...
package variant import ( "bufio" "fmt" log "github.com/sirupsen/logrus" "github.com/pkg/errors" "os" "os/exec" "strings" "syscall" "archive/tar" "compress/gzip" "github.com/logrusorgru/aurora" "io" "path/filepath" "runtime" ) type ScriptStepLoader struct{} func (l ScriptStepLoader) LoadStep(def StepD...
package game import "testing" func TestRoomCapacity(t *testing.T) { testRooms := []struct { ID Room Level int Size int Expected int Type Storage }{ // food 1 {4, 1, 1, 50, Food}, {4, 1, 2, 100, Food}, {4, 1, 3, 150, Food}, {4, 2, 1, 75, Food}, {4, 2, 2, 150, Food}, {4, 2, 3,...
package gpcprocessmgr import ( "context" "fmt" "gpcconfig" "gpclogging" "io" "os" "os/exec" "strconv" "sync" "syscall" "time" ) //####################################################### //### GLOBAL VARIABLES, INIT, CONSTS //####################################################### var gProcRuntimeData map[...
package v1 import ( "encoding/json" "platform_report/dao" "platform_report/pkg/util" "platform_report/service" "strconv" "github.com/360EntSecGroup-Skylar/excelize" "github.com/gin-gonic/gin" ) /** * @api {Get} /api/v1/report/support 获取报表支持的搜素条件 * @apiName api.Support * @apiGroup report 报表 * @apiHeader {Strin...
// Package cmd is a minimalistic library that enables easy sub commands with the standard `flag` library. // // This library extends the standard library `flag` package to support sub commands and more // features in a minimalistic and idiomatic API. // // Features: // // - [x] Sub commands. // // - [x] Automatic bash ...
package main import ( "errors" "flag" "fmt" "io" "math/rand" "os" "path/filepath" "strconv" "strings" "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/s3" ) const ( // constant for default rand...
// // Copyright:: Copyright 2017-2018 Chef Software, Inc. // License:: Apache License, Version 2.0 // // 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...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/spanner/v1/result_set.proto package spanner import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "google.golang.org/genproto/googleapis/api/annotations" import google_protobuf1 "github.com/golang/protob...
package testhelpers import ( "bytes" "fmt" "io" "io/ioutil" "log" "net/http" "net/http/httptest" "os" "strings" "testing" "time" "github.com/cloudfoundry-community/go-cfenv" "github.com/gocraft/web" "github.com/gorilla/sessions" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ...
/* MIT License Copyright (c) 2018,2020 ifritJP 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, d...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.17.3 // source: api.proto package v1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/type...
package gphotos import ( "bytes" "encoding/json" "io/ioutil" "net/http" "net/url" ) // MediaItems is the only instance of MediaItemsRequests(https://godoc.org/github.com/Q-Brains/gphotos#MediaItemsRequests). var MediaItems MediaItemsRequests = mediaItemsRequests{} // MediaItemsRequests is a collection of reques...
package generator import ( "context" "go/ast" "go/types" "reflect" "regexp" "sort" "strings" "github.com/go-courier/logr" "github.com/pkg/errors" "github.com/go-courier/enumeration/scanner" "github.com/go-courier/codegen" "github.com/go-courier/oas" "github.com/go-courier/packagesx" "github.com/go-cou...
package etcdproxy import ( "fmt" "time" "github.com/golang/glog" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachi...
/* Copyright 2020 The Nocalhost 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...
package main import ( "container/heap" "fmt" "sort" ) const ( INTRA_SERVER_COST = 1 INTRA_RACK_COST = 2 INTER_RACK_COST = 10 ) type PhysicalMaps []PhysicalMap type ServerPool []*Server func (self ServerPool) Len() int { return len(self) } func (self ServerPool) Swap(i, j int) { self[i], self[j] = se...
package photoprism import ( "fmt" "math" "path/filepath" "sort" "strings" "time" "github.com/jinzhu/gorm" "github.com/photoprism/photoprism/internal/entity" "github.com/photoprism/photoprism/internal/event" "github.com/photoprism/photoprism/internal/util" ) const ( indexResultUpdated IndexResult = "update...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.15.2 // source: postfinance/discovery/v1/service.proto package discoveryv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ti...
package main import ( "go/build" "os" "os/exec" "os/signal" "path/filepath" "runtime" "strings" "syscall" "time" "github.com/jessevdk/go-flags" "github.com/tillberg/alog" "github.com/tillberg/autoinstall/dedupingchan" "github.com/tillberg/notifywrap" "github.com/tillberg/stringset" ) const ( enableSan...
package cmd import ( "bufio" "encoding/json" "fmt" "log" "net/http" "os" "os/signal" "runtime" "strings" "strconv" "sync" "syscall" "time" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp...
package flagutil import ( "bytes" "context" "errors" "flag" "fmt" "os" "reflect" "strings" "time" "github.com/gobwas/flagutil/parse" ) var SetSeparator = "." type Parser interface { Parse(context.Context, parse.FlagSet) error } type ParserFunc func(context.Context, parse.FlagSet) error func (fn ParserF...
package net import ( "bytes" "compress/flate" "encoding/xml" "fmt" "github.com/beevik/etree" saml "github.com/russellhaering/gosaml2" "github.com/russellhaering/gosaml2/types" "github.com/russellhaering/goxmldsig" "io/ioutil" "net/http" "net/url" "sparrow/base" "sparrow/oauth" "sparrow/provider" "sparro...
package broadcast import ( "bytes" "context" "encoding/binary" "errors" "fmt" "log" "math/rand" "strings" "text/template" "time" "github.com/oklog/ulid/v2" bolt "go.etcd.io/bbolt" "go.polysender.org/internal/dbutil" "go.polysender.org/internal/errorbehavior" "go.polysender.org/internal/gateway" "go.p...
// Package vendorShipping provides primitives to interact the openapi HTTP API. // // Code generated by go-sdk-codegen DO NOT EDIT. package vendorShipping import ( "time" ) // Address defines model for Address. type Address struct { // First line of the address. AddressLine1 string `json:"addressLine1"` // Addi...
// Copyright 2013, Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package topo import ( "encoding/json" "fmt" "path" "sort" "strconv" "strings" "code.google.com/p/vitess/go/jscfg" "code.google.com/p/vitess/go/netutil" ...
package main // TODO(flux): This is a hideous singleton. Refactor into a type? import ( "errors" "fmt" "os" "sort" "strconv" "sync" "syscall" "time" "9fans.net/go/plan9" ) // TODO(flux): Wrap fsys into a tidy object. var ( sfd *os.File ) const ( Nhash = 16 DEBUG = 0 ) var fids map[uint32]*Fid = make(...
// Package backend contains translation code from the immediate representation into a concrete query usable by a search // engine. // // This file contains a decent reference implementation for compiling and transforming the IR into and ElasticSearch // query. package backend import ( "encoding/json" "fmt" "github....
package nbd import ( "flag" "fmt" "io/ioutil" "log/syslog" "net/http" // registers profiling HTTP Handlers "context" _ "net/http/pprof" "os" "os/signal" "path/filepath" "regexp" "runtime" "runtime/debug" "strings" "sync" "syscall" "github.com/zero-os/0-Disk/log" "github.com/sevlyar/go-daemon" "go...
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). 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 ...
// 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 deploy import ( "context" "encoding/json" "fmt" "io/ioutil" "os" "path/filepath" "strings" "github.com/porter-dev/porter/api/client" "github.com/porter-dev/porter/api/types" "github.com/porter-dev/porter/cli/cmd/docker" "github.com/porter-dev/porter/cli/cmd/github" "github.com/porter-dev/porter/in...
// Copyright (c) 2015-2021, NVIDIA CORPORATION. // SPDX-License-Identifier: Apache-2.0 package retryrpc import ( "container/list" "encoding/binary" "encoding/json" "fmt" "net" "os" "reflect" "sync" "time" "golang.org/x/sys/unix" ) // TODO - test if Register has been called??? func (server *Server) closeC...
// +build linux package libpod import ( "bufio" "bytes" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "regexp" "runtime" "strconv" "strings" "syscall" "time" "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/cgroups" "github.com/containers/libpod/pkg/errorhandling" "g...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 // protoc v3.17.3 // source: chaos/experimentation/v1/create_experiment_data.proto package experimentationv1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflec...
package amqp import ( "context" "fmt" "time" "github.com/Azure/go-amqp/internal/buffer" "github.com/Azure/go-amqp/internal/encoding" ) // Message is an AMQP message. type Message struct { // Message format code. // // The upper three octets of a message format code identify a particular message // format. T...
package structs import ( "encoding/binary" "fmt" "sort" "strconv" "strings" "time" "github.com/hashicorp/consul/acl" "github.com/hashicorp/consul/agent/cache" "github.com/hashicorp/consul/lib" "github.com/hashicorp/go-multierror" "github.com/mitchellh/hashstructure" "golang.org/x/crypto/blake2b" ) const...
/* Copyright 2017-2019 Gravitational, 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 writing,...
// Copyright © 2019 <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 writ...
// Copyright (c) 2021 PaddlePaddle 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...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 // protoc v3.17.3 // source: config/module/featureflag/v1/featureflag.proto package featureflagv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/prot...
// combat utility functions package main func (g *game) Absorb(armor int) int { absorb := 0 for i := 0; i <= 2; i++ { absorb += RandInt(armor + 1) } q := absorb / 3 r := absorb % 3 if r == 2 { q++ } return q } func (g *game) HitDamage(dt dmgType, base int, armor int) (attack int, clang bool) { min := ba...
// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016-present Datadog, Inc. package file import ( "os" "path/filepath" "regexp" "strings" "sync...
package machineautoscaler import ( "context" "errors" "fmt" "github.com/golang/glog" "github.com/openshift/cluster-autoscaler-operator/pkg/apis/autoscaling/v1alpha1" "github.com/openshift/cluster-autoscaler-operator/pkg/util" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.i...
// 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 w...
package runners import ( "fmt" "os" "sync" "time" log "github.com/sirupsen/logrus" "github.com/twitter/scoot/common/errors" "github.com/twitter/scoot/common/log/hooks" "github.com/twitter/scoot/common/log/tags" "github.com/twitter/scoot/common/stats" "github.com/twitter/scoot/runner" "github.com/twitter/s...
// Copyright 2018 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 ...
/* Copyright 2019 The MayaData Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
package dbSync import ( "bufio" "redis-shake/configure" "redis-shake/common" "pkg/libs/atomic2" "pkg/libs/log" "time" "pkg/redis" "strings" "strconv" "redis-shake/filter" "bytes" "fmt" "io" "net" "redis-shake/metric" redigo "github.com/garyburd/redigo/redis" "unsafe" ) func (ds *DbSyncer) syncComma...
// Copyright 2021 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 service import ( "bytes" "context" "crypto/md5" "encoding/hex" "encoding/json" "fmt" "net/http" "net/url" "sort" "strconv" "strings" "time" "go-common/app/admin/main/push/model" pushmdl "go-common/app/service/main/push/model" "go-common/library/ecode" "go-common/library/log" "go-common/librar...
// Copyright 2020 The Prometheus 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...
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
// Copyright 2016 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 noder import ( "errors" "fmt" "os" "path/filepath" "runtime" "strconv" "strings" "unicode" "unicode/utf8" "cmd/compile/internal/base" "cmd/...
package aws import ( "encoding/json" "fmt" "k8s.io/apimachinery/pkg/util/rand" "log" "os" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" awssession "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/servi...
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
package provisioner import ( "crypto/ecdsa" "crypto/rsa" "crypto/x509" "crypto/x509/pkix" "encoding/asn1" "net" "net/url" "reflect" "time" "github.com/pkg/errors" "github.com/smallstep/cli/crypto/x509util" "golang.org/x/crypto/ed25519" ) // Options contains the options that can be passed to the Sign meth...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/extensions/common/tap/v3/common.proto package envoy_extensions_common_tap_v3 import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" v31 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" v3 "github.com/envoyproxy/go-control-plan...
package utils // Contains methods helpful for interacting with and manipulating Kubernetes resources from YAML. import ( "bufio" "bytes" "context" ejson "encoding/json" "fmt" "io" "log" "os" "path/filepath" "strings" "time" "github.com/kudobuilder/kudo/pkg/apis" kudo "github.com/kudobuilder/kudo/pkg/api...
package git import ( "bufio" "bytes" "errors" "fmt" "io" "os" "os/exec" "path/filepath" "regexp" "runtime" "strings" "syscall" "time" "github.com/golang/glog" s2iapi "github.com/openshift/source-to-image/pkg/api" ) // Repository represents a git source repository type Repository interface { GetRootD...
/* Copyright 2020 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. // versions: // protoc-gen-go v1.25.0 // protoc v3.6.1 // source: user.proto package protos import ( context "context" proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" grpc "google.golang.org/grpc" codes "go...
package rediscatalog import ( "errors" "fmt" "strconv" "strings" "github.com/cloudstax/firecamp/api/catalog" "github.com/cloudstax/firecamp/api/manage" "github.com/cloudstax/firecamp/api/common" "github.com/cloudstax/firecamp/pkg/containersvc" "github.com/cloudstax/firecamp/pkg/dns" "github.com/cloudstax/fi...