text stringlengths 5.51k 28.1k |
|---|
package tuner
// tuner.go is a texel tuning implementation for Blunder.
import (
"blunder/engine"
"bufio"
"fmt"
"math"
"os"
"strings"
)
const (
NumCores = 8
NumWeights = 815
KPrecision = 10
Report = 10
Draw float64 = 0.5
WhiteWin float64 = 1.0
BlackWin float64 = 0.0
)
// A struct object to h... |
package message
import (
"context"
"fmt"
"runtime/debug"
"sync"
"time"
"github.com/pkg/errors"
"github.com/ThreeDotsLabs/watermill"
"github.com/ThreeDotsLabs/watermill/internal"
sync_internal "github.com/ThreeDotsLabs/watermill/pubsub/sync"
)
var (
// ErrOutputInNoPublisherHandler happens when a handler f... |
package object // import "github.com/SevereCloud/vksdk/5.92/object"
import (
"fmt"
)
// GroupsAddress struct
type GroupsAddress struct {
AdditionalAddress string `json:"additional_address"` // Additional address to the place (6 floor, left door)
Address string `json:"addre... |
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package evm
import (
"crypto/rand"
"encoding/json"
"errors"
"fmt"
"math/big"
"sync"
"sync/atomic"
"time"
"github.com/ava-labs/coreth"
"github.com/ava-labs/coreth/core"
"github.com/ava-labs/coreth/eth"
"gith... |
package gb
import (
"log"
"github.com/Humpheh/goboy/pkg/bits"
"github.com/Humpheh/goboy/pkg/cart"
)
const (
// DIV is the divider register which is incremented periodically by
// the Gameboy.
DIV = 0xFF04
// TIMA is the timer counter register which is incremented by a clock
// frequency specified in the TAC ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/extensions/filters/http/cache/v3alpha/cache.proto
package envoy_extensions_filters_http_cache_v3alpha
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
v31 "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
v3 "github.com/... |
// Copyright © 2016 <NAME> (<EMAIL>)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: api/devices/integrations.proto
package devices
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "googl... |
// Copyright 2015 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.
package libkb
import (
"fmt"
"regexp"
"strings"
keybase1 "github.com/keybase/client/go/protocol"
)
type AssertionExpression interface {
String() string
MatchSet(ps ProofSet) bool
HasOr() b... |
// Copyright 2021 Antrea 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 2021 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 2014-2015 <NAME> <<EMAIL>>.
// Licensed under the MIT license.
package dhttp
import (
"fmt"
"bytes"
"strings"
"time"
"io"
"io/ioutil"
"sync"
"net"
"net/http"
"net/http/cookiejar"
"net/url"
"compress/gzip"
"mime/multipart"
)
const (
VERSION = "2.0"
PROXY_HTTP = iota
PROXY_SOCKS4
P... |
package openvpn
import (
"bufio"
"bytes"
"encoding/gob"
"math/rand"
"net"
"net/textproto"
"os"
"regexp"
"strconv"
"strings"
"time"
"github.com/lighthouse8/go-openvpn/log"
)
func (m *Management) Start() (path string, err error) { // {{{
s1 := rand.NewSource(time.Now().UnixNano())
r1 := rand.New(s1)
m.P... |
package bhr
import (
"bufio"
"encoding/json"
"fmt"
"image"
_ "image/jpeg"
_ "image/png"
"io/ioutil"
"log"
"os"
"strconv"
"strings"
"time"
"github.com/mattn/go-sixel"
)
func generateFieldsList() string {
// https://www.bamboohr.com/api/documentation/employees.php
// Generated with cat list | paste - - ... |
//
// SPDX-License-Identifier: BSD-3-Clause
//
package redfish
import (
"encoding/json"
"reflect"
"github.com/stmcginnis/gofish/common"
)
// AuthenticationMethod is the method used for authentication.
type AuthenticationMethod string
const (
// NoneAuthenticationMethod No iSCSI authentication is used.
NoneAut... |
// Copyright 2021 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 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
// Copyright 2017 The LUCI Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
package storageoscluster
import (
"context"
"encoding/json"
"errors"
"fmt"
"os"
"strings"
"sync"
"time"
"github.com/go-logr/logr"
"github.com/ondat/operator-toolkit/declarative"
"github.com/ondat/operator-toolkit/declarative/kubectl"
"github.com/ondat/operator-toolkit/declarative/kustomize"
eventv1 "gith... |
// Code generated by go-swagger; DO NOT EDIT.
package operations
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"net/http"
"strings"
errors "github.com/go-openapi/errors"
loads "github.com/go-openapi/loads"
ru... |
package main
import (
"errors"
"fmt"
Firebase "github.com/melvinmt/firebase"
"strconv"
"strings"
"time"
)
const (
AUTH_FIREBASE_TOKEN = "<KEY>"
URL_PATIENTS = "https://detech-1e226.firebaseio.com/Patients/"
URL_DNIS_OF_PATIENTS = "https://detech-1e226.firebaseio.com/DnisOfPatients/"
URL_EVALUATION_... |
// 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... |
// Copyright 2017 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... |
/*
This package has the algorithm for making sure the Helm releases in
the cluster match what are defined in the FluxHelmRelease resources.
There are several ways they can be mismatched. Here's how they are
reconciled:
1a. There is a FluxHelmRelease resource, but no corresponding
release. This can happen when th... |
/*
Copyright 2020 The Kubernetes Authors.
Copyright 2021 The logr 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 applica... |
package api
import (
"time"
)
// Query - Master query which encapsulates all possible returned structures
type Query struct {
Errors Errors
Apps struct {
Nodes []App
}
App App
AppCompact AppCompact
AppStatus AppStatus
AppCertsCompact AppCertsCompact
CurrentUser ... |
package ip
import (
"errors"
"fmt"
"strconv"
"strings"
"unsafe"
"github.com/Asphaltt/go-iproute2"
"github.com/Asphaltt/go-iproute2/internal/etc"
"github.com/mdlayher/netlink"
"golang.org/x/sys/unix"
)
// LinkRxErrors is the rx error statistics of the link.
type LinkRxErrors struct {
Length uint... |
// Copyright 2018 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
// Package commands provides the set of CLI commands used to communicate with the AIS cluster.
// This file contains common constants and variables used in other files.
/*
* Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
*/
package commands
import (
"fmt"
"time"
"github.com/NVIDIA/aistore/cmn"... |
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package wifi
import (
"context"
"fmt"
"math/rand"
"sort"
"strconv"
"strings"
"time"
"github.com/google/gopacket/layers"
"chromiumos/tast/co... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
package scanner
import (
"database/sql"
"fmt"
"log"
"reflect"
"strings"
"sync"
)
/**
tag 用法
column 设置行
`db:"column:'id'"`
pk 设为主键 (primary_key)
index 普通索引
unique_index 唯一索引
auto 自增 (AUTO_INCREMENT)
size 字段长度
- 忽略字段
type 字段类型
type:varchar(100)
其他
not null;unique
**/
const tagKey = "db"
const tagSplit = ","
co... |
/*
Copyright 2019 The Kubernetes Authors.
Copyright 2020 Authors of Arktos - file modified.
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... |
package rbac
import (
"fmt"
"strings"
"github.com/casbin/casbin"
"github.com/casbin/casbin/model"
"github.com/casbin/casbin/persist"
casbin_rbac "github.com/casbin/casbin/rbac"
)
const (
// AllowAccess should be used as effect for policies that allow access.
AllowAccess = "allow"
// SkipResourceId should b... |
package thorchain
import (
"fmt"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/cosmos/cosmos-sdk/x/bank"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/cosmos/cosmos-sdk/x/supply"
abci ... |
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// Package gateway handles the Discord gateway (or Websocket) connection, its
// events, and everything related to it. This includes logging into the
// Websocket.
//
// This package does not abstract events and function handlers; instead, it
// leaves that to the session package. This package exposes only a single Eve... |
package script
//go:generate tools gen enum OpCode
// swagger:enum
type OpCode byte
const (
OP_CODE__0 OpCode = 0x00 // 0
OP_CODE__FALSE OpCode = 0x00 // 0 - AKA OP_0
OP_CODE__DATA_1 OpCode = 0x01 // 1
OP_CODE__DATA_2 OpCode = 0x02 // 2
OP_CODE__DATA_3 ... |
package provisiond
import (
"context"
"crypto/ed25519"
"fmt"
"os"
"path/filepath"
"sort"
"time"
"github.com/cenkalti/backoff/v3"
"github.com/gorilla/mux"
"github.com/pkg/errors"
"github.com/rusart/muxprom"
"github.com/threefoldtech/substrate-client"
"github.com/threefoldtech/zos/pkg"
"github.com/threefo... |
package quic
import (
"bufio"
"bytes"
"context"
"crypto/rand"
"crypto/tls"
"encoding/binary"
"errors"
"fmt"
"io"
"log"
"math"
"net"
"net/http"
"os"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/iafoosball/quic-go/internal/handshake"
"github.com/iafoosball/quic-go/internal/protocol"
... |
package proto // import "github.com/motki/core/proto"
import (
"time"
"github.com/golang/protobuf/ptypes/timestamp"
"github.com/motki/core/evedb"
"github.com/motki/core/model"
"github.com/shopspring/decimal"
)
func ProtoToCharacter(char *Character) *model.Character {
return &model.Character{
CharacterID: i... |
package gui
import (
"fmt"
"log"
"strconv"
"strings"
"github.com/skratchdot/open-golang/open"
"github.com/tkuhlman/gopwsafe/config"
"github.com/tkuhlman/gopwsafe/pwsafe"
"github.com/gotk3/gotk3/gdk"
"github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/gtk"
)
// GUI docs
// http://godoc.org/github.com/got... |
package http
import (
"bytes"
"errors"
"net/http"
"strconv"
"strings"
"time"
"unicode"
"github.com/cxfksword/httpcap/utils"
"github.com/rs/zerolog/log"
)
const MAX_RECV_SIZE = 10 * 1024
type parseState int
const (
stateStart parseState = iota
stateHeaders
stateBody
stateBodyChunkedStart
stateBodyChun... |
package main
import (
"fmt"
"log"
"net/http"
"strings"
"github.com/kennygrant/sanitize"
"github.com/kiteco/kiteco/kite-go/lang/python"
"github.com/kiteco/kiteco/kite-go/lang/python/pythoncode"
"github.com/kiteco/kiteco/kite-go/lang/python/pythondocs"
"github.com/kiteco/kiteco/kite-go/lang/python/pythonimport... |
package base
import (
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"math"
"math/rand"
"net/http"
"time"
"fortio.org/fortio/fhttp"
fortioLog "fortio.org/fortio/log"
"fortio.org/fortio/periodic"
"fortio.org/fortio/stats"
"github.com/go-playground/validator/v10"
log "github.com/iter8-tools/iter8/base/l... |
////////////////////////////////////////////////////////////////////////////////
// //
// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or //
// its subsidiaries. ... |
// Code generated by sqlc. DO NOT EDIT.
package db
import (
"context"
"database/sql"
"fmt"
)
type DBTX interface {
ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
PrepareContext(context.Context, string) (*sql.Stmt, error)
QueryContext(context.Context, string, ...interface{}) (*sql.Rows... |
/*
* Copyright © 2017. TIBCO Software Inc.
* This file is subject to the license terms contained
* in the license file that is distributed with this file.
*/
package triggerMaintenance
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"strings"
"github.com/TIBCOSoftware/flogo-l... |
package luar
import "testing"
import "strconv"
import "os"
import "reflect"
import "runtime"
// I _still_ like asserts ;)
func assertEq(t *testing.T, msg string, v1, v2 interface{}) {
if v1 != v2 {
t.Error("were not equal: " + msg)
}
}
func fun2(x float32, a string) (float32, string) {
return x, a
}
func sum(a... |
package main
import (
"bufio"
"flag"
"fmt"
"log"
"os"
"path/filepath"
"reflect"
"regexp"
"sort"
"strings"
"github.com/stts-se/rbg2p"
"github.com/sergi/go-diff/diffmatchpatch"
)
var l = log.New(os.Stderr, "", 0)
func print(input string, orth string, transes []string) {
fmt.Printf("%s\t%s\n", input, str... |
package goment
import (
"fmt"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestISOParsing(t *testing.T) {
parseable := []testParseable{
testParseable{"2010-01-01", time.Date(2010, 1, 1, 0, 0, 0, 0, time.UTC)},
testParseable{"20090406", time.Date(2009, 4, 6, 0, 0, 0, 0, time.UTC)},
testPars... |
package gbc
import (
"bufio"
"fmt"
"log"
"os"
"strings"
"github.com/djhworld/gomeboycolor/apu"
"github.com/djhworld/gomeboycolor/cartridge"
"github.com/djhworld/gomeboycolor/config"
"github.com/djhworld/gomeboycolor/cpu"
"github.com/djhworld/gomeboycolor/dma"
"github.com/djhworld/gomeboycolor/gpu"
"github... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
// Package player provides the implementation of music_player
package player
import "github.com/krig/go-sox"
import (
"bufio"
"errors"
"fmt"
"os"
"strconv"
"strings"
"sync"
"time"
)
// supported playlist type
const playlistsExtension = ".m3u"
// supportedExtensions are the file types music_player works with
... |
package absolute
import (
"fmt"
"regexp"
"strconv"
"strings"
"time"
"github.com/markusmobius/go-dateparser/date"
"github.com/markusmobius/go-dateparser/internal/dateutil"
"github.com/markusmobius/go-dateparser/internal/parser/common"
"github.com/markusmobius/go-dateparser/internal/parser/tokenizer"
"github.... |
package seth
import (
"encoding/binary"
"encoding/json"
"fmt"
"math/big"
"strings"
)
// EtherType represents a type in the
// Ethereum Contract ABI type system
// https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI
type EtherType interface {
// EncodeABI encodes this type using the
// canonical contrac... |
package minq
import (
"fmt"
"time"
)
type frameType uint8
const (
kFrameTypePadding = frameType(0x0)
kFrameTypeRstStream = frameType(0x1)
kFrameTypeConnectionClose = frameType(0x2)
kFrameTypeGoaway = frameType(0x3)
kFrameTypeMaxData = frameType(0x4)
kFrameTypeMaxStreamData = ... |
package ldclient
import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"log"
"os"
"reflect"
"strings"
"time"
)
// Version is the client version
const Version = "4.2.2"
// LDClient is the LaunchDarkly client. Client instances are thread-safe.
// Applications should instantiat... |
package domain
import (
"net/http"
"net/url"
"strconv"
"strings"
"time"
"regexp"
)
const (
BLANK = 0
EQ = 1
LT = 2
GT = 3
GE = 4
LE = 5
CONTAINS = 6
)
var comparisonString = map[int]string{
BLANK: "",
EQ: " eq ",
LT: " lt ",
GT: " gt ",
GE: ... |
package smaz
import (
"fmt"
)
const codelen = 241
var codebook = [codelen]string{
"\002s,\266", "\003had\232\002leW", "\003on \216", "", "\001yS",
"\002ma\255\002li\227", "\003or \260", "", "\002ll\230\003s t\277",
"\004fromg\002mel", "", "\003its\332", "\001z\333", "\003ingF", "\001>\336",
"\001 \000\003 (\0... |
// Copyright <NAME> 2020
// Tests for package sentropy.
package sentropy
import (
"image"
_ "image/png"
"path/filepath"
"reflect"
"testing"
)
import (
. "github.com/Causticity/sipp/scomplex"
. "github.com/Causticity/sipp/shist"
. "github.com/Causticity/sipp/simage"
. "github.com/Causticity/sipp/sipptesting... |
package langdetect
var (
Aa = Language{[2]byte{'a', 'a'}, 0, 0}
Ab = Language{[2]byte{'a', 'b'}, 1, 0}
Ae = Language{[2]byte{'a', 'e'}, 2, 0}
Af = Language{[2]byte{'a', 'f'}, 3, 0}
Ak = Language{[2]byte{'a', 'k'}, 4, 0}
Am = Language{[2]byte{'a', 'm'}, 5, 0}
An = Language{[2]byte{'a', 'n'}, 6, 0}
Ar = Language... |
// Package memcached provides a memcached binary protocol client.
package memcached
import (
"encoding/binary"
"fmt"
"io"
"math"
"net"
"strings"
"time"
"github.com/couchbase/eventing/dcp/transport"
"github.com/couchbase/eventing/logging"
)
const bufsize = 1024
// The Client itself.
type Client struct {
co... |
package ecs
import (
"context"
"fmt"
"net/http"
"strings"
"text/template"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/defaults"
"github.com/aws/aws-sdk-go/aws/ec2metadata"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-... |
package ddevapp
import (
"bufio"
"embed"
"fmt"
"github.com/drud/ddev/pkg/archive"
"github.com/drud/ddev/pkg/dockerutil"
"github.com/drud/ddev/pkg/exec"
"github.com/drud/ddev/pkg/fileutil"
"github.com/drud/ddev/pkg/globalconfig"
"github.com/drud/ddev/pkg/output"
"github.com/drud/ddev/pkg/util"
"github.com/dr... |
// 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 gc
import (
"cmd/compile/internal/types"
"cmd/internal/bio"
"cmd/internal/obj"
"cmd/internal/objabi"
"cmd/internal/src"
"crypto/sha256"
"encodin... |
package interp
import (
"bufio"
"context"
"fmt"
"go/build"
"go/scanner"
"go/token"
"io"
"os"
"os/signal"
"reflect"
"runtime"
"runtime/debug"
"strconv"
"sync"
"sync/atomic"
)
// Interpreter node structure for AST and CFG
type node struct {
child []*node // child subtrees (AST)
anc *node ... |
// Copyright 2022 Northern.tech AS
//
// 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 2019 The Vitess Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
// Copyright 2019 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, ... |
// Copyright 2020 The LUCI Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
package main
import "fmt"
import "sync"
import "math"
import (
// "os"
//"bufio"
"encoding/json"
//"time"
"io/ioutil"
)
//import "time"
const MINHEAT = 10
const MEDIUMHEAT = 20
const MAXHEAT = 30
type tile struct {
xCoord int
yCoord int
heat int //how hot a tile is before fire
fireLevel int //stren... |
/*
* Copyright © 2015-2018 <NAME> <<EMAIL>>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... |
package miner
import (
"bytes"
"context"
"fmt"
"sync"
"time"
address "github.com/filecoin-project/go-address"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/actors/builtin/power"
"github.com/file... |
// Copyright 2016 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 (c) 2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
package main
import (
"context"
"fmt"
"net/http"
"net/http/httputil"
"net/url"
"strconv"
"sync"
"time"
"github.com/Vertamedia/chproxy/cache"
"github.com/Vertamedia/chproxy/config"
"github.com/Vertamedia/chproxy/log"
"github.com/prometheus/client_golang/prometheus"
)
type reverseProxy struct {
rp *httput... |
/*
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, software
distr... |
package raft
//
// this is an outline of the API that raft must expose to
// the service (or tester). see comments below for
// each of these functions for more details.
//
// rf = Make(...)
// create a new Raft server.
// rf.Start(command interface{}) (index, term, isleader)
// start agreement on a new log entry
... |
/*
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, ... |
// Copyright 2017 <NAME>. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
package main
import (
"bufio"
"bytes"
"compress/gzip"
"encoding/json"
"flag"
"fmt"
"io"
"log"
"math/rand"
"net/http"
"os"
"path"
"regexp"
"strconv"
"strings"
... |
// Copyright 2017 Monax Industries Limited
//
// 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 a... |
package main
import (
"bufio"
"fmt"
"io"
"log"
"os"
)
type Instruction struct {
OpCode int
ParameterMode1 int
ParameterMode2 int
ParameterMode3 int
ParameterMode4 int
// InstPtrIncrement int
}
func main() {
f, err := os.Open("input.txt")
if err != nil {
log.Fatal(err)
}
defer f.Close()
//P... |
package task_test
import (
"bytes"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/cloudfoundry/bosh-cli/ui"
fakeui "github.com/cloudfoundry/bosh-cli/ui/fakes"
boshuit "github.com/cloudfoundry/bosh-cli/ui/task"
)
var _ = Describe("Report... |
package mutation
import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"strconv"
"strings"
dynatracev1beta1 "github.com/Dynatrace/dynatrace-operator/api/v1beta1"
dtcsi "github.com/Dynatrace/dynatrace-operator/controllers/csi"
"github.com/Dynatrace/dynatrace-operator/controllers/kubeobjects"
"... |
// 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_test
import (
"bufio"
"bytes"
"fmt"
"go/build"
"io/ioutil"
"path/filepath"
"reflect"
"strings"
"testing"
"go.starlark.net/internal... |
package netshare
import (
"context"
"fmt"
"os"
"path/filepath"
"strconv"
"syscall"
"github.com/ContainX/docker-volume-netshare/netshare/drivers"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/client"
"github.com/docker/go-plugins-helpers/volume"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/enums/criterion_type.proto
package enums // import "google.golang.org/genproto/googleapis/ads/googleads/v1/enums"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto... |
// Copyright (c) 2020 tickstep.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package merkletrie_test
import (
"fmt"
"io"
"strings"
"github.com/go-git/go-git/v5/utils/merkletrie"
"github.com/go-git/go-git/v5/utils/merkletrie/internal/fsnoder"
"github.com/go-git/go-git/v5/utils/merkletrie/noder"
. "gopkg.in/check.v1"
)
type IterSuite struct{}
var _ = Suite(&IterSuite{})
// A test is ... |
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
package resource
import (
"fmt"
"github.com/Jeffail/gabs"
"sort"
"strings"
"github.com/fluxcd/flux/pkg/image"
"github.com/fluxcd/flux/pkg/resource"
)
const (
// ReleaseContainerName is the name used when Flux interprets a
// HelmRelease as having a container with an image, by virtue of
// having a `values` ... |
package main
import (
"bytes"
"golang.org/x/crypto/sha3"
"encoding/json"
"encoding/gob"
"errors"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"github.com/boltdb/bolt"
)
//////////////////////////////////////////////////////////////////////
// BatchWriteItem Structs
//////////////////////////////////////////////... |
// Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.14.0
// source: com/daml/ledger/api/v1/version_service.proto
package v1... |
// Package downloader implements functionality to download resources into AIS cluster from external source.
/*
* Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
*/
package downloader
import (
"errors"
"fmt"
"path"
"strings"
"time"
"github.com/NVIDIA/aistore/3rdparty/atomic"
"github.com/NVID... |
// Copyright 2018 GRAIL, 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 git implements support for querying and patching
// git repositories. Operations in this package are intended
// to be used in command line tooling an... |
package wollemi
import (
"bytes"
"fmt"
"os"
"path/filepath"
"runtime"
"sort"
"strings"
"github.com/tcncloud/wollemi/ports/filesystem"
"github.com/tcncloud/wollemi/ports/please"
)
const (
BUILD_FILE = "BUILD.plz"
)
func (this *Service) Format(paths []string) error {
return this.GoFormat(false, paths)
}
f... |
package main
import (
"github.com/axw/gocov"
"github.com/nsf/gothic"
"os/exec"
"bytes"
"io/ioutil"
"encoding/json"
"unicode/utf8"
"fmt"
"runtime"
"path/filepath"
"sort"
"os"
)
type go_part struct {
*gothic.Interpreter
funcs []*function
prevsel string
xsourceview string
ysourceview string
gocov_path ... |
//go:build gofuzzbeta
// +build gofuzzbeta
package avl
import (
"math/big"
"testing"
"github.com/stretchr/testify/assert"
)
func assertAvl(t *testing.T, n *Node, h int, expectedKeysInOrder []uint64) {
assert.True(t, n.IsBST(), "BST property failed for tree: %v", n.WalkKeysInOrder())
assert.True(t, n.IsBalanced... |
// 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.