text stringlengths 5.51k 28.1k |
|---|
// 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 plotter
import (
"errors"
"math"
"sort"
"gonum.org/v1/plot"
"gonum.org/v1/plot/vg"
"gonum.org/v1/plot/vg/draw"
)
// fiveStatPlot contains t... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package smartbft
import (
"encoding/hex"
"fmt"
"time"
"encoding/base64"
smartbft "github.com/SmartBFT-Go/consensus/pkg/consensus"
"github.com/SmartBFT-Go/consensus/pkg/types"
"github.com/SmartBFT-Go/consensus/pkg/wal"
"githu... |
// Copyright 2014 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.
// DTLS implementation.
//
// NOTE: This is a not even a remotely production-quality DTLS
// implementation. It is the bare minimum necessary to be able to
// a... |
package netlink
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"net"
"github.com/rschmied/netlink/nl"
"golang.org/x/sys/unix"
)
// ConntrackTableType Conntrack table for the netlink operation
type ConntrackTableType uint8
const (
// ConntrackTable Conntrack table
// https://github.com/torvalds/linux/blo... |
package k8shandler
import (
"context"
"fmt"
"reflect"
"github.com/openshift/elasticsearch-operator/pkg/utils"
"github.com/sirupsen/logrus"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/util/retry"
api "github.com/openshift/elasticsearch-operator/pkg/apis/logging/v1"
)
var wrongC... |
package baseapp
import (
"encoding/hex"
"fmt"
"sync"
sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
sdkerrors "github.com/okex/exchain/libs/cosmos-sdk/types/errors"
abci "github.com/okex/exchain/libs/tendermint/abci/types"
)
type extraDataForTx struct {
fee sdk.Coins
isEvm bool
signCache sdk.... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package cloudwatch
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Provides a CloudWatch Metric Alarm resource.
t... |
/*
Copyright 2019 The Vitess Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
// 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.
// Mach-O header data structures
// http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/MachORuntime/Reference/reference.html
packag... |
// Copyright 2019 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 is a copy of bexport_test.go for iexport.go.
//go:build go1.11
// +build go1.11
package gcimporter_test
import (
"bufio"
"bytes"
"fmt"
"go/ast"
... |
package engine
import (
"common"
"fmt"
"math"
"parser"
"protocol"
"strconv"
"strings"
"time"
log "code.google.com/p/log4go"
)
var (
TRUE = true
)
type SeriesState struct {
started bool
trie *Trie
pointsRange *PointRange
lastTimestamp int64
}
type QueryEngine struct {
// query inform... |
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
package sampling
import (
"context"
"sync"
"sync/atomic"
"time"
"github.com/d... |
// Copyright 2021 IBM Corporation
//
// 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... |
package boilerpipe
import (
"bytes"
"regexp"
"strings"
"time"
"unicode"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
)
type atomStack struct {
s []atom.Atom
}
func newAtomStack() *atomStack {
return &atomStack{
s: make([]atom.Atom, 0),
}
}
func (stack *atomStack) Push(a atom.Atom) *atomStack {
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/recommendationengine/v1beta1/common.proto
package recommendationengine
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress err... |
// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the Lice... |
// Package transport provides streaming object-based transport over http for intra-cluster continuous
// intra-cluster communications (see README for details and usage example).
/*
* Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
*/
package transport
import (
"fmt"
"io"
"runtime"
"github.com/... |
/*
* Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Licen... |
// 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 main
import (
"context"
"errors"
"fmt"
"io"
"log"
"net"
"sort"
"strconv"
"strings"
"sync"
"time"
"golang.org/x/build/buildlet"
"golang.or... |
package v1alpha1
import (
autoscalingv2 "k8s.io/api/autoscaling/v2beta2"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type AlgorithmType string
const (
AlgorithmTypePercentile AlgorithmType = "percentile"
AlgorithmTypeDSP AlgorithmType = "dsp"
)
// PredictionMode represents th... |
package softRelay
// Copyright (c) 2018, Arm Limited and affiliates.
// 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.apache.or... |
package storagemarket
import (
"context"
"io"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/builtin/market"
"github.com/filecoin-project/specs-actors/actors/crypto"
"github.com/filecoin-project/specs-actors/actors... |
// Copyright 2018 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 to in ... |
// 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.
package crc64
import (
"encoding"
"io"
"testing"
)
type test struct {
outISO uint64
outECMA uint64
in string
halfStateISO stri... |
// 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 crostini
import (
"bufio"
"bytes"
"context"
"fmt"
"io"
"net"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"syscall"
"time"
... |
package manifest
import (
"encoding/json"
"math/big"
"testing"
"github.com/nspcc-dev/neo-go/internal/random"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
"github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
"github.com/stretchr... |
package syncer
import (
"context"
"encoding/json"
"errors"
"fmt"
"path/filepath"
"strconv"
"strings"
"time"
"github.com/hashicorp/vault/api"
"github.com/hootsuite/vault-ctrl-tool/v2/metrics"
"github.com/hootsuite/vault-ctrl-tool/v2/vaulttoken"
"github.com/hootsuite/vault-ctrl-tool/v2/briefcase"
"github... |
// Copyright 2016 Google LLC. 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 (c) 2015-2019 <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 wi... |
// +build integrationtest
package integrationtest
import (
"fmt"
"regexp"
"testing"
"time"
crdv1 "github.com/kubernetes-incubator/external-storage/snapshot/pkg/apis/crd/v1"
client "github.com/kubernetes-incubator/external-storage/snapshot/pkg/client"
"github.com/portworx/sched-ops/k8s"
"github.com/portworx/t... |
package internal
import (
"fmt"
"strconv"
"strings"
"time"
"github.com/determined-ai/determined/master/internal/task"
"github.com/determined-ai/determined/master/pkg/ptrs"
"github.com/pkg/errors"
"github.com/determined-ai/determined/master/internal/db"
"github.com/determined-ai/determined/master/internal/... |
// Copyright 2016 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 ssa
type branch int
const (
unknown = iota
positive
negative
)
// relation represents the set of possible relations between
// pairs of variables ... |
package api
import (
"context"
"fmt"
"go/types"
"path/filepath"
"strings"
"github.com/flyteorg/flytestdlib/logger"
"golang.org/x/tools/go/packages"
"github.com/ernesto-jimenez/gogen/gogenutil"
)
const (
indent = " "
)
// PFlagProviderGenerator parses and generates GetPFlagSet implementation to add PFlag... |
// Copyright 2020 Insolar Network Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... |
package chain
import (
"0chain.net/chaincore/state"
"context"
"fmt"
"time"
"0chain.net/chaincore/config"
"0chain.net/chaincore/node"
"0chain.net/chaincore/block"
"0chain.net/core/common"
. "0chain.net/core/logging"
"go.uber.org/zap"
)
/*VerifyTicket - verify the ticket */
func (c *Chain) VerifyTicket(ctx ... |
// +build ignore
package main
import (
"bytes"
"fmt"
"go/ast"
"go/parser"
"go/printer"
"go/token"
"io"
"io/ioutil"
"log"
"os"
"reflect"
"strings"
"unicode"
"unicode/utf8"
)
var inFiles = []string{"cpuid.go", "cpuid_test.go"}
var copyFiles = []string{"cpuid_amd64.s", "cpuid_386.s",... |
// Copyright (c) 2017-2020 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
// Process input in the form of collections of VerifyImageConfig structs
// and publish the results as collections of VerifyImageStatus structs.
//
// Move the file from DownloadDirname/pending/<sha> to
// to DownloadDirname/verifier/<sha> ... |
package agent
import (
"context"
"fmt"
"os"
"path/filepath"
"sync"
"time"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/apimodels"
"github.com/evergreen-ci/evergreen/command"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/evergreen/model/task"
"github.com/everg... |
/*
Copyright 2021 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distribu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: github.com/google/cloudprober/targets/rtc/rtcreporter/proto/rtcreporter.proto
package proto
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = p... |
package ddlog
/*
#include "ddlog.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
// Functions have to be static or the linker gives "multiple definition" errors.
// See https://golang.org/cmd/cgo/#hdr-C_references_to_Go.
static ddlog_cmd **makeCmdArray(size_t s) {
return mallo... |
package api
import (
"errors"
"fmt"
"github.com/boltdb/bolt"
"github.com/golang/glog"
"github.com/open-horizon/anax/config"
"github.com/open-horizon/anax/cutil"
"github.com/open-horizon/anax/eventlog"
"github.com/open-horizon/anax/events"
"github.com/open-horizon/anax/exchange"
"github.com/open-horizon/anax/... |
package internal
import (
"encoding/json"
"encoding/xml"
"fmt"
"net/http"
"os"
"time"
"github.com/checkmarxDev/ast-sast-export/internal/app/worker"
"github.com/checkmarxDev/ast-sast-export/internal/persistence/methodline"
"github.com/checkmarxDev/ast-sast-export/internal/app/astquery"
export2 "github.com/... |
// Copyright 2020-2021 <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 ... |
package main
import (
"encoding/json"
"log"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"github.com/Praqma/helmsman/gcs"
"github.com/hashicorp/go-version"
)
var currentState map[string]releaseState
// releaseState represents the current state of a release
type releaseState struct {
Revision ... |
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2021 Arm Limited or its affiliates and Contributors. All rights reserved.
package main
import (
"bufio"
"encoding/json"
"flag"
"fmt"
"log"
"os"
"path/filepath"
"regexp"
"sort"
"strings"
"github.com/derekparker/trie"
"mvdan.cc/sh/v3/expand"
"mvdan.c... |
/*
Copyright 2016 Iguazio.io Systems Ltd.
Licensed under the Apache License, Version 2.0 (the "License") with
an addition restriction as set forth herein. 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... |
// Copyright © 2019 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
package monitor
import (
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"os/signal"
"strings"
"syscall"
"time"
"gopkg.in/yaml.v2"
"github.com/google/go-cmp/cmp"
"github.com/openshift/baremetal-runtimecfg/pkg/config"
"github.com/openshift/baremetal-runtimecfg/pkg/render"
"github.com/sirupsen/logrus"
)
const (... |
// Copyright 2021-2022 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... |
/*
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... |
package adaboost_classifier
import (
"fmt"
"sync"
"sort"
mlearn "datamining-hw/machine_learning"
)
//----------------------------------------------------------------------------------------------------------------------
type CARTClassifier struct {
tree_root *treeNode
}
type CARTClassifierTra... |
package ogame
import (
"errors"
"regexp"
"strconv"
"strings"
"unicode"
"golang.org/x/text/runes"
"golang.org/x/text/transform"
"golang.org/x/text/unicode/norm"
)
// ParseInt ...
func ParseInt(val string) int64 {
val = strings.Replace(val, ".", "", -1)
val = strings.Replace(val, ",", "", -1)
val = strings.... |
/*
Copyright (C) BABEC. All rights reserved.
SPDX-License-Identifier: Apache-2.0
*/
package pubsub
import (
"errors"
"math/rand"
"strings"
"sync"
"sync/atomic"
"time"
"chainmaker.org/chainmaker/net-liquid/core/peer"
"chainmaker.org/chainmaker/net-liquid/core/types"
"chainmaker.org/chainmaker/net-liquid/pub... |
/*
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 main
import (
"bufio"
"bytes"
"context"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
"os/user"
"path"
"path/filepath"
"runtime"
"strings"
"sync"
"syscall"
"github.com/BurntSushi/toml"
)
const (
CONF_NAME = ".builderator.toml"
)
// See example.toml for config specs.
const STARTE... |
/*
* ZLint Copyright 2017 Regents of the University of Michigan
*
* 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 applic... |
package main
import (
"flag"
"fmt"
"github.com/boombuler/led"
"image/color"
"time"
)
var (
col string
lighttype string
COLOR_OFF = color.RGBA{0x00, 0x00, 0x00, 0xff}
)
func main() {
flag.Usage = func() {
fmt.Printf("The tool 'blinkstick' provides a simple functions to play with colors for the first ... |
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package fabricclient
import (
"encoding/json"
"time"
"github.com/golang/protobuf/proto"
google_protobuf "github.com/golang/protobuf/ptypes/timestamp"
config "github.com/hyperledger/fabric-sdk-go/api/apiconfig"... |
package main
import (
"flag"
"html/template"
"log"
"net/http"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"time"
)
var (
host = flag.String("host", ":8080", "host to serve on")
directory = flag.String("d", ".", "the directory of static file to host")
)
const defaultAppName = "app"
var indexTmpl... |
package core
import (
"math"
"time"
)
// A FieldType indicates which member of the Field union struct should be used
// and how it should be serialized.
type FieldType uint8
const (
// UnknownType is the default field type. Attempting to add it to an encoder will panic.
UnknownType FieldType = iota
// BoolType ... |
package deej
import (
"errors"
"fmt"
"strings"
"syscall"
"time"
"unsafe"
ole "github.com/go-ole/go-ole"
wca "github.com/moutend/go-wca"
"go.uber.org/zap"
)
type wcaSessionFinder struct {
logger *zap.SugaredLogger
sessionLogger *zap.SugaredLogger
eventCtx *ole.GUID // needed for some session actio... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: config.proto
/*
Package config is a generated protocol buffer package.
It is generated from these files:
config.proto
It has these top-level messages:
Config
Node
Location
EnergyCost
TimeDelay
*/
package config
import proto "github.com/golang/protobu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.13.0
// source: atomix/primitive/v1/manager.proto
package manager
import (
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
protoreflect "google.golang.org/protobuf/reflect/protoreflect... |
// Package kv implements encoding and decoding of Valve's KeyValue format.
//
// https://developer.valvesoftware.com/wiki/KeyValues
package kv
import (
"bytes"
"encoding"
"fmt"
"strconv"
)
// KeyValue represents a node in a KeyValue tree.
type KeyValue interface {
// Type returns the node's Type.
Type() Type
/... |
package main
import (
"bufio"
"bytes"
"compress/gzip"
"errors"
"fmt"
"io"
"log"
"net"
"net/http"
"net/http/httputil"
"net/url"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"github.com/andybalholm/brotli"
"github.com/go-shiori/go-readability"
"golang.org/x/net/html"
"golang.org/x/net/h... |
// Copyright 2018 Google
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writi... |
/*
* Copyright (c) 2019 OysterPack, 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.6.1
// source: yandex/cloud/mdb/elasticsearch/v1/user.proto
package elasticsearch
import (
_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
... |
// Copyright (c) 2013 <NAME>. All rights reserved.
// See LICENCE file for permissions and restrictions.
//Package winsock2 provides API definitions for accessing
//ws2_32.dll.
package winsock2
import (
"github.com/tHinqa/outside"
T "github.com/tHinqa/outside-windows/types"
. "github.com/tHinqa/outside/types"
_ "... |
// See the file LICENSE for copyright and licensing information.
package fuse
import (
"fmt"
"io"
"os"
"sync"
"syscall"
"time"
"unsafe"
)
// Mount mounts a new FUSE connection on the named directory
// and returns a connection for reading and writing FUSE messages.
//
// After a successful return, caller must ... |
package canvas
import (
"strings"
"unicode"
"unicode/utf8"
canvasFont "github.com/tdewolff/canvas/font"
"golang.org/x/image/font"
"golang.org/x/image/font/sfnt"
)
// TypographicOptions are the options that can be enabled to make typographic or ligature substitutions automatically.
type TypographicOptions int
... |
// SPDX-License-Identifier: Apache-2.0
/*
Sample Chaincode based on Demonstrated Scenario
This code is based on code written by the Hyperledger Fabric community.
Original code can be found here: https://github.com/hyperledger/fabric-samples/blob/release/chaincode/fabcar/fabcar.go
*/
package main
/* Imports
... |
// Copyright 2022 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package rui
import (
"fmt"
"math"
"strconv"
"strings"
)
const (
// AnimationTag is the constant for the "animation" property tag.
// The "animation" property sets and starts animations.
// Valid types of value are []Animation and Animation
AnimationTag = "animation"
// AnimationPause is the constant for the... |
package librecursebuster
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
"sync/atomic"
)
//StartManagers is the function that starts all the management goroutines
func (gState *State) StartManagers() {
if gState.Cfg.NoUI {
gState.PrintBanner()
go gState.StatusPrinter()
} else {
go gSt... |
package pixel
import (
"fmt"
"math"
)
// Clamp returns x clamped to the interval [min, max].
//
// If x is less than min, min is returned. If x is more than max, max is returned. Otherwise, x is
// returned.
func Clamp(x, min, max float64) float64 {
if x < min {
return min
}
if x > max {
return max
}
retur... |
package tui
import (
"context"
"fmt"
"sync"
"syscall"
"time"
"unicode/utf8"
"golang.org/x/crypto/ssh/terminal"
)
const (
// Basic keycodes, map directly to their ANSI numbering
// order strictly matters
Null rune = iota // ctrl-space
CtrlA
CtrlB
CtrlC
CtrlD // aka EOF
CtrlE
CtrlF
CtrlG
CtrlH // \b ... |
// This file tries to find the QUBO parameters that implement a given
// truth table.
package main
import (
"fmt"
"math"
"math/bits"
"math/rand"
"sort"
"sync/atomic"
"time"
"github.com/lanl/clp"
"gonum.org/v1/gonum/mat"
)
// A QUBO represents a QUBO matrix whose values we're solving for.
type QUBO struct {... |
package org
import "strings"
var htmlEntityReplacer *strings.Replacer
func init() {
htmlEntities = append(htmlEntities,
"---", "—",
"--", "–",
"...", "…",
)
htmlEntityReplacer = strings.NewReplacer(htmlEntities...)
}
/*
Generated & copied over using the following elisp
(Setting up go generate seems like a ... |
/*
* Copyright 2021 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 law ... |
// Copyright 2020 MatrixOrigin.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package config
import (
"fmt"
"strings"
yaml "gopkg.in/yaml.v2"
"errors"
"github.com/kubernetes-incubator/kube-aws/cfnresource"
cfg "github.com/kubernetes-incubator/kube-aws/core/controlplane/config"
"github.com/kubernetes-incubator/kube-aws/coreos/amiregistry"
"github.com/kubernetes-incubator/kube-aws/mode... |
package dynamic
import (
"context"
"time"
"github.com/lyft/flytestdlib/promutils/labeled"
"github.com/lyft/flytepropeller/pkg/compiler"
common2 "github.com/lyft/flytepropeller/pkg/compiler/common"
"github.com/lyft/flytepropeller/pkg/controller/executors"
"github.com/lyft/flytepropeller/pkg/controller/nodes/c... |
package main
import (
"bytes"
"encoding/hex"
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"math"
"os"
"os/exec"
"strconv"
"time"
"0chain.net/chaincore/block"
"0chain.net/chaincore/client"
"0chain.net/chaincore/config"
"0chain.net/chaincore/node"
"0chain.net/chaincore/state"
"0chain.net/c... |
package goping
import (
"errors"
"math"
"net"
"strconv"
"sync/atomic"
"testing"
"time"
)
func TestNewRequest(t *testing.T) {
cfg := Config{Count: 1, Interval: time.Duration(1 * time.Second), PacketSize: 56, TOS: 16, TTL: 64, Timeout: (3 * time.Second)}
g := New(cfg, &mockPinger{}, &mockSeqGen{seqmap: make(ma... |
package services
import (
"math"
"strconv"
"time"
"github.com/pkg/errors"
)
// Course course metadata
type Course struct {
Enid string `json:"enid"`
ID int `json:"id"`
Type int `json:"type"`
ClassType int `json:"class_type"`
ClassID ... |
/*
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 main
import (
"encoding/json"
"flag"
"fmt"
"github.com/nvsoft/win"
"github.com/phayes/freeport"
"github.com/rodolfoag/gow32"
"github.com/sqweek/dialog"
"github.com/webview/webview"
"golang.org/x/sys/windows"
"os"
"os/exec"
"path/filepath"
"syscall"
"time"
"unsafe"
)
var dirname = ""
var default... |
package GhostWriter
import (
"bufio"
"bytes"
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"regexp"
"sort"
"strconv"
"strings"
"archive/zip"
"compress/bzip2"
"compress/gzip"
"github.com/mvryan/fasttag"
"github.com/Obaied/rake"
// "github.com/gen2brain/go-unarr"
// "github.com/alixaxel/pagerank"
// "github.com/... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/translation.proto
package automl
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 not oth... |
package main
import (
"bufio"
"encoding/base64"
"fmt"
"github.com/alecthomas/kong"
"github.com/gliderlabs/ssh"
"io"
"log"
"os"
"os/exec"
"path/filepath"
"regexp"
"strings"
"text/template"
"time"
)
var CLI struct {
ListenAddress string `name:"listen-address" default:":1966"`
IdleTimeout time.D... |
// 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... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package akamai
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The `GtmResource` lets y... |
// SPDX-License-Identifier: MIT
package cli
import (
"flag"
"fmt"
"os"
"path/filepath"
"reflect"
"strconv"
"strings"
"time"
sechubUtil "mercedes-benz.com/sechub/util"
)
// Config for internal CLI calls
type Config struct {
action string
apiToken string
confi... |
package algorithms
import (
"fmt"
"line-simplify/tracks"
"math"
"time"
)
func LeonardoOptimize(data []tracks.Datum) []tracks.Datum {
defer timeTrack(time.Now(), "LeonardoOptimize")
pnts := len(data)
distance, maxDist, max2Dist := initDistMatrix(data)
dMin, dMinI, dMinJ := initDMin(pnts, distance, maxDist)
m... |
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"bytes"
"context"
"encoding/json"
"io"
"io/ioutil"
"github.com/go-openapi/errors"
"github.com/go-openapi/r... |
package cibot
import (
"context"
"encoding/base64"
"strconv"
"time"
"gitee.com/openeuler/ci-bot/pkg/cibot/config"
"gitee.com/openeuler/ci-bot/pkg/cibot/database"
"gitee.com/openeuler/go-gitee/gitee"
"github.com/antihax/optional"
"github.com/golang/glog"
"gopkg.in/yaml.v2"
)
type SigHandler struct {
Config... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/asset.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/ads/googleads/v1... |
package http_rest
import (
"reflect"
pb "github.com/akitasoftware/akita-ir/go/api_spec"
"github.com/akitasoftware/akita-libs/visitors"
)
// Describes which part of an HTTP request/response a value belongs to.
type HttpValueType int
const (
UNKNOWN HttpValueType = iota
PATH
QUERY
HEADER
COOKIE
BODY
AUTH
)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.