text stringlengths 8.57k 38.1k |
|---|
package app
import (
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"sync"
)
// release type representing Helm releases which are described in the desired state
type release struct {
Name string `yaml:"name"`
Description string `yaml:"descrip... |
// Copyright (c) 2018, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.
package build
import (
"encoding/json"
"fmt"
"io"
"io/i... |
// Copyright 2017 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 config defines common structs to carry configuration and associated
// stateful data.
package config
import (
"context"
"flag"
"fmt"
"n... |
//
//MIT License
//Copyright(c) 2020 Futurewei Cloud
//
//Permission is hereby granted,
//free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction,
//including without limitation the rights to use, copy, modify, merge... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/errors/media_file_error.proto
package errors
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they are... |
// Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
package vhaline
import (
"fmt"
"github.com/glycerine/idem"
tf "github.com/glycerine/tmframe2"
"log"
mr "math/rand"
"os"
"sync"
"time"
)
// Replica is the main node
type Replica struct {
Cfg Cfg
Me NodeInfo
Parent NodeInfo
Child NodeInfo
parentLiveness liveness
childLiveness liveness
// chain... |
// Copyright 2020 The Atlas 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 app... |
package store
import (
"bytes"
"context"
"encoding/hex"
"errors"
"fmt"
"math"
"sort"
"sync"
"time"
logging "github.com/ipfs/go-log"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
libp2pProtocol "github.com/libp2p/go-libp2p-core/... |
// Copyright 2022 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 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: alameda_api/v1alpha1/datahub/schemas/types.proto
package schemas
import (
fmt "fmt"
common "github.com/containers-ai/api/alameda_api/v1alpha1/datahub/common"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors ... |
package impl
import (
//"github.com/vitesse-ftian/dggo/vitessedata/proto/xdrive"
"github.com/tsuna/gohbase"
"github.com/tsuna/gohbase/hrpc"
"github.com/tsuna/gohbase/filter"
"github.com/tsuna/gohbase/region"
"io"
//"os"
"vitessedata/plugin"
"fmt"
"context"
"strings"
"byte... |
package main
import (
"bufio"
"flag"
"fmt"
"log"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
)
// perform tests:
// continuesDatesTest
// windSpeedTest
// precipationTest
// globalRadiationTest
// temperatureTest
// relativeHumidityTest
// consistentUnitTests
const (
continuesDate... |
/*
* Copyright 2019, Offchain 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 ag... |
package main
// Copyright (c) 2020 - <NAME> <vkuznet AT gmail dot com>
// goimapsync main module, it implements the following actions:
// - "sync" mails from local maildir to IMAP
// - "fetch-new" new mails from IMAP to local maildir folder
// - "fetch-all" all mails from IMAP to local maildir folder
// - "move" mail(... |
package tilemesh
import (
"io"
"time"
"github.com/rileydutton/go-detour/detour"
"github.com/rileydutton/go-detour/recast"
"github.com/rileydutton/go-detour/sample"
"github.com/arl/gogeo/f32/d3"
"github.com/arl/math32"
)
// TileMesh allows building multi-tile navigation meshes.
//
// TODO: rename TileMeshBuild... |
// Copyright 2021 Allstar 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... |
/*
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, ... |
// Copyright 2020-2021 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.13.0
// source: envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.proto
package envoy_config_filter_http_grpc_http1_reverse_bridge_v2alpha1
import (
_ "github.com/cncf/udpa/go/udpa/annotation... |
package authorizedprincipals
import (
"bytes"
"fmt"
"log"
"os/exec"
osuser "os/user"
"strconv"
"strings"
"time"
group "github.com/ChandraNarreddy/swoossh/group"
"github.com/ChandraNarreddy/swoossh/sshcert"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/ec2metadata"
"github.com/aws/aws-sdk... |
/*
* // 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
* //
* /... |
package goqrsvg
import (
"bytes"
"os"
"testing"
"github.com/ajstarks/svgo/float"
"github.com/boombuler/barcode/qr"
)
func Test_goqrsvg(t *testing.T) {
buf := bytes.NewBufferString("")
s := svg.New(buf)
// Create the barcode
qrCode, _ := qr.Encode("Hello World", qr.M, qr.Auto)
// Write QR code to SVG
qs ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: message.proto
package xuperp2p
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compi... |
/*
* Copyright 2019 SAP SE or an SAP affiliate company. 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 Licen... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: unit.proto
package pb
/*
compile command: /export/tools/protobuf-3.1.0/bin/protoc --go_out=. unit.proto
*/
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwis... |
// Copyright the Hyperledger Fabric contributors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
package types
import (
"fmt"
"math"
"os"
"reflect"
"strconv"
"testing"
"github.com/go-openapi/spec"
"github.com/stretchr/testify/assert"
)
// ================================
// HELPERS
// =========... |
package lr
import (
"bytes"
"fmt"
"io"
"os"
"sort"
"text/scanner"
"github.com/emirpasic/gods/lists/arraylist"
"github.com/emirpasic/gods/sets/treeset"
"github.com/emirpasic/gods/utils"
"github.com/npillmayer/gorgo/lr/iteratable"
"github.com/npillmayer/gorgo/lr/sparse"
)
// TODO: Improve documentation...
/... |
package planner
import (
"context"
"fmt"
"strings"
"github.com/pingcap/errors"
"github.com/pingcap/parser/ast"
"github.com/pingcap/parser/charset"
"github.com/pingcap/parser/mysql"
"github.com/pingcap/parser/opcode"
"github.com/pingcap/tidb/sessionctx/variable"
"github.com/pingcap/tidb/types"
driver "githu... |
package finder
import (
"flag"
"fmt"
"math"
"strings"
"testing"
"github.com/xrash/smetrics"
)
var (
flagWithJaroReferences = flag.Bool("with-jaro-reference", false, "Include more verbose information around Jaro reference tests")
flagFailOnReferenceMissMatch = flag.Bool("fail-on-reference", false, "Fail... |
package bitstamp
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/thrasher-corp/gocryptotrader/common"
"github.com/thrasher-corp/gocryptotrader/common/crypto"
"github.com/thrasher-corp/gocryptotrader/currency"
exchange "github.com/thra... |
// Copyright 2018 The Cockroach Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... |
package bolt
import (
"bytes"
"fmt"
"unsafe"
)
const (
// MaxKeySize is the maximum length of a key, in bytes.
MaxKeySize = 32768
// MaxValueSize is the maximum length of a value, in bytes.
MaxValueSize = (1 << 31) - 2
)
const (
maxUint = ^uint(0)
minUint = 0
maxInt = int(^uint(0) >> 1)
minInt = -maxIn... |
// Copyright 2017 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 2019 PayPal Inc.
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.... |
package amino
import (
"bytes"
"crypto/sha256"
"fmt"
"io"
"reflect"
"strings"
"sync"
"unicode"
)
//----------------------------------------
// PrefixBytes/DisambBytes/DisfixBytes types
// Lengths
const (
PrefixBytesLen = 4
DisambBytesLen = 3
DisfixBytesLen = PrefixBytesLen + DisambBytesLen
)
// Prefix ty... |
package daemon
// RPCResultFooter contains the set of fields that every RPC result message
// will contain.
//
type RPCResultFooter struct {
// Status dictates whether the request worked or not. "OK" means good.
//
Status string `json:"status"`
// States if the result is obtained using the bootstrap mode, and is
... |
package campaigns
import (
"context"
"io"
"sort"
"strings"
"time"
"github.com/inconshreveable/log15"
"github.com/pkg/errors"
"github.com/sourcegraph/go-diff/diff"
"github.com/sourcegraph/sourcegraph/internal/actor"
"github.com/sourcegraph/sourcegraph/internal/campaigns"
"github.com/sourcegraph/sourcegraph/... |
// Copyright 2012 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
/*
Package search provides a client for App Engine's search service.
Indexes contains documents, and a document's contents are a mapping from case-
sensitive fi... |
// Copyright 2017 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 trace
import (
"container/heap"
"math"
"sort"
"strings"
"time"
)
// MutatorUtil is a change in mutator utilization at a particular
// time. Mutat... |
package hnsclient
import (
"encoding/json"
"fmt"
"net"
"strconv"
"strings"
"github.com/Azure/azure-container-networking/cns"
"github.com/Azure/azure-container-networking/cns/logger"
"github.com/Azure/azure-container-networking/cns/networkcontainers"
"github.com/Azure/azure-container-networking/common"
"gith... |
package scp
import (
"bytes"
"math"
"reflect"
"time"
)
// SlotID is the type of a slot ID.
type SlotID int
// Slot maintains the state of a node's slot while it is undergoing
// nomination and balloting.
type Slot struct {
ID SlotID
V *Node
Ph Phase // PhNom -> PhNomPrep -> PhPrep -> PhCommit... |
package main
import (
"bufio"
"fmt"
"log"
"math"
"os"
"path/filepath"
"runtime"
"sort"
"strconv"
"strings"
"time"
"github.com/gookit/color"
"github.com/urfave/cli/v2"
)
const (
// DateFormat is an ISO8601 date
DateFormat = "2006-01-02"
)
var configDir string
type Day int
type Habit struct {
Name ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0-rc.1
// protoc v3.8.0
// source: fleetspeak/src/client/proto/fleetspeak_client/client.proto
package fleetspeak_client
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/p... |
package validate
import (
"bytes"
"fmt"
"mime/multipart"
"net/http"
"net/url"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func ExampleStruct() {
u := &UserForm{
Name: "inhere",
}
v := Struct(u)
ok := v.Validate()
fmt.Println(ok)
}
var mpSample = M{
"age": 100,
"name": "i... |
package internal
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"math"
"os"
"sort"
"strings"
"text/tabwriter"
"github.com/dmitryikh/leaves"
)
// EvaluateDemo processes a .tagged.json file, producing an Impact Rating report which is written to
// the console and a '.rating.json' file
func EvaluateDemo(tagg... |
// Code generated by protoc-gen-go.
// source: google/api/service.proto
// DO NOT EDIT!
package api
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/golang/protobuf/ptypes/any"
import google_protobuf4 "google/protobuf"
import google_protobuf3 "google/protobuf"
i... |
/* Copyright 2021 The Stroppy Authors. All rights reserved *
* Use of this source code is governed by the 2-Clause BSD License *
* that can be found in the LICENSE file. */
package cluster
import (
"context"
"errors"
"fmt"
"os"
"sync"
"time"
"github.com/ansel1/merry/v2"
"gi... |
// 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 main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
// ----------------------- Opcode Struct Start -----------------------
type Opcode struct {
opcode int
tags []int
}
func get_opcode(value int) Opcode {
var opcode int = value % 100
var tags []int = make([]int, 0)
value = value / 100
for va... |
//
// Copyright 2022 The Sigstore Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ... |
package framework
import (
"context"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"os"
"sync"
"testing"
"time"
"github.com/filecoin-project/boost/api"
boostclient "github.com/filecoin-project/boost/client"
"github.com/filecoin-project/boost/node"
"github.com/filecoin-project/boost/node/config"
"github.com... |
package metricplugin
import (
"context"
"math/rand"
"sync"
"time"
"github.com/ipfs/go-bitswap"
bsmsg "github.com/ipfs/go-bitswap/message"
pbmsg "github.com/ipfs/go-bitswap/message/pb"
bsnet "github.com/ipfs/go-bitswap/network"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-ipfs/core"
"github.com/libp2p/go-li... |
package blocktree
import (
"bytes"
"fmt"
. "github.com/balzaczyy/golucene/core/codec/spi"
. "github.com/balzaczyy/golucene/core/index/model"
"github.com/balzaczyy/golucene/core/store"
"github.com/balzaczyy/golucene/core/util"
"github.com/balzaczyy/golucene/core/util/fst"
)
type segmentTermsEnumFrame struct {
... |
package ua
import (
"bytes"
"fmt"
"strings"
)
// New parses the given User-Agent string and get the resulting UserAgent object.
//
// Returns a UserAgent object that has been initialized after parsing
// the given User-Agent string.
func New(uas string) *UserAgent {
ua := &UserAgent{
ua: uas,
}
ua.Parse(uas)
... |
package common
import (
"github.com/EngoEngine/ecs"
"github.com/EngoEngine/engo"
"github.com/EngoEngine/gl"
"github.com/EngoEngine/math"
)
type legacyShader struct {
program *gl.Program
indicesRectangles []uint16
indicesRectanglesVBO *gl.Buffer
inPosition int
inColor int
matrixProjection *gl.Unifor... |
package misc
import (
"archive/zip"
"bufio"
"bytes"
"compress/gzip"
"crypto/md5"
"encoding/hex"
"encoding/json"
"fmt"
"hash/fnv"
"io"
"io/ioutil"
"net"
"net/http"
"os"
"path/filepath"
"reflect"
"regexp"
"runtime"
"sort"
"strings"
"unicode"
//"runtime/debug"
"time"
"github.com/araddon/datepars... |
/*
A Succinct Trie for Go
By <NAME>
Released to the public domain.
translated From:
A Succinct Trie for Javascript
By <NAME>
Released to the public domain.
This file contains functions for creating a succinctly encoded trie structure
from a list of words. The trie is encoded to a succinct bit string using ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/data/cluster/v3alpha/outlier_detection_event.proto
package envoy_data_cluster_v3alpha
import (
fmt "fmt"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/ti... |
//
// Long-running daemon to control the busylight.
// Automatically polls Google calendar busy/free times
// and can be controlled via signals from a Zoom meeting
// monitoring script:
//
// USR1 - in zoom, muted
// USR2 - in zoom, unmuted
// HUP - out of zoom
// INFO - force refresh from calendar... |
// Package main provides primitive CPU functions i.e
// fetching - decoding - executing a program.
package main
import (
"log"
"math/rand"
"github.com/hajimehoshi/ebiten/v2"
)
// A CPU represents the internal of a cpu for the chip-8.
type CPU struct {
// current opcode in program
opcode uint16
// 4KB of memor... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.19.1
// source: openapiv2/annotations.proto
package openapiv2
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "g... |
package cords
/*
BSD 3-Clause License
Copyright (c) 2020–21, <NAME>
All rights reserved.
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... |
// Copyright 2022 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 bfd
/*
#include <bfd.h>
#include <stdio.h>
#include <stdlib.h>
#include "gobfd.h"
#cgo LDFLAGS: -lbfd
*/
import "C"
import (
"math"
"os"
"sync"
"unsafe"
)
func init() {
C.bfd_init()
}
type (
File C.bfd
Target C.bfd_target
VMA C.bfd_vma
Section C.asection
PluginFormat C... |
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may not
// use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" fil... |
// Copyright 2015 The Cockroach Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... |
// Copyright 2018 The CUE 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 2018-2019 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 cliutils
import (
"fmt"
"os"
"path/filepath"
"strings"
commandUtils "github.com/jfrog/jfrog-cli-core/v2/artifactory/commands/utils"
artifactoryUtils "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils"
speccore "github.com/jfrog/jfrog-cli-core/v2/common/spec"
coreCommonCommands "github.com/jfrog/j... |
// Copyright 2020 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... |
package team7agent1
import (
"math"
"math/rand"
"github.com/SOMAS2021/SOMAS2021/pkg/infra"
"github.com/SOMAS2021/SOMAS2021/pkg/messages"
"github.com/SOMAS2021/SOMAS2021/pkg/utils/globalTypes/food"
"github.com/SOMAS2021/SOMAS2021/pkg/utils/globalTypes/health"
)
/*
Openness high-> doesn't get effected by new fl... |
package main
import (
"crypto/md5"
"encoding/csv"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/url"
"os"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/kellydunn/golang-geo"
)
// Helper function to make it easier for printing and exiting
func errorf(tex... |
package tomox
import (
"errors"
"fmt"
"github.com/tomochain/tomochain/consensus"
"github.com/tomochain/tomochain/core/types"
"github.com/tomochain/tomochain/p2p"
"github.com/tomochain/tomochain/tomox/tomox_state"
"gopkg.in/karalabe/cookiejar.v2/collections/prque"
"math/big"
"strconv"
"time"
lru "github.com... |
/*
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 is ... |
/*
Copyright © 2021 <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 writing, software
distri... |
package eks
import (
"bytes"
"context"
"crypto/sha1"
"crypto/tls"
"encoding/base64"
"errors"
"fmt"
"net/http"
"net/url"
"os"
"strings"
"text/template"
"time"
"github.com/aws/aws-k8s-tester/eksconfig"
awscfn "github.com/aws/aws-k8s-tester/pkg/aws/cloudformation"
"github.com/aws/aws-k8s-tester/version"
... |
// Copyright 2019-2020 Liquidata, 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 agre... |
package swf
import (
"errors"
"fmt"
"log"
"reflect"
)
// constants used as marker names or signal names
const (
StateMarker = "FSM.State"
ErrorSignal = "FSM.Error"
SystemErrorSignal = "FSM.SystemError"
ContinueTimer = "FSM.ContinueWorkflow"
ContinueSignal = "FSM.ContinueWorkflow"
Complete... |
package main
import (
"fmt"
"testing"
"time"
)
///////////////////////////////////////// BENCHMARKS /////////////////////////////////////////
func Benchmark_root(b *testing.B) {
/* initFen2Sq()
initMagic()
initAtksKings()
initAtksKnights()
*/
limits.init()
limits.setDepth(8)
handleNewgame()
handlePosit... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.8
// source: tests/double/simple.proto
package double
import (
proto "github.com/golang/protobuf/proto"
_ "github.com/joshcarp/protoc-gen-stringer/stringer"
protoreflect "google.golang.org/protobuf/refle... |
// Copyright 2017 The LUCI Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// 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: go.chromium.org/lu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: egress.proto
/*
Package logcache_v1 is a generated protocol buffer package.
It is generated from these files:
egress.proto
group_reader.proto
ingress.proto
orchestration.proto
It has these top-level messages:
ReadRequest
ReadResponse
MetaRequest
Met... |
//line parser.y:1
package gofilter
import __yyfmt__ "fmt"
//line parser.y:4
import (
"fmt"
"net"
"regexp"
"strconv"
"strings"
)
func setResult(filterlex filterLexer, n node) {
f := filterlex.(*filterLexerImpl)
f.result = n
}
func makeParseNumErrStr(err error) string {
e := err.(*strconv.NumError)
return e... |
// SPDX-License-Identifier: MIT
package tree
import (
"net/http"
"net/http/httptest"
"net/url"
"strings"
"testing"
"github.com/issue9/assert/v2"
"github.com/issue9/assert/v2/rest"
"github.com/issue9/errwrap"
"github.com/issue9/mux/v5/internal/syntax"
)
type tester struct {
tree *Tree
a *assert.Assert... |
// Copyright 2019 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
// Copyright 2017 The Bazel 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 syntax
// A lexical scanner for Skylark.
import (
"fmt"
"io"
"io/ioutil"
"log"
"math/big"
"strconv"
"strings"
"unicode"
"unicode/utf8"
)
... |
// Copyright (C) The Arvados Authors. All rights reserved.
//
// SPDX-License-Identifier: AGPL-3.0
package keepstore
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"regexp"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"git.arvados.org/arvados.git/sdk/go/... |
package main
import (
"database/sql"
"errors"
"flag"
"fmt"
"net"
"strings"
"time"
lineprotocol "github.com/influxdata/line-protocol"
"github.com/lib/pq"
pqoid "github.com/lib/pq/oid"
"github.com/robfig/cron/v3"
)
const (
pgStatActivitySql = "SELECT datid, datname, pid, leader_pid, usesysid, usename, appl... |
/*
* Copyright 2019 EPAM 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, ... |
// Do not edit. Bootstrap copy of /Volumes/Android/buildbot/src/android/build-tools/out/obj/go/src/cmd/compile/internal/ppc64/prog.go
//line /Volumes/Android/buildbot/src/android/build-tools/out/obj/go/src/cmd/compile/internal/ppc64/prog.go:1
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this sourc... |
package message
import (
"context"
"database/sql"
"fmt"
"github.com/target/goalert/engine/processinglock"
"github.com/target/goalert/lock"
"github.com/target/goalert/notification"
"github.com/target/goalert/notificationchannel"
"github.com/target/goalert/permission"
"github.com/target/goalert/retry"
"github.... |
package avro
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestBasic(t *testing.T) {
assert.Equal(t, "ভ্ল", MustParse("bhl"))
assert.Equal(t, "ব্জ", MustParse("bj"))
assert.Equal(t, "ব্দ", MustParse("bd"))
assert.Equal(t, "ব্ব", MustParse("bb"))
assert.Equal(t, "ব্ল", MustParse("bl"))
assert... |
package renter
import (
"fmt"
"math"
"os"
"path/filepath"
"strings"
"sync"
"time"
"gitlab.com/NebulousLabs/errors"
"gitlab.com/NebulousLabs/Sia/build"
"gitlab.com/NebulousLabs/Sia/modules"
"gitlab.com/NebulousLabs/Sia/modules/renter/filesystem/siadir"
"gitlab.com/NebulousLabs/Sia/modules/renter/filesyste... |
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"math/rand"
"sort"
"strings"
"time"
"github.com/dustinkirkland/golang-petname"
"github.com/fatih/color"
"golang.org/x/crypto/ssh"
)
type Hub struct {
Sessions map[*Session]struct{}
Redraw chan struct{}
Register chan *Session
Unregister chan *Ses... |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package sqlite provides access to the SQLite library, version 3.
package gosqlite
/*
#cgo linux freebsd pkg-config: sqlite3
#cgo !linux,!freebsd LDFLAGS: -l... |
/*
Licensed Materials - Property of IBM
cfc
@ Copyright IBM Corp. 2018 All Rights Reserved
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
*/
// Copyright (c) 2021 Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management projec... |
package web
// das2go - DAS web server handlers
//
// Copyright (c) 2015-2017 - <NAME> <<EMAIL>>
import (
"encoding/json"
"fmt"
"html/template"
"log"
"net/http"
"os"
"runtime"
"strconv"
"strings"
"sync/atomic"
"time"
"github.com/dmwm/das2go/config"
"github.com/dmwm/das2go/das"
"github.com/dmwm/das2go/d... |
// 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 writi... |
package learn
import (
"bytes"
"compress/flate"
"compress/gzip"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"mime"
"mime/multipart"
"net/http"
"net/url"
"sort"
"strings"
"github.com/andybalholm/brotli"
"github.com/google/uuid"
"github.com/pkg/errors"
"golang.org/x/text/encoding/ianaindex"
"golang.org/x/t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.