text stringlengths 5.51k 28.1k |
|---|
package gcs
import (
"bufio"
"encoding/json"
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"syscall"
"time"
"github.com/Microsoft/opengcs/service/gcs/oslayer"
"github.com/Microsoft/opengcs/service/gcs/prot"
"github.com/Microsoft/opengcs/service/gcs/transport"
oci "github.com/opencontainers/runtime-spec/... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: voltha_protos/adapter.proto
package voltha
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
common "github.com/opencord/voltha-protos/v3/go/co... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc (unknown)
// source: aserto/api/v2/user.proto
package api
import (
v1 "github.com/aserto-dev/go-grpc/aserto/api/v1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/p... |
package main
import (
"context"
"crypto/ecdsa"
"encoding/hex"
"flag"
"fmt"
"math/big"
"os"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/smartcontractkit/chainlin... |
package main
import (
"errors"
"expvar"
"fmt"
"net/http"
"strconv"
"strings"
"sync"
"time"
"github.com/cedrickchee/skel/internal/data"
"github.com/cedrickchee/skel/internal/validator"
"github.com/felixge/httpsnoop"
"github.com/tomasen/realip"
"golang.org/x/time/rate"
)
func (app *application) recoverPan... |
// Copyright (c) The Thanos Authors.
// Licensed under the Apache License 2.0.
package storecache
import (
"context"
"encoding/binary"
"fmt"
"io"
"io/ioutil"
"regexp"
"sync"
"time"
"github.com/go-kit/kit/log"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/... |
/*
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 logger
import (
"bufio"
"bytes"
"fmt"
"io"
"os"
"os/exec"
"os/signal"
"strings"
"sync"
"syscall"
"text/template"
"time"
"github.com/DataDog/datadog-go/statsd"
"github.com/getsentry/sentry-go"
encjson "encoding/json"
"github.com/stripe/unilog/clevels"
"github.com/stripe/unilog/json"
"github... |
package main
import (
"crypto/md5"
"encoding/hex"
"errors"
"flag"
"fmt"
"html/template"
"io"
"net/http"
"os"
"os/exec"
"regexp"
"strconv"
"strings"
"time"
dstore "github.com/superryanguo/postDataWebGo/datastore"
log "github.com/sirupsen/logrus"
)
//TODO:
//1. use the trace log level to avoid the too... |
// Copyright 2021 The Swarm 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 node defines the concept of a Bee node
// by bootstrapping and injecting all necessary
// dependencies.
package node
import (
"context"
"crypto... |
// Copyright 2019 The LevelDB-Go and Pebble Authors. All rights reserved. Use
// of this source code is governed by a BSD-style license that can be found in
// the LICENSE file.
package pebble
import (
"fmt"
"sort"
"sync/atomic"
"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/intern... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.15.8
// source: biconom/bot/currency/v1/currency.proto
package service_bot_currency_pb
import (
currency "github.com/biconom/go-genproto/biconom/type/currency"
sort "github.com/biconom/go-genproto/biconom/ty... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: daemon/service/pb/online_push.proto
package pb
import (
pb "github.com/elap5e/penguin/daemon/message/pb"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.gola... |
/*
* Copyright 2017-2019 Kopano and its licensors
*
* 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 crane
import (
"fmt"
"os"
"sort"
"strings"
"github.com/alecthomas/kingpin"
)
var cfg Config
var allowed []string
var defaultFiles = []string{"docker-compose.yml", "docker-compose.override.yml", "crane.yml", "crane.override.yml"}
var (
app = kingpin.New("crane", "Lift containers with ease - ht... |
// This file is subject to a 1-clause BSD license.
// Its contents can be found in the enclosed LICENSE file.
// Package proto defines convenience functions for IRC protocol requests.
package proto
import (
"fmt"
"io"
"strings"
"github.com/monkeybird/autimaat/irc"
)
// ref: https://en.wikipedia.org/wiki/List_of... |
// The client package helps developers connect to Gearmand, send
// jobs and fetch result.
package client
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"io"
"net"
"strings"
"sync"
"sync/atomic"
"time"
"unsafe"
rt "github.com/quantcast/g2/pkg/runtime"
)
var (
DefaultTimeout time.Duration = time.Secon... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package golang
import (
"archive/tar"
"bytes"
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"regexp"
"runtime"
"sort"
"strings"
pb "github.com/hyperledger/fabric-protos-go/peer"
"github.... |
package opendota
import (
"net/http"
"strconv"
"github.com/dghubble/sling"
)
func newMatchService(sling *sling.Sling) *MatchService {
return &MatchService{
sling: sling.Path("matches/"),
}
}
// MatchService provides a method for accessing information about matches.
type MatchService struct {
sling *sling.Sl... |
/*
* Copyright (C) 2020 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
package hostfetcher
import (
"context"
"github.com/intel-secl/intel-secl/v3/pkg/hvs/domain/models/taskstage"
"reflect"
"sync"
"time"
"github.com/intel-secl/intel-secl/v3/pkg/hvs/domain/models"
"github.com/intel-secl/intel-... |
// Copyright (C) 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 agreed t... |
package mint
import (
"crypto/cipher"
"fmt"
"io"
"sync"
)
const (
sequenceNumberLen = 8 // sequence number length
recordHeaderLenTLS = 5 // record header length (TLS)
recordHeaderLenDTLS = 13 // record header length (DTLS)
maxFragmentLen = 1 << 14 // max number of bytes in a record
)
... |
package app
import (
"cloud/sql"
"cloud/util"
"cloud/models/app"
"cloud/controllers/base/cluster"
"strings"
"encoding/json"
"cloud/controllers/ent"
"cloud/controllers/base/quota"
"github.com/astaxie/beego/logs"
"fmt"
"cloud/k8s"
"strconv"
"time"
)
// 模板管理入口页面
// @router /application/template/list [get]
f... |
/*
Copyright 2014 Workiva, 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 writing, software
distr... |
package cmd
import (
"fmt"
"github.com/fatih/color"
"os"
"path"
"path/filepath"
"regexp"
"sort"
"strings"
"github.com/jaeles-project/jaeles/core"
"github.com/jaeles-project/jaeles/database"
"github.com/jaeles-project/jaeles/libs"
"github.com/jaeles-project/jaeles/utils"
"github.com/spf13/cobra"
)
func i... |
package utreexo
import (
"fmt"
)
/*
The transform operations can probably be moved into a different package even.
They're some of the tricky parts of utreexo, on how to rearrange the forest nodes
when deletions occur.
*/
/*
idea for transform
get rid of stash, and use swaps instead.
Where you would encounter stashi... |
// +build ignore
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"os/exec"
"path"
"path/filepath"
"runtime"
"strings"
"sync"
"time"
)
var (
flagParallel = flag.Int("parallel", runtime.NumCPU(), "number of commands to run in parallel")
flagBinary = flag.... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api/discovery.proto
package api
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf5 "github.com/golang/protobuf/ptypes/any"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)... |
package j8a
import (
"context"
"crypto/ecdsa"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"errors"
"fmt"
"github.com/google/uuid"
"github.com/itchyny/gojq"
"github.com/lestrrat-go/jwx/jwa"
"github.com/lestrrat-go/jwx/jwk"
"github.com/rs/zerolog/log"
"golang.org/x/sync/semaphore"
"strconv"
"strings"
"time... |
//
// Copyright (c) 2020 <NAME> <<EMAIL>>
//
package cbddlp
import (
"fmt"
"image"
"io/ioutil"
"sort"
"time"
"encoding/binary"
"github.com/go-restruct/restruct"
"github.com/spf13/pflag"
"github.com/nicarran/uv3dp"
)
const (
defaultHeaderMagic = uint32(0x12fd0019)
defaultBottomLiftHeight = 5.0
default... |
package bindings
import (
"github.com/ARGOeu/argo-api-authn/stores"
"github.com/stretchr/testify/suite"
"testing"
)
type BindingTestSuite struct {
suite.Suite
}
func (suite *BindingTestSuite) TestCreateBinding() {
mockstore := &stores.Mockstore{Server: "localhost", Database: "test_db"}
mockstore.SetUp()
// ... |
// Package ais provides core functionality for the AIStore object storage.
/*
* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
*/
package ais
import (
"fmt"
"net/http"
"net/url"
"os"
"path/filepath"
"sync/atomic"
"time"
"github.com/NVIDIA/aistore/3rdparty/glog"
"github.com/NVIDIA/aistore/clus... |
package api
import (
"bytes"
"compress/gzip"
"context"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"runtime"
"time"
muxcontext "github.com/gorilla/context"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
"github.com/ovh/cds/engine/api/auth"
"github.com/ovh/cds/sdk"
"github.com/ovh/cds/sdk/cdscl... |
/*
* (c) 2016-2018 Adobe. All rights reserved.
* This file is licensed 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/licenses/LICENSE-2.0
*
* Unless required by applic... |
package gossiper
/*
This file is not used in the project
*/
import (
"encoding/hex"
"fmt"
"math"
"strings"
"time"
"github.com/TRUMANCFY/DSEProject/Peerster/message"
"github.com/TRUMANCFY/DSEProject/Peerster/routing"
)
func (g *Gossiper) HandleTLCMessage(wrapped_pkt *message.PacketIncome) {
/* Step 1. Update... |
// 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 tipselect
import (
"bytes"
"errors"
"fmt"
"time"
"go.uber.org/atomic"
"github.com/iotaledger/hive.go/events"
"github.com/iotaledger/hive.go/syncutils"
"github.com/gohornet/hornet/pkg/dag"
"github.com/gohornet/hornet/pkg/metrics"
"github.com/gohornet/hornet/pkg/model/hornet"
"github.com/gohornet/h... |
package main
import (
"github.com/brutella/hc"
"github.com/brutella/hc/log"
"github.com/brutella/hc/accessory"
"time"
"fmt"
"net"
"net/http"
"os"
"io/ioutil"
"bytes"
//"strconv"
"encoding/json"
)
var arduinoURL string = "http://192.168.0.44"
const ( //Door & GaradeDoor
PositionStateDecreasing int =... |
package spider
import (
"errors"
"io/ioutil"
"log"
"net/http"
"strconv"
"strings"
"time"
"github.com/mineralres/goshare/pkg/util"
pb "github.com/mineralres/protos/src/go/goshare"
)
// Sina sina
type Sina struct {
}
// BatchGetSSEStockOptionTick 取所有行情
func (sina *Sina) BatchGetSSEStockOptionTick(symbols []s... |
package main
import (
"bufio"
"fmt"
"html/template"
"os"
"path"
"path/filepath"
"regexp"
"sort"
"strings"
"time"
"github.com/BurntSushi/toml"
blackfriday "github.com/russross/blackfriday/v2"
"github.com/srackham/go-rimu/v11/rimu"
yaml "gopkg.in/yaml.v3"
)
type document struct {
site *site // ... |
// Copyright 2020-2021 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package authorizationcode
import (
"context"
stderrors "errors"
"fmt"
"time"
"github.com/ory/fosite"
"github.com/ory/fosite/handler/oauth2"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors... |
// Copyright 2015 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 applicabl... |
package filesystem
import (
"fmt"
"io"
"github.com/buildbarn/bb-storage/pkg/blockdevice"
"github.com/buildbarn/bb-storage/pkg/filesystem"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
type blockDeviceBackedFilePool struct {
blockDevice blockdevice.ReadWriterAt
sectorAllocator SectorAl... |
package filecoin
import (
"bytes"
"encoding/json"
"fmt"
"math/big"
"sort"
"strings"
"time"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
big2 "github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoi... |
/*
* Copyright 2018 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 ... |
package azuredevops
import (
"context"
"fmt"
"net/http"
"net/url"
)
// VersionControlChangeType enum declaration
type VersionControlChangeType int
// VersionControlChangeType valid enum values
const (
None VersionControlChangeType = iota
Add
Edit
Encoding
Rename
Delete
Undelete
Branch
Merge
Lock
Rollb... |
// Copyright 2019 The Hugo 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 by applicable ... |
// Copyright 2019 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 check
import (
"fmt"
"go/ast"
"go/token"
"regexp"
"strconv"
"strings"
"golang.org/x/tools/go/ast/astutil"
)
// countVerbs returns the... |
package tetra3d
import (
"fmt"
"log"
"math"
"github.com/hajimehoshi/ebiten/v2"
"github.com/kvartborg/vector"
)
// Dimensions represents the minimum and maximum spatial dimensions of a Mesh arranged in a 2-space Vector slice.
type Dimensions []vector.Vector
// MaxDimension returns the maximum value from all of ... |
package esi
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/eveisesi/athena/internal/cache"
"github.com/eveisesi/athena/internal/etag"
"github.com/newrelic/go-agent/v3/newrelic"
"github.com/pkg/errors"
)
const (
// ESI Timestamp Format
ESI_EXPIR... |
package channelserver
import (
"fmt"
"io"
"io/ioutil"
"math/rand"
"os"
"path/filepath"
"github.com/Andoryuuta/Erupe/network/mhfpacket"
"github.com/Andoryuuta/Erupe/server/channelserver/compression/deltacomp"
"github.com/Andoryuuta/Erupe/server/channelserver/compression/nullcomp"
"github.com/Andoryuuta/bytef... |
// Command uni prints Unicode information about characters.
package main // import "arp242.net/uni"
import (
"errors"
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"strconv"
"strings"
"unicode"
"unicode/utf8"
"arp242.net/uni/isatty"
"arp242.net/uni/unidata"
)
var (
errNoMatches = errors.New("no matches")
)
var (
... |
// Copyright 2016 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 agr... |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
package utp
import (
"math"
"net"
"sync"
"sync/atomic"
"syscall"
"time"
)
// Conn is an implementation of the Conn interface for UTP network
// connections.
type Conn struct {
conn *baseConn
raddr net.Addr
rid, sid, seq, ack, lastAck uint16
rtt, rttVar, minRtt, r... |
package backend
import (
"fmt"
"testing"
"time"
"github.com/fastock/fastock-chain/x/backend/cases"
"github.com/fastock/fastock-chain/x/backend/config"
"github.com/fastock/fastock-chain/x/backend/orm"
"github.com/fastock/fastock-chain/x/dex"
orderTypes "github.com/fastock/fastock-chain/x/order/types"
sdk "gi... |
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not... |
// Copyright (C) 2015 NTT Innovation Institute, 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 applicabl... |
// Copyright (C) 2020 <NAME>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/wasm/v2alpha/wasm.proto
package envoy_config_wasm_v2alpha
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
... |
//
// templates.go
// template model interfaces
//
package srnd
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"path/filepath"
"sort"
"strings"
"sync"
)
type templateEngine struct {
// loaded templates
templates map[string]string
// root directory for templates
template_dir string
// ... |
// robustsession represents a RobustIRC session and handles all communication
// to the RobustIRC network.
package robustsession
import (
"bytes"
"crypto/tls"
"crypto/x509"
"encoding/json"
"errors"
"fmt"
"hash/fnv"
"io/ioutil"
"log"
"math"
"math/rand"
"net"
"net/http"
"net/url"
"strings"
"sync"
"time"... |
package nject
import (
"fmt"
)
type includeWorkingData struct {
usesDetail map[flowType]map[typeCode][]*provider
uses []*provider
usesError map[flowType]map[typeCode]error
usedBy []*provider
usedByDetail map[flowType]map[typeCode][]*provider
mustConsumeFlow map[flowType]bool
... |
package main
import (
"encoding/hex"
"flag"
"fmt"
"math/rand"
"os"
"path"
"runtime"
"time"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log"
"github.com/harmony-one/bls/ffi/go/bls"
"github.com/harmony-one/harmony/accounts"
"github.com/harmony-one/harmony/accounts/keystore"
"g... |
package wallet
import (
"bytes"
"crypto/hmac"
"crypto/sha512"
"errors"
"fmt"
"github.com/thanhn-inc/debugtool/common"
"github.com/thanhn-inc/debugtool/common/base58"
"github.com/thanhn-inc/debugtool/incognitokey"
"github.com/thanhn-inc/debugtool/privacy/operation"
)
// burnAddress1BytesDecode is a decoded by... |
/*
Copyright (c) 2021 - Present. Blend Labs, Inc. All rights reserved
Use of this source code is governed by a MIT license that can be found in the LICENSE file.
*/
package grpcutil
import (
"context"
"encoding/base64"
"fmt"
"io"
"strings"
"sync"
"time"
"google.golang.org/grpc"
"google.golang.org/grpc/cod... |
//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... |
// Copyright 2018 The Go Cloud Development Kit 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... |
package main
import (
"bufio"
"errors"
"fmt"
"log"
"os"
"strconv"
"strings"
"syscall"
"time"
"github.com/hashicorp/hcl/v2/hclsimple"
"gorm.io/gorm"
. "github.com/GregoryUnderscore/Mining-Automation-Shared/database"
. "github.com/GregoryUnderscore/Mining-Automation-Shared/models"
. "github.com/GregoryUn... |
package telegram
import (
"context"
"errors"
"fmt"
"io"
"runtime/debug"
"strings"
"sync"
"time"
"github.com/cenkalti/backoff/v4"
"go.uber.org/atomic"
"go.uber.org/multierr"
"go.uber.org/zap"
"golang.org/x/xerrors"
"github.com/gotd/td/bin"
"github.com/gotd/td/clock"
"github.com/gotd/td/internal/crypto... |
/*
* Copyright (C) 2021 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
package commands
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"encoding/base64"
"encoding/binary"
"encoding/json"
"encoding/pem"
"encoding/xml"
"fmt"
"io"
"io/ioutil"
"math/big"... |
package main
import (
"context"
"reflect"
plogger "github.com/heytribe/go-plogger"
"github.com/heytribe/live-webrtcsignaling/rtcp"
"github.com/heytribe/live-webrtcsignaling/srtp"
)
/*
* FIXME: refactor
* we should avoid inter-locking by tearing up multiple goroutines.
*
* Pipeline publisher:
* cUdp => nod... |
// Code generated from ../nordic/s140/headers/nrf_soc.h; DO NOT EDIT.
package nrf
import (
"github.com/embeddedgo/nrf5/p/irq"
"unsafe"
)
const SOC_SVC_BASE = (0x20) // Base value for SVCs that are available when the SoftDevice is disabled.
const SOC_SVC_BASE_NOT_AVAILABLE = (0x2C) // Base value for S... |
/*
* Copyright [2020] <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 ... |
package main
import (
"encoding/json"
"flag"
"fmt"
"os"
"sort"
"strings"
"go/build"
"path/filepath"
"path"
)
func prettyPrintJSON(j interface{}) {
e := json.NewEncoder(os.Stdout)
e.SetIndent("", " ")
e.Encode(j)
}
func main() {
flag.Usage = func() {
fmt.Println(` Scans the imports from all Go packa... |
package cmd
import (
"encoding/binary"
"errors"
"fmt"
"github.com/spf13/cobra"
"io"
"io/ioutil"
"net/http"
"os"
"os/exec"
"path"
"strconv"
"strings"
"time"
"unicode/utf8"
"unsafe"
)
var (
ErrFormat = errors.New("zip: not a valid zip file")
ErrAlgorithm = errors.New("zip: unsupported compression al... |
// Copyright © 2022 Meroxa, 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 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.11.4
// source: health/health.proto
package health
import (
context "context"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
codes "... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: update.proto
package collector
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
inspection "github.com/easyopsapis/easyops-api-go/protorepo-models/easyops/model... |
package semver
import (
"fmt"
"sort"
"strings"
)
type rangeConstraint struct {
min, max Version
includeMin, includeMax bool
excl []Version
}
func (rc rangeConstraint) Matches(v Version) error {
var fail bool
ispre := v.Prerelease() != ""
rce := RangeMatchFa... |
// Copyright 2022 The prometheus-operator 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 ... |
// +build linux
package packet
import (
"errors"
"net"
"os"
"runtime"
"sync"
"sync/atomic"
"syscall"
"unsafe"
"golang.org/x/net/bpf"
"golang.org/x/sys/unix"
)
type handle struct {
fd int // read file descriptor
breakLoopfd int // break loop file desciptor
headerVersion int
pollTimeout i... |
package integration
import (
"fmt"
"math"
"strings"
set "github.com/deckarep/golang-set"
"github.com/golang/glog"
. "github.com/onsi/ginkgo"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
apiextclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1"
"k8s.i... |
package main
import (
"encoding/gob"
"fmt"
"github.com/banthar/Go-SDL/mixer"
"io/ioutil"
"krkrparser"
"os"
"strings"
"time"
)
type sel struct {
text string
target string
}
type config struct {
File string
Sceneid string
Scene string
SceneEnd string
MsgSwitch bool
Line int
VocCach... |
package main
import (
"fmt"
"github.com/marcusthierfelder/mpi"
"log"
"math"
_ "os"
)
var (
eps float64 = 1e-10
)
func compGridSize(nijk [3]int, nxyz [3]int) ([][]int, float64) {
// compute splitting in each direction
nx := make([]int, nijk[0])
sum := 0
for i := 0; i < nijk[0]-1; i++ {
nx[i] = nxyz[0] /... |
package goutil_test
import (
"net"
"net/url"
"regexp"
"testing"
"time"
"github.com/marrbor/goutil"
"github.com/stretchr/testify/assert"
)
type testData struct {
input interface{}
expect interface{}
}
func TestJST(t *testing.T) {
jst := goutil.JST()
assert.EqualValues(t, "Asia/Tokyo", jst.String())
}
fu... |
package main
import evdev "github.com/gvalkov/golang-evdev"
const KEY_MAX = evdev.KEY_MICMUTE
var ecodes = map[string]int{
"KEY_RESERVED": evdev.KEY_RESERVED,
"KEY_ESC": evdev.KEY_ESC,
"KEY_1": evdev.KEY_1,
"KEY_2": evdev.KEY_2,
"KEY_3": evdev.KE... |
package kayak
import (
"crypto/rand"
"errors"
"fmt"
"log"
"sync"
)
type Client struct {
sync.Mutex
key KAddress
serverKeys []KAddress
n, f, q uint
time KTime
timeout KTime
bonjourT KTime
nextBonjour KTime
lastKnownIndex KIndex
hasFreshIndex bool
isBonjou... |
// Copyright (c) 2020 Blockwatch Data Inc.
// Author: <EMAIL>
package server
import (
"encoding/json"
"fmt"
"io"
"net/http"
"strconv"
"time"
"blockwatch.cc/packdb/encoding/csv"
"blockwatch.cc/packdb/pack"
"blockwatch.cc/packdb/util"
"blockwatch.cc/tzindex/chain"
"blockwatch.cc/tzindex/etl/model"
)
var (
... |
/*
* Copyright © 2018-2019 private, Darmstadt, Germany and/or its licensors
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.... |
// Package edgeos provides methods and structures to retrieve, parse and render EdgeOS configuration data and files.
package edgeos
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"os"
"os/exec"
"sort"
"strings"
"sync"
"github.com/britannic/blacklist/internal/regx"
)
// tree is a map of top node Objects
type... |
package main
import (
"encoding/json"
"fmt"
"github.com/MatrixAINetwork/go-matrix/base58"
"github.com/MatrixAINetwork/go-matrix/common"
"github.com/MatrixAINetwork/go-matrix/core"
"github.com/MatrixAINetwork/go-matrix/log"
"math/big"
"os"
"path/filepath"
"reflect"
"testing"
)
type TestStruct1 struct {
T1 ... |
/*
MIT License
Copyright (c) 2017 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distrib... |
// +build testsiris
package siris
import (
stdContext "context"
"crypto/tls"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"path"
"path/filepath"
"strconv"
"strings"
"sync"
"syscall"
"testing"
"time"
"gopkg.in/gavv/httpexpect.v1"
"github.com/go-siris/siris/cache"
"github.com/go-siris/siris/context"
"gi... |
package odoo
import (
"fmt"
)
// ResUsers represents res.users model.
type ResUsers struct {
LastUpdate *Time `xmlrpc:"__last_update,omptempty"`
ActionId *Many2One `xmlrpc:"action_id,omptempty"`
Active *Bool `xmlrpc:"active,omptempty"`
Act... |
package jotto
import (
"context"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"math"
"net"
"net/http"
"os"
"runtime/debug"
"sync"
"time"
"github.com/go-redis/redis"
"github.com/gorilla/mux"
"git.garena.com/duanzy/motto/hotline"
"github.com/golang/protobuf/proto"
)
// Runner defines the logic of ho... |
package cart
import (
"errors"
"go2o/core/domain/interface/cart"
"go2o/core/domain/interface/item"
"go2o/core/domain/interface/member"
"go2o/core/domain/interface/merchant/shop"
"go2o/core/infrastructure/domain"
"time"
)
var _ cart.ICart = new(cartImpl)
type cartImpl struct {
value *cart.NormalCart
rep... |
// MIT License
// Copyright (c) 2020 <NAME>
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, p... |
package models
import (
"fmt"
"sync"
"time"
"cloud.google.com/go/civil"
"github.com/SSHZ-ORG/tree-diagram/models/cache"
"github.com/SSHZ-ORG/tree-diagram/pb"
"github.com/pkg/errors"
"github.com/qedus/nds"
"github.com/scylladb/go-set/strset"
"golang.org/x/net/context"
"google.golang.org/appengine"
"google.... |
package gokuu
import (
"context"
"errors"
"fmt"
"net/http"
"sort"
"sync"
"time"
"github.com/robotomize/gokuu/label"
"github.com/robotomize/gokuu/provider"
"github.com/robotomize/gokuu/provider/cae"
"github.com/robotomize/gokuu/provider/ecb"
"github.com/robotomize/gokuu/provider/rcb"
"github.com/sethvargo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.