text stringlengths 8.57k 38.1k |
|---|
package mint
import (
"crypto"
"crypto/x509"
"encoding/hex"
"errors"
"fmt"
"io"
"net"
"reflect"
"sync"
"time"
)
var WouldBlock = fmt.Errorf("Would have blocked")
type Certificate struct {
Chain []*x509.Certificate
PrivateKey crypto.Signer
}
type PreSharedKey struct {
CipherSuite CipherSuite
IsRe... |
package juggler_test
import (
"expvar"
"flag"
"fmt"
"math/rand"
"net/http/httptest"
"os"
"strconv"
"strings"
"sync"
"sync/atomic"
"testing"
"text/tabwriter"
"time"
"golang.org/x/net/context"
"github.com/mna/juggler"
"github.com/mna/juggler/broker"
"github.com/mna/juggler/broker/redisbroker"
"github... |
package types
import (
"errors"
"fmt"
"regexp"
"strconv"
"strings"
"github.com/elliotchance/c2go/program"
"github.com/elliotchance/c2go/util"
)
// cIntegerType - slice of C integer type
var cIntegerType = []string{
"int",
"long long",
"long long int",
"long long unsigned int",
"long unsigned int",
"long... |
// Copyright 2015 syzkaller project authors. 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 (
"bytes"
"flag"
"fmt"
"math/rand"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"runtime"
"runtime/debug"
"strconv"
"str... |
// Copyright 2018 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
// puzzle at http://adventofcode.com/day/6
package main
import (
"fmt"
"math"
"strconv"
"strings"
)
const gridWidth int = 1000
const gridHeight int = 1000
var grid [gridHeight][gridWidth]int
type Point struct {
x int
y int
}
type Rectangle struct {
p1 Point
p2 Point
}
func main() {
instructions := strin... |
package openwechat
import (
"context"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"html"
"net/http"
"os"
"strconv"
"strings"
"sync"
"time"
)
type Message struct {
isAt bool
AppInfo struct {
Type int
AppID string
}
AppMsgType AppMessageType
HasProductId int
ImgHeight ... |
// Copyright (c) 2020 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package rpcserver
import (
"context"
"crypto/rand"
"encoding/binary"
"encoding/hex"
"os"
"testing"
"time"
"github.com/decred/dcrd/blockchain/stake/v4"
"github.com/d... |
// +build linux freebsd
// GoSpeccy SDL interface (audio&video output, keyboard input)
package sdl_output
import (
"bytes"
"errors"
"flag"
"fmt"
"github.com/scottferg/Go-SDL/sdl"
"github.com/scottferg/Go-SDL/ttf"
"github.com/remogatto/clingon"
"github.com/remogatto/gospeccy/src/env"
"github.com/remogatto/gos... |
package miner
import (
"crypto/ecdsa"
"crypto/rsa"
"fmt"
"github.com/bazo-blockchain/bazo-miner/crypto"
"github.com/bazo-blockchain/bazo-miner/p2p"
"log"
"math"
"math/rand"
"os"
"strings"
"sync"
"time"
"github.com/bazo-blockchain/bazo-miner/protocol"
"github.com/bazo-blockchain/bazo-miner/storage"
)
va... |
// DO NOT EDIT THIS FILE. GENERATED BY xgen.
// +build stm32f412
package dma
import (
"embedded/mmio"
"unsafe"
"github.com/embeddedgo/stm32/p/bus"
"github.com/embeddedgo/stm32/p/mmap"
)
type Periph struct {
ISR [2]RISR
IFCR [2]RIFCR
S [8]RS
}
func DMA1() *Periph { return (*Periph)(unsafe.Pointer(uintpt... |
package scanner
// This is all lifter from https://raw.githubusercontent.com/asciimath/asciimathml/master/ASCIIMathML.js
type Symbol struct {
input string
tag string
output string
ttype int
isFunc bool
rewriteLeftRight [2]string
codes int
tex ... |
//
// Go-FTL
//
// Copyright (C) <NAME>, 2014-2017
//
// Do not remove the following lines - used in auto-update.
// Version: 0.5.9
// BuildNo: 1811
// FileId: 1197
//
package mid
import (
"fmt"
"net/http"
"net/url"
"os"
"sort"
"strings"
"time"
"github.com/pschlump/Go-FTL/server/cfg"
"github.com/pschlump/Go... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/filter/fault/v3alpha/fault.proto
package envoy_config_filter_fault_v3alpha
import (
fmt "fmt"
_type "github.com/envoyproxy/go-control-plane/envoy/type"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/... |
package effect
const (
EFFECT_STATUS_AVAILABLE = 0x0001
// EFFECT_STATUS_ACTIVATED = 0x0002
EFFECT_STATUS_SPSELF = 0x0004
)
const (
EFFECT_COUNT_CODE_OATH = 0x10000000
EFFECT_COUNT_CODE_DUEL = 0x20000000
)
//========== Reset ==========
const (
RESET_SELF_TURN = 0x10000000
RESET_OPPO_TURN = 0x20000000
RESET_P... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.19.1
// source: odpf/assets/v1beta1/job.proto
package assetsv1beta1
import (
v1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1"
v1beta11 "github.com/odpf/meteor/models/odpf/assets/facets/v1be... |
/*
* Tencent is pleased to support the open source community by making 蓝鲸 available.
* Copyright (C) 2017-2018 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 obtain a copy of the Li... |
package cluster
import (
clr "cke/cluster"
"cke/log"
"fmt"
"math/rand"
"sync"
"time"
"github.com/coreos/etcd/pkg/types"
)
//FSMState 描述状态机的一种状态
type FSMState struct {
Name string
Level int
}
//FSMEventType 事件类型
type FSMEventType string
//FSMEvent 状态机事件
type FSMEvent struct {
Type FSMEventType
ProTyp... |
package hotline
import (
"bytes"
"embed"
"encoding/binary"
"errors"
"fmt"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
"github.com/stretchr/testify/mock"
"go.uber.org/zap"
"gopkg.in/yaml.v2"
"math/big"
"math/rand"
"net"
"os"
"strings"
"time"
)
const (
trackerListPage = "trackerList"
serverU... |
package ledgerstate
import (
"sync"
"github.com/cockroachdb/errors"
"github.com/iotaledger/hive.go/cerrors"
"github.com/iotaledger/hive.go/datastructure/set"
"github.com/iotaledger/hive.go/datastructure/stack"
"github.com/iotaledger/hive.go/events"
"github.com/iotaledger/hive.go/kvstore"
"github.com/iotaledge... |
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tendermint
import (
"bytes"
"fmt"
"math/rand"
"os"
"sync/atomic"
"time"
"github.com/33cn/chain33/common/crypto"
dbm "github.com/33cn/chain33/com... |
// Package xs contains eXtended actions (xactions) except storage services
// (mirror, ec) and extensions (downloader, lru).
/*
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
*/
package xs
import (
"archive/tar"
"archive/zip"
"compress/gzip"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
"sync"
... |
/*
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, ... |
// Copyright 2018 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
// Copyright 2014 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 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 bufio implements buffered I/O. It wraps an io.Reader or io.Writer
// object, creating another object (Reader or Writer) that also implements
// the ... |
package evergreen
import (
"context"
"fmt"
"io/ioutil"
"path/filepath"
"reflect"
"strings"
"time"
"github.com/evergreen-ci/evergreen/util"
"github.com/evergreen-ci/utility"
"github.com/mongodb/amboy/logger"
"github.com/mongodb/anser/bsonutil"
"github.com/mongodb/grip"
"github.com/mongodb/grip/level"
"gi... |
/*
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, ... |
/*
Copyright 2018 Planet Labs 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
di... |
//
// Copyright (c) 2014-2019 Cesanta Software Limited
// All rights reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Un... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: extension_user/extension_user.proto
package extension_user
import (
fmt "fmt"
proto "github.com/kubegames/protobuf/proto"
extension_base "github.com/kubegames/protobuf/protoc-gen-gogo/testdata/extension_base"
extension_extra "github.com/kubegames/proto... |
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
package scheduler
import (
"context"
"errors"
"fmt"
"io"
"sync"
"time"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
logging "github.com/ipfs/go-log/v2"
"github.com/textileio/powergate/ffs"
"github.com/textileio/powergate/ffs/scheduler/internal/astore"
"github.com/textileio/powergate/ffs/schedul... |
// Copyright 2021 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.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: infra/cros/karte/api/bigqu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/type/http_status.proto
/*
Package envoy_type is a generated protocol buffer package.
It is generated from these files:
envoy/type/http_status.proto
envoy/type/percent.proto
envoy/type/range.proto
It has these top-level messages:
HttpStatus
Percen... |
package apu
import (
"math"
"github.com/pokemium/magia/pkg/util"
)
const (
CPU_FREQ_HZ = 16777216
SND_FREQUENCY = 32768 // sample rate
SND_SAMPLES = 512
SAMP_CYCLES = (CPU_FREQ_HZ / SND_FREQUENCY)
BUFF_SAMPLES = ((SND_SAMPLES) * 16 * 2)
BUFF_SAMPL... |
package buildpacks
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"net"
"net/http"
"os"
"regexp"
"runtime"
"strings"
"time"
"github.com/Masterminds/semver"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/events"
"github.com/dock... |
// Copyright 2013 <NAME>
// License: MIT
// Saturnmoons: Chapter 46, Positions of the Satellites of Saturn
package saturnmoons
import (
"math"
"github.com/soniakeys/meeus/v3/base"
"github.com/soniakeys/meeus/v3/coord"
pp "github.com/soniakeys/meeus/v3/planetposition"
"github.com/soniakeys/meeus/v3/precess"
"gi... |
package main
import (
"bufio"
"errors"
"fmt"
"github.com/sbinet/go-python"
"log"
"math"
"net"
"net/rpc"
"strings"
"strconv"
"sync"
"time"
"os"
"flag"
"encoding/gob"
)
// Timeout for block should be more than timeout for update because nodes should be more patients for the block to come through... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/services/asset_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v2/resources"
_ "google.gola... |
package testhelper
import (
"flag"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
"sync"
"testing"
"time"
"github.com/spf13/afero"
"github.com/stretchr/testify/require"
"github.com/woodensquares/greenery"
)
// CompareFunc is an interface that is fulfilled by compare functions, used
// when verifying... |
package countries
import (
"database/sql/driver"
"encoding/json"
"fmt"
"strconv"
)
// CallCode - calling code of country
type CallCode int64 // int64 for database/sql/driver.Valuer compatibility
// CallCodeInfo - all info about CallCode
type CallCodeInfo struct {
Code CallCode
Countries []CountryCode
}
/... |
package main
import (
"fmt"
"io/ioutil"
"os"
"strings"
)
var cf *ClassFile
var cpool ConstantPool
type ExceptionTable struct {
start_pc u2
end_pc u2
handler_pc u2
catch_type u2
}
type CodeAttribute struct {
attribute_name_index u2
attribute_length u4
max_stqck u2
max_locals ... |
// Copyright (C) 2015,2016 Nippon Telegraph and Telephone 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 req... |
// Code generated by protoc-gen-go.
// source: google.golang.org/cloud/bigtable/internal/cluster_service_proto/bigtable_cluster_service_messages.proto
// DO NOT EDIT!
/*
Package google_bigtable_admin_cluster_v1 is a generated protocol buffer package.
It is generated from these files:
google.golang.org/cloud/bigtable... |
// 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 winsyscall
import (
"unsafe"
)
const (
NameUnknown = 0
NameFullyQualifiedDN = 1
NameSamCompatible = 2
NameDisplay = 3
NameU... |
// Licensed to the LF AI & Data foundation 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 not use th... |
/*
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package chi
// Radix tree implementation below is a based on the original work by
// <NAME> in https://github.com/armon/go-radix/blob/master/radix.go
// (MIT licensed). It's been heavily modified for use as a HTTP routing tree.
import (
"fmt"
"net/http"
"regexp"
"sort"
"strconv"
"strings"
)
type methodTyp int
... |
/*
* Minio Cloud Storage, (C) 2017 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 la... |
// Licensed to LinDB under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. LinDB licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compli... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/filter/http/transcoder/v2/transcoder.proto
package envoy_config_filter_http_transcoder_v2
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobu... |
// Package github provides authentication strategies using GitHub.
package github
import (
"context"
"crypto/tls"
"crypto/x509"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net"
"net/http"
"regexp"
"strconv"
"strings"
"time"
"golang.org/x/oauth2"
"golang.org/x/oauth2/github"
"github.com/dexidp/dex/con... |
package main
import (
"context"
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"net"
"os"
"os/user"
"path/filepath"
"sort"
"strconv"
"strings"
"time"
"github.com/BurntSushi/toml"
"github.com/containerd/containerd/pkg/seed"
"github.com/containerd/containerd/pkg/userns"
"github.com/containerd/containerd/... |
// Code generated by goyacc -o pkg/consolegraphql/filter/parser.go -p Filter pkg/consolegraphql/filter/parser.y. DO NOT EDIT.
//line pkg/consolegraphql/filter/parser.y:10
package filter
import __yyfmt__ "fmt"
//line pkg/consolegraphql/filter/parser.y:10
func setExpressionTree(yylex interface{}, expr Expr) {
yylex.... |
// Code generated by protoc-gen-go.
// source: common/configuration.proto
// DO NOT EDIT!
package common
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.In... |
package horizon
import (
"encoding/json"
hProtocol "github.com/stellar/go/protocols/horizon"
"testing"
)
func TestOperationFeeTestsActions_Show(t *testing.T) {
testCases := []struct {
scenario string
lastbasefee int
max int
min int
mode i... |
// Copyright 2018 The Go Cloud Development Kit Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: common/v4/model.proto
package common
import (
fmt "fmt"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.M... |
package internet
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import serial "v2ray.com/core/common/serial"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to en... |
//
//Copyright 2020 The Magma Authors.
//
//This source code is licensed under the BSD-style license found in the
//LICENSE file in the root directory of this source tree.
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHO... |
package main
import (
"fmt"
"os"
)
type bd82x6x struct {
variant string
node *DevTreeNode
}
func (b bd82x6x) writeGPIOSet(ctx Context, sb *os.File,
val uint32, set uint, partno int, constraint uint32) {
max := uint(32)
if set == 3 {
max = 12
}
bits := [6][2]string{
{"GPIO_MODE_NATIVE", "GPIO_MODE_G... |
package reconciler
import (
"context"
"fmt"
"net/url"
"strings"
"time"
"github.com/inconshreveable/log15"
"github.com/pkg/errors"
"github.com/sourcegraph/sourcegraph/enterprise/internal/campaigns/state"
"github.com/sourcegraph/sourcegraph/enterprise/internal/campaigns/store"
"github.com/sourcegraph/sourceg... |
// This code is available on the terms of the project LICENSE.md file,
// also available online at https://blueoakcouncil.org/license/1.0.0.
package dcr
import (
"bytes"
"crypto/sha256"
"encoding/binary"
"fmt"
"decred.org/dcrdex/dex"
"decred.org/dcrwallet/v2/wallet/txsizes"
"github.com/decred/dcrd/chaincfg/v3... |
package main
import (
"fmt"
"path/filepath"
"sort"
"strconv"
"strings"
"time"
"github.com/golang/protobuf/proto"
composeTypes "github.com/kelda/compose-go/types"
log "github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1... |
package main
import (
"context"
"fmt"
"reflect"
"time"
"github.com/hoangphanthai/Kubernetes_Custom_Resource_Controller/api/types/v1alpha1"
clientV1alpha1 "github.com/hoangphanthai/Kubernetes_Custom_Resource_Controller/clientset/v1alpha1"
apiv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v... |
package netlink
import "fmt"
type IpsetTypeEnum string
func (t IpsetTypeEnum) toString() string {
return string(t)
}
// possible IPSet types
const (
IPSetHashIP IpsetTypeEnum = "hash:ip"
IPSetBitmapIP IpsetTypeEnum = "bitmap:ip"
IPSetBitmapIPMac IpsetTypeEnum = "bitmap:ip,mac"
IPSetBitmapPort ... |
//
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/filter/fault/v2/fault.proto
package envoy_config_filter_fault_v2
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_type "github.com/envoyproxy/go-control-plane/envoy/type"
_ "github.com/envoyproxy/protoc-gen-validate/validate"... |
package assembly
import (
"context"
"fmt"
"time"
lm "github.com/accanto/assembly-operator/internal/lm"
stratossv1alpha1 "github.com/accanto/assembly-operator/pkg/apis/stratoss/v1alpha1"
"github.com/go-logr/logr"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: dapr/proto/placement/v1/placement.proto
package v1
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
/... |
package harfbuzz
import (
"testing"
"github.com/benoitkugler/textlayout/language"
"github.com/benoitkugler/textlayout/unicodedata"
)
// ported from harfbuzz/test/api/test-unicode.c Copyright © 2011 Codethink Limited, Google, Inc. <NAME>, <NAME>
func TestUnicodeProp(t *testing.T) {
runes := []rune{6176, 6155, 0... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc (unknown)
// source: acme/weather/v1/weather.proto
package weatherv1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "re... |
package fr24
// http://blog.cykey.ca/post/88174516880/analyzing-flightradar24s-internal-api-structure
// https://github.com/danmir/pyFlightRadar/blob/master/get_planes.py
// {{{ Global setup
import (
"encoding/json"
"io/ioutil"
"fmt"
"net/http"
"regexp"
"sort"
"github.com/skypies/util/date"
"github.com/skyp... |
package main
import (
"context"
"flag"
"fmt"
"io/ioutil"
"net/http"
"strings"
"sync"
"github.com/jackc/pgx/v4"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
// "github.com/jackc/pgx/v4"
)
f... |
// Code generated by go generate; DO NOT EDIT.
// 2018-01-18 20:15:20.477741406 -0800 PST m=+0.057220191
package locale
var translations = map[string]string{
"de_DE": `{
"plural.feed.error_count": [
"%d Error",
"%d Errors"
],
"plural.categories.feed_count": [
"Es gibt %d Abonnemen... |
// Copyright (c) 2021 rookie-ninja
//
// Use of this source code is governed by an Apache-style
// license that can be found in the LICENSE file.
// Package rkzero an implementation of rkentry.Entry which could be used start restful server with go-zero framework
package rkzero
import (
"context"
"crypto/tls"
"enco... |
// Copyright Istio 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 wri... |
/*
Copyright (c) 2017 VMware, 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 t... |
/**
* Package validator
*
* MISC:
* - anonymous structs - they don't have names so expect the Struct name within StructErrors to be blank
*
*/
package validator
import (
"bytes"
"errors"
"fmt"
"reflect"
"strings"
"sync"
"time"
)
const (
utf8HexComma = "0x2C"
utf8Pipe = "0x7C"... |
package mssql
import (
"database/sql"
"errors"
"fmt"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
_ "github.com/denisenkom/go-mssqldb" //mssql 驱动
"github.com/robfig/cron"
"github.com/qiniu/log"
"github.com/qiniu/logkit/conf"
"github.com/qiniu/logkit/reader"
. "github.com/qiniu/logkit/reader/config"... |
// 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 (
"bytes"
"fmt"
"io"
"strings"
"testing"
"unicode/utf8"
)
// A StringReader delivers its data one string segment at a time via Re... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: proto/smart_contract_service.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "ref... |
package en1993_1_1
import (
"fmt"
"io"
"math"
"github.com/Konstantin8105/connection/unit"
)
// constants by par.3.2.6
const (
E = 210000.0 // Modulus of elasticity. N/sq.mm
G = 81000.0 // Shear modulus. N/sq.mm
Mν = 0.3 // Poissin`s ratio in elastic stage
Mα = 12e-6 // Coefficient of linear therma... |
/*
Copyright 2022 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 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.
// Command watcher watches the specified repository for new commits
// and reports them to the build dashboard.
package main // import "github.com/Go-zh/tools/d... |
// Copyright 2022 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 ogame
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestParseInt(t *testing.T) {
assert.Equal(t, int64(1234567890), ParseInt("1.234.567.890"))
}
func TestToInt(t *testing.T) {
assert.Equal(t, 1234567890, toInt([]byte("1234567890")))
}
func TestMinInt(t *testing.T) {
assert.Equal(t, in... |
package mysql
import (
"github.com/go-jet/jet/internal/testutils"
. "github.com/go-jet/jet/mysql"
"github.com/go-jet/jet/tests/.gentestdata/mysql/dvds/enum"
"github.com/go-jet/jet/tests/.gentestdata/mysql/dvds/model"
. "github.com/go-jet/jet/tests/.gentestdata/mysql/dvds/table"
"github.com/go-jet/jet/tests/.gent... |
/*
Copyright 2019 The MayaData Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, s... |
// Copyright (c) 2018 <NAME> <<EMAIL>>
// MIT Licence - http://opensource.org/licenses/MIT
package aw
import (
"encoding/json"
"fmt"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestItem_Icon(t *testing.T) {
t.Parallel()
it := Item{}
it.Icon(&Icon{"first", "fi... |
package main
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/http"
"os"
"regexp"
"strconv"
"strings"
"time"
"github.com/antihax/goesi"
"github.com/bwmarrin/discordgo"
"github.com/gorilla/websocket"
"github.com/gregjones/httpcache"
"github.com/olekukonko/tablewriter"
"github.com/spf13/pflag"
"gi... |
package main
import (
"regexp"
"strings"
"github.com/prometheus/client_golang/prometheus"
)
var counters = map[string]*prometheus.Desc{
"async_tasks_completed": newDesc(
"async_tasks", "completed",
"Number of completed async tasks.",
),
"assigner_evaluated_offers": newDesc(
"assigner_evaluated", "offers"... |
package workflowv0
import (
"context"
"encoding/json"
"github.com/go-gorp/gorp"
"github.com/ovh/cds/engine/api/cache"
"github.com/ovh/cds/engine/api/hook"
"github.com/ovh/cds/engine/api/permission"
"github.com/ovh/cds/engine/api/pipeline"
"github.com/ovh/cds/engine/api/project"
"github.com/ovh/cds/engine/ap... |
/*
* Copyright (c) 2019 InterDigital Communications, 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 ap... |
package rkgf
import (
"context"
"crypto/tls"
"encoding/json"
"fmt"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/glog"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/rookie-ninja/rk-entry/v2/... |
package main
import (
"bytes"
"expvar"
"flag"
"fmt"
"log"
"net/http"
_ "net/http/pprof"
"os"
"runtime"
"strconv"
"strings"
"time"
"unicode"
"io/ioutil"
"github.com/facebookgo/grace/gracehttp"
"github.com/facebookgo/pidfile"
"github.com/go-graphite/carbonapi/carbonapipb"
"github.com/go-graphite/carb... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: yandex/cloud/mdb/postgresql/v1/resource_preset_service.proto
package postgresql
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
_ "google.golang.org/genproto/googleapis/a... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: span.proto
/*
Package haystack is a generated protocol buffer package.
It is generated from these files:
span.proto
api/traceReader.proto
It has these top-level messages:
Span
Log
Tag
Batch
Trace
TraceRequest
RawTracesRequest
RawTracesResult
Span... |
package gofast
import "fmt"
import "net"
import "time"
import "sort"
import "sync"
import "strings"
import "unsafe"
import "sync/atomic"
import s "github.com/bnclabs/gosettings"
type tagfn func(in, out []byte) int
type fnTagFactory func(*Transport, s.Settings) (uint64, tagfn, tagfn)
var tagFactory = make(map[string... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.