text stringlengths 5.51k 28.1k |
|---|
/*
Copyright 2018 The Knative 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... |
// Package fribidi is a Golang port of the C/C++
// Free Implementation of the Unicode Bidirectional Algorithm
// (https://github.com/fribidi/fribidi).
// It supports the main features required to do text layout.
// It depends on golang.org/x/text/unicode/bidi to fetch
// unicode properties of runes.
package fribidi
i... |
package main
import (
"fmt"
"io/ioutil"
"path/filepath"
"reflect"
"sort"
"github.com/hashicorp/hcl"
"github.com/oliverkofoed/dogo/constructor"
"github.com/oliverkofoed/dogo/neaterror"
"github.com/oliverkofoed/dogo/registry"
"github.com/oliverkofoed/dogo/schema"
)
func addError(errors *[]error, location str... |
// Copyright 2019 The Cloud Robotics 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 ... |
package v8
import (
"errors"
"reflect"
"time"
)
// DynamicObject used to handle dynamic property use case in JS.
type DynamicObject struct {
Target reflect.Value // Target Go value.
SpecFields []specField // Special fields defined by 'js-field' struct tag.
Properties []DynamicProperty // Dynamic p... |
// +build egl
package egl
import (
"fmt"
"strings"
)
////////////////////////////////////////////////////////////////////////////////
// CGO
/*
#cgo pkg-config: brcmegl
#include <EGL/egl.h>
*/
import "C"
////////////////////////////////////////////////////////////////////////////////
// TYPES
type (
EGLQue... |
package process
import (
"context"
"encoding/json"
"fmt"
"net/http"
"strings"
"sync"
"time"
"go.uber.org/zap"
"github.com/kyma-project/control-plane/components/kyma-metrics-collector/pkg/keb"
gardenerv1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
kmccache "github.com/kyma-project/control-pl... |
package main
// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2020 ESSENTIAL KAOS //
// Apache License, Version 2.0 <ht... |
package ddevapp
import (
"bytes"
"fmt"
"html/template"
"io/ioutil"
"os"
"path/filepath"
"strings"
"regexp"
log "github.com/Sirupsen/logrus"
"github.com/drud/ddev/pkg/appports"
"github.com/drud/ddev/pkg/fileutil"
"github.com/drud/ddev/pkg/util"
"github.com/drud/ddev/pkg/version"
"github.com/pkg/errors"
... |
package maps
import (
"context"
"fmt"
"net/url"
"strings"
"time"
)
const (
// AvoidTolls indicates that the route should avoid toll roads.
AvoidTolls = "tolls"
// AvoidHighways indicates that the route should avoid highways.
AvoidHighways = "highways"
// AvoidFerries indicates that the route should avoid fe... |
// Copyright 2021 CloudWeGo 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... |
package tokay
import (
"encoding/json"
"encoding/xml"
"fmt"
"mime/multipart"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/night-codes/govalidator"
"github.com/night-codes/tokay-websocket"
"github.com/valyala/fasthttp"
)
// SerializeFunc serializes the given data of arbitrary type into a by... |
// dnsbotnet implant
package main
/*
* implant.go
* Connects to dnsbotnet server
* By <NAME>
* Created 20180210
* Last Modified 20180210
*/
import (
"bytes"
"context"
"crypto/tls"
"encoding/hex"
"encoding/json"
"errors"
"flag"
"fmt"
"log"
"math/rand"
"net"
"net/http"
"os"
"os/exec"
"runtime"
"st... |
/*
Copyright 2020 The Knative Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... |
// Copyright 2019 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writin... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: flyteidl/admin/workflow.proto
package admin
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
core "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core"
math "math"
)
// Reference imports t... |
// 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 controller
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"html/template"
"io/fs"
"log"
"net/http"
"os"
"path/filepath"
"github.com/lithammer/shortuuid"
)
var DefaultViewExtensions = []string{".gohtml", ".gotmpl", ".html", ".tmpl"}
type Status struct {
Code int `json:"statusCode"`
Messag... |
// goSrcFinder.go
/*
©2019 H.F.M. MIT license
*/
// Parse go source file and retrieve information about function, variables, structures ...
package goSources
import (
"bytes"
"fmt"
"go/ast"
"go/parser"
"go/token"
"io"
"io/ioutil"
"log"
"os"
"reflect"
"regexp"
"strings"
glfsfo "github.com/hfmrow/gen_l... |
package main
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"sort"
"strings"
"time"
excelize "github.com/360EntSecGroup-Skylar/excelize/v2"
yaml "gopkg.in/yaml.v2"
)
type config struct {
ESUsername string `yaml:"es_username"`
ESPassword string `yaml:"es_password"`
ESAPI s... |
package red
import (
"bufio"
"fmt"
"math"
"strconv"
"time"
"github.com/alxarch/red/resp"
)
// CommandBuilder builds a redis command
type CommandBuilder interface {
BuildCommand(args *ArgBuilder) string
}
// CommandWriter writes a redis command
type CommandWriter interface {
WriteCommand(name string, args ..... |
/*
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... |
// version 2.0.1 2020-05-08
package main
import (
"fmt"
"os"
"bufio"
"strings"
"strconv"
"io"
"bytes"
"regexp"
"flag"
"sync"
"runtime"
"time"
)
type Index_line struct {
seq_name string
start int64
stop int64
}
type Search_opt struct{
string_match bool
header_match bool
case_sensitive bool
both_dire... |
package plugs
import (
"strings"
)
var plug_maps = make(map[string]Plug)
type Plug struct {
Plug_type string
Volts string
Hertz string
}
// This will display the following properties of a specified country:
// Plug_type - string
// Volts - string
// Hertz - string
func Display(country string) Plug {
re... |
package kgo
import (
"bytes"
"crypto/md5"
"crypto/sha1"
"crypto/sha256"
"crypto/sha512"
"encoding/binary"
"encoding/hex"
"fmt"
"hash"
"os"
"path/filepath"
"reflect"
"regexp"
"strconv"
"strings"
"unicode"
"unicode/utf8"
"unsafe"
)
// md5Str 计算字符串的 MD5 散列值.
func md5Str(str []byte, length uint8) []byte... |
package paystack
import (
"bytes"
"context"
"encoding/json"
"fmt"
"github.com/google/go-querystring/query"
"github.com/kehindesalaam/mapstructure"
"io"
"io/ioutil"
"net/http"
"net/url"
"reflect"
"strings"
"sync"
"time"
)
const (
libraryVersion = "1.0"
defaultBaseURL = "https://api.paystack.co/"
userA... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: list_agent.proto
package agent
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
agent_admin "github.com/easyopsapis/easyops-api-go/protorepo-models/easyops/mode... |
// Package knox is a package to provide the basic types to be used across client and server.
package knox
import (
"crypto/sha256"
"encoding/binary"
"encoding/hex"
"encoding/json"
"fmt"
"net/url"
"regexp"
"sort"
"strings"
authz_utils "github.com/pavelzhurov/authz-utils"
)
var (
ErrACLDuplicateEntries = fm... |
package raft
//
// this is an outline of the API that raft must expose to
// the service (or tester). see comments below for
// each of these functions for more details.
//
// rf = Make(...)
// create a new Raft server.
// rf.Start(command interface{}) (index, term, isleader)
// start agreement on a new log entry
... |
/*
* @Author: thepoy
* @Email: <EMAIL>
* @File Name: craw.go
* @Created: 2021-07-23 08:52:17
* @Modified: 2021-11-05 14:31:48
*/
package predator
import (
"context"
"errors"
"fmt"
"net/url"
"strings"
"sync"
"sync/atomic"
"github.com/PuerkitoBio/goquery"
"github.com/rs/zerolog"
"g... |
package main
import (
"context"
"flag"
"fmt"
"math"
"math/rand"
"strings"
"sync/atomic"
"time"
v1 "github.com/stackrox/rox/generated/api/v1"
"github.com/stackrox/rox/generated/internalapi/central"
"github.com/stackrox/rox/generated/storage"
"github.com/stackrox/rox/pkg/centralsensor"
"github.com/stackrox... |
package deadmanssnitch
import (
"context"
"github.com/go-logr/logr"
"github.com/openshift/deadmanssnitch-operator/config"
"github.com/openshift/deadmanssnitch-operator/pkg/dmsclient"
"github.com/openshift/deadmanssnitch-operator/pkg/utils"
hivev1 "github.com/openshift/hive/pkg/apis/hive/v1"
corev1 "k8s.io/api... |
package ast
import (
"bytes"
"fmt"
"strings"
"github.com/yourfavoritedev/golang-interpreter/token"
)
// Node is the interface that wraps TokenLiteral method
//
// TokenLiteral() should return a token's literal value (Token.Literal) in a Node
// String() should return the AST node as a string
type Node interface ... |
/*
* Copyright (c) 2017 AlexRuzin (<EMAIL>)
*
* 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,... |
// This is a small simulator of the risc-v processor.
// It is going to simulate the same way as the venus simulator by kvakil
// (https://github.com/kvakil/venus).
package main
import (
"bytes"
"encoding/binary"
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
"text/tabwriter"
)
// readBinary r... |
// Package replayer implements an Ethereum transaction replayer.
package replayer
import (
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"math/big"
"os"
"path/filepath"
"strconv"
"strings"
"time"
"github.com/aurora-is-near/evm-bully/db"
"github.com/aurora-is-near/evm-bully/replayer/neard"
"github.com/aur... |
package box2d
import (
"fmt"
"math"
)
/// Distance joint definition. This requires defining an
/// anchor point on both bodies and the non-zero length of the
/// distance joint. The definition uses local anchor points
/// so that the initial configuration can violate the constraint
/// slightly. This helps when sav... |
/* Si consideri un grande complesso museale, suddiviso in due aree distinte:
•Il museo, che consiste in ’esposizione permanente
•una sala mostre, dove vengono organizzate mostre temporanee dedicate a temi vari.
I visitatori del complesso museale possono essere di tre tipi:
• visitatori che accedono solo al museo,
• vis... |
// Copyright © 2021 <NAME> <<EMAIL>>.
// Copyright © 2021 Gridfinity, LLC.
// Copyright © 2019 Neal.
// Copyright © 2018 <EMAIL>.
//
// Use of this source code is governed by the MIT
// license that can be found in the LICENSE file.
//go:build linux
// +build linux
package gonuma // import "github.com/johnsonjh/gonum... |
package leveldb
import (
"fmt"
"io"
"os"
"runtime"
"sort"
"sync"
"sync/atomic"
"github.com/kezhuw/leveldb/internal/batch"
"github.com/kezhuw/leveldb/internal/compactor"
"github.com/kezhuw/leveldb/internal/configs"
"github.com/kezhuw/leveldb/internal/errors"
"github.com/kezhuw/leveldb/internal/file"
"gith... |
package auth
import (
"bytes"
"encoding/base64"
"fmt"
"strconv"
"testing"
)
/**
* Unit tests
*/
func TestNewHashConfiguration(t *testing.T) {
fmt.Println("Testing function NewHashConfiguration")
t.Log("\tIt should not produce any errors for valid sets of parameters")
// Use the container type directly ins... |
package main
/****************************
* 参考: https://github.com/cppla/ServerStatus/blob/master/clients/client-psutil.py
* Author: chn-student & cppla
* 依赖于 gopstil 跨平台库
* 编译版本:go 1.15.5
* 时间: 20201211
* 说明: 默认情况下修改server和user就可以了。丢包率监测方向可以自定义,例如:CU = "www.facebook.com"。
****************************/
import (
"fmt... |
package summary
import (
"fmt"
"strconv"
"github.com/JamesClonk/iRcollector/database"
"github.com/JamesClonk/iRvisualizer/image"
scheme "github.com/JamesClonk/iRvisualizer/image/color"
"github.com/JamesClonk/iRvisualizer/log"
"github.com/fogleman/gg"
"github.com/prometheus/client_golang/prometheus"
"github.c... |
package asm
import (
"fmt"
"io"
"os"
"path"
"reflect"
"sort"
"strings"
"github.com/awalterschulze/gographviz"
"github.com/llir/llvm/ir"
"github.com/llir/llvm/ir/enum"
"github.com/llir/llvm/ir/metadata"
)
type Mapping struct {
src *ir.Block
dst *ir.Block
dice float64
n_dice float64
common int
... |
package main
import (
"encoding/hex"
//"flag"
"fmt"
"github.com/handcraftsman/GeneticGo"
"github.com/willf/bitset"
"io/ioutil"
"math"
"os"
"reflect"
"runtime"
"sync/atomic"
"time"
"unsafe"
)
type (
petya_matrix struct {
Const0 uint16
Key0 uint16
Key2 uint16
Key4 uint16
Key6 uint16... |
/* Apache v2 license
* Copyright (C) <2019> Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
package main
import (
"bytes"
"context"
"database/sql"
"encoding/base64"
"encoding/json"
"fmt"
"github.com/edgexfoundry/app-functions-sdk-go/appcontext"
"github.com/edgexfoundry/app-functions-sdk-go/app... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.12.3
// source: cron.proto
package cron
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grp... |
package plumbing
import (
"encoding/pem"
"fmt"
"math"
"sort"
"strings"
"time"
"github.com/AlekSi/pointer"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/gohugoio/hugo/parser/pageparser"
"github.com/make-os/kit/util"
"github.com/pkg/errors"
"github.com/spf... |
//go:generate enumer -type HashFunc
package xmssmt
import (
"encoding/binary"
"fmt"
"reflect"
)
type HashFunc uint8
const (
SHA2 HashFunc = iota
SHAKE
)
// Parameters of an XMSS[MT] instance
type Params struct {
Func HashFunc // which has function to use
N uint32 // security parameter: infl... |
/*
* Copyright (C) 2018 The ontology Authors
* This file is part of The ontology library.
*
* The ontology 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, or
* (a... |
package traceroute
import (
"context"
"errors"
"golang.org/x/net/icmp"
"golang.org/x/net/ipv4"
"golang.org/x/net/ipv6"
"log"
"net"
"sort"
"sync"
"sync/atomic"
"syscall"
"time"
)
// DefaultConfig is the default configuration for Tracer.
var DefaultConfig = Config{
Delay: 50 * time.Millisecond,
Timeout... |
/*
*
* BoltWorker - A very simple worker for go buffalo with persistence via boltDB.
* This code is a modification of SimpleWorker implemented here
* https://github.com/gobuffalo/buffalo/blob/master/worker/simple.go
* and supports persistence via boltDB.
* Also supports performing tasks via grift tasks of your bu... |
package logic
import (
"errors"
"fmt"
"reflect"
)
const (
spinTypeMain = "main"
spinTypeFree = "free"
)
var (
// ErrNonPositiveBet is an error value returned by Machine.Spin method when bet is non positive.
ErrNonPositiveBet = errors.New("bet is not positive")
// ErrBadNLines is an error value returned by Ma... |
package opl2
import "math"
// This file is a Pure Go conversion of dbopl.h/.cpp
/*
* Copyright (C) 2002-2013 The DOSBox Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either... |
package sdktests
import (
"time"
h "github.com/launchdarkly/sdk-test-harness/framework/helpers"
"github.com/launchdarkly/sdk-test-harness/framework/ldtest"
o "github.com/launchdarkly/sdk-test-harness/framework/opt"
"github.com/launchdarkly/sdk-test-harness/mockld"
"github.com/launchdarkly/sdk-test-harness/servi... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: destination.proto
package events
import (
fmt "fmt"
destinations "github.com/batchcorp/schemas/build/go/events/destinations"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
v... |
// Copyright 2020 WHTCORPS INC, 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... |
// XDPRelay uses Linux AF_XDP socket as the underlying forwarding mechinism, so it achives higher performance than RawSocketRelay;
// XDPRelay usage notes:
// 1. for virtio interface, the number of queues provisioned needs to be 2x of number CPU cores VM has, binding will fail otherwise.
// 2. AF_XDP is still relative ... |
/*
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... |
// TODO: expose env vars with KUBETRON_NETWORK_NAME="interface_name" to containers
package admission
import (
"encoding/json"
"fmt"
"math/rand"
"net/http"
"strconv"
"strings"
"github.com/golang/glog"
"github.com/mattbaird/jsonpatch"
"github.com/phoracek/kubetron/pkg/spec"
admissionv1beta1 "k8s.io/api/admiss... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: envoy/api/v2/core/http_uri.proto
package envoy_api_v2_core
import (
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/gola... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/api/monitored_resource.proto
package monitoredres // import "github.com/sunnogo/go-genproto/googleapis/api/monitoredres"
import proto "github.com/sunnogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _struct "github.com/sunnogo/protobuf/p... |
/*
Copyright 2015 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... |
//nolint:gocritic
package lgtm
import (
"bytes"
"fmt"
"regexp"
"strconv"
"strings"
"text/template"
"time"
"github.com/sirupsen/logrus"
"github.com/ti-community-infra/tichi/internal/pkg/ownersclient"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/test-infra/prow/config"
"k8s.io/test-infra/prow/github"
"k8s.i... |
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not... |
// Copyright 2019 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
// Copyright 2018 The Go Cloud Development Kit Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... |
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use ... |
// Copyright (c) 2019-2020 The Zcash developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://www.opensource.org/licenses/mit-license.php .
// Package parser deserializes (full) transactions (zcashd).
package parser
import (
"crypto/sha256"
"github.com/pkg/errors"
... |
package money
import (
"fmt"
"strconv"
"testing"
)
var (
testUSDMoneyParser = moneyParser{decimalIndicator: '.', groupingIndicator: ',', minorUnits: 2}
testEURMoneyParser = moneyParser{decimalIndicator: ',', groupingIndicator: '.', minorUnits: 2}
testJPYMoneyParser = moneyParser{decimalIndicator: '.', groupingI... |
// Copyright 2019 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, ... |
// 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 types
import (
"bytes"
"fmt"
"sort"
"cmd/compile/internal/base"
"cmd/internal/src"
)
var PtrSize int
var RegSize int
// Slices in the runtime ... |
/*
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
distributed ... |
package kline
import (
"errors"
"fmt"
"sort"
"strings"
"sync"
"time"
"github.com/openware/pkg/common"
"github.com/openware/pkg/currency"
"github.com/openware/pkg/asset"
"github.com/openware/pkg/order"
)
// CreateKline creates candles out of trade history data for a set time interval
func CreateKline(trades... |
// Copyright 2020 The Atlas 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 app... |
/*
Copyright 2018 Red Hat, 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, software
di... |
// Copyright 2022 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package main
import (
"crypto/tls"
"encoding/base64"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"os/exec"
"path/filepath"
"runtime"
"sort"
"strings"
"sync"
"text/template"
"time"
"github.com/getlantern/golog"
"github.com/getlantern/keyman"
"github.com/getlantern/tlsdialer"
"gi... |
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"strconv"
)
var (
ERR_PARSE_BODY_EMPTY = fmt.Errorf("Parse Body Empty")
ERR_RESULT_ALREADYEXISTS = fmt.Errorf("Result Line Already Exists")
ERR_RESULT_DOESNTEXIST = fmt.Errorf("Result Object D... |
package main
import (
"context"
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"os"
"os/exec"
"path"
"path/filepath"
"sort"
"testing"
"github.com/lightstep/opentelemetry-prometheus-sidecar/config"
"github.com/lightstep/opentelemetry-prometheus-sidecar/internal/otlptest"
"github.c... |
// Copyright (c) 2017 <NAME>, Inc.
// Use of this source code is governed by the Apache License 2.0
// that can be found in the COPYING file.
package main
import (
"flag"
"fmt"
"os"
"sort"
"strings"
"sync/atomic"
"time"
"golang.org/x/net/context"
"golang.org/x/sync/errgroup"
"github.com/aristanetworks/quan... |
package wann
import (
"errors"
"fmt"
"math/rand"
"strconv"
"strings"
)
// NeuronIndex is an index into the AllNodes slice
type NeuronIndex int
// Network is a collection of nodes, an output node and a shared weight.
type Network struct {
AllNodes []Neuron // Storing the actual neurons
InputNodes []Neur... |
// Copyright 2014 <NAME>. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package gin
import (
"errors"
"io"
"math"
"net"
"net/http"
"net/url"
"strings"
"time"
"github.com/gin-gonic/gin/binding"
"github.com/gin-gonic/gin/render"
... |
package common
import (
"fmt"
"net"
"os"
"path/filepath"
"strconv"
"strings"
"github.com/containers/podman/v3/cmd/podman/registry"
"github.com/containers/podman/v3/pkg/api/handlers"
"github.com/containers/podman/v3/pkg/cgroups"
"github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/po... |
// Copyright 2015 The LUCI 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... |
// Copyright 2017-2018 DERO Project. All rights reserved.
// Use of this source code in any form is governed by RESEARCH license.
// license can be found in the LICENSE file.
// GPG: 0F39 E425 8C65 3947 702A 8234 08B2 0360 A03A 9DE8
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" A... |
// Copyright 2018 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, ... |
// Copyright 2012 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 colltab
import (
"fmt"
"unicode"
)
// Level identifies the collation comparison level.
// The primary level corresponds to the basic sor... |
// Go support for Protocol Buffers - Google's data interchange format
//
// Copyright 2010 The Go Authors. All rights reserved.
// https://github.com/golang/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
... |
//go:build windows
// +build windows
/*
Copyright 2020 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 ap... |
// Copyright 2014 beego Author. 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... |
/*
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 imagepolicy
import (
"fmt"
"io"
"strings"
"time"
"github.com/golang/glog"
lru "github.com/hashicorp/golang-lru"
apierrs "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apiserver/... |
package backrest
/*
Copyright 2018 - 2021 Crunchy Data Solutions, 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 appl... |
/*
Copyright 2021 The Kubeflow 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, so... |
// Copyright 2019 Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
// Package hll contains a HyperLogLog++ with a LogLog-Beta bias correction implementation that is adapted (mostly
// copied) from an implementation provided by <NAME>
// github.com/clarkduvall/hyperloglog.
//
// The differences are that the implementation in this package:
//
// * uses an AMD64 optimised xxhash algori... |
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --package=v1 --generate types,spec,client,server -o openapi.v1.gen.go openapi.v1.yml
package v1
import (
"crypto/rand"
"encoding/json"
"fmt"
"math"
"math/big"
"net/http"
"strings"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
"... |
package ping
import (
"context"
"errors"
"fmt"
"math"
"net"
"os/exec"
"runtime"
"sort"
"strings"
"sync"
"time"
"github.com/circonus-labs/circonus-unified-agent/cua"
"github.com/circonus-labs/circonus-unified-agent/internal"
circmgr "github.com/circonus-labs/circonus-unified-agent/internal/circonus"
"gi... |
// Copyright 2019 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.