text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (m Metadata) ManagedFields() []interface{} {
items, ok := m["managedFields"]
if !ok {
return make([]interface{}, 0)
}
list, ok := items.([]interface{})
if !ok {
return make([]interface{}, 0)
}
return list
} | [
-0.5217600464820862,
0.4590452015399933,
0.31512174010276794,
-0.13037914037704468,
0.8997287750244141,
-0.43872734904289246,
-0.06947403401136398,
-0.34023499488830566,
0.7906936407089233,
-0.2174251675605774,
-0.6131302714347839,
0.08396361023187637,
-0.942720890045166,
0.181607499718666... |
func (m List) String() string {
buf := bytes.Buffer{}
enc := yaml.NewEncoder(&buf)
for _, d := range m {
if err := enc.Encode(d); err != nil {
// This should never happen in normal operations
panic(errors.Wrap(err, "formatting manifests"))
}
}
return buf.String()
} | [
0.3971951901912689,
-0.9225559830665588,
0.01817401312291622,
0.04524857550859451,
-0.5405884981155396,
-0.1959930956363678,
-0.705659806728363,
0.06705210357904434,
0.025060148909687996,
0.41611722111701965,
-0.03895873948931694,
0.32184848189353943,
0.15612123906612396,
1.156398177146911... |
func NewPostgresqlServerLister(indexer cache.Indexer) PostgresqlServerLister {
return &postgresqlServerLister{indexer: indexer}
} | [
-0.8683751225471497,
-0.2790543735027313,
0.13045218586921692,
0.6762873530387878,
-1.1906074285507202,
0.18741990625858307,
-0.6235426068305969,
-0.4822923243045807,
0.31853657960891724,
0.3022555112838745,
-0.903186559677124,
0.34198713302612305,
-0.18589816987514496,
1.031911849975586,
... |
func (s *postgresqlServerLister) List(selector labels.Selector) (ret []*v1alpha1.PostgresqlServer, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.PostgresqlServer))
})
return ret, err
} | [
-1.3595521450042725,
-0.21951548755168915,
0.063400499522686,
0.05038105696439743,
0.5236135721206665,
-0.11155344545841217,
-0.24574047327041626,
-0.2833825647830963,
-0.14026091992855072,
0.6117327809333801,
-0.7027825117111206,
0.6944085359573364,
-0.677639901638031,
0.7191890478134155,... |
func (s *postgresqlServerLister) PostgresqlServers(namespace string) PostgresqlServerNamespaceLister {
return postgresqlServerNamespaceLister{indexer: s.indexer, namespace: namespace}
} | [
-0.1053275614976883,
-0.0014316777233034372,
0.3773055970668793,
-0.79375821352005,
-0.8665461540222168,
0.36779385805130005,
-1.269200086593628,
-1.0650434494018555,
1.299910545349121,
-0.6673612594604492,
-0.8766226768493652,
0.4329909682273865,
-0.5759734511375427,
0.43902188539505005,
... |
func (s postgresqlServerNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.PostgresqlServer, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.PostgresqlServer))
})
return ret, err
} | [
-0.8614721298217773,
-0.3016267716884613,
0.09605323523283005,
-0.14995722472667694,
0.21053628623485565,
0.009033726528286934,
-0.6183866858482361,
-0.8222930431365967,
0.2408166378736496,
0.6269994378089905,
-0.84345942735672,
0.6394302248954773,
-0.9863152503967285,
1.478040099143982,
... |
func (s postgresqlServerNamespaceLister) Get(name string) (*v1alpha1.PostgresqlServer, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("postgresqlserver"), name)
}
return obj.(*v1alpha1.Po... | [
-0.9231653809547424,
-0.051051948219537735,
0.3285054564476013,
-0.6907262206077576,
0.02199792116880417,
0.183798149228096,
-0.8819805979728699,
-0.947265088558197,
0.06677773594856262,
0.4441804587841034,
-0.403590589761734,
0.8410077095031738,
-1.0829278230667114,
0.6352031826972961,
... |
func Init(dumpfile string) *JTStorage {
s := &JTStorage{
l: sync.Mutex{},
data: map[string]Item{},
}
if dumpfile != "" {
dump = dumpfile
s.loadDump(dump)
}
return s
} | [
-0.034586139023303986,
0.6391549706459045,
0.46020475029945374,
-0.944115400314331,
-1.3367586135864258,
0.07250302284955978,
0.0005573118105530739,
-0.023875443264842033,
-0.0619359016418457,
-0.3267032504081726,
-0.47377637028694153,
-0.4071764349937439,
0.4047437310218811,
0.10749281942... |
func web(w http.ResponseWriter, r *http.Request) {
if r.Method == "GET" {
t, _ := template.ParseFiles("index.html")
err := t.Execute(w, nil)
if err != nil {
log.Println("[ERROR] Template Execute : ", err)
}
}
} | [
0.056433554738759995,
-0.0185302272439003,
0.8937363624572754,
1.3886663913726807,
0.576268196105957,
0.0714697316288948,
0.9541949033737183,
0.09624343365430832,
-1.0229517221450806,
-0.039412450045347214,
0.7085871696472168,
-0.3770362436771393,
-0.009244437329471111,
-0.2564474940299988... |
func StartListener() {
// router := http.NewServeMux()
router := mux.NewRouter()
// Operations related to given board -> blocks (Update, Delete)
router.Handle("/board/{boardID}/block/{blockID}", UpdateBlockHandler).Methods(http.MethodPut)
router.Handle("/board/{boardID}/block/{blockID}", DeleteBlockHandler).Metho... | [
0.5622478723526001,
-0.052093397825956345,
1.0293421745300293,
0.462322473526001,
-0.3571244180202484,
-0.37896233797073364,
0.7253270745277405,
0.2978632152080536,
-0.13225790858268738,
0.17745168507099152,
0.12347474694252014,
-0.0763574093580246,
-0.2504092752933502,
1.152992844581604,
... |
func Match(pathGlob string) (map[string]string, error) {
out := make(map[string]string)
basedir := filepath.Dir(pathGlob)
err := filepath.Walk(basedir, func(path string, f os.FileInfo, err error) error {
if err != nil {
return err
}
if basedir == path {
// Ignore basedir
return nil
}
match, err :... | [
0.2527385950088501,
-0.09227089583873749,
0.8732657432556152,
0.01752367429435253,
-1.1029428243637085,
0.6074666976928711,
0.8977758884429932,
-0.20588624477386475,
-0.5065208077430725,
0.6237419843673706,
-0.5645807385444641,
-0.6318552494049072,
-0.427861750125885,
0.33953508734703064,
... |
func KMToDBPath(dir string, km *km.KeyManager) (string, error) {
idPubKey, err := km.IdentityPublicKey()
if err != nil {
return "", err
}
return filepath.Abs(filepath.Join(dir, idPubKey+".db"))
} | [
0.017414772883057594,
0.06397554278373718,
0.5953123569488525,
1.0639677047729492,
-1.0211063623428345,
1.2337865829467773,
-0.30315569043159485,
0.2982885241508484,
-0.1405872255563736,
1.175912618637085,
-0.22021320462226868,
-0.2636788487434387,
-1.239614486694336,
0.9117725491523743,
... |
func drawContours(img gocv.Mat, dst gocv.Mat) {
hierarchy := gocv.NewMat()
contours := gocv.FindContoursWithParams(img, &hierarchy, gocv.RetrievalTree, gocv.ChainApproxSimple)
println(hierarchy.Type().String())
hierarchyDims := hierarchy.Size()
counter := 0
var hierarchyMatrix [][]int32
for j := 0; j < hierarch... | [
0.07561339437961578,
0.2544618844985962,
0.972986102104187,
0.05163409188389778,
-0.0783810093998909,
0.4238935112953186,
0.8390253186225891,
0.330319344997406,
0.358223557472229,
0.09395107626914978,
-0.19996114075183868,
0.1193103939294815,
0.4124152958393097,
0.4001971483230591,
-0.02... |
func TaskFmt() taskflow.Task {
return taskflow.Task{
Name: "fmt",
Description: "go fmt",
Command: taskflow.Exec("go", "fmt", "./..."),
}
} | [
0.034249935299158096,
-0.16443683207035065,
0.5102782845497131,
-0.026630084961652756,
0.21064960956573486,
-0.23320125043392181,
0.15217675268650055,
0.1676679104566574,
-0.6252498626708984,
-0.020205631852149963,
-0.2560446560382843,
0.438483864068985,
-0.04903639480471611,
0.69298237562... |
func uniaryInsert(client pbclient.MySpannerClient) error {
now := time.Now().Truncate(time.Millisecond)
fmt.Println("performing uniary insert")
_, err := client.UniaryInsert(ctx, &pb.ExampleTable{Id: int64(5), StartTime: ToProtobufTime(&now)})
if err != nil {
return err
}
fmt.Println("inserted with uniary inser... | [
0.07794145494699478,
0.6938844919204712,
0.7018877267837524,
-0.15138956904411316,
0.23718753457069397,
-0.02334803342819214,
0.4181874096393585,
0.44431638717651367,
-0.46247488260269165,
-0.2583111822605133,
-1.2427546977996826,
0.04009154438972473,
-0.9590578079223633,
0.186009302735328... |
func uniarySelect(client pbclient.MySpannerClient) error {
fmt.Println("performing uniary select")
res, err := client.UniarySelect(ctx, &pb.ExampleTable{Id: int64(5), Name: "bananas"})
if err != nil {
return err
}
fmt.Printf("recieved res: %+v\n\n", res)
return nil
} | [
0.058166712522506714,
-0.05008849874138832,
0.5307024717330933,
-0.6299325823783875,
0.560588538646698,
-0.40751153230667114,
0.15145611763000488,
-0.09836132824420929,
0.18605424463748932,
-0.24829348921775818,
-0.3243442475795746,
0.7585857510566711,
-0.7187902331352234,
-0.7019714713096... |
func uniaryUpdate(client pbclient.MySpannerClient) error {
fmt.Println("performing uniaryUpdate")
now := time.Now().Truncate(time.Millisecond)
_, err := client.UniaryUpdate(ctx, &pb.ExampleTable{
StartTime: ToProtobufTime(&now),
Id: int64(1),
})
if err != nil {
return err
}
fmt.Println("updated with... | [
0.0507536306977272,
-0.6326594948768616,
0.6711636185646057,
-0.1274748146533966,
-0.46002018451690674,
0.01543327234685421,
0.055009063333272934,
0.6969336271286011,
-0.1164034828543663,
0.029100054875016212,
-0.31544190645217896,
0.5417893528938293,
-0.4787183403968811,
-0.18630148470401... |
func uniaryDelete(client pbclient.MySpannerClient) error {
fmt.Println("performing uniaryDelete")
_, err := client.UniaryDelete(ctx, &pb.ExampleTableRange{StartId: int64(0), EndId: int64(5)})
if err != nil {
return err
}
fmt.Println("deleted using uniary delete")
return nil
} | [
0.40562117099761963,
-0.17354783415794373,
0.6722260117530823,
0.024996977299451828,
0.5513437986373901,
-0.06484784185886383,
0.37362754344940186,
0.6235652565956116,
0.08168959617614746,
-0.3883169889450073,
-0.23679114878177643,
0.221156045794487,
-0.26251691579818726,
0.041917409747838... |
func noArgs(client pbclient.MySpannerClient) error {
fmt.Println("performing NoArgs query")
res, err := client.NoArgs(ctx, &pb.ExampleTable{})
if err != nil {
return err
}
fmt.Printf("recieved this from noArgs: %+v\n", res)
return nil
} | [
0.22752544283866882,
0.8775917887687683,
0.17927315831184387,
-0.9880401492118835,
-0.33730369806289673,
0.30585920810699463,
0.16933408379554749,
0.28465431928634644,
-0.9238555431365967,
-0.2877531945705414,
0.7288514375686646,
0.4344373941421509,
-1.1568825244903564,
0.4295365810394287,... |
func serverStream(client pbclient.MySpannerClient) error {
fmt.Printf("Getting all docs with server stream\n\n")
stream, err := client.ServerStream(ctx, &pb.Name{})
if err != nil {
return err
}
for {
doc, err := stream.Recv()
if err == io.EOF {
break
} else if err != nil {
return err
}
fmt.Print... | [
0.7817521095275879,
-0.21317711472511292,
0.6806833148002625,
-0.09227816015481949,
-0.3626982271671295,
0.7468491196632385,
-0.0595410130918026,
-0.26979073882102966,
-0.2849813997745514,
-0.05466395244002342,
-0.30108290910720825,
1.3844687938690186,
-0.9862139821052551,
1.67480003833770... |
func clientStreamInsert(client pbclient.MySpannerClient) error {
fmt.Println("inserting docs with client stream")
now := time.Now().Truncate(time.Millisecond)
docs := []*pb.ExampleTable{
&pb.ExampleTable{
Id: int64(1),
StartTime: ToProtobufTime(&now),
Name: "george",
},
&pb.ExampleTable{
... | [
0.18427124619483948,
0.1110353097319603,
0.6586514115333557,
-0.16734619438648224,
-0.5889912247657776,
0.15351836383342743,
0.9752815961837769,
-0.970011293888092,
-0.963623046875,
0.24658650159835815,
-0.8132110834121704,
0.11141151189804077,
-0.9285486936569214,
1.3599867820739746,
-0... |
func clientStreamDelete(client pbclient.MySpannerClient) error {
fmt.Println("deleting docs with client stream")
docs := []*pb.ExampleTable{
&pb.ExampleTable{
Id: int64(5),
},
}
stream, err := client.ClientStreamDelete(ctx)
for _, doc := range docs {
fmt.Printf("clientStreaming doc: %+v\n", doc)
err := ... | [
1.1909375190734863,
-0.5310109853744507,
0.5359295606613159,
-0.08637205511331558,
-0.6323869824409485,
-0.11996585875749588,
0.9140601754188538,
-0.944351077079773,
-0.18695329129695892,
0.3104103207588196,
-0.1527692973613739,
0.4900874197483063,
-0.39602139592170715,
1.4093928337097168,... |
func clientStreamUpdate(client pbclient.MySpannerClient) error {
fmt.Println("updating docs with client stream")
now := time.Now().Truncate(time.Millisecond)
docs := []*pb.ExampleTable{
&pb.ExampleTable{
Id: int64(1),
StartTime: ToProtobufTime(&now),
Name: "notgeorge",
},
&pb.ExampleTable{... | [
0.016327984631061554,
-0.9255600571632385,
0.6480591893196106,
-0.1412382423877716,
-1.1304093599319458,
0.2533353567123413,
0.6212106347084045,
-0.9709523320198059,
-0.8820905685424805,
0.6105338931083679,
-0.3727867007255554,
0.5966063737869263,
-0.43555983901023865,
1.283363699913025,
... |
func ToTime(entry *google_protobuf.Timestamp) *time.Time {
if entry == nil {
return nil
}
lTime, err := ptypes.Timestamp(entry)
if err != nil {
return nil
}
return &lTime
} | [
0.8033373951911926,
0.5045526623725891,
0.6324598789215088,
-0.3251664340496063,
1.121826171875,
0.20758210122585297,
-0.18522734940052032,
-0.5663299560546875,
1.2057019472122192,
1.6052649021148682,
-0.7240381836891174,
-0.2723976671695709,
-0.9313659071922302,
0.03451012820005417,
-0.... |
func (s *Service) setsInit() error {
log.Println("Initing sets table")
_, err := s.connection.Exec(`
CREATE TABLE IF NOT EXISTS sets (
id text not null primary key,
name text
)
`)
if err != nil {
return errors.Wrap(err, "can't create sets table")
}
_, err = s.connection.Exec("CREATE UNIQUE INDEX IF ... | [
-0.1866178661584854,
0.31689736247062683,
0.6773394346237183,
-0.3358606696128845,
0.012646917253732681,
-0.015026149339973927,
0.22363686561584473,
-1.242597222328186,
-1.0894023180007935,
0.7882145643234253,
-0.5597976446151733,
0.43026068806648254,
0.19432450830936432,
0.204639703035354... |
func (s *Service) SetsInsert(id, name string) error {
stmt, err := s.connection.Prepare("INSERT INTO sets(id, name) VALUES(?, ?)")
if err != nil {
return errors.Wrap(err, "can't prepare query")
}
_, err = stmt.Exec(id, name)
if err != nil {
return errors.Wrapf(err, "Can't insert set '%s'", name)
}
return nil... | [
-0.580866813659668,
0.6663309931755066,
0.4832364618778229,
-0.565692663192749,
-0.4923326373100281,
-0.1809595376253128,
-0.9865171313285828,
-1.6113839149475098,
-1.213618278503418,
0.4175145924091339,
-0.7663972973823547,
-0.07881264388561249,
-1.158871054649353,
0.05042371526360512,
... |
func (s *Service) SetsGetIDByName(name string) (string, error) {
var setID string
err := s.connection.QueryRow("SELECT id FROM sets WHERE name=?", name).Scan(&setID)
if err != nil {
if err == sql.ErrNoRows {
return "", nil
}
return "", errors.Wrap(err, "can't select")
}
return setID, nil
} | [
0.031635213643312454,
0.14588262140750885,
0.4732964038848877,
-0.6026319861412048,
-0.6381520628929138,
-0.3908795118331909,
0.2693280577659607,
-1.4627035856246948,
0.08356335014104843,
0.6569231152534485,
-0.24944588541984558,
0.04920857772231102,
-1.4617973566055298,
-0.114470414817333... |
func (RecognitionConfig_Encoding) EnumDescriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{8, 0}
} | [
-0.49518272280693054,
0.7216073870658875,
0.3055153787136078,
-0.10555169731378555,
-0.13057300448417664,
-0.20704062283039093,
0.2745872437953949,
0.247093066573143,
-0.5291308164596558,
1.0000486373901367,
-1.1541460752487183,
-0.335041344165802,
0.1672988384962082,
0.815066933631897,
... |
func (*ListModelsRequest) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{0}
} | [
-1.4326311349868774,
-0.5105878114700317,
0.36871621012687683,
-0.16774457693099976,
0.7257505059242249,
-1.2248297929763794,
-0.3343006372451782,
-0.27876928448677063,
0.26813551783561707,
-0.8116550445556641,
-0.9876095056533813,
-0.4314623475074768,
0.47188326716423035,
0.47462284564971... |
func (*RecognizeRequest) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{1}
} | [
-0.7703849077224731,
0.6644071340560913,
0.5337761044502258,
0.20092657208442688,
-0.12347109615802765,
-0.20649544894695282,
-0.04387287423014641,
0.2298993021249771,
-0.5901113152503967,
-0.3610605299472809,
-0.4586923122406006,
0.414559006690979,
0.4771977365016937,
0.6476427316665649,
... |
func (*StreamingRecognizeRequest) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{2}
} | [
-0.8792098164558411,
0.33928045630455017,
0.35421374440193176,
0.03358762338757515,
0.07817438989877701,
-0.21171154081821442,
0.26285266876220703,
0.6570990681648254,
-0.8870338797569275,
-0.3892970085144043,
-0.5155399441719055,
0.4722779095172882,
0.14465871453285217,
0.8467140197753906... |
func (*CompileContextRequest) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{3}
} | [
-1.1180845499038696,
0.2057645469903946,
0.24713431298732758,
0.7803307175636292,
-0.3338886499404907,
0.003334782551974058,
0.18083883821964264,
0.4404072165489197,
-0.050220243632793427,
-0.2983044385910034,
0.012041461654007435,
0.8717672824859619,
-0.9701036810874939,
0.959774911403656... |
func (*VersionResponse) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{4}
} | [
0.06637343764305115,
-0.5043722987174988,
0.010805857367813587,
0.13125695288181305,
0.1325286477804184,
-0.5707075595855713,
0.6229193210601807,
0.5039774775505066,
-0.09549800306558609,
0.15112683176994324,
-1.2512575387954712,
-0.5512964725494385,
-0.9577298760414124,
-0.509396851062774... |
func (*ListModelsResponse) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{5}
} | [
-0.6663702130317688,
-0.5554599165916443,
-0.06988398730754852,
-0.2681739628314972,
0.4977194368839264,
-1.4519983530044556,
0.14585408568382263,
-0.3533683717250824,
0.25599002838134766,
-0.23866073787212372,
-1.659955382347107,
-0.8442480564117432,
0.1560380756855011,
-0.015661455690860... |
func (*RecognitionResponse) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{6}
} | [
0.08284058421850204,
0.3156576156616211,
0.14266662299633026,
0.112391896545887,
0.1292312741279602,
-0.7177200317382812,
0.5519640445709229,
0.14753428101539612,
-0.4389781355857849,
-0.029828587546944618,
-1.263750433921814,
-0.535574734210968,
-0.513617992401123,
-0.015826795250177383,
... |
func (*CompileContextResponse) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{7}
} | [
-0.5774353742599487,
-0.021878203377127647,
-0.12457852810621262,
0.35492241382598877,
-0.013931221328675747,
-0.14809487760066986,
0.28003421425819397,
0.25467318296432495,
0.37797799706459045,
-0.619499683380127,
-0.6214430332183838,
0.10488495230674744,
-1.5795098543167114,
0.1974199265... |
func (*RecognitionConfig) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{8}
} | [
0.09130024909973145,
0.8920014500617981,
0.14412717521190643,
-0.12916278839111328,
-0.37855228781700134,
0.08284652978181839,
0.15384875237941742,
1.1293915510177612,
-1.2019829750061035,
0.12533026933670044,
-1.5735864639282227,
0.06349657475948334,
0.609406054019928,
1.5002012252807617,... |
func (*RecognitionMetadata) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{9}
} | [
-0.11488562822341919,
0.6611455082893372,
0.19867506623268127,
0.10364055633544922,
0.0071579571813344955,
0.5351108908653259,
0.1700223684310913,
0.3280949294567108,
-1.0095185041427612,
0.46498870849609375,
-0.9419720768928528,
0.5449689030647278,
-0.0858861580491066,
0.05357915535569191... |
func (*RecognitionContext) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{10}
} | [
-0.34611210227012634,
0.6924146413803101,
0.3342980444431305,
-0.21777506172657013,
-0.4899071156978607,
0.0873148962855339,
-0.070720374584198,
0.0026733253616839647,
-0.4810195565223694,
-0.3776525855064392,
-1.255173921585083,
0.26497697830200195,
0.005054734647274017,
0.867277920246124... |
func (*CompiledContext) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{11}
} | [
-0.32129889726638794,
0.1608959138393402,
0.6072238683700562,
-0.347040593624115,
-0.2935383915901184,
0.45377200841903687,
0.6979088187217712,
0.2753230035305023,
0.014339353889226913,
-0.8560225367546082,
-1.5788105726242065,
0.9526877999305725,
-0.34216946363449097,
0.7351285219192505,
... |
func (*ContextPhrase) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{12}
} | [
0.17427490651607513,
0.32736295461654663,
0.3861461281776428,
-0.21774068474769592,
-0.22428396344184875,
0.15112705528736115,
-0.3744105398654938,
0.8986406326293945,
0.20245127379894257,
0.5489502549171448,
-0.4862128496170044,
0.2927412986755371,
-1.2906726598739624,
0.7422168850898743,... |
func (*RecognitionAudio) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{13}
} | [
0.5089403986930847,
0.2165931612253189,
0.24206775426864624,
0.17067565023899078,
-0.7706050276756287,
0.45723146200180054,
0.46763649582862854,
0.31419429183006287,
-0.9920134544372559,
0.10884713381528854,
-1.0408605337142944,
0.0973491445183754,
-0.03138578683137894,
0.7347242832183838,... |
func (*Model) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{14}
} | [
-0.6389968395233154,
0.40377527475357056,
0.288675457239151,
-0.17546848952770233,
0.20617158710956573,
0.574537992477417,
0.1220225915312767,
0.3619332015514374,
-0.5293002724647522,
-0.18866771459579468,
-1.3080365657806396,
-0.483817458152771,
0.5188165903091431,
-0.032195083796978,
0... |
func (*ModelAttributes) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{15}
} | [
-0.48842406272888184,
0.545228123664856,
-0.06331349164247513,
-0.4070996940135956,
-0.5171880722045898,
-0.04300747439265251,
0.15711358189582825,
0.17748849093914032,
-0.9785642623901367,
-0.13509607315063477,
-1.145721673965454,
0.17598220705986023,
-0.6615258455276489,
-0.1336074620485... |
func (*ContextInfo) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{16}
} | [
0.725959062576294,
0.24453717470169067,
0.24234966933727264,
-0.24919870495796204,
0.24666574597358704,
-0.026402609422802925,
0.49450111389160156,
0.653342604637146,
-1.09117591381073,
-0.3106687068939209,
-0.9791605472564697,
-0.03509572893381119,
0.022490952163934708,
0.0169277712702751... |
func (*RecognitionResult) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{17}
} | [
0.10429169237613678,
1.1624237298965454,
0.2496325969696045,
0.00039925394230522215,
-0.216456338763237,
-0.3979271650314331,
0.6380888819694519,
0.0919657051563263,
-0.9223377704620361,
-0.34328436851501465,
-1.5373334884643555,
-0.307559072971344,
-0.3074812591075897,
0.27458786964416504... |
func (*RecognitionAlternative) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{18}
} | [
-0.22625985741615295,
0.135290265083313,
0.5649392008781433,
-0.696968138217926,
-0.9742828011512756,
0.5463964939117432,
0.30335432291030884,
0.4378593862056732,
-1.4602690935134888,
0.21104666590690613,
-1.0326259136199951,
0.011519386433064938,
0.30869001150131226,
0.7497543692588806,
... |
func (*WordInfo) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{19}
} | [
0.36400318145751953,
0.3424326777458191,
0.3448029160499573,
-0.7152779698371887,
-0.2637552320957184,
0.3516187369823456,
0.23804351687431335,
0.21607545018196106,
-1.4401862621307373,
0.22795988619327545,
-1.172947883605957,
0.5335614085197449,
-0.20368804037570953,
0.6564146280288696,
... |
func (*RecognitionConfusionNetwork) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{20}
} | [
-0.19443249702453613,
0.5101257562637329,
0.08281874656677246,
0.3096429705619812,
0.2679695188999176,
0.12297116965055466,
0.8679167032241821,
-0.26575759053230286,
-0.7090543508529663,
-0.5242094993591309,
-0.7887556552886963,
-0.36987388134002686,
-0.1568026840686798,
1.3332138061523438... |
func (*ConfusionNetworkLink) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{21}
} | [
0.058766089379787445,
1.259418249130249,
-0.0641726702451706,
0.9142712354660034,
0.606907069683075,
-0.5515190362930298,
-0.0382867269217968,
0.2705034017562866,
-1.0961791276931763,
-0.16082991659641266,
-0.7126553654670715,
-0.16947594285011292,
-0.36312517523765564,
0.9323270916938782,... |
func (*ConfusionNetworkArc) Descriptor() ([]byte, []int) {
return file_cubic_proto_rawDescGZIP(), []int{22}
} | [
0.718616247177124,
0.8306643962860107,
0.2377447783946991,
0.18793565034866333,
0.7600597143173218,
-0.06251217424869537,
1.0337774753570557,
-0.6514040231704712,
-0.6320351362228394,
-0.3185887038707733,
0.11196889728307724,
0.26959776878356934,
0.11713697761297226,
1.282625436782837,
0... |
func IsTypeSubTypeOf(schema Schema, maybeSubType Type, superType Type) bool {
// Equivalent type is a valid subtype
if maybeSubType == superType {
return true
}
switch superType := superType.(type) {
case NonNull:
// If superType is non-null, maybeSubType must also be non-null.
if maybeSubType, ok := maybeS... | [
0.5124600529670715,
0.27925238013267517,
0.7247523069381714,
0.38720816373825073,
-0.5343203544616699,
0.009636830538511276,
-0.3731927275657654,
-0.006474336609244347,
0.08068088442087173,
0.033235225826501846,
-1.044161081314087,
0.7036632895469666,
-0.41591185331344604,
0.76414573192596... |
func (app *QOSApp) prepForZeroHeightGenesis(ctx context.Context) {
/* reset staking && distribution */
sm := stake.GetMapper(ctx)
dm := distribution.GetMapper(ctx)
am := bank.GetMapper(ctx)
// close all active validators
var delegations []stake.Delegation
var validators = make(map[string]stake.Validator)
iter... | [
-0.08200735598802567,
-0.4800527095794678,
0.880641758441925,
-0.3395440876483917,
-0.47320786118507385,
-0.31777524948120117,
0.15863855183124542,
-0.053329143673181534,
-0.4697665870189667,
0.08775167912244797,
0.17653504014015198,
0.07106629014015198,
-0.1905355453491211,
0.674519300460... |
func decode(msg mqtt.Message) (*driver.Message, error) {
if msg == nil {
return nil, errInvalidMessage
}
var dm driver.Message
if err := decodeMessage(msg.Payload(), &dm); err != nil {
return nil, err
}
dm.AckID = msg.MessageID() // uint16
dm.AsFunc = messageAsFunc(msg)
return &dm, nil
} | [
0.3905443549156189,
0.027098726481199265,
0.38315653800964355,
-0.08651120960712433,
-0.23872695863246918,
-0.918441653251648,
-0.23696023225784302,
-0.5143610835075378,
0.607530415058136,
-0.8922989368438721,
0.9941189885139465,
-0.05535394325852394,
-0.39152029156684875,
0.49332582950592... |
func (n *Node) SubscribeChainHeadEvent() {
n.chainHeadSub = n.EleBackend.SubscribeChainHeadEvent(n.chainHeadCh)
go n.loop()
go n.genMyOldestFutureMsgLoop()
} | [
0.6583361625671387,
0.3317808210849762,
0.4430914521217346,
0.2869161367416382,
0.7046672105789185,
-0.2147088646888733,
-0.7494834065437317,
-0.8763696551322937,
-0.1311979442834854,
-0.25260064005851746,
-0.716183602809906,
1.4133983850479126,
0.13094431161880493,
0.2879829406738281,
0... |
func (n *Node) loop() {
// Track the previous head headers for transaction reorgs
head := n.EleBackend.GetCurrentBlock()
// Keep waiting for and reacting to the various events
for {
select {
// Handle ChainHeadEvent
case ev := <-n.chainHeadCh:
if ev.Block != nil && ev.Block.NumberU64() > head.Num... | [
-0.1778426319360733,
-0.12122295051813126,
0.9068278670310974,
0.24319182336330414,
-0.008369511924684048,
-0.38936132192611694,
0.5449590086936951,
-0.33635076880455017,
-0.46678492426872253,
0.2489321380853653,
0.29957374930381775,
0.03280019760131836,
-0.46203741431236267,
0.38563811779... |
func (n *Node) HandleReq(reqMsg *hbft.RequestMsg) (*hbft.PreConfirmMsg, error) {
n.HBFTDebugInfo(fmt.Sprintf("HandleRequestMsg, new block: %s, number: %d, parent: %s",
reqMsg.NewBlock.Hash().TerminalString(), reqMsg.NewBlock.NumberU64(),
reqMsg.NewBlock.ParentHash().TerminalString()))
// Create a new state fo... | [
-0.1864483803510666,
0.11824300140142441,
0.8621410727500916,
0.4439827501773834,
0.4595065414905548,
-0.5723289251327515,
0.34271302819252014,
0.25047314167022705,
-1.026634693145752,
-0.1534433513879776,
0.08045138418674469,
0.13179071247577667,
0.011619524098932743,
0.9262875318527222,
... |
func (n *Node) checkIfOldestFuturesValidForPreConfirm(preConfirmMsg *hbft.PreConfirmMsg) {
if n.oldestFutureFull {
n.oldestFutureMutex.Lock()
defer n.oldestFutureMutex.Unlock()
canReplace, hash, _ := n.checkIfOldestFuturesCanReplace(n.oldestFutureMsgs, preConfirmMsg.SequenceID, preConfirmMsg.ViewID)
if ... | [
0.3739388585090637,
0.3528522551059723,
0.8212214112281799,
0.04107001796364784,
0.4134373962879181,
-0.7774111032485962,
-0.25961947441101074,
0.27095329761505127,
-0.6107513308525085,
0.12632226943969727,
-0.25818464159965515,
0.45101866126060486,
-0.21899372339248657,
1.994483470916748,... |
func (n *Node) checkIfOldestFuturesCanReplace(oldestFutureMsgs []*hbft.OldestFutureMsg, currentSeqID, currentViewID uint64) (bool, common.Hash, bool) {
differentFutureCntMap := make(map[common.Hash]int)
differentFutureMsgMap := make(map[common.Hash]*hbft.OldestFutureMsg)
differentFuturePrimMap := make(map[string]... | [
-0.36700889468193054,
-0.14133615791797638,
0.8778689503669739,
-0.03332772105932236,
-0.1774313896894455,
-0.7379772067070007,
0.5609272122383118,
-0.03721877560019493,
-0.4770011901855469,
-0.44237852096557617,
-0.1520795375108719,
0.3617911636829376,
-0.2380226105451584,
1.6079268455505... |
func (n *Node) HandlePreConfirmMsg(preConfirmMsg *hbft.PreConfirmMsg) (*hbft.ReplyMsg, error) {
n.HBFTDebugInfo(fmt.Sprintf("HandlePreConfirmMsg, new block: %s, number: %d, parent: %s, count of oldest future: %d",
preConfirmMsg.NewBlock.Hash().TerminalString(), preConfirmMsg.NewBlock.NumberU64(),
preConfirmMsg.... | [
-0.01741083338856697,
0.318338543176651,
1.0368120670318604,
0.5969756245613098,
0.22744207084178925,
-0.44805750250816345,
0.2903359830379486,
-0.37144818902015686,
-0.4824174642562866,
0.11454242467880249,
0.018873974680900574,
0.012090593576431274,
-0.24590694904327393,
1.15178501605987... |
func (n *Node) HandleConfirmMsg(confirmMsg *hbft.ConfirmMsg) (*hbft.ReplyMsg, error) {
n.HBFTDebugInfo(fmt.Sprintf("HandleConfirmMsg, newest completed stage: %s, block: %s",
confirmMsg.CurState.Completed[len(confirmMsg.CurState.Completed)-1].Hash().TerminalString(),
confirmMsg.CurState.Completed[len(confirmMsg.... | [
0.13667622208595276,
0.04023193567991257,
1.0071746110916138,
0.3319050371646881,
0.39229944348335266,
-0.5875205993652344,
0.3350493907928467,
-0.2563410997390747,
-0.3038930594921112,
0.3907703161239624,
0.020159902051091194,
-0.24822206795215607,
-0.17033514380455017,
1.067882776260376,... |
func Asset(name string) ([]byte, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, fmt.Errorf("Asset %s not foun... | [
-0.7961483001708984,
-1.2313168048858643,
0.633165180683136,
-0.6093899011611938,
-1.546921730041504,
-0.11101024597883224,
0.12971386313438416,
-1.3390334844589233,
-1.1358720064163208,
0.4855233430862427,
0.3090141713619232,
0.32495471835136414,
-0.6009681224822998,
-0.44264674186706543,... |
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
} | [
-0.012778956443071365,
0.11985661834478378,
0.4091298282146454,
-0.5268413424491882,
-0.8276715278625488,
0.4719155430793762,
-0.8186293840408325,
-1.5736604928970337,
0.16388541460037231,
0.6357062458992004,
-0.5354578495025635,
0.35693347454071045,
0.0057142809964716434,
-0.0248885955661... |
func AssetInfo(name string) (os.FileInfo, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, fmt.Errorf("Asset... | [
0.371969997882843,
-1.1052993535995483,
0.5630446076393127,
-0.922572672367096,
-1.356387734413147,
0.0033556853886693716,
0.6777529716491699,
-0.8006685972213745,
-1.2748286724090576,
0.3115358352661133,
0.2636086046695709,
0.26388120651245117,
0.0635773167014122,
-0.3988074064254761,
0... |
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
} | [
-0.7293784618377686,
-0.8460342288017273,
0.7321816682815552,
-0.39323121309280396,
-0.48951536417007446,
0.7661203145980835,
-0.5028699636459351,
-0.8655748963356018,
-0.4145073890686035,
0.8099913597106934,
0.16903363168239594,
1.163049578666687,
-0.028152840211987495,
0.0342608317732811... |
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), d... | [
0.34371325373649597,
-0.3622533082962036,
0.6770349144935608,
-1.2592034339904785,
-0.00613967701792717,
-0.044532135128974915,
-0.00726317847147584,
-0.43950432538986206,
-0.2061910331249237,
-0.2510174810886383,
0.17843623459339142,
0.1356850564479828,
-0.2362709492444992,
-0.56985044479... |
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
// File
if err != nil {
return RestoreAsset(dir, name)
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
}
}
return nil
} | [
0.4226192533969879,
0.3001989424228668,
0.5813396573066711,
-0.20641714334487915,
-0.23828980326652527,
-0.24414613842964172,
0.5739712119102478,
-0.029911452904343605,
0.061882976442575455,
-0.43923527002334595,
0.5113739371299744,
0.3275964856147766,
-0.612514853477478,
0.035165321081876... |
func (d *Dao) Values(valueMap map[string]interface{}) *Dao {
if d.query.GetSqlType() == "INSERT" {
d.query.Values(valueMap)
} else {
d.query.Set(valueMap)
}
return d
} | [
-0.6204000115394592,
1.0415821075439453,
0.38158875703811646,
-0.079459547996521,
0.6815001964569092,
0.2334715873003006,
-0.4808383882045746,
0.028064414858818054,
0.7515876293182373,
-0.21516872942447662,
0.5948618054389954,
-0.5735023617744446,
-0.41981732845306396,
0.9524261951446533,
... |
func (d *Dao) BatchValues(anyMapSlice []map[string]interface{}) *Dao {
if len(anyMapSlice) > 20 {
anyMapSlice = anyMapSlice[0:20]
}
for _, anyMap := range anyMapSlice {
d.query.Values(anyMap)
}
return d
} | [
-0.28777894377708435,
0.11342482268810272,
0.30670154094696045,
0.10634084045886993,
0.05131785199046135,
-0.08011869341135025,
-0.5643457770347595,
0.9319837093353271,
-0.662868857383728,
-0.7362003326416016,
-0.371225506067276,
-0.04877302795648575,
0.2981826663017273,
1.3869590759277344... |
func (*Config) Parse(filename string) (y config.Configer, err error) {
cnf, err := ReadYmlReader(filename)
if err != nil {
return
}
y = &ConfigContainer{
data: cnf,
}
return
} | [
-0.2766205668449402,
0.23638874292373657,
0.3668830096721649,
-0.06584837287664413,
-0.8776700496673584,
-0.4248112142086029,
-0.032462142407894135,
0.42290371656417847,
-0.8488794565200806,
-0.5364944934844971,
0.04195517674088478,
-0.9419340491294861,
-0.034864604473114014,
0.91979187726... |
func (*Config) ParseData(data []byte) (config.Configer, error) {
cnf, err := parseYML(data)
if err != nil {
return nil, err
}
return &ConfigContainer{
data: cnf,
}, nil
} | [
-0.36851921677589417,
0.5537939667701721,
0.2004423588514328,
-0.13050998747348785,
-1.01679527759552,
-0.1695028692483902,
-0.2431946098804474,
0.3038732707500458,
0.46623221039772034,
-1.522977590560913,
-0.5758978724479675,
-0.7344532012939453,
-0.13940463960170746,
1.576826810836792,
... |
func ReadYmlReader(path string) (cnf map[string]interface{}, err error) {
buf, err := os.ReadFile(path)
if err != nil {
return
}
return parseYML(buf)
} | [
-0.02138470858335495,
-0.4134874641895294,
0.468208372592926,
-0.6465458273887634,
-2.1886661052703857,
-0.0403287336230278,
-0.4548352062702179,
0.26889920234680176,
-0.30486124753952026,
-0.10180976241827011,
-0.20872534811496735,
-0.07143823057413101,
0.4122167229652405,
0.3192912936210... |
func parseYML(buf []byte) (map[string]interface{}, error) {
cnf := make(map[string]interface{})
err := yaml.Unmarshal(buf, cnf)
if err != nil {
return nil, err
}
cnf = config.ExpandValueEnvForMap(cnf)
return cnf, err
} | [
0.22928115725517273,
-0.10577249526977539,
0.5794761776924133,
0.11551445722579956,
-1.0869449377059937,
-0.1215699315071106,
0.2959103286266327,
0.7860960960388184,
0.02607123553752899,
-0.17693373560905457,
-0.7844070196151733,
-0.12534008920192719,
0.12689533829689026,
0.857296228408813... |
func (c *ConfigContainer) Unmarshaler(prefix string, obj interface{}, _ ...config.DecodeOption) error {
sub, err := c.subMap(prefix)
if err != nil {
return err
}
bytes, err := yaml.Marshal(sub)
if err != nil {
return err
}
return yaml.Unmarshal(bytes, obj)
} | [
-0.02728312462568283,
0.08343330770730972,
0.42038676142692566,
-0.32814645767211914,
-0.7523425817489624,
-0.7568854093551636,
0.38240954279899597,
0.9303491711616516,
-0.35823187232017517,
-0.7145201563835144,
0.04757184907793999,
-0.3078480660915375,
0.37709498405456543,
0.5034700036048... |
func (c *ConfigContainer) Bool(key string) (bool, error) {
v, err := c.getData(key)
if err != nil {
return false, err
}
return config.ParseBool(v)
} | [
-0.39403894543647766,
0.1915113478899002,
0.48554727435112,
-0.05949891731142998,
-0.2819838225841522,
0.0639507845044136,
-0.3197873830795288,
0.7961342930793762,
-0.5175907611846924,
0.6972017288208008,
-0.28670716285705566,
0.20837721228599548,
0.48114222288131714,
-0.453708291053772,
... |
func (c *ConfigContainer) DefaultBool(key string, defaultVal bool) bool {
v, err := c.Bool(key)
if err != nil {
return defaultVal
}
return v
} | [
-0.012325381860136986,
0.6423140168190002,
0.35800716280937195,
0.9559644460678101,
0.316890150308609,
0.5344692468643188,
-0.36711665987968445,
0.181060791015625,
-0.8645031452178955,
0.8331010937690735,
-0.14980986714363098,
-0.6413364410400391,
-0.5329381823539734,
-0.028566034510731697... |
func (c *ConfigContainer) Int(key string) (int, error) {
if v, err := c.getData(key); err != nil {
return 0, err
} else if vv, ok := v.(int); ok {
return vv, nil
} else if vv, ok := v.(int64); ok {
return int(vv), nil
}
return 0, errors.New("not int value")
} | [
-0.9031957983970642,
0.342691034078598,
0.3996552526950836,
-0.3983337879180908,
-0.3304196298122406,
-0.7408164143562317,
-0.19260425865650177,
-0.22099225223064423,
-0.825535237789154,
0.7229414582252502,
0.521586537361145,
0.3134550154209137,
-0.02286708354949951,
0.8435213565826416,
... |
func (c *ConfigContainer) DefaultInt(key string, defaultVal int) int {
v, err := c.Int(key)
if err != nil {
return defaultVal
}
return v
} | [
-0.046678245067596436,
0.751806378364563,
0.4191505014896393,
-0.2279285043478012,
-0.09757072478532791,
-0.3856308162212372,
-0.2380121350288391,
-0.43729716539382935,
-1.042987585067749,
0.5563381910324097,
0.01906123012304306,
-1.1354678869247437,
-0.848795473575592,
0.48094654083251953... |
func (c *ConfigContainer) Int64(key string) (int64, error) {
v, err := c.getData(key)
if err != nil {
return 0, err
}
switch val := v.(type) {
case int:
return int64(val), nil
case int64:
return val, nil
default:
return 0, errors.New("not int or int64 value")
}
} | [
-1.5954065322875977,
0.2827337682247162,
0.4565347731113434,
0.7604653835296631,
0.23597565293312073,
-0.7371221780776978,
-0.2075432389974594,
-0.0818595215678215,
-0.43057817220687866,
0.5427489876747131,
1.252455234527588,
0.008678125217556953,
-0.48304903507232666,
1.1428542137145996,
... |
func (c *ConfigContainer) DefaultInt64(key string, defaultVal int64) int64 {
v, err := c.Int64(key)
if err != nil {
return defaultVal
}
return v
} | [
-0.675131618976593,
0.7482866644859314,
0.16377995908260345,
0.9075254797935486,
0.0461643822491169,
-0.8325937390327454,
-0.27030450105667114,
-0.011236320249736309,
-0.6918062567710876,
0.5792233943939209,
0.25960826873779297,
-0.9601316452026367,
-1.430698037147522,
0.7054164409637451,
... |
func (c *ConfigContainer) Float(key string) (float64, error) {
if v, err := c.getData(key); err != nil {
return 0.0, err
} else if vv, ok := v.(float64); ok {
return vv, nil
} else if vv, ok := v.(int); ok {
return float64(vv), nil
} else if vv, ok := v.(int64); ok {
return float64(vv), nil
}
return 0.0, ... | [
-0.7782754302024841,
0.5696285963058472,
0.4281754195690155,
0.5549958944320679,
0.47960996627807617,
-0.6083317399024963,
-0.25292763113975525,
-0.28515201807022095,
-0.7419034242630005,
0.029323406517505646,
0.8175782561302185,
-0.09939629584550858,
-0.4719987213611603,
1.672055244445800... |
func (c *ConfigContainer) DefaultFloat(key string, defaultVal float64) float64 {
v, err := c.Float(key)
if err != nil {
return defaultVal
}
return v
} | [
0.4916565418243408,
1.1459475755691528,
0.24030381441116333,
0.2720375657081604,
0.37014317512512207,
-0.46547338366508484,
-0.4185519516468048,
0.07663062959909439,
-1.0596892833709717,
-0.5020545125007629,
0.35346415638923645,
-0.779717743396759,
-1.0243130922317505,
1.2231937646865845,
... |
func (c *ConfigContainer) String(key string) (string, error) {
if v, err := c.getData(key); err == nil {
if vv, ok := v.(string); ok {
return vv, nil
}
}
return "", nil
} | [
-0.11830844730138779,
-0.20094525814056396,
0.12210097908973694,
-0.160615012049675,
-0.6606892943382263,
-0.600244402885437,
0.28485816717147827,
-1.2525230646133423,
-0.052384886890649796,
0.7116318345069885,
0.1047213226556778,
0.523246169090271,
-0.22363446652889252,
0.2741966843605041... |
func (c *ConfigContainer) DefaultString(key string, defaultVal string) string {
v, err := c.String(key)
if v == "" || err != nil {
return defaultVal
}
return v
} | [
-0.03716929256916046,
0.5158497095108032,
0.2232799530029297,
0.09131097793579102,
-0.06661967933177948,
0.041016340255737305,
-0.5549564957618713,
-0.690827488899231,
-0.5681663751602173,
0.40065473318099976,
0.8062008619308472,
-0.5541710257530212,
-0.8932271003723145,
0.524002194404602,... |
func (c *ConfigContainer) Strings(key string) ([]string, error) {
v, err := c.String(key)
if v == "" || err != nil {
return nil, err
}
return strings.Split(v, ";"), nil
} | [
-0.2583978474140167,
0.13404113054275513,
0.5522172451019287,
0.08396438509225845,
0.03135937824845314,
-0.5584890246391296,
-0.34033656120300293,
0.1428092122077942,
0.5731765627861023,
0.6787531971931458,
-0.07639870792627335,
-0.11321717500686646,
-0.9654754400253296,
0.6044713854789734... |
func (c *ConfigContainer) DefaultStrings(key string, defaultVal []string) []string {
v, err := c.Strings(key)
if v == nil || err != nil {
return defaultVal
}
return v
} | [
-0.057826969772577286,
0.18120288848876953,
0.27871599793434143,
0.5483129620552063,
0.416338711977005,
-0.35223448276519775,
-0.8314881920814514,
-0.6515893340110779,
-0.4378913640975952,
0.48039570450782776,
0.8655943274497986,
-0.20130422711372375,
-1.5480090379714966,
0.860115647315979... |
func (c *ConfigContainer) GetSection(section string) (map[string]string, error) {
if v, ok := c.data[section]; ok {
switch val := v.(type) {
case map[string]interface{}:
res := make(map[string]string, len(val))
for k2, v2 := range val {
res[k2] = fmt.Sprintf("%v", v2)
}
return res, nil
case map[s... | [
-0.8524836897850037,
-0.5298652648925781,
0.8157155513763428,
0.24063298106193542,
-0.19319358468055725,
-0.5117154121398926,
-0.1340879201889038,
-0.8356032371520996,
-0.47184357047080994,
1.3750126361846924,
0.1803155094385147,
0.5385303497314453,
0.6028755903244019,
0.8500568270683289,
... |
func (c *ConfigContainer) SaveConfigFile(filename string) (err error) {
// Write configuration file by filename.
f, err := os.Create(filename)
if err != nil {
return err
}
defer f.Close()
buf, err := yaml.Marshal(c.data)
if err != nil {
return err
}
_, err = f.Write(buf)
return err
} | [
-0.4984688460826874,
-0.08367317169904709,
0.36824744939804077,
-0.25306805968284607,
0.9570062756538391,
-0.30756255984306335,
0.8403212428092957,
0.6485695838928223,
-1.6476653814315796,
0.8090328574180603,
-1.6536366939544678,
-1.0521739721298218,
-0.43003952503204346,
1.338151693344116... |
func (c *ConfigContainer) Set(key, val string) error {
c.Lock()
defer c.Unlock()
c.data[key] = val
return nil
} | [
-0.663444459438324,
0.363491952419281,
0.0015728938160464168,
-0.23424629867076874,
-0.07949995994567871,
-0.24969185888767242,
-0.7480536699295044,
-0.70337975025177,
-1.0719624757766724,
0.19056859612464905,
-0.1476133167743683,
0.31334546208381653,
0.05415404587984085,
0.415051162242889... |
func (c *ConfigContainer) DIY(key string) (v interface{}, err error) {
return c.getData(key)
} | [
-1.3192485570907593,
-0.11998668313026428,
0.4570208489894867,
0.07529432326555252,
-0.06592307984828949,
-0.8816911578178406,
-0.052784670144319534,
-0.7093123197555542,
-0.6216030716896057,
0.4313662052154541,
-0.029429903253912926,
-0.4663342237472534,
0.34129029512405396,
0.46787282824... |
func (s *Store) TruncateAllTablesDANGEROUS(logger *zap.Logger) error {
tables := `
cedar_system_bookmarks,
accessibility_request_status_records,
accessibility_request_notes,
accessibility_request_documents,
test_dates,
accessibility_requests,
notes,
actions,
estimated_lifecycle_costs,
business_cases,
grt_fe... | [
0.2841213643550873,
0.5375267267227173,
0.6542263627052307,
1.0544114112854004,
0.26138314604759216,
0.8447442650794983,
0.08030899614095688,
-0.19249090552330017,
0.05615755170583725,
0.18292103707790375,
-0.22206255793571472,
0.18495060503482819,
-0.20488543808460236,
0.7457656264305115,... |
func WithRS256(c RS256Config) MiddlewareFunc {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ctxName := ParseContextFromRequest(r, false)
rs256ReqsTotal.WithLabelValues(ctxName).Inc()
t, err := jws.ParseJWTFromRequest(r)
if err != ... | [
-0.26175379753112793,
-0.5520622134208679,
0.502277672290802,
-0.15038388967514038,
-0.8455769419670105,
-0.8097023963928223,
0.017788415774703026,
-0.558355987071991,
0.33302006125450134,
0.31823891401290894,
-0.45729032158851624,
0.7785566449165344,
0.007372343447059393,
0.40631127357482... |
func randomStr(n int) string {
letterRunes := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
b := make([]rune, n)
for i := range b {
b[i] = letterRunes[rand.Intn(len(letterRunes))]
}
return string(b)
} | [
-0.39234572649002075,
0.3716740608215332,
0.12086626142263412,
-0.8993441462516785,
-0.19037219882011414,
0.9140359163284302,
-0.44078201055526733,
-0.6834304928779602,
0.27282270789146423,
-0.07635548710823059,
0.28075966238975525,
0.18743647634983063,
-0.8081688284873962,
0.2510368525981... |
func (c *ConfigFile) Decode(r io.Reader) error {
return gcfg.FatalOnly(gcfg.ReadInto(c, r))
} | [
0.1558413803577423,
0.15626534819602966,
0.2598266005516052,
0.20077456533908844,
0.3180793523788452,
0.3527194559574127,
0.1435752660036087,
0.15411056578159332,
-1.4240448474884033,
0.2981868088245392,
-0.18432551622390747,
-0.8372995257377625,
-0.7811130285263062,
0.6321631073951721,
... |
func decodeString(s string) string {
si := []byte(s)
times := NewStack()
storage := make([][]byte, 1)
storage[0] = []byte{}
bracket := 0
for i := 0; i < len(s); i++ {
v := s[i]
if v >= '0' && v <= '9' {
start, end := i, i+1
for s[end] >= '0' && s[end] <= '9' {
i++
end++
}
t, _ := strconv.A... | [
0.08670657128095627,
0.021865980699658394,
0.8837911486625671,
-0.5719313621520996,
-0.7146472930908203,
-0.9104891419410706,
0.7427921295166016,
-0.497330904006958,
0.02709490992128849,
0.25870969891548157,
-0.5908623933792114,
0.021982479840517044,
-0.40414804220199585,
-0.76915794610977... |
func (t *Trigger) Send() error {
err := t.Notification.Send(t.Sender, t.TemplateData)
if err != nil {
return err
}
return nil
} | [
0.22914208471775055,
0.20900344848632812,
0.10239133983850479,
0.10253289341926575,
0.25072211027145386,
-0.5978272557258606,
0.053381673991680145,
0.21778139472007751,
-1.063351035118103,
0.10391831398010254,
-1.1051870584487915,
0.36670586466789246,
0.0061256117187440395,
0.8368251323699... |
func Getenv(key string, def ...string) string {
fsys := datafs.WrapWdFS(osfs.NewFS())
return getenvVFS(fsys, key, def...)
} | [
-0.405823290348053,
0.7051544785499573,
0.301131933927536,
0.8690297603607178,
-0.1034475639462471,
-0.262520968914032,
-0.4918456971645355,
-0.013742719776928425,
-0.9301453232765198,
0.3110315799713135,
0.1197490394115448,
0.8809345960617065,
0.3771562874317169,
-0.05779063701629639,
-... |
func ExpandEnv(s string) string {
fsys := datafs.WrapWdFS(osfs.NewFS())
return expandEnvVFS(fsys, s)
} | [
0.046797510236501694,
0.33650118112564087,
0.3515271246433258,
-0.10331137478351593,
-0.8035826086997986,
0.15421172976493835,
0.05704730376601219,
-0.09551921486854553,
0.13485097885131836,
-0.31698834896087646,
0.6792445182800293,
0.4216090738773346,
0.2421894073486328,
-0.06786362081766... |
func getenvVFS(fsys fs.FS, key string, def ...string) string {
val := getenvFile(fsys, key)
if val == "" && len(def) > 0 {
return def[0]
}
return val
} | [
-0.3424316942691803,
0.698194682598114,
0.46612274646759033,
0.5128443837165833,
0.13873228430747986,
-0.6249577403068542,
-0.9164688587188721,
-0.2642040550708771,
-0.7367018461227417,
1.0411359071731567,
0.42244672775268555,
0.24720920622348785,
-0.5601493716239929,
0.3871051073074341,
... |
func SetProxy(p string, verifyssl bool) {
if p != "" && p != "none" {
proxyUrl, _ := url.Parse(p)
client = &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxyUrl), TLSClientConfig: &tls.Config{InsecureSkipVerify: verifyssl}}}
} else {
client = &http.Client{Transport: &http.Transport{TLSClientConf... | [
0.13763996958732605,
-0.06092408671975136,
0.5956020355224609,
0.23346634209156036,
-0.20377567410469055,
0.3662845194339752,
-0.7024084329605103,
0.7183601260185242,
-0.0848873034119606,
-0.3337903618812561,
-0.4929097592830658,
0.5443910956382751,
-0.7685585021972656,
0.07724548876285553... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.