text stringlengths 5.51k 28.1k |
|---|
// Copyright (c) The Thanos Authors.
// Licensed under the Apache License 2.0.
package compactv2
import (
"math"
"sort"
"github.com/pkg/errors"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel"
"github.com/prometheus/prometheus/storage"
"github.com/prometheus/pro... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0-devel
// protoc v3.6.1
// source: control.proto
package api
import (
context "context"
_ "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.gola... |
// Copyright (c) 2014 The SurgeMQ Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required ... |
package main
import (
"fmt"
"net"
"net/http"
_ "net/http/pprof"
"os"
"runtime"
"strings"
"time"
"github.com/davecheney/profile"
"github.com/docker/docker/pkg/mflag"
"github.com/gorilla/mux"
"github.com/weaveworks/go-odp/odp"
. "github.com/weaveworks/weave/common"
"github.com/weaveworks/weave/common/doc... |
// Copyright 2018 Istio 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 extract
import (
"bufio"
"errors"
"strconv"
"strings"
"github.com/InstIDEA/ddjj/parser/declaration"
)
var countriesCache = map[string]bool{}
var stateTwoLines = []string{
"EXPLOTACION",
"TERRENO SIN",
"EDIFICACIONES",
"EDIFICACION PARA",
"ADJUDICACION SEGUN",
}
var totalState int64
var stateItem... |
package network
import (
"errors"
"fmt"
"math/rand"
"net"
"strconv"
"sync"
"time"
"github.com/infinitete/neo-go-inf/pkg/core"
"github.com/infinitete/neo-go-inf/pkg/core/transaction"
"github.com/infinitete/neo-go-inf/pkg/network/payload"
"github.com/infinitete/neo-go-inf/pkg/util"
log "github.com/sirupsen/... |
// SPDX-FileCopyrightText: 2021 <NAME>
//
// SPDX-License-Identifier: MIT
package muxrpc
import (
"context"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"strings"
"sync"
"github.com/karrick/bufpool"
"github.com/pkg/errors"
"go.mindeco.de/log"
"go.mindeco.de/log/level"
"go.cryptoscope.co/muxrpc/v2... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: funcpb.proto
/*
Package funcpb is a generated protocol buffer package.
It is generated from these files:
funcpb.proto
It has these top-level messages:
*/
package funcpb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "ma... |
// Copyright 2020 GRAIL, Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
package sched_test
import (
"context"
"fmt"
"log"
"strings"
"sync"
"testing"
"time"
"github.com/grailbio/base/digest"
"github.com/grailbio/reflow"
"g... |
package types
import (
"encoding/json"
"fmt"
"math/big"
"strconv"
"time"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto/sha3"
"github.com/tomochain/tomox-sdk/errors"
"github.com/tomochain/tomox-sdk/utils"
"github.com/globalsign/mgo/bson"
)
const (
TradeStatusOpen =... |
// Copyright 2016 Takbok, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE_2.0
//
// Unless required by applicable law o... |
package openinghours
// TODO(ppacher): move all the parsing work away from this package to schema or utils.
import (
"context"
"errors"
"fmt"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/tevino/abool"
"github.com/tierklinik-dobersberg/cis/internal/cfgspec"
"github.com/tierklinik-dobersberg/cis/pkg... |
package main
import (
"encoding/json"
"flag"
"fmt"
"net/http"
"reflect"
"strconv"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/golang/glog"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-g... |
// Package scanner transforms an input string into a stream of PHP tokens.
package scanner
import (
"bufio"
"bytes"
"go/token"
"io"
"sync"
"unicode"
"github.com/z7zmey/php-parser/position"
"github.com/cznic/golex/lex"
"github.com/z7zmey/php-parser/comment"
)
// Allocate Character classes anywhere in [0x80,... |
// Copyright 2016 DeepFabric, 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.6.1
// source: subtraction.proto
package subtraction
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.g... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: common.proto
/*
Package share is a generated protocol buffer package.
It is generated from these files:
common.proto
controller_service.proto
enforcer_service.proto
scan.proto
scanner_service.proto
It has these top-level messages:
RPCVoid
CLUSProfili... |
package cmd
import (
"bytes"
"database/sql"
"fmt"
"strings"
"text/template"
"github.com/nozzle/throttler"
"github.com/spf13/cobra"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"gorm.io/gorm/schema"
)
/*
Todo. select data with ranges (offset,limit...)
*/
// go run main.go index --db-name eg_prestanish --db-user ... |
package main
import (
"fmt"
"os"
"github.com/mvryan/fasttag"
"github.com/neurosnap/sentences"
"github.com/neurosnap/sentences/data"
"sort"
"io/ioutil"
"sync"
"math"
"strings"
)
type Sentence struct {
Sentence string
PosTags []string
cfgs []uint8
}
type Noun struct {
Noun string
Occurence uint
}
type noun... |
// Copyright (c) 2017 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
package oci
import (
"context"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"path/filepath"
"strconv"
"strings"
"syscall"
criContainerdAnnotations "github.com/containerd/cri-containerd/pkg/annotations"
crioAnnotations "gith... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/policytroubleshooter/v1/checker.proto
package policytroubleshooter
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org... |
// Copyright (c) 2018 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"log/syslog"
"net"
"os"
"os/exec"
"os/signal"
"path/filepath"
"strings"
"syscall"
"time"
"github.com/kata-containers/runtime/pkg/signals"
vcType... |
// 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 main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"os"
"sync"
)
// Tarjan finds the strongly connected components.
// In the mathematics, a directed graph is "strongly connected"
// if every vertex is reachable from every other node.
// Therefore, a graph is strongly connected if there is a path
/... |
package rtmp
// https://rtmp.veriskope.com/docs/spec/
// https://rtmp.veriskope.com/pdf/video_file_format_spec_v10.pdf
// TODO: split to rtmp/rtmp_message?
// TODO: support to skip handshake?
// TODO: keep track of message stream format, decode aac etc
import (
"bytes"
"embed"
"github.com/wader/fq/format"
"gith... |
/*
Copyright 2020 The Kruise Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
// 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.
package forwarder
import (
"bytes"
"context"
"crypto/tls"
"expvar"
"fm... |
// Copyright 2021 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 template contains code for dealing with templates
package template
// template files are small enough that the code reprocesses them each time
// th... |
// Copyright Splunk 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 writi... |
/*
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, ... |
// Proberk is an HTTP prober that periodically sends out HTTP requests to specified
// endpoints and reports if the returned results match the expectations. The results
// of the probe, including latency, are recorded in metrics2.
package main
import (
"crypto/md5"
"crypto/tls"
"flag"
"fmt"
"io"
"io/ioutil"
"ne... |
// +build integration
package integration
import (
"bufio"
"bytes"
"fmt"
"io/ioutil"
"net"
"os"
"os/exec"
"path/filepath"
"regexp"
"strconv"
"strings"
"testing"
"time"
log "github.com/inconshreveable/log15"
"github.com/netsec-ethz/rains/internal/pkg/algorithmTypes"
"github.com/netsec-ethz/rains/inter... |
// Code generated by goyacc - DO NOT EDIT.
package parser
import __yyfmt__ "fmt"
//import "fmt"
import "matt-rickard.com/virgo/pkg/types/v1"
// func init() {
// yyDebug = 99
// }
type yySymType struct {
yys int
str string
str_list []string
edge_stmt v1.EdgeStmt
d_list []v1.Directive
kv_list... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.14.0
// source: serverfeatures.proto
package serverfeatures
import (
shared "github.com/EventStore/EventStore-Client-Go/protos/shared"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimp... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/services/mobile_device_constant_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v1/resources... |
/*
* Copyright 2020 F5 Networks
*
* 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 agre... |
package web
import (
"bytes"
"context"
"fmt"
"html/template"
"io"
"io/ioutil"
"math/rand"
"net/http"
"sort"
"strconv"
"sync"
"sync/atomic"
"time"
"github.com/jonas747/discordgo"
"github.com/jonas747/yagpdb/bot/botrest"
"github.com/jonas747/yagpdb/common"
"github.com/jonas747/yagpdb/common/models"
"g... |
/*
* Copyright © 2015-2018 <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 o... |
package models
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"time"
"github.com/astaxie/beego"
"github.com/TruthHun/DocHub/helper"
"github.com/astaxie/beego/orm"
)
// 文件处理
func DocumentProcess(uid int, form FormUpload) (err error) {
// 1. 计算文件 md5
// 2. 判断文件是否合法
// 3. 存入... |
package client
import (
"compress/gzip"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
"path/filepath"
"strings"
"github.com/efritz/glock"
"github.com/hashicorp/go-multierror"
"github.com/inconshreveable/log15"
"github.com/mxk/go-flowrate/flowrate"
"github.com/nee... |
package database
import (
"crypto/sha256"
"errors"
"github.com/Sukhavati-Labs/go-miner/consensus"
"github.com/Sukhavati-Labs/go-miner/chainutil"
"github.com/Sukhavati-Labs/go-miner/config"
"github.com/Sukhavati-Labs/go-miner/pocec"
"github.com/Sukhavati-Labs/go-miner/wire"
"golang.org/x/crypto/ripemd160"
)
/... |
package exporter
import (
"fmt"
"math"
"math/rand"
"regexp"
"sort"
"strconv"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/cloudwatch"
"github.com/aws/aws-sdk-go/service/cloudwatch/cloudwatchiface"
log "github.com/sirupsen/logrus"
)
var percentile = regexp.MustCompi... |
package dbmeta
import (
"bytes"
"encoding/csv"
"encoding/json"
"fmt"
"go/format"
"io/ioutil"
"os"
"path/filepath"
"reflect"
"regexp"
"strings"
"text/template"
"github.com/davecgh/go-spew/spew"
"github.com/jinzhu/inflection"
"github.com/serenize/snaker"
)
type GenTemplate struct {
Name string
Cont... |
package main
import (
//"encoding/json"
"fmt"
"sync"
"time"
"github.com/alpacahq/marketstore/quanatee/contrib/pentagon/api"
"github.com/alpacahq/marketstore/quanatee/contrib/pentagon/api4polygon"
"github.com/alpacahq/marketstore/quanatee/contrib/pentagon/api4tiingo"
"github.com/alpacahq/marketstore/quanatee/... |
package mark
import (
"bytes"
"fmt"
"github.com/glenn-brown/golang-pkg-pcre/src/pkg/pcre"
"html"
"regexp"
"strings"
"sync"
)
//Flag for Markdown
const (
compileFlag = pcre.UTF8
matcherFlag = pcre.NOTEMPTY
goroutineCount = 100
)
var block BlockRex
var inline InlineRex
func init() {
bullet := `(?:[*+... |
package main
import (
"bufio"
"fmt"
"os"
"os/exec"
"strings"
"github.com/gotk3/gotk3/gdk"
"github.com/gotk3/gotk3/gtk"
)
type app struct {
name string
cat string
appimg []string
lin []string
ex []string
icon *gdk.Pixbuf
dir string
ini *os.File
wine bool
}
func (a *app) getTreeI... |
// Copyright 2018 ETH Zurich, Anapaya Systems
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
package loop
import (
"context"
"crypto/rand"
"crypto/sha256"
"fmt"
"time"
"github.com/lightninglabs/loop/swap"
"github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/btcsuite/btcd/wire"
"github.com/lightningnetwork/lnd/lnrpc/in... |
// Copyright 2021 Antrea 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 ... |
//
// Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
//
// Licensed under the Universal Permissive License v 1.0 as shown at
// https://oss.oracle.com/licenses/upl/
//
package common
import (
"fmt"
"sync"
"time"
)
// RateLimiterPairInt interface is used in serializer.go
// to make al... |
package rod_test
import (
"context"
"errors"
"fmt"
"math/rand"
"path/filepath"
"sync"
"time"
"github.com/go-rod/rod"
"github.com/go-rod/rod/lib/input"
"github.com/go-rod/rod/lib/launcher"
"github.com/go-rod/rod/lib/proto"
"github.com/go-rod/rod/lib/utils"
)
// This example opens https://github.com/, sear... |
package main
// run: go test -v ./cmd/monako
import (
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"net/url"
"os"
"path/filepath"
"runtime"
"strings"
"testing"
"github.com/Flaque/filet"
"github.com/PuerkitoBio/goquery"
"github.com/mmcdole/gofeed"
log "github.com/sirupsen/logrus"
"github.com/stretc... |
package main
// File : alert.go
// Author : <NAME> <ind<EMAIL>3 AT gmail dot com>
// Created : Tue, 9 June 2020 11:04:10 GMT
// Description: CERN MONIT infrastructure Alert CLI Tool
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/httputil"
"os"
"sort"
"strconv"
"st... |
package context
import (
"bytes"
"encoding/hex"
"fmt"
"my5G-RANTester/lib/UeauCommon"
"my5G-RANTester/lib/milenage"
"my5G-RANTester/lib/nas/nasMessage"
"my5G-RANTester/lib/nas/nasType"
"my5G-RANTester/lib/nas/security"
"my5G-RANTester/lib/openapi/models"
"net"
"reflect"
"regexp"
)
// 5GMM main states in t... |
// Copyright (c) 2018 <NAME> (HEXONET GmbH). All rights reserved.
//
// Use of this source code is governed by the MIT
// license that can be found in the LICENSE.md file.
// Package apiclient contains all you need to communicate with the insanely fast HEXONET backend API.
package apiclient
import (
"errors"
"fmt"
... |
package booga
import (
"context"
"fmt"
"net"
"net/url"
"os"
"os/exec"
"path"
"path/filepath"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/cenkalti/backoff/v4"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.opentelemetry.... |
package tb
import (
"crypto/hmac"
"crypto/md5"
"encoding/hex"
"encoding/json"
"fmt"
"github.com/joyous-x/saturn/common/xlog"
"io/ioutil"
"net/http"
"net/url"
"regexp"
"sort"
"strings"
"time"
)
// TBRespError 请求失败时的返回信息,json 的根为:"error_response"
type TBRespError struct {
SubMsg string `json:"sub_msg"`
... |
/*
Copyright 2017 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, ... |
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the cod... |
package minimal
import (
"bytes"
"fmt"
"log"
"path"
"strings"
"text/template"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
)
const apiTemplate = `import {createTwirpRequest, throwTwirpError, Fetch} from './t... |
//
//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
//
//Unless required by applicable law or agreed to in... |
// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package v1beta20180601storage
import (
"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions"
"gith... |
//
// DISCLAIMER
//
// Copyright 2018 ArangoDB GmbH, Cologne, Germany
//
// 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 require... |
package data
import (
"errors"
"log"
"os"
"path"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/bgokden/go-cache"
"github.com/bgokden/veri/annoyindex"
pb "github.com/bgokden/veri/veriservice"
)
type DataSource interface {
StreamSearch(datumList *pb.Datum, scoredDatumStream chan<- *pb.ScoredDatum, qu... |
// Copyright (c) 2019 Uber Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law o... |
/*
Copyright 2020 Center for Digital Matter HGK FHNW, Basel.
Copyright 2020 info-age GmbH, Basel.
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 ... |
// Code generated by protoc-gen-go.
// source: google.golang.org/genproto/googleapis/api/servicecontrol/v1/check_error.proto
// DO NOT EDIT!
/*
Package google_api_servicecontrol_v1 is a generated protocol buffer package.
It is generated from these files:
google.golang.org/genproto/googleapis/api/servicecontrol/v1/ch... |
package convert
import (
"errors"
"fmt"
"reflect"
"sort"
"github.com/glycerine/monty/starlark"
)
// Much of this code is derived in large part from starlark-go's List
// implementation:
// https://github.com/google/starlark-go/blob/master/starlark/value.go#L666
// Which is Copyright 2017 The Bazel Authors and u... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: components/compliance-service/api/status/status.proto
package status // import "github.com/chef/automate/components/compliance-service/api/status"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import empty "github.com/go... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: ligato/vpp/l3/vrf.proto
package vpp_l3
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... |
package main
import (
"bytes"
"context"
"crypto/rand"
"encoding/base64"
"encoding/gob"
"encoding/json"
"fmt"
"html/template"
"log"
"net/http"
"os"
"path"
"sort"
"strings"
"golang.org/x/oauth2"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
"github.com/gorilla/securecookie"
"github.com/gori... |
// Copyright (c) 2016 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
package exporter
import (
"fmt"
"strconv"
"sync"
"sync/atomic"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/autoscaling"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/log... |
package blockchain
import (
"bytes"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"strings"
"sync"
"time"
"github.com/EducationEKT/EKT/MPTPlus"
"github.com/EducationEKT/EKT/conf"
"github.com/EducationEKT/EKT/core/common"
"github.com/EducationEKT/EKT/crypto"
"github.com/EducationEKT/EKT/ctxlog"
"github.c... |
package deb
import (
"errors"
"github.com/smira/aptly/database"
. "launchpad.net/gocheck"
)
type PackageRefListSuite struct {
// Simple list with "real" packages from stanzas
list *PackageList
p1, p2, p3, p4, p5, p6 *Package
}
var _ = Suite(&PackageRefListSuite{})
func toStrSlice(reflist *Pa... |
package main
import (
"bytes"
"context"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"math"
"net/http"
"net/url"
"regexp"
"sort"
"strings"
"time"
"github.com/go-kit/kit/endpoint"
"github.com/go-kit/kit/sd"
"github.com/go-kit/kit/sd/lb"
httptransport "github.com/go-kit/kit/transport/http"
"github.com/gol... |
package rankdb
// Copyright 2019 Vivino. All rights reserved
//
// See LICENSE file for license details
//go:generate msgp $GOFILE
import (
"encoding/json"
"fmt"
"math"
"sort"
"sync"
"time"
)
// Elements is a collection of elements.
// When this type is used elements can be assumed to be sorted.
type Elements... |
// Copyright 2020-2022 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... |
package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/conformal/btcjson"
"github.com/conformal/go-flags"
"github.com/davecgh/go-spew/spew"
"io/ioutil"
"os"
"sort"
"strconv"
)
// conversionHandler is a handler that is used to convert parameters from the
// command line to a specific type.... |
package sli
import (
"errors"
"fmt"
"github.com/keptn-contrib/dynatrace-service/internal/adapter"
"github.com/keptn-contrib/dynatrace-service/internal/dynatrace"
"github.com/keptn-contrib/dynatrace-service/internal/keptn"
"github.com/keptn-contrib/dynatrace-service/internal/sli/dashboard"
"github.com/keptn-cont... |
// Copyright (c) 2016 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
// Copyright 2020 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or a... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/services/invoice_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
enums "google.golang.org/genproto/googleapis/ads/googleads/v2/enums"
resources "google.go... |
// 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 io
import (
"context"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"os/exec"
"path/filepath"
"strconv"
"sync"
"go.chromium.org/luci/common/er... |
// Copyright (c) 2019, The Decred developers
// See LICENSE for details.
// Package order defines the Order and Match types used throughout the DEX.
package order
import (
"database/sql"
"database/sql/driver"
"encoding/binary"
"encoding/hex"
"fmt"
"time"
"decred.org/dcrdex/dex/encode"
"decred.org/dcrdex/serv... |
//
// BUILD INSTRUCTIONS:
// go build cpm.go
//
// RUN INSTRUCTIONS:
// ./cpm [-k=int] graphFileDef
//
// PARAMETERS:
// `-k` is an optional argument that specifies the size of the
// clique. If k is not specified, it defaults to k=3.
//
// `graphDefinitionFile` defines the graph to operate on. Vertices
// (no... |
// Copyright 2021 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writi... |
package web
import (
"io"
"net/http"
"os"
"path/filepath"
)
func (h *handler) index(resp http.ResponseWriter, req *http.Request) {
if !h.authenticate(resp, req) {
return
}
resp.Header().Set("Content-Type", "text/html")
resp.WriteHeader(http.StatusOK)
if h.Opts.AssetsDir == "" {
resp.Write(indexHTML)
} ... |
// Copyright 2021 The Prometheus 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... |
//go:generate go run ../tools/gen-fields.go -type Torrent
package transmission
import (
"encoding/base64"
"encoding/json"
"net"
"net/url"
"time"
)
// Identifier can identify one or multiple torrents.
type Identifier interface {
canID()
}
// SingularIdentifier can identify exactly one torrent.
type SingularIden... |
package main
import (
"fmt"
"io"
)
/* indic_category_t Cateories used in the OpenType spec:
* https://docs.microsoft.com/en-us/typography/script-development/devanagari
*/
/* Note: This enum is duplicated in the -machine.rl source file.
* Not sure how to avoid duplication. */
const (
otX = iota
otC
otV
otN
o... |
package m3u8
import (
"bufio"
"crypto/tls"
"errors"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
"path"
"regexp"
"runtime"
"strconv"
"strings"
"sync/atomic"
)
var client *http.Client
func init() {
// 跳过证书验证
transport := &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: tru... |
package main
import (
"fmt"
"github.com/araddon/dateparse"
"github.com/araddon/qlbridge/expr/builtins"
"github.com/aws/aws-sdk-go/aws"
_ "github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/kinesis"
"github.com/disney/quanta/core"
"github.com/d... |
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swa... |
// Copyright (c) 2022, salesforce.com, inc.
// All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause
// For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
// Package handlers - hook
// Contains the logic to deal with incoming git hooks
package handlers
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/services/parental_status_view_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v2/resources"
... |
package main
import (
"context"
"encoding/gob"
"encoding/json"
"flag"
"fmt"
missed "github.com/blockpane/cosmissed"
"github.com/gorilla/websocket"
"github.com/textileio/go-threads/broadcast"
"log"
"net"
"net/http"
"net/url"
"os"
"os/signal"
"strconv"
"strings"
"syscall"
"time"
)
const (
lagBlocks ... |
package vkapi
import (
"fmt"
"net/url"
"strings"
)
// VKUser describes the structure of the vk user.
type VKUser struct {
Me Users
Friends []Users
}
// UsersInfo returns array Users with the selected fields
// if the request was successful.
func (client *Client) UsersInfo(dst Destination, fieldArgs ...stri... |
// Copyright 2017 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.