text stringlengths 3.08k 10.4k |
|---|
package xmlpull
// xgo/xml/xmlpull/parseXmlDecl.go
import (
e "errors"
"fmt"
)
// ------------------------------------------------------------------
// Beware: parseXmlDecl() is called by parseProcessingInstruction()
// because it is a specific type of PI.
// -------------------------------------------------------... |
package autoupdate
import (
"errors"
"fmt"
"io"
"io/ioutil"
"math/rand"
"net/http"
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"
"time"
)
type AutoUpdate struct {
Url string // 下载路径
Softname string // 软件名
CurrVer string // 当前版本
CurrName string // 当前运行路径及文件名
}
func (au *AutoUpdate) Update()... |
package main
import (
"errors"
"fmt"
db "github.com/fclairamb/m2mp/go/m2mp-db"
dbent "github.com/fclairamb/m2mp/go/m2mp-db/entities"
mq "github.com/fclairamb/m2mp/go/m2mp-messaging"
"github.com/gocql/gocql"
"os"
"regexp"
"strings"
"sync"
"time"
)
type StorageService struct {
mqClient *mq.Client
qu... |
package main
import (
"flag"
"fmt"
"os"
"os/signal"
"path/filepath"
"syscall"
"golang.org/x/crypto/otr"
"trident.li/xmpp-go/xlib"
"trident.li/xmpp-go/xmpp"
)
var configFile *string = flag.String("config-file", "", "Location of the config file")
var createAccount *bool = flag.Bool("create", false, "If true, ... |
// Copyright (C) 2017 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 vcf
import (
"fmt"
"os"
)
type GT struct {
Position uint64
Gt *VCFGTVal
Lgt int
IsDiploid bool
}
type DistanceTable = []uint64
type DistanceRow = []uint64
type DistanceMatrix []DistanceRow
func NewDistanceMatrix(numSampleNames uint64) *DistanceMatrix {
res := make(Dis... |
package main
import (
"fmt"
"github.com/esimov/colorquant"
"image"
"image/color/palette"
"image/gif"
_ "image/jpeg"
_ "image/png"
"log"
"os"
"path/filepath"
"strings"
"sync"
"time"
)
const minLoggedDuration = time.Millisecond * 10 // we don't care about logging things that take <.01s
var floydSteinbergD... |
// 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 noder
import (
"fmt"
"strings"
"cmd/compile/internal/ir"
"cmd/compile/internal/syntax"
"cmd/internal/objabi"
)
func isSpace(c rune) bool {
retu... |
package planner
import "github.com/vektah/gqlparser/v2/ast"
type Field struct {
Scope *Scope
FieldNode *ast.Field
FieldDef *ast.FieldDefinition
}
func (field *Field) MarshalLog() interface{} {
result := make(map[string]interface{})
result["Scope"] = field.Scope.MarshalLog()
// TODO わかるデータ量もうちょい増やす
result... |
package ui
import (
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
)
var (
UI *ui
)
type Primitive interface {
focus()
blur()
tview.Primitive
}
type ui struct {
app *tview.Application
pages *tview.Pages
current int
primitives []Primitive
primitiveLen int
updater chan f... |
package algolia
type AlgolaQueryResponse struct {
Hits []Hit `json:"hits"`
NbHits int64 `json:"nbHits"`
Page int64 `json:"page"`
NbPages int64 `json:"nbPages"`
HitsPerPage int64 `json:"hitsPerPage"`
Facets ... |
package unifi
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"time"
)
// SiteReport is the site report data
/*type SiteReport struct {
// common
OID string `json:"oid"`
// site report
Site string `json:"site"`
// ap report
AccessPoint string `json:"ap"`
// user
???
// speedtest
SpeedTestID string `j... |
package libbpf
// FIXME: get libbpf path from env
//go:generate cp /tmp/libbpf/src/libbpf.h /go/router/driver/libbpf/
//go:generate cp /tmp/libbpf/src/libbpf_util.h /go/router/driver/libbpf
//go:generate cp /tmp/libbpf/src/xsk.h /go/router/driver/libbpf
/*
#cgo CFLAGS: -O3 -I/usr/include/uapi/
#cgo LDFLAGS: -lelf /tm... |
// Code generated by gotdgen, DO NOT EDIT.
package tdapi
import (
"context"
"errors"
"fmt"
"sort"
"strings"
"go.uber.org/multierr"
"github.com/gotd/td/bin"
"github.com/gotd/td/tdjson"
"github.com/gotd/td/tdp"
"github.com/gotd/td/tgerr"
)
// No-op definition for keeping imports.
var (
_ = bin.Buffer{}
_... |
package phly_nodes
import (
"bufio"
"errors"
"fmt"
"github.com/hackborn/phly"
"github.com/micro-go/lock"
"github.com/micro-go/parse"
"io"
"os/exec"
"strings"
"sync"
)
// run executes a command.
type run struct {
runner *run_func_t
}
func (n *run) Describe() phly.NodeDescr {
descr := ... |
/*
* Copyright 2019, authproxy 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 (
"archive/tar"
"archive/zip"
"crypto/md5"
"crypto/sha1"
"crypto/sha256"
"crypto/sha512"
"errors"
"flag"
"fmt"
"github.com/mholt/archiver/v3"
"github.com/nwaples/rardecode"
"hash"
"io"
"log"
"os"
"path/filepath"
)
var (
VERSION = `v0.0.0`
BUILD = `dev`
BUILDDATE = `0000-00... |
/*Conway's Game Of Life
Uses maps/dicts for storage, so speed/memory use proportional to number of live cells.
in/out storage using png files.
save sequences of images for making movies.
*/
// example arguments: -i="./media/glider" -pipeMovie -wrap -size=200 -ticks=500
// TODO add terminal gocli display?
packa... |
package handlers
import (
"encoding/json"
"log"
"net/http"
"github.com/gofrs/uuid"
api "github.com/kyma-project/kyma/components/event-bus/api/publish"
"github.com/kyma-project/kyma/components/event-bus/cmd/event-bus-publish-knative/publisher"
"github.com/kyma-project/kyma/components/event-bus/cmd/event-bus-pub... |
// Code generated from specification version 1.0.0: DO NOT EDIT
package setrequiredavailability
import (
"io"
"net/http"
"github.com/MakeNowJust/heredoc/v2"
"github.com/reubenmiller/go-c8y-cli/pkg/c8yfetcher"
"github.com/reubenmiller/go-c8y-cli/pkg/cmd/subcommand"
"github.com/reubenmiller/go-c8y-cli/pkg/cmderro... |
// Package compactnumber allows for localized CLDR compact number formatting.
package compactnumber
import (
"errors"
"fmt"
"strings"
"github.com/gotnospirit/makeplural/plural"
"github.com/nkall/compactnumber/internal/models"
"golang.org/x/text/language"
"golang.org/x/text/message"
"golang.org/x/text/number"
... |
package devtogo
import (
"fmt"
"time"
)
// GetArticle returns an article with post content for the provided article id.
// https://docs.dev.to/api/#tag/articles/paths/~1articles~1{id}/get
func (c *Client) GetArticle(id int32) (*Article, error) {
var res Article
err := c.get(c.baseURL+fmt.Sprintf("/articles/%d", i... |
/*
Copyright The Pharmer 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... |
package ref_test
import (
"context"
"errors"
"runtime"
"sync"
"sync/atomic"
"testing"
"github.com/treeverse/lakefs/graveler"
"github.com/treeverse/lakefs/graveler/ref"
"github.com/treeverse/lakefs/graveler/testutil"
tu "github.com/treeverse/lakefs/testutil"
)
func TestBranchLock(t *testing.T) {
conn, _ :=... |
package controllers
import (
"context"
"encoding/json"
"fmt"
"log"
"github.com/RoadTripppin/wazzup/config"
"github.com/RoadTripppin/wazzup/models"
"github.com/google/uuid"
)
var Contex = context.Background()
const PubSubGeneralChannel = "general"
type WsServer struct {
clients map[*Client]bool
regi... |
// Tideland Go Database Clients - CouchDB Client
//
// Copyright (C) 2016-2020 <NAME> / Tideland / Oldenburg / Germany
//
// All rights reserved. Use of this source code is governed
// by the new BSD license.
package couchdb // import "tideland.dev/go/db/couchdb"
//--------------------
// IMPORTS
//------------------... |
package baidu
import (
"fmt"
"github.com/Xhofe/alist/conf"
"github.com/Xhofe/alist/drivers/base"
"github.com/Xhofe/alist/model"
"github.com/Xhofe/alist/utils"
"github.com/go-resty/resty/v2"
jsoniter "github.com/json-iterator/go"
"path"
"strconv"
)
func (driver Baidu) RefreshToken(account *model.Account) erro... |
package main
import (
"bufio"
"errors"
"fmt"
"net"
"strconv"
"strings"
"sync"
"github.com/dustin/go-humanize"
"github.com/tadeokondrak/irc"
)
type ircUser struct {
nick string
username string
realname string
password string
capBlocked b... |
package main
import (
"flag"
"fmt"
"github.com/mreiferson/go-options"
"github.com/nsqio/go-nsq"
// "strings"
// "github.com/olivere/elastic"
"log"
"os"
"os/signal"
"syscall"
// "sync"
"time"
)
// ArrayFlags for multi flag value
type ArrayFlags []string
// Set implement for Flag.Set
func (arrayFlags *A... |
package usecases
import (
"context"
"fmt"
"strings"
"github.com/savannahghi/feedlib"
"github.com/savannahghi/onboarding/pkg/onboarding/application/exceptions"
"github.com/savannahghi/onboarding/pkg/onboarding/application/extension"
"github.com/savannahghi/onboarding/pkg/onboarding/application/utils"
"github.c... |
package sem
import (
"errors"
"fmt"
"strconv"
"strings"
)
// See http://semver.org/spec/v2.0.0.html for semver spec details
var (
// ErrMultiMeta is returned when attempting to parse a semvar that has
// more than one + for indicating meta.
ErrMultiMeta = errors.New("only one +meta is allowed")
// ErrBadSem... |
package migration
import (
"database/sql"
"github.com/pkg/errors"
"github.com/pressly/goose"
)
func init() {
goose.AddMigration(Up20190319155441, Down20190319155441)
}
func Up20190319155441(tx *sql.Tx) error {
// This code is executed when the migration is applied.
_, err := tx.Exec(`
create table cycle
(
id ... |
package ping
import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/http/httptest"
"net/url"
"sort"
"testing"
"time"
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
"github.com/stretchr/testify/require"
"github.com/pomerium/pomerium/internal/testutil"
)
type M = map[string]interface{}
fun... |
// Copyright 2015 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 ml
// Generated file, please do not change!!!
import (
"encoding/json"
"time"
)
/**
* A set of ProductData for comparison. If no optional attributes are specified, all `current` ProductData are selected for comparison.
*/
type ProductSetSelector struct {
// The project containing the project set.
Projec... |
package x32
import (
"math"
"github.com/golang/glog"
)
// x32LogToHz returns the frquency in Hz which coresponds to the 0..1 float
// value sent by the X32 when the Eq Frequency knob is turned.
func x32EqFreqLogToHz(f float32) float32 {
if f < 0 {
f = 0
} else if f > 1 {
f = 1
}
// =EXP(2.9957322738+A1*6.9... |
// Copyright 2016 HenryLee. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
package main
import (
"flag"
"fmt"
"github.com/myntra/golimit/store"
"github.com/myntra/golimit/store/http"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
"io/ioutil"
"os"
"os/signal"
"strconv"
"strings"
"syscall"
"time"
)
type StoreConfig struct {
ClusterName *string `yaml:clustername,json:... |
// Copyright 2014 The zephyr-go authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by... |
package runner
import (
"context"
"encoding/json"
"fmt"
"math/rand"
"os"
"strings"
"sync"
"time"
"github.com/pkg/errors"
"github.com/projectdiscovery/gologger"
"github.com/projectdiscovery/iputil"
"github.com/projectdiscovery/stringsutil"
"github.com/projectdiscovery/uncover/uncover"
"github.com/project... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: remove_entity_from_domain.proto
package identityd2
import (
fmt "fmt"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
v... |
package solana
import (
"bytes"
"crypto/ed25519"
"crypto/sha256"
"fmt"
"sort"
"strings"
"github.com/mr-tron/base58/base58"
"github.com/pkg/errors"
)
const (
// MaxTransactionSize taken from: https://github.com/solana-labs/solana/blob/39b3ac6a8d29e14faa1de73d8b46d390ad41797b/sdk/src/packet.rs#L9-L13
MaxTran... |
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"os/signal"
"runtime"
"syscall"
"time"
"github.com/nats-io/nats-server/v2/server"
"github.com/aquasecurity/postee/v2/dbservice"
"github.com/aquasecurity/postee/v2/router"
"github.com/aquasecurity/postee/v2/utils"
"github.com/aquasecurity/postee/v2/webse... |
package yue
import (
"log"
"reflect"
proto "github.com/umegaya/yue/proto"
)
var inputsBuf []reflect.Value = make([]reflect.Value, 16)
var emptyInputs []reflect.Value = make([]reflect.Value, 0)
func callmethod(m *methodEntry, args ...interface{}) []reflect.Value {
var inputs []reflect.Value;
if len(args) > 0 {
... |
package alexa
import (
"fmt"
"net/http"
"strings"
"github.com/kpango/glg"
"github.com/rking788/go-alexa/skillserver"
"github.com/rking788/twitch-box/twitch"
)
// WelcomePrompt is responsible for returning a prompt to the user when launching the skill
func WelcomePrompt(echoRequest *skillserver.EchoRequest) (re... |
package chain
// Copyright 2018 <NAME> <<EMAIL>>, ShiftLeft 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
//
//... |
// Copyright 2020 Pantacor 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
//
// 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: _proto/kelda/messages/v0/messages.proto
package messages
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 _ = ma... |
package thinkingdata
import (
"encoding/json"
"errors"
"fmt"
"os"
"sync"
"time"
)
type RotateMode int32
const (
ChannelSize = 1000 // channel 缓冲区
ROTATE_DAILY RotateMode = 0 // 按天切分
ROTATE_HOURLY RotateMode = 1 // 按小时切分
)
type LogConsumer struct {
directory string // 日志文件存放目录... |
//go:generate esc -o static.go -pkg main static
package main
import (
"encoding/json"
"flag"
"fmt"
"log"
"os"
"sort"
"strings"
"github.com/atotto/clipboard"
ordering "github.com/bcongdon/emoji-ordering"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
"golang.org/x/crypto/ssh/terminal"
)
var (
outp... |
package main
import (
"fmt"
"io"
"os"
"os/signal"
"path/filepath"
"strconv"
"strings"
"sync"
"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/tendermint/tendermint/libs/log"
"gitlab.com/accumulatenetwork/accumulate/internal/accumulated"
"gitlab.com/accumulatenetwork/accumulate/internal/testi... |
package textfile
import (
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"os"
"sort"
"strconv"
)
var defaultSortBufferLen int = 10000
// TextSorter is used to export specific columns from a tab delimited file
type TextSorter struct {
txt *DelimitedTextFile
cols []*TextColumn
showComments bool
... |
package aws
import (
"encoding/json"
"finala/config"
"finala/expression"
"finala/storage"
"finala/structs"
"strings"
"time"
awsClient "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/cloudwatch"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/pricing"
log ... |
package main
import (
"errors"
"fmt"
"math"
"os"
"time"
)
const (
Err_NoBufferedTrack = "No new music to schedule."
Err_NoBufferedArtwork = "No new artwork to schedule."
Err_EmptySchedule = "Empty schedule."
Err_PublishedVideo = "Cannot unschedule published video."
Err_InvalidUploadTime = "Upload t... |
/*
Copyright 2016 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... |
// Copyright 2017 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 sandbox
import (
"bytes"
"fmt"
"io"
"os"
"os/exec"
"strings"
"github.com/ossf/package-analysis/internal/log"
)
const (
podmanBin = "podman"
runtimeBin = "/usr/bin/runsc"
rootDir = "/var/run/runsc"
logPath = "/tmp/runsc.log.boot"
)
type RunStatus uint8
const (
// RunStatusUnknown is used ... |
package routes
import (
"net/http"
"strconv"
"strings"
"time"
"github.com/code-golf/code-golf/cookie"
)
func scoresMini(w http.ResponseWriter, r *http.Request) {
userID, _ := cookie.Read(r)
var json []byte
if err := db(r).QueryRow(
`WITH leaderboard AS (
SELECT ROW_NUMBER() OVER (ORDER BY LENGTH(co... |
// Copyright © 2022, Cisco Systems Inc.
// Use of this source code is governed by an MIT-style license that can be
// found in the LICENSE file or at https://opensource.org/licenses/MIT.
package fs
import (
"fmt"
"github.com/pkg/errors"
"io"
"net/http"
"os"
"path"
"sort"
"time"
)
// `overlayDir` Based on vfs... |
package flagx
import (
"flag"
"fmt"
"os"
"strconv"
"strings"
"text/tabwriter"
zapraw "go.uber.org/zap"
ctrl "sigs.k8s.io/controller-runtime"
"go.uber.org/zap/zapcore"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)
// JSONEncoderConfig returns an opinionated EncoderConfig
func JSONEncoderConfig() zapcore.E... |
/*
Copyright © 2019 Portworx
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 controllers
import (
"fmt"
"strconv"
"github.com/humio/humio-operator/pkg/kubernetes"
corev1 "k8s.io/api/core/v1"
)
const (
containerStateCreating = "ContainerCreating"
containerStateCompleted = "Completed"
podInitializing = "PodInitializing"
PodConditionReasonUnsche... |
// Copyright 2015 The Serulian 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 tester implements support for testing Serulian code.
package tester
import (
"fmt"
"io/ioutil"
"log"
"os"
"path"
"strings"
"github.com... |
package study
import (
"bufio"
"fmt"
"log"
"math/rand"
"strings"
)
type Item struct {
English string
Pinyin string
Characters string
}
type Word struct {
English string
Pinyin string
Characters string
PartOfSpeech string
}
type Entry struct {
Question, Answer string
}
// Parse item... |
package asyncbuffer
import (
"bytes"
"math/rand"
"runtime"
"strconv"
"sync"
"sync/atomic"
_ "syscall"
"testing"
"time"
"unsafe"
)
var itemMap map[string]int = map[string]int{}
//var gItemMap sync.Map
var gCounter uint64
func (m *DemoBuffer) BatchDo(data [][]byte) {
//println("bufferLen:", len(data))
buf... |
// Code generated by protoc-gen-go.
// source: tensorflow/core/framework/resource_handle.proto
// DO NOT EDIT!
package tensorflow
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 _ = f... |
package itype
import "sort"
// Recti is a 2D rectangle with int coordinates.
type Recti struct {
Left, Top int
Width, Height int
}
// Rectf is a 2D rectangle with float32 coordinates.
type Rectf struct {
Left, Top float32
Width, Height float32
}
func (r Rectf) MinPoint() Vec2f {
return Vec2f{r.Left, r.... |
// Copyright 2020 ETH Zurich, Anapaya 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... |
// Code generated by smithy-go-codegen DO NOT EDIT.
package codedeploy
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/codedeploy/types"
smithy "github.com/awslabs/smithy-go"
"github.com/awslabs/smi... |
//Copyright 2018 <NAME>. Subject to the the Apache License, Version 2.0.
package rect
import (
"math"
"sort"
"strings"
disc "github.com/briannoyama/bvh/discreet"
)
// A Bounding Volume for orthotopes. Wraps the orthotope and contains descendents.
type BVol struct {
vol *Orthotope
desc [2]*BVol
depth int32
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package azidentity
import (
"fmt"
"net/http"
"net/url"
"os"
"testing"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/internal/recording"
)
// configuration for live te... |
package services
import (
"fmt"
"time"
"github.com/go-xorm/xorm"
"github.com/go-xorm/core"
_ "github.com/go-sql-driver/mysql"
"github.com/WeBankPartners/wecube-plugins-capacity/server/models"
"github.com/WeBankPartners/wecube-plugins-capacity/server/util/log"
"strings"
"strconv"
)
var mysqlEngine *xorm.Engin... |
package view
import (
"fmt"
"math"
"runtime"
"github.com/gogo/protobuf/proto"
"gomatcha.io/matcha/animate"
"gomatcha.io/matcha/comm"
"gomatcha.io/matcha/internal"
"gomatcha.io/matcha/layout"
"gomatcha.io/matcha/paint"
pbview "gomatcha.io/matcha/proto/view"
)
type ScrollView struct {
Embed
ScrollAxes ... |
// Copyright 2019 Bubble. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// runner carry a Job script and create a sub-folder under Job.
package master
import (
"bubble/def"
"encoding/json"
"io/ioutil"
"os"
"path"
"strconv"
"time"
... |
/*
* MinIO Client (C) 2020 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
package main
import (
"encoding/binary"
"os"
"time"
"github.com/vipshop/vdl/consensus/raft/raftpb"
"github.com/vipshop/vdl/logstore"
"flag"
"fmt"
"log"
"sync"
)
var (
TmpDir = "/Users/flike/vdl"
MsgSize *int = flag.Int("size", 100, "message size")
Batch *int = flag.Int("batch", 30, "batch cou... |
package main
import (
"bufio"
"flag"
"fmt"
"io"
"os"
"regexp"
"strings"
"github.com/lnquy/cron"
)
var (
version string // Will be injected at build time
fLocale string
fInputFilePath string
fDayOfWeekStartsAtOne bool
fUse24HourTimeFormat bool
fVerbose bool
fPrintAll... |
package cmd
import (
"fmt"
"os"
"os/user"
"strings"
"time"
"github.com/iamthemuffinman/overseer/configspec"
"github.com/iamthemuffinman/overseer/pkg/buildspec"
"github.com/iamthemuffinman/overseer/pkg/chef"
"github.com/iamthemuffinman/overseer/pkg/hammer"
"github.com/iamthemuffinman/overseer/pkg/hostspec"
... |
/*
Copyright 2020 Testutil 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, softwar... |
package proxy_pool
import (
"context"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"net/http"
"notion-bully/config"
"regexp"
"sync"
"time"
)
type ProxyPool struct {
sync.RWMutex
Pool []Proxy
}
type Proxy struct {
Ip string
Port string
Available bool
Proxy ProxyInterface
}
type ProxyInterface interface {
C... |
package amazon
import (
"log"
"os"
"regexp"
"time"
"github.com/crowdmob/goamz/aws"
"github.com/crowdmob/goamz/ec2"
"github.com/Zumata/capesize/command"
"github.com/Zumata/capesize/config"
"github.com/Zumata/capesize/core"
)
var DefaultEC2Config AmazonConfig
func init() {
DefaultEC2Config = AmazonConfig{... |
package DiscordClient
import (
"errors"
"fmt"
"log"
"strings"
"time"
"github.com/sirupsen/logrus"
"github.com/bwmarrin/discordgo"
)
func (c *DiscordClient) Init() error {
var err error
c._events = make(chan bool)
if c.commandPrefix == "" {
c.commandPrefix = "f!"
}
if c.APIKey == "" {
log.Fatalf("A... |
/*
Gluon - BOSH / CF Orchestration via Kuberenetes API(s)
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... |
package command
import (
"fmt"
"github.com/alecthomas/kingpin"
"github.com/echocat/kubor/common"
"github.com/echocat/kubor/kubernetes"
"github.com/echocat/kubor/model"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/dynamic"
"time"
)
func init() {
time... |
/*
* Copyright 2021 InfAI (CC SES)
*
* 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... |
// Copyright 2019 SpotHero
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
/***
Copyright 2021 Cisco Systems 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... |
// Copyright (C) 2017 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... |
// Copyright 2017 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, ... |
package config
import (
"os"
"path"
"path/filepath"
"strings"
"github.com/aws/aws-sdk-go-v2/aws"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
)
var (
config = &Config{}
workingDir string
err error
)
const (
appName = "REKA"
)
type ExcludeRule struct {
Name string
Region ... |
package img
import (
"crypto/sha256"
"encoding/binary"
"image"
"math"
"os"
_ "image/gif" // registers gif encoding
_ "image/jpeg" // registers jpg encoding
_ "image/png" // registers png encoding
_ "golang.org/x/image/tiff" // registers tiff encodign
log "github.com/sirupsen/logrus"
)
// FingerPrinter ... |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed ... |
package bencoding
import (
"fmt"
"github.com/oleiade/lane"
"strconv"
"unicode/utf8"
)
type ContainerType int
const (
ContainerBString ContainerType = iota
ContainerInteger
ContainerList
ContainerDict
)
type Container struct {
Type ContainerType
BString []byte
Integer int
List *[]Container
Dict ... |
package control
import (
"fmt"
"log"
"os"
"strconv"
"time"
"../orders/"
. "../utilities/"
)
const debugElevatorControl = false
func MessageLoop(
newOrder chan bool,
buttonChannel chan ElevatorButton,
lightChannel chan ElevatorLight,
motorChannel chan int,
floorChannel chan int,
broadcastOrderChannel ch... |
// Copyright(C) 2021 github.com/fsgo All Rights Reserved.
// Author: fsgo
// Date: 2021/7/31
package fsnet
import (
"context"
"net"
"time"
"github.com/fsgo/fsgo/fsnet/internal"
)
// DialerType dial connWithIt type
type DialerType interface {
DialContext(ctx context.Context, network string, address string) (ne... |
// Copyright (c) 2012-2016 <NAME>
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
// Some parts from go-std-lib/src/net/http/fs.go
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be... |
package http
import (
"log"
"net/http"
"github.com/upframe/shopy"
"github.com/gorilla/mux"
)
// Serve ...
// TODO: definately move this function to CMD
func Serve(c *shopy.Config) {
r := mux.NewRouter()
r.NotFoundHandler = ¬FoundHandler{Config: c}
r.PathPrefix("/static/").Handler(http.StripPrefix("/stati... |
// Copyright (c) 2018 <NAME> <<EMAIL>>
// MIT Licence - http://opensource.org/licenses/MIT
/*
Workflow reading-list is a more advanced example of fuzzy filtering.
It contains a custom implementation of fuzzy.Sortable and its own filtering
function to keep books sorted by unread/unpublished/read status.
Regular fuzzy... |
package model
// OverlordReq .
type OverlordReq struct {
Name string `json:"name" form:"name"`
Zone string `json:"zone" form:"zone"`
Type string `json:"type" form:"type"`
Alias string `json:"alias" form:"alias"`
Addr string `json:"addr" form:"addr"`
AppID string `json:"appid" form:"appid"`
PN int `form:"pn... |
package extended
import (
"fmt"
"github.com/jadeydi/jubjub/pkg/jubjub/affine"
"github.com/jadeydi/jubjub/pkg/jubjub/fq"
)
type ExtendedPoint struct {
u, v, z, t1, t2 *fq.Fq
}
func FromBytes(byt []byte) *ExtendedPoint {
a := affine.FromBytesInner(byt)
return &ExtendedPoint{
u: a.U,
v: a.V,
z: fq.One()... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.