text stringlengths 5.51k 28.1k |
|---|
package main
import (
"context"
"crypto/tls"
"fmt"
"net/http"
"net/url"
"os"
"os/signal"
"path"
"strings"
"syscall"
"time"
"github.com/go-ggz/ggz/pkg/config"
"github.com/go-ggz/ggz/pkg/router/routes"
"github.com/graphql-go/graphql"
"github.com/rs/zerolog/log"
"github.com/urfave/cli/v2"
"golang.org/x... |
package permissions
import (
"crypto/sha256"
"crypto/subtle"
"errors"
"fmt"
"io"
"log"
"math/rand"
"net/http"
"time"
"code.google.com/p/go.crypto/bcrypt"
"github.com/xyproto/simpleredis"
)
const (
defaultRedisServer = ":6379"
)
var (
minConfirmationCodeLength = 20 // minimum length of the confirmation ... |
package test161
import (
"bufio"
"crypto/rand"
"crypto/sha256"
"encoding/hex"
"errors"
"fmt"
"github.com/kevinburke/go.uuid"
"io/ioutil"
"os"
"os/exec"
"path"
"regexp"
"strings"
"sync"
)
// Regular expressions for secure output. Only lines that match these expressions in
// files that we trust will have... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: feast/specs/ImportSpec.proto
package specs
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = ... |
// Copyright (c) 2015-2022 MinIO, Inc.
//
// This file is part of MinIO Object Storage stack
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (... |
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"regexp"
"sort"
"strconv"
"time"
"github.com/bwmarrin/discordgo"
)
//ReleaseHandler Echoes messages to stdout
type ReleaseHandler struct {
matcher regexp.Regexp
addMatcher regexp.Regexp
editMatcher regexp.Regexp
deleteMatcher regexp.Regex... |
// This package contains the base/root components of MIDA. Other MIDA packages import this package, but this package
// should not depend on any other MIDA packages
package base
import (
"encoding/json"
"errors"
"github.com/chromedp/cdproto/cdp"
"github.com/chromedp/cdproto/debugger"
"github.com/chromedp/cdproto/... |
package main
import (
"encoding/binary"
"encoding/json"
"flag"
"fmt"
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"strings"
"syscall"
"github.com/orivej/e"
"golang.org/x/sys/unix"
"golang.org/x/text/collate"
"golang.org/x/text/language"
)
const R = 0
const W = 1
var importpath = "github.com/ori... |
// Package orka provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/deepmap/oapi-codegen version v1.9.0 DO NOT EDIT.
package orka
// ListLogsParams defines parameters for ListLogs.
type ListLogsParams struct {
// Limit the total number of logs returned
Limit *string `json:"l... |
// The MIT License (MIT)
//
// Copyright (c) 2011 Stanford University.
// Copyright (c) 2014-2015 Cryptography Research, Inc.
// Copyright (c) 2015 <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
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.12.4
// source: example.proto
// Go gRPC Example
//
// This example is used to show how to use gRPC and
// gRPC-Gateway with Go Protobuf.
package proto
import (
context "context"
proto "github.com/gol... |
package main_test
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"net/url"
"time"
xmlpath "gopkg.in/xmlpath.v2"
gocf "github.com/cloudfoundry-community/go-cfclient"
. "github.com/FidelityInternational/cf-loupe"
"github.com/FidelityInternational/cf-loupe/applist"
"git... |
/*
* Copyright 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Licen... |
// +build linux !windows
package podmonitor
import (
"context"
errs "errors"
"time"
"k8s.io/client-go/tools/record"
"go.aporeto.io/trireme-lib/common"
"go.aporeto.io/trireme-lib/monitor/config"
"go.aporeto.io/trireme-lib/monitor/extractors"
"go.aporeto.io/trireme-lib/policy"
"go.uber.org/zap"
corev1 "k8s... |
package sclg
import (
"fmt"
"io/ioutil"
"log"
"sync"
"sync/atomic"
"time"
)
var (
// this id will be incremented each time a new cache item is stored in any existing cache
timedCacheItemID uint64
// this pool is shared across all caches
timedCacheItemPool sync.Pool
)
// timedCacheItem represents one entry ... |
package mango
import (
"bytes"
"fmt"
"log"
"os"
"regexp"
"strconv"
"strings"
"sync"
"time"
)
// Page - page with content and params + sub-pages
type Page struct {
sync.RWMutex
// Link to application
App *Application
// Content
content []byte
// Params that describe this page
params map[string]strin... |
package clustermonitor
import (
"fmt"
"sort"
"time"
"github.com/openshift/online-archivist/pkg/config"
"github.com/openshift/online-archivist/pkg/util"
buildapi "github.com/openshift/api/build/v1"
buildclient "github.com/openshift/client-go/build/clientset/versioned"
arkapi "github.com/heptio/ark/pkg/apis/a... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.3
// source: third_party/xkratos/api/paginator/paginator.proto
package paginator
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
protoreflect "google.golang.org/protobuf/reflect/protorefle... |
package main
import (
"bufio"
"fmt"
"math"
"os"
"sort"
"strconv"
"strings"
)
type Beacon struct {
x int
y int
z int
}
type BeaconPair struct {
beacon_1 Beacon
beacon_2 Beacon
}
type ScannerReport struct {
index int
report []Beacon
}
type ScannerDistMap struct {
index int
dist_map map[Beacon][]floa... |
package questions
import (
"container/list"
"fmt"
"math"
"math/bits"
"math/rand"
"sort"
"strconv"
"strings"
)
// QuestionOne performs addition without using arithmetic operators
func QuestionOne(x, y int64) int64 {
/*
No arithmetic, so binary operations required
addition:
0 + 0 = 00
0 + 1 = 01
... |
package pgtypes
import (
"github.com/apaxa-go/helper/strconvh"
"math"
"reflect"
"strings"
"testing"
)
func TestNumeric_FromToString(t *testing.T) {
test := []string{
"NaN",
"0.12425345132423143452",
"90.12425345132423143452",
"890.12425345132423143452",
"7890.12425345132423143452",
"67890.1242534513... |
package main
// ----- ---- --- -- -
// Copyright 2019 Oneiro NA, Inc. All Rights Reserved.
//
// Licensed under the Apache License 2.0 (the "License"). You may not use
// this file except in compliance with the License. You can obtain a copy
// in the file LICENSE in the source distribution or at
// https://www.apac... |
// Copyright 2021 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0-devel
// protoc v3.19.3
// source: github.com/aperturerobotics/bifrost/pubsub/nats/nats.proto
package nats
import (
reflect "reflect"
sync "sync"
hash "github.com/aperturerobotics/bifrost/hash"
protoreflect "google.go... |
// go run webapp.go -a 0.0.0.0 -p 8080 -r .
package main
import (
"bufio"
"bytes"
"flag"
"fmt"
"html/template"
"io"
"io/ioutil"
"log"
"net/http"
"os"
"os/exec"
"path"
"regexp"
"runtime"
"strconv"
"strings"
"time"
_ "github.com/mattn/go-sqlite3"
... |
package mocks
import (
"encoding/json"
"fmt"
"github.com/golang/mock/gomock"
"github.com/okex/okchain-go-sdk/exposed"
auth "github.com/okex/okchain-go-sdk/module/auth/types"
backend "github.com/okex/okchain-go-sdk/module/backend/types"
dex "github.com/okex/okchain-go-sdk/module/dex/types"
order "github.com/ok... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: list_toolkit.proto
package toolkit
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
cmdb_extend "github.com/easyopsapis/easyops-api-go/protorepo-models/easyops/... |
/*
Copyright 2021 Skyscanner 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, software... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-2020 Datadog, Inc.
// +build jmx
package jmxfetch
import (
"bufio"
"fmt"
"os"
"os/exec"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.5
// source: userService.proto
package protos
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "syn... |
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package platformvm
import (
"container/heap"
"errors"
"fmt"
"time"
"github.com/ava-labs/avalanchego/codec"
"github.com/ava-labs/avalanchego/database"
"github.com/ava-labs/avalanchego/ids"
"github.com/ava-labs/a... |
package main
import (
"bytes"
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"os"
"strconv"
"strings"
"time"
)
type portList []uint16
func (p *portList) Str... |
// Package consensus implements the Cosi PBFT consensus
package consensus // consensus
import (
"fmt"
"math/big"
"sync"
"time"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/harmony-one/bls/ffi/go/bls"
"github.com/harmony-one/harmony/core"
"github.com/h... |
// Copyright 2018 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
package clients
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"net"
"sync"
"sync/atomic"
"time"
"github.com/rs/xid"
"github.com/mochi-co/mqtt/server/events"
"github.com/mochi-co/mqtt/server/internal/circ"
"github.com/mochi-co/mqtt/server/internal/packets"
"github.com/mochi-co/mqtt/server/internal/to... |
/*
Functions Not Tested:
ReadRequestHeaders -- need getting request from the connection. Moreover, this function's main
responsibility is to call parseBatchRequest or parseRequest which are tested already
*/
package rpc
import (
"bufio"
"bytes"
"encoding/json"
"reflect"
"strconv"
"testing"
)
/*
Test th... |
// 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... |
// _ _
// __ _____ __ ___ ___ __ _| |_ ___
// \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
// \ V V / __/ (_| |\ V /| | (_| | || __/
// \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
//
// Copyright © 2016 - 2021 SeMI Technologies B.V. All rights reserved.
//
// CONTACT: <EMAIL>... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package gossip
import (
"bytes"
"fmt"
"sync"
"sync/atomic"
"testing"
"time"
cb "github.com/mcc-github/blockchain-protos-go/common"
proto "github.com/mcc-github/blockchain-protos-go/gossip"
"github.com/mcc-github/blockchain/b... |
package smartctldata
import (
"bufio"
"fmt"
"io"
"strconv"
"strings"
"time"
)
type lineParser interface {
Parse(*Output, string) (lineParser, error)
}
type lineParserFunc func(*Output, string) (lineParser, error)
func (f lineParserFunc) Parse(o *Output, l string) (lineParser, error) { return f(o, l) }
var t... |
// Copyright (C) 2018 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 t... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.
package main
import (
"flag"
"fmt"
"go/ast"
"go/build"
"go/parser"
... |
/* Copyright (c) 2016 <NAME>
* All rights reserved.
*
* 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 an... |
package codespace
// This file defines the 'gh cs ssh' and 'gh cs cp' subcommands.
import (
"context"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"os"
"path/filepath"
"strings"
"sync"
"text/template"
"github.com/MakeNowJust/heredoc"
"github.com/cli/cli/v2/internal/codespaces"
"github.com/cli/cli/v2/in... |
package main
import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/url"
"sort"
"strconv"
"strings"
// Database
"github.com/jackc/pgtype"
// Logging
log "github.com/sirupsen/logrus"
// Configuration
"github.com/spf13/viper"
)
type LayerTable struct {
Id string
Schema string
T... |
package stats
import (
"strconv"
"sync"
"sync/atomic"
"time"
logger "github.com/sirupsen/logrus"
)
// A Store holds statistics.
// There are two options when creating a new store:
// create a store backed by a tcp_sink to statsd
// s := stats.NewDefaultStore()
// create a store with a user provided Sink
// ... |
/*
Copyright 2021 - 2022 Crunchy Data Solutions, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... |
package deliveryservice
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0... |
// azmeta provides access to the Azure Instance Metadata Service which provides information about running virtual
// machine instances that can be used to manage and configure your virtual machines. This includes information
// such as SKU, network configuration, and upcoming maintenance events. For more information on... |
// Copyright 2015 The Vanadium 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 cmdline implements a data-driven mechanism for writing command-line
// programs with built-in support for help.
//
// Commands are linked toget... |
// Copyright 2020 Saferwall. All rights reserved.
// Use of this source code is governed by Apache v2 license
// license that can be found in the LICENSE file.
package pe
import (
"encoding/binary"
"log"
"strconv"
)
// ImageARMRuntimeFunctionEntry represents the function table entry for the ARM
// pl... |
// This module contains a collection of YANG definitions
// for Cisco IOS-XR procmem package operational data.
//
// This module contains definitions
// for the following management objects:
// processes-memory: Process statistics
//
// Copyright (c) 2013-2017 by Cisco Systems, Inc.
// All rights reserved.
package ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: connection_plugin.proto
package plugins
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
connection "github.com/networkservicemesh/networkservicemesh/controlplane/pkg/apis/local/connection"
connection1 "github.com/networkser... |
/*
Copyright 2013 The Camlistore 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 (c) 2018 Cisco and/or its affiliates.
//
// 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 applicabl... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.3
// source: api.proto
package protobufs
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protob... |
/*
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, ... |
// The MIT License (MIT)
//
// Copyright (c) 2017 <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, mo... |
package alert_test
import (
"fmt"
"math/rand"
"strings"
"testing"
"time"
kalert "github.com/influxdata/kapacitor/alert"
"github.com/influxdata/kapacitor/services/alert"
)
func BenchmarkTopicState_MarshalBinary(b *testing.B) {
benchmarks := []struct {
n int
}{
{n: 1},
{n: 100},
{n: 30000},
}
for _,... |
package build
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"github.com/plentico/plenti/common"
"github.com/plentico/plenti/readers"
"github.com/spf13/afero"
)
// Local is set to true when using dev webserver, otherwise bools default to false.
var Local bool
... |
package common
import (
"runtime"
"sync"
"sync/atomic"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/internal"
"fyne.io/fyne/v2/internal/app"
"fyne.io/fyne/v2/internal/async"
"fyne.io/fyne/v2/internal/cache"
"fyne.io/fyne/v2/internal/driver"
"fyne.io/fyne/v2/internal/painter/gl"
)
// SizeableCanvas defines a canvas w... |
// Copyright 2016 The G3N 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 gui
import (
"github.com/Glenn-Gray-Labs/g3n/math32"
"github.com/Glenn-Gray-Labs/g3n/window"
)
// Scroller is the GUI element that allows scrolling... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.12.4
// source: resources/messages/account.proto
package messages
import (
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
protoreflect "google.golang.org/pr... |
// Copyright 2020 The Reed Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
package discover
import (
"bytes"
"encoding/json"
"github.com/reed/errors"
"github.com/reed/log"
"github.com/sirupsen/logrus"
"github.c... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.20.1
// protoc v3.11.4
// source: types/browser/browser.proto
package browser
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/prot... |
// Copyright 2019 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
// Copyright © 2020 <NAME> <<EMAIL>>
//
// 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 (c) 2018 QLC Chain Team
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
package mock
import (
"bytes"
"encoding/hex"
"encoding/json"
"fmt"
"math/big"
"math/rand"
"os"
"path/filepath"
"reflect"
"strconv"
"strings"
"testing"
"github.com/goo... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: taskToCargoMgr.proto
package taskToCargoMgr
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "g... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1/translation.proto
package automl
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 are not otherwis... |
// Copyright 2019 Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in complian... |
package watchsrv
import (
"database/sql"
"fmt"
"github.com/btcsuite/btcd/btcjson"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/wire"
"github.com/pkg/errors"
"go.uber.org/zap"
"github.com/hiromaily/go-crypto-wallet/pkg/account"
"github.com/hiromaily/go-crypto-wallet/pkg/action"
models "githu... |
// 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 ... |
package gobroke
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"strings"
"time"
"unicode/utf8"
"github.com/RoanBrand/gobroke/internal/model"
"github.com/RoanBrand/gobroke/internal/queue"
log "github.com/sirupsen/logrus"
)
var protoVersionToName = map[uint8][]byte{
3: {'M', 'Q', 'I', 's', 'd', 'p'},
4:... |
// Postgres Factory
package main
import(
"bytes"
"errors"
"fmt"
"os/exec"
"strconv"
"strings"
"time"
"github.com/andsha/postgresutils"
)
type pgtable struct {
generictable
pgprocess *postgresutils.PostgresProcess
}
func (t *pgtable) checkTable(description []tableDescription) err... |
package squeues
//go:generate mockery -name=Handler
import (
"context"
"crypto/md5"
"crypto/rand"
"encoding/base64"
"errors"
"math"
"strconv"
"sync"
"testing"
"time"
"github.com/cenkalti/backoff" // Backoff/retry utils
"github.com/google/uuid" // Generate UUIDs
"github.com/stretchr/test... |
// Copyright © 2021 Lenovo. All right reserved.
// Confidential and Proprietary
package edge
import (
"bytes"
"encoding/json"
"fmt"
uuid "github.com/satori/go.uuid"
"sync"
"time"
"github.com/zhepoch/wsmessagequeue/edge/dbEdge"
"github.com/zhepoch/wsmessagequeue/utils/log"
"github.com/gorilla/websocket"
)
... |
// analyse program prints different statistics about the cost of operations with CryptoFiat contracts
package main
import (
"context"
"crypto/ecdsa"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"math/big"
"net/http"
"os"
"strconv"
"text/tabwriter"
"github.com/cryptofiat/contract"
"github.com/ethereum/go-ether... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/service/metrics/v3/metrics_service.proto
package envoy_service_metrics_v3
import (
context "context"
fmt "fmt"
v3 "github.com/cilium/proxy/go/envoy/config/core/v3"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-va... |
/*
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 under the License... |
package vm
import (
"encoding/xml"
"fmt"
"strings"
"text/tabwriter"
"github.com/dustin/go-humanize"
)
type domain struct {
XMLName xml.Name `xml:"domain" json:"-"`
Type string `xml:"type,attr"`
Name string `xml:"name"`
UUID string `xml:"uuid"`
Memory uint64 `... |
package provisioner
import (
"context"
"crypto/sha256"
"crypto/x509"
"encoding/hex"
"encoding/json"
"io"
"net/http"
"regexp"
"strings"
"time"
"github.com/pkg/errors"
"github.com/smallstep/certificates/errs"
"go.step.sm/crypto/jose"
"go.step.sm/crypto/sshutil"
"go.step.sm/crypto/x509util"
)
// azureOID... |
// Protocol message for the fast Example parse unit test.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0-devel
// protoc v3.11.4
// source: tensorflow/core/util/example_proto_fast_parsing_test.proto
package util
import (
example "github.com/Golang-Tools/tensorflow_se... |
package config_test
import (
"io/ioutil"
"os"
"testing"
. "github.com/smartystreets/goconvey/convey"
"github.com/stretchr/testify/suite"
. "github.com/ver13/ava/pkg/common/config"
modelConfigAVA "github.com/ver13/ava/pkg/common/config/model"
fileSourceConfigAVA "github.com/ver13/ava/pkg/common/config/source/... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: grpc/testing/payloads.proto
package testing
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.Errorf
var _ = math.Inf
// Th... |
package gograceful
import (
"context"
"crypto/tls"
"fmt"
"net"
"net/http"
"os"
"os/exec"
"os/signal"
"strconv"
"strings"
"sync"
"syscall"
"time"
"github.com/landonia/golog"
)
// Don't make the caller import syscall.
const (
SIGINT = syscall.SIGINT
SIGQUIT = syscall.SIGQUIT
SIGTERM = syscall.SIGTERM... |
/*
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, ... |
package core
import (
"database/sql"
"fmt"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"time"
)
type User struct {
Model
Username string `protobuf:"bytes,1,opt,name=Username,proto3" gorm:"uniqueIndex;not null" json:"Username,omitempty" uadmin:"list,search" uadminform:"UsernameOptions"`
FirstN... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
package migrate
import (
"encoding/base64"
"encoding/json"
)
type (
// UserV0 is a Drone 0.x user.
UserV0 struct {
ID int64 `meddler:"user_id"`
Login string `meddler:"user_login"`
Token string `meddler:"user_token"`
Secret string `meddler:"user_secret"`
Expiry int64 `meddler:"user_expiry"`
Ema... |
/*
Copyright 2019 The OpenEBS 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, sof... |
/*
* Copyright 2016-2018 <NAME>, Inc. and Contributors
*
* 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 appli... |
// Copyright 2016 The Gini Authors. All rights reserved. Use of this source
// code is governed by a license that can be found in the License file.
package bench
import (
"fmt"
"math/rand"
"path/filepath"
"sort"
"strings"
"time"
"unicode/utf8"
)
// SolveRate gives the rate in terms of solutions found
// per ... |
package turn
import (
"errors"
"fmt"
"io"
"net"
"sync"
"time"
"go.uber.org/zap"
"github.com/gortc/stun"
)
// Allocation reflects TURN Allocation.
type Allocation struct {
log *zap.Logger
client *Client
relayed RelayedAddress
reflexive stun.XORMappedAddress
perms []*Permission
minBound ... |
// 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... |
package rtmp
import (
"bufio"
"bytes"
"crypto/hmac"
"crypto/sha256"
"encoding/binary"
"errors"
"fmt"
"io"
"math/rand"
)
const (
C1S1_SIZE = 1536
C1S1_TIME_SIZE = 4
C1S1_VERSION_SIZE = 4
C1S1_DIGEST_SIZE = 764
C1S1_DIGEST_OFFSET_SIZE = 4
C1S1_DIGEST_OFFSET_MAX = 764 - 32 - 4
C1S1_DIGEST_DA... |
package croc
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
log "github.com/cihub/seelog"
"github.com/gorilla/websocket"
"github.com/pkg/errors"
"github.com/schollz/croc/src/comm"
"github.com/schollz/croc/src/compress"
"github.com/schollz/croc... |
// Authors:
// <NAME>
// <NAME>
//
// Written Language:
// GoLang (aka Go!)
//
package main
import (
"bufio"
"os"
"path/filepath"
"strconv"
"strings"
)
const endl = "\r\n"
// JackCompiler is the actual compiler
type JackCompiler struct {
inFile *os.File
outFile *os.File
scanner *bufio.Scanner
symbols symb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.