text
stringlengths
3.08k
10.4k
/* Copyright 2017 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 runner import ( "context" "fmt" "io/ioutil" "path/filepath" "regexp" "runtime" "strings" "github.com/nektos/act/pkg/common" "github.com/nektos/act/pkg/model" log "github.com/sirupsen/logrus" ) // Runner provides capabilities to run GitHub actions type Runner interface { NewPlanExecutor(plan *model...
// Copyright © 2016 <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...
package main import ( "encoding/json" "fmt" "io/ioutil" "os" "path/filepath" "strings" "time" "github.com/imdario/mergo" "gopkg.in/russross/blackfriday.v2" ) // getLocalPosts reads posts from local directory func getLocalPosts() (posts []Post) { files, err := ioutil.ReadDir("./posts") if err != nil { lo...
// sqsfill sends any number of messages to an SQS queue. For testing purposes. // You can specify a message body, or read one from a file. The message body // will have the ID prepended, so that each message body is unique. // // Usage of ./sqsfill: // -b string // Message body template (default "Message_Body") // -...
/* * Copyright (c) 2012-2020 MIRACL UK Ltd. * * This file is part of MIRACL Core * (see https://github.com/miracl/core). * * 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...
// Copyright 2019 Yunion // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
/* Copyright 2016 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 gen import ( "errors" "fmt" "os" "path/filepath" "regexp" "strings" "github.com/go-clang/bootstrap/clang" ) // HeaderFile represents a generation headerfile. type HeaderFile struct { Lookup api *API Filename string Path string Enums []*Enum Functions []*Function Structs []*Struct }...
/* Package client provides access to the workflow service. You can use this client to: Submit a *pb.WorkReq to the service Execute a *pb.WorkReq previously submitted Get the status of a *pb.WorkReq See the README.md in the root workflow/ directory for more information. SECURITY NOTICE: As this is an example for a ...
package main import ( "context" "fmt" "io" "github.com/pkg/errors" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" "github.com/openservicemesh/osm/pkg/constants" ) const namespaceAddDescri...
package common import ( "reflect" "testing" ) func Test_getWikiLinks(t *testing.T) { type args struct { content []string } tests := []struct { name string args args want []string }{ { name: "", args: args{ content: []string{ "text [[202202261908]] and", "[[202202261909]] another li...
package okta_test import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "os" "testing" "time" "github.com/cenkalti/backoff" "github.com/headzoo/surf" "github.com/rs/zerolog" "github.com/simonswine/okta-kubectl-auth/pkg/okta" ) const envAdminAPIToken = "OKTA_ADMIN_API_TOKEN" const envO...
// Copyright (c) 2016 <NAME>. All rights reserved. // Use of this source code is governed by a license that can be // found in the LICENSE file. // +build amd64, !gccgo, !appengine package poly1305 import ( "golang.org/x/sys/cpu" "io" ) var useAVX2 = cpu.X86.HasAVX2 //go:noescape func initialize(state *[7]uint64...
// Code generated by gotdgen, DO NOT EDIT. package tg import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _ = context.Background() _ = fmt...
package fictionpress import ( "context" "errors" "fmt" "html" "net/http" "net/url" "strconv" "strings" "time" "github.com/PuerkitoBio/goquery" "github.com/fortytw2/hydrocarbon" dc "github.com/fortytw2/hydrocarbon/discollect" "github.com/fortytw2/hydrocarbon/httpx" ) // Plugin is a plugin that can scrap...
package commands import ( "context" "fmt" "io/ioutil" "os" "os/exec" "syscall" "github.com/ghodss/yaml" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" cmdutil "github.com/argoproj/argo-cd/cmd/util" "github.com/argoproj/argo-cd/u...
package integration import ( "bufio" "bytes" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "runtime" "syscall" "testing" "time" "github.com/google/shlex" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) func init() { register(&oci{}) // the rootless uid is defined in hack/dockerfiles/test.D...
package potofgreed import ( "bytes" "fmt" "io" "sort" "github.com/go-yaml/yaml" "github.com/iancoleman/strcase" "github.com/zwzn/potofgreed/data" "golang.org/x/xerrors" ) // Options is a configuration object used to generate the go files type Options struct { Version float32 `yaml:"version"` ...
package helper import ( "github.com/joeqian10/neo3-gogogo-legacy/io" "testing" "github.com/stretchr/testify/assert" ) func TestNewUInt256(t *testing.T) { u := NewUInt256() assert.NotNil(t, u) assert.Equal(t, uint64(0), u.Value1) } func TestUInt256FromBytes(t *testing.T) { b := make([]byte, UINT256SIZE) u :=...
// Licensed to LinDB under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. LinDB licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use this file except in compli...
package data import ( "bytes" "encoding/binary" "hash" "io" "unicode/utf8" "github.com/kiteco/kiteco/kite-golib/stringindex" "github.com/kiteco/kiteco/kite-golib/unsafe" "github.com/minio/highwayhash" ) var hashKey [32]byte // use a zero key for all hashes for convenience var cr = []byte("\r") // carriage r...
package checkpoint import ( "github.com/emqx/kuiper/pkg/api" ) type BarrierHandler interface { Process(data *BufferOrEvent, ctx api.StreamContext) bool //If data is barrier return true, else return false SetOutput(chan<- *BufferOrEvent) //It is using for block a channel } //For qos 1, simp...
package cmd import ( "errors" "fmt" "github.com/outofbits/sesameFS/sesamefs/fs" "github.com/outofbits/sesameFS/sesamefs/server" "github.com/outofbits/sesameFS/sesamefs/vault" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "os" "os/signal" "os/user" "strconv" "syscall" ) const ( DefaultUID uint...
package milter_test import ( "bytes" "fmt" "log" "net" "net/textproto" "os" "strings" "testing" "io" "github.com/mschneider82/milter" "github.com/mschneider82/milterclient" ) /* TestMilter object */ type TestMilter struct { multipart bool message *bytes.Buffer } // https://github.com/mschneider82/mi...
package dyml import ( "dyml-support/protocol" "path/filepath" "strings" "github.com/golangee/dyml/encoder" "github.com/golangee/dyml/parser" "github.com/golangee/dyml/token" ) // DYML language server. type Server struct { // Map from Uri's to files. files map[protocol.DocumentURI]File } func NewServer() Ser...
package copypasta import ( "container/heap" "sort" ) /* 思维转换 https://www.luogu.com.cn/problem/P2859 https://www.luogu.com.cn/problem/P4952 枚举中位数 https://codeforces.com/contest/713/problem/C 使序列严格递增的最小操作次数 (+1/-1) https://codeforces.com/blog/entry/47094?#comment-315068 https://codeforces....
/* Copyright 2014 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 2019 Gravitational, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
package conf import ( "errors" "fmt" "math" "strconv" "strings" "github.com/grafana/metrictank/schema" "github.com/grafana/metrictank/mdata/chunk" "github.com/raintank/dur" ) const Month_sec = 60 * 60 * 24 * 28 var errReadyFormat = errors.New("'ready' field must be a bool or unsigned integer") type Retent...
// Copyright 2019 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 2018 <NAME>. // Use of this source code is governed by the MIT // license that can be found in the LICENSE.txt file. package collector import ( "encoding/json" "fmt" "strings" p "github.com/prometheus/client_golang/prometheus" log "github.com/sirupsen/logrus" ) // XDCRExporter describes the export...
package disk import ( "context" "fmt" "os" "path/filepath" "github.com/shaj13/raft/internal/storage" "github.com/shaj13/raft/raftlog" "go.etcd.io/etcd/pkg/v3/fileutil" "go.etcd.io/etcd/raft/v3/raftpb" "go.etcd.io/etcd/server/v3/wal" "go.etcd.io/etcd/server/v3/wal/walpb" ) var _ storage.Storage = &disk{} /...
package kushki import ( "bytes" "encoding/json" "net/url" ) const ( chargesURL = baseURL + "/charges" ) // Charge objeto request cargo type Charge struct { Amount int `json:"amount"` Capture bool `json:"capture"` CurrencyCode string `json:"currency_code"` Desc...
// Code generated by go-swagger; DO NOT EDIT. package releases // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "net/http" "os" "time" "golang.org/x/net/context" "github.com/go-openapi/errors" "github.com/go-openapi/...
package main import ( "fmt" "os" "os/exec" "runtime" "strings" "github.com/gonuts/commander" "github.com/gonuts/flag" "github.com/lhcb-org/lbx/lbenv" ) func lbx_make_cmd_run() *commander.Command { cmd := &commander.Command{ Run: lbx_run_cmd_run, UsageLine: "run", Short: "run a command with t...
package deplactive import ( "fmt" "io" "strconv" "strings" "github.com/containerum/chkit/pkg/model/container" "github.com/containerum/chkit/pkg/model/limits" "github.com/containerum/chkit/pkg/util/activekit" "github.com/containerum/chkit/pkg/util/namegen" "github.com/containerum/chkit/pkg/util/validation" "...
// Code generated by gotdgen, DO NOT EDIT. package tg import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdjson" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _ = ...
package cc import ( "encoding/json" "fmt" "io/ioutil" "strconv" "strings" emp3r0r_data "github.com/jm33-m0/emp3r0r/core/lib/data" "github.com/jm33-m0/emp3r0r/core/lib/tun" "github.com/jm33-m0/emp3r0r/core/lib/util" "github.com/olekukonko/tablewriter" ) // ModConfig config.json of a module // { // "name"...
package main import ( "fmt" "log" "regexp" ) type Syntax map[Component]([]IVariant) type Component string type IVariant interface { Test(ego *string) (loc []int) // PRE-REQUISITE: *first line* of param `ego` must match variant's definition Get(ego *string, end int, syntax Syntax) (code string, err error) S...
package writer import ( "context" "fmt" "sync" "time" ibatch "github.com/Jeffail/benthos/v3/internal/batch" "github.com/Jeffail/benthos/v3/internal/component/output" bredis "github.com/Jeffail/benthos/v3/internal/impl/redis" "github.com/Jeffail/benthos/v3/lib/log" "github.com/Jeffail/benthos/v3/lib/message/b...
package civogo import ( "bytes" "encoding/json" "fmt" "strings" "time" ) // Volume is a block of attachable storage for our IAAS products // https://www.civo.com/api/volumes type Volume struct { ID string `json:"id"` Name string `json:"name"` InstanceID string `json:"instance_i...
// Copyright 2021, Chef. All rights reserved. // https://github.com/q191201771/naza // // Use of this source code is governed by a MIT-style license // that can be found in the License file. // // Author: Chef (<EMAIL>) package nazasync import ( "fmt" "strings" "sync" "time" "github.com/q191201771/naza/pkg/uni...
// Derived from Inferno utils/6c/reg.c // http://code.google.com/p/inferno-os/source/browse/utils/6c/reg.c // // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. // Portions Copyright © 1995-1997 <NAME> (<EMAIL>) // Portions Copyright © 1997-1999 Vita Nuova Limited // Portions Copyright © 2000-2007 ...
package event import ( "fmt" "time" "database/sql" log "github.com/Sirupsen/logrus" "github.com/astaxie/beego/orm" coommonModel "github.com/open-falcon/falcon-plus/common/model" "github.com/open-falcon/falcon-plus/common/utils" ) const timeLayout = "2006-01-02 15:04:05" func insertEvent(q orm.Ormer, eve *co...
package biz import ( "fmt" "math" "sort" "strconv" "sync" "edu/service/im/internal/model" "github.com/go-kratos/kratos/v2/log" "github.com/go-kratos/kratos/v2/registry" ) const ( _minWeight = 1 _maxWeight = 1 << 20 _maxNodes = 5 ) type weightedNode struct { region string hostname string ...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package main import ( "bytes" "crypto/tls" "crypto/x509" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "os" "github.com/golang/protobuf/proto" "github.com/hyperledger/fabric-protos-go/common" "github.com/hyperledger/f...
// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved. // Code generated. DO NOT EDIT. // Monitoring API // // Use the Monitoring API to manage metric queries and alarms for assessing the health, capacity, and performance of your cloud resources. // Endpoints vary by operation. For PostM...
package chat import ( "gonet/actor" "gonet/base" "gonet/common/cluster" "gonet/rpc" "gonet/server/gm" "gonet/server/message" "time" "golang.org/x/net/context" ) const ( CHAT_PENDING_TIME_NORAML = 1 CHAT_PENDING_TIME_PRIVATE = 1 CHAT_PENDING_TIME_WORLDPLUS = 1 ) type ( ChatMessage struct { Sender ...
// Package gsm provides transformers for encoding/decoding GSM // character set into/from UTF-8. // It relies on interfaces defined by golang.org/x/text/transform // // More details can be found here https://godoc.org/golang.org/x/text/transform#Transformer package gsm import ( "unicode/utf8" "golang.org/x/text/tra...
package util import ( "strings" "testing" "github.com/stretchr/testify/assert" ) func TestSafeString(t *testing.T) { assert.Equal(t, SafeString("123"), "123") assert.Equal(t, SafeString(StringPtr("123")), "123") assert.Equal(t, SafeString(123), "123") assert.Equal(t, SafeString(nil), "") var ptr *string as...
//go:generate nodejs ../resources/blockchain/scripts/generateAbi.js --contract-package singularitynet-platform-contracts --contract-name MultiPartyEscrow --go-package blockchain --output-file multi_party_escrow.go //go:generate nodejs ../resources/blockchain/scripts/generateAbi.js --contract-package singularitynet-plat...
package tangle import ( "context" "crypto" "crypto/ed25519" "crypto/rand" "sync" "sync/atomic" "testing" "time" "github.com/iotaledger/hive.go/events" "github.com/iotaledger/hive.go/identity" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" _ "golang.org/x/crypto/blake2b" "git...
// Copyright 2018 Drone.IO 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 ...
// Copyright (c) 2012-present The upper.io/db authors. All rights reserved. // // 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...
/* 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, soft...
/* Copyright 2018 The OpenEBS 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...
/* SPDX-License-Identifier: Apache-2.0 Copyright Contributors to the Submariner 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 requ...
// Package ftpserver provides all the tools to build your own FTP server: The core library and the driver. package ftpserver import ( "crypto/tls" "io" "net" "os" "github.com/spf13/afero" ) // This file is the driver part of the server. It must be implemented by anyone wanting to use the server. // MainDriver ...
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
// Copyright (c) 2015 Uber Technologies, Inc. // 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, ...
// Code generated by go-swagger; DO NOT EDIT. package search_saved // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "net/http" "time" "golang.org/x/net/context" "github.com/go-openapi/errors" "github.com/go-openapi/ru...
package plugin import ( "github.com/golangmc/minecraft-server/apis/buff" "github.com/golangmc/minecraft-server/apis/data" ) type Message interface { Chan() string buff.BufferPush buff.BufferPull } var registry = createMessageRegistry() type MessageRegistry struct { channels map[string]func() Message } func ...
package x import ( "container/list" "sync" "sync/atomic" "github.com/vegertar/mux/x/radix" ) // Label is used to represent a value. type Label struct { Value Key radix.Key h list.List m list.List mu sync.RWMutex } // Clone returns a shadow copy func (p *Label) Clone() *Label { p.mu.RLock() defer p.mu....
/** * Copyright 2022 chyroc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writi...
package ali_mns import ( "crypto/md5" "encoding/base64" "encoding/xml" "fmt" "net/http" "net/url" "strings" "sync" "time" "github.com/gogap/errors" "github.com/mreiferson/go-httpclient" ) const ( version = "2015-06-06" ) const ( DefaultTimeout int64 = 35 ) type Method string var ( errMapping map[str...
package dialtesting import ( "fmt" "net/url" "strings" "time" "gitlab.jiagouyun.com/cloudcare-tools/datakit" "gitlab.jiagouyun.com/cloudcare-tools/datakit/io" "gitlab.jiagouyun.com/cloudcare-tools/datakit/plugins/inputs" dt "gitlab.jiagouyun.com/cloudcare-tools/kodo/dialtesting" ) type dialer struct { task ...
// Copyright © 2019 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 agr...
package input import ( "github.com/Katano-Sukune/xpcd/txscript" "github.com/Katano-Sukune/xpcd/wire" ) // Input represents an abstract UTXO which is to be spent using a sweeping // transaction. The method provided give the caller all information needed to // construct a valid input within a sweeping transaction to ...
// Copyright (c) 2020 Uber Technologies, Inc. // // 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...
package gdax import ( "testing" "encoding/json" "context" "github.com/google/uuid" "time" ) func TestLimitOrderRequest_MarshalJSON(t *testing.T) { cases := []struct { input LimitOrderRequest expected string }{ { input: LimitOrderRequest{ Side: Buy, ProductId: "BTC-USD", Price: ...
// package reversehttp implements a simple scheme for reversing the // request/response flow of HTTP in go. // // The listener accepts connections from a TCP client, which polls the // server for requests. The request is passed to the handler on the // client, and the response is passed back to the server. // // Althou...
package hash type genericHashMapEntry struct { key uint value interface{} } type genericHashMapBucket struct { bits uint count uint entries [entriesPerHashBucket]genericHashMapEntry } type GenericHashMapIterator struct { m *GenericHashMap started ...
package logger import ( "fmt" "io" "log" "net/http" "os" "strconv" "strings" "sync" ) // ... const ( LoggerLevel0Debug = iota // 测试信息 绿色 LoggerLevel1Warning // 警告信息 黄色 LoggerLevel2Error // 错误信息 红色 LoggerLevel3Fatal // 严重信息 高亮红色 LoggerLevel4Trace // 打印信息 灰色 LoggerLevel...
package sentry import ( "encoding/json" "flag" "fmt" "io/ioutil" "net/http/httptest" "path/filepath" "strings" "testing" "time" "github.com/google/go-cmp/cmp" ) var update = flag.Bool("update", false, "update .golden files") func TestNewRequest(t *testing.T) { const payload = `{"test_data": true}` got :...
package main import ( "errors" "fmt" "io" "regexp" "strconv" "time" "github.com/ebc-2in2crc/wareki" "github.com/urfave/cli" ) const ( exitCodeOK = iota exitCodeError ) // CLO 標準入出力を入れ替えるための構造体 type CLO struct { outStream, errStream io.Writer } var clo *CLO // Run エントリーポイント func (c *CLO) Run(args []stri...
package main import ( "math" "sort" ) type P2 struct { Count int Q []float64 Dn []float64 Np []float64 N []int } func createP2() *P2 { p2 := P2{ Count: 0, } p2.addEndMarkers() return &p2 } func (p *P2) addEndMarkers() { p.Q = make([]float64, 2, 5) p.Dn = make([]float64, 2, 5) p.Np = ma...
package main import ( "encoding/json" "net/http" "net/url" "os" "path" "strconv" "strings" "time" "github.com/pkg/errors" ) var ( knownTotalXP int64 knownFeed time.Time playerInfoCache *playerInfo ) type activity struct { Date string `json:"date"` Details string `json:"details"` Text string...
// Copyright © 2018 maple-leaf <<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 ag...
/* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License...
package main // This is inspired by the Neural Style tutorial from PyTorch.org // https://pytorch.org/tutorials/advanced/neural_style_tutorial.html import ( "flag" "fmt" "log" "path/filepath" "time" "github.com/sugarme/gotch" "github.com/sugarme/gotch/nn" ts "github.com/sugarme/gotch/tensor" "github.com/s...
/* Package xpath contains tools to handle XPath evaluation. Because of a very quirky dependency between this package and the github.com/lestrrat/libxml2/dom package, you MUST import both packages to properly use it. import ( "github.com/wayf-dk/go-libxml2/dom" "github.com/wayf-dk/go-libxml2/xpath" ) Or, if yo...
package consumers import ( "errors" "fmt" "strconv" config "github.com/lensesio/lenses-go/pkg/configs" "github.com/spf13/cobra" ) const ( consumersCmdDescLong string = "APIs for managing Kafka consumer groups." offsetsCmdDescLong string = "APIs for managing Kafka consumer groups partition offsets." update...
/* Copyright © 2021 <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 in writing, softwar...
package v1alpha1 import ( catalog "github.com/metaprov/modelaapi/pkg/apis/catalog/v1alpha1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // LabConditionType is the condition of the lab type LabConditionType string /// TenantRef Condition const...
/* * Licensed to the Apache Software Foundation (ASF) 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 ...
/*************************** @File : cents.go @Time : 2021/08/27 16:45:49 @AUTHOR : small_ant @Email : <EMAIL> @Desc : 盈利分红 ****************************/ package model import ( "fmt" "time" ) // CentsUser 用户分红 func CentsUser(money float64, uId float64, from interface{}) { ...
// Copyright 2014 The go-gl Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE.go-gl file. package math import ( "errors" "math" ) // Ortho generates an Ortho Matrix. func Ortho(left, right, bottom, top, near, far float32) Mat4 { rml, tm...
/* Copyright 2021 The Operating System Manager 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://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
/* * Copyright IBM Corporation 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 o...
// Copyright 2019 Antrea 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 ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: execResult.proto package db import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile...
// +build neutron /* * Copyright (C) 2016 Red Hat, Inc. * * Licensed to the Apache Software Foundation (ASF) 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 unde...
package util import ( "csust-got/config" "csust-got/log" "fmt" "math/rand" "reflect" "runtime" "strconv" "strings" . "gopkg.in/tucnak/telebot.v3" "go.uber.org/zap" ) // WrapHandler wrap a handler recv `*telebot.Message` to `telebot.Context` func WrapHandler(fn func(*Message)) HandlerFunc { return func(ct...
package dag import ( "bytes" "context" "math" "github.com/pkg/errors" "github.com/gohornet/hornet/pkg/common" "github.com/gohornet/hornet/pkg/model/hornet" "github.com/gohornet/hornet/pkg/model/milestone" "github.com/gohornet/hornet/pkg/model/storage" ) // updateOutdatedConeRootIndexes updates the cone root...
/* Package web handles all web-based user interaction. Users can view and edit Revere components and configurations through its web server. A typical request is routed through the server package to a handler method in the web package. Handler methods then create and manipulate the appropriate VMs, and use the renderabl...
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. package remotecluster import ( "context" "encoding/json" "fmt" "net/http" "net/http/httptest" "sync" "sync/atomic" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/test...
/* * Copyright 2017 The Polycube 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...
// novel package freenovel import ( "bytes" "container/list" "fmt" "io/ioutil" "net/http" "net/url" "os" "strings" "sync" "github.com/PuerkitoBio/goquery" "github.com/go-yaml/yaml" ) var chtReplacer = strings.NewReplacer("<br>", "\r\n", "<br/>", "\r\n", "<br />", "\r\n") var mapYaml map...
package resources import ( "context" "errors" "fmt" "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/vpc-go-sdk/vpcv1" call "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/call-log" idrv "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces" irs "github.co...