text stringlengths 5.51k 28.1k |
|---|
package conf
import (
"fmt"
"io/ioutil"
"log"
"net"
"os"
"path/filepath"
"regexp"
"strings"
"time"
"github.com/fufuok/utils"
"github.com/k-sone/snmpgo"
"github.com/fufuok/xy-bw-collect/internal/json"
)
// 接口配置
type tJSONConf struct {
SYSConf tSYSConf `json:"sys_conf"`
SNMPConf tSNMPConf `json:"snmp_... |
package soyhtml
import (
"bytes"
"fmt"
"io"
"log"
"runtime"
"runtime/debug"
"github.com/slvmnd/soy/ast"
"github.com/slvmnd/soy/data"
soyt "github.com/slvmnd/soy/template"
)
// Logger collects output from {log} commands.
var Logger *log.Logger
// state represents the state of an execution.
type state struct... |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: optics_db_info.proto
package cisco_ios_xr_controller_optics_oper_optics_oper_optics_ports_optics_port_optics_db_info
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not ... |
package job
import (
"context"
"fmt"
"io"
"os"
"sort"
"strings"
"time"
"github.com/jenkins-x/jx-helpers/v3/pkg/cobras/helper"
"github.com/jenkins-x/jx-helpers/v3/pkg/cobras/templates"
"github.com/jenkins-x/jx-helpers/v3/pkg/input"
"github.com/jenkins-x/jx-helpers/v3/pkg/input/inputfactory"
"github.com/jen... |
// Copyright 2018 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 proxy
import (
"context"
"errors"
"fmt"
"go.minekube.com/common/minecraft/component"
"go.minekube.com/common/minecraft/component/codec/legacy"
"go.minekube.com/gate/pkg/command"
"go.minekube.com/gate/pkg/edition/java/auth"
"go.minekube.com/gate/pkg/edition/java/config"
"go.minekube.com/gate/pkg/editio... |
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"bytes"
"context"
"encoding/json"
"io"
"io/ioutil"
"strconv"
"github.com/go-openapi/errors"
"github.com/g... |
package cardrank
import (
"fmt"
"math/rand"
"os"
"reflect"
"runtime"
"strings"
"testing"
"time"
)
func TestRanker(t *testing.T) {
for _, r := range rankers(true) {
for i, f := range []func() []test{
fiveCardTests,
sixCardTests,
sevenCardTests,
} {
ranker, tests := r, f()
rankerName := runt... |
/*
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 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, ... |
// Tendermint Go-Common
// Copyright (C) 2015 Tendermint
//
//
//
// Apache License
// Version 2.0, January 2004
// https://www.apache.org/licenses/
//
// TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
//
// 1. Defin... |
/*
Copyright 2021 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... |
// Code generated by protoc. DO NOT EDIT.
// Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) 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://ww... |
package main
//Written by Aetnaeus
//Original Source: https://github.com/lemnos/chrome-session-dump
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"path"
"sort"
"strings"
"unicode/utf16"
)
//Rather than storing session state directly chrome appends a pickled command to a
//session fil... |
// Copyright 2020 Dolthub, 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 johndict
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"io/ioutil"
"math"
"os"
"os/exec"
"path/filepath"
"regexp"
"strconv"
"strings"
"sync"
"syscall"
"time"
log "github.com/Sirupsen/logrus"
"github.com/jmmcatee/cracklord/common"
)
/*
Regex to use throughout the plugin
*/
var regStatusLine ... |
package main
import (
"fmt"
"math"
"os"
"sort"
)
const (
NbTurns = 200
XShift = 300
YShift = 300
Xsize = 16000
Ysize = 9000
ReleaseDist = 1600
StunDist = 1760
BustMaxDist = 1760
BustMinDist = 900
GhostSpeed = 400
BusterSpeed = 800
NbPaths = 6
NbShift = 3
)
type ... |
package main
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"os"
"os/user"
"path/filepath"
"reflect"
"strconv"
"strings"
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/mount"
"github.com/docker/docker/client"
"git... |
package member
import (
"context"
"reflect"
"github.com/go-logr/logr"
errors2 "github.com/pkg/errors"
core "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apima... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/bigtable/admin/v2/instance.proto
package admin
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
// Reference imports to suppress errors if they are no... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.3
// source: common/go/unit/stats.proto
package unit
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sy... |
// Copyright 2021 CloudWeGo 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... |
/*
Package proofs lets you construct merkle trees out of protobuf messages and create proofs for fields of
an object by just specifying the dot notation of a field.
Field names are not taken from the struct attributes but the protobuf field names. Protobuf field names stay the same
across different programming languag... |
package main
import (
"context"
"fmt"
sqlite "github.com/bvinc/go-sqlite-lite/sqlite3"
"sync"
"time"
)
// SQLiteConn is the interface for a connection to SQLite.
// An interface allows for extensions of a base type.
type SQLiteConn interface {
sync.Locker
// Analyze writes statistical data for improving future... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// specreader is a tool to parse spec files into a JSON structure
package main
import (
"encoding/json"
"os"
"path/filepath"
"sort"
"strings"
"sync"
"microsoft.com/pkggen/internal/file"
"microsoft.com/pkggen/internal/rpm"
"gopkg.in... |
/*
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to ... |
// 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 sqlite
/*
#include <sqlite3.h>
#include <stdlib.h>
// These wrappers are necessary because SQLITE_TRANSIENT
// is a pointer constant, and cgo doesn't t... |
// Copyright 2015 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.
package client
import (
"encoding/json"
"reflect"
"strings"
"golang.org/x/net/context"
"github.com/keybase/cli"
"github.com/keybase/client/go/libcmdline"
"github.com/keybase/client/go/libk... |
package snapper
import (
"context"
"fmt"
"sort"
"strings"
"sync"
"time"
"github.com/pkg/errors"
"github.com/zrepl/zrepl/daemon/job/dosnapshot"
"github.com/zrepl/zrepl/daemon/logging/trace"
"github.com/zrepl/zrepl/config"
"github.com/zrepl/zrepl/daemon/hooks"
"github.com/zrepl/zrepl/daemon/logging"
"git... |
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
package mylib
import (
"fmt"
"math"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
)
// google api v3
// start
type Gps_LatLng struct {
Lng float64
Lat float64
}
func (g *Gps_LatLng) lat() float64 {return g.Lat}
func (g *Gps_LatLng) lng() float64 {return g.Lng}
func (g *Gps_LatLng) print() {fmt.Printf... |
// Code generated by protoc-gen-go.
// source: google/longrunning/operations.proto
// DO NOT EDIT!
package google_longrunning
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gengo/grpc-gateway/third_party/googleapis/google/api"
import google_protobuf1 "go.pedge... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.13.0
// source: backend_service.proto
package isp
import (
context "context"
proto "github.com/golang/protobuf/proto"
_struct "github.com/golang/protobuf/ptypes/struct"
grpc "google.golang.org/grpc"
codes... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.proto
package envoy_config_filter_http_header_to_metadata_v2
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "g... |
package domain
import (
"context"
"fmt"
"time"
)
// ExtensionEndpointType is the type used for the ExtensionEndpoint Type field
type ExtensionEndpointType string
// Valid values that can be used with ExtensionEndpointType
const (
// EETInternal is an internal endpoint that can only be accessed from the same zone... |
// Copyright 2017 The Nakama 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 ... |
package e2e
import (
"context"
"crypto/rand"
"fmt"
"github.com/spf13/viper"
"github.com/oasislabs/oasis-core/go/common/crypto/signature"
memorySigner "github.com/oasislabs/oasis-core/go/common/crypto/signature/signers/memory"
"github.com/oasislabs/oasis-core/go/common/logging"
"github.com/oasislabs/oasis-cor... |
// Copyright (c) 2019, The Emergent Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"image"
"log"
"math/rand"
"github.com/emer/eve/eve"
"github.com/emer/eve/evev"
"github.com/goki/gi/gi"
"github.... |
/*
Copyright 2021 VMware, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distri... |
package main
import (
"encoding/binary"
"encoding/json"
"fmt"
"io"
"reflect"
"strconv"
"sync"
"time"
flatbuffers "github.com/google/flatbuffers/go"
"github.com/influxdata/influxdb-comparisons/mongo_serialization"
)
// Point wraps a single data point. It stores database-agnostic data
// representing one po... |
package k8s
import (
"context"
"fmt"
"regexp"
"sync"
"time"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"... |
// Copyright (c) 2015-2021 The NATS Authors
package main
import (
"flag"
"fmt"
"log"
"net"
"os"
"strings"
"time"
"github.com/nats-io/nats-server/v2/server"
top "github.com/nats-io/nats-top/util"
ui "gopkg.in/gizak/termui.v1"
)
const version = "0.4.0"
var (
host = flag.String("s", "127.0.0.1", "The... |
package bstream
/**
Usage:
a.tracker.AddGetter(bstream.StreamHeadTarget, dexer.Hub)
a.tracker.AddGetter(bstream.StreamHeadTarget, timeline.ParallelGetter(relayerClient.GetterFactory(a.config.RelayerAddr), blockmeta.TrackerGetterFactory(a.config.BlockmetaAddr)))
a.tracker.AddGetter(bstream.StreamHeadTarget, codec.... |
// Copyright 2020 <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... |
// Copyright 2019 Anapaya 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 i... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.11.4
// source: message.proto
package proto
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/pro... |
// Copyright 2012, 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 tabletserver
import (
"bytes"
"fmt"
"math/rand"
"strings"
"sync"
"time"
log "github.com/golang/glog"
"github.com/youtube/vitess/go/mysql"
mproto... |
// Code generated by pggen. DO NOT EDIT.
package order
import (
"context"
"fmt"
"github.com/jackc/pgconn"
"github.com/jackc/pgtype"
"github.com/jackc/pgx/v4"
)
// Querier is a typesafe Go interface backed by SQL queries.
//
// Methods ending with Batch enqueue a query to run later in a pgx.Batch. After
// calli... |
package atgen
import (
"fmt"
"go/ast"
"go/format"
"go/parser"
"go/token"
"io"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
util "github.com/lkesteloot/astutil"
"github.com/pkg/errors"
"github.com/spf13/afero"
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/go/packages"
)
// RouterFuncN... |
// Copyright 2017 Pilosa Corp.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaime... |
package util
import (
"fmt"
yaml "github.com/ghodss/yaml"
gnet "github.com/rackn/gohai/plugins/net"
"io/ioutil"
"log"
"os"
"sort"
"strings"
)
// Route defines a static route to be used if setting up policy routes.
type Route struct {
// From is the source address (or address range) of the route.
From *gnet.... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: currency.proto
package proto
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/pr... |
// Copyright 2018 StreamSets Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
/*
Copyright SUSE 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 writing, software
distribute... |
package main
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"math"
"sort"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudwatch"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/prometheus/cli... |
package view
import (
"errors"
"fmt"
"math/big"
pagination_interface "github.com/crypto-com/chain-indexing/appinterface/pagination"
"github.com/crypto-com/chain-indexing/appinterface/projection/view"
"github.com/crypto-com/chain-indexing/appinterface/rdb"
"github.com/crypto-com/chain-indexing/internal/json"
"... |
// Package ast declares the types used to represent syntax trees for bibtex
// files.
package ast
import (
gotok "go/token"
"github.com/jschaf/bibtex/token"
)
type Node interface {
Pos() gotok.Pos
End() gotok.Pos
Kind() NodeKind
}
type NodeKind int
const (
KindTexComment NodeKind = iota
KindTexCommentGroup
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: customer.proto
package protobuf
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime... |
// +build linux freebsd solaris openbsd darwin
package compute
import (
"bufio"
"context"
"fmt"
"os"
"strconv"
"strings"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/blkiodev"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.co... |
package planner
import (
"errors"
"fmt"
"github.com/emqx/kuiper/common"
"github.com/emqx/kuiper/common/kv"
"github.com/emqx/kuiper/xsql"
"github.com/emqx/kuiper/xstream"
"github.com/emqx/kuiper/xstream/api"
"github.com/emqx/kuiper/xstream/nodes"
"github.com/emqx/kuiper/xstream/operators"
"path"
"strings"
)
... |
// Copyright 2015 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 agreed to i... |
package agent
import (
"fmt"
"go.etcd.io/etcd/draft"
"go.etcd.io/etcd/etcdserver/api/rafthttp"
"go.etcd.io/etcd/raft"
"go.etcd.io/etcd/raft/raftpb"
"go.uber.org/atomic"
"go.uber.org/zap"
"sync"
"time"
)
//Agent is an adaptor of OneToOneInterpreter. It offers:
// 1. Asynchronous processing
// 2. Concurrent in... |
/*
* Tencent is pleased to support the open source community by making 蓝鲸 available.
* Copyright (C) 2017-2018 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 obtain a copy of the Li... |
package bot
import (
"log"
"regexp"
"strings"
"sync"
"time"
"github.com/Sirupsen/logrus"
"github.com/demisto/alfred/conf"
"github.com/demisto/alfred/domain"
"github.com/demisto/alfred/queue"
"github.com/demisto/alfred/repo"
"github.com/demisto/slack"
)
const (
maxUsersPerBot = 200
)
// subscription hold... |
// Copyright 2018 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 custom
//RespOrganizationInfo RespOrganizationInfo
type RespOrganizationInfo struct {
OrganizationId string `json:"organization_id"`
OrganizationName string `json:"organization_name"`
}
//ReqObtainAuthToken ReqObtainAuthToken
type ReqObtainAuthToken struct {
Scene string `json:"scene"`
WebIni... |
// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
//
// Copyright (c) 2017 Juniper Networks, Inc. All rights reserved.
//
/****************************************************************************
* VRouter routines for CNI plugin
****************************************************************************/
p... |
// vi:set ai sm nu ts=4 sw=4 fileencoding=utf-8:
/*
########################################################################################
# _______ _______ _______ ___ _______ _______ #
# ( ____ \( )( ___ ) / ) / ___ ) / ___ ) #
#... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: kurapayload.proto
/*
Package kuradatatypes is a generated protocol buffer package.
To compile:
protoc --proto_path=src/main/protobuf --java_out=src/main/java src/main/protobuf/kurapayload.proto
It is generated from these files:
kurapayload.proto
It has ... |
/*
The core of the package, from which other functions are dispatched. Includes
RepeatMasker-related data structure definitions and parsers, as well as the
RepeatGenome definition and initializer.
*/
package repeatgenome
import (
"bytes"
"fmt"
"github.com/mmcco/jh-bio/bioutils"
"io/ioutil"
"log"
"os"
... |
/*
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 2020 SEQSENSE, 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 ... |
package writeaheadlog
import (
"bytes"
"encoding/binary"
"encoding/hex"
"errors"
"fmt"
"golang.org/x/crypto/blake2b"
"math/rand"
"os"
"path/filepath"
"sync"
"testing"
"time"
)
type (
checksum [checksumSize]byte
silo struct {
nextNumber uint32
numbers []uint32
cs checksum
utils utilsSet
... |
package algorithms
// Hybrid algorithm of log-k-decomp and det-k-decomp.
import (
"fmt"
"log"
"reflect"
"runtime"
"github.com/cem-okulmus/BalancedGo/lib"
)
// HybridPredicate is used to determine when to switch from LogKDecomp to using DetKDecomp
type HybridPredicate = func(H lib.Graph, K int) bool
type recur... |
package gov
import (
"time"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/libs/log"
)
// Parameter store key
var (
ParamStoreKeyDepositParams = []byte("depositpa... |
package cairo
// #include <stdlib.h>
// #include <cairo.h>
// #include <cairo-gobject.h>
import "C"
import (
"reflect"
"runtime"
"unsafe"
"github.com/natemaia/gotk3/glib"
)
// Context is a representation of Cairo's cairo_t.
type Context struct {
context *C.cairo_t
}
// native returns a pointer to the underlyi... |
/*
Copyright 2018 Heptio Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... |
package binding
import (
"bytes"
"mime/multipart"
"net/http"
"net/http/httptest"
"net/url"
"reflect"
"strings"
"testing"
. "github.com/smartystreets/goconvey/convey"
)
type Model struct {
Foo string `json:"foo"`
Bar *string `json:"bar"`
Baz []int `... |
// Copyright (c) 2012-2016 The Revel Framework Authors, All rights reserved.
// Revel Framework source code and usage is governed by a MIT style
// license that can be found in the LICENSE file.
package revel
import (
"bytes"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"reflect"... |
// Code generated by go-swagger; DO NOT EDIT.
package n_a_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go... |
package tableau
import "encoding/xml"
type Datasource struct {
Text string `xml:",chardata"`
Hasconnection string `xml:"hasconnection,attr"`
Inline string `xml:"inline,attr"`
Name string `xml:"name,attr"`
Version string `xml:"version,attr"`
Aliases struct {
Text string ... |
package offchainreporting
import (
"context"
"fmt"
"strings"
"sync"
"time"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
gethCommon "github.com/ethereum/go-ethereum/common"
gethTypes "github.com/ethereum/go-ethereum/core/... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package smartbft
import (
"bytes"
"encoding/base64"
"encoding/hex"
"sync"
"sync/atomic"
"github.com/SmartBFT-Go/consensus/pkg/types"
"github.com/SmartBFT-Go/consensus/smartbftprotos"
"github.com/golang/protobuf/proto"
cb "gi... |
package image
import (
"bytes"
"context"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
"io/ioutil"
"strings"
"github.com/containers/image/v5/docker/reference"
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/pkg/blobinfocache/none"
"github.com/containers/image/v5/types"
"g... |
//go:build go1.16
// +build go1.16
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
package azkeys
import (
"time"
"github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys/internal/generated"
)
// Properties... |
/*
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 SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package startcmd
import (
"crypto/tls"
"fmt"
"net/http"
"strconv"
"strings"
"time"
"github.com/cenkalti/backoff"
"github.com/gorilla/mux"
ariescouchdbstorage "github.com/hyperledger/aries-framework-go-ext/c... |
// Copyright 2017 MSolution.IO
//
// 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 ... |
//lint:file-ignore U1001 Ignore all unused code, this is only used in tests.
package integration
import (
"context"
"fmt"
"io/ioutil"
"os"
"os/exec"
"os/signal"
"path/filepath"
"strconv"
"sync"
"syscall"
"testing"
"time"
"github.com/spf13/cobra"
"github.com/stretchr/testify/assert"
sdk "github.com/ste... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/services/ad_group_ad_asset_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/v2/resources... |
// Copyright (c) The Thanos Authors.
// Licensed under the Apache License 2.0.
// Package s3 implements common object storage abstractions against s3-compatible APIs.
package s3
import (
"context"
"crypto/tls"
"fmt"
"io"
"net"
"net/http"
"os"
"runtime"
"strconv"
"strings"
"testing"
"time"
"github.com/go... |
package frame
import (
"bytes"
"image"
"github.com/BurntSushi/freetype-go/freetype/truetype"
"github.com/BurntSushi/xgb/xproto"
"github.com/BurntSushi/xgbutil"
"github.com/BurntSushi/xgbutil/xgraphics"
"github.com/BurntSushi/wingo/logger"
"github.com/BurntSushi/wingo/misc"
"github.com/BurntSushi/wingo/ren... |
package rmq
import (
"fmt"
"log"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/adjust/uniuri"
)
const (
connectionsKey = "rmq::connections" // Set of connection names
connectionHeartbeatTemplate = "rmq::connection::{connection}::heartbeat"... |
package neighbors
import (
"fmt"
"math"
"runtime"
"sort"
"github.com/pa-m/sklearn/base"
"gonum.org/v1/gonum/floats"
"gonum.org/v1/gonum/mat"
)
// Rectangle Hyperrectangle class. Represents a Cartesian product of intervals.
type Rectangle struct{ Maxes, Mins []float64 }
// NewRectangle ...
func NewRectangl... |
// Copyright 2019 Yunion
//
// 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 writi... |
// 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 tar implements access to tar archives.
// It aims to cover most of the variations, including those produced
// by GNU and BSD tars.
//
// References:... |
package project
import (
"bytes"
"fmt"
"os"
"path/filepath"
"runtime"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/mutagen-io/mutagen/cmd"
"github.com/mutagen-io/mutagen/cmd/mutagen/daemon"
"github.com/mutagen-io/mutagen/cmd/mutagen/forward"
"github.com/mutagen-io/mutagen/cmd/mutagen/sync... |
// Copyright 2010 The Walk Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build windows
package walk
import (
"math"
"sort"
"sync"
"github.com/lxn/win"
)
type Orientation byte
const (
NoOrientation Orientation = 0
Hor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.