text stringlengths 5.51k 28.1k |
|---|
// Copyright 2015 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
/*
* // Copyright (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
* //
* /... |
// Copyright 2014 <NAME>. All rights reserved.
// Use of this source code is governed by The MIT License
// found in the accompanying LICENSE file.
package ora
/*
#include <stdlib.h>
#include <oci.h>
#include "version.h"
*/
import "C"
import (
"fmt"
"io"
"sync"
"unsafe"
)
const lobChunkSize = (1 << 20) // 1Mb
v... |
// Copyright 2014 The Serviced 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 chunk
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
)
// Bext is Broadcast Wave Format (BWF) bext chunk 'bext' describing extended information.
// This data structure is compatible with BWF versions 0, 1 and 2.
// Version 0 has 254 bytes reserve.
// Version 1 contains 64 byte of UMID and has 190 bytes... |
package abci_test
import (
"context"
"encoding/json"
"errors"
"fmt"
"path/filepath"
"strconv"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
abcitypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
"github.co... |
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net"
"os"
"strconv"
"time"
"github.com/GianlucaGuarini/go-observable"
golua "github.com/Shopify/go-lua"
"github.com/asaskevich/EventBus"
"github.com/chuckpreslar/emission"
"github.com/davecgh/go-spew/spew"
"github.com/k0kubun/pp"
"github.... |
package main
import (
"crypto/tls"
"flag"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"os"
"path"
"strings"
"sync"
"text/tabwriter"
"time"
log "github.com/coreos/fleet/Godeps/_workspace/src/github.com/golang/glog"
"github.com/coreos/fleet/client"
"github.com/coreos/fleet/job"
"github.com/coreos/fleet/ma... |
/*
MIT License
Copyright (c) 2018 <NAME> www.gokhankocak.com
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, mer... |
package server
import (
"container/heap"
"errors"
"fmt"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/dustin/go-humanize/english"
"github.com/liftbridge-io/liftbridge/server/logger"
proto "github.com/liftbridge-io/liftbridge/server/protocol"
)
type partitionAssignments map[string][]int32
type gro... |
package testingdock
import (
"bufio"
"context"
b64 "encoding/base64"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"strings"
"sync"
"testing"
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/filters"
clicfg "github.com/d... |
// Generate a self-signed X.509 certificate for a TLS server. Outputs to
// 'cert.pem' and 'key.pem' and will overwrite existing files.
package cert
import (
"archive/tar"
"bytes"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/base64"
"encoding/pem"
"fmt"
"math/big"
"net"
"time"
"g... |
// Copyright 2021 Dolthub, 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 (c) 2021 Terminus, 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 agree... |
package flaq
import (
"fmt"
"os"
"reflect"
"strings"
"time"
)
type errorHandling int
// These constants cause FlagSet.Parse to behave as described if the parse fails.
const (
ContinueOnError errorHandling = iota // Return a descriptive error.
ExitOnError // Print a descriptive error t... |
package resourcemapping
import (
"bytes"
"fmt"
"github.com/golang/glog"
"github.com/turbonomic/kubeturbo/pkg/util"
apiextclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstruct... |
// Command static runs static ellipswarm simulations.
//
// Usage
//
// The static command takes one optional argument:
// static [config_file]
// It is the path to a TOML config file.
package main
import (
"fmt"
"math"
"math/rand"
"os"
"runtime"
"sort"
"time"
"github.com/PrincetonUniversity/ellipswarm"
"gi... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: flyteidl/core/compiler.proto
package core
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... |
package connection
import (
"fmt"
"net"
"strconv"
"sync"
"sync/atomic"
"time"
"go.aporeto.io/enforcerd/trireme-lib/controller/internal/enforcer/nfqdatapath/afinetrawsocket"
"go.aporeto.io/enforcerd/trireme-lib/controller/internal/enforcer/utils/ephemeralkeys"
"go.aporeto.io/enforcerd/trireme-lib/controller/p... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package lindorm
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type GetInstancesInstance struct {
// AutoRenew.
... |
//
// DISCLAIMER
//
// Copyright 2018 ArangoDB GmbH, Cologne, Germany
//
// 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 require... |
// Copyright (c) 2019 Dropbox, Inc.
// Full license can be found in the LICENSE file.
package goebpf
import (
"bytes"
"debug/elf"
"encoding/binary"
"errors"
"fmt"
"io"
"os"
"sort"
"strings"
"golang.org/x/sys/unix"
)
const (
// MapSectionName is name of ELF section for maps
MapSectionName = "maps"
// Li... |
package opl2
// This file is a Pure Go conversion of dbopl.h/.cpp, slimmed down to just a single channel's
// operator. It technically has diverged significantly enough from the original programming
// that it probably doesn't need the below license notice, but to be a good citizen, I've kept
// it here.
/*
* Copyr... |
/*
Copyright 2018 The OpenEBS 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, sof... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.12.3
// source: user/common.proto
package user
import (
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
protoreflect "google.golang.org/protobuf/reflect/prot... |
// Copyright 2021 Monoskope 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 (
"bufio"
"bytes"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
"path/filepath"
"regexp"
"strings"
"sync"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
)
type resourceFetcherContext struct {
baseURL *url.URL
targetHostDir string... |
/*
Copyright 2021 The AtomCI Group 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, s... |
/*
* Copyright (c) 2008-2021, Hazelcast, 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 b... |
package bagman_test
import (
"fmt"
"github.com/APTrust/bagman/bagman"
"github.com/crowdmob/goamz/s3"
"path/filepath"
"strings"
"testing"
"time"
)
// Returns a basic ProcessResult that can be altered for
// specific tests.
func baseResult() (result *bagman.ProcessResult) {
result = &bagman.ProcessResult{}
re... |
// Copyright 2015 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 2021 HP Development Company, L.P.
// SPDX-License Identifier: BSD-2-Clause
package go3mf
import (
"encoding/xml"
"fmt"
"image/color"
"sort"
"testing"
"github.com/go-test/deep"
"github.com/hpinc/go3mf/errors"
"github.com/hpinc/go3mf/spec"
)
func TestValidate(t *testing.T) {
spec.Register(fake... |
/* (c) 2019, Blender Foundation - <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, pub... |
package main
import (
"alitest2020_tailbase/pb"
"bytes"
"context"
"github.com/cornelk/hashmap"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
"io"
"log"
"net"
"net/http"
"os"
"os/signal"
"strconv"
"sync"
"syscall"
"time"
)
// agentd server struct , filte source data ,than send target data... |
package app
import (
"fmt"
"math"
"testing"
"time"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
dnTypes "github.com/dfinance/dnode/helpers/types"
"github.com/dfinance/dnode/x/ccstorage"
"github.com/dfinance/dnode/x/markets... |
// Copyright 2014 <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// html.go contains checks on a HTML body.
package ht
import (
"fmt"
"net/http"
"net/url"
"sort"
"strings"
"time"
"github.com/andybalholm/cascadia"
"github.... |
package database
import (
"fmt"
"github.com/dnielsen/campsite/pkg/config"
"github.com/dnielsen/campsite/pkg/model"
"github.com/google/uuid"
"golang.org/x/crypto/bcrypt"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"log"
"strings"
"time"
)
func setIfNotEmpty(m map[string]string, key, val string) {
if val != "" ... |
package main
import (
"bufio"
"bytes"
"crypto/tls"
"flag"
"fmt"
"hash"
"hash/fnv"
"io"
"io/ioutil"
"log"
"math"
"math/rand"
"net"
"net/http"
"net/http/httptrace"
"net/url"
"os"
"os/signal"
"path"
"strconv"
"strings"
"sync"
"sync/atomic"
"syscall"
"time"
"github.com/buoyantio/slow_cooker/hdrr... |
// Copyright 2013-2022 The btcsuite developers
package musig2
import (
"bytes"
"fmt"
"sort"
secp "github.com/decred/dcrd/dcrec/secp256k1/v4"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
"github.com/btcsuite/btcd/chaincfg/chainhash"
)
var (
// KeyAggTagList is the tagged h... |
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
/*
** Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
** Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
*/
package graphpipe
import (
"bytes"
"crypto/sha512"
"encoding/binary"
"fmt"
"sort"
"sync"
"unsafe"
"github.com/Sirupsen/logrus"... |
//
// Modified BSD 3-Clause Clear License
//
// Copyright (c) 2019 Insolar Technologies GmbH
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted (subject to the limitations in the disclaimer below) provided that
// the following conditions a... |
/*
QOI - The "Quite OK Image" format for fast, lossless image compression
<NAME> - https://phoboslab.org
-- LICENSE: The MIT License(MIT)
Copyright(c) 2021 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files(the "Software"), to de... |
package store
import (
"fmt"
"net/url"
"os"
"path/filepath"
"sort"
"time"
"github.com/docker/distribution/reference"
"github.com/windmilleng/tilt/internal/container"
"github.com/windmilleng/tilt/internal/dockercompose"
"github.com/windmilleng/tilt/internal/hud/view"
"github.com/windmilleng/tilt/internal/k8... |
package worker
import (
"archive/tar"
"context"
"encoding/json"
"fmt"
"io"
"path"
"strconv"
"time"
"github.com/go-logr/logr"
"github.com/logrusorgru/aurora/v3"
"github.com/taskcluster/taskcluster/v41/clients/client-go/tcqueue"
"github.com/taskcluster/taskcluster/v41/clients/client-go/tcsecrets"
"github.c... |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Stringer is a tool to automate the creation of methods that satisfy the fmt.Stringer
// interface. Given the name of a (signed or unsigned) integer type T th... |
/* PushToTalk app, server (proxy), & radio controller.
Next to do:
Radio Off is noisier than Radio On, so Inhibit radio-off noise somehow.
Probably hub tells radio there are no humans, so don't send packets from radio.
*/
package rxtx
import (
"bytes"
"encoding/binary"
"flag"
"fmt"
"log"
"net"
"os"
"tim... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: orc8r/protos/service_status.proto
package protos
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
... |
package spicefyne
import (
"image"
"log"
"math"
"os"
"strconv"
"strings"
"github.com/KarpelesLab/goclip"
"github.com/Shells-com/spice"
"github.com/go-gl/glfw/v3.3/glfw"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/dialog"
"fyne.io/fyne/v2/driver/desktop"
"fyn... |
// Copyright 2015 Comcast Cable Communications Management, 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 b... |
package securityscanutils
import (
"bytes"
"compress/gzip"
"context"
"encoding/base64"
"fmt"
"io/ioutil"
"math"
"os"
"os/exec"
"path"
"strconv"
"strings"
"time"
"github.com/solo-io/go-utils/stringutils"
"github.com/Masterminds/semver/v3"
"github.com/google/go-github/v32/github"
"github.com/solo-io/... |
// Copyright (c) 2014-2016 The btcsuite developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package chaincfg
import (
"time"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
)
// genesisCoinbaseTx is the coinbase transaction f... |
// Package for use with Ordnance Survey grid references.
// Uses integer rather than floating point.
//
// https://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid
//
// https://www.ordnancesurvey.co.uk/resources/maps-and-geographic-resources/the-national-grid.html
//
// GridCoord grid references are the measured fr... |
package businesslogic
import (
"errors"
"fmt"
"log"
"sort"
"time"
)
const (
// EVENT_STATUS_DRAFT is the stage where it is newly created not open to registration or competition
EVENT_STATUS_DRAFT = 1
// EVENT_STATUS_OPEN is the stage where it is open to registration, but competition has not started
EVENT_STA... |
// 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 functions
import (
"sort"
"strings"
d "github.com/joergreinhardt/gatwd/data"
)
///// SYNTAX DEFINITION /////
type TyLex d.BitFlag
func (t TyLex) TypeFnc() TyFnc { return Lexical }
func (t TyLex) TypeNat() d.TyNat { return d.Type }
func (t TyLex) Type() TyComp ... |
// Copyright 2021 Google LLC
//
// Licensed under the Apache Livense, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// Copyright 2018 The go-hpb Authors
// Modified based on go-ethereum, which Copyright (C) 2014 The go-ethereum Authors.
//
// The go-hpb 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... |
package networkdb
//go:generate protoc -I.:../Godeps/_workspace/src/github.com/gogo/protobuf --gogo_out=import_path=github.com/docker/libnetwork/networkdb,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto:. networkdb.proto
import (
"fmt"
"strings"
"sync"
"time"
"github.com/Sirupsen/logrus"
"github.com/... |
package dnszone
import (
"errors"
"fmt"
"strings"
log "github.com/sirupsen/logrus"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/arn"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
"github.com/aws/aws-sdk-go/service/route53"
corev1 "k8s... |
package oneoutofmany
import (
"math/big"
"github.com/incognitochain/incognito-chain/common"
"github.com/incognitochain/incognito-chain/privacy"
"github.com/incognitochain/incognito-chain/privacy/zeroknowledge/utils"
"github.com/pkg/errors"
)
// This protocol proves in zero-knowledge that one-out-of-N commitment... |
// Copyright 2018 Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
// BSD 2-Clause License
//
// Copyright (c) 2016-2018, <NAME> <<EMAIL>>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright n... |
package core
import (
"fmt"
"html/template"
"net/http"
"net/url"
"runtime/debug"
"time"
"github.com/xinliangnote/go-gin-api/assets"
"github.com/xinliangnote/go-gin-api/configs"
_ "github.com/xinliangnote/go-gin-api/docs"
"github.com/xinliangnote/go-gin-api/internal/code"
"github.com/xinliangnote/go-gin-api... |
//go:build !nokubectl
// +build !nokubectl
// Copyright © 2019 NAME HERE <EMAIL ADDRESS>
//
// 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-... |
/*
Copyright © 2022 SUSE 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
dist... |
package conda
import (
"errors"
"fmt"
"io"
"io/ioutil"
"math/rand"
"os"
"path/filepath"
"strings"
"time"
"github.com/google/shlex"
"github.com/robocorp/rcc/cloud"
"github.com/robocorp/rcc/common"
"github.com/robocorp/rcc/pathlib"
"github.com/robocorp/rcc/pretty"
"github.com/robocorp/rcc/settings"
"git... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/api/backend.proto
package serviceconfig
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
/... |
// Copyright (c) 2020-2021 Uber Technologies, Inc.
//
// 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, ... |
package main
/*
Copyright (C) <NAME>, 2016.
MIT Licensed.
*/
import (
"bufio"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"regexp"
"sort"
"strings"
"time"
"github.com/pschlump/MiscLib"
"github.com/pschlump/filelib" // Fopen
"github.com/pschlump/godebug" // SVar, LF etc.
"github.com/pschlump/i... |
// Copyright 2021-2022 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package upstreamwatchers
import (
"context"
"crypto/x509"
"encoding/base64"
"fmt"
"time"
corev1 "k8s.io/api/core/v1"
corev1informers "k8s.io/client-go/informers/core/v1"
"go.pinniped.dev/generated/l... |
// Copyright 2014 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 2016 Cesanta Software Ltd.
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 agree... |
package keeper
import (
"fmt"
"strings"
"github.com/line/ostracon/libs/log"
"github.com/line/lfb-sdk/codec"
"github.com/line/lfb-sdk/store/prefix"
sdk "github.com/line/lfb-sdk/types"
sdkerrors "github.com/line/lfb-sdk/types/errors"
"github.com/line/lfb-sdk/x/capability/types"
)
type (
// Keeper defines the... |
package lunar
import (
"fmt"
"strings"
"time"
"github.com/Lofanmi/chinese-calendar-golang/animal"
"github.com/Lofanmi/chinese-calendar-golang/utils"
)
// Lunar 农历
type Lunar struct {
t *time.Time
year, month, day int64
monthIsLeap bool
}
var numberAlias = [...]string{
"零", "一", "二", "三"... |
// Copyright (C) 2019 Stor<NAME>, Inc.
// See LICENSE for copying information.
package ecclient
import (
"context"
"io"
"io/ioutil"
"sort"
"sync"
"time"
"github.com/spacemonkeygo/monkit/v3"
"github.com/zeebo/errs"
"go.uber.org/zap"
"storj.io/common/encryption"
"storj.io/common/errs2"
"storj.io/common/id... |
// Copyright 2019 Yunion
//
// 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 model
import (
"encoding/json"
"time"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/db"
"github.com/evergreen-ci/evergreen/model/distro"
"github.com/evergreen-ci/evergreen/model/host"
"github.com/evergreen-ci/evergreen/model/task"
"github.com/evergreen-ci/utility"
"github.com... |
/*
Copyright The Helm 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, software
di... |
// Copyright 2018 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 main
import (
"bytes"
"flag"
"fmt"
"github.com/at-wat/ebml-go/mkvcore"
"github.com/at-wat/ebml-go/webm"
"github.com/pion/rtcp"
"github.com/pion/rtp"
"github.com/pion/rtp/codecs"
"io"
"math"
"os"
"os/signal"
"time"
log "github.com/pion/ion-log"
sdk "github.com/pion/ion-sdk-go"
"github.com/pion/... |
package collector
import (
"fmt"
"go/ast"
"go/printer"
"go/token"
"strings"
)
const (
slashes = `//`
magicPrefix = slashes + `go:`
gogenPrefix = magicPrefix + `generate`
buildPrefix = slashes + ` +build`
ellipsis = "..."
interfaceLit = "interface{}"
literalLit = "literal"
typeLit = "ty... |
//
// goamz - Go packages to interact with the Amazon Web Services.
//
// https://wiki.ubuntu.com/goamz
//
// Copyright (c) 2014 Canonical Ltd.
//
package ec2_test
import (
"launchpad.net/goamz/aws"
"launchpad.net/goamz/ec2"
. "launchpad.net/gocheck"
"time"
)
// Network interface tests with example responses
... |
// Copyright 2017 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 2016-2017 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... |
/*
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... |
/*
Copyright 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 config defines the config structs and some config parser interfaces and implementations
package config
import (
"errors"
"fmt"
"log"
"regexp"
"strings"
"time"
"github.com/devopsfaith/krakend/encoding"
)
const (
// BracketsRouterPatternBuilder uses brackets as route params delimiter
BracketsRouter... |
/*
Copyright 2019 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 (c) 2021 THL A29 Limited, a Tencent company.
*
* 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... |
// Copyright 2019 Yunion
//
// 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... |
// Copyright (C) 2021 Gridworkz Co., Ltd.
// KATO, Application Management Platform
// 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 r... |
package csg
import (
"crypto/sha256"
"encoding/hex"
"fmt"
"io/ioutil"
"net/http"
"net/smtp"
"os"
"path/filepath"
"regexp"
"strings"
"time"
)
const DefaultSubject = "COVID WA - Notification"
const SinglePassRetries = 3
var config *Config
func Run(args []string) {
var err error
config, err = NewConfigDe... |
package server
import (
"encoding/json"
"fmt"
"net/http"
"os"
"strconv"
"strings"
"../actions"
"../proxy"
"github.com/kelseyhightower/envconfig"
)
// Server handles requests
type Server interface {
GetServicesFromEnvVars() *[]proxy.Service
GetServiceFromUrl(req *http.Request) *proxy.Service
PingHandler(w... |
package command
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io"
"os"
"path"
"regexp"
"strconv"
"strings"
"time"
"unicode"
consulapi "github.com/socketplane/socketplane/Godeps/_workspace/src/github.com/hashicorp/consul/api"
"github.com/socketplane/socketplane/Godeps/_workspace/src/github.com/mitchellh... |
package gou
import (
"testing"
jsoniter "github.com/json-iterator/go"
"github.com/stretchr/testify/assert"
"github.com/yaoapp/kun/maps"
)
func TestConditionBase(t *testing.T) {
var conds []Condition
bytes := ReadFile("conditions/base.json")
err := jsoniter.Unmarshal(bytes, &conds)
assert.Nil(t, err)
assert.... |
// SPDX-FileCopyrightText: 2020 <NAME>
//
// SPDX-License-Identifier: MIT
package upnpav
import (
"encoding/xml"
"fmt"
"net/url"
"github.com/ethulhu/helix/xmltypes"
)
type (
DIDLLite struct {
Containers []Container `xml:"container,omitempty"`
Items []Item `xml:"item,omitempty"`
}
// marshalDID... |
/*
File Name: Message Encoding Response.go
Copyright: 2021 Peernet s.r.o.
Author: <NAME>
*/
package protocol
import (
"bytes"
"encoding/binary"
"errors"
"net"
"time"
"unicode/utf8"
"github.com/PeernetOfficial/core/btcec"
)
// MessageResponse is the decoded response message.
type Mes... |
package pango
import (
"container/list"
"log"
"unicode"
"github.com/benoitkugler/textlayout/fonts"
"github.com/benoitkugler/textlayout/fonts/truetype"
"github.com/benoitkugler/textlayout/fribidi"
"github.com/benoitkugler/textlayout/harfbuzz"
"github.com/benoitkugler/textlayout/language"
)
const (
// Whether... |
// This code is an adapted version of Nats benchmarking suite from
// https://github.com/nats-io/go-nats/blob/master/examples/nats-bench.go
// for Centrifuge. Use together with benchmark program from Centrifuge repo:
// https://github.com/centrifugal/centrifuge/blob/master/examples/benchmark/main.go
package main
impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.