text stringlengths 8.57k 38.1k |
|---|
package main
import (
"bytes"
"errors"
"fmt"
"html/template"
"io"
"os"
"sort"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/gdamore/tcell/v2"
"github.com/moby/term"
"github.com/rivo/tview"
)
type HistoryRow struct {
id *tview.TableCell
addition *tview.TableCell
deletion *tview.TableC... |
// +build linux
package unshare
import (
"bufio"
"bytes"
"fmt"
"io"
"os"
"os/exec"
"os/user"
"runtime"
"strconv"
"strings"
"sync"
"syscall"
"github.com/containers/storage/pkg/idtools"
"github.com/containers/storage/pkg/reexec"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
... |
// Copyright 2016-2018 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 ui
import (
"encoding/json"
"image"
"image/color"
"net/http"
"time"
"golang.org/x/text/language"
"golang.org/x/text/message"
"gioui.org/gesture"
"gioui.org/io/key"
"gioui.org/layout"
"gioui.org/op/paint"
"gioui.org/widget"
"github.com/planetdecred/godcr/ui/decredmaterial"
"github.com/planetdec... |
// Copyright 2020 WHTCORPS INC, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
// Copyright © 2018 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
/*
Package gotinydb implements a simple but useful embedded database.
It supports document insertion and retrieving of golang pointers via the JSON package.
Those documents can be indexed with Bleve.
File management is also supported and the all database is encrypted.
It relais on Bleve and Badger to do the job.
*/
... |
package main
import (
"bufio"
"fmt"
"os"
"path/filepath"
"regexp"
"strings"
"github.com/bitrise-io/go-utils/command"
"github.com/bitrise-io/go-utils/fileutil"
"github.com/bitrise-io/go-utils/log"
"github.com/bitrise-io/go-utils/pathutil"
"github.com/bitrise-io/go-utils/stringutil"
"github.com/bitrise-tool... |
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distribu... |
package builtin
import (
"fmt"
"strings"
"github.com/pingcap/ticat/pkg/cli/core"
)
// TODO: register the env kvs these commands will modify
func RegisterCmds(cmds *core.CmdTree) {
RegisterExecutorCmds(cmds)
RegisterEnvCmds(cmds)
RegisterVerbCmds(cmds)
RegisterTrivialCmds(cmds)
RegisterFlowCmds(cmds)
Regist... |
package collectors
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"strings"
"bosun.org/metadata"
"bosun.org/opentsdb"
)
var (
rmqQueueStatusMap = map[string]int{
"running": 0,
"syncing": 1,
"flow": 2,
"idle": 3,
"down": 4,
}
)
const (
defaultRabbitmqURL string = "http://guest:guest... |
package main
import (
"strings"
"github.com/tinode/chat/server/logs"
"github.com/tinode/chat/server/store"
"github.com/tinode/chat/server/store/types"
)
// presParams defines parameters for creating a presence notification.
type presParams struct {
userAgent string
seqID int
delID int
delSeq []Msg... |
package reader
import (
"gitlab.com/gomidi/midi"
"gitlab.com/gomidi/midi/midimessage/channel"
"gitlab.com/gomidi/midi/midimessage/meta"
"gitlab.com/gomidi/midi/midimessage/syscommon"
"gitlab.com/gomidi/midi/midimessage/sysex"
"gitlab.com/gomidi/midi/smf"
)
// Msg provides callbacks for MIDI messages
type messag... |
// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0.
package restore
import (
"bytes"
"context"
"crypto/tls"
"sync"
"sync/atomic"
"time"
"github.com/google/uuid"
"github.com/pingcap/errors"
"github.com/pingcap/failpoint"
backuppb "github.com/pingcap/kvproto/pkg/brpb"
"github.com/pingcap/kvproto/pkg/... |
/* Copyright ©2015 The corridor 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 */
package corridor
import (
"math"
"math/rand"
"sync"
"time"
"github.com/gonum/matrix/mat64"
)
/* fitness function to generate the total f... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.6.1
// source: gcsystemmsgs.proto
package dota
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/ru... |
package analyze
import (
"bytes"
"context"
"fmt"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/bazelbuild/buildtools/edit"
"github.com/bazelbuild/rules_typescript/ts_auto_deps/platform"
"github.com/bazelbuild/rules_typescript/ts_auto_deps/workspace"
"github.com/golang/protobuf/proto"
appb "githu... |
package app
/*
* Copyright (C) 2010 The Android Open Source 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 re... |
//Copyright (C) 2020 <NAME>. See LICENSE file for license
package main
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"os/user"
"regexp"
"runtime"
"sort"
"strings"
"time"
"twitter"
"github.com/dghubble/oauth1"
"golang.org/x/sync/semaphore"
)
type TweetCart... |
// This module contains a collection of YANG definitions
// for Cisco IOS-XR ppp-ea package operational data.
//
// This module contains definitions
// for the following management objects:
// pppea: PPPEA operational data
//
// Copyright (c) 2013-2017 by Cisco Systems, Inc.
// All rights reserved.
package ppp_ea_o... |
// Copyright 2019 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.
// The stargz package reads & writes tar.gz ("tarball") files in a
// seekable, indexed format call "stargz". A stargz file is still a
// valid tarball, but it'... |
package inflect
import (
"testing"
"github.com/stretchr/testify/assert"
)
var basicTests = [][]string{
// Uncountables.
{"fish", "fish"},
{"media", "media"},
{"moose", "moose"},
{"police", "police"},
{"sheep", "sheep"},
{"series", "series"},
{"species", "species"},
{"agenda", "agenda"},
{"news", "news"},... |
package internal
import (
"context"
"github.com/WelcomerTeam/RealRock/bucketstore"
limiter "github.com/WelcomerTeam/RealRock/limiter"
discord "github.com/WelcomerTeam/Sandwich-Daemon/discord/structs"
grpcServer "github.com/WelcomerTeam/Sandwich-Daemon/protobuf"
structs "github.com/WelcomerTeam/Sandwich-Daemon/st... |
package ace
import (
"github.com/gopherjs/gopherjs/js"
)
// Editor is a wrapper for the Ace Editor type.
type Editor struct {
*js.Object
}
// OnBlur binds the given function to the Ace blur event.
func (edit Editor) OnBlur(f func()) {
edit.Call("on", "blur", f)
}
// OnChange binds the given function to the Ace c... |
/*
Package swp implements the same Sliding Window Protocol that
TCP uses for flow-control and reliable, ordered delivery.
The Nats event bus (https://nats.io/) is a
software model of a hardware multicast
switch. Nats provides multicast, but no guarantees of delivery
and no flow-control. This works fine as long as your... |
package gobless
import "github.com/gdamore/tcell"
type Color int32
const (
ColorBlack = Color(tcell.ColorBlack)
ColorMaroon = Color(tcell.ColorMaroon)
ColorGreen = Color(tcell.ColorGreen)
ColorOlive = Color(tcell.ColorOlive)
ColorNavy = ... |
package commands
import (
"fmt"
"math/big"
"sort"
"strconv"
"strings"
"time"
"github.com/jfrog/jfrog-cli-core/v2/plugins/components"
"github.com/jfrog/jfrog-client-go/utils/errorutils"
helpers "github.com/lorenyeung/indexcheck/utils"
"github.com/jfrog/jfrog-cli-core/v2/utils/config"
ui "github.com/gizak... |
package main
import (
"log"
"fmt"
"os"
"reflect"
"regexp"
str "strings"
)
// does file exist?
func fexists(fp string) bool {
f,err:=os.Stat(fp)
if err==nil {
return f.Mode().IsRegular()
}
return false
}
func getReportFunctionName(ifs uint32, full bool) string {
nl... |
package goment
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestFromNowRelativeTime(t *testing.T) {
assert := assert.New(t)
testTime := time.Date(2000, 12, 15, 17, 8, 0, 0, time.UTC)
timeNow = func() time.Time {
return testTime
}
// Seconds to minutes threshold.
lib := simpleTim... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/resources/change_status.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
wrappers "github.com/catper/protobuf/ptypes/wrappers"
enums "google.golang.org/genproto/googleapis/ads/googl... |
package alicloud
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
"strings"
"time"
"golang.org/x/net/context"
"github.com/aliyun/alibaba-cloud-sdk-go/services/cs"
"github.com/aliyun/alibaba-cloud-sdk-go/services/ess"
"github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity"
"github.com/... |
// Copyright 2020 Saferwall. All rights reserved.
// Use of this source code is governed by Apache v2 license
// license that can be found in the LICENSE file.
package pe
import (
"encoding/binary"
"errors"
"log"
"strings"
)
const (
// TinyPESize On Windows XP (x32) the smallest PE executable is 9... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.1
// source: api/prometheus/v1/prometheus.proto
package v1
import (
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
_ "google.golang.org/genproto/googleapis/api/annotations"
pr... |
// Copyright © 2018 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
package mage
import (
"bytes"
"crypto/sha1"
"errors"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"sort"
"strings"
"text/template"
"time"
"github.com/magefile/mage/internal"
"github.com/magefile/mage/mg"
"github.com/magefile/mage/parse"
"github.com/magefil... |
/*
Copyright 2018 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
package main
import (
"fmt"
"strconv"
"encoding/json"
"github.com/hyperledger/fabric/core/chaincode/shim"
pb "github.com/hyperledger/fabric/protos/peer"
)
// Invoice implements a simple chaincode to manage Invoice
type Invoices struct {
}
var InvIndexStr = "_invid"
// Attribute... |
package tview
import (
"math"
"os"
"regexp"
"sort"
"strconv"
"github.com/gdamore/tcell"
runewidth "github.com/mattn/go-runewidth"
"github.com/rivo/uniseg"
)
// Text alignment within a box.
const (
AlignLeft = iota
AlignCenter
AlignRight
)
// IsVtxxx indicates whether the TERM environment variable matches... |
package paxos
import (
"dlog"
"encoding/binary"
"fastrpc"
"genericsmr"
"genericsmrproto"
"io"
"log"
"math"
"paxosproto"
"state"
"time"
)
const CHAN_BUFFER_SIZE = 200000
const TRUE = uint8(1)
const FALSE = uint8(0)
const COMMIT_GRACE_PERIOD = 10 * 1e9 // 10 second(s)
const SLEEP_TIME_NS = 1e6
type Replica... |
package snowflake
import (
"bytes"
"context"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"database/sql"
"encoding/base64"
"encoding/json"
"encoding/pem"
"errors"
"fmt"
"net/http"
"net/url"
"os"
"path"
"strings"
"time"
"github.com/gofrs/uuid"
"github.com/golang-jwt/jwt"
"github.com/snowflakedb/gosno... |
// 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 w... |
package scipipe
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"reflect"
"sync"
"testing"
"time"
)
func TestSetWfName(t *testing.T) {
initTestLogs()
wf := NewWorkflow("TestWorkflow", 16)
expectedWfName := "TestWorkflow"
if wf.name != expectedWfName {
t.Errorf("Workflow name... |
// Copyright 2015 CANAL+ Group
//
// 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 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 ap... |
// Code generated from DynamoDbGrammar.g4 by ANTLR 4.7.1. DO NOT EDIT.
package generated // DynamoDbGrammar
import "github.com/antlr/antlr4/runtime/Go/antlr"
// BaseDynamoDbGrammarListener is a complete listener for a parse tree produced by DynamoDbGrammarParser.
type BaseDynamoDbGrammarListener struct{}
var _ Dyna... |
/*
Copyright 2016 The Rook 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 agreed to ... |
// Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"time"
"github.com/keybase/client/go/kbfs/kbfscodec"
"github.com/keybase/client/go/kbfs/kbfscrypto"
"github.com/keybase/client/go/k... |
// Copyright (c) 2017, <NAME> <<EMAIL>>
// See LICENSE for licensing information
package interp
import (
"bytes"
"context"
"fmt"
"io"
"math"
"os"
"os/user"
"path/filepath"
"runtime"
"strings"
"sync"
"time"
"mvdan.cc/sh/syntax"
)
// A Runner interprets shell programs. It cannot be reused once a
// progr... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: peer/proposal.proto
package peer // import "github.com/hyperledger/fabric/protos/peer"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import token "github.com/hyperledger/fabric/protos/token"
// Reference imports to supp... |
/*
Copyright 2019 NetFoundry, 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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
// Copyright 2019 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library 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... |
// Copyright 2017 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/devtools/containeranalysis/v1beta1/package/package.proto
package _package // import "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/package"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
... |
package i18n_test
import (
"errors"
"fmt"
"os"
"path/filepath"
"strings"
"sync"
"testing"
"allaboutapps.dev/aw/go-starter/internal/api"
"allaboutapps.dev/aw/go-starter/internal/config"
"allaboutapps.dev/aw/go-starter/internal/i18n"
"allaboutapps.dev/aw/go-starter/internal/test"
"allaboutapps.dev/aw/go-sta... |
package kratos
import (
"fmt"
"io/ioutil"
"net/http"
"net/http/cookiejar"
"net/http/httptest"
"os"
"strconv"
"testing"
"time"
"github.com/ory/dockertest"
dc "github.com/ory/dockertest/docker"
"gopkg.in/yaml.v2"
kratosClient "github.com/ory/kratos-client-go/client"
kratosAdmin "github.com/ory/kratos-cli... |
// Copyright (c) 2022 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 appli... |
// Code generated by protoc-gen-gogo.
// source: error.proto
// DO NOT EDIT!
package models
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import strconv "strconv"
import strings "strings"
import reflect "reflect"
import io "io"
// R... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: grafeas/v1/package.proto
package grafeas
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This... |
// Copyright 2019 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writin... |
package ladon
//Ladon Scanner for golang
//Author: k8gege
//K8Blog: http://k8gege.org/Ladon
//Github: https://github.com/k8gege/LadonGo
import (
"fmt"
"github.com/MBZ986/LadonGo/dcom"
"github.com/MBZ986/LadonGo/dic"
"github.com/MBZ986/LadonGo/exp"
"github.com/MBZ986/LadonGo/ftp"
"github.com/MBZ986/LadonGo/http"
... |
// Copyright 2019 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 crostini
import (
"context"
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"time"
"golang.org/x/sys/unix"
"chromiumos/tast/common/t... |
package util
import (
"fmt"
ketiv1 "github.com/hth0919/migrationmanager/pkg/apis/keti/v1"
"github.com/hth0919/migrationmanager/pkg/controller/util"
v1 "k8s.io/api/core/v1"
apiequality "k8s.io/apimachinery/pkg/api/equality"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io... |
// Copyright 2015 The Serulian 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 es5
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"path"
"strconv"
"strings"
"testing"
"github.com/serulian/compiler/compilercommon"
"github... |
/*
SPDX-FileCopyrightText: 2021 SAP SE or an SAP affiliate company and Gardener contributors
SPDX-License-Identifier: Apache-2.0
*/
package controllers
import (
"context"
"errors"
"fmt"
"net/url"
"sync"
"time"
"github.com/gardener/gardenlogin-controller-manager/api/v1alpha1"
"github.com/gardener/gardenlogin... |
// Copyright 2015 <NAME> and The Caddy 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... |
// This module contains a collection of YANG definitions
// for Cisco IOS-XR lib-keychain-macsec package configuration.
//
// This module contains definitions
// for the following management objects:
// mac-sec-keychains: Configure a Key Chain
//
// Copyright (c) 2013-2017 by Cisco Systems, Inc.
// All rights reser... |
/*
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, ... |
// SPDX-License-Identifier: ISC
//
// Copyright (c) 2020 <NAME> <<EMAIL>>
//
// Permission to use, copy, modify, and distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVI... |
// Copyright (c) 2014-2016 The btcsuite developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package hdkeychain
// References:
// [BIP32]: BIP0032 - Hierarchical Deterministic Wallets
// https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
import... |
/*
Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by app... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: grr/proto/anomaly.proto
/*
Package anomaly is a generated protocol buffer package.
It is generated from these files:
grr/proto/anomaly.proto
It has these top-level messages:
Anomaly
*/
package anomaly
import proto "github.com/golang/protobuf/proto"
impor... |
// Copyright 2021 Google LLC. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
/*
Copyright 2018 Yunify, 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
distr... |
// Copyright 2019 github.com/ucirello and cirello.io. 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... |
// 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.
// +build windows
package main
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"github.com/huuzkee-foundation/winsvc/debug"
"github.com/... |
package mint
import (
"bytes"
"encoding/hex"
"fmt"
"testing"
)
var (
// Extension test cases
extValidIn = extension{
extensionType: helloExtensionType(0x000a),
extensionData: []byte{0xf0, 0xf1, 0xf2, 0xf3, 0xf4},
}
extEmptyIn = extension{
extensionType: helloExtensionType(0x000a),
extensionData: []byt... |
// Copyright 2017 The TCell Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use 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 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 types
import (
"fmt"
"github.com/gijit/gi/pkg/ast"
"github.com/gijit/gi/pkg/constant"
"github.com/gijit/gi/pkg/token"
)
var DisallowMethodRedefin... |
/*
Copyright 2014 Workiva, 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 writing, softw... |
/*
* Tencent is pleased to support the open source community by making Blueking Container Service available.
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obta... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: gen_test.proto
package main
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/pro... |
/*
Copyright 2014 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 law or agreed to in ... |
// 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 w... |
// Copyright 2201 <NAME><<EMAIL>>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package skiplistmap
import (
"fmt"
"math/bits"
"sort"
"strings"
"sync"
"sync/atomic"
"unsafe"
"github.com/kazu/elist_head"
list_head "github.com/kazu... |
/* Copyright (C) 2015 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this file (originally named optionparser.go) and associated documentation files
* (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, c... |
/*
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 ... |
// Copyright 2019 The NATS 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 wr... |
package localizable
const SPANISH = "es"
const ES = `
"appName" = "godcr";
"appTitle" = "godcr (%s)";
"recentTransactions" = "Transacciones Recientes";
"recentProposals" = "Propuestas Recientes";
"seeAll" = "Ver todo";
"send" = "Enviar";
"receive" = "Recibir";
"online" = "En línea";
"offline" = "Desconectado";
"showD... |
package value
import (
"bytes"
"strconv"
"github.com/ydb-platform/ydb-go-genproto/protos/Ydb"
)
type T interface {
toYDB() *Ydb.Type
toString(*bytes.Buffer)
equal(T) bool
}
func TypeToYDB(t T) *Ydb.Type {
return t.toYDB()
}
func WriteTypeStringTo(buf *bytes.Buffer, t T) {
t.toString(buf)
}
func TypesEqual... |
package search
import (
"fmt"
"math"
"sync"
. "github.com/amanjpro/zahak/book"
. "github.com/amanjpro/zahak/engine"
. "github.com/amanjpro/zahak/fathom"
)
const TB_WIN_BOUND int16 = 27000
const TB_LOSS_BOUND int16 = -27000
var RazoringMargin int16 = 339
var TPMargin int16 = 35
var RFPMargin int16 = 64
var FPM... |
// Copyright 2020 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
package roaring
import (
"fmt"
"math/rand"
"sort"
"testing"
//"unsafe"
. "github.com/smartystreets/goconvey/convey"
)
func init() {
rleVerbose = testing.Verbose()
}
func TestRleInterval32s(t *testing.T) {
Convey("canMerge, and mergeInterval32s should do what they say", t, func() {
a := interval32{start: ... |
// DO NOT EDIT THIS FILE. GENERATED BY svdxgen.
// +build stm32g471xx
// Package fdcan provides access to the registers of the FDCAN peripheral.
//
// Instances:
// FDCAN FDCAN_BASE APB1 FDCAN2_INTR0+,FDCAN2_INTR1+ FDCAN
// FDCAN1 FDCAN1_BASE - FDCAN2_INTR0+,FDCAN2_INTR1+ FDCAN
// FDCAN2 FDCAN2_BASE ... |
package resourcemanagers
import (
"context"
"crypto/tls"
"fmt"
"golang.org/x/exp/maps"
"github.com/determined-ai/determined/master/pkg/logger"
"github.com/determined-ai/determined/master/pkg/model"
"github.com/google/uuid"
"github.com/pkg/errors"
"github.com/determined-ai/determined/master/internal/config... |
package types
import (
"sort"
sdk "github.com/cosmos/cosmos-sdk/types"
)
// Type of match
type MatchType int
const (
ExactMatch MatchType = iota + 1
NoMatch
FractionalMatch
)
// Direction of price
type PriceDirection int
const (
Increasing PriceDirection = iota + 1
Decreasing
Staying
)
// Direction of or... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.14.0
// source: prereqInterface.proto
package prereqInterface
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status ... |
package types
// OpenAPIEdgeGateway structure supports marshalling both - NSX-V and NSX-T edge gateways as returned by OpenAPI
// endpoint (cloudapi/1.0.0edgeGateways/), but the endpoint only allows users to create NSX-T edge gateways.
type OpenAPIEdgeGateway struct {
Status string `json:"status,omitempty"`
ID s... |
package msgregistry
import (
"fmt"
"reflect"
"strings"
"sync"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/any"
"github.com/golang/protobuf/ptypes/wrappers"
... |
// Copyright 2011 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 time
import (
"errors"
"sync"
"syscall"
)
//go:generate env ZONEINFO=$GOROOT/lib/time/zoneinfo.zip go run genzabbrs.go -output zoneinfo_abbrs_windo... |
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.