text stringlengths 8.57k 38.1k |
|---|
// Copyright 2016 CodisLabs. All Rights Reserved.
// Licensed under the MIT (MIT-LICENSE.txt) license.
package topom
import (
"container/list"
"fmt"
"github.com/CodisLabs/codis/pkg/proxy"
"github.com/CodisLabs/codis/pkg/utils/assert"
"github.com/prometheus/client_golang/prometheus"
"net"
"net/http"
"os"
"os/... |
package format
import (
"testing"
)
func TestIsSequenceFormatToken(t *testing.T) {
tests := []struct{
tok string
valid bool
} {
{"", false},
{"1", true},
{"a", false},
{"1..30", true},
{"a..30", false},
{"1..a", false},
{"30..1", false},
{"a..b", false},
{"1..30..60", false},
}
for i := ra... |
// Package tops implements an unmarshaler for the TOPS protocol, v1.6.
package tops
import (
"encoding/binary"
"fmt"
"strings"
"time"
"github.com/timpalpant/go-iex/iextp"
)
const (
ChannelID uint32 = 1
V_1_5_MessageProtocolID uint16 = 0x8002
V_1_6_MessageProtocolID uint16 = 0x8003
FeedName ... |
///bin/true; exec /usr/bin/env go run "$0" "$@"
/*
* 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
... |
package redisconn
import (
"bufio"
"context"
"fmt"
"net"
"sync"
"sync/atomic"
"time"
"github.com/joomcode/errorx"
"github.com/joomcode/redispipe/redis"
)
const (
// DoAsking is a flag for Connection.SendBatchFlag signalling to send ASKING request before transactions.
DoAsking = 1
// DoTransaction is a f... |
// 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... |
package main
import (
"fmt"
"net/http"
"reflect"
"sort"
"strings"
"github.com/stripe/stripe-mock/generator/datareplacer"
"github.com/stripe/stripe-mock/spec"
)
// GenerateParams is a parameters structure that's used to invoke Generate and
// its associated methods.
//
// This structure exists to avoid runaway... |
package api
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/http"
"strconv"
"strings"
"sync"
"time"
"github.com/didip/tollbooth/v6"
"github.com/didip/tollbooth_chi"
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
"github.com/go-chi/cors"
"github.com/go-chi/render"
"github.com/go-pkgz/... |
// Copyright 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.
// Skip aix and plan9 for now: github.com/chzyer/readline doesn't support them.
// (https://golang.org/issue/32839)
//
//go:build !aix && !plan9
// +build !aix,... |
package main
import (
"bytes"
"context"
"encoding/json"
"encoding/xml"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"net/http"
"net/http/httputil"
"net/url"
"strings"
"sync"
"time"
"github.com/abbot/go-http-auth"
. "github.com/aerokube/ggr/config"
"golang.org/x/net/websocket"
)
const (
browserStarted = iota... |
package kubernetes
import (
//nolint gosec
"crypto/sha1"
"crypto/tls"
"crypto/x509"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
"path"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"github.com/cloudability/metrics-agent/client"
"github.com/clouda... |
package onvakv
import (
"bytes"
"fmt"
"os"
"math"
"runtime"
"sort"
"sync"
"sync/atomic"
dbm "github.com/tendermint/tm-db"
"github.com/dterei/gotsc"
"github.com/coinexchain/onvakv/datatree"
"github.com/coinexchain/onvakv/indextree"
"github.com/coinexchain/onvakv/metadb"
"github.com/coinexchain/onvakv/ty... |
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
// 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 runtime
import (
"runtime/internal/sys"
"unsafe"
)
// The code in this file implements stack trace walking for all architectures.
// The most import... |
/*
Copyright 2016, Cossack Labs Limited
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 ndmutil
import (
"bufio"
"encoding/json"
"fmt"
"os"
"path"
"reflect"
"runtime"
"strings"
"time"
"io/ioutil"
"context"
"errors"
"sync"
"github.com/golang/glog"
logutil "github.com/openebs/CITF/utils/log"
strutil "github.com/openebs/CITF/utils/string"
sysutil "github.com/openebs/CITF/utils/sy... |
/*
Copyright IBM Corp. 2018, 2019.
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 2012 The LevelDB-Go and Pebble 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 pebble
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"sort"
"sync/atomic"
"time"
"github.com/cockroachdb/errors"
"github.c... |
/*
Copyright (c) 2019 TriggerMesh, 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, soft... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/datacatalog/v1beta1/table_spec.proto
package datacatalog
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they ar... |
package blockdag
import (
"fmt"
"math"
"sort"
"strings"
"github.com/pkg/errors"
"github.com/kaspanet/go-secp256k1"
"github.com/kaspanet/kaspad/wire"
)
const (
// UnacceptedBlueScore is the blue score used for the "block" blueScore
// field of the contextual transaction information provided in a
// transac... |
package tsdb
import (
"fmt"
"math"
"sort"
"time"
"github.com/influxdb/influxdb/influxql"
"github.com/influxdb/influxdb/models"
)
const (
// Return an error if the user is trying to select more than this number of points in a group by statement.
// Most likely they specified a group by interval without time b... |
package main
import (
"bytes"
"encoding/json"
"errors"
"flag"
"fmt"
"math"
"net/url"
"os"
"path/filepath"
"strconv"
"strings"
"text/template"
"golang.org/x/time/rate"
)
const (
// Separates items in sentence series
textSeriesSeparator = ", "
addressingStyleVirtual = "virtual"
addressingStylePath ... |
package main
import (
"context"
"encoding/hex"
"encoding/json"
"flag"
"fmt"
"io/fs"
"io/ioutil"
"log"
"math"
"os"
"os/signal"
"path"
"strings"
"sync"
"syscall"
"time"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo/writeconcern"
"github.com/ABMatrix/bitcoin-utxo/bitcoin/bech... |
package maestroSpecs
// Copyright (c) 2018, Arm Limited and affiliates.
// SPDX-License-Identifier: Apache-2.0
//
// 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... |
/*
Copyright © 2020 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense... |
/* _ _
*__ _____ __ ___ ___ __ _| |_ ___
*\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
* \ V V / __/ (_| |\ V /| | (_| | || __/
* \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
*
* Copyright © 2016 - 2019 Weaviate. All rights reserved.
* LICENSE: https://github.com/semi-techno... |
package clusters
import (
"errors"
"fmt"
v1 "github.com/istio-ecosystem/admiral/admiral/pkg/apis/admiral/v1"
"math"
"math/rand"
"reflect"
"strconv"
"strings"
"time"
argo "github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
networking "istio.io... |
// Package api implements a client API for working with
// digitalrebar/provision.
package api
import (
"bytes"
"crypto/tls"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"log"
"mime"
"net"
"net/http"
"net/url"
"path"
"strings"
"sync"
"time"
"github.com/VictorLowther/jsonpatch2"
"github.com/digitalre... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package mturk
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
var _ aws.Config
var _ = awsutil.Prettify
// The Assignment data structure represents a single assignment of a HIT to
// ... |
// 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.
// The MIT License (MIT)
// Copyright (c) 2016 <NAME>
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and ass... |
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use ... |
package secretshop
import (
"fmt"
"io/ioutil"
"github.com/BurntSushi/toml"
)
var friendlyNames map[string]string
// Config contains details to set up the application
type Config struct {
BindAddress string `toml:"bind"`
Auth string `toml:"auth"`
StoreInfo map[string]... |
// Copyright 2019 <NAME>. Atos Technologies - Bull, <NAME>, B.P.68, 78340, Les Clayes-sous-Bois, France.
//
// 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/l... |
package main
import (
"bytes"
"fmt"
"go/format"
"go/types"
"sort"
"github.com/ethereum/go-ethereum/rlp/internal/rlpstruct"
)
// buildContext keeps the data needed for make*Op.
type buildContext struct {
topType *types.Named // the type we're creating methods for
encoderIface *types.Interface
decoderIface *... |
package kv
import (
"bufio"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"time"
log "github.com/sirupsen/logrus"
"github.com/neuvector/neuvector/controller/access"
"github.com/neuvector/neuvector/controller/api"
"github.com/neuvector/neuvector/share"
"github.com/neuve... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: peer/proposal_response.proto
package peer
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
common "github.com/hyperledger/fabric-protos-go/common"
)
// Reference imports to... |
package core
import (
"fmt"
"testing"
it "github.com/edmccard/avr-sim/instr"
)
func TestOther(t *testing.T) {
testop := func(tag string, mnem it.Mnemonic, branches ...branch) {
if !testing.Short() {
branches = append([]branch{statusCases}, branches...)
}
casetree{t, branches}.run(tcase{tag: tag, mnem: m... |
package p2p
import (
"bytes"
"context"
"errors"
"fmt"
"github.com/davecgh/go-spew/spew"
"github.com/golang/protobuf/proto"
"github.com/spacemeshos/go-spacemesh/crypto"
"github.com/spacemeshos/go-spacemesh/p2p/config"
"github.com/spacemeshos/go-spacemesh/p2p/connectionpool"
"github.com/spacemeshos/go-spacemes... |
package gosh
import (
"fmt"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"os/signal"
"path/filepath"
"reflect"
"runtime"
"strings"
"sync"
"syscall"
"testing"
"time"
"github.com/mumoshu/gosh/context"
"golang.org/x/crypto/ssh/terminal"
)
// This program is inspired by https://github.com/progrium/go-basher
/... |
package routing
import (
"fmt"
"math/big"
"math/rand"
"sort"
"sync"
"testing"
"github.com/drausin/libri/libri/common/id"
"github.com/drausin/libri/libri/librarian/server/peer"
"github.com/stretchr/testify/assert"
)
func TestTable_NewWithPeers(t *testing.T) {
rng := rand.New(rand.NewSource(int64(0)))
for n... |
//
// OCCAM
//
// Copyright (c) 2017, SRI International
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
... |
// Code generated by transpiler. DO NOT EDIT.
/**
* Go Video Downloader
*
* Copyright 2019 Tenta, 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.or... |
//
// Proto Definition for RV data collection/archive.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.12.3
// source: rv.proto
package rv
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf... |
/**
* Copyright 2015 Acquia, 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 t... |
// generated by xgen -- DO NOT EDIT
package user
import (
"bytes"
"gopkg.in/goyy/goyy.v0/data/entity"
"gopkg.in/goyy/goyy.v0/data/schema"
"gopkg.in/goyy/goyy.v0/util/jsons"
"gopkg.in/goyy/goyy.v0/util/strings"
)
var (
ENTITY = schema.TABLE("sys_user", "USER")
ENTITY_ID = ENTITY.PRIM... |
package nationbuilder
import (
"fmt"
"net/http"
"strconv"
)
// The enormous Person type within Nationbuilder. Note that many of the references to other Person objects
// do not populate all of the fields in the Person type and instead return an abridged version.
// Only a request for a specific person returns the... |
package ingester
import (
"context"
"flag"
"fmt"
"net/http"
"sync"
"time"
// Needed for gRPC compatibility.
old_ctx "golang.org/x/net/context"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/health/grpc_health_v1"
"github.com/go-kit/kit/log/level"
"github.com/gogo/status"
"github.com/prometheus/c... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package privdata
import (
"bytes"
"encoding/hex"
"fmt"
"math"
"math/rand"
"sync"
"time"
commonutil "github.com/hyperledger/fabric/common/util"
"github.com/hyperledger/fabric/core/common/privdata"
"github.com/hyperledger/fab... |
package test
import (
"bytes"
"crypto"
"fmt"
"io/ioutil"
"strings"
"sync"
"testing"
"time"
_ "golang.org/x/crypto/blake2b"
"github.com/stretchr/testify/require"
"github.com/loveandpeople/lp.go/address"
"github.com/loveandpeople/lp.go/api"
"github.com/loveandpeople/lp.go/bundle"
"github.com/loveandpeop... |
package kit
import (
"bytes"
"context"
"crypto/rand"
"fmt"
"io/ioutil"
"net"
"sync"
"testing"
"time"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/exitcode"
"github.co... |
// Copyright (c) 2019, <NAME> <<EMAIL>>
// See LICENSE for licensing information
// Package format exposes gofumpt's formatting in an API similar to go/format.
// In general, the APIs are only guaranteed to work well when the input source
// is in canonical gofmt format.
package format
import (
"bytes"
"fmt"
"go/a... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.19.1
// source: envoy/config/listener/v3/udp_listener_config.proto
package listenerv3
import (
v3 "github.com/cilium/proxy/go/envoy/config/core/v3"
_ "github.com/cncf/xds/go/udpa/annotations"
proto "github.... |
// Copyright (C) The Arvados Authors. All rights reserved.
//
// SPDX-License-Identifier: AGPL-3.0
package install
import (
"bufio"
"bytes"
"context"
"errors"
"flag"
"fmt"
"io"
"os"
"os/exec"
"os/user"
"path/filepath"
"strconv"
"strings"
"syscall"
"time"
"git.arvados.org/arvados.git/lib/cmd"
"git.ar... |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package x509
import (
"crypto/ecdsa"
"crypto/rsa"
"encoding/json"
"errors"
"net"
"sort"
"strings"
"time"
"github.com/zmap/zcrypto/dsa"
"github.com/z... |
// Copyright 2015 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
// Package cloud provides functionality to parse information
// describing clouds, including regions, supported auth types etc.
package cloud
import (
"fmt"
"io/ioutil"
"os"
"reflect"
"sort"
"strings"
"github.com/juju... |
package parquet
import (
"bytes"
"github.com/segmentio/parquet-go/deprecated"
"github.com/segmentio/parquet-go/encoding"
"github.com/segmentio/parquet-go/encoding/plain"
"github.com/segmentio/parquet-go/format"
"github.com/segmentio/parquet-go/internal/bits"
)
type ColumnIndex interface {
// NumPages returns ... |
/*
* Copyright 2018-present Open Networking Foundation
* 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 ... |
// Code generated by xsdgen. DO NOT EDIT.
package uniprot
import (
"bytes"
"encoding/xml"
"strconv"
"strings"
"time"
)
type Absorption struct {
Max EvidencedStringType `xml:"http://uniprot.org/uniprot max,omitempty"`
Text []EvidencedStringType `xml:"http://uniprot.org/uniprot text,omitempty"`
}
type Alter... |
/*
File IO and management specific to this application.
Legend
------
K Key
V Value
GV Generic Value (used by ReadRecord)
KS Key size
VS Value size
GVS Generic Value size (used by ReadRecord)
VP Value position
F File number
P Permission
C Checksum
RS ... |
// Code generated by protoc-gen-go.
// source: google/api/service.proto
// DO NOT EDIT!
package serviceconfig
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_api "google.golang.org/genproto/googleapis/ap... |
// Copyright 2018 The Cockroach 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 a... |
// Package blake3 implements the BLAKE3 cryptographic hash function.
package blake3 // import "lukechampine.com/blake3"
import (
"encoding/binary"
"errors"
"hash"
"io"
"math"
"math/bits"
)
const (
blockSize = 64
chunkSize = 1024
)
// flags
const (
flagChunkStart = 1 << iota
flagChunkEnd
flagParent
flagRo... |
package keyboard_config
var Adv2TopLayerLeft = KeycodeLayerHalf{
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, // function row
KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRANSPARENT,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRANSPARENT,
KC_CAPS_LOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRANSPARENT,
KC_LEFT_SHIFT,... |
package repos
import (
"container/heap"
"context"
"sort"
"sync"
"time"
"github.com/sourcegraph/sourcegraph/pkg/api"
"github.com/sourcegraph/sourcegraph/pkg/conf"
"github.com/sourcegraph/sourcegraph/pkg/gitserver"
gitserverprotocol "github.com/sourcegraph/sourcegraph/pkg/gitserver/protocol"
"github.com/sourc... |
// Copyright 2016 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... |
// Peripheral: RCC_Periph Reset and Clock Control.
// Instances:
// RCC mmap.RCC_BASE
// Registers:
// 0x00 32 CR Clock control register.
// 0x04 32 PLLCFGR PLL configuration register.
// 0x08 32 CFGR Clock configuration register.
// 0x0C 32 CIR Clock interrupt register.
// 0x10 32 ... |
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
// Copyright (c) 2020 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
package volumemgr
import (
"fmt"
"io"
"os"
"strings"
"time"
v1 "github.com/google/go-containerregistry/pkg/v1"
v1types "github.com/google/go-containerregistry/pkg/v1/types"
"github.com/lf-edge/eve/pkg/pillar/types"
log "github.com/sir... |
// Copyright (c) 2018 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
package types
import (
"fmt"
"regexp"
"strconv"
"strings"
"github.com/sirupsen/logrus" // OK for logrus.Fatal
)
// SenderResult - Enum name for return extra sender results from SendOnAllIntf
type SenderResult uint8
// Enum of http extra... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package elasticache
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Provides an ElastiCache Replication Group res... |
// Code generated by protoc-gen-go from "file_service.proto"
// DO NOT EDIT!
package files
import proto "goprotobuf.googlecode.com/hg/proto"
import "math"
import "os"
// Reference proto, math & os imports to suppress error if they are not otherwise used.
var _ = proto.GetString
var _ = math.Inf
var _ os.Error
typ... |
package mime
import (
"mime"
"sync"
)
var initialized = false
var mutex sync.Mutex
// Function is a mirror of http://godoc.org/mime#TypeByExtension but adds extra
// extensions before checking.
func TypeByExtension(ext string) string {
// Lock the mutex while we add the extra extensions so multiple threads
// do... |
// Copyright 2018 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 service
import (
"context"
"fmt"
"sync"
"testing"
"time"
"github.com/pkg/errors"
. "github.com/smartystreets/goconvey/convey"
"go-common/app/service/live/wallet/conf"
"go-common/app/service/live/wallet/model"
"go-common/library/database/sql"
"go-common/library/ecode"
"go-common/library/sync/errgr... |
// Copyright 2021 IBM Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... |
// Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
package runner
import (
"context"
"encoding/json"
"fmt"
"strconv"
"sync"
"time"
"github.com/insomniacslk/xjson"
"github.com/lin... |
package configify_test
import (
"fmt"
"testing"
"time"
"github.com/robsignorelli/configify"
"github.com/robsignorelli/configify/configifytest"
"github.com/stretchr/testify/suite"
)
func TestBinderSuite(t *testing.T) {
suite.Run(t, new(BinderSuite))
}
type BinderSuite struct {
configifytest.SourceSuite
}
ty... |
/*
Copyright (c) 2020 LeapLab @ CS_GMU
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, publish, distribute... |
// Package mock provides basic functionality to mock HTTP responses.
//
// Its main use is the following szenario where a ht.Test is used to test
// an endpoint on a server. Handling this endpoint requires one or more
// additional requests to an external backend system which is mocked by
// a Mock.
// Like this the se... |
package main
import (
"bufio"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"strings"
"github.com/joho/godotenv"
"github.com/skratchdot/open-golang/open"
)
// GLOBAL VAR FOR (easier access to) LOCATION OF PROFILES AND APPDIR
var dir string
var profpath string
var apps... |
package nlp
import (
"container/list"
"fmt"
"math"
"strconv"
"strings"
"github.com/fatih/set"
"github.com/petar/GoLLRB/llrb"
)
const (
UNOBS_INITIAL_STATE = "0.x"
UNOBS_WORD = "<UNOBSERVED_WORD>"
)
type Bigram struct {
First string
Second string
}
func (this *Bigram) Key() interface{} {
retur... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.1
// source: app/token/pb/service.proto
package token
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
... |
package main
import (
"fmt"
"testing"
)
// generate a closure to safe test statistics
func (vm *Vm) makeTest() (f func(string, string)){
var ntests, success int
f = func(code, res string){
if code == "__show results__" {
fmt.Println("Number of tests ", ntests)
fmt.Println(... |
// 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... |
package types
import (
"encoding/json"
"fmt"
"github.com/Dipper-Protocol/x/vm/common/math"
"math/big"
"sort"
"sync"
"github.com/tendermint/tendermint/crypto"
sdk "github.com/Dipper-Protocol/types"
"github.com/Dipper-Protocol/x/auth"
"github.com/Dipper-Protocol/x/auth/types"
)
var (
zeroBalance = sdk.Zero... |
// Copyright (c) 2015-2016 The btcsuite developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package ffldb
import (
"bytes"
"fmt"
"sync"
"time"
"github.com/tjaxer/btcd/database/internal/treap"
"github.com/btcsuite/goleveldb/leveldb"
"github.com/btcsuite... |
// Copyright 2015 The Cockroach 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 a... |
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use ... |
/*
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, ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.13.0
// source: grpc/health/v1/health.proto
package grpc_health_v1
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/code... |
package cmd
import (
"context"
"fmt"
"net/http"
"net/url"
"os"
"path/filepath"
"strings"
"github.com/Azure/azure-pipeline-go/pipeline"
"github.com/Azure/azure-storage-azcopy/common"
"github.com/Azure/azure-storage-azcopy/ste"
"github.com/Azure/azure-storage-blob-go/2018-03-28/azblob"
)
type syncDownloadEn... |
package terraform
import (
"bytes"
"context"
"fmt"
"log"
"sync"
"github.com/hashicorp/terraform-plugin-sdk/internal/addrs"
"github.com/hashicorp/terraform-plugin-sdk/internal/configs"
"github.com/hashicorp/terraform-plugin-sdk/internal/lang"
"github.com/hashicorp/terraform-plugin-sdk/internal/plans"
"github... |
// Copyright 2014-2017 Amazon.com, Inc. or its affiliates. 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. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license... |
// 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... |
// Copyright (c) 2017 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
// This implements the ETR functionality. Listens on UDP destination port 4341 for
// receiving packets behind the same NAT. Cross NAT packets are captured using afpacket
// listening for packets with source port 4341 and destination ephemeral p... |
/*
Copyright 2019 The GitLab-Controller Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... |
// Copyright 2018-2019 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... |
// Copyright 2020 The Ebiten 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.