text stringlengths 5.51k 28.1k |
|---|
package mongodbcatalog
import (
"crypto/rand"
"encoding/base64"
"errors"
"fmt"
"strconv"
"strings"
"github.com/cloudstax/firecamp/api/catalog"
"github.com/cloudstax/firecamp/api/common"
"github.com/cloudstax/firecamp/api/manage"
"github.com/cloudstax/firecamp/pkg/dns"
"github.com/cloudstax/firecamp/pkg/uti... |
package awssume
import (
"context"
"encoding/json"
"errors"
"fmt"
"os"
"os/exec"
"os/signal"
"path"
"sort"
"strings"
"syscall"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/arn"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/sts"
"github.com/naoina/t... |
// Copyright 2016, <NAME> <<EMAIL>>
// See the LICENSE file for more details.
package main
import (
"flag"
"fmt"
"io/ioutil"
"math"
"os"
"runtime"
"time"
glfw "github.com/go-gl/glfw/v3.1/glfw"
mgl "github.com/go-gl/mathgl/mgl32"
"github.com/tbogdala/gombz"
gui "github.com/tbogdala/eweygewey"
guiinput "g... |
// Package tss provides a core implementation of Threshold Secret Sharing (TSS) http://tools.ietf.org/html/draft-mcgrew-tss-03
// It uses a finite field GF(256) instead of Shamir scheme using large integers modulo a large prime number.
// Max number of shares is 255, max secret key bytes is 65534.
package tss
import ... |
//
// Copyright (c) 2017, Cisco Systems
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditi... |
// Copyright 2019 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 ... |
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package markdown
import (
"bytes"
"fmt"
"io"
"path"
"path/filepath"
"regexp"
"strings"
"github.com/Unknwon/com"
"github.com/microcosm-cc/bluemonday... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: orc8r/protos/digest.proto
package protos
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
... |
package memdb
import (
"context"
"fmt"
"sort"
"sync"
"github.com/RoaringBitmap/roaring"
"github.com/lindb/lindb/pkg/interval"
"github.com/lindb/lindb/pkg/logger"
"github.com/lindb/lindb/pkg/timeutil"
pb "github.com/lindb/lindb/rpc/proto/field"
"github.com/lindb/lindb/series"
"github.com/lindb/lindb/sql/st... |
package did
import (
"errors"
"fmt"
"net/url"
"strings"
"time"
)
// Base prefix according to the specification.
// https://w3c.github.io/did-core/#identifier
const prefix = "did:"
// Common context values used for all DID instances.
var defaultContexts = []interface{}{
defaultContext,
ed25519Context,
x25519C... |
// Copyright 2018 The go-hpb Authors
// Modified based on go-ethereum, which Copyright (C) 2014 The go-ethereum Authors.
//
// The go-hpb 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: BackupItemAction.proto
/*
Package generated is a generated protocol buffer package.
It is generated from these files:
BackupItemAction.proto
DeleteItemAction.proto
ItemSnapshotter.proto
ObjectStore.proto
PluginLister.proto
RestoreItemAction.proto
Shar... |
package websocketendpoint
import (
"github.com/Davidc2525/messager/cluster/clustermanager"
"github.com/Davidc2525/messager/core/endpoint"
"github.com/Davidc2525/messager/core/packets"
"github.com/Davidc2525/messager/core/precensemanager"
"github.com/Davidc2525/messager/core/processor"
"github.com/Davidc2525/mess... |
package randomizer
import (
"math/rand"
"strconv"
"time"
"github.com/tlentz/d2modmaker/internal/d2mod/config"
"github.com/tlentz/d2modmaker/internal/d2fs"
"github.com/tlentz/d2modmaker/internal/d2fs/txts/gems"
"github.com/tlentz/d2modmaker/internal/d2fs/txts/misc"
"github.com/tlentz/d2modmaker/internal/d2fs/... |
package flagx
import (
"flag"
"fmt"
"os"
"strings"
"time"
)
// SplitArgs returns the command name and options.
func SplitArgs(arguments []string) (string, []string) {
if len(arguments) > 0 {
if s := arguments[0]; len(s) > 0 && s[0] != '-' {
return s, arguments[1:]
}
}
return "", arguments
}
// Option ... |
package main
/*
time.Sleep(time.Microsecond) cost about 10)us but not stable(26-440us)
C.usleep(1) cost about 72us but not stable(88-175us)
usleep(1) cost about 65-75us stable
*/
/*
#include <stdio.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
void testbase(){
int i;
struct timeval t1,t2,r21;
... |
package unit
// 语言map
type langMap map[string]langList
// 参数与语言的map
type langList map[string]string
// 英文维度和语言列表的map
type langHash map[string]langMap
// 重量(mass)
var massLang = langMap{
"kg": langList{"zh-cn": "千克(kg)"},
"g": langList{"zh-cn": "克(g)"},
"mg": langList{"zh-cn": "毫克(mg)"},
"μg": langL... |
package cvo
import (
"fmt"
"strconv"
"sync"
"time"
"github.com/blang/semver"
"github.com/golang/glog"
"github.com/google/uuid"
corev1 "k8s.io/api/core/v1"
apiextclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachine... |
package wasm
import (
"bytes"
"context"
"encoding/binary"
"math"
"reflect"
"strconv"
"testing"
"github.com/stretchr/testify/require"
"github.com/tetratelabs/wazero/wasm/internal/leb128"
)
func TestStore_GetModuleInstance(t *testing.T) {
name := "test"
s := NewStore(nopEngineInstance)
m1 := s.getModule... |
/*
Copyright 2021.
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 un... |
// Copyright 2015, 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 vtgateconn
import (
"flag"
"fmt"
"time"
log "github.com/golang/glog"
"github.com/youtube/vitess/go/sqltypes"
"golang.org/x/net/context"
querypb "... |
// <NAME>, 2017
//
// Part of "Labyrinth lost gems" game engine android/linux version.
// Audio player(mixer), ALSA and OpenSL ES backends
package audio
import (
"log"
"math/rand"
"strconv"
"time"
)
type cmd int
const (
// control player
cmdPlayerStop cmd = iota
cmdPlayerMute
cmdPlayerUnmute
cmdPlayerPause... |
// go:generate go-bindata -ignore '.git/.*' -prefix static static/...
package main
import (
"crypto/md5"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"flag"
"fmt"
"github.com/JanBerktold/sse"
"github.com/gorilla/websocket"
"github.com/julienschmidt/httprouter"
"github.com/kardianos/osext"
"github.com/prom... |
package vmware
/**
* SPDX-License-Identifier: Apache-2.0
* Copyright 2020 vorteil.io Pty Ltd
*/
import (
"bytes"
"context"
"errors"
"fmt"
"io/ioutil"
"net"
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"strings"
"sync"
"time"
"github.com/thanhpk/randstr"
"github.com/vorteil/vorteil/pkg/elog"
... |
// Copyright 2016 NDP Systèmes. 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 applica... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: moc_cloudagent_location.proto
package cloud
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
common "github.com/microsoft/moc/rpc/common"
grpc "google.golang.org/grpc"
... |
package eai
// ----- ---- --- -- -
// Copyright 2019, 2020 The Axiom Foundation. 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/services/geographic_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/v1/resources"
_ "g... |
/*
Copyright AppsCode 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 applicable law or agreed to in writing... |
/*
Copyright 2020 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 2020 <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 applicable... |
// Copyright 2022 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package main
import (
"flag"
"io/ioutil"
"os"
"time"
"encoding/json"
"github.com/atrox/homedir"
"github.com/godbus/dbus"
"github.com/jessedp/lastseen-go/version"
"github.com/sevlyar/go-daemon"
"github.com/sirupsen/logrus"
//"gopkg.in/natefinch/lumberjack.v2"
"bytes"
"fmt"
"github.com/manifoldco/promptui... |
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/prediction_service.proto
package automl // import "google.golang.org/genproto/googleapis/cloud/automl/v1beta1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genprot... |
package pkglint
import (
"os"
"strconv"
"strings"
)
type Autofixer interface {
Diagnoser
Autofix() *Autofix
}
// Autofix handles all modifications to a single line,
// possibly spanning multiple physical lines in case of Makefile lines,
// describes them in a human-readable form and formats the output.
// The m... |
/*
* SPDX-License-Identifier: Apache-2.0
*/
package console
import (
gotls "crypto/tls"
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"os"
"strings"
"github.com/IBM-Blockchain/microfab/internal/pkg/ca"
"github.com/IBM-Blockchain/microfab/internal/pkg/identity"
"github.com/IBM-Blockchain/microfab/inte... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package akamai
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use the `GtmDomain` reso... |
package mp4
import (
"bytes"
"os"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestReadBoxStructure(t *testing.T) {
f, err := os.Open("./_examples/sample.mp4")
require.NoError(t, err)
defer f.Close()
var n int
_, err = ReadBoxStructure(f, func(h *ReadHandle) ... |
package main
import "flag"
import "fmt"
import "sort"
import (
"bufio"
"os"
"path/filepath"
"regexp"
"runtime"
"time"
)
func Usage() string {
return fmt.Sprintf(
`
%sUsage of %s:%s
%sfindref%s %s[options]%s %smatch_regex%s %s[start_dir]%s %s[filename_regex]%s
%sArguments:%s
%smatch... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.12.4
// source: internal/pb/sample.proto
package pb
import (
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
timestamp "github.com/golang/protobuf/ptypes... |
package network
import (
"bytes"
"context"
"encoding/binary"
"errors"
"fmt"
"math/rand"
"sync"
"time"
"github.com/shimingyah/raft"
pb "github.com/shimingyah/raft/raftpb"
"github.com/sirupsen/logrus"
)
var (
ErrDuplicateRaftId = errors.New("Node is already part of group")
ErrNoNode = errors.New(... |
package thrift_rpc
import (
"fmt"
"os"
"path"
"reflect"
"runtime"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/lightstep/lightstep-tracer-go/basictracer"
"github.com/lightstep/lightstep-tracer-go/lightstep_thrift"
"github.com/lightstep/lightstep-tracer-go/thrift_0_9_2/lib/go/thrift"
ot "g... |
package push
import (
"context"
"net"
"net/http"
"sync"
"sync/atomic"
"time"
"github.com/gofrs/uuid"
"go.aporeto.io/bahamut"
"go.aporeto.io/bahamut/gateway"
"go.uber.org/zap"
"golang.org/x/time/rate"
)
var emptyRateSet = &rateSet{}
type rateSet struct {
limit rate.Limit
burst int
}
// A Upstreamer lis... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/type/metadata/v2/metadata.proto
package envoy_type_metadata_v2
import (
fmt "fmt"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not... |
package main
import (
"fmt"
"io/ioutil"
"os"
"path"
"reflect"
"regexp"
"strings"
"github.com/davecgh/go-spew/spew"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/istreamlabs/protoc-gen-huma/annotation"
"google.golang.org/protobuf/compiler/protogen"
"google.golang.org/protobuf/proto"
"... |
// Copyright 2011 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.
// XMPP support for talking to Google Cloud Print (only).
package cloudprint
import (
"bufio"
"bytes"
"crypto/tls"
"encoding/base64"
"encoding/xml"
"er... |
package dal
import (
"net/http"
"net/url"
"reflect"
"strconv"
"strings"
"time"
)
// Helpers paging
//variable globale controleur
var (
DefaultRecordPerPage = 25
MaxRecordPerPage = 100
)
// PagedResponse est un container pour les réponse avec pagin
type PagedResponse struct {
Offset int `json:"offs... |
// Copyright 2020 ikawaha
//
// 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 binarycookies
import (
"bytes"
"testing"
)
var _test1 = []byte{
0x63, 0x6f, 0x6f, 0x6b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x01, 0x92,
0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c,
0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0... |
package tuf
import (
"io"
"net/http"
"net/url"
"path"
"time"
"github.com/WatchBeam/clock"
"github.com/pkg/errors"
)
var (
errRollbackAttack = errors.New("role version is greater than previous role version")
errFreezeAttack = errors.New("current time is after role expiration timestamp")
er... |
// 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 filters
import (
"github.com/gpayer/go-audio-service/snd"
"math"
)
const CompressorMaxDelay int = 1024
const CompressorSpu int = 32
const CompressorSpacingDb float32 = 5.0
type CompressorState struct {
// metergain can be read by the user after processing a chunk to see how much dB the
// compressor woul... |
package goengage
import (
"fmt"
"log"
"time"
)
//Engage endpoints for supporters.
const (
SearchSupporter = "/api/integration/ext/v1/supporters/search"
UpsertSupporter = "/api/integration/ext/v1/supporters"
DeleteSupporter = "/api/integration/ext/v1/supporters"
SupporterSearchGroups = "/api/i... |
// Copyright (c) 2021 the SC authors. All rights reserved. MIT License.
package scparse
import (
"bytes"
"fmt"
"strings"
"unicode"
"unicode/utf8"
)
// tokenType identifies the type of a lex token.
type tokenType int
const (
tokenError tokenType = iota // val contains error details
tokenEOF
tokenBool /... |
// Copyright (C) 2016 Librato, Inc. All rights reserved.
package reporter
import (
"encoding/binary"
"fmt"
"math"
"math/rand"
"strings"
"sync"
"time"
"github.com/appoptics/appoptics-apm-go/v1/ao/internal/config"
"github.com/appoptics/appoptics-apm-go/v1/ao/internal/log"
"github.com/appoptics/appoptics-apm-... |
package state
import (
"crypto/rand"
"math/big"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/oasisprotocol/oasis-core/go/common/crypto/signature"
memorySigner "github.com/oasisprotocol/oasis-core/go/common/crypto/signature/signers/memory"
"github.com/oasisprotocol/oasis-core/go/common/q... |
// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
// 🤖 Github Repository: https://github.com/gofiber/fiber
// 📌 API Documentation: https://docs.gofiber.io
package lightning
import (
"fmt"
"github.com/ikidev/lightning/utils"
"sort"
"strconv"
"strings"
"sync/atomic"
"time"
"github.com/va... |
package cmd
import (
"crypto/tls"
"crypto/x509"
"fmt"
"github.com/micro-community/micro/v3/cmd/cli/util"
_ "github.com/micro-community/micro/v3/cmd/usage"
"github.com/micro-community/micro/v3/plugin"
"github.com/micro-community/micro/v3/profile"
"github.com/micro-community/micro/v3/service/auth"
"github.com/m... |
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
/*
* Copyright (c) 2017, MegaEase
* 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 ap... |
package logx
import (
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"path"
"runtime"
"runtime/debug"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/tal-tech/go-zero/core/iox"
"github.com/tal-tech/go-zero/core/sysx"
"github.com/tal-tech/go-zero/core/timex"
)
const (
// Inf... |
/*
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 prago
import (
"fmt"
"time"
)
var (
messages *messagesStruct = &messagesStruct{m}
fallbackLanguage = "en"
)
type messagesStruct struct {
m map[string]map[string]string
}
func (*messagesStruct) ItemsCount(i int64, locale string) (ret string) {
if locale == "cs" {
return itemsC... |
package internal
import (
"fmt"
"os"
"os/user"
"runtime"
"strings"
"github.com/wal-g/wal-g/internal/webserver"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/wal-g/storages/storage"
"github.com/wal-g/tracelog"
)
const (
DownloadConcurrencySetting = "WALG_DOWNLOAD... |
package sparta
import (
"archive/zip"
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"os/exec"
"regexp"
"runtime"
"strings"
"text/template"
"github.com/Sirupsen/logrus"
spartaIAM "github.com/mweagle/Sparta/aws/iam"
"github.com/mweagle/cloudformationresources"
gocf "github.com/mweagle/go-cloudformation"
)
... |
// Copyright 2020 CUE 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 ... |
// 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 The KubeSphere 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 server
import (
"bufio"
"fmt"
"io"
"net"
"regexp"
"strconv"
"strings"
"sync"
"time"
"github.com/google/uuid"
log "github.com/sirupsen/logrus"
"github.com/tehcyx/girc/internal/config"
"github.com/tehcyx/girc/pkg/version"
)
type Server struct {
Clients []Client
ClientsMutex *sync.Mutex
Ro... |
/*
* Copyright 2021 American Express
*
* 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.18.1
// source: proto/registration/registration.proto
package registration
import (
common "github.com/opencars/grpc/pkg/common"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "goo... |
package tools
import (
"bytes"
"fmt"
"go/format"
"io/ioutil"
"path/filepath"
"regexp"
"strings"
"text/template"
"github.com/MarErm27/GoAdmin/modules/db/dialect"
"github.com/MarErm27/GoAdmin/modules/language"
"github.com/MarErm27/GoAdmin/modules/db"
"github.com/MarErm27/GoAdmin/modules/utils"
"github.com... |
// Copyright © 2019 <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 writin... |
package models
import (
"errors"
"fmt"
"strings"
"time"
"github.com/bwmarrin/discordgo"
"github.com/dgrijalva/jwt-go"
"github.com/sirupsen/logrus"
sharedmodels "github.com/zekroTJA/shinpuru/internal/models"
"github.com/zekroTJA/shinpuru/internal/services/backup/backupmodels"
"github.com/zekroTJ... |
// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
// 🤖 Github Repository: https://github.com/gofiber/fiber
// 📌 API Documentation: https://docs.gofiber.io
package utils
import (
"bytes"
"crypto/rand"
"encoding/binary"
"encoding/hex"
"fmt"
"log"
"os"
"path/filepath"
"reflect"
"runtime"... |
// Copyright 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 applicable... |
package ext4
import (
"bytes"
"encoding/binary"
"fmt"
"github.com/Sirupsen/logrus"
"io"
)
func (er *Reader) GetInode(n uint32) (inode Inode, err error) {
if n < 1 {
err = fmt.Errorf("inode number (n) should be 1-based and positive")
}
n--
bg := n / er.super.InodesPerGroup
index := n % er.super.InodesPerGr... |
// Copyright 2010 The win Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build windows
package uxtheme
// TMT property ids
const (
TMT_RESERVEDLOW = 0
TMT_RESERVEDHIGH = 7999
TMT_DIBDATA = 2
TMT_GLYPHDIBD... |
package tracker
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"math"
"math/rand"
"net/http"
"strconv"
"sync"
"sync/atomic"
"syscall"
"time"
"github.com/pkg/errors"
"github.com/spf13/viper"
customv1 "github.com/wish/kubetel/gok8s/apis/custom/v1"
informer "github.com/wish/kubetel/gok8s/client/infor... |
/*
Copyright 2021.
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 un... |
// Copyright (c) 2015-2021 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 collect
import (
"errors"
"fmt"
"os"
"runtime"
"sort"
"sync"
"time"
lru "github.com/hashicorp/golang-lru"
"github.com/honeycombio/refinery/collect/cache"
"github.com/honeycombio/refinery/config"
"github.com/honeycombio/refinery/logger"
"github.com/honeycombio/refinery/metrics"
"github.com/honeyco... |
// Package commands provides the set of CLI commands used to communicate with the AIS cluster.
// This file handles cluster and daemon operations.
/*
* Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
*/
package commands
import (
"context"
"fmt"
"net/http"
"sort"
"strconv"
"strings"
"text/tab... |
// Copyright 2017 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 controllers
import (
"database/sql"
"encoding/json"
"fmt"
"github.com/astaxie/beego"
"github.com/gorilla/websocket"
"log"
"net/http"
"strings"
"time"
)
type WebSocket struct {
beego.Controller
}
var (
Dbhost = beego.AppConfig.String("dbhost")
Dbport = beego.AppConfig.String("dbport"... |
package main
import (
"errors"
"flag"
"fmt"
"log"
"math/rand"
"net"
"os"
"strings"
"time"
"./conf"
zk "github.com/samuel/go-zookeeper/zk"
)
const (
activeHex string = "\x00\x00\x00\x4c\x1a\x08\x02\x10\x00\x18\x05\x22\x10\x43\x32\x79\x7b\xde\x66\x40\xe9\x8e\x96\xa6\x57\x70\xc4\x46\x94\x28\x01\x30\x12\x06... |
//go:build go1.16
// +build go1.16
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the cod... |
package main
import (
"encoding/json"
"fmt"
"net"
"sync"
"time"
"github.com/alienth/go-fastly"
"github.com/juju/ratelimit"
)
type rateBucket struct {
ratelimit.Bucket
lastUsed time.Time
}
type ipRate struct {
ip *net.IP
buckets map[Dimension]*rateBucket
// Used to signal
limited bool
sho... |
package socksTap
import (
"errors"
"fmt"
"goSocksTap/comm"
"goSocksTap/comm/dot"
"goSocksTap/comm/netstat"
"goSocksTap/comm/socks"
"goSocksTap/comm/tun"
"goSocksTap/comm/tun2socks"
"goSocksTap/winDivert"
"io"
"log"
"net"
"runtime"
"strconv"
"strings"
"sync"
"time"
"github.com/miekg/dns"
"github.com... |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
// Copyright 2022 <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 wri... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cs3/tx/v1beta1/resources.proto
package txv1beta1
import (
fmt "fmt"
v1beta11 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
v1beta1 "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
v1beta12 "github.com/cs3org/go-cs3apis/cs3/types/v1b... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.13.0
// source: healthcheck/v1/healthcheck.proto
package healthcheckv1
import (
context "context"
proto "github.com/golang/protobuf/proto"
_ "github.com/lyft/clutch/backend/api/api/v1"
_ "google.golang.org... |
// Copyright 2015 The Chromium 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 mojom
import (
"fmt"
"mojom/mojom_parser/lexer"
"strings"
)
/*
This file contains data structures and functions used to describe scopes. A sc... |
package editor
import (
"fmt"
"image"
"image/color"
"image/draw"
"path/filepath"
"strings"
"github.com/uzudil/bscript/bscript"
"github.com/go-gl/glfw/v3.3/glfw"
"github.com/uzudil/isongn/gfx"
"github.com/uzudil/isongn/shapes"
"github.com/uzudil/isongn/util"
"github.com/uzudil/isongn/world"
)
type Editor... |
// Copyright 2020 MatrixOrigin.
//
// 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... |
// Copyright 2017 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... |
/*
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 genproto
// p3c.SetProjectRootGopkg("example.com/main")
import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"reflect"
"strings"
"time"
"github.com/tendermint/go-amino-x"
"github.com/tendermint/go-amino-x/pkg"
)
// TODO sort
// * Proto3 import file paths are by def... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.