text stringlengths 5.51k 28.1k |
|---|
package node
import (
"errors"
"math/rand"
"net"
"sync"
"sync/atomic"
"time"
chain "github.com/elastos/Elastos.ELA/blockchain"
"github.com/elastos/Elastos.ELA/bloom"
. "github.com/elastos/Elastos.ELA/common"
. "github.com/elastos/Elastos.ELA/common/config"
"github.com/elastos/Elastos.ELA/common/log"
. "gi... |
package consumer
import (
"context"
"database/sql"
"errors"
"io/ioutil"
"os"
"testing"
"time"
_ "github.com/mattn/go-sqlite3"
"github.com/stretchr/testify/require"
clientv3 "go.etcd.io/etcd/client/v3"
"go.gazette.dev/core/allocator"
"go.gazette.dev/core/broker/client"
pb "go.gazette.dev/core/broker/proto... |
/*
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, ... |
// Copyright 2014 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... |
package job_creation
import (
"context"
"fmt"
"net/http"
"strings"
"time"
"go.skia.org/infra/go/cas"
"go.skia.org/infra/go/common"
"go.skia.org/infra/go/firestore"
"go.skia.org/infra/go/gerrit"
"go.skia.org/infra/go/git"
"go.skia.org/infra/go/git/repograph"
"go.skia.org/infra/go/metrics2"
"go.skia.org/in... |
package status
import (
"context"
"encoding/json"
"fmt"
"os"
"reflect"
"sort"
"strings"
"sync"
"time"
"golang.org/x/time/rate"
configv1 "github.com/openshift/api/config/v1"
configv1client "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1"
"github.com/openshift/insights-operator/... |
// Copyright 2020 The LUCI 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... |
package cpu
// those function 0 or 1 to indicate whether
// there need to be another clock cycle
type FUNC_Operate func(*Cpu)
func GetOpOperate( opcode uint8 ) FUNC_Operate {
return _cmp_opcode_lookup[opcode].operate
}
func GetOpName(opcode uint8) string {
return _cmp_opcode_lookup[opcode].name
}
/*
Bit... |
// The snek package implements lightweight subcommands for a command-line
// application.
//
// An example of a main entry point:
//
// var Program = snek.NewProgram("", os.Args)
//
// func main() {
// Program.Main()
// }
//
// An example of a subcommand:
//
// func init() {
// Program.Registe... |
// Copyright Suneido Software Corp. All rights reserved.
// Governed by the MIT license found in the LICENSE file.
package btree
import (
"fmt"
"strconv"
"strings"
"github.com/apmckinlay/gsuneido/db19/index/ixbuf"
"github.com/apmckinlay/gsuneido/db19/stor"
"github.com/apmckinlay/gsuneido/util/assert"
"github.... |
package cmd
import (
"context"
"fmt"
"io/ioutil"
"strings"
"github.com/joesuf4/kubectl-trace/pkg/attacher"
"github.com/joesuf4/kubectl-trace/pkg/downloader"
"github.com/joesuf4/kubectl-trace/pkg/meta"
"github.com/joesuf4/kubectl-trace/pkg/signals"
"github.com/joesuf4/kubectl-trace/pkg/tracejob"
"github.com/... |
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// Code generated by "mdtogo"; DO NOT EDIT.
package api
var ConfigIoLong = `# Configuration IO API Semantics
Resource Configuration may be read / written from / to sources such as directories,
stdin|out or network. Tools may be composed... |
/*
Copyright 2021.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... |
/*
© 2019 Red Hat, Inc. and others.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwa... |
package cmn
// instruction set
const (
// Constants
OPCODE_nop = 0x0
OPCODE_aconst_null = 0x1
OPCODE_iconst_m1 = 0x2
OPCODE_iconst_0 = 0x3
OPCODE_iconst_1 = 0x4
OPCODE_iconst_2 = 0x5
OPCODE_iconst_3 = 0x6
OPCODE_iconst_4 = 0x7
OPCODE_iconst_5 = 0x8
OPCODE_lconst_0 = 0x9
OPCOD... |
package bi
import (
"fmt"
"image/color"
"math"
"strings"
"sync"
)
// Model can convert any Color to one from its own color model, and can convert
// a color to the name of the color, and can convert from a name of a color to
// the color.
type Model interface {
ID() string
color.Model
ColorToName(c color.Colo... |
package main
import (
"context"
"fmt"
"io"
"io/ioutil"
"os"
"path"
"runtime"
"strings"
"sync"
"time"
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
dss "github.com/ipfs/go-datastore/sync"
bstore "github.com/ipfs/go-ipfs-blockstore"
chunker "github.com/ipfs/go... |
/*
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 writing,... |
// Copyright 2017 The LUCI 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... |
//go:generate protoc -I . -I ../../vendor --gogo_out=plugins=grpc:. factable.proto
package factable
import (
"time"
"github.com/LiveRamp/gazette/v2/pkg/message"
pb "github.com/LiveRamp/gazette/v2/pkg/protocol"
)
// Field is a simple data type (eg, int64, float64, time.Time, string). A
// Dimension is always a Fi... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: yandex/cloud/mdb/mongodb/v1/resource_preset_service.proto
package mongodb // import "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/yan... |
// Copyright 2018 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 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: flyteidl/admin/workflow.proto
package admin
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
core "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core"
math "math"
)
// Reference imports t... |
// Copyright ©2012 The bíogo 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 sam
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"io"
)
var (
errDupReference = errors.New("sam: duplicate reference name")
errDup... |
package fileSharing
import (
"os"
"io"
"fmt"
"sync"
"time"
"bytes"
"crypto/sha256"
"encoding/hex"
"github.com/TRUMANCFY/DSEProject/Peerster/network"
"github.com/TRUMANCFY/DSEProject/Peerster/message"
"github.com/TRUMANCFY/DSEProject/Peerster/routing"
)
type FileIndexer struct {
SharedFolder string
}
typ... |
package db
import (
"database/sql"
"fmt"
"regexp"
"strings"
"time"
"github.com/jhunt/go-log"
"github.com/pborman/uuid"
)
const (
BackupOperation = "backup"
RestoreOperation = "restore"
ShieldRestoreOperation = "shield-restore"
PurgeOperation = "purge"
TestStoreOperation = "test-s... |
// Code generated by protoc-gen-go.
// source: playlist4issues.proto
// DO NOT EDIT!
package Spotify
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
t... |
package wazeroir
import "fmt"
type SignLessInt byte
const (
SignLessInt32 SignLessInt = iota
SignLessInt64
)
func (s SignLessInt) String() (ret string) {
switch s {
case SignLessInt32:
ret = "i32"
case SignLessInt64:
ret = "i64"
}
return
}
type SignFulInt byte
const (
SignFulInt32 SignFulInt = iota
S... |
package ecache_test
import (
"errors"
"math/rand"
"strconv"
"sync"
"sync/atomic"
"testing"
"time"
"unsafe"
"github.com/dgraph-io/ristretto"
"github.com/stretchr/testify/assert"
"github.com/VictoriaMetrics/fastcache"
"github.com/allegro/bigcache"
"github.com/cespare/xxhash"
"github.com/coocood/freecache... |
//
// @bp0lr - 30/11/2020
//
package main
import (
"bufio"
"fmt"
"io/ioutil"
"net/url"
"os"
"path"
"strings"
"sync"
def "github.com/bp0lr/dmut/defines"
dnsManager "github.com/bp0lr/dmut/dnsManager"
resolver "github.com/bp0lr/dmut/resolver"
tables "github.com/bp0lr/dmut/tables"
util "github.com/bp0lr/dmu... |
package overlap
import (
"github.com/jteutenberg/downpore/seeds"
"github.com/jteutenberg/downpore/util"
"log"
"math"
"sort"
)
//functions in this file relate to multiple ordered overlaps between sequences that can be used to arrange the original sequences into a pileup
//It also provides functionality for pullin... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: proto/FileService.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
co... |
package main
import (
"encoding/json"
"errors"
"fmt"
"os"
"strconv"
"strings"
"time"
"github.com/bitrise-io/go-utils/log"
"github.com/bitrise-tools/go-steputils/stepconf"
"github.com/bitrise-tools/go-steputils/tools"
"github.com/mholt/archiver"
"gopkg.in/resty.v1"
)
// Config : Configuration for this ste... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/spanner/v1/mutation.proto
package spanner
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_struct "github.com/golang/protobuf/ptypes/struct"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference import... |
// Copyright 2020 The Chromium 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 eval
import (
"bytes"
"container/heap"
"context"
"flag"
"math"
"sort"
"sync"
"sync/atomic"
"time"
"golang.org/x/sync/errgroup"
"googl... |
package eth
import (
"context"
"errors"
"fmt"
log "github.com/bloXroute-Labs/gateway/logger"
"github.com/bloXroute-Labs/gateway/types"
"github.com/bloXroute-Labs/gateway/utils"
"github.com/ethereum/go-ethereum/common"
ethtypes "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/eth/p... |
package prober
import (
"context"
"crypto/tls"
"crypto/x509"
// "errors"
"fmt"
// "io"
"io/ioutil"
"net"
"net/http"
"net/http/cookiejar"
"net/url"
// "regexp"
// "strconv"
"strings"
"time"
"github.com/emmanuel/blackbox-exporter/internal/config"
"github.com/emmanuel/blackbox-exporter/internal/logging"... |
package dataframe
import (
"fmt"
"go.starlark.net/starlark"
)
type dataframeAttrImpl func(*DataFrame) (starlark.Value, error)
var dataframeAttributes = map[string]dataframeAttrImpl{
"at": dataframeAttrAt,
"attrs": attrNoImpl("attrs"),
"axes": attrNoImpl("axes"),
"columns": dataframeAttrColumns,
"dt... |
// Copyright (c) 2019 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 o... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: infra/appengine/crosskylabadmin/api/fleet/v1/common.proto
package fleet
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Er... |
package application
import (
"flag"
"fmt"
"os"
"runtime"
"runtime/pprof"
"runtime/trace"
"time"
"github.com/leapar/engine/audio/al"
"github.com/leapar/engine/audio/vorbis"
"github.com/leapar/engine/camera"
"github.com/leapar/engine/camera/control"
"github.com/leapar/engine/core"
"github.com/leapar/engine... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.6.1
// source: proto/lidom.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync ... |
package common
import (
"math"
"math/rand"
"sort"
)
type Boundable interface {
Bounds() Rectangle
}
type Point struct {
X float64
Y float64
}
func (point Point) LonLatToMeters(origin Point) Point {
return Point{
X: 111111 * math.Cos(origin.Y * math.Pi / 180) * (point.X - origin.X),
Y: 111111 * (point.Y -... |
package proxy
import (
"bytes"
"database/sql/driver"
"encoding/binary"
"fmt"
"io"
"net"
"strconv"
"strings"
"sync"
"sync/atomic"
u "github.com/araddon/gou"
"github.com/araddon/qlbridge/rel"
"github.com/araddon/qlbridge/schema"
"github.com/dataux/dataux/models"
"github.com/dataux/dataux/vendored/mixer/... |
/*
Copyright (C) BABEC. All rights reserved.
Copyright (C) THL A29 Limited, a Tencent company. All rights reserved.
SPDX-License-Identifier: Apache-2.0
*/
package scheduler
import (
"errors"
"fmt"
"regexp"
"sync"
"time"
"chainmaker.org/chainmaker-go/core/provider/conf"
"chainmaker.org/chainmaker/localconf/v2... |
/*
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 (c) 2021, Intel 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... |
package main
import (
"context"
"fmt"
"github.com/araddon/dateparse"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/kinesis"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/disney/quanta/core"
"github.com/di... |
package main
import (
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"path"
"regexp"
"strconv"
"strings"
"github.com/jayacarlson/dbg"
"github.com/jayacarlson/pth"
)
type tokenMap map[string]string
var (
bug = dbg.Dbg{}
tokRex = regexp.MustCompile("((?s).*?)%(.)((?s).*)")
recursive bool
bashHeader ... |
package main
import (
"gitee.com/jntse/minehero/pbmsg"
"gitee.com/jntse/minehero/server/tbl"
_"gitee.com/jntse/minehero/server/tbl/excel"
"gitee.com/jntse/minehero/server/def"
"gitee.com/jntse/gotoolkit/net"
"gitee.com/jntse/gotoolkit/log"
"gitee.com/jntse/gotoolkit/util"
"gitee.com/jntse/gotoolkit/eventqueue"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/service/trace/v2/trace_service.proto
package envoy_service_trace_v2
import (
context "context"
fmt "fmt"
v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1"
core "github.com/cilium/proxy/go/envoy/api/v2/core"
_ "github.com/cncf... |
package helper
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/yaoapp/gou"
"github.com/yaoapp/kun/maps"
)
var testRecords = []map[string]interface{}{
{"id": 1, "name": "云服务", "category_id": nil, "type_id": nil, "rank": 1, "parent_id": 0},
{"id": 2, "name": "基础服务", "category_id": nil, "type_... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.9.0
// source: datatypes/proto/v1/protoconf_value.proto
package v1
import (
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
protoreflect "google.golang.org/protobuf/refl... |
package main
import (
"bytes"
"context"
"crypto/rsa"
"crypto/sha256"
"encoding/base64"
"encoding/gob"
"errors"
"flag"
"fmt"
"io"
"log"
"net"
"net/http"
"net/url"
"os"
"strconv"
"strings"
"time"
"github.com/apex/gateway"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"git... |
/*
Package gomempool implements a simple memory pool for byte slices.
When To Use gomempool
The Go garbage collector runs more often when more bytes are allocated.
(For full details, see the runtime package documentation on the GOGC
variable.) Avoiding allocations can help the stop-the-world GC run
much less often.
... |
package cuckoo
import (
"fmt"
"math/rand"
)
// semi sort table
// Using Permutation encoding to save 1 bit per tag
type PackedTable struct {
kDirBitsPerTag uint32
kBitsPerBucket uint32
kBytesPerBucket uint32
kDirBitsMask uint32
bitsPerItem uint32
len uint32
numBuckets uint32
buckets []byt... |
package main
import (
"fmt"
"crypto/ecdsa"
"math/rand"
"time"
"math/big"
"bytes"
"io"
"compress/gzip"
"errors"
"crypto/sha256"
"os"
"github.com/millicentnetwork/go-opera/inter"
"github.com/millicentnetwork/go-opera/inter/validatorpk"
"github.com/ethereum/go-ethereum/crypto"
"github.com/millicentnetwork... |
// Copyright ©2015 The gonum 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 community
import (
"math"
"math/rand"
"sort"
"gonum.org/v1/gonum/graph"
"gonum.org/v1/gonum/graph/internal/ordered"
"gonum.org/v1/gonum/grap... |
package lib
import (
"fmt"
configparser "github.com/alyu/configparser"
"os"
"strings"
)
var specChineseConfig = SpecText{
synopsisText: "创建配置文件用以存储配置项",
paramText: "[options]",
syntaxText: `
ossutil config [-e endpoint] [-i id] [-k key] [-t token] [-L language] [--output-dir outdir] [-c file]
`,
det... |
package loggerutils // import "github.com/docker/docker/daemon/logger/loggerutils"
import (
"compress/gzip"
"context"
"encoding/json"
"fmt"
"io"
"io/fs"
"math"
"os"
"strconv"
"sync"
"time"
"github.com/docker/docker/daemon/logger"
"github.com/docker/docker/pkg/pools"
"github.com/pkg/errors"
"github.com/... |
// Package scipipe is a library for writing scientific workflows (sometimes
// also called "pipelines") of shell commands that depend on each other, in the
// Go programming languages. It was initially designed for problems in
// cheminformatics and bioinformatics, but should apply equally well to any
// domain involvi... |
// Portions Copyright (C) 2020 VMware, Inc.
// SPDX-License-Identifier: Apache-2.0
package kubernetes
import (
"context"
"fmt"
"net"
"strconv"
"strings"
"time"
"github.com/moby/buildkit/client"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/vmware-tanzu/buildkit-cli-for-kubectl/pkg/driver"... |
// Copyright 2017 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
package commands
import (
"errors"
"fmt"
"net"
"net/http"
_ "net/http/pprof" // pprof package adds everything itself inside its init() function
"os"
"os/signal"
"runtime"
"syscall"
"time"
"github.com/ayufan/golang-kardianos-service"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/... |
package internal
import "fmt"
const (
CreateAddressTable = `CREATE TABLE IF NOT EXISTS addresses (
id SERIAL8 PRIMARY KEY,
address TEXT,
tx_hash TEXT,
valid_mainchain BOOLEAN,
matching_tx_hash TEXT,
value INT8,
block_time TIMESTAMP NOT NULL,
is_funding BOOLEAN,
tx_vin_vout_index INT4,
tx_vin_vout... |
package radius
import (
"reflect"
"testing"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
)
func checkLayers(p gopacket.Packet, want []gopacket.LayerType, t *testing.T) {
layers := p.Layers()
t.Log("Checking packet layers, want", want)
for _, l := range layers {
t.Logf(" Got layer %v, %d... |
// Copyright 2021 MatrixOrigin.
//
// 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 agr... |
package numerical
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"math"
"math/rand"
"os"
"time"
"github.com/edotau/goFish/csv"
"github.com/edotau/goFish/stats"
)
type KMeans struct {
// maxIterations is the number of iterations the learning will be cut off at in a non-online setting.
maxIterations int
... |
// Copyright 2017 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 ... |
/*
Copyright 2016 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 2021 The KEDA 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, softwar... |
// Copyright 2017 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
/*
Copyright 2017 The Nuclio 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 web
import (
"bytes"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"net/url"
"runtime"
"strconv"
"strings"
"testing"
)
var testServer *Server
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
testServer = NewServer()
}
type dummyConnection struct {
fd ... |
// Copyright 2019 The Hugo 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 ... |
package wikipedia
import (
"encoding/json"
"fmt"
"reflect"
"strings"
)
// Wikidata is a Wikidata item
type Wikidata struct {
ID string `json:"id,omitempty"`
Labels `json:"labels,omitempty"`
Aliases `json:"aliases,omitempty"`
Descriptions `json:"descriptions,omitempty"`
*Claims `json... |
package test
import (
"crypto/rand"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/httptest"
"net/url"
"os"
"path"
"regexp"
"strconv"
"strings"
"testing"
"time"
"github.com/keeper-security/secrets-manager-go/core"
)
var (
MockResponseQueue mockResponseQueue = mockResponseQueue{}
conte... |
package quad
import (
"crypto/sha1"
"fmt"
"hash"
"math/rand"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/cayleygraph/cayley/voc"
"github.com/cayleygraph/cayley/voc/schema"
)
func IsValidValue(v Value) bool {
return v != nil
}
// Value is a type used by all quad directions.
type Value int... |
package myhttp
import (
"archive/zip"
"errors"
"fmt"
"html/template"
"io"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
"path"
"path/filepath"
"sort"
"strings"
"time"
"github.com/gorilla/mux"
"github.com/patrickhener/goshs/internal/myca"
"github.com/patrickhener/goshs/internal/myclipboard"
"github.co... |
// Copyright © 2019 Oxford Nanopore Technologies.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, m... |
// Copyright (c) 2020 tickstep.
//
// 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 eligibility
import (
"bytes"
"context"
"errors"
"fmt"
"github.com/hashicorp/golang-lru"
"github.com/nullstyle/go-xdr/xdr3"
"github.com/spacemeshos/fixed"
"github.com/spacemeshos/go-spacemesh/common/types"
eCfg "github.com/spacemeshos/go-spacemesh/hare/eligibility/config"
"github.com/spacemeshos/go-sp... |
package ethcli
import (
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"io"
"math/big"
"net/http"
"net/http/httptest"
"os"
"strconv"
"strings"
"testing"
)
var nodeUrl string = "" // write the url of your node here!! If left empty, the test uses a mock HTTP JSONRPC2.0 server to provide responses from sli... |
// Copyright 2021 iLogtail 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 ... |
/**
* @Author Awen
* @Description Captcha Draw
* @Date 2021/7/18
* @Email <EMAIL>
**/
package captcha
import (
"fmt"
"github.com/golang/freetype"
"golang.org/x/image/draw"
"golang.org/x/image/font"
"image"
"image/color"
"math"
mRand "math/rand"
)
// DrawDot is a type
type DrawDot struct {
Dx int
... |
// Copyright 2019 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// Package github implements activity.Service for GitHub.
package github
import (
"context"
"errors"
"fmt"
"log"
"net/http"
"os"
"sort"
"sync"
"time"
"dmitri.shuralyov.com/route/github"
githubv3 "github.com/google/go-github/github"
"github.com/shurcooL/events/event"
"github.com/shurcooL/githubv4"
"githu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/enums/real_estate_placeholder_field.proto
package enums
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ ... |
/*************************************************************************
* Copyright 2018 Gravwell, Inc. All rights reserved.
* Contact: <<EMAIL>>
*
* This software may be modified and distributed under the terms of the
* BSD 2-clause license. See the LICENSE file for details.
**********************************... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: datahub/prediction/v1alpha2/prediction.proto
package v1alpha2 // import "github.com/containers-ai/api/datahub/prediction/v1alpha2"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import v1alpha2 "github.com/containers-ai/a... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/services/expanded_landing_page_view_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v1/resou... |
package goncurses
// #include <stdlib.h>
// #include <curses.h>
// #include "goncurses.h"
import "C"
import (
"errors"
"fmt"
"unsafe"
)
type Window struct {
win *C.WINDOW
}
// NewWindow creates a window of size h(eight) and w(idth) at y, x
func NewWindow(h, w, y, x int) (window *Window, err error) {
window = &... |
package main
import (
"encoding/json"
"fmt"
"log"
"math"
"os"
"time"
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
"net/http"
"bytes"
"errors"
"math/rand"
"strconv"
"strings"
)
var (
errNotImplemented = errors.New("not implemented")
)
const millisInSecond = 1000
const nsInSecond = 1000000... |
/*
MIT License
Copyright (c) 2020-2021 YPSI SAS
Centctl is developped by : <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 ... |
/*
* Copyright 2018 The Kythe 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 ap... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: validator.proto
package validator
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
// Reference imports to suppress errors if they are not otherwise u... |
package main
import (
"database/sql"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"net/url"
"os"
"os/signal"
"strings"
"syscall"
"time"
"github.com/chrissnell/syslog"
_ "github.com/go-sql-driver/mysql"
"github.com/golang/groupcache"
)
type handler struct {
// To simplify implemen... |
// GoAWK parser - abstract syntax tree structs
package ast
import (
"fmt"
"strconv"
"strings"
. "github.com/benhoyt/goawk/lexer"
)
// Stmts is a block containing multiple statements.
type Stmts []Stmt
func (ss Stmts) String() string {
lines := []string{}
for _, s := range ss {
subLines := strings.Split(s.S... |
/*
Copyright ArxanFintech Technology Ltd. 2017 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 a... |
package main
import (
"encoding/hex"
"fmt"
"io/ioutil"
"log"
"net"
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"sync"
"time"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/grpclog"
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/roasbeef/btcd/chaincfg"
"gith... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.