text stringlengths 3.08k 10.4k |
|---|
package task
import (
"encoding/json"
"math/rand"
"strings"
"sync"
"github.com/golang/protobuf/proto"
"github.com/stratosnet/sds/msg/protos"
"github.com/stratosnet/sds/pp/client"
"github.com/stratosnet/sds/pp/file"
"github.com/stratosnet/sds/pp/setting"
"github.com/stratosnet/sds/utils"
"github.com/stratos... |
/*
* 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 releasenote
import (
"fmt"
"regexp"
"strconv"
"strings"
"sync"
"time"
"github.com/sirupsen/logrus"
"walle/pkg/gitlab"
"walle/pkg/utils"
)
const (
titleChanges = "_Changes:_"
titleBugFix = "**Bug Fix:**"
titleNewFeature = "_New Features:_"
titleDocumentation = "Documentation:"
t... |
/*
* 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 ... |
/*
Copyright 2018 The CDI 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, softwar... |
// Copyright (c) 2019 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distri... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-2020 Datadog, Inc.
// Package sampler contains all the logic of the agent-side trace sampling
/... |
package ledger
import (
"bytes"
"errors"
"fmt"
"time"
"github.com/gogo/protobuf/proto"
. "github.com/nknorg/nkn/common"
"github.com/nknorg/nkn/core/signature"
tx "github.com/nknorg/nkn/core/transaction"
"github.com/nknorg/nkn/core/transaction/payload"
"github.com/nknorg/nkn/crypto"
. "github.com/nknorg/nkn... |
/*
Copyright 2019-2020 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,... |
/*
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... |
package handler
import (
"database/sql"
"encoding/json"
"errors"
"fmt"
"net/http"
"strconv"
"github.com/cruisechang/dbex"
"github.com/gorilla/mux"
)
//NewHallIDHandler returns HallIDHandler structure
func NewHallIDHandler(base baseHandler) *HallIDHandler {
return &HallIDHandler{
baseHandler: base,
}
}
//... |
// Copyright 2015 <NAME>. All rights reserved.
// Licensed under the MIT license that can be found in the LICENSE file.
package xstrings
import (
"strings"
"unicode/utf8"
)
// Reverse a utf8 encoded string.
func Reverse(str string) string {
var size int
tail := len(str)
buf := make([]byte, tail)... |
package instances
import (
"time"
"github.com/sandro-h/sibylgo/moment"
"github.com/sandro-h/sibylgo/util"
)
// Instance is an actual moment at a point or range in time based on the moment definition.
// For example, a weekly recurring moment definition can yield multiple instances, one for every week
// in the gi... |
// Copyright 2016 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.
package client
import (
"fmt"
"io"
"io/ioutil"
"os"
"golang.org/x/net/context"
"github.com/keybase/cli"
"github.com/keybase/client/go/chat"
"github.com/keybase/client/go/chat/msgchecker"
... |
package postgres
import (
"database/sql"
"fmt"
"regexp"
"strconv"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/stdlib"
"gorm.io/gorm"
"gorm.io/gorm/callbacks"
"gorm.io/gorm/clause"
"gorm.io/gorm/logger"
"gorm.io/gorm/migrator"
"gorm.io/gorm/schema"
)
type Dialector struct {
*Config
}
type Config ... |
package hystrix
// Forked from github.com/afex/hystrix-go/hystrix
// Some parts of this file have been modified to make it functional in this package
import (
"fmt"
"github.com/go-chassis/openlog"
"sync"
"time"
)
type runFunc func() error
type fallbackFunc func(error) error
// A CircuitError is an error which mo... |
// Copyright 2020 The ql Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSES/QL-LICENSE file.
// Copyright 2020 WHTCORPS INC, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in co... |
// Copyright (c) 2013-2018 <NAME>. All rights reserved.
// Licensed under a simplified BSD license (see LICENSE file).
package cozely
import (
"github.com/cozely/cozely/internal"
"github.com/cozely/cozely/window"
)
////////////////////////////////////////////////////////////////////////////////
// GameLoop method... |
package trace
import (
"context"
"fmt"
"testing"
"github.com/jackc/pgtype"
"github.com/stretchr/testify/require"
"github.com/timescale/promscale/pkg/pgmodel/common/errors"
"github.com/timescale/promscale/pkg/pgmodel/common/schema"
"github.com/timescale/promscale/pkg/pgmodel/model"
)
const (
defaultServiceNa... |
package main
import (
"errors"
"fmt"
"net"
"strings"
"sync"
log "github.com/golang/glog"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/peer"
"google.golang.org/grpc/reflection"
"google.golang.org/grpc/status"
sdc "github.com/Azure/sonic-teleme... |
// Go equivalent of the "DNS & BIND" book check-soa program.
// Created by <NAME>.
package main
import (
"errors"
"fmt"
"github.com/miekg/dns"
"os"
"strings"
"time"
)
const (
TIMEOUT time.Duration = 5 // seconds
)
var (
localm *dns.Msg
localc *dns.Client
conf *dns.ClientConfig
)
func localQuery(qname st... |
package main
import (
"fmt"
"os"
"strconv"
"time"
"github.com/livekit/protocol/auth"
"github.com/livekit/protocol/utils"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli/v2"
"gopkg.in/yaml.v3"
"github.com/livekit/livekit-server/pkg/routing"
"github.com/livekit/livekit-server/pkg/service"
)
func... |
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package models
import (
"crypto/md5"
"fmt"
"image/png"
"io"
"strconv"
"strings"
"code.gitea.io/gitea/modules/avatar"
"code.gitea.io/gitea/modules/l... |
// Copyright (C) 2019-2020 Zilliz. 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 l... |
// Copyright IBM Corp. 2021 All Rights Reserved.
// Licensed under the Mozilla Public License v2.0
package vpc
import (
"fmt"
"time"
"github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/IBM/vpc-go-sdk/vpcv1"
)
const (
isInstanceGroupM... |
// Package httputil provides abstractions around the common needs of HTTP. It
// also allows swapping in and out the HTTP client.
package httputil
import (
"bytes"
"context"
"io"
"mime/multipart"
"github.com/pkg/errors"
"github.com/diamondburned/arikawa/utils/httputil/httpdriver"
"github.com/diamondburned/ari... |
// Copyright 2016 Google Inc. All Rights Reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable la... |
// Copyright (c) 2017-2018 Uber Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... |
// Copyright ©2022 <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"errors"
"fmt"
"io/fs"
"os"
"path/filepath"
"strings"
"github.com/BurntSushi/toml"
"golang.org/x/tools/go/packages"
)
// Exit status c... |
package imageobfuscation
import (
"image"
"image/color"
"math"
"sync"
"github.com/cpmech/gosl/fun/fftw"
"v2ray.com/core/common/errors"
)
// Image image class with FFT / DFT ability
type Image struct {
rgbPlan2d [3]*fftw.Plan2d
rgbPlan2dFreed bool
sync.RWMutex
image.Image
}
const maxUint = math.MaxUin... |
package cmd
import (
"bufio"
"errors"
"fmt"
"log"
"os"
"regexp"
"sort"
"strings"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "caraparse",
Short: "GNU help parser.\n(e.g. 'ln --help | ./caraparse -n ln')",
Run: func(cmd *cobra.Command, args []string) {
name, _ := cmd.Flags().GetStrin... |
package meilisearch
import (
"time"
"github.com/valyala/fasthttp"
)
//
// Internal types to Meilisearch
//
// Client is a structure that give you the power for interacting with an high-level api with meilisearch.
type Client struct {
config ClientConfig
httpClient *fasthttp.Client
}
// Index is the type th... |
package controllers
import (
"context"
"crypto/tls"
"crypto/x509"
"fmt"
"strings"
"time"
etcdv1 "github.com/mrajashree/etcdadm-controller/api/v1beta1"
"github.com/pkg/errors"
clientv3 "go.etcd.io/etcd/client/v3"
apierrors "k8s.io/apimachinery/pkg/api/errors"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
... |
/*
Copyright 2021 The Go jAccount 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 company="Aspose" file="batch_test.go">
* Copyright (c) 2021 Aspose.Words for Cloud
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software a... |
package godeep
import (
"encoding/json"
"github.com/fatih/color"
"go/ast"
"golang.org/x/tools/go/packages"
"os"
"path/filepath"
"strings"
"sync"
)
/*
Creation Time: 2020 - Jan - 26
Created by: (ehsan)
Maintainers:
1. <NAME> (E2)
Auditor: <NAME> (E2)
Copyright Ronak Software Group 2018
*... |
package main
import (
"bytes"
"context"
"encoding/json"
"fmt"
"os"
"os/signal"
"path/filepath"
"strings"
"syscall"
"text/template"
kubetestv1 "github.com/goccy/kubetest/api/v1"
"github.com/jessevdk/go-flags"
"k8s.io/apimachinery/pkg/util/yaml"
_ "k8s.io/client-go/plugin/pkg/client/auth"
"k8s.io/client-... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package s3
import (
"context"
"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"
)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-0... |
// Copyright (c) 2014 The SkyDNS Authors. All rights reserved.
// Use of this source code is governed by The MIT License (MIT) that can be
// found in the LICENSE file.
// Package etcd provides the default SkyDNS server Backend implementation,
// which looks up records stored under the `/skydns` key in etcd when queri... |
/*
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, ... |
// 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 2016-2018, Pulumi 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... |
// Copyright 2016 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 business
import (
"strings"
"sync"
"github.com/prometheus/common/model"
"k8s.io/api/apps/v1beta1"
"github.com/kiali/kiali/kubernetes"
"github.com/kiali/kiali/prometheus"
"github.com/kiali/kiali/services/models"
)
// HealthService deals with fetching health from various sources and convert to kiali mo... |
// Copyright 2016-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 ag... |
package form
import (
"encoding/base64"
"fmt"
"net/url"
"reflect"
"strconv"
"strings"
"google.golang.org/genproto/protobuf/field_mask"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
)
// EncodeMap encode proto message to url query.
func EncodeMap(msg proto.Message) (url... |
/*
Copyright AppsCode Inc. and 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 agreed to in writing... |
package aferox
import (
"os"
"path/filepath"
"strings"
"time"
"github.com/spf13/afero"
)
var _ afero.Fs = &Fsx{}
// Fsx adjusts all relative paths based on the stored
// working directory, instead of relying on the default behavior for relative
// paths defined by the implementing Fs.
type Fsx struct {
fs afe... |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// Copyright 2020 The jackal 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... |
package tools
import (
"bytes"
"errors"
"go/ast"
"go/token"
"io"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
"github.com/henrylee2cn/aster/internal/imports"
"github.com/henrylee2cn/goutil"
)
// MkdirAll creates a directory named path,
// along with any necessary parents, and returns nil,
// or el... |
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Package lorgnette provides an interface to talk to lorgnette over D-Bus.
package lorgnette
import (
"context"
"github.com/godbus/dbus"
"github.... |
package order
import (
"github.com/gingerxman/eel"
"time"
)
const ORDER_STATUS_CANCEL = -1 // 已取消:取消订单(回退销量)
const ORDER_STATUS_WAIT_PAY = 0 // 待支付:已下单,未付款
const ORDER_STATUS_PAYING = 1 //开始支付
const ORDER_STATUS_WAIT_SUPPLIER_CONFIRM = 2 // 已支付,等待供货商确认订单
const ORDER_STATUS_PAYED_NOT_SHIP = 3 // 待发货:供货商确认订单后,发货过... |
package main
import (
"context"
"errors"
"flag"
"log"
"sync"
"time"
"github.com/ktmdan/goami/ami"
)
var (
username = flag.String("username", "user", "AMI username")
secret = flag.String("secret", "secret", "AMI secret")
host = flag.String("host", "127.0.0.1:5038", "AMI host address")
)
func main() {... |
package helmtemplate
import (
"bytes"
"fmt"
"path"
"regexp"
"text/template"
"github.com/giantswarm/microerror"
"github.com/spf13/afero"
"sigs.k8s.io/yaml"
)
const (
// HelmChartYamlName is the name of Helm's chart yaml.
HelmChartYamlName = "Chart.yaml"
// HelmValuesYamlName is hte name fo the file that ho... |
/*
Copyright 2020 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... |
/*
* Copyright 2015 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package rds
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Manages a RDS Aurora Cluster Endpoint.
// You can ref... |
// This module contains a collection of YANG definitions
// for Cisco IOS-XR controller-otu package configuration.
//
// This YANG module augments the
// Cisco-IOS-XR-ifmgr-cfg
// module with configuration data.
//
// Copyright (c) 2013-2018 by Cisco Systems, Inc.
// All rights reserved.
package controller_otu_cfg
... |
package authnz
import (
"context"
"crypto/x509"
"encoding/base64"
"encoding/json"
"encoding/pem"
"errors"
"fmt"
"io/ioutil"
"net/http"
"strings"
// jose "gopkg.in/square/go-jose.v2"
auth0 "github.com/auth0-community/go-auth0"
"github.com/sirupsen/logrus"
"gopkg.in/square/go-jose.v2"
"gopkg.in/square/go... |
package dogstatsd
import (
"bytes"
"fmt"
"github.com/DataDog/datadog-agent/pkg/util/log"
)
type eventPriority int
const (
priorityNormal eventPriority = iota
priorityLow
)
type alertType int
const (
alertTypeSuccess alertType = iota
alertTypeInfo
alertTypeWarning
alertTypeError
)
type dogstatsdEvent str... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloudtrail
import (
"context"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
// The name of a trail about which you want the current status.
// Please also see https://docs.aws.amazon.com/go... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package multai
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Provides a Spotinst Multai Routing Rule.
//
// > T... |
/*
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 main
import (
"context"
"fmt"
"os"
"strings"
"github.com/containerd/containerd"
"github.com/containerd/containerd/cio"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/oci"
"github.com/containerd/containerd/runtime/v2/runc/options"
"github.com/estesp/examplectr/idtools... |
package voicemessage
import (
"net/http"
"testing"
"time"
messagebird "github.com/messagebird/go-rest-api/v7"
"github.com/messagebird/go-rest-api/v7/internal/mbtest"
"github.com/stretchr/testify/assert"
)
func TestMain(m *testing.M) {
mbtest.EnableServer(m)
}
func assertVoiceMessageObject(t *testing.T, messa... |
// Package cdp for application layer communication with browser.
package cdp
import (
"context"
"encoding/json"
"fmt"
"net/http"
"sync"
"sync/atomic"
"github.com/go-rod/rod/lib/defaults"
"github.com/go-rod/rod/lib/utils"
)
// Client is a devtools protocol connection instance.
type Client struct {
ctx cont... |
// Copyright 2019 The Kanister 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... |
// 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 present
import (
"errors"
"regexp"
"strconv"
"unicode/utf8"
)
// This file is stolen from go/src/cmd/godoc/codewalk.go.
// It's an evaluator for t... |
package agent
import (
"fmt"
"github.com/somersbmatthews/ut"
"runtime"
"testing"
)
func TestCreate(t *testing.T) {
ut.Run(t)
ut.AssertEquals(fmt.Sprintf("Surf/%s (%s %s; %s)", Version, osName(), osVersion(), runtime.Version()), Create())
Name = "Chrome"
Version = "37.0.2049.0"
OSName = "Ubuntu"
OSVersion ... |
package mysql
import (
"database/sql"
"fmt"
"time"
"unicode"
log "github.com/asim/nitro/v3/logger"
"github.com/asim/nitro/v3/store"
"github.com/pkg/errors"
)
var (
// DefaultDatabase is the database that the sql store will use if no database is provided.
DefaultDatabase = "micro"
// DefaultTable is the tab... |
package CloudForest
import (
"math"
)
/*
AdaCostTarget wraps a numerical feature as a target for us in Cost Sensitive Adaptive Boosting (AdaC2.M1)
"Boosting for Learning Multiple Classes with Imbalanced Class Distribution"
<NAME>, <NAME> and <NAME>
See equations in slides here:
http://people.ee.duke.edu/~lcarin/Mi... |
// Package strumt provides a way to defines scenarios for prompting
// informations on command line
package strumt
import (
"bufio"
"fmt"
"io"
"os"
"strings"
)
// Step represents a scenario step which is
// the result of a prompt execution. We store
// the prompt string displayed on the screen, inputs that the u... |
package credentialmanager
import (
"bufio"
"errors"
"fmt"
"log"
"net/url"
"os"
"path/filepath"
"strings"
"github.com/docker/docker-credential-helpers/credentials"
"github.com/keptn/keptn/cli/pkg/config"
"github.com/keptn/keptn/cli/pkg/file"
keptnutils "github.com/keptn/kubernetes-utils/pkg"
"gopkg.in/yam... |
package migration13
import (
"encoding/binary"
"fmt"
"github.com/coreos/bbolt"
)
var (
paymentsRootBucket = []byte("payments-root-bucket")
// paymentCreationInfoKey is a key used in the payment's sub-bucket to
// store the creation info of the payment.
paymentCreationInfoKey = []byte("payment-creation-info")... |
package main
import (
"fmt"
log "github.com/sirupsen/logrus"
flag "github.com/spf13/pflag"
"os"
"strings"
"github.com/starlingbank/vaultsmith/config"
"github.com/starlingbank/vaultsmith/document"
"github.com/starlingbank/vaultsmith/internal"
"github.com/starlingbank/vaultsmith/vault"
"io/ioutil"
"path/file... |
// Copyright (c) 2020-2021 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... |
package merkletree
import (
"bytes"
"crypto"
)
type pathStack struct {
path Path
curnode *PathElement
pos int
l int
}
func newPathStack(p Path) *pathStack {
ps := &pathStack{
path: p,
pos: 0,
l: len(p),
}
if len(p) > 0 {
ps.curnode = p[0]
}
return ps
}
// get the current top elem... |
package logrushook
import (
"bytes"
"compress/gzip"
"fmt"
"github.com/sirupsen/logrus"
"io/fs"
"os"
"path/filepath"
"strings"
"sync"
"time"
)
type LogType string
const (
Info LogType = "info"
Debug LogType = "debug"
Error LogType = "error"
)
type LogrusHook struct {
Dir string
mu ... |
package manager
import (
"fmt"
"reflect"
"strings"
"github.com/pkg/errors"
catalogv1 "github.com/rancher/types/apis/catalog.cattle.io/v1"
"github.com/sirupsen/logrus"
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
CatalogNameLabel = "io.cattle.catalog.... |
// Copyright 2019-present Facebook Inc. All rights reserved.
// This source code is licensed under the Apache 2.0 license found
// in the LICENSE file in the root directory of this source tree.
// Code generated by entc, DO NOT EDIT.
package ent
import (
"fmt"
"strings"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/... |
/*
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 agreed to in writing, soft... |
// +build linux
package linux
import (
"bufio"
"bytes"
"fmt"
"io/ioutil"
"regexp"
"strconv"
"strings"
"time"
"github.com/mackerelio/golib/logging"
"github.com/mackerelio/mackerel-agent/metrics"
"github.com/mackerelio/mackerel-agent/util"
)
/*
collect disk I/O
`disk.{device}.{metric}.delta`: The increase... |
package goexcel
import (
"errors"
"github.com/360EntSecGroup-Skylar/excelize"
"reflect"
"strings"
)
type excelToList struct {
excel *excelize.File
sheet string
model reflect.Value
export *modelInfo
base reflect.Type
rows [][]string
mergeCellsMap map[int]map[... |
// Package splunk is an output plugin that sends events to splunk database.
package splunk
import (
"bytes"
"context"
"crypto/tls"
"fmt"
"io"
"net/http"
"time"
"github.com/ozontech/file.d/cfg"
"github.com/ozontech/file.d/fd"
"github.com/ozontech/file.d/pipeline"
"github.com/ozontech/file.d/stats"
insaneJS... |
package log
import (
"bufio"
"context"
"encoding/json"
"io"
"os"
"strconv"
"time"
"sync"
"sync/atomic"
"unsafe"
"github.com/jackc/pgx/v4/pgxpool"
)
const (
timeFormat = "2006/01/02 15:04:05"
Ltime = 1 << iota // time format "2006/01/02 15:04:05"
Llongfile // full file name and line ... |
/*
Copyright 2021 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, ... |
// +build linux
package connector
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sync"
"time"
"github.com/bcicen/ctop/connector/collector"
"github.com/bcicen/ctop/connector/manager"
"github.com/bcicen/ctop/container"
"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontai... |
// Copyright 2018 The Xorm 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 xorm
import (
"database/sql"
"flag"
"fmt"
"log"
"os"
"strings"
"testing"
_ "github.com/denisenkom/go-mssqldb"
_ "github.com/go-sql-driver/m... |
package shell
import (
"bufio"
"bytes"
"fmt"
"io"
"os"
"os/exec"
"sync"
"github.com/cortesi/termlog"
)
var ValidShells = map[string]bool{
"bash": true,
"modd": true,
"powershell": true,
"sh": true,
}
var shellTesting bool
var Default = "modd"
type Executor struct {
Shell string
... |
// Copyright 2021 The age Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
// This file implements the terminal UI of cmd/age. The rules are:
//
// - Anything that requires user interaction goes to the terminal,
// ... |
// KATO, Application Management Platform
// Copyright (C) 2021 Gridworkz Co., Ltd.
// 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 r... |
/*
Copyright (c) 2015, Alcatel-Lucent Inc
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of condi... |
package cmd
import (
"os"
"time"
"github.com/go-playground/validator"
crd "github.com/nerdalize/nerd/crd/pkg/client/clientset/versioned"
"github.com/nerdalize/nerd/pkg/kubeconfig"
"github.com/nerdalize/nerd/pkg/populator"
transfer "github.com/nerdalize/nerd/pkg/transfer"
"github.com/nerdalize/nerd/pkg/transfe... |
package roach_test
import (
"database/sql"
"strconv"
"testing"
"github.com/tomogoma/crdb"
"github.com/tomogoma/usersms/pkg/db/roach"
"github.com/tomogoma/usersms/pkg/config"
"flag"
"sync/atomic"
)
var (
confPath = flag.String(
"conf",
config.DefaultConfPath(),
"/path/to/imagems.conf.yml",
)
currID ... |
// Package options provides ways to extract the task-related options from a Flux script.
package options
import (
"errors"
"fmt"
"strings"
"sync"
"time"
"github.com/influxdata/flux"
"github.com/influxdata/flux/semantic"
cron "gopkg.in/robfig/cron.v2"
)
// optionCache is enabled for tests, to work around http... |
package wsplice
import (
"bufio"
"bytes"
"encoding/binary"
"io"
"net"
"sync"
"time"
"github.com/gobwas/ws"
)
// Socket is a wrapper that provides useful utilities around a websocket net.Conn.
type Socket struct {
Conn net.Conn
Reader *bufio.Reader
config *Config
buffer []byte
bytes... |
package main
import (
_ "bufio"
_ "bytes"
"challenge-go/cipher"
"challenge-go/constants"
"challenge-go/model"
"challenge-go/utils"
"encoding/csv"
"fmt"
"github.com/omise/omise-go"
"github.com/omise/omise-go/operations"
"io"
"log"
"os"
"strconv"
"strings"
"sync"
"time"
)
var (
csvRecord = make(mode... |
package workflows
import (
"io"
"reflect"
"strings"
"github.com/fatih/color"
"github.com/olekukonko/tablewriter"
"github.com/op/go-logging"
)
var log = logging.MustGetLogger("workflows")
// Bold is the specifier for bold formatted text values
var Bold = color.New(color.Bold).SprintFunc()
// SvcPipelineTableH... |
package apps
import (
"github.com/TeaWeb/code/teaconfigs/agents"
"github.com/TeaWeb/code/teaconfigs/widgets"
"github.com/TeaWeb/code/teadb"
"github.com/TeaWeb/code/teautils"
"github.com/TeaWeb/code/teaweb/actions/default/agents/agentutils"
"github.com/TeaWeb/code/teaweb/actions/default/agents/board/scripts"
"gi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.