text stringlengths 5.51k 28.1k |
|---|
/*
Copyright 2016-2020 <NAME>. All right reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... |
package vm
import (
"encoding/binary"
"fmt"
"math"
"reflect"
"github.com/bytom/bytom/errors"
"github.com/bytom/bytom/math/checked"
)
type Op uint8
func (op Op) String() string {
return ops[op].name
}
type Instruction struct {
Op Op
Len uint32
Data []byte
}
const (
OP_FALSE Op = 0x00
OP_0 Op = 0... |
package netx
import (
"bytes"
"context"
"encoding/binary"
"errors"
"fmt"
"io"
"net"
"strconv"
)
// ProxyHandler is an interface that must be implemented by types that intend to
// proxy connections.
//
// The ServeProxy method is called by a Proxy when it receives a new connection.
// It is similar to the Ser... |
package main
import (
"bufio"
"flag"
"fmt"
"io"
"os"
"path/filepath"
"strings"
)
// Format represents an enumeration of possible file path formats.
type Format int
const (
// Windows file paths may contain a volume prefix as either a drive
// letter "C:" or a UNC path "\\host\share". Following a drive lette... |
package p2p
import (
"context"
"errors"
"sort"
"sync"
"time"
protocol2 "github.com/libp2p/go-libp2p-core/protocol"
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
"github.com/phoreproject/synapse/chainhash"
"github.com/golang/protobuf/proto"
"github.com/libp2p/go-libp2p"
crypto "github.com/libp2p/go-l... |
// Code generated by protoc-gen-go.
// source: IngestConnection.proto
// DO NOT EDIT!
/*
Package Beam_Ftl_Ingest_Messages_Connection is a generated protocol buffer package.
It is generated from these files:
IngestConnection.proto
It has these top-level messages:
IngestMessage
Connect
Connect_Response
*/
package ... |
// Copyright 2013 The Go-IMAP 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 package modified from:
https://github.com/mxk/go-imap/blob/master/imap/utf7.go
https://github.com/mxk/go-imap/blob/master/imap/utf7_test.go
IMAP sp... |
package is
// Thirteen The ultimate magical number 13
const Thirteen = 13
// ThirteenStrings The ultimate collection of 13 strings
var ThirteenStrings = []string{
"xiii", // Roman numeral 13
"1.3", // Basically 13, see proof in https://github.com/jezen/is-thirteen/pull/420
"1️⃣3️⃣", // emoji sequence of 1 and... |
package midi
import (
"gitlab.com/gomidi/midi/v2/internal/utils"
)
type MsgType uint64
// UnknownMsg represents every MIDI message that is invalid or unknown.
// There is no further data associated with messages of this type.
const UnknownMsg MsgType = 0
const (
// ChannelMsg is a MIDI channel message. It can be... |
// Copyright by <NAME> 2019 (<EMAIL>, <EMAIL>)
package main
import (
"fmt"
"github.com/Dobryvechir/dvserver/src/dvjson"
"github.com/Dobryvechir/dvserver/src/dvparser"
"github.com/Dobryvechir/dvserver/src/dvdir"
"io/ioutil"
"os"
"strconv"
"strings"
)
var copyright = "Copyright by <NAME> 2019"
const (
S_INIT... |
// Copyright 2010 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 zprof serves runtime profiling data.
package zprof
import (
"bufio"
"bytes"
"context"
"crypto/subtle"
_ "embed"
"errors"
"fmt"
"html/templat... |
// Copyright 2020 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.
// Command generate creates API (settings, etc) documentation in JSON and
// Markdown for machine and human consumption.
package main
import (
"bytes"
"encod... |
package patreon
import (
"time"
)
// AddressAttributes represent patron's shipping address attributes
type AddressAttributes struct {
// Full recipient name. Can be null.
Addressee string `json:"addressee"`
// First line of street address. Can be null.
Line1 string `json:"line_1"`
// Second line of street addre... |
package main
import (
"bufio"
"encoding/json"
"errors"
"flag"
"fmt"
"io"
"io/ioutil"
"math"
"math/rand"
"net"
"net/http"
"os"
"sort"
"strconv"
"strings"
"time"
"github.com/golang/glog"
"github.com/phayes/freeport"
"github.com/pivotal-golang/bytefmt"
)
// structure storing information on response o... |
/*
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... |
/*
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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/resources/ad_group_ad.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
wrappers "github.com/catper/protobuf/ptypes/wrappers"
common "google.golang.org/genproto/googleapis/ads/google... |
package game
import (
"fmt"
"os"
"time"
"io/ioutil"
"github.com/xiaonanln/go-xnsyncutil/xnsyncutil"
"github.com/xiaonanln/goTimer"
"github.com/xiaonanln/goworld/components/dispatcher/dispatcherclient"
"github.com/xiaonanln/goworld/engine/async"
"github.com/xiaonanln/goworld/engine/common"
"github.com/xiao... |
package bux
import (
"context"
"time"
"github.com/BuxOrg/bux/cachestore"
"github.com/BuxOrg/bux/chainstate"
"github.com/BuxOrg/bux/datastore"
"github.com/BuxOrg/bux/logger"
"github.com/BuxOrg/bux/notifications"
"github.com/BuxOrg/bux/taskmanager"
"github.com/newrelic/go-agent/v3/newrelic"
"github.com/tonicp... |
// Package interp implements the tree-walker
// interpreter for the lox language
package interp
import (
"fmt"
"io"
"os"
"github.com/rmonnet/glox/lang"
)
// Interp represents the state of the lox interpreter.
type Interp struct {
hadCompileError bool
hadRuntimeError bool
globalEnv *env
env ... |
//go:build windows
package win
import (
"unsafe"
"github.com/rodrigocfd/windigo/internal/util"
"github.com/rodrigocfd/windigo/win/co"
)
// 📑 https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-accel
type ACCEL struct {
FVirt co.ACCELF // Modifiers.
Key co.VK // Virtual ke... |
// Package dbmutex implements a DB-based mutex that can be used to synchronize work
// among multiple processes.
//
// Features
//
// - minimal dependencies
//
// - works with mysql and postgres
//
// - works with database failovers
//
// - mutex lock and unlock operations can timeout if desired
//
// - callers can be ... |
package main
import (
"flag"
"fmt"
"log"
"os"
"path"
"path/filepath"
"sort"
"strings"
"text/template"
"time"
"github.com/hashicorp/go-version"
"github.com/jinzhu/configor"
"github.com/k0kubun/pp"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/config"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"... |
/*
Copyright 2021 RadonDB.
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
distri... |
package card
import (
"testing"
"github.com/bmizerany/assert"
)
func TestGetCardsType(t *testing.T) {
card1 := &Card{CardType: CardType_Diamond,CardNo: 1, Weight:14,} //方片1
card2 := &Card{CardType: CardType_Club,CardNo: 1, Weight:14,} //梅花1
card3 := &Card{CardType: CardType_Heart,CardNo: 1, Weight:14,} //红桃1
... |
// 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.
// IP address manipulations
//
// IPv4 addresses are 4 bytes; IPv6 addresses are 16 bytes.
// An IPv4 address can be converted to an IPv6 address by
// adding a... |
package platformclientv2
import (
"time"
"github.com/leekchan/timeutil"
"encoding/json"
"strconv"
"strings"
)
// Homerrecord
type Homerrecord struct {
// Id - The globally unique identifier for the object.
Id *string `json:"id,omitempty"`
// Name
Name *string `json:"name,omitempty"`
// Date - metadata a... |
// vi:set ai sm nu ts=4 sw=4 fileencoding=utf-8:
/*
########################################################################################
# _______ _______ _______ ___ _______ _______ #
# ( ____ \( )( ___ ) / ) / ___ ) / ___ ) #
#... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.13.0
// source: valveextensions.proto
package dota
import (
proto "github.com/golang/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
protoreflect "google.golang.org/protobuf... |
package main
import (
"encoding/binary"
"fmt"
"io"
"net"
"os"
"os/signal"
"runtime/pprof"
"strconv"
"sync"
"syscall"
"time"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/pcap"
"github.com/google/gopacket/tcpassembly"
"github.com/google/gopacket/tcpassembl... |
// Package sunyata defines the basic types and functions of the sunyata
// system.
package sunyata
import (
"bytes"
"crypto/ed25519"
"crypto/sha512"
"encoding/binary"
"encoding/hex"
"fmt"
"hash"
"math"
"math/big"
"math/bits"
"sync"
"time"
)
// EphemeralLeafIndex is used as the LeafIndex of Outputs that ar... |
// 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 writin... |
package api
import (
"encoding/json"
"fmt"
"io"
"net/http"
"time"
"github.com/go-chi/chi"
"github.com/gofrs/uuid"
"github.com/gorilla/websocket"
"github.com/wtg/shuttletracker"
"github.com/wtg/shuttletracker/log"
)
var upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
}
// Me... |
package main
import (
"bytes"
"encoding/binary"
"encoding/json"
"errors"
"fmt"
"hash/crc32"
"io"
"sync"
"sync/atomic"
"time"
"unsafe"
"github.com/dustin/go-broadcast"
"github.com/dustin/gomemcached"
)
const (
GET_VBMETA = gomemcached.CommandCode(0x61)
SET_VBMETA = gomemcached.Comma... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/type/matcher/v3/string.proto
package envoy_type_matcher_v3
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/go-control-plane/envoy/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "g... |
package main
import (
"errors"
"fmt"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
"github.com/tidwall/gjson"
"io"
"math"
"sort"
"strconv"
"strings"
"time"
)
type InfoLine struct {
label string
value string
}
type InfoColumn struct {
labelColor string
valueColor string
rows []*InfoLine
... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: list.proto
package secret
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
container "github.com/easyopsapis/easyops-api-go/protorepo-models/easyops/model/conta... |
package commands
import (
"container/list"
"encoding/json"
"errors"
"fmt"
"strconv"
"strings"
"time"
"github.com/jfrog/jfrog-cli-core/v2/plugins/components"
"github.com/jfrog/jfrog-cli-core/v2/utils/config"
"github.com/jfrog/jfrog-client-go/utils/log"
helpers "github.com/lorenyeung/indexcheck/utils"
)
//r... |
package main
import (
"log"
"os"
"io/ioutil"
"encoding/csv"
"fmt"
"strconv"
"regexp"
)
var ConsByLevel = [][]Consultant{}
var RankMap = make(map[string]Rank)
var RankNames = []string{}
var TMMap = make(map[string]Consultant)
var ThisConsultant Consultant
var ThisRank Rank
var ForceRank = int6... |
/*
* Copyright (c) 2019 WSO2 Inc. (http:www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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/license... |
package evidence_test
import (
"fmt"
"os"
"testing"
"time"
"github.com/line/ostracon/crypto/bls"
"github.com/line/ostracon/crypto/composite"
"github.com/line/ostracon/crypto/ed25519"
"github.com/line/tm-db/v2/memdb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretc... |
// Copyright 2010 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 zip
import (
"bufio"
"encoding/binary"
"errors"
"fmt"
"hash"
"hash/crc32"
"io"
"os"
)
var (
ErrFormat = errors.New("zip: not a valid zip f... |
package utils
import (
"bytes"
"context"
"encoding/csv"
"errors"
"fmt"
"io"
"net"
"os"
"regexp"
"sort"
"strconv"
"strings"
"sync"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"github.com/container-storage-interface/spec/lib... |
package setup
import (
"context"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
ptypes "github.com/golang/protobuf/ptypes"
duration "github.com/golang/protobuf/ptypes/duration"
daemonservicePb "github.com/google/fleetspeak/fleetspeak/src/client/daemonservice/proto/fleetspeak_daemonservice"
clientConfigPb "g... |
// 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.
package strconv_test
import (
"math"
"math/rand"
. "strconv"
"testing"
)
type ftoaTest struct {
f float64
fmt byte
prec int
s string
}
func fd... |
/*
* Minio Cloud Storage, (C) 2016, 2017, 2017 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 a... |
// Copyright (c) 2019 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 required by applica... |
// 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 ds
/*
* 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
* "Lic... |
package renter
import (
"bytes"
"context"
"io/ioutil"
"time"
"github.com/opentracing/opentracing-go"
"gitlab.com/NebulousLabs/encoding"
"gitlab.com/SkynetLabs/skyd/build"
"gitlab.com/SkynetLabs/skyd/skymodules"
"go.sia.tech/siad/crypto"
"go.sia.tech/siad/modules"
"go.sia.tech/siad/types"
"gitlab.com/Nebu... |
package cc
import (
"context"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"io/fs"
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"strings"
"github.com/davecgh/go-spew/spew"
"github.com/hashicorp/go-hclog"
"github.com/mr-tron/base58/base58"
"golang.org/x/sys/unix"
"lab47.dev/aperture/pkg/data"
)
... |
package cli
import (
"context"
"encoding/json"
"errors"
"fmt"
"io/fs"
"net/url"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"github.com/juanfont/headscale"
v1 "github.com/juanfont/headscale/gen/go/headscale/v1"
"github.com/rs/zerolog/log"
"github.com/spf13/viper"
"google.golang.org/grpc"... |
// Copyright 2013 Martini Authors
// Copyright 2014 The Macaron 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 r... |
// Copyright 2017 The Bazel 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 appl... |
package worker
import (
"crypto/rand"
"database/sql"
"encoding/hex"
"fmt"
"math"
"strings"
"time"
"github.com/go-gorp/gorp"
"github.com/ovh/cds/engine/api/cache"
"github.com/ovh/cds/engine/api/group"
"github.com/ovh/cds/engine/api/token"
"github.com/ovh/cds/engine/api/workermodel"
"github.com/ovh/cds/sd... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package etcdraft
import (
"bytes"
"encoding/pem"
"fmt"
"sync"
"sync/atomic"
"time"
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/common/channelconfig"
"github.com/hyperledger/fabric/common/configtx"
"git... |
// Copyright 2012 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 build
import (
"exp/locale/collate"
"exp/norm"
"fmt"
"io"
"log"
"sort"
"strings"
"unicode/utf8"
)
// TODO: optimizations:
// - expandElem is c... |
// Copyright 2018 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... |
/*
*
* Copyright 2017 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
/*
Copyright 2021 The KubeVela 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, so... |
package flows
import (
"bytes"
"encoding/base64"
"encoding/binary"
"net"
)
type FlowID struct {
rawFlowID
flow Flow // remember associated flow for faster lookup
}
type rawFlowID struct {
flowID []byte
flowIDMeta
dir flowDirection
}
type flowIDMeta struct {
flags FlowIDFlag
// offsets into flowID
offEt... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/resources/ad_group_simulation.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
wrappers "github.com/catper/protobuf/ptypes/wrappers"
common "google.golang.org/genproto/googleapis/ad... |
/*
*
* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*
*/
package nebula_go
import (
"fmt"
"sort"
"strconv"
"strings"
"github.com/vesoft-inc/nebula-go/v2/nebula"
)
type ValueWrapper struct {
value *nebula.Value
timezoneInfo timezon... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: config/service/aws/v1/aws.proto
package awsv1
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google... |
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT License was not distributed with this
// file, you can obtain one at https://opensource.org/licenses/MIT.
//
// Copyright (c) DUSK NETWORK. All rights reserved.
package mempool
import (
"bytes"
"context"
"encoding/hex"
"e... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.12.3
// source: storage/gcs.proto
package storage
import (
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
protoreflect "google.golang.org/protobuf/reflect/pro... |
package rpcservice
import (
"fmt"
"github.com/pkg/errors"
)
const (
UnexpectedError = iota
AlreadyStartedError
JsonError
RPCInvalidRequestError
RPCMethodNotFoundError
RPCInvalidParamsError
RPCInvalidMethodPermissionError
RPCInternalError
RPCParseError
InvalidTypeError
AuthFailError
InvalidSenderPriva... |
// Copyright 2019 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... |
////////////////////////////////////////////////////////////////////////////////
// //
// Copyright 2019 Dell, Inc. //
// ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.2
// source: userModel.proto
package service
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync... |
/*
Copyright 2021 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/common/frequency_cap.proto
package common // import "google.golang.org/genproto/googleapis/ads/googleads/v0/common"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import wrappers "github.com/golang... |
package buildlog
import (
"context"
"fmt"
"io"
"strconv"
"time"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/wait"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
genericre... |
package ldb
import (
"bytes"
"encoding/binary"
"fmt"
"math"
"massnet.org/mass/database"
"massnet.org/mass/database/storage"
"massnet.org/mass/debug"
"massnet.org/mass/logging"
"massnet.org/mass/wire"
)
type txUpdateObj struct {
txSha *wire.Hash
blkHeight uint64
txoff int
txlen int
ntxout ... |
package buildah
import (
"context"
"fmt"
"math/rand"
"runtime"
"strings"
"github.com/containers/buildah/define"
"github.com/containers/buildah/util"
"github.com/containers/image/v5/docker"
"github.com/containers/image/v5/image"
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/pkg/s... |
// 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/auth_header.proto
package enforcer
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/p... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/ml/v1/operation_metadata.proto
package ml
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
math "math"
)
// Refere... |
/*
Copyright 2019 The Vitess 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 http2
import (
"bytes"
"crypto/tls"
"fmt"
"net/http"
"strings"
)
func (e ErrCode) String() string {
switch e {
case ErrCodeNo:
return "NO_ERROR"
case ErrCodeProtocol:
return "PROTOCOL_ERROR"
case ErrCodeInternal:
return "INTERNAL_ERROR"
case ErrCodeFlowControl:
return "FLOW_CONTROL_ERROR"
c... |
// Copyright 2022 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package dpos
import (
"errors"
"math/rand"
"sync"
"github.com/elastos/Elastos.ELA/blockchain"
"github.com/elastos/Elastos.ELA/blockchain/interfaces"
"github.com/elastos/Elastos.ELA/common"
"github.com/elastos/Elastos.ELA/common/config"
"github.com/elastos/Elastos.ELA/core/types"
"github.com/elastos/Elastos.E... |
package e2e
import (
"context"
"crypto/ecdsa"
"errors"
"github.com/0xPolygon/polygon-edge/txpool"
"math/big"
"testing"
"time"
"github.com/0xPolygon/polygon-edge/crypto"
"github.com/0xPolygon/polygon-edge/e2e/framework"
"github.com/0xPolygon/polygon-edge/helper/tests"
txpoolOp "github.com/0xPolygon/polygon-... |
package spi
import (
"errors"
"fmt"
"image"
"time"
"github.com/stevebargelt/mygobot"
"github.com/stevebargelt/mygobot/drivers/gpio"
)
const (
// default values
ssd1306Width = 128
ssd1306Height = 64
ssd1306DcPin = "16" // for raspberry pi
ssd1306RstPin = "18" // for raspberry pi
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: tensorflow/core/framework/remote_fused_graph_execute_info.proto
package framework
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marsh... |
package statestruct
type User struct {
Building *Building `json:"building"`
Social *struct {
AssistCharList []AssistCharList `json:"assistCharList"`
YesterdayReward YesterdayReward `json:"yesterdayReward"`
} `json:"social"`
Ticket EmptyStruct `json:"ticket"`
Gacha *Gacha `json:"gacha"`
Open... |
package producer_plugin
import (
"fmt"
"github.com/eosspark/eos-go/chain/types"
. "github.com/eosspark/eos-go/chain/types/generated_containers"
. "github.com/eosspark/eos-go/plugins/chain_interface"
"github.com/eosspark/eos-go/plugins/chain_plugin"
//Chain "github.com/eosspark/eos-go/plugins/producer_plugin/tes... |
// Copyright Turing Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//Package gossip ...
package gossip
import (
"bytes"
"encoding/hex"
"time"
"github.com/turingchain2020/turingchain/p2p/utils"
"github.com/turingchain2020/t... |
// Package allowing to benchmark performances of the ana package.
package main
import (
"fmt"
"log"
"math"
"gonum.org/v1/plot/plotutil"
"gonum.org/v1/plot/vg"
"go-hep.org/x/hep/hbook"
"go-hep.org/x/hep/hplot"
"github.com/rmadar/hplot-style/style"
"github.com/rmadar/tree-gonalyzer/ana"
)
// Run all the tes... |
package renter
import (
"bytes"
"io"
"sync"
"time"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/modules/renter/siafile"
)
type (
// streamer is a modules.Streamer that can be used to stream downloads from
// the sia network.
streamer struct {
// Rea... |
/*
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... |
package main
import (
"context"
"errors"
"fmt"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"helm.sh/helm/v3/pkg/chart"
"helm.sh/helm/v3/pkg/chart/loader"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/klog/v2"
v1al... |
package data
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"time"
"github.com/pkg/errors"
"go.uber.org/zap"
"github.com/KyberNetwork/reserve-data/common"
"github.com/KyberNetwork/reserve-data/common/archive"
"github.com/KyberNetwork/reserve-data/data/datapruner"
v3 "github.com/KyberNetwork/reserve-data/... |
/*
* Copyright (c) 2018 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 cli
import (
"crypto/tls"
"encoding/base64"
"errors"
"fmt"
"log"
"net"
"strconv"
"strings"
"time"
"unicode/utf8"
_ "unsafe"
. "git... |
/*
Package server is the place we integrate the Livepeer node with the LPMS media server.
*/
package server
import (
"context"
"errors"
"fmt"
"math/big"
"net/url"
"regexp"
"strings"
"time"
"github.com/ericxtang/m3u8"
"github.com/ethereum/go-ethereum/crypto"
"github.com/golang/glog"
"github.com/livepeer/go... |
package message
import (
"encoding/binary"
"fmt"
"strconv"
)
const (
max1ByteNumber = uint32(^uint8(0))
max2ByteNumber = uint32(^uint16(0))
max3ByteNumber = uint32(0xffffff)
)
const (
ExtendOptionByteCode = 13
ExtendOptionByteAddend = 13
ExtendOptionWordCode = 14
ExtendOptionWordAddend = 269
ExtendOpt... |
package chain
import (
"context"
"fmt"
"time"
"0chain.net/chaincore/config"
"0chain.net/chaincore/node"
"0chain.net/chaincore/block"
"0chain.net/core/common"
"0chain.net/core/logging"
"go.uber.org/zap"
)
/*VerifyTicket - verify the ticket */
func (c *Chain) VerifyTicket(ctx context.Context, blockHash strin... |
package badger
import (
"bytes"
"context"
"encoding/binary"
"encoding/json"
"io"
"time"
"github.com/cespare/xxhash"
"github.com/dgraph-io/badger"
pprofProfile "github.com/profefe/profefe/internal/pprof/profile"
"github.com/profefe/profefe/pkg/log"
"github.com/profefe/profefe/pkg/profile"
"github.com/profe... |
/*
Package iplib provides enhanced tools for working with IP networks and
addresses. These tools are built upon and extend the generic functionality
found in the Go "net" package.
IPLib comes in two basic parts: a set of utility features for working with
net.IP (sort, increment, decrement, delta, compare; convert to h... |
package pvss
import (
"bytes"
"fmt"
"math/big"
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/torusresearch/torus-common/common"
"github.com/torusresearch/torus-common/secp256k1"
pcmn "github.com/torusresearch/torus-node/common"
)
type nodeList struct {
Nodes []pcmn.Node
}
func TestB... |
package main
import (
"clout/display"
"clout/draw"
"clout/models"
"clout/network"
"clout/session"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
"sort"
"strings"
"time"
"github.com/fogleman/gg"
"github.com/wcharczuk/go-chart"
)
var alreadyDone map[string]bool
var r models.Rate
var actorPub58 string... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.