text
stringlengths
3.08k
10.4k
package models import ( "encoding/json" "errors" "fmt" "io/ioutil" "log" math "math" "os" "reflect" "strconv" ) type Geometry struct { Type string `json:"type" bson:"type"` BoundingBox []float64 `json:"bbox,omitempty" bson:"bbox,omitempty"` Coordinates interface{} ...
// geohash.go // Geohash library for Golang // Ported from <NAME>'s geohash-js library (https://github.com/davetroy/geohash-js) // (c) <NAME> 2014 // Distributed under the MIT License package geohash import ( "bytes" "strings" ) var ( bits = []int{16, 8, 4, 2, 1} base32 = []byte("0123456789bcdefghjkmnpqr...
package main import ( "errors" "fmt" "strings" "sync" "time" "gopkg.in/mgo.v2" ) const ( MongoServerPrefix = "mongodb://" MongoServerPlaceholder = "%mongo_server%" ) func main() { initializeMongoSessions() time.Sleep(time.Hour) } func formatConnectString(server, cs string, withPwd bool) string { /...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package transcribe import ( "context" "time" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type CreateMedicalVocabularyInput struct { _ struct{} `type:"structure"` // The language code used for the ent...
// Copyright 2021 ETH Zurich // // 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 2018 The Service Manager 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 l...
// Copyright 2019 The Fuchsia 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 tftp import ( "bytes" "context" "encoding/binary" "fmt" "io" "math" "net" "sync" ) // Client is used to Read or Write files to/from a TFT...
// Copyright 2021 Telefonica Cybersecurity & Cloud Tech SL // // 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 appli...
/* Package xpath provides tree walking for the DOM with XPath syntax. BSD License Copyright (c) 2017–20, <NAME> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must ...
package hsts import ( "net/http" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestIsPreloaded(t *testing.T) { for _, host := range []string{ //"very.long.domain.name.tomthorogood.uk", //"www.tomthorogood.uk", //"tomthorogood.uk", "tmthrgd.dev", "dev", ...
// Package header implements loading structs into http.Headers. // // As a simple example: // // type Options struct { // IfMatch string `header:"if-match"` // RetryToken string `header:"retry-token"` // } // // opt := Options{ "<KEY>", "my-custom-token" } // req, _ := http.NewRequest(http.MethodGet, url, nil...
package gocbcore import ( "sync" ) type configManagementComponent struct { useSSL bool networkType string currentConfig *routeConfig cfgChangeWatchers []routeConfigWatcher watchersLock sync.Mutex srcServers []string seenConfig bool } type configManagerProperties struct { UseSSL bool Net...
package main import ( "auctionBidder/cli" "auctionBidder/client" "auctionBidder/utils" "auctionBidder/web3" "encoding/json" "fmt" "github.com/davecgh/go-spew/spew" "github.com/shopspring/decimal" "github.com/sirupsen/logrus" "io/ioutil" "os" ) func main() { var err error defer func() { if err != nil { ...
// Copyright 2018 <NAME>. 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...
package main import ( "fmt" "log" "os" "path/filepath" "time" "github.com/grafov/m3u8" "github.com/nareix/joy4/av" "github.com/nareix/joy4/format/ts" "github.com/pkg/errors" ) type Application struct { HlsMsPerSegment int64 `json:"hls_ms_per_segment"` HlsDirectory string `json:"hls_directory"` HlsWin...
package zgeo import ( "github.com/torlangballe/zutil/zbool" ) type Alignment int32 const ( Left Alignment = 1 << iota Right Top HorCenter VertCenter Bottom HorExpand VertExpand HorShrink VertShrink HorOut VertOut Proportional MarginIsOffset // MarginIsOffset is a special flag used to offset a center ...
package main import ( "flag" "fmt" "io/ioutil" "os" "strconv" "strings" "time" "github.com/dliberat/advent-of-code-2019/intcode" ) type position struct { x int y int } func str2int(str string) []int { txt := strings.Split(str, "\n") retval := make([]int, 0) for _, t := range txt { n, err := strconv.A...
/* Copyright (c) 2021 Red Hat, 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, software...
package hsig0 // this is based on miekg dns sig0 but supports non standard BLAKE2bSECP256K1 with PRIVATEEDNS (algo code 253) // checkout https://github.com/miekg/dns/blob/master/sig0.go // for standard algorithm types import ( "crypto" "encoding/base32" "encoding/binary" "errors" "fmt" "github.com/decred/dcrd/d...
package user import ( "context" "encoding/json" "errors" "fmt" "net/http" "strconv" "time" "github.com/factly/kavach-server/model" "github.com/factly/kavach-server/util" "github.com/factly/kavach-server/util/email" "github.com/factly/x/errorx" "github.com/factly/x/loggerx" "github.com/factly/x/renderx" ...
package yaml import ( "encoding/base64" "errors" "fmt" "github.com/farmersedgeinc/yaml-crypt/pkg/cache" "gopkg.in/yaml.v3" "io" "os" ) const ( EncryptedTag = "!encrypted" DecryptedTag = "!secret" ) // these relations need to be stored to produce "paths" for encrypted values, which is needed for encrypted it...
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package v1 import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this method to create a connection profi...
package gid import ( "sync" ) /* ================================================================================ * id generator buffer * qq group: 582452342 * email : <EMAIL> * author : 美丽的地球啊 - mliu * ================================================================================ */ type ( /* ++++++++++...
/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copy...
package main import ( "context" "flag" "io" "log" "net/http" "strconv" "time" "cloud.google.com/go/storage" "github.com/gorilla/mux" "google.golang.org/api/option" ) var ( bind = flag.String("b", "127.0.0.1:8080", "Bind address.") credentials = flag.String("c", "", "The path to the keyfile. If...
package visjs import ( "fmt" "log" "github.com/neo4j/neo4j-go-driver/neo4j" ) type ( Node struct { Borderwidth float64 `json:"borderwidth,omitempty"` Borderwidthselected float64 `json:"borderwidthselected,omitempty"` Color string `json:"color,omitempty"` Opacity float64...
package car import ( "fmt" "io" blocks "github.com/ipfs/go-block-format" "github.com/ipfs/go-cid" "github.com/ipld/go-car/v2/internal/carv1" "github.com/ipld/go-car/v2/internal/carv1/util" internalio "github.com/ipld/go-car/v2/internal/io" ) // BlockReader facilitates iteration over CAR blocks for both CARv1 ...
package pickett import ( "bytes" "errors" "fmt" "strings" "testing" "time" "code.google.com/p/gomock/gomock" "github.com/igneous-systems/pickett/io" ) func setupForDontBuildBletch(controller *gomock.Controller, helper *io.MockHelper, cli *io.MockDockerCli, etcd *io.MockEtcdClient) *Config { setupForExampl...
package project import ( // HOFSTADTER_START import "fmt" "os" "path/filepath" "strings" "github.com/pkg/errors" "github.com/ryanuber/go-glob" "github.com/hofstadter-io/geb/engine/dsl" "github.com/hofstadter-io/geb/engine/gen" "github.com/hofstadter-io/geb/engine/utils" // HOFSTADTER_END import ) /* N...
package pipelineascode import ( "context" "fmt" "path/filepath" "strconv" "sync" "time" apipac "github.com/openshift-pipelines/pipelines-as-code/pkg/apis/pipelinesascode" "github.com/openshift-pipelines/pipelines-as-code/pkg/formatting" "github.com/openshift-pipelines/pipelines-as-code/pkg/kubeinteraction" ...
package filter import ( "regexp" "unicode" "../../errors" "../../objects/strings" "../../runtime" "github.com/microcosm-cc/bluemonday" ) func SentenceMaxWords(text string, max int) string { if getSentenceMaxWords(text) > max { return "" } else { return text } } func getSentenceMaxWords(text string) int...
package constant // Main types list. const ( AnimeType = "anime" MangaType = "manga" CharacterType = "character" PeopleType = "people" ) // MainTypes is list of available entry types. var MainTypes = []string{AnimeType, MangaType, CharacterType, PeopleType} // Types is list of anime & manga type optio...
package instance_controller import ( "context" "github.com/google/uuid" crownlabsv1alpha2 "github.com/netgroup-polito/CrownLabs/operators/api/v1alpha2" "github.com/netgroup-polito/CrownLabs/operators/pkg/instance-creation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" "time...
package types import ( "context" "time" "go.skia.org/infra/go/gerrit" "go.skia.org/infra/skcq/go/config" ) // ThrottlerManager is used to manage the rate of commits. type ThrottlerManager interface { // Throttle looks at the specified commit time and determines if the // commit should be blocked because it vio...
//go:generate $GOPATH/src/istio.io/istio/bin/mixer_codegen.sh -f mixer/adapter/turbo/config/config.proto -x "-n turbo -t metric" package turbo import ( "context" "fmt" "os" "istio.io/istio/mixer/adapter/turbo/config" "istio.io/istio/mixer/adapter/turbo/discovery" "istio.io/istio/mixer/pkg/adapter" "istio.io/ist...
package pac import ( "fmt" "math" "time" "wkla.no-ip.biz/remote-desk-service/api" "wkla.no-ip.biz/remote-desk-service/pkg/audio" "wkla.no-ip.biz/remote-desk-service/pkg/models" ) var parameterDeviceName = "device" var parameterCommandName = "command" // AudioVolumeCommandTypeInfo switch to anot...
// // fountainfmt pretty prints a fountain file. // // // fountain is a package encoding/decoding fountain formatted screenplays. // // @author <NAME>, <<EMAIL>> // // BSD 2-Clause License // // Copyright (c) 2019, <NAME> // All rights reserved. // // Redistribution and use in source and binary forms, with or without /...
package main import ( "bufio" "context" "fmt" cfg "github.com/nj-eka/gobe1/chat/chatsrv/config" "log" "net" "os" "os/signal" "strconv" "sync" ) const ( csReset = "\033[0m" csBold = "\033[1m" csUnderline = "\033[4m" csRed = "\033[31m" csGreen = "\033[32m" csYellow = "\033[33m" csBlue = "\033[34m"...
package main import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "os" "github.com/bitrise-io/go-steputils/stepconf" "github.com/bitrise-io/go-utils/log" ) // Config object containing all configurations set in bitrise type Config struct { Debug bool `env:"is_debug_mode,opt[yes,no]"` // Message W...
package router import ( "fmt" "strings" "github.com/futurehomeno/fimpgo" "github.com/maverich/corona-ad/model" log "github.com/sirupsen/logrus" ) type FromFimpRouter struct { inboundMsgCh fimpgo.MessageCh mqt *fimpgo.MqttTransport instanceId string appLifecycle *model.Lifecycle configs *mod...
package prometheus import ( "context" "sync" "time" exporter "github.com/kawamuray/prometheus-kafka-consumer-group-exporter" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" log "github.com/sirupsen/logrus" ) var ( partitionOffsetMetricsDesc = prometheus.NewDesc( ...
package route import ( "app/conf" "app/controller" "app/fragment" "github.com/alecthomas/log4go" "github.com/astaxie/beego/session" "net" "net/http" "path" "strconv" "strings" "time" ) var server *http.Server func new_render_args(w http.ResponseWriter, r *http.Request) *fragment.RenderAr...
/* Copyright (c) 2021 Nordix Foundation 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, so...
/* * Copyright (c) 2018-2019 <NAME>, All rights reserved * Copyright (c) 2019 Sylabs, Inc. All rights reserved * This software is licensed under a 3-clause BSD license. Please consult the * LICENSE.md file distributed with the sources of this project regarding your * rights to use or distribute this software. */ ...
/* Apache v2 license * Copyright (C) <2019> Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ package event import ( "bytes" "encoding/base64" "encoding/json" "fmt" "io/ioutil" "net/http" "strconv" "time" "github.com/intel/rsp-sw-toolkit-im-suite-inventory-service/app/alert" "github.com/intel...
package schema import ( "bytes" "fmt" "reflect" "strings" ) // Field is the data structure that stores data about a single struct field type Field struct { Name string Type string Tags map[string]string ReflectObjType *reflect.StructField ReflectObjValue *reflect.Value Tabl...
package requestgenerators import ( "bufio" "bytes" "errors" "fmt" "io" "io/ioutil" "os" "regexp" "sync" jsoniter "github.com/json-iterator/go" log "github.com/sirupsen/logrus" "github.com/v3io/http_blaster/httpblaster/config" ) //RestoreGenerator : RestoreGenerator generator type RestoreGenerator struct ...
// Package lg provides looking glass methods for selected looking glasses // Level3 Carrier Looking Glass ASN 3356 package lg import ( "bufio" "errors" "html" "io/ioutil" "net/http" "net/url" "regexp" "sort" "strings" ) const ( level3LGURL = "http://lookingglass.level3.net" level3LGPing = "/ping/lg_ping...
// Command "demo-client" is a demonstration of the "roxyresolver" and // "atcclient" libraries. // package main import ( "io" "time" getopt "github.com/pborman/getopt/v2" "github.com/rs/zerolog/log" "google.golang.org/grpc" "github.com/chronos-tachyon/roxy/lib/atcclient" "github.com/chronos-tachyon/roxy/lib/m...
package service import ( "encoding/json" "fmt" "io/ioutil" "log" "nacos-prometheus-discovery/httputil" "nacos-prometheus-discovery/model" "os" "strconv" "strings" ) func FetchPrometheusConfig(config model.Config) { targetFilePath := config.TargetFilePath nacosHost := config.NacosHost namespaceId := config...
package usb import ( "errors" "io/ioutil" "os" "path/filepath" "strconv" "github.com/apex/log" "github.com/pzl/usb/gusb" ) /* ---------- Descriptors to library-native objects ---------- */ func toDevice(dd gusb.DeviceDescriptor) *Device { var err error vid := uint16(dd.Vendor) pid := uint16(dd.Product) ...
package construct import ( "bytes" "fmt" "go/ast" "sort" "strings" "time" "github.com/azhai/gozzo-db/rewrite" "github.com/azhai/gozzo-utils/common" "github.com/azhai/gozzo-utils/filesystem" ) /** * 时间相关的三个典型字段 */ type TimeModel struct { CreatedAt time.Time `json:"-" gorm:"comment:'创建时间'"` // 创建时间 ...
package cedar import ( "bytes" "container/list" "io/ioutil" ) const ( // TokenBufferSize size of match token buffer TokenBufferSize = 4096 // MatchBufferSize size of match position buffer MatchBufferSize = 4096 ) // Matcher Aho Corasick Matcher type Matcher struct { da *Cedar output []outNode fails...
package mixpanel import ( "crypto/md5" "encoding/json" "fmt" "github.com/nu7hatch/gouuid" "io" "net/http" "net/url" "sort" "strings" "time" ) // The official base URL const MixpanelBaseURL = "https://data.mixpanel.com/api/2.0/export" // Key into the EventData map that contains the UUID of this event. Name ...
// Copyright © 2015 Clement 'cmc' Rey <<EMAIL>>. // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. package mmm import ( "fmt" "reflect" "runtime" "syscall" "unsafe" ) // ----------------------------------------------------------------------------- // Er...
package tests import ( "context" "crypto/ecdsa" "errors" "fmt" libp2pCrypto "github.com/libp2p/go-libp2p-core/crypto" "github.com/libp2p/go-libp2p-core/peer" "github.com/multiformats/go-multiaddr" "net" "testing" "time" "github.com/0xPolygon/polygon-edge/crypto" txpoolOp "github.com/0xPolygon/polygon-edge...
// Copyright 2019 NetApp, Inc. All Rights Reserved. package cmd import ( "fmt" "os" "time" "github.com/cenkalti/backoff/v4" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" persistentstore "github.com/netapp/trident/persistent_store" ) var ( // CLI flags migrateDryRun bool k8sAPIServer string ...
package article import ( "context" "fmt" "log" "sort" articlesim "github.com/devchallenge/article-similarity/internal" ) type Similarity interface { IsSimilar(idA int, contentA string, idB int, contentB string) bool Similarity(idA int, contentA string, idB int, contentB string) float64 } type Storage interfa...
package processor import ( "context" "time" "github.com/pkg/errors" "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus" "github.com/chef/automate/api/interservice/authz" "github.com/chef/automate/components/ingest-service/backend" "github.com/chef/automate/components/ingest-service/pipeline/message...
/* provides the zLog programming interface to the Go language. Copyright (C) 2020 JA1ZLO. */ package main import ( "bufio" _ "embed" "math" "github.com/faiface/beep/speaker" "strings" "os" "time" ) var ( calls [1000]string nowcall string callall int answer bool ) //go:embed cwtrainer.dat var cityMult...
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
package utils import ( "fmt" "regexp" "sort" "strconv" "strings" ) const ( issueNumberBlockRegexpTemplate = "(?i)%s\\s*%s(?P<issue_number>[1-9]\\d*)" associatePrefixRegexp = "(?P<associate_prefix>ref|close[sd]?|resolve[sd]?|fix(e[sd])?)" orgRegexp = "[a-zA-Z0-9][a-zA-Z0-9-]{0,...
package main import ( "bytes" "flag" "fmt" "io/ioutil" "os" "strconv" ) var debug bool func debugPrint(args interface{}) { if debug { fmt.Println(args) } } func readProgram(inputFilename string) []int { data, err := ioutil.ReadFile(inputFilename) if err != nil { fmt.Println("File reading error", err) ...
// @author Couchbase <<EMAIL>> // @copyright 2018 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 requir...
package parser import ( "fmt" "io" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/descriptorpb" "github.com/jhump/protocompile/ast" "github.com/jhump/protocompile/reporter" ) //go:generate goyacc -o proto.y.go -p proto proto.y func init() { protoErrorVerbose = true // fix up the gene...
package dingtalk import ( "bytes" "crypto/aes" "crypto/cipher" "crypto/sha1" "encoding/base64" "encoding/binary" "errors" "fmt" "github.com/selinplus/go-dingtalk/pkg/util" "sort" ) const ( AES_ENCODE_KEY_LENGTH = 43 ) type DingTalkCrypto struct { Token string EncodingAESKey string SuiteKey ...
package servicetest import ( "encoding/json" "fmt" "io" "math" "sort" "strings" service "github.com/shabbyrobe/go-service" ) func fuzzOutput(method string, name string, stats *FuzzStats, w io.Writer) { var err error stats = stats.Clone() switch method { case "json": err = fuzzOutputJSON(name, stats, w) ...
package jobs import ( "context" "encoding/json" "fmt" "reflect" "sync" "time" "github.com/lib/pq" "go.uber.org/zap" "github.com/conservify/sqlxcache" "github.com/fieldkit/cloud/server/common/logging" ) type PgJobQueue struct { db *sqlxcache.DB metrics *logging.Metrics name string listener...
/* Copyright 2021 The Crossplane 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 models import ( "fmt" "github.com/jinzhu/gorm" uuid "github.com/satori/go.uuid" "time" u "github.com/api-projet/utils" "github.com/lib/pq" ) //a struct to rep user account type Vote struct { gorm.Model UUID string `json:"uuid" gorm:"primary_key"` Title string `json:"title"` Description stri...
package main import ( "bufio" "encoding/hex" "fmt" "log" "os" "strconv" "strings" ) func main() { lines := readFile("input.txt") validPassports := 0 for _, potentialPassport := range lines { if IsValidPassport(potentialPassport) { validPassports++ } } fmt.Printf("There are %d valid passports\n", v...
package main /** This generator takes a v4 file and infers a hierarchy from the code in the label. */ import ( "context" "flag" "os" "encoding/csv" "github.com/ONSdigital/dp-hierarchy-builder/cypher" "github.com/ONSdigital/dp-hierarchy-builder/gremlin" "github.com/ONSdigital/dp-hierarchy-builder/hierarchy" ...
package gittest import ( "bytes" "fmt" "os" "path/filepath" "testing" "github.com/stretchr/testify/require" "gitlab.com/gitlab-org/gitaly/v14/internal/git" "gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/config" "gitlab.com/gitlab-org/gitaly/v14/internal/helper/text" "gitlab.com/gitlab-org/gitaly/v14/prot...
// +build linux package hcsv2 import ( "encoding/json" "os/exec" "strconv" "sync" "syscall" "github.com/Microsoft/opengcs/internal/network" "github.com/Microsoft/opengcs/service/gcs/gcserr" "github.com/Microsoft/opengcs/service/gcs/prot" "github.com/Microsoft/opengcs/service/gcs/runtime" "github.com/Micros...
package exporter import ( "encoding/json" "io/ioutil" "net/http" "strconv" "time" "github.com/kenfdev/remo-exporter/config" authHttp "github.com/kenfdev/remo-exporter/http" "github.com/kenfdev/remo-exporter/log" "github.com/kenfdev/remo-exporter/types" ) const ( maxServicesAPI = 10 ) // RemoGatherer gathe...
package main import ( "encoding/json" "fmt" "os" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/filter" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/session" "github.com/softlayer/softlayer-go/sl" ) // Create the session and services var se...
package twirp import ( "context" "crypto/tls" "net/http" "github.com/google/uuid" "github.com/sschwartz96/syncapod-backend/internal/auth" "github.com/sschwartz96/syncapod-backend/internal/db" protos "github.com/sschwartz96/syncapod-backend/internal/gen" "github.com/twitchtv/twirp" "golang.org/x/crypto/acme/a...
package strategies import ( "errors" "fmt" "sync" "time" "github.com/netrixframework/netrix/apiserver" "github.com/netrixframework/netrix/config" "github.com/netrixframework/netrix/context" "github.com/netrixframework/netrix/dispatcher" "github.com/netrixframework/netrix/log" "github.com/netrixframework/net...
// Copyright 2019 ETH Zurich // // 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 (c) 2019, The Emergent 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 gabor provides a gabor filter for visual and other forms of signal processing */ package gabor import ( "math" "github.com/emer/etable...
package crm import ( "net/url" "github.com/bububa/opentaobao/model" ) /* 获取卖家会员(高级查询) APIRequest taobao.crm.members.search 会员列表的高级查询,接口返回符合条件的会员列表.<br><br/>注:建议获取09年以后的数据,09年之前的数据不是很完整 */ type TaobaoCrmMembersSearchRequest struct { model.Params // 买家昵称 buyerNick string // 会员等级 grad...
package main import ( "bufio" "flag" "fmt" "io" "os" "regexp" "sort" "strings" ) const ( funcName = "funcname" function = "function" funcStart = "funcstart" funcEnd = "funcend" ignoreLine = "ignoreline" ) var cRE = map[string]*regexp.Regexp{ function: regexp.MustCompile(`^(?:static )?\w+(?: \...
package chromedp import ( "context" "net/url" "strings" "sync" "time" "github.com/WabisabiNeet/CollectSuperChat/log" "github.com/chromedp/cdproto/cdp" "github.com/chromedp/cdproto/network" "github.com/chromedp/chromedp" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" ) const ( liveStreamCh...
// 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 IBM Corporation 2020. 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 ap...
package material import ( "image" "image/color" "gioui.org/layout" "gioui.org/op" "gioui.org/op/clip" "gioui.org/op/paint" "gioui.org/text" "gioui.org/unit" "gioui.org/widget" "gioui.org/widget/material" hrw "github.com/huckridgesw/gio-widgets/widget" "golang.org/x/exp/shiny/materialdesign/icons" ) type ...
// Copyright (c) 2017 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
// Package fd35 implements a generic 3.5" floppy disk drive. package fd35 import ( "fmt" "io/ioutil" "log" "os" "sync" "time" "github.com/hexaflex/svm/devices" "github.com/hexaflex/svm/devices/fffe/cpu" ) // These values define floppy disk and drive properties. const ( TrackCount = 80 SectorsPerTra...
package chainhotstuff import ( "container/list" "github.com/gogo/protobuf/proto" "github.com/ibalajiarun/go-consensus/peer" "github.com/ibalajiarun/go-consensus/peer/peerpb" "github.com/ibalajiarun/go-consensus/pkg/command/commandpb" "github.com/ibalajiarun/go-consensus/pkg/logger" "github.com/ibalajiarun/go-c...
package xlogrus import ( "github.com/Aoi-hosizora/ahlib/xtesting" "github.com/sirupsen/logrus" "runtime" "strings" "testing" "time" ) func TestSimpleFormatter(t *testing.T) { l := logrus.New() l.SetLevel(logrus.TraceLevel) sb := &strings.Builder{} l.SetOutput(sb) for _, tc := range []struct { giveFmt ...
// Package omh implements converter tooling from Obsidian to Hugo package omh import ( "bytes" "fmt" "io" "io/ioutil" "os" "path/filepath" "regexp" "strings" log "github.com/sirupsen/logrus" "gopkg.in/yaml.v2" ) // ConvertName makes a name link-suitable type ConvertName func(name string) (link string) // ...
package observability import ( "time" "go.opencensus.io/stats" "go.opencensus.io/stats/view" "go.opencensus.io/tag" ) // Pool metrics: // 1. Connections taken // 2. Connections closed // 3. Connections usetime -- how long is a connection used until it is closed, discarded or returned // 4. Connections reused // ...
package main import ( "net/url" "os" "time" "github.com/aws/aws-sdk-go-v2/aws/awserr" "github.com/aws/aws-sdk-go-v2/aws/external" "github.com/aws/aws-sdk-go-v2/service/autoscaling" rabbithole "github.com/michaelklishin/rabbit-hole" "github.com/prometheus/client_golang/prometheus" ) func scaleRunner() { //Au...
package pseudo import ( "fmt" "regexp" "sort" "strconv" "strings" "time" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/object" "go.uber.org/zap" "golang.org/x/mod/semver" "github.com/modularise/modularise/cmd/config" ) type ProxyModuleInfo struct { Version string `json:...
package main // Reference // https://github.com/open-cluster-management/rbac-query-proxy/blob/release-2.3/cmd/main.go // https://github.com/valyala/fasthttp/issues/64 // Test: // curl --verbose --cert /opt/appmesh/ssl/client.pem --key /opt/appmesh/ssl/client-key.pem --cacert /opt/appmesh/ssl/ca.pem https://localhost:...
// Copyright Contributors to the Open Cluster Management project package apply import ( "fmt" "io/ioutil" "os" "path/filepath" "time" "github.com/spf13/cobra" "github.com/spf13/pflag" "k8s.io/cli-runtime/pkg/genericclioptions" "github.com/ghodss/yaml" "github.com/open-cluster-management/library-go/pkg/ap...
package types import ( "fmt" "os" "strconv" "strings" "time" "github.com/alibaba/pouch/pkg/bytefmt" "github.com/alibaba/pouch/storage/volume/types/meta" "github.com/pborman/uuid" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" ) func translateSelector(k, v string) SelectorRequirement ...
package main import ( "gioui.org/f32" "gioui.org/font/gofont" "gioui.org/io/key" "gioui.org/io/pointer" "gioui.org/layout" "gioui.org/op" "gioui.org/op/paint" "gioui.org/unit" "gioui.org/widget/material" "github.com/rs/xid" "github.com/wrnrlr/wonderwall/wonder/shape" "github.com/wrnrlr/wonderwall/wonder/ui...
package generator import ( "fmt" "image" "image/jpeg" "math" "os" "runtime" "sync" "github.com/saesh/mandelbrot/pkg/colors" ) // Coordinate holds real number 'Re', imaginary number 'Im' and corresponding pixel index type Coordinate struct { Re float64 Im float64 index int } // Mandelbrot defines th...
// Copyright 2020 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Package assistant supports interaction with Assistant service. package assistant import ( "context" "path/filepath" "chromiumos/tast/errors" "...