text
stringlengths
3.08k
10.4k
package stt import ( "log" "unsafe" "github.com/jawher/mow.cli" "github.com/xlab/closer" "github.com/xlab/pocketsphinx-go/sphinx" "github.com/xlab/portaudio-go/portaudio" "github.com/naryn/maria/models/conversation" "fmt" ) const ( samplesPerChannel = 512 sampleRate = 16000 channels = 1 s...
package pool import ( "context" "fmt" "sync" "time" "github.com/sirupsen/logrus" "github.com/torlenor/redseligg/api" "github.com/torlenor/redseligg/logging" "github.com/torlenor/redseligg/platform" "github.com/torlenor/redseligg/providers" "golang.org/x/sync/errgroup" "golang.org/x/xerrors" ) // BotPool h...
package material import ( xtime "go-common/library/time" ) // consts . const ( StateDelete = 2 StateOff = 1 StateOn = 0 //注意 因为历史原因 bgm 和其他素材没能在bilibili_creative.material一个表集中管理 针对素材类型 为bgm保留了type=3 //字幕库 TypeSubTitle = int8(0) //字体库 TypeFont = int8(1) //滤镜库 TypeFilter = int8(2) //bgm库 TypeBGM =...
// Copyright (c) 2017 Intel 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 ag...
package node import ( "context" "time" "github.com/go-kit/kit/log/level" "github.com/rfratto/croissant/internal/api" "github.com/rfratto/croissant/internal/connpool" "github.com/rfratto/croissant/internal/nodepb" ) func (c *controller) NodeGoodbye(ctx context.Context, leaver api.Descriptor) error { level.Info...
/* Copyright © 2020 esakat <<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, softw...
package client import ( "bytes" "context" "crypto/tls" "fmt" "io/ioutil" "net/http" "runtime" "time" "github.com/cenkalti/backoff/v4" "github.com/VirgilSecurity/virgil-sdk-go/v6/errors" ) var virgilAgentHeader = "Virgil-Agent" // // Codec is interface for marshal/unmarshal // type Codec interface { Mars...
package main import ( "crypto/rand" "flag" "fmt" "io" "log" "net/http" "sync" "time" "github.com/gorilla/websocket" ) const rapidSize = 250 * 1024 const rapidFPS = 25 var port int var crt, key string var host string var s string var ports string var _case string func main() { flag.StringVar(&crt, "crt",...
package main import ( "strconv" "time" "fyne.io/fyne/v2" "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/data/binding" "fyne.io/fyne/v2/layout" "fyne.io/fyne/v2/widget" "golang.design/x/clipboard" ) // go build -ldflags "-w -s -H=windowsgui" var number int64 var numberb4 int64 var histo...
/* Copyright 2020 Redis Labs 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 agreed to in writing, software dis...
package lib import ( "bytes" "encoding/base64" "encoding/hex" "fmt" "io" "net" "os" "path/filepath" "strings" "time" "golang.zx2c4.com/wireguard/wgctrl/wgtypes" yaml "gopkg.in/yaml.v2" ) // IPNet is an unmarshalable version of net.IPNet type IPNet net.IPNet // UDPAddr is an unmarshalable version of net...
package main import ( "context" "log" "os" "os/signal" "sort" "github.com/blevesearch/bleve/v2" "github.com/bwmarrin/discordgo" "github.com/kelseyhightower/envconfig" _ "github.com/blevesearch/bleve/v2/analysis/analyzer/custom" _ "github.com/blevesearch/bleve/v2/analysis/lang/en" _ "github.com/blevesearch...
package main import ( tcell "github.com/gdamore/tcell/v2" "github.com/rivo/tview" "strings" "time" "os/exec" "strconv" ) /*NOTE============= Color codes are [fontcolor:backgroundcolor:flag] "-" resets back to default Flags: "b" Bold text "l" Blinking text "d" Dim text "u" Underline text =============...
package ftp import ( "net/http" "strconv" "time" "github.com/gin-gonic/gin" "github.com/li4n0/revsuit/internal/database" "github.com/li4n0/revsuit/internal/file" "github.com/li4n0/revsuit/internal/ipinfo" "github.com/li4n0/revsuit/internal/notice" "github.com/li4n0/revsuit/internal/record" "gorm.io/gorm" l...
package main import ( "context" "fmt" "log" "os" "os/signal" "strings" "sync" "time" "github.com/gofrs/uuid" "github.com/shellhazard/tmm" "git.sr.ht/~adnano/go-gemini" "git.sr.ht/~adnano/go-gemini/certificate" ) type SessionManager struct { store map[string]*tmm.Session mu sync.Mutex } func (s *Sess...
package cmd import ( "fmt" "log" "os" "os/exec" "runtime" "strings" "github.com/spf13/cobra" util "github.com/woanware/goutil" yaml "gopkg.in/yaml.v2" ) // ##### Variables ########################################################### var cmdRun = &cobra.Command{ Use: "run [atomic path]", Aliases: []str...
package multiaddrsam import ( "encoding/binary" "fmt" "strings" "github.com/eyedeekay/sam3" ma "github.com/multiformats/go-multiaddr" ) // I2PMultiaddr is an i2p-enabled multiaddr, with both types(TCP-like and UDP-like) // capabilities type I2PMultiaddr struct { Name string Code int VCode []byte sam...
// Copyright (c) 2018-2022, Sylabs Inc. All rights reserved. // This software is licensed under a 3-clause BSD license. Please consult the // LICENSE.md file distributed with the sources of this project regarding your // rights to use or distribute this software. package client import ( "errors" "net/url" "strings...
package main import ( "errors" "fmt" "io/ioutil" "strings" "unicode" ) // Point ... type Point struct { row, col int } func (p Point) hash() string { return fmt.Sprintf("%d-%d", p.row, p.col) } func main() { grid := readInput("input.txt") labelsToPoints := indexLabels(grid) res := findShortestPathFromAAto...
package main import ( "encoding/json" "flag" "fmt" "image" "image/color" "io/ioutil" "log" "os" "github.com/fogleman/gg" "github.com/gnoack/path" "github.com/gnoack/tuhirender/imgwriter" "github.com/gnoack/tuhirender/tuhi" ) var ( outfile = flag.String("o", "out.png", "output file") width ...
/* * Cadence - The resource-oriented smart contract programming language * * Copyright 2019-2020 <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....
package vgnumber import ( "math" "strconv" "strings" ) // BigIntSimilar 大数字模拟 type BigIntSimilar struct { value float64 tail int32 } // SetNumber 设置数值 func (bi *BigIntSimilar) SetNumber(val float64, tail int32) { bi.value = val bi.tail = tail bi.normalize() } // SetNumberByString 设置数值 func (bi *BigIntSimil...
// // Copyright (c) 2015 <NAME>. All rights reserved. // Use of this source code is governed by the MIT // license that can be found in the LICENSE file. // package main // // Runs an HTTP static file server and file upload receiver from/to // the directory that this is executed from. // import ( "fmt" "io" "log...
package giphy import ( "context" "encoding/json" "errors" "flag" "fmt" "net/http" "net/url" "strings" "time" "github.com/ViBiOh/flags" "github.com/ViBiOh/httputils/v4/pkg/cache" "github.com/ViBiOh/httputils/v4/pkg/httpjson" "github.com/ViBiOh/httputils/v4/pkg/logger" "github.com/ViBiOh/httputils/v4/pkg/...
/* Copyright 2018 Pressinfra SRL 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 ...
package auto import ( "github.com/imulab/homelab/iso/auto/api" . "github.com/imulab/homelab/shared" "github.com/lithammer/dedent" "github.com/spf13/cobra" flag "github.com/spf13/pflag" "os" "strings" ) const ( noDefault = "" ) var ( output MessagePrinter ) type Payload struct { ExtraArgs Flavor stri...
package taurus const ( // GAME_SEAT_WAIT = 0 GAME_SEAT_PLAYIN = 1 GAME_SEAT_ROB_BANKER = 2 //抢庄 GAME_SEAT_BET_CHIP = 3 //下倍 GAME_SEAT_COMMIT = 4 //提交 // STATE_STAND = 0 STATE_SIT = 1 STATE_HOSTING = 2 STATE_OFFLINE = 3 //下局离开游戏 ) //不支持直接退出游戏 type Seat struct { seat_id int uid ...
package services import ( "math/big" "github.com/ethereum/go-ethereum/common" "github.com/globalsign/mgo/bson" "github.com/tomochain/tomoxsdk/errors" "github.com/tomochain/tomoxsdk/ethereum" "github.com/tomochain/tomoxsdk/interfaces" "github.com/tomochain/tomoxsdk/rabbitmq" "github.com/tomochain/tomoxsdk/swap...
// The MIT License (MIT) // // Copyright © 2018 <NAME> <<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, ...
package cartridge import ( "fmt" "io" "io/ioutil" "strings" ) type MBC interface { Read(addr uint16) byte Write(addr uint16, value byte) Shutdown() } type Cartridge struct { MBC Title string GBC bool SGB bool ROMSize uint RAMSize uint Japanese bool Version byte } var mbcFactories = ma...
// Copyright 2017 <NAME>. All rights reserved. package apns2 import ( "encoding/json" "fmt" "io" "net/http" "sync/atomic" "time" ) // Priority is the priority of the notification. // Allowable values are defined by APNs and are listed below. type Priority int const ( // PriorityLow instructs APNs to send the...
package autopilot import ( "fmt" "github.com/Azure/azure-sdk-for-go/profiles/latest/compute/mgmt/compute" log "github.com/sirupsen/logrus" "github.com/webdevopos/azure-k8s-autopilot/k8s" "time" ) func (r *AzureK8sAutopilot) updateRun(contextLogger *log.Entry) { r.nodeList.Cleanup() nodeList, err := r.nodeList....
// //Copyright [2016] [SnapRoute 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 agr...
/* 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 main import ( "bytes" "os" "path" "testing" "github.com/stretchr/testify/require" . "github.com/docker/infrakit/pkg/testing" ) var terraformShowOutput = []byte(` aws_internet_gateway.default: id = igw-c5fcffac tags.% = 1 tags.provisioner = infrakit-terraform-demo vpc_id = vpc-f8d45a90 aws_rout...
// _ _ // __ _____ __ ___ ___ __ _| |_ ___ // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ // \ V V / __/ (_| |\ V /| | (_| | || __/ // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| // // Copyright © 2016 - 2019 SeMI Holding B.V. (registered @ Dutch Chamber of Commerce no 752216...
package commander import ( "bytes" "common" "context" "encoding/gob" "fmt" "log" "net" "pbMessages" "sync" "time" "google.golang.org/grpc" ) var ( DebugLog bool Commands []common.Job Workers WorkerMap WorkersMtx sync.Mutex ) const workVersion = 1 type commander struct { } // This function im...
// +build go1.9 // Copyright 2018 Microsoft 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 appl...
// Copyright (c) 2013-2016 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package main import ( "fmt" "os" "path/filepath" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/database" _ "github.com/btcsuite/btcd/database/ffl...
// Copyright 2020 Authors of Cilium // // 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 sdk /* Copyright 2016 <NAME> <<EMAIL>> Copyright 2016-2019 The Grafana SDK 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...
// Copyright 2018-2020 CERN // // 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 wr...
// 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 ...
package sql import ( "database/sql" "fmt" "net" "regexp" "strconv" "strings" "time" "github.com/lib/pq" sqlite3 "github.com/mattn/go-sqlite3" "github.com/concourse/dex/pkg/log" "github.com/concourse/dex/storage" ) const ( // postgres error codes pgErrUniqueViolation = "23505" // unique_violation ) // ...
package rest import ( "errors" "net/http" "strconv" "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/SoftWorxDevelopments/mypc-sdk/modules/comment/internal/types" "github.com/coin...
/* Copyright 2017 The Nuclio 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...
/* 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 i...
// Copyright 2015 Keybase, Inc. All rights reserved. Use of // this source code is governed by the included BSD license. package service import ( "encoding/json" "errors" "github.com/keybase/client/go/engine" "github.com/keybase/client/go/gregor" "github.com/keybase/client/go/libkb" keybase1 "github.com/keybas...
package proxy import ( "context" "crypto/tls" "fmt" "io/ioutil" "net" "net/http" "net/url" "os" "github.com/gravitational/teleport" kubeutils "github.com/gravitational/teleport/lib/kube/utils" "github.com/gravitational/trace" "github.com/sirupsen/logrus" authzapi "k8s.io/api/authorization/v1" metav1 "k...
// SPDX-License-Identifier: Apache-2.0 // Copyright (c) 2020 Intel Corporation package controller import ( "encoding/json" "strings" "github.com/open-ness/EMCO/src/orchestrator/pkg/infra/db" log "github.com/open-ness/EMCO/src/orchestrator/pkg/infra/logutils" rpc "github.com/open-ness/EMCO/src/orchestrator/pkg/i...
package cmd import ( "fmt" "github.com/jenkins-x/jx/pkg/cmd/create" "strings" "github.com/jenkins-x/jx/pkg/cmd/helper" "github.com/blang/semver" "github.com/jenkins-x/jx/pkg/cmd/opts" "github.com/jenkins-x/jx/pkg/log" "github.com/jenkins-x/jx/pkg/util" "github.com/jenkins-x/jx/pkg/util/system" "github.com/...
/* Copyright 2020 The Kubernetes 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 law or ag...
// Copyright 2020 Anapaya 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 i...
package ingester import ( "flag" "sync" "time" "github.com/cortexproject/cortex/pkg/util" "github.com/go-kit/kit/log/level" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/tsdb/wal" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pk...
// Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license" ...
// Copyright 2020 Authors of Cilium // // 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 liquidity import ( "context" "testing" "github.com/btcsuite/btcutil" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/test" "github.com/lightningnetwork/lnd/clock" "github.com/lightningnetwork/lnd/ticker" "gith...
// Copyright 2017 The Cockroach Authors. // // Licensed as a CockroachDB Enterprise file under the Cockroach Community // License (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // https://github.com/cockroachdb/cockroach/blob/master/li...
package coordinator_test import ( "time" "github.com/EnnioRC/influxdb/services/meta" "github.com/EnnioRC/influxql" ) // MetaClient is a mockable implementation of cluster.MetaClient. type MetaClient struct { CreateContinuousQueryFn func(database, name, query string) error CreateDatabaseFn ...
package types import ( "math/big" "math/rand" "testing" "github.com/stretchr/testify/assert" ) func TestFromInt64(t *testing.T) { for n := 0; n < 20; n++ { r := rand.Int63() assert.Equal(t, r, NewInt(r).Int64()) } } func TestInt(t *testing.T) { // Max Int = 2^255-1 = 5.789e+76 // Min Int = -(2^255-1) = ...
// 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 monitor import ( "testing" "github.com/stretchr/testify/mock" "github....
package sqlfile import ( "bytes" "encoding/json" "fmt" "os" "reflect" "sort" "strconv" "strings" "sync" "time" "github.com/qiniu/pandora-go-sdk/base/ratelimit" "github.com/qiniu/logkit/conf" "github.com/qiniu/logkit/sender" . "github.com/qiniu/logkit/sender/config" "github.com/qiniu/logkit/utils/model...
// Copyright 2017 Microsoft. All rights reserved. // MIT License package cni import ( "fmt" "os" "runtime" "github.com/Azure/azure-container-networking/common" "github.com/Azure/azure-container-networking/log" "github.com/Azure/azure-container-networking/platform" "github.com/Azure/azure-container-networking/...
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. package app import ( "errors" "fmt" "net/http" "os/user" "github.com/mattermost/mattermost-server/v5/audit" "github.com/mattermost/mattermost-server/v5/mlog" "github.com/mattermost/mattermost-server...
package factom_test import ( "testing" "time" . "github.com/Factom-Asset-Tokens/fatd/factom" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var courtesyNode = "https://courtesy-node.factom.com" func TestDataStructures(t *testing.T) { height := uint64(166587) c := NewClient() db...
package gforms import ( "encoding/json" "errors" "io/ioutil" "net/http" "net/url" "reflect" "strconv" "unicode" "unicode/utf16" "unicode/utf8" ) func bindRequest(req *http.Request) (*Data, error) { if isNilValue(req) { return nil, errors.New("*http.Request is nil.") } contentType := req.Header.Get("Con...
package qapi import ( "time" ) // TODO - Populate this struct type OrderLeg struct { } // Ref: http://www.questrade.com/api/documentSymation/rest-operations/account-calls/accounts-id-orders type Order struct { // Internal order identifier. ID int `json:"id"` // Symbol that follows Questrade symbology (e.g., "TD...
// Copyright 2022 xgfone // // 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 2018 The Cloudprober 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...
// Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
// These tests make use of Docker, spinning up an Apache Kafka container for integration level tests // these tests do not test that the application is packaged correctly after a Docker build package main import ( "encoding/json" "fmt" "github.com/adbourne/go-archetype-kafka-processor/config" "github.com/adbourne/...
package main_test import ( "io/ioutil" "net/http" "os" "os/exec" "path/filepath" "sync" "testing" "time" "code.cloudfoundry.org/cfhttp" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" "github.com/onsi/gomega/gexec" _ "github.com/go-sql-driver/mysql" "github.com/jmo...
// Copyright 2019 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...
/////////////////////////////////////////////////////////////////////// // Copyright (c) 2017 VMware, Inc. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 /////////////////////////////////////////////////////////////////////// package transport import ( "context" "encoding/json" "github.com/Shopify/sa...
package artifacts import ( "errors" "os" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" "github.com/SAP/cloud-mta-build-tool/internal/archive" "github.com/SAP/cloud-mta/mta" ) var _ = Describe("Mtar", func() { var _ = Describe("Generate", func() { AfterE...
// // Copyright (c) 2014-2019 Cesanta Software Limited // 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 // // Un...
package predicate import ( "context" "sync" "github.com/grafana/regexp" "golang.org/x/sync/errgroup" "github.com/sourcegraph/sourcegraph/internal/database" "github.com/sourcegraph/sourcegraph/internal/search/job" "github.com/sourcegraph/sourcegraph/internal/search/query" "github.com/sourcegraph/sourcegraph/i...
package main import ( "bufio" "fmt" "io/ioutil" "log" "os" "os/user" "path/filepath" "strings" "github.com/ghodss/yaml" "github.com/micahhausler/k8s-oidc-helper/internal/helper" flag "github.com/spf13/pflag" viper "github.com/spf13/viper" k8s_runtime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/t...
// Copyright 2021 The Okteto 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 ...
package orders import ( "fmt" "net/http" "strconv" amazonpay "github.com/conku/amazon-pay-sdk-go" "github.com/conku/gomerchant" "github.com/conku/qor-example/config" "github.com/conku/qor-example/models/orders" "github.com/conku/qor-example/utils" qorrender "github.com/conku/render" "github.com/conku/respon...
package main import ( "context" "encoding/json" "fmt" "net/http" "reflect" "sync" "github.com/inconshreveable/log15" "github.com/pkg/errors" "github.com/sourcegraph/sourcegraph/cmd/query-runner/queryrunnerapi" "github.com/sourcegraph/sourcegraph/internal/api" ) // diffSavedQueryConfigs takes the old and ne...
package decoder import ( "github.com/makiuchi-d/gozxing" ) type BitMatrixParser struct { bitMatrix *gozxing.BitMatrix parsedVersion *Version parsedFormatInfo *FormatInformation mirror bool } func NewBitMatrixParser(bitMatrix *gozxing.BitMatrix) (*BitMatrixParser, error) { dimension := bitMa...
package main import ( "bytes" "encoding/json" "errors" "io/ioutil" "net/http" "net/url" "os" "strings" "time" "github.com/sirupsen/logrus" ) func main() { logger := logrus.New() clientID := os.Getenv("OATHKEEPER_GH_DEMO_CLIENT_ID") if clientID == "" { logger.Fatal("OATHKEEPER_GH_DEMO_CLIENT_ID is req...
package main import ( "context" "io/ioutil" "net/url" "os" "path" "strings" "github.com/fishworks/gofish/pkg/home" "github.com/gofish-bot/gofish-bot/gofishgithub" "github.com/gofish-bot/gofish-bot/log" "github.com/gofish-bot/gofish-bot/models" "github.com/gofish-bot/gofish-bot/strategy/github" "github.c...
package rest import ( "encoding/base64" "time" "github.com/openebs/jiva/controller" "github.com/openebs/jiva/types" "github.com/rancher/go-rancher/api" "github.com/rancher/go-rancher/client" ) type Replica struct { client.Resource Address string `json:"address"` Mode string `json:"mode"` } type Volume s...
package layer import "github.com/codingbeard/tfkg/layer/constraint" import "github.com/codingbeard/tfkg/layer/initializer" import "github.com/codingbeard/tfkg/layer/regularizer" import tf "github.com/galeone/tensorflow/tensorflow/go" type LConv2D struct { activation string activityRegularizer regularizer.R...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package opsworks import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" "github.com/aws/aws-sdk-go-v2/private/protocol/jsonrpc" ) // Please ...
// Copyright (c) 2020 Blockwatch Data Inc. // Author: <EMAIL> package model import ( "sync" "blockwatch.cc/packdb/pack" "blockwatch.cc/tzindex/chain" "blockwatch.cc/tzindex/micheline" "blockwatch.cc/tzindex/rpc" ) var contractPool = &sync.Pool{ New: func() interface{} { return new(Contract) }, } // Contract ...
package commands import ( "bufio" "bytes" "encoding/hex" "fmt" "os" "path/filepath" "strings" "github.com/git-lfs/git-lfs/filepathfilter" "github.com/git-lfs/git-lfs/git" "github.com/git-lfs/git-lfs/git/githistory" "github.com/git-lfs/git-lfs/git/odb" "github.com/git-lfs/git-lfs/tools" "github.com/spf13/...
package main import ( "context" "flag" "net" "os" "os/signal" "strings" "sync" "syscall" "cdr.dev/slog" "cdr.dev/slog/sloggers/sloghuman" "cdr.dev/slog/sloggers/slogjson" "cdr.dev/slog/sloggers/slogstackdriver" "cloud.google.com/go/profiler" "github.com/tatsuworks/gateway/gatewaypb" "github.com/tatsuwo...
package actorstate import ( "context" "fmt" "time" "github.com/filecoin-project/go-address" "github.com/filecoin-project/lotus/chain/types" "github.com/ipfs/go-cid" "go.opencensus.io/tag" "golang.org/x/xerrors" "github.com/filecoin-project/sentinel-visor/lens" "github.com/filecoin-project/sentinel-visor/me...
/* Copyright 2018 Heptio 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 dis...
// // Copyright 2021 The Sigstore 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 ...
package main import ( "bytes" "errors" "fmt" "io" "io/ioutil" "log" "net/http" "os" "strings" tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5" "github.com/kr/pretty" "github.com/tealeg/xlsx" ) type ( odata struct { key string theme string hours float64 } ) const tgtSheetName = "su...
// Copyright 2018 fydrah // // 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 expressgo import ( "fmt" "log" "net/http" "reflect" "strings" ) type Error struct { StatusCode int Details string } // ViewData is the data structure for passing data to a view type ViewData map[string]string type OptionsMap map[string]interface{} func (dest OptionsMap) merge(src OptionsMap, item ...
// Copyright 2010 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 stdmethods defines an Analyzer that checks for misspellings // in the signatures of methods similar to well-known interfaces. package stdmethods imp...
package fabnet import ( "fmt" "github.com/fabregas/fabnet_go/rpc" "testing" "time" ) /* func TestRPC(t *testing.T) { conf0 := DefaultConfig("node00", "127.0.0.1:22212", []string{}) proc0 := NewFabnetProcessor(conf0) node00, err := rpc.NewNode(conf0.Name, conf0.Addr, proc0) if err != nil { t.Error("Cant crea...
package cmd import ( "fmt" "go/build" "os" "os/exec" "os/user" fp "path/filepath" "runtime" "strings" "github.com/spf13/cobra" ) func dockerCmd() *cobra.Command { cmd := &cobra.Command{ Use: "docker [target]", Run: dockerHandler, Args: cobra.ExactArgs(1), Short: "Build QML app using Docker ima...
/******************************************************************************* * Copyright 2020 Samsung Electronics 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...