text stringlengths 5.51k 28.1k |
|---|
package games
import (
"fmt"
"os"
"os/exec"
"path"
"path/filepath"
"regexp"
"runtime"
"sort"
"strconv"
"strings"
"time"
"github.com/zmnpl/twad/base"
"github.com/zmnpl/twad/helper"
"github.com/zmnpl/twad/ports"
st "github.com/zmnpl/twad/ports/savesStats"
)
// Game represents one game configuration
type... |
package main
import (
"encoding/xml"
"github.com/gnewton/pubmedstruct"
"io"
"log"
"path/filepath"
"strconv"
"sync"
"time"
)
// <PublicationType UI="D016441">Retracted Publication</PublicationType> - pubmed20n1300.xml
const RetractedMesh1 = "D016440"
// <PublicationType UI="D016440">Retraction of Publication<... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/geo_target_constant.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
wrappers "github.com/catper/protobuf/ptypes/wrappers"
enums "google.golang.org/genproto/googleapis/ads... |
package logic
import (
"encoding/json"
"fmt"
"go.uber.org/zap"
"math/rand"
"slgserver/log"
"slgserver/server/slgserver/global"
"slgserver/server/slgserver/logic/mgr"
"slgserver/server/slgserver/model"
"slgserver/server/slgserver/proto"
"slgserver/server/slgserver/static_conf"
"slgserver/server/slgserver/sta... |
package praefect
import (
"context"
"errors"
"fmt"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
"gitlab.com/gitlab-org/gitaly/internal/helper"
"gitlab.com/gitlab-org/gitaly/internal/middleware/metadatahandler"
"gitlab.com/gitlab-org/gitaly/internal/praefect/datastore"
... |
//===----------- dcrontab - distributed crontab written in go -------------===
//
// Copyright (c) 2018 <NAME>. 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
//
/... |
// Package cmd provides xo command-line application logic.
package cmd
import (
"bytes"
"context"
"errors"
"fmt"
"io/fs"
"io/ioutil"
"os"
"os/user"
"path/filepath"
"strings"
"github.com/kenshaw/snaker"
"github.com/spf13/cobra"
"github.com/xo/dburl"
"github.com/xo/dburl/passfile"
"github.com/xo/xo/loade... |
package filmstaden
import (
"context"
"fmt"
"time"
)
type SingleShow struct {
Time time.Time `json:"time"`
TimeUtc time.Time `json:"timeUtc"`
RemoteSystemAlias string `json:"remoteSystemAlias"`
RemoteEntityID string `json:"remoteEntityId"`
Movie struct {
NcgID ... |
package transaction
import (
"context"
"fmt"
"net"
"os"
"sync"
"time"
"github.com/Monibuca/plugin-gb28181/v3/sip"
"github.com/Monibuca/plugin-gb28181/v3/transport"
"github.com/Monibuca/plugin-gb28181/v3/utils"
)
//Core: transactions manager
//管理所有 transactions,以及相关全局参数、运行状态机
type Core struct {
ctx ... |
package main
import (
"context"
"encoding/json"
"fmt"
"net/http"
"runtime/debug"
"strconv"
"strings"
"time"
"github.com/gorilla/mux"
"github.com/pkg/errors"
"golang.org/x/oauth2"
"github.com/mattermost/mattermost-plugin-api/experimental/bot/logger"
"github.com/mattermost/mattermost-plugin-api/experiment... |
// Package language makes it easier to build plugins and natural-sounding
// responses. This package does the following four things:
//
// 1. Provides easy-to-use helpers for returning commonly used, randomized
// text such as greetings.
// 2. Normalizes varied user responses like "yup" or "nah" into something
// to be... |
package scout
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"math/rand"
"net"
"net/http"
"net/url"
"regexp"
"strings"
"time"
"github.com/google/uuid"
traceroute "github.com/phenixrizen/go-traceroute"
"github.com/sirupsen/logrus"
fastping "github.com/tatsushid/go-fastping"
)
// Duration is... |
package softwareupgrade
import (
"bytes"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path"
"strings"
"sync"
"time"
"golang.org/x/crypto/ssh"
)
// The SSHConfig-related functions rely on the presence of pkill and pgrep on the target system
// pgrep and pkill is assumed to be located in the environmental PATH
ty... |
package main
import (
"fmt"
"io/ioutil"
"math/rand"
"net/http"
"path/filepath"
"strings"
"sync"
"time"
"github.com/gorilla/mux"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/plugin"
)
// WantLevel defines how urgent a Player wants to play
type WantLevel int
cons... |
package statem
// statem: state marchins.
import (
"context"
"crypto/rand"
"fmt"
"runtime"
"sync/atomic"
"time"
"github.com/tkeel-io/core/pkg/constraint"
"github.com/tkeel-io/core/pkg/mapper"
)
const (
// statem type enumerates.
StateTypeBase = "sm-base"
StateDisposingIdle int32 = 0
StateDisposingSync... |
// Git wrapper for use on a local gitlab-cache machine.
//
// TODO: explain what this means such that the purpose of the program is clear
// to a first-time reader.
//
// This wrapper is intended to be called directly by SSH via the ForceCommand
// sshd_config directive that overloads whatever command was request... |
package forestbus
import (
"errors"
"log"
"sync"
"time"
)
// ErrTopicNotFound is returned when the given topic could not be found on the node.
var ErrMessageBatcherBufferFull = errors.New("The message batcher buffer is full.")
// ErrMessageBatcherClosed is returned when the message batcher has been closed and th... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1/model.proto
package automl
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/service/trace/v3/trace_service.proto
package envoy_service_trace_v3
import (
context "context"
fmt "fmt"
v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1"
_ "github.com/cncf/udpa/go/udpa/annotations"
v3 "github.com/envoyproxy... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/resources/campaign_bid_modifier.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
common "google.golang.org/genproto/googleapis/... |
/*
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... |
/*
This is an attempt to port the 'only' script from https://at.magma-soft.at/sw/blog/posts/The_Only_Way_For_SSH_Forced_Commands
The goal is to provide a way to control ssh access to a environnement with allowed/forbidden commands/arguments and replace.
*/
package main
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"log... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: contact.proto
package pb
import (
fmt "fmt"
math "math"
time "time"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = tim... |
// Copyright (c) 2016 <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, distri... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/overload/v2alpha/overload.proto
package v2alpha
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
_struct "github.com/golang/protobuf/ptypes/struct"
_ "github.com/lyft/protoc-g... |
/*
Copyright 2021 Adevinta
*/
package cdc
import (
"sync"
"time"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/adevinta/vulcan-api/pkg/api"
"github.com/adevinta/vulcan-api/pkg/saml"
)
const (
// default advisory lock ID so we can handle sync across instances.
defLockID uint32 = ... |
package gbus
import (
"context"
"database/sql"
"fmt"
"math/rand"
"runtime/debug"
"sync"
"time"
"github.com/wework/grabbit/gbus/metrics"
"emperror.dev/errors"
logrushandler "emperror.dev/handler/logrus"
"github.com/Rican7/retry"
"github.com/Rican7/retry/backoff"
"github.com/Rican7/retry/jitter"
"github.... |
package main
import (
"encoding/json"
"fmt"
"net/url"
"os"
"regexp"
"sort"
"strings"
"time"
"unsafe"
"github.com/go-resty/resty"
"github.com/liyu4/tablewriter"
"github.com/tidwall/gjson"
)
type AirportParams struct {
ACity string `json:"acity"`
ACityName string `json:"acityname"`
Date string ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: yandex/cloud/mdb/postgresql/v1/resource_preset_service.proto
package postgresql // import "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/postgresql/v1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "githu... |
/* -*- coding: utf-8 -*-
* ------------------------------------------------------------------------------
*
* Copyright 2018-2019 Fetch.AI Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the... |
// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0.
package conn
import (
"bytes"
"context"
"crypto/tls"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/backup"
"github.com/pingcap/kvp... |
// Copyright ©2015 The Gonum 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 testlapack
import (
"fmt"
"math"
"sort"
"testing"
"golang.org/x/exp/rand"
"gonum.org/v1/gonum/blas"
"gonum.org/v1/gonum/blas/blas64"
"gon... |
// Copyright 2015 The Cockroach 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 ag... |
/*
Copyright 2018 Gravitational, 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 writing, soft... |
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/golang/mock/sample (interfaces: Index,Embed,Embedded)
package mock_sample
import (
bufio "bufio"
bytes "bytes"
gomock "github.com/golang/mock/gomock"
imp1 "github.com/golang/mock/sample/imp1"
imp2 "github.com/golang/mock/sample/imp2"
imp3 "github.... |
// Copyright 2015 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... |
/*
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, ... |
package pkg
import (
"bufio"
"bytes"
"context"
"encoding/xml"
"errors"
"fmt"
"io"
"net/url"
"os"
"path/filepath"
"runtime/debug"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
"github.com/derailed/popeye/intern... |
/*
Copyright 2019 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 gatt
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"log"
"sync"
"time"
"github.com/wowotech/gatt/xpc"
)
const (
peripheralDiscovered = 37
peripheralConnected = 38
peripheralDisconnected = 40
// below constants for Yosemite
rssiRead = 55
includedServicesDiscovered = 63... |
package terraform
import (
"fmt"
"log"
"sort"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/terraform/addrs"
"github.com/hashicorp/terraform/configs/configschema"
"github.com/hashicorp/terraform/dag"
"github.com/hashicorp/terraform/lang"
)
// GraphNodeReferenceable must be implemented by any node that ... |
package instructions
import (
"fmt"
"github.com/zxh0/jvm.go/instructions/base"
. "github.com/zxh0/jvm.go/instructions/comparisons"
. "github.com/zxh0/jvm.go/instructions/constants"
. "github.com/zxh0/jvm.go/instructions/control"
. "github.com/zxh0/jvm.go/instructions/conversions"
. "github.com/zxh0/jvm.go/inst... |
// Code generated by protoc-gen-go-tag. DO NOT EDIT.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: example.proto
package pb
import (
_ "github.com/searKing/golang/tools/protoc-gen-go-tag/tag"
protoreflect "google.golang.org/protobuf/refl... |
/*
Copyright 2015 Home Office 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 or agreed to in ... |
// generated by xgen -- DO NOT EDIT
package user
import (
"bytes"
"gopkg.in/goyy/goyy.v0/data/entity"
"gopkg.in/goyy/goyy.v0/data/schema"
"gopkg.in/goyy/goyy.v0/util/jsons"
"gopkg.in/goyy/goyy.v0/util/strings"
)
var (
ENTITY = schema.TABLE("sys_user", "USER")
ENTITY_ID = ENTITY.PRIMARY("id"... |
package graphql_test
// This test takes a specification and runs GraphQL queries, comparing the output of the query to what is expected.
// To add a new test:
// 1. Add a new directory in the tests directory. Name it after the query/mutation you are testing.
// 2. Add a data.json file to the dir you created. The data ... |
// Package discovery provides a common interface for all providers and Match to
// transform source to destination URL.
// Run func starts event loop checking all providers and retrieving lists of rules.
// All lists combined into a merged one.
package discovery
import (
"context"
"fmt"
"net/http"
"regexp"
"sort"... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/enums/content_label_type.proto
package enums
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they are... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: config/service/temporal/v1/temporal.proto
package temporalv1
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
pr... |
// Copyright 2017-18 <NAME>. 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 ... |
// Copyright 2011 The Go Authors. All rights reserved.
// Copyright 2020 <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package des
func init() {
initFeistelBox()
}
// DES Feistel function. feistelBox must be initialized via
// in... |
package client
import "time"
// QMap ...
type QMap map[string]string
// User ...
type User struct {
Id int `json:"id,omitempty"`
Username string `json:"username,omitempty"`
State string `json:"state,omitempty"`
Email string `json:"email,omitempty"`
AvatarUrl strin... |
package cluster
//YUM相关命令存在阻塞 卡住等情况
//由于yum命令不支持并发 所以测试过程中 不要轻易打断上一次因为yum命令没有执行完而导致的kubeinstall时间过长
import (
//"kubeinstall/src/kubessh"
"kubeinstall/src/logdebug"
//"sync"
//"k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/util/errors"
//"errors"
//"entry/logdebug"
//"kubeinstall/src/backup"
//"fmt"
"... |
package cdn
// Copyright (c) Microsoft and contributors. 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 ... |
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
package main
import (
"crypto/rsa"
"crypto/x509"
"encoding/json"
"fmt"
"github.com/Azure/go-autorest/autorest"
"gith... |
// Copyright Amazon.com Inc. or its affiliates. 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. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file ... |
// 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.
// This file is based on http://code.google.com/p/codesearch/source/browse/index/regexp.go,
// modified to find strings instead of trigrams.
package main
imp... |
// +build linux_bpf
package ebpf
import (
"bytes"
"fmt"
"net"
"sync"
"sync/atomic"
"time"
"unsafe"
"github.com/DataDog/datadog-agent/pkg/util/log"
bpflib "github.com/iovisor/gobpf/elf"
)
type Tracer struct {
m *bpflib.Module
config *Config
state NetworkState
portMapping *PortMapping
loca... |
// Copyright 2018 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
package vault
import (
"encoding/json"
"sort"
"strings"
"time"
"github.com/armon/go-metrics"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/vault/helper/strutil"
"github.com/hashicorp/vault/logical"
)
// HandleRequest is used to handle a new incoming request
func (c *Core) HandleRequest(req *logi... |
/*
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... |
/**
* Author: Tony.Shao
* Email: <EMAIL>
* Github: github.com/xiocode
* File: rpn.go
* Description: https://gist.github.com/achun/5730664
*/
//ReversePolishnotation,RPN
//逆波兰表达式相关
//lexer 是一个中缀数学四则计算表达式词法解析器
package rpn
import (
"errors"
)
type Token int
func (p Token) String... |
/*
Copyright 2020 Gravitational, 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 writing, soft... |
package compose
import (
"context"
"errors"
"fmt"
"os"
"strings"
"github.com/spf13/cobra"
"github.com/mutagen-io/mutagen/cmd/mutagen/daemon"
"github.com/mutagen-io/mutagen/cmd/mutagen/forward"
"github.com/mutagen-io/mutagen/cmd/mutagen/sync"
"github.com/mutagen-io/mutagen/pkg/compose"
"github.com/mutagen... |
package main
import (
"fmt"
"io"
"math/rand"
"os"
"sort"
"time"
"github.com/kiteco/kiteco/kite-golib/licensing"
"github.com/kiteco/kiteco/kite-golib/pipeline/rundb"
"github.com/kiteco/kiteco/kite-golib/pipeline/aggregator"
"github.com/kiteco/kiteco/kite-golib/complete/data"
"github.com/kiteco/kiteco/ki... |
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License... |
package tasks
import (
"context"
"fmt"
"sort"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"yunion.io/x/pkg/util/netutils"
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/cloudcommon/db"
"yunion.io/x/onecloud/pkg/cloudcommon/db/taskman"
"yunion.io/x/onecloud/pkg... |
package expr
import (
"context"
"fmt"
"regexp"
"strconv"
"strings"
"sync"
"time"
"bosun.org/metadata"
"bosun.org/collect"
"bosun.org/slog"
"bosun.org/cmd/bosun/expr/parse"
"bosun.org/models"
"bosun.org/opentsdb"
"github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights"
"g... |
package book
import (
"encoding/csv"
"fmt"
"github.com/bluele/mecab-golang"
"github.com/garyburd/redigo/redis"
"github.com/qiniu/iconv"
"golang.org/x/text/unicode/norm"
"golang.org/x/text/width"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"io"
"io/ioutil"
"os"
"os/exec"
"path"
"reflect"
"regexp"
"sort"
... |
// Copyright (c) 2016 <NAME>
// 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 l... |
// MIT License
//
// Copyright (c) 2016 GenesisKernel
//
// 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, modif... |
package gateway
import (
"context"
"errors"
"fmt"
"math/rand"
"net/http"
"strconv"
"sync"
"time"
"github.com/andersfylling/disgord/internal/gateway/opcode"
"github.com/andersfylling/disgord/internal/util"
"github.com/andersfylling/disgord/internal/logger"
"go.uber.org/atomic"
)
type ClientType int
con... |
package pio
import (
"bufio"
"bytes"
"io"
"io/ioutil"
"strconv"
"sync"
"sync/atomic"
"github.com/kataras/pio/terminal"
)
type (
// Handler is the signature implemented by callers
// that want to be notified about the results
// that are being printed to the Printer's output.
//
// Look `Printer#Handle` ... |
package app
import (
"context"
"fmt"
"github.com/seehuhn/mt19937"
"github.com/alonp99/go-spacemesh/api/config"
"github.com/alonp99/go-spacemesh/common"
"github.com/alonp99/go-spacemesh/consensus"
"github.com/alonp99/go-spacemesh/crypto"
"github.com/alonp99/go-spacemesh/database"
"github.com/alonp99/go-spacem... |
// Copyright 2012 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... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
/*
Copyright 2019 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 eca
import (
"encoding/json"
"errors"
"fmt"
"strings"
"github.com/PRETgroup/goFB/iec61499"
)
//An EventTrace is a set of instantaneous EventTraceSteps
type EventTrace []EventTraceStep
//An EventTraceStep shows a possible instantaneous step in a given trace, based on the ECStateName, and saves the outpu... |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The AST package declares the types used to represent
// syntax trees for Go packages.
//
package ast
import (
"go/token";
"unicode";
"utf8";
)
// -----... |
package tools
// In /etc/hummingbird/andrewd-server.conf:
// [dispersion-scan-objects]
// initial_delay = 0 # seconds to wait between requests for the first pass
// pass_time_target = 3600 # seconds to try to make subsequent passes take
// report_interval = 600 # seconds between progress reports
import (
... |
package notary
import (
"bytes"
"crypto/elliptic"
"encoding/hex"
"errors"
"fmt"
"sync"
"github.com/nspcc-dev/neo-go/pkg/config"
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
"github.com/nspcc-dev/neo-go/pkg/core/block"
"github.com/nspcc-dev/neo-go/pkg/core/blockchainer"
"github.com/nspcc-dev/neo-go/pkg/... |
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"golang.org/x/time/rate"
"log"
"math"
"net/url"
"os"
"strconv"
"strings"
)
// intFlag is used to differentiate user-defined value from default value
type intFlag struct {
set bool
value int
}
func (intf *intFlag) Set(content string) error {
... |
package curl
//#include <curl/curl.h>
import "C"
type EasyOption int
// long options (0)
const (
OPT_ACCEPTTIMEOUT_MS = C.CURLOPT_ACCEPTTIMEOUT_MS
OPT_ADDRESS_SCOPE = C.CURLOPT_ADDRESS_SCOPE
OPT_APPEND = C.CURLOPT_APPEND
OPT_AUTOREFERER = C.CURLOPT_AUTOREFERER
OPT_BUFFERSIZE = C.CURLOPT_BUFFERSIZ... |
/*
* Copyright 2018-2020. Akamai 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 applicabl... |
package amboy
import (
"context"
"time"
"github.com/mongodb/amboy/dependency"
"github.com/mongodb/grip"
)
// LockTimeout describes the default period of time that a queue will respect
// a stale lock from another queue before beginning work on a job.
const LockTimeout = 10 * time.Minute
// Job describes a unit ... |
// Uses nacl's secret_box to encrypt a net.Conn.
// It is (meant to be) an implementation of the STS protocol.
// Note we do not (yet) assume that a remote peer's pubkey
// is known ahead of time, and thus we are technically
// still vulnerable to MITM. (TODO!)
// See docs/sts-final.pdf for more info
package conn
impo... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: values.proto
package octosql
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// Reference imports to suppress errors... |
package main
import (
"errors"
"fmt"
"os"
"os/signal"
"path/filepath"
"runtime"
"strings"
"time"
logging "gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log"
"github.com/jessevdk/go-flags"
"github.com/mitchellh/go-homedir"
"github.com/textileio/go-textile/cmd"
"github.com/textileio/go-textile... |
package state
import (
"fmt"
"sync/atomic"
"time"
"github.com/okex/exchain/libs/iavl"
"github.com/okex/exchain/libs/system"
"github.com/okex/exchain/libs/tendermint/delta"
redis_cgi "github.com/okex/exchain/libs/tendermint/delta/redis-cgi"
"github.com/okex/exchain/libs/tendermint/libs/log"
"github.com/okex/e... |
package meta
import (
"container/list"
"errors"
"fmt"
"sync"
"github.com/Hurricanezwf/rate-limiter/encoding"
. "github.com/Hurricanezwf/rate-limiter/proto"
"github.com/Hurricanezwf/toolbox/logging/glog"
pb "github.com/golang/protobuf/proto"
)
// metaV2 是Interface接口的具体实现
type metaV2 struct {
// 全局锁
gLock *s... |
// SPDX-License-Identifier: MIT OR Unlicense
package processor
import (
"crypto/md5"
"encoding/hex"
"fmt"
"github.com/boyter/cs/file"
"github.com/boyter/cs/str"
"strconv"
"github.com/gdamore/tcell"
"github.com/rivo/tview"
"os"
"runtime"
"strings"
"sync"
"time"
)
type displayResult struct {
Title ... |
/*
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 datastore
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"sync"
"time"
"gitlab.com/gitlab-org/gitaly/v14/internal/praefect/config"
)
var errDeadAckedAsFailed = errors.New("job acknowledged as failed with no attempts left, should be 'dead'")
// NewMemoryReplicationEventQueue return in-memo... |
package input
import (
"encoding/json"
"fmt"
"go/types"
"github.com/iancoleman/strcase"
"github.com/jinzhu/inflection"
"github.com/lolopinto/ent/ent"
"github.com/lolopinto/ent/internal/enttype"
"github.com/lolopinto/ent/internal/schemaparser"
)
type Schema struct {
Nodes map[string]*Node `json:"schema... |
// Copyright (c) 2017 Cisco and/or its affiliates.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/service/trace/v3alpha/trace_service.proto
package envoy_service_trace_v3alpha
import (
context "context"
fmt "fmt"
core "github.com/altipla-consulting/envoy-api/envoy/api/v3alpha/core"
v1 "github.com/census-instrumentation/opencensus-proto/gen-go/t... |
// Copyright 2019 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 a... |
package deviceio
//
// Copyright 2020 Telenor Digital AS
//
// 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... |
// Based on code from the Go authors from text/template/parse/lex.go.
// Also based on code from jinja2's lexer.py.
// Both distributed under a BSD license.
package v1
import (
"fmt"
"strings"
"unicode"
"unicode/utf8"
)
type Pos int
func (p Pos) Position() Pos {
return p
}
type itemType int
// item represent... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.