text stringlengths 5.51k 28.1k |
|---|
package dutystationsloader
import (
"database/sql"
"fmt"
"log"
"reflect"
"regexp"
"strconv"
"strings"
"time"
"go.uber.org/zap"
"github.com/gobuffalo/pop"
"github.com/gobuffalo/uuid"
"github.com/pkg/errors"
"github.com/tealeg/xlsx"
"github.com/transcom/mymove/pkg/gen/internalmessages"
"github.com/trans... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.14.0
// source: envoy/config/cluster/v4alpha/filter.proto
package envoy_config_cluster_v4alpha
import (
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
pr... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.8
// source: log.proto
package pb
import (
reflect "reflect"
sync "sync"
pb "github.com/erda-project/erda-proto-go/oap/common/pb"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoim... |
package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"
"time"
"github.com/docker/docker/opts"
"github.com/docker/docker/pkg/integration/checker"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/tlsconfig"
"gi... |
package resource
import (
"context"
"fmt"
"strings"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
ctrl "sigs.k8s.io/con... |
// Copyright 2013 The Prometheus 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... |
// Copyright (c) 2019 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 applicable law o... |
package decoder
import (
"bytes"
"encoding"
"encoding/csv"
"encoding/json"
"errors"
"fmt"
"net"
"path"
"reflect"
"strconv"
"strings"
"sync"
"time"
"github.com/hashicorp/consul/api"
)
type (
computedType int
special int
)
const (
typeStruct computedType = iota
typeInt
typeDuration
typeUint
... |
package vsphere
import (
"context"
"crypto/tls"
"encoding/pem"
"errors"
"fmt"
"net/url"
"reflect"
"strconv"
"strings"
"sigs.k8s.io/vsphere-csi-driver/pkg/csi/service/logger"
"github.com/davecgh/go-spew/spew"
"github.com/vmware/govmomi/cns"
cnstypes "github.com/vmware/govmomi/cns/types"
"github.com/vmw... |
package wechat
import (
"bytes"
"crypto/md5"
"crypto/sha1"
"encoding/base64"
"encoding/hex"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"io/ioutil"
"net/http"
"sort"
"strconv"
"strings"
"time"
"github.com/astaxie/beego"
"github.com/astaxie/beego/logs"
"github.com/astaxie/beego/orm"
"github.com/na... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.17.3
// source: network_get_version_info.proto
package services
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/... |
// Copyright 2020 <NAME>
// SPDX-License-Identifier: Apache-2.0
package jsonrpc
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"math/big"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
... |
// Copyright 2017 The LUCI Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
package wrapper
import (
"context"
"errors"
"fmt"
"io"
"log"
"reflect"
"strconv"
"strings"
"time"
"github.com/ByteSizedMarius/go-minecraft-wrapper/events"
"github.com/ByteSizedMarius/go-minecraft-wrapper/snbt"
"github.com/looplab/fsm"
)
const (
WrapperOffline = "offline"
WrapperOnline = "online"
Wr... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/service/trace/v2/trace_service.proto
package envoy_service_trace_v2
import (
context "context"
fmt "fmt"
v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1"
core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
_ "git... |
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 PANTHEON.tech
//
// 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 req... |
/*
* MinIO Client (C) 2020 MinIO, 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... |
package app
import (
"fmt"
"github.com/gdamore/tcell/v2"
"sort"
"strconv"
"strings"
"sync"
)
type InfoFrame struct {
sync.Mutex
x, y int
width, height int
cursorX, cursorY int
scrollYOffset int
expandLevel int
podHeader StringItem
positions []Item
nsItems ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.24.0
// protoc v3.5.1
// source: gaia.proto
package gserver
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/g... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/services/hotel_group_view_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v1/resources"
_ "... |
// Copyright 2016 CoreOS, 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/services/product_group_view_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v2/resources"
_... |
package newznab
import (
"crypto/tls"
"encoding/xml"
"io/ioutil"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
)
// Various constants for categories
const (
// TV Categories
// CategoryTVAll is for all shows
CategoryTVAll = 5000
// CategoryTVFo... |
package bidi
import (
"fmt"
"strings"
"golang.org/x/text/unicode/bidi"
)
// --- ResolvedLevels --------------------------------------------------------
// Resolving embedding levels consists of application of L1 to L4.
//
// We will disregard rule L1 for now and leave it to the client. It would be
// possible to... |
package controller
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"reflect"
"runtime/debug"
"strings"
"time"
"github.com/argoproj-labs/argocd-notifications/notifiers"
"github.com/argoproj-labs/argocd-notifications/shared/clients"
sharedrecipients "github.com/argoproj-labs/argocd-notifications/s... |
package main
import (
"bytes"
"context"
"errors"
"io"
"regexp"
"time"
"fmt"
"io/ioutil"
"log"
"os"
"encoding/json"
texporter "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace"
octrace "go.opencensus.io/trace"
oteloc "go.opentelemetry.io/otel/bridge/opencensus"
"go.openteleme... |
package handler
import (
"context"
"encoding/json"
"fmt"
"github.com/kalmhq/kalm/api/resources"
"io"
"net/http"
"strconv"
"strings"
"sync"
"github.com/gorilla/websocket"
"github.com/kalmhq/kalm/api/client"
"github.com/kalmhq/kalm/api/log"
"github.com/kalmhq/kalm/api/utils"
"github.com/labstack/echo/v4"
... |
/*
Package alog provides asynchronous structured leveled log functionality.
The alog package provides structured logging with JSON output and with
semi-structured text-based logging. Logging is asynchronous, where work and
time to format log messages and write them to I/O is done by an asynchronous
goroutine, minimiz... |
// Copyright 2015 <NAME>. All rights reserved.
// Use of this source code is governed by the standard MIT License (MIT)
// that can be found in the LICENSE file.
// Package bytearray provides a fixed size chunk []byte array with slab allocation.
// ByteArrays utilize next-chunk-linking which provides full reader/write... |
package main
import (
"fmt"
"time"
"encoding/json"
"os/exec"
"os"
"bytes"
"strings"
"strconv"
"context"
"runtime"
)
type vmstatMemorySummary struct {
ActiveB float64 `json:"active-bytes"`
InactiveB float64 `json:"inactive-bytes"`
FreeB float64 `json:"free-bytes"`
LaundryB float64 `json:"laundry-byte... |
package main
import (
"encoding/json"
"flag"
"fmt"
"go/ast"
"go/importer"
"go/token"
"go/types"
//"go/types"
"io/ioutil"
"os"
"path/filepath"
"reflect"
"strconv"
"strings"
"golang.org/x/tools/go/packages"
)
type stdgoListType struct {
Stdgo []string `json:"stdgo"`
}
type dataType struct {
Args []s... |
/***
Copyright 2016 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... |
package raftstore
import (
"bytes"
"context"
"errors"
"fmt"
"sync"
"time"
"github.com/fagongzi/util/format"
"github.com/fagongzi/util/protoc"
"github.com/matrixorigin/matrixcube/components/log"
"github.com/matrixorigin/matrixcube/components/prophet"
pconfig "github.com/matrixorigin/matrixcube/components/pr... |
package radarr
import (
"time"
"golift.io/starr"
)
// SystemStatus is the /api/v3/system/status endpoint.
type SystemStatus struct {
Version string `json:"version"`
BuildTime time.Time `json:"buildTime"`
StartupPath string `json:"startupPath"`
AppData string `json:"ap... |
package main
import (
"bufio"
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"sync"
"syscall"
"time"
"github.com/gorilla/websocket"
)
// UserInterface User interface structure.
type UserInterface struct {
ScreenMessageTyp... |
//go:build linux && cgo
package gocapng
// #include <stdlib.h>
// #include <cap-ng.h>
// #include <stdarg.h>
// #cgo LDFLAGS: -lcap-ng
//
// int capng_updatev_wrapper(capng_act_t action, capng_type_t type, int *capability) {
// return capng_update(action, type, capability[0]);
//}
import "C"
import (
"os"
"unsafe"
... |
package http
import (
"context"
"errors"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
"time"
"github.com/golang/glog"
corev1 "k8s.io/api/core/v1"
extv1beta1 "k8s.io/api/extensions/v1beta1"
k8sErrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachine... |
package domain
import (
"context"
"net/http"
"strconv"
"strings"
"time"
"github.com/json-iterator/go"
eh "github.com/looplab/eventhorizon"
log "github.com/superchalupa/sailfish/src/log"
)
// CmdIDSetter interface is for commands that can take a given command id
type CmdIDSetter interface {
SetCmdID(eh.UUID... |
package bittrex
//go:generate go-bindata -pkg internal -nometadata -o ./internal/bindata.go test-fixtures
//go:generate go fmt ./internal/bindata.go
import (
"encoding/json"
"net/http"
"strconv"
"strings"
"sync"
"time"
"github.com/carterjones/signalr"
"github.com/carterjones/signalr/hubs"
"github.com/pkg/er... |
package lib
import (
"fmt"
"github.com/btcsuite/btcd/btcec"
"github.com/golang/glog"
"github.com/pkg/errors"
"reflect"
)
func (bav *UtxoView) GetFollowEntryForFollowerPublicKeyCreatorPublicKey(followerPublicKey []byte, creatorPublicKey []byte) *FollowEntry {
followerPKID := bav.GetPKIDForPublicKey(followerPubli... |
package main
import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/bitly/go-simplejson"
"strconv"
"strings"
"log"
"fmt"
"errors"
)
// const (
// TypeInvalid ValueType = iota
// TypeBool
// TypeInt
// TypeFloat
// TypeString
// TypeList
// TypeMap
// TypeSet
// )
f... |
package formation
import (
"context"
"fmt"
"strings"
"github.com/atlassian/ctrl"
cond_v1 "github.com/atlassian/ctrl/apis/condition/v1"
"github.com/atlassian/voyager"
form_v1 "github.com/atlassian/voyager/pkg/apis/formation/v1"
orch_v1 "github.com/atlassian/voyager/pkg/apis/orchestration/v1"
form_v1client "gi... |
// Copyright 2022 The Dawn 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 t... |
/*
* Copyright 2020 Mandelsoft. All rights reserved.
* This file is licensed under the Apache Software License, v. 2 except as noted
* otherwise in the LICENSE file
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma... |
// Copyright 2015 <NAME>. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
package main
import (
"archive/zip"
"bytes"
"encoding/json"
"flag"
"fmt"
"go/ast"
"go/parser"
"go/token"
"go/types"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
... |
package await
import (
"fmt"
"reflect"
"strings"
"time"
"github.com/golang/glog"
"github.com/pkg/errors"
"github.com/pulumi/pulumi-kubernetes/pkg/openapi"
"github.com/pulumi/pulumi/pkg/diag"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachine... |
package windows
import (
"fmt"
"image/color"
"syscall"
fm "github.com/hujun528/GoMiniblink/forms"
br "github.com/hujun528/GoMiniblink/forms/bridge"
win "github.com/hujun528/GoMiniblink/forms/windows/win32"
)
func findChild(container br.Controls, hWnd win.HWND) br.Window {
if container.GetHandle() == uintptr(h... |
package main
import (
"bufio"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"os"
"os/user"
"path/filepath"
"regexp"
"strconv"
"strings"
"github.com/pborman/getopt"
)
const CONFIGENV = "GODISTA_CONF"
const CONFIG_FILENAME = "config.json"
const GODISTA_SETTINGS_FOLDER_PATTERN = "%s/.godista/"
const ... |
package blocks
import (
"context"
"fmt"
"html/template"
"io"
"net/http"
"os"
"path"
"path/filepath"
"strings"
"sync"
"github.com/russross/blackfriday/v2"
"github.com/valyala/bytebufferpool"
)
// ExtensionParser type declaration to customize other extension's parsers before passed to the template's one.
t... |
package neurax
import (
"bufio"
"bytes"
"fmt"
"io/ioutil"
"math/rand"
"net"
"net/http"
"os"
"runtime"
"strconv"
"strings"
"time"
portscanner "github.com/anvie/port-scanner"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/pcap"
"github.com/mostlygeek/arp"
... |
/*
* Copyright 2015-2018 <NAME>, 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 appli... |
package main
import (
"encoding/json"
"fmt"
"github.com/imgix/prometheus-am-executor/chanmap"
"github.com/imgix/prometheus-am-executor/countermap"
"github.com/prometheus/alertmanager/template"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
pm "github.... |
/*
* Copyright 2017 Crimson AS <<EMAIL>>
* Author: <NAME> <<EMAIL>>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of... |
package v4l2
// #include <linux/videodev2.h>
import "C"
import (
"fmt"
"unsafe"
)
// FourCCType represents the four character encoding value
type FourCCType = uint32
// Some Predefined pixel format definitions
// https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt.html
// https://elixir.bootlin.... |
package repository
import (
"fmt"
"github.com/DSiSc/blockstore"
blkconf "github.com/DSiSc/blockstore/config"
"github.com/DSiSc/craft/log"
"github.com/DSiSc/craft/monitor"
"github.com/DSiSc/craft/types"
"github.com/DSiSc/repository/config"
"github.com/DSiSc/statedb-NG"
"github.com/DSiSc/statedb-NG/ethdb"
"git... |
// Copyright 2017 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writi... |
package notify
import (
"crypto/ecdsa"
"crypto/tls"
"encoding/base64"
"errors"
"net"
"net/http"
"path/filepath"
"sync"
"time"
"github.com/miczone/gorush/config"
"github.com/miczone/gorush/core"
"github.com/miczone/gorush/logx"
"github.com/miczone/gorush/status"
"github.com/mitchellh/mapstructure"
"git... |
/*
Copyright 2019 The Vitess Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
// Copyright 2014 The Web Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... |
package pkglint
// Checks for patch files.
import "strings"
func CheckLinesPatch(lines *Lines, pkg *Package) {
(&PatchChecker{lines, NewLinesLexer(lines), false, false}).Check(pkg)
}
type PatchChecker struct {
lines *Lines
llex *LinesLexer
seenDocumentation bool
previousLineEmpty bool
... |
package main
// Build for raspberry zero: env GOOS=linux GOARCH=arm GOARM=6 go build
// Build for raspberry 3: env GOOS=linux GOARCH=arm GOARM=7 go build
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"reflect"
"strconv"
"strings"
"time"
"github.com/goccy/go-yaml"
"github.com/go-ki... |
package rtmp
import (
"encoding/binary"
"errors"
"fmt"
"github.com/ZachGill/rtmp/amf/amf0"
"github.com/ZachGill/rtmp/audio"
"github.com/ZachGill/rtmp/config"
)
// Control message types
const (
// Control messages MUST have message stream ID 0 and be sent in chunk stream ID 2
SetChunkSize = 1
AbortMessage... |
package jsonlogic
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestOpCompare(t *testing.T) {
assert := assert.New(t)
jl := NewEmpty()
AddOpLessThan(jl)
AddOpLessEqual(jl)
AddOpGreaterThan(jl)
AddOpGreaterEqual(jl)
TestCases{
// Zero/One param.
{Logic: `{">":[]}`, Data: `null`, Err: tru... |
package main
import (
"context"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"database/sql"
"encoding/json"
"encoding/pem"
"encoding/xml"
"errors"
"fmt"
"io"
"log"
"net/http"
"net/url"
"strings"
"time"
"github.com/go-chi/chi/v5"
"github.com/go-fed/httpsig"
"github.com/google/uuid"
"github.com/spf13/ca... |
// Copyright 2021 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 ... |
/*
Package synthesis fixes synthetic DNA molecules in preparation for synthesis.
Many synthesis companies have restrictions on the DNA they can synthesize. This
synthesis fixer takes advantage of synonymous codons in protein coding
sequences (CDS) to remove problematic sequences that either users don't want
(like rest... |
package commands
import (
"encoding/json"
"errors"
"fmt"
"os"
"strings"
"github.com/BurntSushi/toml"
assembly "github.com/molecule-man/stack-assembly"
"github.com/molecule-man/stack-assembly/cli"
"github.com/molecule-man/stack-assembly/conf"
"github.com/spf13/cobra"
yaml "gopkg.in/yaml.v3"
)
const (
wrap... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.18.0
// source: petstore.proto
package petstore
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/pr... |
package main
import (
"math"
"os"
"strconv"
"time"
"github.com/cagnosolutions/adb"
)
type Auth struct {
Email string `json:"email,omitempty" auth:"username"`
Password string `json:"password,omitempty" auth:"password"`
Active bool `json:"active,omitempty" auth:"active"`
Role string `json:"role,omi... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
/*
* MIT License
*
* (C) Copyright [2021-2022] Hewlett Packard Enterprise Development LP
*
* 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 limita... |
package teautils
import "github.com/iwind/TeaGo/maps"
var UsualCharsets = []maps.Map{
{"charset": "utf-8", "name": "Universal Alphabet (UTF-8)"},
{"charset": "unicode", "name": "Unicode"},
{"name": "Chinese Simplified (GB2312)", "charset": "gb2312"},
{"charset": "big5", "name": "Chinese Traditional (Big5)"},
{"c... |
//
// Copyright 2020 IBM Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
// Copyright 2012-Present Couchbase, Inc.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
// in that file, in accordance with the Business Source License, use of this
// software will be governed by the Apach... |
// Copyright 2017 Vector Creations Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... |
// Copyright 2015 Comcast Cable Communications Management, 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 applicab... |
// Copyright 2017 The nats-operator 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 evidence_test
import (
"encoding/hex"
"fmt"
"sync"
"testing"
"time"
"github.com/go-kit/kit/log/term"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
cfg "github.com/celestiaorg/celestia-core/config"
"github.com/celestiaorg/celestia-core... |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package scanner
import (
"os"
"strings"
"testing"
"github.com/gravwell/gcfg/token"
)
var fset = token.NewFileSet()
const /* class */ (
special = iota
... |
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"bytes"
"encoding/json"
"strconv"
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/errors"
"gi... |
// Copyright 2017 The LUCI Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
package main
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"os/signal"
"path/filepath"
"strconv"
"strings"
"syscall"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/chef/automate/components/automate-deployment/pkg/airgap"
"... |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
// The gen command generates Go code (in the parent directory) for all
// the architecture-specific opcodes, blocks, and rewrites.
package mai... |
package podlogstream
import (
"context"
"fmt"
"io"
"sync"
"time"
"github.com/tilt-dev/tilt/pkg/apis/core/v1alpha1"
"github.com/google/go-cmp/cmp"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/types"
ctrl "sigs.k8s.io/controller-runtime"
ctrlclient "sigs.k8s.io/controller-runtime/... |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package parse // import "robpike.io/ivy/parse"
import (
"bytes"
"fmt"
"strconv"
"strings"
"robpike.io/ivy/exec"
"robpike.io/ivy/scan"
"robpike.io/ivy/v... |
// +build int
package main
import (
"sync"
"testing"
"github.com/alicebob/miniredis"
)
func TestSubscribe(t *testing.T) {
testCommands(t,
fail("SUBSCRIBE"),
succ("SUBSCRIBE", "foo"),
succ("UNSUBSCRIBE"),
succ("SUBSCRIBE", "foo"),
succ("UNSUBSCRIBE", "foo"),
succ("SUBSCRIBE", "foo", "bar"),
succ... |
package bslack
import (
"bytes"
"errors"
"fmt"
"strings"
"sync"
"time"
"github.com/42wim/matterbridge/bridge"
"github.com/42wim/matterbridge/bridge/config"
"github.com/42wim/matterbridge/bridge/helper"
"github.com/42wim/matterbridge/matterhook"
lru "github.com/hashicorp/golang-lru"
"github.com/nlopes/slac... |
// Copyright (c) 2019 <NAME>, Inc.
// Use of this source code is governed by the Apache License 2.0
// that can be found in the COPYING file.
package snmpoc
import (
"context"
"crypto/md5"
"errors"
"fmt"
"regexp"
"strings"
"sync"
pgnmi "github.com/aristanetworks/cloudvision-go/provider/gnmi"
"github.com/ari... |
// Copyright 2020 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 influxdb
import (
"bytes"
"context"
"encoding/json"
"io"
"io/ioutil"
stdhttp "net/http"
"net/url"
"sort"
"strconv"
"strings"
"time"
"github.com/apache/arrow/go/arrow/memory"
"github.com/influxdata/flux"
"github.com/influxdata/flux/ast"
"github.com/influxdata/flux/ast/astutil"
"github.com/influ... |
package opcode
import "fmt"
const (
refClass = 0
gotoClass = 1
lineClass = 2
instrClass = 3
)
const (
NOP Opcode = 0x000
ESWAP = 0x001
WIDEN = 0x002
VERSION = 0x003
VLIST = 0x007
BLOCK = 0x008
COLLECT ... |
package main
import (
"flag"
"fmt"
"log"
"strconv"
"time"
"github.com/coreos/ksched/k8s/k8sclient"
"github.com/coreos/ksched/k8s/k8stype"
"github.com/coreos/ksched/pkg/types"
"github.com/coreos/ksched/pkg/types/resourcestatus"
"github.com/coreos/ksched/pkg/util"
"github.com/coreos/ksched/pkg/util/idgenerat... |
package main
import (
"fmt"
"log"
"math"
"path/filepath"
"strings"
"time"
"../goflying/ahrs"
"../goflying/ahrsweb"
"../sensors"
"github.com/kidoman/embd"
_ "github.com/kidoman/embd/host/all"
)
const (
numRetries uint8 = 5
calCLimit = 0.15
calDLimit = 10.0
// WHO_AM_I values to different... |
// Copyright 2019 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
package channel
import (
"fmt"
"io"
"net"
"net/url"
"reflect"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/yinqiwen/gsnova/common/helper"
"github.com/yinqiwen/gsnova/common/logger"
"github.com/yinqiwen/gsnova/common/mux"
"github.com/yinqiwen/pmux"
)
var p2pConnID string
func init() {
p2pConnID = ... |
package stress
import (
"bytes"
"errors"
"fmt"
"io"
"io/ioutil"
"math/rand"
"net/http"
"sync"
"time"
"github.com/influxdb/influxdb/client/v2"
)
const backoffInterval = time.Duration(500 * time.Millisecond)
// AbstractTag is a struct that abstractly
// defines a tag
type AbstractTag struct {
Key string ... |
// Copyright (c) 2017 Cisco and/or its affiliates.
//
// 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 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, ... |
/**
* Copyright 2019 IBM Corp.
*
* 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... |
/*
memberlist is a library that manages cluster
membership and member failure detection using a gossip based protocol.
The use cases for such a library are far-reaching: all distributed systems
require membership, and memberlist is a re-usable solution to managing
cluster membership and node failure detection.
member... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.