text stringlengths 5.51k 28.1k |
|---|
// The MIT License (MIT)
//
// Copyright (c) 2018-2019 <NAME>
//
// 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, cop... |
// Code generated by protoc-gen-go.
// source: proto3_proto/proto3.proto
// DO NOT EDIT!
/*
Package proto3_proto is a generated protocol buffer package.
It is generated from these files:
proto3_proto/proto3.proto
It has these top-level messages:
Message
Nested
MessageWithMap
*/
package proto3_proto
import proto... |
/*
Copyright © 2020 The synapse-operator 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 wr... |
// Copyright (c) 2020 Tailscale Inc & 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 ipnstate captures the entire state of the Tailscale network.
//
// It's a leaf package so ipn, wgengine, and magicsock can all depend on ... |
// Copyright (c) 2017, 2020-2021 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requir... |
package protocol
import (
"bytes"
"crypto/sha256"
"encoding/hex"
"errors"
"fmt"
"math"
"regexp"
"strconv"
"strings"
"unicode"
"unicode/utf8"
"gitlab.com/accumulatenetwork/accumulate/internal/url"
)
// Well known strings
const (
// TLD is the top-level domain for ADIs.
TLD = ".acme"
// ACME is the nam... |
package power
import (
"bytes"
addr "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/exitcode"
power0 "github.com/filecoin-project/specs-actors/actors/builtin/power"
rtt "github.com/filecoin-project/go-state-types/rt"
"github... |
package main
import (
"fmt"
"os"
"path/filepath"
"runtime"
"runtime/pprof"
"strings"
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/config"
"github.com/containers/podman/v3/cmd/podman/common"
"github.com/containers/podman/v3/cmd/podman/registry"
"github.com/containers/podma... |
// 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 © <NAME> – This file is part of GoatCounter and published
// under the terms of a slightly modified EUPL v1.2 license, which can be found
// in the LICENSE file or at https://license.goatcounter.com
package handlers
import (
"context"
"html/template"
"net/http"
"strconv"
"strings"
"sync"
"time"
... |
package channel
import (
"bytes"
"encoding/gob"
"fmt"
"github.com/TIBCOSoftware/tgdb-client/client/goAPI/exception"
"github.com/TIBCOSoftware/tgdb-client/client/goAPI/types"
"github.com/TIBCOSoftware/tgdb-client/client/goAPI/utils"
"strconv"
"strings"
)
/**
* Copyright 2018-19 TIBCO Software Inc. All rights ... |
package cron
import (
"fmt"
"reflect"
"strings"
"testing"
"time"
)
func TestRange(t *testing.T) {
zero := uint64(0)
ranges := []struct {
expr string
min, max uint
expected uint64
err string
}{
{"5", 0, 7, 1 << 5, ""},
{"0", 0, 7, 1 << 0, ""},
{"7", 0, 7, 1 << 7, ""},
{"5-5", 0, 7, 1 ... |
package csidh
import (
"math/bits"
"golang.org/x/sys/cpu"
)
// CPU Capabilities. Those flags are referred by assembly code. According to
// https://github.com/golang/go/issues/28230, variables referred from the
// assembly must be in the same package.
// We declare variables not constants, in order to facilitate t... |
package main
import (
"fmt"
"time"
"github.com/icza/gowut/gwu"
"github.com/jinzhu/now"
)
func updateRentalRecord(j *jawaInfo, apt string,
AptName, TenName, TenKey, MRent, Deposit, DueDay,
Street, City, State, Zip, RentOwed, BounceOwed, LateOwed, WaterOwed,
DepositOwed, NextDueDate, RentChargedThrou gwu.TextBo... |
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2019, TIBCO Software Inc. This file is subject to the license
// terms contained in the license file that is distributed with this file.
package vulnrep
import (
"encoding/json"
"encoding/xml"
"fmt"
"io"
"net/url"
"regexp"
"strings"
"time"
"github.com... |
package main
import (
_ "embed"
"fmt"
"strings"
"time"
"github.com/gdamore/tcell/v2"
"github.com/gdamore/tcell/v2/views"
)
// TODO: replace with raw string
//go:embed assets/help
var helpText []byte
const (
welcomeModel int = iota
playerModel
lyricsModel
playlistModel
helpModel
resultsModel
)
type cont... |
/*
* Copyright 2018 The Service Manager Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... |
// Copyright 2017 <NAME> github@bndr.
//
// 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 db
import (
"bytes"
"context"
"fmt"
"hash/crc32"
"sync"
"time"
"github.com/distributedio/titan/conf"
"github.com/distributedio/titan/db/store"
"github.com/distributedio/titan/metrics"
"go.uber.org/zap"
)
var (
expireKeyPrefix = []byte("$sys:0:at:")
hashExpireKeyPrefix = expireKeyPrefix[:len(e... |
package exchange
import (
"bufio"
"context"
"fmt"
"math/rand"
"time"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
"go.opencensus.io/trace"
"go.uber.org/fx"
"golang.org/x/xerrors"
cborutil "github.com/filecoin-project/go-cbor-u... |
package download
import (
"bytes"
"crypto/tls"
"encoding/hex"
"fmt"
"io/ioutil"
"math/rand"
"net/http"
"strconv"
"strings"
"github.com/apex/log"
"github.com/blacktop/go-plist"
"github.com/blacktop/ipsw/pkg/info"
)
// NOTES:
// - https://github.com/Neal/savethemblobs
// - https://github.com/tihmstar/tssch... |
// Copyright © 2017 The virtual-kubelet 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 la... |
// +build envtest
/*
Copyright 2021 Crunchy Data Solutions, 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 ... |
package app
import (
"fmt"
"os"
"strconv"
"strings"
)
func HandleProtocolOutput(allInfo AllInfo) []string {
var protocolSlice []string
if allInfo.VInfo != nil {
protocolSlice = handleVInfo("protocol", allInfo)
} else {
servs := judgeService(allInfo.Services, allInfo.ServiceInfoAll, allInfo.ServiceGrpInfoAl... |
// 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 ... |
package ibmcloud
import "time"
type Session struct {
Token *Token
}
// Token is used in every request that need authentication
type Token struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
ImsUserID int `json:"ims_user_id"`
TokenType string `json:"token_type"`... |
package mvnparse
import (
"encoding/xml"
"io"
"io/ioutil"
"os"
"github.com/clbanning/mxj/v2"
)
func Parse(path string) (*Project, error) {
file, err := os.Open(path)
if err != nil {
return nil, err
}
defer file.Close()
b, _ := ioutil.ReadAll(file)
var project Project
err = xml.Unmarshal(b, &project)
... |
package network
import (
"bytes"
"errors"
"fmt"
"github.com/yaricom/goNEAT/v2/neat/math"
"gonum.org/v1/gonum/graph/path"
"io"
)
// Network is a collection of all nodes within an organism's phenotype, which effectively defines Neural Network topology.
// The point of the network is to define a single entity whic... |
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package signer
import (
"encoding/json"
"testing"
"github.com/stretchr/testify/require"
"github.com/hyperledger/aries-framework-go/pkg/crypto/tinkcrypto"
"github.com/hyperledger/aries-framework-go/pkg/doc/signa... |
// Package bigfft implements multiplication of big.Int using FFT.
//
// The implementation is based on the Schönhage-Strassen method
// using integer FFT modulo 2^n+1.
package bigfft
import (
"math/big"
"unsafe"
)
const _W = int(unsafe.Sizeof(big.Word(0)) * 8)
type nat []big.Word
func (n nat) String() string {
v... |
package main
import (
"context"
"flag"
"fmt"
"os"
"os/signal"
"strconv"
"strings"
"syscall"
"time"
"golang.org/x/oauth2"
airtable "github.com/fabioberger/airtable-go"
"github.com/google/go-github/github"
"github.com/jessfraz/gitable/version"
"github.com/sirupsen/logrus"
)
const (
// BANNER is what is... |
package mesh
import (
"fmt"
"net"
"strconv"
"time"
)
// Connection describes a link between peers.
// It may be in any state, not necessarily established.
type Connection interface {
Remote() *Peer
getLocal() *Peer
remoteTCPAddress() string
isOutbound() bool
isEstablished() bool
}
type ourConnection interf... |
package eval
import (
"reflect"
"go/ast"
"go/token"
)
// from go.h
const (
mpscale uint64 = 29
mpprec = 16
)
func checkBinaryExpr(binary *ast.BinaryExpr, env Env) (*BinaryExpr, []error) {
aexpr := &BinaryExpr{BinaryExpr: binary}
x, y, ok, errs := checkBinaryOperands(binary.X, binary.Y, env)
aexpr.X, aexpr.Y... |
package widgets
import (
"io"
"io/ioutil"
gomail "net/mail"
"os"
"os/exec"
"time"
"github.com/emersion/go-message"
"github.com/emersion/go-message/mail"
"github.com/gdamore/tcell"
"github.com/mattn/go-runewidth"
"github.com/pkg/errors"
"git.sr.ht/~sircmpwn/aerc/config"
"git.sr.ht/~sircmpwn/aerc/lib"
"g... |
// Package contexthandler contains the ContextHandler service.
package contexthandler
import (
"context"
"errors"
"strconv"
"strings"
"time"
"github.com/openinsight-project/grafinsight/pkg/bus"
"github.com/openinsight-project/grafinsight/pkg/components/apikeygen"
"github.com/openinsight-project/grafinsight/pk... |
package structs
// MatchSummary holds information about play by play statistics for a certain match.
type MatchSummary interface{}
// CsMatchSummary is the summarization of a CS:GO match.
type CsMatchSummary struct {
Home int64 `json:"home"`
Away int64 `json:"away"`
MatchLength int64 `json:"match_len... |
// Copyright 2018 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.
// source: google/ads/googleads/v2/resources/ad_group_feed.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/goog... |
/*
Copyright 2019 Cisco Systems
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
d... |
// 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-2020 Datadog, Inc.
// +build linux
package probe
import (
"fmt"
"os"
"sync"
"syscall"
"t... |
package gokit
import (
"context"
"net/http"
"strings"
"sync"
)
// Handle is a function that can be registered to a route to handle HTTP
// requests. Like http.HandlerFunc, but has a third parameter for the values of
// wildcards (path variables).
type Handle func(http.ResponseWriter,*http.Request,Params)
// Para... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/errors/campaign_criterion_error.proto
package errors // import "google.golang.org/genproto/googleapis/ads/googleads/v0/errors"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports t... |
package engine
import (
"bufio"
"context"
"fmt"
"net/http"
"os"
"path/filepath"
"regexp"
"strings"
"sync"
"time"
"github.com/Sirupsen/logrus"
"github.com/Stratoscale/logserver/debug"
"github.com/Stratoscale/logserver/parse"
"github.com/Stratoscale/logserver/source"
"github.com/bluele/gcache"
"github.c... |
package bpe
import (
"bufio"
"container/heap"
"encoding/binary"
"errors"
"io"
"strconv"
"strings"
"github.com/sirupsen/logrus"
)
// TokenID is a numerical identifier of the subword token
type TokenID uint32
// TokenIDPair is a concatenation of two TokenIDs that is used as the key type in rule2id map.
type T... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api/mmlogic.proto
package pb
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.gola... |
package account
import (
"context"
"encoding/hex"
"fmt"
"io/ioutil"
"os"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/rpcclient"
"github.com/btcsuite/btcd/wire"
"github.com/lightninglabs/lndclient"
"github.com/lightninglabs/pool/poolscript"
"github.com/l... |
// 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 to in writ... |
// Copyright 2016, 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 planbuilder
import (
"errors"
"github.com/youtube/vitess/go/vt/sqlparser"
"github.com/youtube/vitess/go/vt/vtgate/engine"
"github.com/youtube/vitess/... |
// Package controlplane allows to create and manage static Kubernetes controlplane running
// in containers.
package controlplane
import (
"fmt"
"sigs.k8s.io/yaml"
"github.com/flexkube/libflexkube/internal/util"
"github.com/flexkube/libflexkube/pkg/container"
"github.com/flexkube/libflexkube/pkg/defaults"
"git... |
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package proxy
import (
"sync"
"time"
"k8s.io/klog/v2"
corev1 "k8s.io/api/core/v1"
discoveryv1 "k8s.io/api/discovery/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
corev1listers "k8s.io/client-go/listers/core/v1"
"k8s.io/kubernetes/pkg/proxy"
"k8s.io/kubernetes/pkg/util/as... |
package pregol
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"strings"
"sync"
"golang.org/x/sync/semaphore"
)
// Worker ...
type Worker struct {
ID int
inQueue map[int][]float64
outQueue map[int][]float64
activeVert []int //TODO: change... |
/*
Package wamp defines all message types, data types, and reserved URI values
defined by the WAMP specification.
*/
package wamp
type MessageType int
// Message is a generic container for a WAMP message.
type Message interface {
MessageType() MessageType
}
// Dict is a dictionary that maps keys to objects in a WA... |
/*
Copyright 2021 <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 writing, software
distrib... |
// Package permissivecsv provides facilties for permissively reading
// non-standards-compliant csv files.
package permissivecsv
import (
"bufio"
"bytes"
"encoding/csv"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"strings"
"text/template"
"github.com/eltorocorp/permissivecsv/internal/linesplit"
"github.com/elto... |
package docker
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"math/rand"
"regexp"
"strconv"
"strings"
"sync"
"time"
dockerref "github.com/docker/distribution/reference"
dockertypes "github.com/docker/docker/api/types"
dockercontainer "github.com/docker/docker/api/... |
// Lute - A structured markdown engine.
// Copyright (c) 2019-present, b3log.org
//
// Lute is licensed under the Mulan PSL v1.
// You can use this software according to the terms and conditions of the Mulan PSL v1.
// You may obtain a copy of Mulan PSL v1 at:
// http://license.coscl.org.cn/MulanPSL
// THIS SOFTWAR... |
// Package scanner implements a lexical scanner for PostScript.
package scanner
import (
"bufio"
"bytes"
"encoding/ascii85"
"errors"
"fmt"
"io"
"regexp"
"strconv"
"strings"
)
// A Scanner consumes PostScript tokens from an input stream. Use the Next
// method to parse tokens sequentially from the input.
typ... |
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"bytes"
"errors"
"fmt"
"os"
"path/filepath"
"regexp"
"strings"
"text/template"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer"
"github.com/aws/amazon-ecs-cli-v2/inte... |
/*
* Tencent is pleased to support the open source community by making Blueking Container Service available.,
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obt... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/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 data
import (
"math/rand"
"time"
)
type Animal struct {
String string
}
// ListAnimals will list all colours
func ListAnimals() []Animal {
return buildAnimalList()
}
func RandomAnimal() Animal {
rand.Seed(time.Now().UnixNano())
index := rand.Intn(countAnimals())
return buildAnimalList()[index]
}
fun... |
// Copyright (c) 2018 Uber Technologies, 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 ... |
package injector
import (
"bufio"
"bytes"
"errors"
"fmt"
log "github.com/Sirupsen/logrus"
"github.com/phayes/permbits"
"github.com/peterh/liner"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"strconv"
"strings"
"syscall"
"time"
"io"
)
const (
TEMPLATE = `{
local $_;
local $@;... |
package main
import (
"bufio"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
"sort"
"strconv"
"strings"
"time"
"github.com/digitalocean/godo"
ac "github.com/serge-v/autocomplete"
"github.com/serge-v/toolbox/common"
)
func installChat(name string) {
_, id := listDroplets(name)
build("... |
// Package authenticator defines the domain model for user authentication.
package authenticator
import (
"context"
"database/sql"
"net/http"
"time"
"github.com/dgrijalva/jwt-go"
)
// TokenState represents a state of a JWT token.
// A token may represent an intermediary state prior
// to authorization (ex. TOTP... |
/*
* 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 wr... |
package shell
import (
"context"
"log"
"strings"
"time"
"github.com/blkmlk/microshell/internal/parser"
"github.com/blkmlk/microshell/internal/cursor"
"github.com/blkmlk/microshell/internal/logger"
"github.com/blkmlk/microshell/internal/models"
"github.com/blkmlk/microshell/internal/history"
"github.com... |
// Copyright 2015 The Dename Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... |
package huawei
import (
"encoding/json"
"fmt"
"github.com/civet148/gotools/log"
"github.com/civet148/gotools/push"
"io/ioutil"
"net/http"
"net/url"
"strings"
"time"
)
var (
HUAWEI_HTTP_METHOD_POST = "POST"
HUAWEI_TOKEN_TYPE = "Bearer" //默认token类型
)
var (
/*
https://oauth-login.cloud.huawei.com/oa... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: blimp/wait/v0/wait.proto
package wait
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
errors "github.com/kelda/blimp/pkg/proto/errors"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.gola... |
package telegram
type User struct {
// Unique identifier for this user or bot
Id int64 `json:"id,omitempty"`
// User‘s or bot’s first name
FirstName string `json:"first_name,omitempty"`
// Optional. User‘s or bot’s last name
LastName string `json:"last_name,omitempty"`
// Optional. User‘s or bot’s username
Use... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/errors/campaign_criterion_error.proto
package errors // import "google.golang.org/genproto/googleapis/ads/googleads/v0/errors"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports t... |
//go:build js && !wasm
// +build js,!wasm
package reflectx
import (
"reflect"
"unsafe"
"github.com/goplusjs/gopherjs/js"
)
//go:linkname reflectType reflect.reflectType
func reflectType(typ *js.Object) *rtype
//go:linkname setKindType reflect.setKindType
func setKindType(rt *rtype, kindType interface{})
//go:l... |
package collector
import (
"github.com/StackExchange/wmi"
"github.com/prometheus/client_golang/prometheus"
)
func init() {
registerCollector("cluster_csv_fs", newcluster_csv_fsCollector) // TODO: Add any perflib dependencies here
}
// A cluster_csv_fsCollector is a Prometheus collector for WMI Win32_PerfRawData_... |
// Copyright 2018 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.
// based on golang.org/x/exp/shiny:
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license th... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: test/test.proto
package test
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 imports to... |
package main
import (
"database/sql"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"os"
"regexp"
"strings"
"sync"
"time"
"github.com/osm/irc"
"github.com/osm/jsonc"
)
// bot is the main structure that binds all bot methods together. It does also
// contain the configuration and objects that needs to be accessi... |
package main
import "github.com/9072997/jgh"
import "fmt"
import "io"
import "io/ioutil"
import "net"
import "net/http"
import "strings"
import "sync"
import "regexp"
import "strconv"
import "time"
import "os/exec"
import "os"
import "errors"
import "path/filepath"
// 10 MB
const partSize = 10485760
// the minimum n... |
package runner
import (
"context"
"database/sql"
"encoding/json"
"errors"
"fmt"
"log"
"strings"
"time"
"github.com/ScoreTrak/ScoreTrak/pkg/hostgroup"
"github.com/ScoreTrak/ScoreTrak/pkg/servicegroup"
"github.com/ScoreTrak/ScoreTrak/pkg/team"
"github.com/ScoreTrak/ScoreTrak/pkg/check"
"github.com/ScoreTr... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: firewall.proto
package idcmanager
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
math "math"
)
// Reference imports to suppress errors if they are not otherw... |
// Code generator
// Convention:
// We SHOULD use the word "emit" for the meaning of "output assembly code",
// NOT for "load something to %rax".
// Such usage would make much confusion.
package main
import "os"
var offset0 int = 0
var offset8 int = 8
var offset16 int = 16
const IntSize int = 8 // 64-bit (8 byte... |
// Copyright 2020 The Operator-SDK 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 ... |
package bosun
import (
"context"
"fmt"
"github.com/fatih/color"
vault "github.com/hashicorp/vault/api"
"github.com/naveego/bosun/pkg/cli"
"github.com/naveego/bosun/pkg/command"
"github.com/naveego/bosun/pkg/core"
"github.com/naveego/bosun/pkg/environment"
"github.com/naveego/bosun/pkg/filter"
"github.com/nav... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/resources/google_ads_field.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
enums "google.golang.org/genproto/googleapis/ads/go... |
// Copyright 2018-Present Couchbase, Inc.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL-Couchbase.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 Apach... |
// Copyright 2019 The lpc-eco 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 main // import "github.com/sbinet-lpc/eco/cmd/eco-ingest"
import (
"database/sql"
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
"os"
"refl... |
package zipkinproxy
import (
"github.com/flachnetz/dd-zipkin-proxy/proxy"
"github.com/rcrowley/go-metrics"
"github.com/sirupsen/logrus"
"sort"
"strings"
"time"
)
type Id = proxy.Id
const bufferTime = 10 * time.Second
const maxSpans = 75000
var metricsSpansMerged metrics.Meter
var metricsTracesFinished metrics... |
// Copyright 2016 The etcd 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 t... |
// Copyright 2019 The go-ultiledger 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 o... |
/*
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, ... |
package bamboo
import (
"encoding/gob"
"time"
"go.uber.org/atomic"
"github.com/gitferry/bamboo/blockchain"
"github.com/gitferry/bamboo/config"
"github.com/gitferry/bamboo/crypto"
"github.com/gitferry/bamboo/election"
"github.com/gitferry/bamboo/hotstuff"
"github.com/gitferry/bamboo/identity"
"github.com/gi... |
package main
import (
"math"
"math/big"
)
func Exp(z *big.Float) *big.Float {
if z.Sign() == 0 {
return big.NewFloat(1).SetPrec(z.Prec())
}
if z.IsInf() && z.Sign() > 0 {
return big.NewFloat(math.Inf(+1)).SetPrec(z.Prec())
}
if z.IsInf() && z.Sign() < 0 {
return big.NewFloat(0).SetPrec(z.Prec())
}
gue... |
package main
import (
"context"
"fmt"
"net"
"net/url"
"os"
"path"
"path/filepath"
"sort"
"strconv"
"strings"
"github.com/AccumulateNetwork/accumulate/config"
cfg "github.com/AccumulateNetwork/accumulate/config"
"github.com/AccumulateNetwork/accumulate/internal/logging"
"github.com/AccumulateNetwork/accu... |
package lambda
import (
"bufio"
"container/list"
"fmt"
"log"
"net/http"
"net/http/httputil"
"os"
"path/filepath"
"strings"
"sync"
"time"
"github.com/open-lambda/open-lambda/ol/common"
"github.com/open-lambda/open-lambda/ol/sandbox"
)
// provides thread-safe getting of lambda functions and collects all
/... |
// +build linux
package collectd
//go:generate ../../../scripts/collectd-template-to-go collectd.conf.tmpl collectd.conf.go
import (
"bytes"
"io"
"os"
"os/exec"
"path/filepath"
"sync"
"syscall"
"time"
"github.com/davecgh/go-spew/spew"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"github.com... |
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"os/signal"
"strconv"
"strings"
"sync"
"time"
log "github.com/Sirupsen/logrus"
"github.com/go-chi/chi"
"github.com/hashicorp/nomad/api"
nomad "github.com/hashicorp/nomad/api"
tparse "github.com/karrick/tparse/v2"
"githu... |
// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0.
package restore
import (
"bytes"
"context"
"encoding/hex"
"fmt"
"strings"
"time"
_ "github.com/go-sql-driver/mysql" // mysql driver
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/backup"
"github.com/pingcap/kvproto/pkg/import_sstpb"
"... |
// 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 wri... |
package httpx
import (
"bufio"
"context"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"net/http"
"strconv"
"time"
"github.com/segmentio/netx"
)
// A Server implements the netx.Handler interface, it provides the handling of
// HTTP requests from a net.Conn, graceful shutdowns...
type Server struct {
// Ha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.