text stringlengths 5.51k 28.1k |
|---|
/*
Copyright 2022 The Koordinator 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 (c) 2019 Couchbase, 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 w... |
// Code generated by gen.go. DO NOT EDIT.
package oid
const (
T_bool Oid = 16
T_bytea Oid = 17
T_char Oid = 18
T_name Oid = 19
T_int8 Oid = 20
T_int2 Oid = 21
T_int2vector Oid = 22
T_int4 Oid = 23
T_regproc ... |
package programs
import (
"bufio"
"encoding/json"
"fmt"
"io"
"net/http"
"strings"
"sync"
"time"
"github.com/Arvinderpal/matra/common"
"github.com/Arvinderpal/matra/common/programapi"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/tcpassembly"
"github.com/goo... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: atomix/runtime/primitive/v1/descriptor.proto
package v1
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
math "math"
)
// Reference imports to suppress errors if they are not ot... |
package main
import (
"database/sql"
"fmt"
"io"
"log"
"net/http"
"os"
"path/filepath"
"runtime"
"strings"
"time"
"github.com/kjk/lzmadec"
"github.com/kjk/u"
)
const (
demoDBUser = "demodb"
)
var (
dataDir string
tableNames = []string{
"users", "posts", "badges", "tags", "comments",
"posthistory"... |
package engine
import (
"bytes"
"database/sql"
"fmt"
"github.com/chrisruffalo/gudgeon/events"
"net"
"path"
"reflect"
"strings"
"time"
"github.com/miekg/dns"
log "github.com/sirupsen/logrus"
"github.com/chrisruffalo/gudgeon/config"
"github.com/chrisruffalo/gudgeon/resolver"
"github.com/chrisruffalo/gudg... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: streaming_imagery.proto
package keyhole
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.Inf
//... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cs3/app/provider/v1beta1/provider_api.proto
package providerv1beta1
import (
context "context"
fmt "fmt"
v1beta12 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
v1beta11 "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
v1beta1 "github.com/cs3... |
package cmd
import (
"crypto/rsa"
"crypto/x509"
"encoding/asn1"
"encoding/json"
"encoding/pem"
"fmt"
"github.com/spf13/cobra"
"io/ioutil"
"log"
"os"
"strings"
"time"
"github.com/dustin/go-humanize"
"pault.ag/go/piv"
"pault.ag/go/technicolor"
)
// rootCmd represents the base command when called without... |
package main
import (
"archive/tar"
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"path"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
go_scp "github.com/bramvdbogaerde/go-scp"
"github.com/go-yaml/yaml"
"golang.org/x/crypto/ssh"
)
func main() {
fmt.Println("Whiskey Deploy")
// I... |
/*
Copyright 2021 The RamenDR 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, softwa... |
package main
import (
"fmt"
"reflect"
"testing"
)
func Test_ExtractSingleLinePassport(t *testing.T) {
tests := []struct {
input []string
want []string
}{
{[]string{
"abc", "def", "", "ghi", "", "jkl",
}, []string{
"abc def", "ghi", "jkl",
}},
{[]string{
"ecl:gry pid:860033327 eyr:2020 hcl... |
package main
import (
"bufio"
"context"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"os/signal"
"path/filepath"
"regexp"
"runtime"
"strings"
"time"
"github.com/fatih/color"
"github.com/ghodss/yaml"
"github.com/mattn/go-isatty"
"github.com/pkg/errors"
"github.com/sourcegraph/src-cl... |
/*
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 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// 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 (
"math"
"github.com/google/syzkaller/pkg/hash"
"github.com/google/syzkaller/pkg/log"
"github.com/google/syzkaller/pkg/mab"
)
fu... |
/*
* Copyright © 2021 <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 or agreed to... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.1
// source: user.proto
package protos
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.o... |
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
/**
* Filename: /Users/bao/code/allhic/distribution.go
* Path: /Users/bao/code/allhic
* Created Date: Wednesday, March 7th 2018, 1:56:45 pm
* Author: bao
*
* Copyright (c) 2018 <NAME>
*/
package allhic
import (
"bufio"
"bytes"
"fmt"
"io"
"math"
"os"
"regexp"
"sort"
"strings"
"github.com/biogo/hts/ba... |
package wap
import (
"errors"
"math"
)
var (
ErrColumnPointer = errors.New("columns cannot be pointer type")
)
type Kind byte
const (
KindUnknown = Kind(0) // Possibly resolved later
KindBool = Kind(1)
KindByte = Kind(2)
KindInt8 = Kind(3)
KindInt16 = Kind(4)
KindUI... |
package network
import (
"fmt"
"net"
"os"
"path"
"path/filepath"
"qsrdocker/container"
"runtime"
"strings"
"time"
log "github.com/sirupsen/logrus"
"github.com/vishvananda/netlink"
"github.com/vishvananda/netns"
)
var (
// NetworkDriverMap 网络驱动
NetworkDriverMap = map[string]networkDriver{
"none": ... |
// Package grbt contains code for a ray tracer in beam.
package gbrt
import (
"fmt"
"math"
"math/rand"
"os"
"path"
"strings"
"sync"
)
// Float is a convenience type incase I decide to
// change the precision later.
type Float float64
// Min returns the minimum of two Floats.
func Min(l, r Float) Float {
if l... |
/*
Copyright 2017 The Elasticshift Authors.
*/
package types
import (
"encoding/base64"
"time"
"gopkg.in/mgo.v2/bson"
)
// Client ..
type Client struct {
ID string `bson:"_id,omitempty"`
Secret string `bson:"secret"`
Name string `bson:"name"`
RedirectURIs []string `bson:"redirect... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: metrics/metrics.proto
package metrics
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// Reference ... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: update_file.proto
package workspace
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
_ "github.com/mwitkow/go-proto-validators"
math "math"
)
// Reference imports... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/product_bidding_category_constant.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
enums "google.golang.org/genproto/... |
package healthchecker
import (
"context"
"math/rand"
"net"
"runtime"
"strconv"
"sync"
"syscall"
"time"
"golang.org/x/net/icmp"
"golang.org/x/net/ipv4"
"k8s.io/klog/v2"
)
type METHOD string
// using map because icmp support only one listener. key: icmp sender's id value, value: result channel
var icmpList... |
package pov
import (
"container/list"
"sync"
"time"
"github.com/AsynkronIT/protoactor-go/actor"
"go.uber.org/atomic"
"go.uber.org/zap"
"github.com/qlcchain/go-qlc/common"
"github.com/qlcchain/go-qlc/common/event"
"github.com/qlcchain/go-qlc/common/statedb"
"github.com/qlcchain/go-qlc/common/topic"
"github... |
package build
import (
"fmt"
"net/url"
"os"
"path"
"path/filepath"
"reflect"
"strings"
"github.com/flant/logboek"
"github.com/flant/werf/pkg/build/stage"
"github.com/flant/werf/pkg/config"
"github.com/flant/werf/pkg/docker_registry"
"github.com/flant/werf/pkg/git_repo"
"github.com/flant/werf/pkg/logging... |
// Package cert contains certificate specifications and
// certificate-specific management.
package cert
import (
"crypto/tls"
"crypto/x509"
"encoding/json"
"encoding/pem"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
"gopkg.in/yaml.v2"
"github.com/cloudflare/certmgr/metrics"
"github... |
/*
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, ... |
package endpoints
import (
"fmt"
"regexp"
"strings"
"github.com/aws/aws-sdk-go/aws/awserr"
)
// Options provide the configuration needed to direct how the
// endpoints will be resolved.
type Options struct {
// DisableSSL forces the endpoint to be resolved as HTTP.
// instead of HTTPS if the service supports i... |
/*
* Tencent is pleased to support the open source community by making Blueking Container Service available.
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obta... |
// Package bitseq provides a structure and utilities for representing long bitmask
// as sequence of run-length encoded blocks. It operates directly on the encoded
// representation, it does not decode/encode.
package bitseq
import (
"encoding/binary"
"encoding/json"
"errors"
"fmt"
"sync"
"github.com/docker/lib... |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
/*
The h2i command is an interactive HTTP/2 console.
Usage:
$ h2i [flags] <hostn... |
// Copyright 2016 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 ... |
// Utilities to help with incremental builds.
//
// There are four things we consider for each rule:
// - the global config, some parts of which affect all rules
// - the rule definition itself (the command to run, etc)
// - any input files it might have
// - any dependencies.
//
// If all of those are the same as ... |
/*
* Copyright 2018 Xiaomi, 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/resources/product_bidding_category_constant.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
enums "google.golang.org/genproto/... |
package host
import (
"context"
"crypto/tls"
"errors"
"fmt"
"net"
"net/http"
"net/url"
"os"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/kataras/iris/v12/core/netutil"
"golang.org/x/crypto/acme/autocert"
)
// Configurator provides an easy way to modify
// the Supervisor.
//
// Look the `Configure... |
/*
Copyright 2020-2021 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... |
package app
import (
"context"
"crypto/tls"
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
"net/http/httputil"
_ "net/http/pprof"
"os"
"os/signal"
"strings"
"syscall"
"time"
"github.com/atsu/chatops/db"
"github.com/atsu/chatops/bot"
"github.com/atsu/chatops/interfaces"
"github.com/atsu/chatops/relay... |
// Copyright 2020 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... |
package deletion
import (
"encoding/json"
"fmt"
"hash/fnv"
"math"
"strconv"
"strings"
"time"
"github.com/sirupsen/logrus"
"github.com/wish/nodereaper/pkg/config"
"github.com/wish/nodereaper/pkg/configmap"
"github.com/wish/nodereaper/pkg/controller"
"github.com/wish/nodereaper/pkg/metrics"
"k8s.io/apimach... |
package mage
/**
* Panther is a scalable, powerful, cloud-native SIEM written in Golang/React.
* Copyright (C) 2020 Panther Labs Inc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundatio... |
// Copyright 2017 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"... |
package main
import (
"encoding/csv"
"fmt"
"image/color"
"io"
"log"
"math"
"os"
"sort"
"strconv"
"time"
"golang.org/x/exp/rand"
"github.com/pkg/errors"
"github.com/sajari/regression"
"gonum.org/v1/gonum/mat"
"gonum.org/v1/gonum/stat"
"gonum.org/v1/gonum/stat/distuv"
"gonum.org/v1/plot"
"gonum.org/v... |
// hard coded implementation of the FairAuction smart contract
// The auction dApp is automatically run by committee, a distributed market for colored tokens
package fairauction
import (
"bytes"
"sort"
"time"
"github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/address"
"github.com/iotaledger/goshimmer... |
// Copyright (C) 2021, MinIO, Inc.
//
// This code is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License, version 3,
// as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY ... |
// Copyright 2015 <NAME> and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... |
package mediatype
import (
"io/ioutil"
"mime"
"os"
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
func TestSnifferIgnoresExtensionCase(t *testing.T) {
assert.Equal(t, &EPUB, OfExtension("EPUB"), "Sniffer should ignore \"EPUB\" case")
}
func TestSnifferIgnoresMediaTypeCase(t *testing.T) {
a... |
/*
Package firstfit implements a straightforward line-breaking algorithm
where lines are broken at the first suitable breakpoint.
Wikipedia:
1. | SpaceLeft := LineWidth
2. | for each Word in Text
3. | if (Width(Word) + SpaceWidth) > SpaceLeft
4. | insert line break before Word in Text
5. | ... |
package lilliput
// #cgo CFLAGS: -msse -msse2 -msse3 -msse4.1 -msse4.2 -mavx
// #cgo darwin CFLAGS: -I${SRCDIR}/deps/osx/include
// #cgo linux CFLAGS: -I${SRCDIR}/deps/linux/include
// #cgo CXXFLAGS: -std=c++11
// #cgo darwin CXXFLAGS: -I${SRCDIR}/deps/osx/include
// #cgo linux CXXFLAGS: -I${SRCDIR}/deps/linux/include... |
// Copyright 2021 Matrix Origin
//
// 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 2022 The CubeFS 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... |
package co
// Registry key security and access rights
//
// 📑 https://docs.microsoft.com/en-us/windows/win32/sysinfo/registry-key-security-and-access-rights
type KEY uint32
const (
KEY_QUERY_VALUE KEY = 0x0001
KEY_SET_VALUE KEY = 0x0002
KEY_CREATE_SUB_KEY KEY = 0x0004
KEY_ENUMERATE... |
package proto
import (
"fmt"
"github.com/toophy/easybuff/help"
"strconv"
"strings"
)
func GetReadFunc(s string) string {
func_name := ""
switch s {
case "int8":
func_name = "ReadInt8"
case "int16":
func_name = "ReadInt16"
case "int24":
func_name = "ReadInt24"
case "int32":
func_name = "ReadInt32"
c... |
// Copyright 2020 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
// Copyright 2018 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 IBM Corp. 2016 All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... |
package main
import (
"fmt"
"image"
"image/draw"
"image/png"
_ "image/png"
"io/ioutil"
// "math"
"os"
// "runtime"
"github.com/go-gl/gl/v2.1/gl"
)
const Z_OFFSET = 1 / 64
const VIEW_DISTANCE = 10
const EYE_HEIGHT = 1.7
type Render struct {
textures map[string]Texture
blockSheet uint32
buffers map[Positio... |
package config
import (
"bufio"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"reflect"
"regexp"
"strconv"
"strings"
"github.com/clbanning/mxj"
log "github.com/newrelic/newrelic-diagnostics-cli/logger"
"github.com/newrelic/newrelic-diagnostics-cli/tasks"
"gopkg.in/yaml.v3"
)
va... |
// Copyright (c) 2012 The gocql Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The gocql package provides a database/sql driver for CQL, the Cassandra
// query language.
//
// This package requires a recent version of Cassandra (... |
package raftgorums
import (
"container/list"
"fmt"
"sync"
"time"
"google.golang.org/grpc"
"github.com/Sirupsen/logrus"
"github.com/relab/raft"
"github.com/relab/raft/commonpb"
gorums "github.com/relab/raft/raftgorums/gorumspb"
pb "github.com/relab/raft/raftgorums/raftpb"
)
// State represents one of the R... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.12.3
// source: examplepb/example.proto
package examplepb
import (
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
protoreflect "google.golang.org/protobuf/r... |
package compiler
import (
"fmt"
"math"
"strings"
"github.com/alecthomas/protobuf/parser"
pb "google.golang.org/protobuf/types/descriptorpb"
)
const maxReserved = int32(1 << 29)
type fileDescriptorBuilder struct {
proto3 bool
fileDesc *pb.FileDescriptorProto
types types
scope []string
}
type messag... |
// Copyright 2017 orijtech. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: testing/testing.proto
package testing
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.... |
package v0_11
import (
"errors"
"fmt"
"time"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/params"
cdptypes "github.com/kava-labs/kava/x/cdp/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
const (
// ModuleName name tha... |
package version
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestNewConstraints(t *testing.T) {
tests := []struct {
constraint string
wantErr bool
}{
// https://github.com/pypa/packaging/blob/28d2fa0742747cda4bc4530b2a5bc919b7382039/tests/t... |
package webservices
// Copyright (c) Microsoft and contributors. 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
//
//... |
package polling_test
import (
"testing"
)
func TestActualAlternativePeggedAssets(t *testing.T) {
ActualDataSourceTest(t, "AlternativeMe", "FCT")
}
func TestFixedAlternativePeggedAssets(t *testing.T) {
FixedDataSourceTest(t, "AlternativeMe", []byte(alternativeResp))
}
var alternativeResp = `
{
"data": {
"1": {... |
package main
import (
"bytes"
"database/sql"
"fmt"
"html/template"
"io"
"mime"
"net"
"os"
"path/filepath"
"regexp"
"sort"
"strings"
"time"
"owo.codes/whats-this/cdn-origin/lib/db"
"owo.codes/whats-this/cdn-origin/lib/metrics"
"owo.codes/whats-this/cdn-origin/lib/thumbnailer"
_ "github.com/lib/pq"
"... |
// Copyright (c) DataStax, 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 ... |
package app
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"math"
"net/url"
"path/filepath"
"sort"
"strconv"
"strings"
"unicode"
"github.com/PuerkitoBio/goquery"
log "github.com/Sirupsen/logrus"
"github.com/ensonmj/elise/cmd/elise/conf"
"github.com/ensonmj/elise/htmlutil"
"github.com/ensonmj/fileproc... |
/*
* gomacro - A Go interpreter with Lisp-like macros
*
* Copyright (C) 2017-2019 <NAME>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* bi... |
package deviceinfo
import (
"fmt"
)
// Credit to https://github.com/react-native-device-info/react-native-device-info/blob/master/ios/RNDeviceInfo/RNDeviceInfo.m
// Credit to https://gist.github.com/adamawolf/3048717
var iosMachineMapping = map[string]string{
"iPod1,1": "iPod Touch", // (Original)
"iPod2,1": "iPod... |
package main
import cli "github.com/jawher/mow.cli"
// initGlobalOptions defines some global CLI options, that are useful for most parts of the app.
// Before adding option to there, consider moving it into the actual Cmd.
func initGlobalOptions(
envName **string,
appLogLevel **string,
svcWaitTimeout **string,
) {... |
// Copyright 2019 <NAME>. Atos Technologies - Bull, R<NAME> Jaures, B.P.68, 78340, Les Clayes-sous-Bois, France.
//
// 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.apac... |
/*
Copyright 2021 The CI/CD Operator Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... |
package tdpos
import (
"encoding/json"
"fmt"
"sort"
"time"
common "github.com/xuperchain/xupercore/kernel/consensus/base/common"
cctx "github.com/xuperchain/xupercore/kernel/consensus/context"
"github.com/xuperchain/xupercore/lib/logs"
)
// tdposSchedule 实现了ProposerElectionInterface接口,接口定义了proposers操作
// tdpo... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: proto/crypto_get_account_records.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect ... |
package chip8
import (
"math/rand"
"github.com/Oicho/GO-Chip8/graphics"
"github.com/Oicho/GO-Chip8/myLogger"
)
var mainFunctionArray = [0x10]func(*Memory, uint16){ZeroDispatcher, OneJumpTo, TwoCallSubRoutine, ThreeEqSkip, FourNeqSkip, FiveEqSkip, SixSetRegister, SevenAddToRegister, EightDispatcher, NineNeqSkip, A... |
package builder
import (
"encoding/base64"
"fmt"
"github.com/DevopsArtFactory/goployer/pkg/schemas"
"github.com/spf13/viper"
"gopkg.in/yaml.v2"
"io/ioutil"
"reflect"
"strings"
"time"
"github.com/DevopsArtFactory/goployer/pkg/tool"
Logger "github.com/sirupsen/logrus"
)
type Builder struct { // Do not add c... |
// The tree package declares the types used to represent parse trees for the Lua
// syntax.
package tree
import (
"github.com/anaminus/luasyntax/go/token"
"io"
)
// Notes
//
// A pointer is used when
// - the value is within an interface.
// - the field is optional.
//
// Methods assume that *<node> is not ... |
package service
import (
"bytes"
"cloud.google.com/go/datastore"
"context"
"crypto/md5"
"crypto/sha256"
"encoding/base64"
"encoding/json"
"fmt"
"github.com/tempxla/stub2ch/configs/app/bbscfg"
"github.com/tempxla/stub2ch/configs/app/config"
"github.com/tempxla/stub2ch/configs/app/secretcfg"
"github.com/temp... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: yandex/cloud/resourcemanager/v1/cloud.proto
package resourcemanager
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/proto... |
package parse
import (
"bytes"
"encoding/xml"
"io"
"io/ioutil"
"os"
jsoniter "github.com/json-iterator/go"
)
// SraXML convert Sra XML to json
func SraXML(xmlPaths *[]string, stdin *[]byte, outfn string, keywords *[]string, thread int) {
if len(*xmlPaths) == 1 {
thread = 1
}
if len(*stdin) > 0 {
*xmlPat... |
// MIT License
// Copyright (c) 2020 <NAME>
// 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, p... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/talent/v4beta1/tenant.proto
package talent
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference im... |
package search
import (
"encoding/gob"
"io"
"math/bits"
"github.com/Tom-Johnston/mamba/comb"
"github.com/Tom-Johnston/mamba/disjoint"
"github.com/Tom-Johnston/mamba/graph"
"github.com/Tom-Johnston/mamba/ints"
"github.com/Tom-Johnston/mamba/itertools"
)
//GraphIterator is an iterator which iterates over all n... |
// Copyright (C) 2019 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
package handlers
import (
"context"
"crypto/rand"
"crypto/rsa"
"encoding/json"
"fmt"
"net/http"
"net/url"
"strconv"
"strings"
"github.com/lestrrat-go/jwx/jwa"
"github.com/lestrrat-go/jwx/jwk"
"github.com/spf13/cast"
"github.com/go-chi/jwtauth"
oauth2errors "github.com/go-oauth2/oauth2/v4/errors"
"gith... |
/*
* (c) 2016-2018 Adobe. All rights reserved.
* This file is licensed to you 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 applic... |
// Copyright 2017-2021 DERO Project. All rights reserved.
// Use of this source code in any form is governed by RESEARCH license.
// license can be found in the LICENSE file.
// GPG: 0F39 E425 8C65 3947 702A 8234 08B2 0360 A03A 9DE8
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" A... |
package util
// PacketHeader that is sent with every packet
// 24 bytes
type PacketHeader struct {
PacketFormat uint16 // 2020
GameMajorVersion uint8 // Game major version - "X.00"
GameMinorVersion uint8 // Game minor version - "1.XX"
PacketVersion uint8 // Version of this... |
// SPDX-License-Identifier: Apache-2.0
// Copyright 2021 The Kubernetes Authors
package fromast
import (
"context"
"fmt"
"k8s.io/idl/kdlc/parser/trace"
"k8s.io/idl/kdlc/parser/ast"
ir "k8s.io/idl/ckdl-ir/goir/types"
irc "k8s.io/idl/ckdl-ir/goir/constraints"
)
// TODO(directxman12): we could make all of this ea... |
package main
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"math/rand"
"path"
"sync"
"time"
"github.com/northbright/csvhelper"
"github.com/northbright/pathhelper"
)
var (
participantsCSV = `participants.csv`
configFile = `config.json`
config Config
participants []Partici... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.