text stringlengths 8.57k 38.1k |
|---|
package trim
import (
"fmt"
"github.com/jteutenberg/downpore/seeds"
"github.com/jteutenberg/downpore/sequence"
"github.com/jteutenberg/downpore/util"
"log"
"strings"
"sync"
)
type Trimmer struct {
originalFront []sequence.Sequence
originalBack []sequence.Sequence
frontAdapters []*seeds.SeedSequence
ba... |
// Copyright (C) 2017 ScyllaDB
package repair
import (
"context"
"encoding/json"
"fmt"
"strings"
"sync"
"github.com/pkg/errors"
"github.com/scylladb/go-log"
"github.com/scylladb/go-set/strset"
"github.com/scylladb/gocqlx/v2"
"github.com/scylladb/gocqlx/v2/qb"
"github.com/scylladb/scylla-manager/pkg/dht"
... |
// Package client contains all strest-grpc client code. It supports both
// streaming and non-streaming configurations.
//
// control flow
//
// Run() ->
// loop() (drives requests, aggregates responses, prints output, shuts down)
// connect() (1x per connection) ->
// sendStreamingRequests() (1x per stream. i... |
package dmlgen
import (
"bufio"
"bytes"
"fmt"
"go/ast"
"go/build"
"go/token"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strings"
"github.com/alecthomas/repr"
"github.com/corestoreio/errors"
"github.com/corestoreio/pkg/sql/ddl"
"github.com/corestoreio/pkg/util/codegen"
"github.com/corestoreio/pk... |
// Code generated by protoc-gen-go.
// source: pdm.proto
// DO NOT EDIT!
/*
Package pdm is a generated protocol buffer package.
It is generated from these files:
pdm.proto
It has these top-level messages:
Endpoint
Handle
ActionItem
ActionStatus
Empty
*/
package pdm
import proto "github.com/golang/protobuf/pro... |
// Copyright (C) 2015 The Android Open Source Project
//
// 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 (c) 2019, AT&T Intellectual Property. All rights reserved.
//
// Copyright (c) 2015-2016 by Brocade Communications Systems, Inc.
// All rights reserved.
//
// SPDX-License-Identifier: MPL-2.0
// These tests verify that the core functions required to implement
// XPATH, including the YANG-specific current(... |
/*
Sniperkit-Bot
- Status: analyzed
*/
// Copyright 2015-present, Cyrill @ Schumacher.fm and the CoreStore 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://w... |
package pkglint
import (
"gopkg.in/check.v1"
"strings"
)
func (s *Suite) Test_MkParser_MkCond(c *check.C) {
t := s.Init(c)
b := NewMkTokenBuilder()
cmp := func(left MkCondTerm, op string, right MkCondTerm) *MkCond {
return &MkCond{Compare: &MkCondCompare{left, op, right}}
}
cvar := func(name string, modifie... |
// Copyright (c) 2020 Tailscale Inc & 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 derp
// TODO(crawshaw): with predefined serverKey in clients and HMAC on packets we could skip TLS
import (
"bufio"
"context"
crand "cr... |
/*
Copyright 2018 The cassandra-crd 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 writin... |
package main
import (
"archive/tar"
"bytes"
"compress/gzip"
"context"
"encoding/json"
"errors"
goflags "flag"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"sync"
"text/template"
"time"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1... |
package template
import (
"fgame/fgame/core/template"
"fgame/fgame/core/template/validator"
"fgame/fgame/core/utils"
"fgame/fgame/game/common/common"
playertypes "fgame/fgame/game/player/types"
"fgame/fgame/game/skill/types"
"fmt"
)
type SkillTemplate struct {
*SkillTemplateVO
//技能类型
skillFirstType types.Sk... |
package btree
import (
"math/rand"
"testing"
)
func assert(t *testing.T, b bool, args ...interface{}) {
if !b {
t.Error(args...)
}
}
func assertf(t *testing.T, b bool, f string, args ...interface{}) {
if !b {
t.Errorf(f, args...)
}
}
func randomShuffle(a []int64) []int64 {
for i := len(a); i > 1; i-- {
... |
// Copyright 2019 The VikingBays(in Nanjing , China) . All rights reserved.
// Released under the Apache license : http://www.apache.org/licenses/LICENSE-2.0 .
//
// authors: VikingBays
// email : <EMAIL>
/*
用于定义服务端管理模块的具体实现,以etcd方式实现。
*/
package service
import (
"alphabet/core/etcd"
"alphabet/log4go"
"alpha... |
package main
import (
"fmt"
"html"
"log"
"mime"
"path"
"sort"
"strings"
"github.com/gotk3/gotk3/gdk"
"github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/gtk"
"github.com/gotk3/gotk3/pango"
)
const (
colIdx = iota
colName
colLeft
colRight
colAction
colIconName
colNameStyle
colNameStrike
colNameC... |
package cff
import (
"bytes"
"encoding/binary"
"fmt"
"io"
"math"
"regexp"
"strconv"
)
var (
removeTrailingZeros *regexp.Regexp
removeTrailingZerosNonE *regexp.Regexp
exponent *regexp.Regexp
)
func init() {
removeTrailingZeros = regexp.MustCompile(`\.?0*(e[+-]?)0*`)
removeTrailingZerosN... |
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package modfetch
import (
"archive/zip"
"bytes"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"
"sync"
"cmd/go/internal/base... |
// Copyright 2018 The gVisor 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 agree... |
package tcpserver
import (
"coffeechat/api/cim"
"coffeechat/pkg/def"
"coffeechat/pkg/logger"
"container/list"
"context"
"encoding/json"
"github.com/golang/protobuf/proto"
uuid "github.com/satori/go.uuid"
"go.uber.org/atomic"
"net"
"sync"
"time"
)
const kLoginTimeOut = 15 // 登录超时时间(s)
const kBusinessTi... |
// Copyright (c) 2017-2020 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
package hypervisor
import (
"errors"
"fmt"
"github.com/lf-edge/eve/pkg/pillar/types"
"github.com/shirou/gopsutil/cpu"
"github.com/shirou/gopsutil/mem"
log "github.com/sirupsen/logrus"
"io/ioutil"
"os"
"regexp"
"strconv"
"strings... |
package handler
import (
"context"
"fmt"
"sync"
"time"
log "github.com/Sirupsen/logrus"
keda_v1alpha1 "github.com/kedacore/keda/pkg/apis/keda/v1alpha1"
clientset "github.com/kedacore/keda/pkg/client/clientset/versioned"
"github.com/kedacore/keda/pkg/scalers"
apps_v1 "k8s.io/api/apps/v1"
v2beta1 "k8s.io/api/... |
package dbmeta
import (
"bytes"
"database/sql"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"reflect"
"runtime"
"strings"
"time"
"github.com/bxcodec/faker/v3"
"github.com/iancoleman/strcase"
dynamicstruct "github.com/ompluscator/dynamic-struct"
)
type metaDataLoader func(db *sql.DB, sqlType, ... |
// 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 ... |
package gossip
import (
"fmt"
"math/big"
"math/rand"
"strings"
"sync"
"time"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/trie"
lru "github.com/has... |
//Author:TruthHun
//Email:<EMAIL>
//Date:2018-01-21
package converter
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"errors"
"os/exec"
"time"
"html"
"sync"
"github.com/devagame/apps-vums/utils/cryptil"
"github.com/devagame/apps-vums/utils/filetil"
"github.com/devagame/apps-vums/utils/ziptil... |
// Copyright 2021 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 run
import (
"context"
"flag"
"fmt"
"infra/cmd/crosfleet/internal/buildbucket"
"infra/cmd/crosfleet/internal/common"
"infra/cmd/crosfleet/i... |
package exe
// 16-bit NE exe (Win16, OS/2)
// STATUS: 70%
// XXX: http://www.program-transformation.org/Transform/NeFormat
import (
"fmt"
"log"
"os"
"github.com/martinlindhe/formats/parse"
)
var (
neTargetOS = map[byte]string{
1: "os/2",
2: "windows",
3: "european ms-dos 4.x",
4: "windows 386",
5: "... |
package route
import (
"context"
cryptorand "crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"fmt"
"math/rand"
"reflect"
"time"
"github.com/golang/glog"
routev1 "github.com/openshift/api/route/v1"
routeclientset "github.com/openshift/client-go/route/clientset/versioned"
_ "github.com/openshift... |
package clusterpool
import (
"context"
"errors"
"fmt"
"sort"
"strings"
log "github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"sigs.k8s.io/controller-runtime/pkg/client"
hivev1 "github.com/openshift/hive/apis/hive/v1"
"github.com/openshift/hive/pkg/c... |
// SPDX-License-Identifier: Apache-2.0
// Copyright © 2021 Wrangle Ltd
package widgets
import (
"sort"
"github.com/gdamore/tcell/v2"
"github.com/lucasb-eyer/go-colorful"
"github.com/rivo/tview"
)
type VirtualTable struct {
*tview.Box
// Whether or not this table has borders around each cell.
borders bool
... |
// This file contains functions for transpiling function calls (invocations).
package transpiler
import (
"bytes"
"fmt"
"strconv"
"strings"
"github.com/Konstantin8105/c4go/ast"
"github.com/Konstantin8105/c4go/program"
"github.com/Konstantin8105/c4go/types"
"github.com/Konstantin8105/c4go/util"
goast "go/as... |
package ofp
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"github.com/akostrikov/openflow/internal/encoding"
)
// ActionType specifies the action type.
type ActionType uint16
// String returns a string representation of the action type.
func (a ActionType) String() string {
text, ok := actionText[a]
// If action i... |
package main
import (
"fmt"
"io"
"io/ioutil"
"os"
"strings"
"github.com/rjkroege/edwood/internal/file"
)
// File is an editable text buffer with undo. Many Text can share one
// File (to implement Zerox). The File is responsible for updating the
// Text instances. File is a model in MVC parlance while Text is ... |
/*
* Copyright © 2018-2021 Software AG, 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://... |
package generate
// This file defines the data structures from which genqlient generates types,
// and the code to write them out as actual Go code. The main entrypoint is
// goType, which represents such a type, but convert.go also constructs each
// of the implementing types, by traversing the GraphQL operation and... |
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packages
// See doc.go for package documentation and implementation notes.
import (
"context"
"fmt"
"go/ast"
"go/parser"
"go/token"
"go/types"
... |
package game
import (
"github.com/lquesada/cavernal/world"
"github.com/lquesada/cavernal/entity"
"github.com/lquesada/cavernal/model"
"github.com/lquesada/cavernal/lib/g3n/engine/math32"
"math/rand"
"time"
)
type State struct{
// Config
WaitBeforePickupable float32
FallSpeedUp float32
Player entity.IPlaye... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/filter/http/transcoder/v2/transcoder.proto
package envoy_config_filter_http_transcoder_v2
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobu... |
package underscore
import (
"github.com/markmontymark/asserts"
"fmt"
"sort"
"testing"
)
type IntSlice []int
func (this IntSlice) Len() int { return len(this) }
func (this IntSlice) Less(a, b int) bool { return this[a] < this[b] }
func (this IntSlice) Swap(a, b int) { this[a], this[b] = this[b], th... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc (unknown)
// source: price/derivatives/v2/derivatives.proto
package derivativesv2
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"... |
/*
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... |
package payments
import (
"encoding/json"
"fmt"
"time"
"github.com/shiuh-yaw-cko/checkout"
"github.com/shiuh-yaw-cko/checkout/common"
)
type (
// Request ...
Request struct {
Source interface{} `json:"source,omitempty"`
Destination interface{} `json:"destination,omitempty"`
... |
package sftp
// sftp server counterpart
import (
"encoding"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"sync"
"syscall"
"time"
"github.com/pkg/errors"
"strings"
)
const (
SftpServerWorkerCount = 1
)
// Server is an SSH File Transfer Protocol (sftp) server.
// This is intended to provide the... |
package main
import (
"crypto/md5"
"encoding/hex"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"reflect"
"regexp"
"strconv"
"strings"
"github.com/alecthomas/kingpin"
"github.com/inconshreveable/log15"
"github.com/mattn/go-colorable"
"github.com/rightscale/rsc/cm15"
"github.com/rightsca... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: yandex/cloud/mdb/elasticsearch/v1/backup.proto
package elasticsearch
import (
_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
protoreflect "google.golang.org/protobuf/reflect/protoreflec... |
package sqltypes
import (
"github.com/google/cel-go/cel"
"github.com/google/cel-go/checker/decls"
"github.com/google/cel-go/common/operators"
"github.com/google/cel-go/common/overloads"
expr "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
)
var (
Date = decls.NewAbstractType("DATE")
Time = de... |
/*
PRODUCT TYPES
-------------
productypes are parametric types, that generate a subtype for every possible
combination of its arguments. product types are defined as the union of unions
of its elements types. different elements of a product type product may be of
various type.
examples for productypes
- records &... |
// This package provides access to the excellent lua language interpreter from go code.
//
// Access to most of the functions in lua.h and lauxlib.h is provided as well as additional convenience functions to publish Go objects and functions to lua code.
//
// The documentation of this package is no substitute for the o... |
/*
Copyright IBM Corp. 2016 All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package txvalidator
import (
"context"
"fmt"
"time"
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/common/channelconfig"
"github.com/hyperledger/fabric/common/configtx"
commonerrors "github.com/hyperled... |
package nsq
import (
"bufio"
"bytes"
"errors"
"fmt"
"log"
"math"
"math/rand"
"net"
"net/url"
"os"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
)
// returned from ConnectToNSQ() when already connected
var ErrAlreadyConnected = errors.New("already connected")
// Handler is the synchronous interface t... |
// Copyright 2013 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.
//go:generate go run gen.go gen_index.go -output tables.go
package language
// TODO: Remove above NOTE after:
// - verifying that tables are dropped correctly... |
// Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... |
// Copyright 2015 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
package remote
import (
"bytes"
"context"
"crypto/sha1"
"crypto/sha256"
"encoding/base64"
"encoding/hex"
"fmt"
treesdk "github.com/bazelbuild/remote-apis-sdks/go/pkg/tree"
"io/ioutil"
"os"
"path"
"sort"
"strings"
"time"
"github.com/bazelbuild/remote-apis-sdks/go/pkg/chunker"
"github.com/bazelbuild/rem... |
// Copyright (c) 2018-2019, The Decred developers
// Copyright (c) 2017, The dcrdata developers
// See LICENSE for details.
package dcrpg
import (
"context"
"fmt"
"regexp"
"strings"
"sync"
"time"
"github.com/decred/dcrd/chaincfg/chainhash"
"github.com/decred/dcrdata/db/dbtypes/v2"
"github.com/decred/dcrdata... |
package options
import (
"fmt"
"net/url"
"strconv"
"strings"
"time"
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/logger"
"github.com/oauth2-proxy/oauth2-proxy/v7/providers"
"github.com/spf13/pflag"
)
type LegacyOptions struct {
// Legacy options related to upstream servers
LegacyUpstreams LegacyUpstreams `... |
// Copyright 2015 The Vanadium 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 compile
import (
"fmt"
"path"
"regexp"
"strings"
"unicode"
"v.io/v23/vdl"
"v.io/v23/vdlroot/vdltool"
"v.io/x/ref/lib/vdl/opconst"
"v.io... |
// DBDeployer - The MySQL Sandbox
// Copyright © 2006-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 require... |
package veneur
import (
"encoding/binary"
"errors"
"fmt"
"sync"
"sync/atomic"
"time"
"github.com/axiomhq/hyperloglog"
"github.com/sirupsen/logrus"
"github.com/stripe/veneur/v14/protocol"
"github.com/stripe/veneur/v14/samplers"
"github.com/stripe/veneur/v14/samplers/metricpb"
"github.com/stripe/veneur/v14/... |
/*
* Copyright 2018-2021 Venafi, 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 compilator
import (
"bytes"
"container/list"
"errors"
"fmt"
"io"
"os"
"path/filepath"
"sort"
"strings"
"time"
"github.com/hpcloud/fissile/docker"
"github.com/hpcloud/fissile/model"
"github.com/hpcloud/fissile/scripts/compilation"
"github.com/hpcloud/fissile/util"
"github.com/hpcloud/stampy"
"... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/extensions/access_loggers/grpc/v3/als.proto
package envoy_extensions_access_loggers_grpc_v3
import (
fmt "fmt"
v3 "github.com/cilium/proxy/go/envoy/config/core/v3"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-val... |
// +build !prev
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package orgs
import (
"bufio"
"bytes"
"crypto/ecdsa"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"testing"
"github.com/thanakritlee/fabric-sdk-go/internal/github.com... |
package main
import (
"fmt"
"io/ioutil"
"net/http"
"os"
"os/exec"
"regexp"
"strconv"
"time"
log "github.com/sirupsen/logrus"
"github.com/takuoki/clmconv"
"github.com/tidwall/gjson"
"golang.org/x/net/context"
"golang.org/x/oauth2/google"
sheets "google.golang.org/api/sheets/v4"
yaml "gopkg.in/yaml.v2"
... |
package multitenant
import (
"crypto/md5"
"fmt"
"io"
"strconv"
"strings"
"sync"
"time"
"context"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/bluele/gcache"
"github.com/nats-io/nats... |
// Package stusb4500 provides a driver for the STUSB4500 USB PD sink controller
// by STMicroelectronics.
//
// Datasheet: https://www.st.com/resource/en/datasheet/stusb4500.pdf
package stusb4500 // import "tinygo.org/x/drivers/stusb4500"
import (
"errors"
"machine"
"runtime/volatile"
"time"
"tinygo.org/x/driver... |
package process
import (
"context"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"sort"
"time"
"github.com/pinpt/ripsrc/ripsrc/parentsgraph"
"github.com/pinpt/ripsrc/ripsrc/gitblame2"
"github.com/pinpt/ripsrc/ripsrc/pkg/logger"
"github.com/pinpt/ripsrc/ripsrc/history3/process/repo"
"github.com/pinpt/rip... |
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
package gql
import (
"context"
"encoding/json"
"fmt"
"time"
"github.com/Khan/genqlient/graphql"
"github.com/jccr/steampipe-plugin-linear/gql/internal"
)
// __listIssueInput is used internally by genqlient
type __listIssueInput struct {
First int ... |
package producer_plugin
import (
Chain "github.com/zhangsifeng92/geos/chain"
"github.com/zhangsifeng92/geos/chain/types"
"github.com/zhangsifeng92/geos/common"
"github.com/zhangsifeng92/geos/crypto"
"github.com/zhangsifeng92/geos/crypto/ecc"
. "github.com/zhangsifeng92/geos/exception"
. "github.com/zhangsifeng9... |
// Copyright (c) 2021 Target Brands, Inc. All rights reserved.
//
// Use of this source code is governed by the LICENSE file in this repository.
package main
import (
"encoding/json"
"fmt"
"os/exec"
"strconv"
"strings"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)
// nolint
const buildAction = "b... |
/*
* GoScans, a collection of network scan modules for infrastructure discovery and information gathering.
*
* Copyright (c) Siemens AG, 2016-2021.
*
* This work is licensed under the terms of the MIT license. For a copy, see the LICENSE file in the top-level
* directory or visit <https://opensource.org/licenses/MIT>.
... |
// Code generated by entc, DO NOT EDIT.
package ent
import (
"fmt"
"hope/apps/novel/internal/data/ent/adchannel"
"hope/apps/novel/internal/data/ent/socialuser"
"strings"
"time"
"entgo.io/ent/dialect/sql"
)
// SocialUser is the model entity for the SocialUser schema.
type SocialUser struct {
config `json:"-"`... |
package sql
import (
"database/sql"
"encoding/hex"
"fmt"
"strconv"
"strings"
"time"
"github.com/lib/pq"
"github.com/cayleygraph/cayley/clog"
"github.com/cayleygraph/cayley/graph"
"github.com/cayleygraph/cayley/graph/iterator"
"github.com/cayleygraph/cayley/internal/lru"
"github.com/cayleygraph/cayley/qua... |
package term
import (
"image/color"
"io"
"strconv"
)
type ANSI struct {
Display io.Writer
}
func (a *ANSI) Clear() (int, error) {
return a.Display.Write([]byte{'\033', '[', '2', 'J'})
}
func (a *ANSI) CursorPosition(row, column int) (int, error) {
cmd := []byte{'\033', '['}
if row > 1 || column > 1 {
cmd =... |
package main
import (
"encoding/csv"
"encoding/json"
"fmt"
"html/template"
"net"
"net/http"
"reflect"
"strconv"
"sync"
"time"
"github.com/ahmetb/go-linq"
"github.com/valyala/fasthttp"
)
const (
badVersionString = "BAD_VERSION_STRING"
versionJSONRPC = "2.0"
blocksPerEpoch = 16384
blockTime ... |
// Copyright 2017 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... |
package proc
// updated at 2017-12-21 12:15:57.243686 -0800 PST
// NetDev is '/proc/net/dev' in Linux.
// The dev pseudo-file contains network device status information.
type NetDev struct {
// Interface is network interface.
Interface string `column:"interface"`
// ReceiveBytes is total number of bytes of data re... |
// logstf does mostly ETL stuff for the logstf data
package logstf
import (
"archive/zip"
"bufio"
"encoding/json"
"errors"
"fmt"
"github.com/leighmacdonald/steamid"
log "github.com/sirupsen/logrus"
"io/ioutil"
"os"
"path"
"sort"
"strconv"
"strings"
"time"
)
type HealingSummary struct {
Healing ... |
// Package psp implements a Paint Shop Pro image decoder.
package psp
// https://github.com/GNOME/gimp/blob/2275d4b257e9de36f1ac749e591378e58b348754/plug-ins/common/file-psp.c
import (
"bufio"
"bytes"
"compress/zlib"
"encoding/hex"
"fmt"
"image"
"image/color"
"io"
"math"
"runtime"
"strings"
"time"
)
var ... |
// Copyright (c) 2021 Terminus, 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 agree... |
// Copyright 2016 <NAME>, 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... |
package main
import (
"crypto/tls"
"flag"
"fmt"
"log"
"math/rand"
"net/http"
"os/signal"
"time"
"net"
"os"
"strconv"
"strings"
"path"
"sync"
"github.com/PuerkitoBio/goquery"
"github.com/asaskevich/govalidator"
)
const APPNAME = "domscan"
const VERSION = "1.0.1"
var... |
// 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 ... |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package dashboard
import (
"fmt"
"strings"
"testing"
"time"
)
func TestOSARCHAccessors(t *testing.T) {
valid := func(s string) bool { return s != "" && !... |
package cmd
import (
"github.com/ArcCS/Nevermore/config"
"github.com/ArcCS/Nevermore/data"
"github.com/ArcCS/Nevermore/objects"
"github.com/ArcCS/Nevermore/permissions"
"github.com/ArcCS/Nevermore/utils"
"github.com/jedib0t/go-pretty/table"
"github.com/jedib0t/go-pretty/text"
"log"
"strconv"
"strings"
)
fun... |
package main
import (
"fmt"
"strconv"
"fyne.io/fyne/widget"
)
// thePanels.intValues["drive"][] uses this iota as an index, but only the first 3 items for the actual
// drive settings, an array of {2, 3, 3} of is J-2, M-2, P3
//
// thePanels.floatValues["drive"][] uses this iota as an index as well, using all 6. ... |
// Copyright (c) Acrosync LLC. All rights reserved.
// Free for personal use and commercial trial
// Commercial use requires per-user licenses available from https://duplicacy.com
package duplicacy
import (
"bytes"
"crypto/hmac"
"crypto/rand"
"crypto/sha256"
"crypto/rsa"
"crypto/x509"
"encoding/binary"
"encod... |
package main
import (
"bytes"
"encoding/json"
"io/ioutil"
"log"
"net/http"
"strconv"
"sync"
"time"
"gonum.org/v1/gonum/mat"
. "github.com/smartfog/fogflow/common/communicator"
. "github.com/smartfog/fogflow/common/datamodel"
. "github.com/smartfog/fogflow/common/ngsi"
"math"
url2 "net/url"
. "github... |
// Copyright 2018 <NAME> -- <EMAIL>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law 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, ... |
// Copyright © 2017 The virtual-kubelet 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 la... |
package veneur
import (
"context"
"fmt"
"net/http"
"reflect"
"runtime"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/axiomhq/hyperloglog"
"github.com/sirupsen/logrus"
"github.com/stripe/veneur/v14/forwardrpc"
vhttp "github.com/stripe/veneur/v14/http"
"github.com/stripe/veneur/v14/samplers"
"github.... |
// Package presenters allow for the specification and result
// of a Job, its associated TaskSpecs, and every JobRun and TaskRun
// to be returned in a user friendly human readable format.
package presenters
import (
"bytes"
"encoding/json"
"fmt"
"math/big"
"reflect"
"strconv"
"strings"
"github.com/smartcontr... |
// Copyright 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 in wri... |
// License Information:
// jcr6main.go
// (c) 2017, 2018, 2019 <NAME>.
//
// This Source Code Form is subject to the terms of the
// Mozilla Public License, v. 2.0. If a copy of the MPL was not
// distributed with this file, You can obtain one at
// http://mozilla.org/MPL/2.0/.
// Version: 19.... |
// Copyright 2017 Cisco Systems, 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 agree... |
/*
Copyright 2020 The Kubernetes Authors.
SPDX-License-Identifier: Apache-2.0
*/
package v1beta1
import (
"errors"
"fmt"
"strings"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)
// DeviceMode type decle... |
/*
Derivative work:
Copyright 2019 FBK
The controller workflow is mainly the original one
This file has been modified by FBK in order to adapt it to the fadepl needs in terms
of handling the FADepl and related resources
Original work:
Copyright 2017 The Kubernetes Authors.
License of both original work and derivativ... |
// Copyright 2021 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.