text stringlengths 5.51k 28.1k |
|---|
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: globalrouting.proto
package model
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
// This is a co... |
package autocode
import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"github.com/chanyipiaomiao/hltool"
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/autocode"
autoCodeReq "github.com/flipped-aurora/gin-vue-admin/server/model/autocode/request... |
// Copyright 2017 clair 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 peer
import (
pb "anraft/proto/peer_proto"
"anraft/storage"
"anraft/utils"
"fmt"
"github.com/ngaut/log"
context "golang.org/x/net/context"
"google.golang.org/grpc"
"strings"
"sync"
"time"
)
/************************************************************************************
... |
// 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... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
package raft
//
// this is an outline of the API that raft must expose to
// the service (or tester). see comments below for
// each of these functions for more details.
//
// rf = Make(...)
// create a new Raft server.
// rf.Start(command interface{}) (index, term, isleader)
// start agreement on a new log entry
... |
// 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_go file.
// Package elliptic implements several standard elliptic curves over prime
// fields.
package elliptic
// This package operates, internally, on Jacobian coo... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.15.5
// source: protos/domain/candidateskills.grpc.proto
package domain
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: tensorflow/core/debug/debug_service.proto
/*
Package debug is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/debug/debug_service.proto
tensorflow/core/debug/debugger_event_metadata.proto
It has these top-level messa... |
package liveness
import (
"bufio"
"context"
"flag"
"fmt"
"io"
"os"
"strconv"
"strings"
"testing"
"github.com/cockroachdb/datadriven"
"github.com/irfansharif/liveness/testutils"
"github.com/stretchr/testify/assert"
)
var showLogs = flag.Bool("show-logs", false, "show-logs: print additional output")
// Te... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: peer/resources.proto
package peer // import "deepchain/protos/peer"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import common "deepchain/protos/common"
// Reference imports to suppress errors if they are not otherwise... |
package proto
import (
"fmt"
"io"
"math/big"
"github.com/pkg/errors"
"github.com/umbracle/fastrlp"
"github.com/wavesplatform/gowaves/pkg/crypto"
"github.com/wavesplatform/gowaves/pkg/errs"
g "github.com/wavesplatform/gowaves/pkg/grpc/generated/waves"
"github.com/wavesplatform/gowaves/pkg/proto/ethabi"
"go.u... |
// Copyright 2019 Teonet-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.
// Teonet command processing module.
package teonet
// #include "command.h"
// #include "packet.h"
import "C"
import (
"bytes"
"encoding/binary"
"enco... |
package proj
import (
"fmt"
"math"
)
type datumType int
const (
pjd3Param datumType = 1
pjd7Param datumType = 2
pjdGridShift datumType = 3
pjdWGS84 datumType = 4 // WGS84 or equivalent
pjdNoDatum datumType = 5 // WGS84 or equivalent
)
const (
secToRad = 4.84813681109535993589914102357e-6
adc ... |
/*
Copyright 2019 The Jetstack cert-manager 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 applicable law or agreed... |
package main
import (
"context"
"crypto/tls"
"crypto/x509"
"flag"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"strings"
"github.com/coreos/pkg/capnslog"
"github.com/coreos/pkg/flagutil"
"github.com/openshift/console/auth"
"github.com/openshift/console/pkg/proxy"
"github.com/openshift/console/server"
)... |
/*
Copyright 2017 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 agreedto in writing, software
dist... |
package metalcloud
import (
"fmt"
"strings"
)
//Datacenter - datacenter description
type Datacenter struct {
DatacenterID int `json:"datacenter_id,omitempty" yaml:"id,omitempty"`
DatacenterName string `json:"datacenter_name,omitempty" yaml:"name,omitempty"`
Data... |
package main
import (
"crypto/sha1"
"encoding/hex"
"encoding/json"
"flag"
"fmt"
"io"
"os"
"os/exec"
"runtime"
"sort"
"strings"
"sync"
"sync/atomic"
"time"
ct "github.com/google/certificate-transparency-go"
"github.com/google/certificate-transparency-go/tls"
"github.com/google/certificate-transparency... |
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// ninjagraph provides utilities to parse the DOT output from Ninja's `-t graph`
// tool to a Go native format.
package ninjagraph
import (
"bufio"
"fmt... |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT
package ec2tagger
import (
"hash/fnv"
"net/http"
"os"
"sync"
"time"
configaws "github.com/aws/amazon-cloudwatch-agent/cfg/aws"
"github.com/aws/amazon-cloudwatch-agent/internal"
"github.com/aws/amazon-cloudwa... |
// 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 mips64
import (
"cmd/compile/internal/gc"
"cmd/internal/obj"
"cmd/internal/obj/mips"
"fmt"
)
func defframe(ptxt *obj.Prog) {
// fill in argument ... |
package kopiabackup
import (
"context"
"fmt"
"strings"
"sync"
"github.com/portworx/kdmp/pkg/drivers"
"github.com/portworx/kdmp/pkg/drivers/utils"
"github.com/portworx/kdmp/pkg/jobratelimit"
kdmpops "github.com/portworx/kdmp/pkg/util/ops"
"github.com/portworx/sched-ops/k8s/batch"
coreops "github.com/portworx... |
/*
* Copyright (c) 2021 THL A29 Limited, a Tencent company. All rights reserved
*
* This source code file is licensed under the MIT License, you may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
*/
package normal
import (
"fmt"
"sync"
"time"
"github.com/Tencent/bk-ci/src/booster... |
// 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 bson
import (
"bytes"
"reflect"
"testing"
"time"
"github.com/openark/vitess/go/bytes2"
)
type alltypes struct {
Bytes []byte
Float64 float64
S... |
package config
type UserConfig struct {
Gui GuiConfig `yaml:"gui"`
Git GitConfig `yaml:"git"`
Update UpdateConfig `yaml:"update"`
Refresher RefresherConfig `yaml:"refresher"`
Reporting string `yaml:"reporting"`
Spl... |
// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 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 Soft... |
package core
import (
"fmt"
"os"
"path"
"strings"
"time"
"github.com/jessevdk/go-flags"
"gopkg.in/op/go-logging.v1"
"github.com/thought-machine/please/src/process"
)
var log = logging.MustGetLogger("core")
// A BuildLabel is a representation of an identifier of a build target, e.g. //spam/eggs:ham
// corre... |
package main
import (
"database/sql"
"gorm.io/gorm"
"strconv"
"time"
)
func exportStatePowerOffFromZapsi(db *gorm.DB) {
start := time.Now()
logInfo("MAIN", "Exporting poweroff states started")
var workplaceStates []WorkplaceState
db.Where("StateID = 3").Where("dte is not null and dte > ?", time.Now().Add(-24*... |
package game
import (
"encoding/json"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/jmesyan/nano/application/models"
"github.com/jmesyan/nano/application/stores"
"github.com/jmesyan/nano/dcm"
"github.com/jmesyan/nano/nodes"
"github.com/jmesyan/nano/utils"
"github.com/nats-io/nats.go"
"net"
"reflect"
... |
package nl
import (
"unsafe"
)
const (
DEFAULT_CHANGE = 0xFFFFFFFF
)
const (
IFLA_INFO_UNSPEC = iota
IFLA_INFO_KIND
IFLA_INFO_DATA
IFLA_INFO_XSTATS
IFLA_INFO_SLAVE_KIND
IFLA_INFO_SLAVE_DATA
IFLA_INFO_MAX = IFLA_INFO_SLAVE_DATA
)
const (
IFLA_VLAN_UNSPEC = iota
IFLA_VLAN_ID
IFLA_VLAN_FLAGS
IFLA_VLAN_EGR... |
package main
import (
"encoding/hex"
"fmt"
"io"
"os"
"strings"
"github.com/gdamore/tcell"
)
type editorArea struct {
file *os.File // current file being edited
fileStat os.FileInfo // stat of file
offset int64 // byte offset of file to display
cursorOffset int // relative... |
package go_ora
import (
"context"
"database/sql"
"database/sql/driver"
"errors"
"fmt"
"os"
"os/user"
"strconv"
"strings"
"github.com/sijms/go-ora/converters"
"github.com/sijms/go-ora/network"
"github.com/sijms/go-ora/trace"
)
type ConnectionState int
const (
Closed ConnectionState = 0
Opened Connectio... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api/judge/v1alpha1/policy.proto
package v1alpha1
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.
va... |
package wtclient
import (
"fmt"
"sync"
"time"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btclog"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/watchtower/blob"
"github.com/lightningnetwork/lnd/watchtower/wtdb"
"gi... |
package mediationcontainer
import (
"time"
"github.com/turbonomic/turbo-go-sdk/pkg/probe"
"github.com/turbonomic/turbo-go-sdk/pkg/proto"
"github.com/golang/glog"
)
// Abstraction to establish session using the specified protocol with the server
// and handle server messages for the different probes in the Media... |
package cmd
import (
"encoding/csv"
"fmt"
"io"
"log"
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"sort"
"strconv"
"strings"
"sync"
"time"
"golang.org/x/text/encoding/japanese"
"golang.org/x/text/transform"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/yukimemi/core"
)
//go:g... |
// Copyright 2016-2018, Pulumi 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... |
// The MIT License (MIT)
//
// Copyright (c) 2019 <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 thriftbp
import (
"context"
"errors"
"fmt"
"io"
"net"
"time"
"github.com/apache/thrift/lib/go/thrift"
"github.com/avast/retry-go"
"github.com/go-kit/kit/metrics"
"github.com/reddit/baseplate.go/breakerbp"
"github.com/reddit/baseplate.go/clientpool"
"github.com/reddit/baseplate.go/ecinterface"
"g... |
// Licensed to LinDB under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. LinDB licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compli... |
package reports
import (
"database/sql"
"fmt"
"os"
"os/signal"
"strconv"
"strings"
"time"
"github.com/360EntSecGroup-Skylar/excelize"
p "github.com/dude333/rapina/parsers"
"github.com/pkg/errors"
)
const sectorAverage = "MÉDIA DO SETOR"
// metric parameters
type metric struct {
descr string
val floa... |
package fetcher
import (
"errors"
"math/rand"
"sync"
"time"
"github.com/Fantom-foundation/go-lachesis/eventcheck"
"github.com/Fantom-foundation/go-lachesis/eventcheck/heavycheck"
"github.com/Fantom-foundation/go-lachesis/hash"
"github.com/Fantom-foundation/go-lachesis/inter"
"github.com/Fantom-foundation/go-... |
package nlp
import (
"math"
"time"
"golang.org/x/exp/rand"
"github.com/james-bowman/sparse"
"gonum.org/v1/gonum/mat"
"gonum.org/v1/gonum/stat/distuv"
"gonum.org/v1/gonum/stat/sampleuv"
)
// SignRandomProjection represents a transform of a matrix into a lower
// dimensional space. Sign Random Projection is a... |
/*
*
* k6 - a next-generation load testing tool
* Copyright (C) 2016 Load Impact
*
* 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 (at your o... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/shared_criterion.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
wrappers "github.com/catper/protobuf/ptypes/wrappers"
common "google.golang.org/genproto/googleapis/ads/g... |
package model
// Accessdown. Use Layer 2 mode to bridge the packets sent to this service if it is marked as DOWN. If the service is DOWN, and this parameter is disabled, the packets are dropped.<br>Default value: NO<br>Possible values = YES, NO.
// All. Display both user-configured and dynamically learned services.... |
package mongodb
import (
"fmt"
"reflect"
"strconv"
"github.com/influxdata/telegraf"
)
type MongodbData struct {
StatLine *StatLine
Fields map[string]interface{}
Tags map[string]string
MetaTags map[string]string
MetaFields map[string]interface{}
DbData []DbData
ColData ... |
/**********************************************************
* Author : Michael
* Email : <EMAIL>
* Last modified : 2016-04-30 09:40
* Filename : utils.go
* Description : 常用的工具方法
* *******************************************************/
package utils
import (
"bytes"
"crypto/md5"
"encodi... |
package main
import (
"context"
"fmt"
"os"
"github.com/pkg/errors"
"github.com/tanordheim/babyname-tinder"
"github.com/tanordheim/babyname-tinder/psql"
)
type liked struct {
name string
superlike bool
}
type disliked struct {
name string
count int
}
func main() {
ctx := context.Background()
repo :... |
package store
import (
"io"
"github.com/coderun-top/coderun/src/model"
"golang.org/x/net/context"
)
type Store interface {
// GetUser gets a user by unique ID.
GetUser(int64) (*model.User, error)
// GetUserLogin gets a user by unique Login name.
GetUserLogin(string) (*model.User, error)
GetUserName(string)... |
package translator
var pkgNatives = make(map[string]map[string]string)
func init() {
pkgNatives["bytes"] = map[string]string{
"Compare": `function(a, b) {
var l = Math.min(a.length, b.length), i;
for (i = 0; i < a.length; i += 1) {
var va = a.array[a.offset + i];
var vb = b.array[b.offset + i];
i... |
package main
import (
"bufio"
"compress/gzip"
"flag"
"fmt"
"io"
"log"
"os"
"regexp"
"strconv"
"strings"
"time"
)
// Time layouts must use the reference time `Mon Jan 2 15:04:05 MST 2006` to
// convey the pattern with which to format/parse a given time/string
const TIME_LAYOUT string = "[2006-01-02 15:04:0... |
package renderers
import (
"fmt"
"io"
"regexp"
"strings"
"unicode"
"gioui.org/layout"
"gioui.org/text"
"gioui.org/widget"
"gioui.org/widget/material"
"github.com/gomarkdown/markdown/ast"
"github.com/planetdecred/godcr/ui/decredmaterial"
)
type labelFunc func(string) decredmaterial.Label
type Renderer st... |
package server
import (
"errors"
"fmt"
"io/ioutil"
"math"
"math/big"
"net/url"
"os"
"sync"
"github.com/golang/glog"
ethcommon "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/livepeer/go-livepeer/common"
"github.com/livepeer/go-livepeer/core"
"github.com/li... |
package models
import (
"context"
"errors"
"fmt"
"html/template"
"os"
"path/filepath"
"reflect"
"strconv"
"strings"
"time"
elastic "gopkg.in/olivere/elastic.v5"
"net/http"
"net/url"
"github.com/Latezly/nyaa_go/config"
"github.com/Latezly/nyaa_go/utils/cache"
"github.com/Latezly/nyaa_go/utils/format"... |
/*
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package bitbucketv1
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"strings"
"github.com/mitchellh/mapstructure"
)
// APIResponse contains generic data from API Response
type APIResponse struct {
*http.Respons... |
package client
import (
"bytes"
"fmt"
"html/template"
"io"
"net/http"
"os"
"path"
"path/filepath"
"runtime"
"strings"
"time"
"github.com/Notifiarr/notifiarr/pkg/bindata"
"github.com/Notifiarr/notifiarr/pkg/configfile"
"github.com/Notifiarr/notifiarr/pkg/exp"
"github.com/Notifiarr/notifiarr/pkg/logs"
"... |
// ---------------------------------------------------
// File : cr.go
// Authors : ccmywish <<EMAIL>>
// Created on : <2021-12-29>
// Last modified : <2022-2-10>
//
// This file is used to explain a CRyptic command
// or an acronym's real meaning in computer world or
// orther fileds.... |
package flamingoservice
import (
"FlamingoV2/assets"
"FlamingoV2/flamingolog"
"errors"
"log"
"regexp"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute"
"github.com/bwmarrin/discordgo"
)
const (
authService... |
// Package carto is a Go language map drawing library
package carto
import (
"image"
"image/color"
"image/png"
"io"
"math"
"reflect"
"github.com/ctessum/geom"
"gonum.org/v1/plot/vg"
"gonum.org/v1/plot/vg/draw"
"gonum.org/v1/plot/vg/vgimg"
)
// Canvas is a canvas for drawing maps.
type Canvas struct {
draw... |
/*
Copyright 2014 The Perkeep 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 (c) nano Author and TFG Co. All Rights Reserved.
//
// 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, cop... |
package renter
import (
"bytes"
"context"
"time"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/crypto"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/types"
"gitlab.com/NebulousLabs/errors"
)
// errNotEnoughPieces is returned when there are not enough pieces found to
/... |
package ethash
import (
"errors"
"fmt"
"github.com/edsrzf/mmap-go"
"github.com/hashicorp/golang-lru/simplelru"
log "github.com/sirupsen/logrus"
"math/big"
"math/rand"
"os"
"path/filepath"
"reflect"
"runtime"
"strconv"
"sync"
"sync/atomic"
"unsafe"
)
var ErrInvalidDumpMagic = errors.New("invalid dump ma... |
package utils
import (
"encoding/binary"
"errors"
"flag"
"fmt"
"net"
"strconv"
"strings"
"time"
decoder "github.com/cloudflare/goflow/v3/decoders"
"github.com/cloudflare/goflow/v3/decoders/netflow"
flowmessage "github.com/cloudflare/goflow/v3/pb"
reuseport "github.com/libp2p/go-reuseport"
"github.com/pro... |
package spacetraders
import (
"fmt"
"math"
"strings"
"time"
)
// JSON responses
type StatusRes struct {
Status string `json:"status"`
}
type ClaimRes struct {
Token string `json:"token"`
User User `json:"user"`
}
type AccountRes struct {
User User `json:"user"`
}
type LoanRes struct {
Loans []Loan `jso... |
/*
Copyright 2019 The Crossplane 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 main
// Generates starlark bindings for the pixlet/render package.
//
// Also produces widget documentation and extracts example snippets
// that can be run with docs/gen.go to produce images for the widget
// docs.
import (
"bytes"
"fmt"
"go/doc"
"go/format"
"go/parser"
"go/token"
"image/color"
"io/i... |
/*
* Copyright (c) 2014 <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, dis... |
package api
type Site24x7Monitor interface {
SetNotificationProfileID(notificationProfileID string)
GetNotificationProfileID() string
SetUserGroupIDs(userGroupIDs []string)
GetUserGroupIDs() []string
SetTagIDs(tagIDs []string)
GetTagIDs() []string
String() string
}
// Generic type for denoting a resource in Si... |
package rkentry
import (
"context"
"crypto/tls"
"crypto/x509"
"encoding/json"
"errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/push"
"go.uber.org/atomic"
"go.uber.org/zap"
"net/http"
"strings"
"sync"
"time"
)
var (
// Why 1608? It is the year of f... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.11.4
// source: auth.proto
package emmet
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.or... |
package coap
import (
"bytes"
"context"
"errors"
"github.com/lobaro/coap-go/coapmsg"
"sync"
"time"
)
type Token []byte
type MessageId uint16
type NotifyFunc func(ia *Interaction, currResponse *coapmsg.Message)
// Interaction tracks one interaction between a CoAP client and Server.
// The Interaction is create... |
// Radix tree mix regexp and wildcard implementation
//
// Format
// A route pattern placeholder starts with a {, followed by the placeholder name, ending with a }.
// This is an example wildcard named placeholder:
// "/hello/{name}"
// No placeholder name
// "/hello/{} | /hello/{*}"
// Regular expression matching
// "... |
// Copyright 2018 The Chromium OS 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 security
import (
"bufio"
"context"
"fmt"
"os"
"path/filepath"
"regexp"
"strings"
"syscall"
"chromiumos/tast/errors"
"chromiumos/ta... |
package drand
import (
"bytes"
"context"
"encoding/hex"
"fmt"
gnet "net"
"os"
"path"
"strconv"
"strings"
"testing"
"time"
json "github.com/nikkolasg/hexjson"
"github.com/BurntSushi/toml"
"github.com/drand/drand/chain"
"github.com/drand/drand/chain/boltdb"
"github.com/drand/drand/common/scheme"
"gith... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: file_update.proto
package rpc
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "... |
package north
import (
"bytes"
"fmt"
"io"
)
type operandType uint8
const (
largeConstantOperand operandType = iota
smallConstantOperand
variableOperand
omittedOperand
)
type branchInfo uint16
// Condition returns which boolean value the branch is checking for.
func (b branchInfo) Condition() bool {
return ... |
package scraper
import (
"context"
"crypto/md5"
"encoding/hex"
"encoding/xml"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"io"
"net/url"
"os"
"strconv"
"strings"
// "encoding/json"
"errors"
"io/ioutil"
"net/http"
"time"
"unicode/utf16"
... |
// Copyright 2021 The Chromium OS 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 login
import (
"context"
"fmt"
"strings"
"time"
"chromiumos/tast/errors"
"chromiumos/tast/local/chrome/cdputil"
"chromiumos/tast/local... |
// Copyright 2012 <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package skein implements the Skein-512 hash function, MAC, and stream cipher
// as defined in "The Skein Hash Function Family, v1.3".
package skein
import (
"crypt... |
/*
* Copyright (c) 2019 WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lic... |
/*
* Copyright © 2019 <NAME>.
*/
package consul
import (
"fmt"
"github.com/hashicorp/consul/api"
"github.com/hedzr/cmdr"
"gopkg.in/hedzr/errors.v2"
"strconv"
"strings"
)
const (
MS_PREFIX = "app.ms"
TAGS_PREFIX = "app.ms.tags"
)
func TagsList() (err error) {
registrar := getRegistrar()
err = listServi... |
package kepub
import (
"bytes"
"io"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"unicode"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
"github.com/andybalholm/cascadia"
"github.com/beevik/etree"
"github.com/kr/smartypants"
)
// --- Content Transformations --- //
// transform1 loads the d... |
// Copyright 2017 The LUCI Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
/*
* Copyright 2018 Crimson AS <<EMAIL>>
* Author: <NAME> <<EMAIL>>
*
* 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... |
/*
Package migrations manages the state of the Catena database. SQL files should be added
to this directory that implement DDL commands that update the schema of the database
that Catena is connected to. The SQL files are then compiled into the binary using the
catena makemigrations command along with go generate. The ... |
package main
import (
"context"
"fmt"
"hash/fnv"
"net/url"
"strconv"
"strings"
"sync"
"time"
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/config"
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/datasource"
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/notifier"
"github.com/Vic... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: rbac/v1/rbac.proto
/*
Package istio_rbac_v1 is a generated protocol buffer package.
It is generated from these files:
rbac/v1/rbac.proto
It has these top-level messages:
ServiceRole
AccessRule
ServiceRoleBinding
Subject
RoleRef
*/
package istio_rbac_v... |
// Package envcfg provides a common way to load configuration variables from
// the system environment or from based on initial configuration values stored
// on disk or in a base64 encoded environment variable.
package envcfg
import (
"bytes"
"context"
"crypto/tls"
"encoding/base64"
"fmt"
"io/ioutil"
"os"
"pa... |
package caire
import (
"image"
"image/color"
"image/draw"
"math"
"github.com/esimov/caire/utils"
pigo "github.com/esimov/pigo/core"
)
// maxFaceDetAttempts defines the maximum number of attempts of face detections,
const maxFaceDetAttempts = 20
var (
detAttempts int
sobel *image.NRGBA
energySeams = m... |
package k8s
import (
"bytes"
"context"
"fmt"
"net/http"
"net/url"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"sync"
"time"
log "github.com/sirupsen/logrus"
appsv1 "k8s.io/api/apps/v1"
apiv1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
... |
package file
import (
"crypto/md5"
"os"
"path"
"strconv"
"strings"
"sync"
"time"
"github.com/wx13/sith/config"
"github.com/wx13/sith/file/buffer"
"github.com/wx13/sith/file/cursor"
"github.com/wx13/sith/syntaxcolor"
"github.com/wx13/sith/terminal"
"github.com/wx13/sith/ui"
)
// File contains all the det... |
package token
import (
"fmt"
"strings"
"unicode"
"unicode/utf8"
)
// Most of this package is listed and adapted from
// https://golang.org/src/text/template/parse/lex.go and partially taken from
// https://golang.org/src/go/scanner/scanner.go
// Tokenise creates a new scanner for the input string
func Tokenise(n... |
/*
* Copyright (C) 2018 The ontology Authors
* This file is part of The ontology library.
*
* The ontology 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, or
* (a... |
package swagger
import (
"encoding/json"
"fmt"
"github.com/akhettar/apigw-pub/model"
"github.com/akhettar/apigw-pub/utils"
"net/http"
"os"
"reflect"
"regexp"
"strconv"
"strings"
swg "github.com/go-openapi/spec"
log "github.com/sirupsen/logrus"
)
var DEFAULT_JSON_MIME_TYPE = []string{"application/json"}
... |
// Copyright (c) <NAME>. (https://github.com/jeevatkm)
// Source code and usage is governed by a MIT style
// license that can be found in the LICENSE file.
package main
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"go/build"
"io"
"io/ioutil"
"net"
"net/http"
"os"
"os/exec"
"path/filepath"
"runtime"
"... |
// Copyright (c) 2014, Google, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.