text
stringlengths
8.57k
38.1k
// Copyright 2020 New Relic Corporation. All rights reserved. // SPDX-License-Identifier: Apache-2.0 package newrelic import ( "bytes" "errors" "fmt" "net/http" "net/url" "time" "github.com/newrelic/go-agent/v3/internal" "github.com/newrelic/go-agent/v3/internal/cat" "github.com/newrelic/go-agent/v3/interna...
package nanogui import ( "regexp" "strconv" "github.com/shibukawa/glfw" "github.com/shibukawa/nanovgo" ) type TextAlignment int const ( TextCenter TextAlignment = iota TextLeft TextRight ) type TextBox struct { WidgetImplement fontFace string editable bool committed bool...
// Copyright 2016-2018, Pulumi 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.org/licenses/LICENSE-2.0 // // Unless required by applicable law or...
package scene import ( "fmt" "image" "image/color" "image/draw" "runtime" "sync" "time" "github.com/telecoda/go-teletris/domain" "github.com/telecoda/go-teletris/scene/config" "github.com/telecoda/go-teletris/scene/io" "github.com/telecoda/gomo-simra/simra" "github.com/telecoda/gomo-simra/simra/peer" "go...
/* * MinIO Cloud Storage, (C) 2020 MinIO, 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 la...
package main import ( "context" "encoding/json" "errors" "flag" "fmt" "github.com/BurntSushi/toml" "github.com/go-xorm/xorm" "github.com/gorilla/mux" _ "github.com/mattn/go-sqlite3" "github.com/patrickmn/go-cache" "html/template" "log" "math" "net/http" "os" "os/signal" "strconv" "strings" "syscall"...
// Copyright 2015 <NAME> and <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package fem import ( "log" "sort" "github.com/cpmech/gofem/inp" "github.com/cpmech/gofem/shp" "github.com/cpmech/gosl/chk" "github.com/cpmech/gosl/f...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc (unknown) // source: cpaper_proxy/cpaper_proxy.proto package cpaper_proxy import ( context "context" proto "github.com/golang/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "go...
// Copyright 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. // Initially copied from G3N: github.com/g3n/engine/math32 // Copyright 2016 The G3N Authors. All rights reserved. // Use of this source code is governed by a...
// Copyright 2009 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. // (except where it's not). package oldflag import ( "errors" "fmt" "io" "os" "reflect" "sort" "strconv" "strings" "unicode/utf8" ) // ErrHelp is the...
package dash import ( "fmt" "math" "time" "gobot.io/x/gobot/drivers/gpio" roomba "github.com/deepakkamesh/go-roomba" "github.com/deepakkamesh/go-roomba/constants" ui "github.com/gizak/termui" "github.com/golang/glog" ) type Dash struct { gui bool Id string roomba *roomba.Roomba tms...
package main import ( "bytes" "context" "database/sql" "encoding/csv" "fmt" "log" "math/rand" "sort" "strconv" "strings" "sync/atomic" "time" "github.com/inhies/go-bytesize" gtools "github.com/jbsmith7741/go-tools" "github.com/jbsmith7741/uri" jsoniter "github.com/json-iterator/go" "github.com/pcelvn...
package scraper import ( "bytes" "encoding/json" "errors" "go/token" "go/types" "io/ioutil" "log" "math" "math/rand" "net/http" "net/url" "sync" "time" "strconv" "strings" "github.com/PuerkitoBio/goquery" "github.com/gocolly/colly" "github.com/gocolly/colly/extensions" "github.com/gocolly/colly/qu...
package loc import ( "fmt" "math" "strconv" "strings" "time" ) const ( // Level of information available in the LocInfo structure (level) LOC_HAVE_NOTHING = 0 // nothing yet LOC_HAVE_TIME = 1 // UTC time, after RMC showing valid time and date fields LOC_HAVE_POSITION = 2 // + lat, lon, speed, dire...
// Code generated by protoc-gen-go. // source: throttlerdata.proto // DO NOT EDIT! /* Package throttlerdata is a generated protocol buffer package. It is generated from these files: throttlerdata.proto It has these top-level messages: MaxRatesRequest MaxRatesResponse SetMaxRateRequest SetMaxRateResponse Config...
/* * Copyright 2020-2021 the original author(https://github.com/wj596) * * <p> * 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 * * U...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/extensions/filters/common/fault/v3alpha/fault.proto package envoy_extensions_filters_common_fault_v3alpha import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" v3alpha "github.com/envoyproxy/go-control-plane/envoy/type/v3alpha" _ "github....
// 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 ...
package runner import ( "bufio" "context" "errors" "fmt" "github.com/logrusorgru/aurora" "io" "io/ioutil" "net/http/cookiejar" "os" "path/filepath" "regexp" "strings" "sync" tengo "github.com/d5/tengo/v2" "github.com/d5/tengo/v2/stdlib" "github.com/karrick/godirwalk" "github.com/projectdiscovery/golo...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.14.0 // source: envoy/config/core/v3/socket_option.proto package v3 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "...
package auditd import ( "fmt" "os" "strconv" "strings" "syscall" "time" "github.com/pkg/errors" "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/libbeat/monitoring" "github.com/elastic/beats/metricbeat/mb" "github.com/elastic/beats/metricbeat/mb/...
package tomarkdown import ( "bytes" "fmt" "strings" "github.com/kjk/notionapi" ) func maybePanic(format string, args ...interface{}) { notionapi.MaybePanic(format, args...) } func markdownFileName(title, pageID string) string { s := notionapi.SafeName(title) return s + "-" + notionapi.ToDashID(pageID) + ".md...
// 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 riscv64 import ( "cmd/compile/internal/gc" "cmd/compile/internal/ssa" "cmd/compile/internal/types" "cmd/internal/obj" "cmd/internal/obj/riscv" ) ...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package comm import ( "bytes" "context" // "crypto/tls" tls "github.com/jxu86/gmtls" "encoding/hex" "fmt" "reflect" "sync" "sync/atomic" "time" proto "github.com/hyperledger/fabric-protos-go/gossip" "github.com/jxu86/fabr...
package main import ( "encoding/json" "fmt" "io/ioutil" "os" "path/filepath" "strconv" "strings" "testing" "github.com/buger/jsonparser" "github.com/jfrog/jfrog-cli/artifactory/commands/generic" "github.com/jfrog/jfrog-cli/artifactory/utils" "github.com/jfrog/jfrog-cli/inttestutils" "github.com/jfrog/jfr...
package identify import ( "context" "fmt" "io" "runtime/debug" "sync" "time" ic "github.com/libp2p/go-libp2p-core/crypto" "github.com/libp2p/go-libp2p-core/event" "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/g...
package nanoarch import ( "bufio" "errors" "fmt" stdimage "image" "log" "os" "os/user" "runtime" "sync" "unsafe" "github.com/disintegration/imaging" "github.com/giongto35/cloud-game/pkg/config" "github.com/giongto35/cloud-game/pkg/emulator/libretro/image" "github.com/go-gl/gl/v4.1-core/gl" "github.com/...
package apimanagement // Copyright (c) Microsoft and contributors. 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 // ...
// 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. // This file contains the Go wrapper for the constant-time, 64-bit assembly // implementation of P256. The optimizations performed here are described in // deta...
package config /* * 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 * ...
package autospotting import ( "fmt" "math" "path/filepath" "sort" "strconv" "strings" "sync" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/davecgh/go-spew/spew" ) // The key in this map is the instance ID, useful for quick retrieval of // instance attributes. t...
package state import ( "bytes" "errors" "fmt" "time" "github.com/tendermint/tendermint/crypto/bls12381" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" cryptoenc "github.com/tendermint/tendermint/crypto/encoding" "github.com/tendermint/tendermint/libs/fail" "git...
// Copyright (c) 2018 The MATRIX Authors // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php package man import ( "compress/gzip" "context" "encoding/json" "errors" "fmt" "io" "math/big" "os" "strconv" "strings" "time" ...
// Copyright 2014 Team 254. All Rights Reserved. // Author: <EMAIL> (<NAME>) package main import ( "fmt" "github.com/stretchr/testify/assert" "io/ioutil" "net" "testing" "time" ) func TestEncodeControlPacket(t *testing.T) { dsConn, err := NewDriverStationConnection(254, "R1") assert.Nil(t, err) defer dsConn...
// Copyright 2020 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, ...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc v3.17.3 // source: model/model.proto package model import ( proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.17.3 // source: pkg/ingress/get-instance.proto package ingress import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "g...
package cstest import ( "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "strings" "github.com/crowdsecurity/crowdsec/pkg/csconfig" "github.com/crowdsecurity/crowdsec/pkg/cwhub" log "github.com/sirupsen/logrus" "gopkg.in/yaml.v2" ) type HubTestItemConfig struct { Parsers []string `yaml:"par...
package InspectionItem import ( pub "DepthInspection/api/PublicClass" "fmt" "strings" ) //配置参数检查功能 func DatabaseConfigCheck(confParameterList map[string]string) { pub.Loggs.Info("Begin to check that the database configuration parameters are properly configured") var configVariablesName ,configValue string for ...
/* 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, ...
package renter import ( "context" "fmt" "sync" "time" "github.com/uplo-tech/uplo/build" "github.com/uplo-tech/uplo/crypto" "github.com/uplo-tech/uplo/modules" "github.com/uplo-tech/uplo/types" "github.com/uplo-tech/errors" ) var ( // pcwsWorkerStateResetTime defines the amount of time that the pcws will ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: go.chromium.org/luci/swarming/proto/config/bots.proto package configpb import ( fmt "fmt" proto "github.com/golang/protobuf/proto" _ "go.chromium.org/luci/common/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used...
package main // --------------------------------------------------------------------------- // Room Control by HTTP GET & POST + Apple HOMEKIT // SERVER // --------------------------------------------------------------------------- // // sorry - not translated yet :-( // // to RUN with param = IP address of Arduino...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/endpoint/endpoint_components.proto package envoy_api_v2_endpoint import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" _ "github.com/envoyproxy/protoc-gen-validate/val...
// Copyright 2021 Google LLC // // Licensed under the Apache Livense, 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 ...
package printer import ( "fmt" "io" "strconv" "strings" ) const ( NIL = "nil" NULL = "nullptr" IOTA = "iota" ) // // C implement the Printer interface for C programs // type CPrinter struct { Printer level int sameline bool w io.Writer ctx *CContext } // // CContext is the context for a (fu...
package loop import ( "context" "crypto/tls" "encoding/hex" "errors" "fmt" "io" "net" "strings" "sync" "time" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcutil" "github.com/lightninglabs/aperture/lsat" "github.com/lightninglabs/loop/loopdb" looprpc "github.com/lightninglabs/loop/swapserverr...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.6.1 // source: github.com/solo-io/gloo/projects/gloo/api/external/envoy/config/trace/v3/datadog.proto package v3 import ( reflect "reflect" sync "sync" _ "github.com/envoyproxy/protoc-gen-validate/validate...
package multirow import ( "context" "fmt" "reflect" "sort" "strings" "time" "unsafe" "github.com/influxdata/flux" "github.com/influxdata/flux/array" "github.com/influxdata/flux/arrow" "github.com/influxdata/flux/codes" "github.com/influxdata/flux/execute" "github.com/influxdata/flux/execute/table" "gith...
package vault import ( "context" "fmt" "reflect" "sort" "strings" "github.com/armon/go-radix" "github.com/hashicorp/errwrap" "github.com/hashicorp/go-multierror" "github.com/hashicorp/vault/helper/identity" "github.com/hashicorp/vault/helper/namespace" "github.com/hashicorp/vault/helper/strutil" "github.c...
// Code generated by goyacc. // GENERATED FILE DO NOT EDIT //line irgen.y:16 package parser import __yyfmt__ "fmt" //line irgen.y:16 import "io" // Parse parses definitions from an io.Reader. func Parse(filename string, src io.Reader) ([]Def, error) { l := newLexer(filename, src) irgenParse(l) return l.defs, l.fi...
// Code generated by protoc-gen-go. // source: messages.proto // DO NOT EDIT! /* Package serverpb is a generated protocol buffer package. It is generated from these files: messages.proto It has these top-level messages: SelectGroupRequest SelectGroupResponse SelectProfileRequest SelectProfileResponse GroupPutR...
// generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go package orm import ( "database/sql" "encoding/json" "errors" "fmt" "io/ioutil" "log" "os" "path/filepath" "sort" "time" "gorm.io/gorm" "github.com/tealeg/xlsx/v3" "github.com/fullstack-lang/gongsvg/go/models" ) // dummy variable to...
// MIT License // // (C) Copyright [2018-2021] Hewlett Packard Enterprise Development LP // // 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 limitatio...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0-devel // protoc v3.13.0 // source: wso2/discovery/config/enforcer/jwt_generator.proto package enforcer import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime...
package brimtime import ( "testing" "time" ) func TestStartOfWeek(t *testing.T) { for in, exp := range map[time.Time]time.Time{ time.Date(2014, 6, 29, 1, 2, 3, 4, time.UTC): time.Date(2014, 6, 29, 1, 2, 3, 4, time.UTC), time.Date(2014, 7, 2, 1, 2, 3, 4, time.UTC): time.Date(2014, 6, 29, 1, 2, 3, 4, time.UTC),...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package docker import ( "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Manages the lifecycle of a Docker container. // //...
package api import ( "errors" "fmt" "github.com/boltdb/bolt" "github.com/golang/glog" "github.com/open-horizon/anax/config" "github.com/open-horizon/anax/cutil" "github.com/open-horizon/anax/eventlog" "github.com/open-horizon/anax/events" "github.com/open-horizon/anax/exchange" "github.com/open-horizon/anax/...
// Copyright 2016 NDP Systèmes. 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...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1-devel // protoc v3.15.2 // source: playground-apps/services.proto package grpc_playground_apps_go import ( context "context" grpc_playground_common_go "github.com/napptive/grpc-playground-common-go" grpc_playground_envi...
package server import ( "bytes" "crypto/sha1" "encoding/hex" "errors" "fmt" "os" "path" "sort" "strings" "time" "esm.sh/server/storage" "github.com/evanw/esbuild/pkg/api" "github.com/ije/gox/utils" ) type buildTask struct { id string wd string pkg pkg alias map[string]string deps pkg...
// Copyright 2013-2022 The btcsuite developers package musig2 import ( "bytes" "fmt" "io" secp "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/chaincfg/chainhash" ) var ( // NonceBlindTag is that tag used ...
/* Copyright 2017 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, ...
/* Copyright 2015 The Kubernetes 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 ag...
// Copyright 2015 Light Code Labs, 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 agre...
// 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. // +build ignore package main import "strings" // Notes: // - Integer types live in the low portion of registers. Upper portions are junk. // - Boolean typ...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.22.0 // protoc v3.10.1 // source: envoy/config/filter/http/squash/v2/squash.proto package envoy_config_filter_http_squash_v2 import ( _ "github.com/cncf/udpa/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/v...
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/firebase/fcm/connection/v1alpha1/connection_api.proto package connection import ( context "context" fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" _ "google.golang.org/genp...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: indexer_manager.proto package protos import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" math "math" ) // Reference im...
package htlcswitch import ( "bytes" "container/list" "errors" "fmt" "sync" "time" "github.com/lightningnetwork/lnd/clock" "github.com/lightningnetwork/lnd/lnwire" ) var ( // ErrMailBoxShuttingDown is returned when the mailbox is interrupted by // a shutdown request. ErrMailBoxShuttingDown = errors.New("ma...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/cloud/dialogflow/v2beta1/audio_config.proto package dialogflow // import "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "google.golang.org/g...
// This file and its contents are licensed under the Apache License 2.0. // Please see the included NOTICE for copyright information and // LICENSE for a copy of the license. // See the section on the Write path in the Readme for a high level overview of // this file. package pgmodel import ( "context" "fmt" "sort...
package sched import ( "fmt" "math" "time" "bosun.org/_third_party/github.com/MiniProfiler/go/miniprofiler" "bosun.org/_third_party/github.com/influxdb/influxdb/client" "bosun.org/cmd/bosun/cache" "bosun.org/cmd/bosun/conf" "bosun.org/cmd/bosun/expr" "bosun.org/collect" "bosun.org/graphite" "bosun.org/meta...
package data import ( "bytes" "errors" "github.com/fogleman/gg" "strings" ) type Cube struct { Faces map[string]Face CubeSize int moves map[string](func() *Cube) CubieSize float64 } func NewCube(cubeSize int, cubieSize float64) *Cube { return NewCubeColors(cubeSize, cubieSize, Colors) } // Create ...
// Copyright 2019 <NAME> // All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // swagger provides structs and utilities for handling a swagger file. // I created it for use with esign package. It is incomplete and not // tested for other swagge...
package contracts import ( "context" "math" "math/big" "strings" "time" ethereum_t "github.com/cryptoriums/packages/ethereum" math_t "github.com/cryptoriums/packages/math" "github.com/cryptoriums/telliot/pkg/contracts/tellorX_governance" "github.com/cryptoriums/telliot/pkg/contracts/tellorX_master" "github....
// Copyright 2013, 2020 <NAME>. // // SPDX-License-Identifier: Apache-2.0 package main import ( "bytes" "context" "crypto/sha1" "encoding/base64" "flag" "fmt" "io" "io/ioutil" "mime" "mime/multipart" "net/http" "net/url" "os" "os/signal" "path/filepath" "strconv" "strings" "syscall" "time" "perke...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/core/config_source.proto package envoy_api_v2_core import ( fmt "fmt" _ "github.com/envoyproxy/protoc-gen-validate/validate" proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" wrappers "github.com...
package main import ( "errors" "strings" ) // Abs returns an absolute value of a number without branching, should work on // both 32-bit and 64-bit platforms. func abs(n int) int { return int((int64(n) ^ int64(n)>>63) - int64(n)>>63) } // Piece represents a chess piece. To simplify debugging, human-readable // con...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: allergyIntolerance.proto /* Package buffer is a generated protocol buffer package. It is generated from these files: allergyIntolerance.proto bundle.proto careplan.proto common.proto condition.proto diagnosticReport.proto encounter.proto fhirServer.p...
package errors import ( "errors" "fmt" "os" "strings" log "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" ) const ( CodeCmd Code = "0" CodeCmdCommon Code = "00" CodeCmdCommonBefore Code = "000" CodeCmdCommonSetupBind Code = "001" CodeC...
package genetics import ( "math/rand" "errors" "github.com/elmware/goNEAT/neat" "io" "fmt" "bufio" "strings" "bytes" "strconv" "math" "sync/atomic" "sync" ) // A Population is a group of Organisms including their species type Population struct { // Species in the Population. Note that the species should...
// ---------------------------------------------------------------------- // band implementation and framework for stateless distributed group identity // for automating the tribe (vs. automating the state) // // MIT License // // Copyright (c) 2019 <NAME> // // Permission is hereby granted, free of charge, to an...
package upcloud import ( "encoding/json" "fmt" "time" ) // ManagedDatabaseState represents a current state the service is in type ManagedDatabaseState string const ( // ManagedDatabaseStateRunning represents a managed database instance in running state ManagedDatabaseStateRunning ManagedDatabaseState = "running...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.23.0 // protoc v3.14.0 // source: envoy/config/cluster/redis/redis_cluster.proto package envoy_config_cluster_redis import ( _ "github.com/cncf/udpa/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" ...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.13.0 // source: content/action.enum.proto package content import ( _ "github.com/liov/tiga/protobuf/utils/proto/gogo" _ "github.com/liov/tiga/protobuf/utils/proto/patch" protoreflect "google.golang.org/prot...
/* Copyright 2015 The Kubernetes 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 ag...
package messagelayer import ( "context" "fmt" "net" "strconv" "sync" "time" "github.com/iotaledger/hive.go/autopeering/peer" "github.com/iotaledger/hive.go/autopeering/peer/service" "github.com/iotaledger/hive.go/daemon" "github.com/iotaledger/hive.go/events" "github.com/iotaledger/hive.go/identity" "gith...
// Scalability // // TODO. We avoid polling that is O(torrents) by using events. E.g. instead of inspecting each torrent for its state or statistics, we'll emit events only for those torrents that had activity. // // Callbacks, events, and blocking calls // // We use three different mechanisms for communicating with us...
// 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 deployment import ( "context" "fmt" // kube appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" appsclientv1 "k8s.io/client-go/kubernetes/typed/apps/v1" "k8s.io/klog/v2" /...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/cloud/asset/v1p2beta1/assets.proto package asset import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/any" _struct "github.com/golang/protobuf/ptypes/struct" timestamp "github.com/golang/p...
package libsp // spell-checker: disable import ( "bufio" "bytes" "encoding/csv" "io" "strings" "testing" ) func TestWriteCSV(t *testing.T) { r := bufio.NewReader(strings.NewReader(qsfTestContent)) s, err := ReadQsf(r) if err != nil { t.Errorf("err = %s", err) } if s == nil { t.Error("s = nil") retur...
// +build e2e /* 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 ...
// Copyright 2021 The Tint 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 ...
// Copyright 2017 <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 wri...
// +build int package main import ( "strconv" "testing" ) func TestString(t *testing.T) { testRaw(t, func(c *client) { c.Do("SET", "foo", "bar") c.Do("GET", "foo") c.Do("SET", "foo", "bar\bbaz") c.Do("GET", "foo") c.Do("SET", "foo", "bar", "EX", "100") c.Do("SET", "foo", "bar", "EX", "noint") c.Do("...
// Copyright 2015 The Serulian 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 packageloader defines functions and types for loading and parsing source from disk or VCS. package packageloader import ( "fmt" "log" "path...
// Copyright 2017 Baliance. All rights reserved. // // Use of this source code is governed by the terms of the Affero GNU General // Public License version 3.0 as published by the Free Software Foundation and // appearing in the file LICENSE included in the packaging of this file. A // commercial license can be purchas...