text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (p *Prque) Reset() {
p.cont.Reset()
} | [
-0.26597899198532104,
-0.00024832997587509453,
0.143585205078125,
-0.24231351912021637,
1.01090407371521,
0.8380575776100159,
0.31058788299560547,
0.20238640904426575,
-1.2683748006820679,
0.6604819893836975,
0.13685491681098938,
1.4454498291015625,
-0.9294533729553223,
-0.4659544825553894... |
func Start(ctx context.Context, w http.ResponseWriter, req *http.Request, opt Options, db gorp.SqlExecutor, store cache.Store) (context.Context, error) {
if !traceEnable || !opt.Enable {
return ctx, nil
}
tags := []trace.Attribute{}
if opt.Worker != nil {
tags = append(tags, trace.StringAttribute("worker", opt... | [
0.31160107254981995,
0.4836023151874542,
0.7646916508674622,
0.09834112226963043,
0.18038034439086914,
0.057376716285943985,
0.9596073627471924,
-0.197622150182724,
1.0642904043197632,
-0.028136666864156723,
-0.14943118393421173,
0.25851792097091675,
0.18111447989940643,
0.3649889230728149... |
func End(ctx context.Context, w http.ResponseWriter, req *http.Request) (context.Context, error) {
span := trace.FromContext(ctx)
if span == nil {
return ctx, nil
}
span.End()
return ctx, nil
} | [
1.0898158550262451,
-0.06479795277118683,
0.47039806842803955,
-0.22398890554904938,
0.11413370072841644,
0.9101040959358215,
0.19741465151309967,
-0.7668763399124146,
1.0643339157104492,
0.15273445844650269,
0.4086564779281616,
0.10622711479663849,
-0.08748074620962143,
0.4497958421707153... |
func NewNetworkGroup(facadeHandler data.FacadeHandler) (*networkGroup, error) {
facade, ok := facadeHandler.(NetworkFacadeHandler)
if !ok {
return nil, ErrWrongTypeAssertion
}
ng := &networkGroup{
facade: facade,
baseGroup: &baseGroup{},
}
baseRoutesHandlers := []*data.EndpointHandlerData{
{Path: "/s... | [
-0.5689787864685059,
0.28523018956184387,
0.5162964463233948,
-0.7170647978782654,
-0.09631238877773285,
-0.5739982724189758,
0.19415196776390076,
0.19203899800777435,
-0.42089414596557617,
-0.5942258238792419,
-0.24645650386810303,
-0.33268579840660095,
0.3731237053871155,
0.6892887353897... |
func (group *networkGroup) getNetworkStatusData(c *gin.Context) {
shardIDUint, err := shared.FetchShardIDFromRequest(c)
if err != nil {
shared.RespondWith(c, http.StatusBadRequest, nil, process.ErrInvalidShardId.Error(), data.ReturnCodeRequestError)
return
}
networkStatusResults, err := group.facade.GetNetwork... | [
-0.1087660863995552,
1.182271122932434,
0.5662664175033569,
-0.49470585584640503,
0.006960094906389713,
0.7749482989311218,
-0.27727803587913513,
-1.2764486074447632,
-0.4590645432472229,
0.15528830885887146,
-0.6007345914840698,
-0.09421201050281525,
-0.30684274435043335,
1.19387674331665... |
func (group *networkGroup) getNetworkConfigData(c *gin.Context) {
networkConfigResults, err := group.facade.GetNetworkConfigMetrics()
if err != nil {
shared.RespondWith(c, http.StatusInternalServerError, nil, err.Error(), data.ReturnCodeInternalError)
return
}
c.JSON(http.StatusOK, networkConfigResults)
} | [
-0.9661383628845215,
1.188852071762085,
0.4566822052001953,
-0.3483167290687561,
-0.22557269036769867,
0.562606930732727,
0.15870577096939087,
-0.709784209728241,
-1.2354189157485962,
0.5997722744941711,
-0.5623443722724915,
-0.33407822251319885,
-0.38149070739746094,
1.2852588891983032,
... |
func (group *networkGroup) getEconomicsData(c *gin.Context) {
economicsData, err := group.facade.GetEconomicsDataMetrics()
if err != nil {
shared.RespondWith(c, http.StatusInternalServerError, nil, err.Error(), data.ReturnCodeInternalError)
return
}
c.JSON(http.StatusOK, economicsData)
} | [
-0.27190157771110535,
1.254982352256775,
0.7329376935958862,
-0.10305170714855194,
0.40918976068496704,
0.8806338906288147,
-0.514367401599884,
-1.1445928812026978,
-0.4792178273200989,
0.025181317701935768,
0.4844759702682495,
0.6314406991004944,
-0.8300707340240479,
0.2714524269104004,
... |
func (group *networkGroup) getDirectStakedInfo(c *gin.Context) {
directStakedInfo, err := group.facade.GetDirectStakedInfo()
if err != nil {
shared.RespondWith(c, http.StatusInternalServerError, nil, err.Error(), data.ReturnCodeInternalError)
return
}
c.JSON(http.StatusOK, directStakedInfo)
} | [
-0.5483654141426086,
-0.0005154325044713914,
0.5229584574699402,
-0.6561067700386047,
-0.251901775598526,
0.26371991634368896,
0.448275625705719,
-0.7379806637763977,
-0.7451599836349487,
-0.11833930760622025,
-1.1349210739135742,
0.26851198077201843,
-0.1596546322107315,
1.002655506134033... |
func (group *networkGroup) getDelegatedInfo(c *gin.Context) {
delegatedInfo, err := group.facade.GetDelegatedInfo()
if err != nil {
shared.RespondWith(c, http.StatusInternalServerError, nil, err.Error(), data.ReturnCodeInternalError)
return
}
c.JSON(http.StatusOK, delegatedInfo)
} | [
0.4297877252101898,
0.21223728358745575,
0.6605371832847595,
-0.42664092779159546,
0.21469007432460785,
0.346043199300766,
0.3935662508010864,
-0.7312323451042175,
-0.4514275789260864,
-0.3185015022754669,
-0.6588836908340454,
0.5977973937988281,
-0.5761240124702454,
1.5120887756347656,
... |
func (group *networkGroup) getEsdts(c *gin.Context) {
allIssuedESDTs, err := group.facade.GetAllIssuedESDTs("")
if err != nil {
shared.RespondWith(c, http.StatusInternalServerError, nil, err.Error(), data.ReturnCodeInternalError)
return
}
c.JSON(http.StatusOK, allIssuedESDTs)
} | [
-0.4412214756011963,
0.7213419675827026,
0.6286368370056152,
-0.8054091930389404,
0.20954127609729767,
-0.056205492466688156,
-0.5914760828018188,
-0.45769667625427246,
-0.014956725761294365,
0.022147158160805702,
0.18216198682785034,
-0.1789008229970932,
-0.0696466788649559,
1.26277542114... |
func (ca *ConfigAgent) Start(path string, checkUnknownPlugins bool, knownPlugins map[string]HelpProvider) error {
if err := ca.Load(path, checkUnknownPlugins, knownPlugins); err != nil {
return err
}
ticker := time.Tick(1 * time.Minute)
go func() {
for range ticker {
if err := ca.Load(path, checkUnknownPlug... | [
-0.0230405330657959,
-0.7666724324226379,
0.4217314124107361,
0.39813581109046936,
0.06386182457208633,
-0.7129803895950317,
0.228431835770607,
0.3143487870693207,
-0.3818906247615814,
0.7654603719711304,
-0.6142717599868774,
0.9979372024536133,
0.18333879113197327,
0.1905081868171692,
0... |
func HashPass(salt []byte, plainPassword string) []byte {
hashedPass := argon2.IDKey([]byte(plainPassword), []byte(salt), 1, 64*1024, 4, 32)
return append(salt, hashedPass...)
} | [
-0.25545039772987366,
-0.15938632190227509,
0.5093427300453186,
0.3207680284976959,
0.4086606800556183,
0.39696502685546875,
-1.6505297422409058,
-0.5599799156188965,
-0.4806371331214905,
0.14832279086112976,
-0.5176489353179932,
0.1054457426071167,
-0.26974332332611084,
-0.442389518022537... |
func CheckPass(passHash []byte, plainPassword string) bool {
var checkPass []byte
checkPass = append(checkPass, passHash...)
salt := passHash[0:8]
userPassHash := HashPass(salt, plainPassword)
return bytes.Equal(userPassHash, checkPass)
} | [
0.22847695648670197,
-0.7454596161842346,
0.6293259263038635,
1.4328774213790894,
0.40744882822036743,
1.0408992767333984,
-0.5886613726615906,
0.09586848318576813,
-0.11123193800449371,
0.28545042872428894,
-0.3004662096500397,
0.29459723830223083,
-0.8335509300231934,
-0.1733598709106445... |
func ConvertPass(plainPassword string) []byte {
salt := make([]byte, 8)
rand.Read(salt)
return HashPass(salt, plainPassword)
} | [
-0.9247117638587952,
-0.5794912576675415,
0.691434383392334,
0.3759888708591461,
0.45597967505455017,
0.7962955236434937,
-0.9968947768211365,
-0.13975729048252106,
0.88834547996521,
0.3442803919315338,
-0.7333491444587708,
-0.02820982225239277,
-0.46453040838241577,
-0.22771799564361572,
... |
func WriteCacheChecksums(suffix string, cacheDir string, paths []string) error {
checkBeforeFilename := filepath.Join(cacheDir, "md5sums_"+suffix)
checkBefore, err := os.OpenFile(checkBeforeFilename, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0755)
if err != nil {
return err
}
defer checkBefore.Close()
hashes := []str... | [
0.3446696698665619,
-0.16278289258480072,
0.8515698909759521,
0.14108026027679443,
0.08375030010938644,
0.2815355062484741,
0.9838035702705383,
0.07632230967283249,
-0.5455500483512878,
-0.22406847774982452,
-0.4846641421318054,
-0.05615997314453125,
0.4271879494190216,
0.4633156955242157,... |
func KendallTauPerf(rank1, rank2 map[int]int, parallelism int) int64 {
if parallelism < 1 {
log.Panicf("parallelism (%d) must be >= 1", parallelism)
}
if len(rank1) != len(rank2) {
log.Panicf("kendall's Tau is a distance only of two ranks are the same.")
}
ids := make([]int, 0, len(rank1))
for k := range ra... | [
-0.2422039657831192,
-0.13058820366859436,
0.7644498944282532,
-0.6064374446868896,
-0.5892785787582397,
-0.583326518535614,
0.04681355506181717,
-0.2204757183790207,
-0.36547818779945374,
0.8973063230514526,
-0.12605150043964386,
0.4502224624156952,
-0.3924356997013092,
-0.574825823307037... |
func createTestPebbleEngine() storage.Engine {
return storage.NewInMemForTesting(context.Background(), roachpb.Attributes{}, 1<<20)
} | [
1.0603998899459839,
0.07236876338720322,
0.3054002523422241,
-0.03200709819793701,
0.39708012342453003,
0.19597309827804565,
0.8839409947395325,
-0.26454392075538635,
0.013863155618309975,
-0.662192165851593,
-1.3345005512237549,
-0.14073950052261353,
-1.2705464363098145,
0.483650386333465... |
func runTestDBAddSSTable(
ctx context.Context, t *testing.T, db *kv.DB, tr *tracing.Tracer, store *kvserver.Store,
) {
tr.TestingRecordAsyncSpans() // we assert on async span traces in this test
{
key := storage.MVCCKey{Key: []byte("bb"), Timestamp: hlc.Timestamp{WallTime: 2}}
data, err := singleKVSSTable(key, r... | [
0.47104936838150024,
1.117347002029419,
0.9933973550796509,
0.531610906124115,
0.477744460105896,
0.5120683312416077,
0.6077036261558533,
-0.9418776035308838,
0.35535871982574463,
0.03137914091348648,
0.09294755756855011,
0.1175365149974823,
-0.1274566650390625,
0.4092880189418793,
0.005... |
func isIpTablesFlushed() bool {
Command := sshToLandingMachine + "'iptables -L'"
output, _ := exec.Command("/bin/sh", "-c", Command).Output()
commandOutput := (string(output))
if strings.Contains(string(commandOutput), "master-1551782451.mayalabs.io") {
fmt.Printf(getTime() + " IPtables EXISTS\n")
return false
... | [
-0.3489159047603607,
0.6229604482650757,
0.8291002511978149,
-0.8648890852928162,
-0.5752821564674377,
0.8881421685218811,
-0.026082800701260567,
-0.014394596219062805,
-0.7122931480407715,
-0.008308623917400837,
-0.8804855346679688,
0.25956010818481445,
-0.4402318596839905,
0.676254212856... |
func restoreIpTables() {
fmt.Printf(getTime() + " Restoreing IPtables")
Command := sshToLandingMachine + "'cd test && iptables-restore < ip_tables.out_26April2020'"
exec.Command("/bin/sh", "-c", Command).Output()
} | [
0.17704589664936066,
-0.11569921672344208,
0.5417025089263916,
-0.6014541387557983,
-0.909745991230011,
0.4137991666793823,
0.5256667137145996,
0.6900240778923035,
-0.73868727684021,
-0.17211748659610748,
-0.4665285348892212,
0.7900132536888123,
-0.7639694809913635,
-0.2526746988296509,
... |
func isEsxRechable(esxIP string) bool {
Command := sshToLandingMachine + "'ping -c 1 " + esxIP + " > /dev/null && echo true || echo false'"
output, _ := exec.Command("/bin/sh", "-c", Command).Output()
commandOutput := (string(output))
if strings.Contains(string(commandOutput), "false") {
fmt.Printf(getTime()+" ES... | [
-0.6929764151573181,
0.10839501768350601,
1.0803534984588623,
0.2141944020986557,
-0.49525678157806396,
0.4831256568431854,
-0.7396183013916016,
0.43875977396965027,
-0.8236173391342163,
0.6651881337165833,
-0.36471810936927795,
0.01734771579504013,
0.004958013072609901,
0.2194227427244186... |
func powerOnVms() {
config, _ := loadConfig()
for key, _ := range config {
if isEsxRechable(key) == true {
fmt.Printf(getTime()+" Checking for turned off VMs in ESX-%s\n", key)
vmId := config[key]
for _, item := range vmId {
powerOn(key, item)
}
}
}
} | [
-0.04785947501659393,
-0.9203134179115295,
0.37072300910949707,
0.1504524201154709,
0.40791115164756775,
0.4004971385002136,
-1.0952421426773071,
1.1918379068374634,
-1.017238974571228,
1.3439983129501343,
-0.2154223620891571,
0.03121751919388771,
-0.503385603427887,
0.5189571380615234,
... |
func powerOn(esxIP string, vmId string) {
Command := sshToLandingMachine + "'sshpass ssh -o StrictHostKeyChecking=no root@" + esxIP + " 'vim-cmd vmsvc/power.on " + vmId + "'" + "'" + " > /dev/null && echo true || echo false"
output, _ := exec.Command("/bin/sh", "-c", Command).Output()
commandOutput := (string(output... | [
1.154201865196228,
-0.8826610445976257,
0.86616051197052,
0.5194991230964661,
0.02501809597015381,
0.06199175491929054,
-1.6824617385864258,
0.9773997068405151,
-0.793341875076294,
1.053815245628357,
-0.8150792717933655,
0.47600841522216797,
-0.5598593950271606,
0.13164767622947693,
-0.1... |
func (in *Application) DeepCopyInto(out *Application) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
} | [
0.32746854424476624,
-0.7549125552177429,
0.5207366347312927,
0.30411529541015625,
-0.6214701533317566,
0.8934041857719421,
0.07226715981960297,
0.4985606074333191,
-1.0392950773239136,
0.0047043305821716785,
-0.42104703187942505,
1.1651496887207031,
0.37829291820526123,
-0.057064000517129... |
func (in *Application) DeepCopy() *Application {
if in == nil {
return nil
}
out := new(Application)
in.DeepCopyInto(out)
return out
} | [
-0.6192387342453003,
-0.16783905029296875,
0.30043789744377136,
1.3848323822021484,
-0.6980482935905457,
0.6609854698181152,
0.44480621814727783,
-0.25998979806900024,
0.4627809226512909,
0.0216701477766037,
0.19686470925807953,
0.09720306843519211,
-0.46992021799087524,
-0.480730354785919... |
func (in *Application) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
0.059462063014507294,
-0.31627824902534485,
0.64078688621521,
0.8597921133041382,
-0.5966074466705322,
0.8062856793403625,
0.9781433939933777,
0.013076337985694408,
-0.3019499182701111,
-0.34601888060569763,
-0.03270922973752022,
-0.08303654938936234,
0.23786680400371552,
-0.19575466215610... |
func (in *ApplicationList) DeepCopyInto(out *ApplicationList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Application, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
} | [
-0.37171268463134766,
-0.012886430136859417,
0.6924824118614197,
0.4697006642818451,
-0.6985310316085815,
0.17657968401908875,
-0.24505259096622467,
0.5753066539764404,
-0.563453733921051,
0.25618866086006165,
-0.9111703634262085,
0.6821924448013306,
-0.16226336359977722,
0.215394392609596... |
func (in *ApplicationList) DeepCopy() *ApplicationList {
if in == nil {
return nil
}
out := new(ApplicationList)
in.DeepCopyInto(out)
return out
} | [
-0.9756857752799988,
0.10422519594430923,
0.2531452178955078,
1.3258949518203735,
-0.5361149907112122,
-0.1270410716533661,
-0.2502959966659546,
-0.008911740966141224,
0.5450970530509949,
0.01184689998626709,
-1.0522289276123047,
-0.08489848673343658,
-0.4666312634944916,
0.426393240690231... |
func (in *ApplicationList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.7790047526359558,
-0.23510681092739105,
0.6926186680793762,
0.758622944355011,
-0.6237996220588684,
0.5972478985786438,
0.5760747194290161,
0.024352967739105225,
0.008651030249893665,
-0.3523414134979248,
-0.7673802971839905,
-0.13192130625247955,
-0.11345643550157547,
0.455388605594635... |
func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec) {
*out = *in
if in.CacheSize != nil {
in, out := &in.CacheSize, &out.CacheSize
x := (*in).DeepCopy()
*out = &x
}
if in.Source != nil {
in, out := &in.Source, &out.Source
*out = new(buildv1alpha1.SourceConfig)
(*in).DeepCopyInto(*out)
}
if i... | [
0.6582943797111511,
-0.12253421545028687,
0.5878415107727051,
-0.006181288510560989,
-0.536582350730896,
0.08472578972578049,
-0.06471526622772217,
0.5263779759407043,
-0.8624201416969299,
-0.37018316984176636,
-0.42255711555480957,
1.0485204458236694,
0.2819235622882843,
0.263422966003417... |
func (in *ApplicationSpec) DeepCopy() *ApplicationSpec {
if in == nil {
return nil
}
out := new(ApplicationSpec)
in.DeepCopyInto(out)
return out
} | [
0.31379327178001404,
0.09323374181985855,
0.040523506700992584,
0.19198565185070038,
-0.6338476538658142,
0.19123049080371857,
-0.3386509418487549,
-0.14679299294948578,
-0.13380227982997894,
-0.23846736550331116,
0.18625934422016144,
0.39709576964378357,
0.16088639199733734,
-0.1865793764... |
func (in *ApplicationStatus) DeepCopyInto(out *ApplicationStatus) {
*out = *in
in.Status.DeepCopyInto(&out.Status)
in.BuildStatus.DeepCopyInto(&out.BuildStatus)
} | [
0.825973391532898,
-0.6413934826850891,
0.21102553606033325,
-0.03203192353248596,
-0.9209134578704834,
0.3354400396347046,
-0.9487833380699158,
0.7743452787399292,
-0.7966399788856506,
-0.7827765941619873,
-0.94142085313797,
1.2766189575195312,
0.665740966796875,
-0.08542394638061523,
-... |
func (in *ApplicationStatus) DeepCopy() *ApplicationStatus {
if in == nil {
return nil
}
out := new(ApplicationStatus)
in.DeepCopyInto(out)
return out
} | [
-0.032716721296310425,
-0.24885383248329163,
-0.23247188329696655,
0.006418794859200716,
-0.9996322393417358,
-0.08365356177091599,
-0.8164519667625427,
-0.10836922377347946,
0.11702237278223038,
-0.8008154630661011,
-0.6093800067901611,
0.16574335098266602,
0.19486075639724731,
0.04083310... |
func (in *BuildStatus) DeepCopyInto(out *BuildStatus) {
*out = *in
if in.BuildCacheRef != nil {
in, out := &in.BuildCacheRef, &out.BuildCacheRef
*out = (*in).DeepCopy()
}
if in.KpackImageRef != nil {
in, out := &in.KpackImageRef, &out.KpackImageRef
*out = (*in).DeepCopy()
}
} | [
0.6694570183753967,
-0.2623475193977356,
0.4116627275943756,
0.034609291702508926,
-0.33826175332069397,
0.08672226220369339,
-0.5357457399368286,
0.9673153758049011,
-0.4999353587627411,
-0.2543574571609497,
-1.1265687942504883,
1.126610517501831,
0.2917073965072632,
0.004738545976579189,... |
func (in *BuildStatus) DeepCopy() *BuildStatus {
if in == nil {
return nil
}
out := new(BuildStatus)
in.DeepCopyInto(out)
return out
} | [
-0.03371486812829971,
-0.1850174516439438,
-0.1735685169696808,
0.6082297563552856,
-0.10109804570674896,
0.4788825213909149,
0.03491394221782684,
0.2812919020652771,
-0.1605205088853836,
-0.7694904804229736,
-1.1242271661758423,
0.4906831979751587,
-0.07881835848093033,
-0.742118060588836... |
func (in *Container) DeepCopyInto(out *Container) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
in.Status.DeepCopyInto(&out.Status)
} | [
0.5262438058853149,
-0.5313960313796997,
0.47980499267578125,
0.21989987790584564,
-0.40002772212028503,
0.13742990791797638,
0.26467570662498474,
0.5315518379211426,
-1.1238739490509033,
-0.3324500024318695,
-0.7064228653907776,
1.321997046470642,
0.5255602598190308,
-0.04891175776720047,... |
func (in *Container) DeepCopy() *Container {
if in == nil {
return nil
}
out := new(Container)
in.DeepCopyInto(out)
return out
} | [
-0.42713043093681335,
0.24878951907157898,
0.38992950320243835,
1.4242455959320068,
-0.34631699323654175,
-0.6854556798934937,
0.6603206992149353,
-0.2043471336364746,
0.2101774513721466,
-0.41176939010620117,
0.06174669787287712,
0.10532674938440323,
-0.4715501666069031,
-0.29571682214736... |
func (in *Container) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.08365511894226074,
0.030301861464977264,
0.6271542310714722,
0.8491430282592773,
-0.2742959260940552,
0.06751397997140884,
0.9735974669456482,
-0.1473032832145691,
-0.3695313334465027,
-0.6016326546669006,
-0.31169936060905457,
-0.09051279723644257,
0.19010165333747864,
-0.2063741385936... |
func (in *ContainerList) DeepCopyInto(out *ContainerList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Container, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
} | [
-0.17686045169830322,
-0.26029524207115173,
0.6514763832092285,
0.6367127299308777,
-0.5065517425537109,
-0.2551584839820862,
-0.14847955107688904,
0.6723750829696655,
-0.605934739112854,
0.06627820432186127,
-1.1012173891067505,
0.21552033722400665,
0.05448764190077782,
0.1324631124734878... |
func (in *ContainerList) DeepCopy() *ContainerList {
if in == nil {
return nil
}
out := new(ContainerList)
in.DeepCopyInto(out)
return out
} | [
-0.8675848245620728,
-0.3711748719215393,
0.2768964171409607,
1.7964584827423096,
-0.46419671177864075,
-0.20397061109542847,
-0.23236633837223053,
-0.07036617398262024,
0.5760908126831055,
0.09984847158193588,
-1.117444396018982,
-0.5849871039390564,
-0.231210395693779,
0.2185861915349960... |
func (in *ContainerList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.6456591486930847,
-0.23486779630184174,
0.635020911693573,
0.9344723224639893,
-0.4090915322303772,
0.06976725161075592,
0.646786630153656,
-0.04237382858991623,
-0.09149117022752762,
-0.49899131059646606,
-0.9148251414299011,
-0.3667638599872589,
0.05791229382157326,
0.2789416015148163... |
func (in *ContainerSpec) DeepCopyInto(out *ContainerSpec) {
*out = *in
} | [
0.8895469903945923,
-0.30379125475883484,
0.5628599524497986,
-0.21251779794692993,
-0.6283476948738098,
0.3293631672859192,
0.011337346397340298,
0.5904726386070251,
-1.1895782947540283,
-0.31010377407073975,
-0.8585553765296936,
1.0841505527496338,
1.04213547706604,
-0.37828120589256287,... |
func (in *ContainerSpec) DeepCopy() *ContainerSpec {
if in == nil {
return nil
}
out := new(ContainerSpec)
in.DeepCopyInto(out)
return out
} | [
0.35008132457733154,
0.03273117169737816,
0.2581731677055359,
0.42387205362319946,
-0.3416915833950043,
0.11160758882761002,
-0.12782453000545502,
-0.253141313791275,
-0.19039785861968994,
-0.18684175610542297,
-0.30447083711624146,
-0.17962431907653809,
0.4949113726615906,
-0.340794652700... |
func (in *ContainerStatus) DeepCopyInto(out *ContainerStatus) {
*out = *in
in.Status.DeepCopyInto(&out.Status)
in.BuildStatus.DeepCopyInto(&out.BuildStatus)
} | [
0.9474477767944336,
-0.6891822814941406,
0.20999698340892792,
0.07370925694704056,
-0.7671403884887695,
0.04159696027636528,
-0.6246539950370789,
0.6672022938728333,
-0.6973648071289062,
-0.8956543207168579,
-1.3001896142959595,
1.162514567375183,
0.706630289554596,
-0.3565785884857178,
... |
func (in *ContainerStatus) DeepCopy() *ContainerStatus {
if in == nil {
return nil
}
out := new(ContainerStatus)
in.DeepCopyInto(out)
return out
} | [
0.2490023970603943,
-0.196158766746521,
-0.14317159354686737,
0.3685637414455414,
-0.6995051503181458,
-0.5820202827453613,
-0.5033450126647949,
-0.25302550196647644,
0.24823926389217377,
-0.9074292182922363,
-0.8566009998321533,
-0.24840176105499268,
0.19393910467624664,
-0.28537967801094... |
func (in *Function) DeepCopyInto(out *Function) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
} | [
0.24921004474163055,
-0.5321876406669617,
0.5001524090766907,
0.08396337181329727,
-0.4070667028427124,
0.393101304769516,
0.029312049970030785,
0.7237287163734436,
-1.5289950370788574,
-0.48058682680130005,
-0.7065261006355286,
1.4012773036956787,
0.5641577839851379,
-0.36133503913879395,... |
func (in *Function) DeepCopy() *Function {
if in == nil {
return nil
}
out := new(Function)
in.DeepCopyInto(out)
return out
} | [
-0.2921587824821472,
0.3652619421482086,
0.2766985595226288,
1.1317083835601807,
-0.04664464294910431,
-0.16496004164218903,
0.17409378290176392,
0.48147252202033997,
-0.20964880287647247,
-0.8721914291381836,
-0.5325526595115662,
0.603985071182251,
-0.33222490549087524,
-1.398128390312194... |
func (in *Function) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
0.11424704641103745,
-0.07211711257696152,
0.5256560444831848,
0.5988784432411194,
-0.5010052919387817,
0.12678520381450653,
0.7934865951538086,
0.16050255298614502,
-0.8052189946174622,
-0.8293967247009277,
-0.5035566687583923,
0.22866849601268768,
0.2293613851070404,
-0.39181122183799744... |
func (in *FunctionList) DeepCopyInto(out *FunctionList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Function, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
} | [
-0.3795982003211975,
-0.06094023212790489,
0.6969501972198486,
0.2005789875984192,
-0.07016114145517349,
-0.29814207553863525,
-0.16561664640903473,
0.8086725473403931,
-0.7284917235374451,
-0.5034667253494263,
-1.36436128616333,
0.8360457420349121,
-0.46420904994010925,
0.1311245411634445... |
func (in *FunctionList) DeepCopy() *FunctionList {
if in == nil {
return nil
}
out := new(FunctionList)
in.DeepCopyInto(out)
return out
} | [
-0.805947482585907,
0.012035408988595009,
0.5416680574417114,
1.2429288625717163,
0.41727980971336365,
-0.4904520809650421,
0.2783185839653015,
0.15376803278923035,
0.5376300811767578,
-0.7471394538879395,
-1.3996052742004395,
0.6056935787200928,
-0.9273973107337952,
0.04613897204399109,
... |
func (in *FunctionList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.366324245929718,
-0.0200036633759737,
0.6599212288856506,
0.5716094970703125,
-0.1241612359881401,
0.10554726421833038,
0.7012521624565125,
0.18010559678077698,
-0.2688620388507843,
-1.027042269706726,
-1.2364970445632935,
0.16701748967170715,
-0.4313678443431854,
0.23455366492271423,
... |
func (in *FunctionSpec) DeepCopyInto(out *FunctionSpec) {
*out = *in
if in.CacheSize != nil {
in, out := &in.CacheSize, &out.CacheSize
x := (*in).DeepCopy()
*out = &x
}
if in.Source != nil {
in, out := &in.Source, &out.Source
*out = new(buildv1alpha1.SourceConfig)
(*in).DeepCopyInto(*out)
}
if in.Fail... | [
0.4157412648200989,
-0.004164399113506079,
0.625252366065979,
-0.12560546398162842,
-0.11441807448863983,
-0.1324906200170517,
0.04408809915184975,
0.48164132237434387,
-0.8809228539466858,
-0.7140855193138123,
-0.6003066301345825,
1.1667907238006592,
0.23617792129516602,
0.148521348834037... |
func (in *FunctionSpec) DeepCopy() *FunctionSpec {
if in == nil {
return nil
}
out := new(FunctionSpec)
in.DeepCopyInto(out)
return out
} | [
0.22763575613498688,
0.43462473154067993,
0.4334142506122589,
0.03484772890806198,
0.09656871855258942,
-0.2799726128578186,
0.03186557814478874,
-0.1460319608449936,
-0.13254192471504211,
-1.070371389389038,
-0.45138469338417053,
0.5888652801513672,
-0.2050471007823944,
-0.651271998882293... |
func (in *FunctionStatus) DeepCopyInto(out *FunctionStatus) {
*out = *in
in.Status.DeepCopyInto(&out.Status)
in.BuildStatus.DeepCopyInto(&out.BuildStatus)
} | [
0.5905246138572693,
-0.3525804281234741,
0.27109163999557495,
-0.3926694393157959,
-0.46573910117149353,
0.05122534930706024,
-0.8695569634437561,
0.8431117534637451,
-0.996532142162323,
-1.1582975387573242,
-1.2365894317626953,
1.706113576889038,
0.40505290031433105,
-0.32143524289131165,... |
func (in *FunctionStatus) DeepCopy() *FunctionStatus {
if in == nil {
return nil
}
out := new(FunctionStatus)
in.DeepCopyInto(out)
return out
} | [
-0.09533427655696869,
0.18138380348682404,
-0.036241110414266586,
-0.39759746193885803,
-0.07191052287817001,
-0.4642655849456787,
-0.651430606842041,
-0.05709385126829147,
-0.0824911817908287,
-1.3586692810058594,
-1.165467619895935,
0.7894400358200073,
-0.4252671003341675,
-0.45049789547... |
func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) {
cl, err := arm.NewClient(moduleName+".Client", moduleVersion, credential, options)
if err != nil {
return nil, err
}
client := &Client{
subscriptionID: subscriptionID,
internal: cl,
}... | [
1.3963391780853271,
-0.4465124309062958,
0.3785836100578308,
-0.17971272766590118,
-0.021721122786402702,
0.2043633759021759,
-0.1967623233795166,
-0.880040168762207,
0.30042359232902527,
-0.0494590625166893,
0.08302035927772522,
1.4750523567199707,
-0.26748019456863403,
-0.834982872009277... |
func (client *Client) getCreateRequest(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, resourceType string, resourceName string, changeResourceID string, options *ClientGetOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}... | [
-0.04551804065704346,
-0.5063661932945251,
0.9872796535491943,
-0.38048452138900757,
-0.16873735189437866,
-0.1718294620513916,
0.14890533685684204,
-0.4557350277900696,
-0.01246674545109272,
0.041334349662065506,
0.6095269322395325,
1.4204654693603516,
-0.13214746117591858,
0.758652806282... |
func (client *Client) getHandleResponse(resp *http.Response) (ClientGetResponse, error) {
result := ClientGetResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.ChangeResourceResult); err != nil {
return ClientGetResponse{}, err
}
return result, nil
} | [
0.04367418587207794,
-0.5668359398841858,
0.5358620285987854,
-0.11057542264461517,
-0.21076250076293945,
-0.5606142282485962,
0.47827446460723877,
-0.17297013103961945,
0.4907222092151642,
-0.5775870084762573,
-0.24666950106620789,
-0.8065412640571594,
-0.5593459606170654,
-0.168641194701... |
func (client *Client) NewListPager(resourceGroupName string, resourceProviderNamespace string, resourceType string, resourceName string, options *ClientListOptions) *runtime.Pager[ClientListResponse] {
return runtime.NewPager(runtime.PagingHandler[ClientListResponse]{
More: func(page ClientListResponse) bool {
re... | [
-0.32452985644340515,
-0.4668634831905365,
0.5694539546966553,
-0.5384318232536316,
-0.15258139371871948,
-0.22289031744003296,
-0.041930705308914185,
-0.8752325177192688,
0.5769707560539246,
0.9728243350982666,
0.23261646926403046,
0.09070514887571335,
-0.6439834833145142,
1.3530794382095... |
func (client *Client) listCreateRequest(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, resourceType string, resourceName string, options *ClientListOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourcePro... | [
-0.09437106549739838,
-0.872320830821991,
0.8517783880233765,
-0.49162787199020386,
-0.17831166088581085,
-0.2605600953102112,
-0.10645216703414917,
-0.17654506862163544,
0.08157144486904144,
0.6750379800796509,
-0.11476092785596848,
1.3367239236831665,
-0.449693888425827,
0.44710820913314... |
func (client *Client) listHandleResponse(resp *http.Response) (ClientListResponse, error) {
result := ClientListResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.ChangeResourceListResult); err != nil {
return ClientListResponse{}, err
}
return result, nil
} | [
-0.5538126230239868,
-1.4433422088623047,
0.40234312415122986,
-0.6509032249450684,
-0.2087547481060028,
-0.7674382925033569,
0.335349977016449,
0.11367680132389069,
1.0196690559387207,
0.6153271198272705,
-0.9093286395072937,
-0.9914540648460388,
-0.4177456498146057,
0.3391312062740326,
... |
func (records Records) Cleaned() Records {
recordsCount := len(records)
if recordsCount == 0 {
return records
}
if recordsCount == 1 {
r := records[0]
if r.Duration == 0 {
r.Duration = DefaultMeetDuration
}
return records
}
sort.Sort(OrderByDate(records))
return fixDuration(recordsCount, records... | [
0.27089589834213257,
-0.08410701155662537,
0.3829854130744934,
0.2709377706050873,
-0.06401744484901428,
-0.07498403638601303,
0.2126910537481308,
-0.5300977826118469,
-0.17650993168354034,
0.7139471173286438,
0.33024126291275024,
0.17499324679374695,
-0.3160388469696045,
0.814353466033935... |
func (records Records) LoadDoctorSchedule(fetcher DoctorScheduleFetcher) {
var lastID, lastSpec, lastName string
doctorRecords := make(Records, 0)
for _, r := range records {
if lastID == "" {
lastID = r.ID()
lastSpec = r.Spec
lastName = r.Name
}
if r.ID() != lastID {
doctorRecords = doctorRecor... | [
-0.4654136300086975,
0.15845364332199097,
0.6087381839752197,
-0.542319655418396,
-1.167398452758789,
-0.6640236973762512,
-0.5033063292503357,
-0.16582538187503815,
-0.01596442610025406,
0.45928630232810974,
-0.5565164685249329,
-0.15912054479122162,
0.1020122617483139,
0.4732652306556701... |
func (mc *MessageCache) AddMailbox(rid int) {
mc.Inbox[rid] = make(map[int]*[]*Message)
} | [
-1.2441643476486206,
0.5402563810348511,
0.5075993537902832,
-0.8549519777297974,
-0.23940281569957733,
0.110930897295475,
-0.01220531202852726,
-0.6284747123718262,
0.8299728035926819,
-0.34338876605033875,
-0.5515230894088745,
0.41619953513145447,
-1.2773040533065796,
0.4689033329486847,... |
func (mc *MessageCache) AddCubby(rid int, sid int) {
messageCubby := []*Message{}
mc.Inbox[rid][sid] = &messageCubby
} | [
-0.5288151502609253,
0.467042475938797,
0.5425234436988831,
0.8034545183181763,
0.6068339943885803,
0.278643935918808,
0.12070044875144958,
-0.47373732924461365,
-0.3558238446712494,
-0.044937506318092346,
-0.7333977818489075,
0.26226872205734253,
-1.2573587894439697,
0.3781203329563141,
... |
func (mc *MessageCache) PostMessage(message *Message) {
//if recipient has never received mail before
if _, ok := mc.Inbox[message.Rid]; !ok {
mc.AddMailbox(message.Rid)
}
//if sender has never sent message to this particular recipient before
if _, ok := mc.Inbox[message.Rid][message.Sid]; !ok {
mc.AddCubby(... | [
-0.8157235383987427,
0.4251457750797272,
0.7596893310546875,
-0.5700153112411499,
-0.29226410388946533,
0.019785968586802483,
0.4899640679359436,
0.12417028099298477,
0.4984753727912903,
-0.20375041663646698,
-0.39669322967529297,
-0.05479009076952934,
-1.0188194513320923,
1.02585542201995... |
func DefaultSimilarity(n1, n2 []*basically.Token, filter basically.TokenFilter) float64 {
var ret float64
l1, l2 := float64(len(n1)), float64(len(n2))
freqTable := make(map[string]int)
for _, tok := range append(n1, n2...) {
norm := porter2.Stem(strings.ToLower(tok.Text))
if _, ok := freqTable[norm]; ok && fil... | [
-0.07226938754320145,
0.681455135345459,
0.49553680419921875,
0.3671790361404419,
-0.1823841631412506,
-0.38168397545814514,
-0.3100114166736603,
-0.33243370056152344,
-0.8142424821853638,
0.04678801819682121,
0.0274336077272892,
-0.006369535345584154,
-0.7236417531967163,
0.34479618072509... |
func _D(fmt string, v ...interface{}) {
if DEBUG {
log.Printf(fmt, v...)
}
} | [
-0.30810022354125977,
-0.132398784160614,
0.5479593873023987,
-0.07017266750335693,
-0.007219463586807251,
-0.3410687744617462,
-0.35039022564888,
-0.21410255134105682,
-0.05128078907728195,
-1.1708691120147705,
0.5766890645027161,
0.7031254768371582,
1.0872206687927246,
1.268290638923645,... |
func SRVFAIL(w dns.ResponseWriter, req *dns.Msg) {
m := new(dns.Msg)
m.SetRcode(req, dns.RcodeServerFailure)
w.WriteMsg(m)
} | [
-0.5485862493515015,
0.7827509641647339,
0.35274624824523926,
-0.31217044591903687,
0.1889626830816269,
0.09195937216281891,
0.336458683013916,
-0.949482798576355,
0.09762048721313477,
-0.031815312802791595,
-1.1694245338439941,
0.7322009205818176,
-0.5143728256225586,
0.8685910105705261,
... |
func wait_for_response(w dns.ResponseWriter, conn *dns.Conn, request *dns.Msg) (response *dns.Msg) {
for {
response, err := conn.ReadMsg()
// some sort of error reading reply
if err != nil {
_D("%s QID:%d error reading message: %s", w.RemoteAddr(), request.Id, err)
SRVFAIL(w, request)
return nil
}
/... | [
0.6326543688774109,
-0.6794989109039307,
0.4381488561630249,
-1.363004446029663,
0.1353856474161148,
-0.3226078152656555,
-0.4373626410961151,
-1.4728857278823853,
1.1625680923461914,
-0.9041104316711426,
0.46673980355262756,
-0.8257375955581665,
-0.28835371136665344,
-0.9069707989692688,
... |
func get_fragment_info(msg *dns.Msg) (num_frags int, sequence_num int) {
num_frags = -1
sequence_num = -1
resp_edns0 := msg.IsEdns0()
if resp_edns0 != nil {
for _, opt := range resp_edns0.Option {
if opt.Option() == dns.EDNS0LOCALSTART + 1 {
num_frags = int(opt.(*dns.EDNS0_LOCAL).Data[0])
sequence_num ... | [
-0.6397501826286316,
-0.326863557100296,
0.7007715106010437,
-0.9185240268707275,
0.2442033588886261,
-1.387861728668213,
0.3737848997116089,
0.556746780872345,
0.7655483484268188,
-0.3509836196899414,
-0.9393309354782104,
-0.2747931182384491,
-0.15333807468414307,
0.8361114263534546,
0.... |
func (networkProtocol *NetworkProtocolSettings) Update() error {
// Get a representation of the object's original state so we can find what
// to update.
original := new(NetworkProtocolSettings)
err := original.UnmarshalJSON(networkProtocol.rawData)
if err != nil {
return err
}
readWriteFields := []string{
... | [
-0.9046301245689392,
-0.6572532057762146,
0.2596993148326874,
-0.5442922115325928,
-0.34687238931655884,
0.3418239951133728,
-0.266602486371994,
-0.5083141326904297,
-0.05515368655323982,
0.43529510498046875,
-0.1233895868062973,
-0.9106335043907166,
-1.4581756591796875,
-0.238693460822105... |
func generateId(mutex *sync.Mutex, ids map[uint16]bool) uint16 {
mutex.Lock()
id := uint16(1)
for ; id <= math.MaxUint16; id++ {
if _, ok := ids[id]; !ok {
break
}
}
ids[id] = true
mutex.Unlock()
return id
} | [
-0.3946974575519562,
0.5172514319419861,
0.6874420046806335,
-0.5150663256645203,
-0.175629660487175,
0.22749295830726624,
-0.5059271454811096,
0.20177534222602844,
0.6529936194419861,
0.02153964899480343,
-0.7633677124977112,
-0.8399852514266968,
-1.057348370552063,
-0.18544901907444,
-... |
func getExistingIds(config string, re *regexp.Regexp) (map[uint16]bool, error) {
ids := map[uint16]bool{}
digitsRe := "([0-9]+)"
if !strings.Contains(re.String(), digitsRe) {
return ids, fmt.Errorf("regexp %s doesn't contain digits submatch %s", re.String(), digitsRe)
}
read, err := ioutil.ReadFile(config)
if... | [
-0.16952726244926453,
-0.10198847204446793,
0.8693738579750061,
-0.5644704103469849,
0.4122123420238495,
0.29439035058021545,
0.2218819409608841,
1.2504463195800781,
-0.6082851886749268,
1.113632082939148,
-0.678487241268158,
-0.278145432472229,
-0.47209861874580383,
-0.14333942532539368,
... |
func CheckHTTPResponseStatusCode(resp *http.Response) error {
switch resp.StatusCode {
case 200, 201, 202, 204, 206:
return nil
case 400:
return errors.New("Error: response == 400 bad request")
case 401:
return errors.New("Error: response == 401 unauthorised")
case 403:
return errors.New("Error: response =... | [
-0.43307411670684814,
-1.2666652202606201,
0.46682634949684143,
-0.2645621597766876,
0.12275024503469467,
0.01690859906375408,
-0.06286624819040298,
0.10245838761329651,
0.5497776865959167,
0.31314870715141296,
-0.5784410834312439,
0.05432047322392464,
-0.42595961689949036,
-0.076115466654... |
func parseQuantityString(str string) (positive bool, value, num, denom, suffix string, err error) {
positive = true
pos := 0
end := len(str)
// handle leading sign
if pos < end {
switch str[0] {
case '-':
positive = false
pos++
case '+':
pos++
}
}
// strip leading zeros
Zeroes:
for i := pos; ... | [
0.23887498676776886,
-1.1802196502685547,
0.8366861939430237,
-0.19006679952144623,
-0.7572246193885803,
-0.8335281014442444,
0.26227739453315735,
0.0021764065604656935,
-0.270692378282547,
-0.2950458228588104,
0.3844258189201355,
-0.23870159685611725,
0.22950346767902374,
-0.0489616394042... |
func newScanner(input string) *scanner {
s := &scanner{
input: input,
items: make(chan tokenRef),
}
go s.run()
return s
} | [
-0.11823209375143051,
-0.881073534488678,
0.10878265649080276,
-0.25252893567085266,
-1.1395304203033447,
-0.12280061095952988,
-0.025923127308487892,
-0.2678399682044983,
0.4905461072921753,
-1.2053606510162354,
-0.49663108587265015,
0.44217661023139954,
-0.5435322523117065,
0.99807232618... |
func (s *scanner) emit(t token) {
s.items <- tokenRef{t, s.start, s.input[s.start:s.pos]}
s.start = s.pos
} | [
-0.9082570672035217,
-0.18822091817855835,
0.19127514958381653,
-1.408339023590088,
-0.07476058602333069,
0.2644053101539612,
-0.3983071446418762,
0.03609826788306236,
-0.583380937576294,
0.060417525470256805,
-1.0233783721923828,
0.4668114185333252,
0.05070731043815613,
-0.173808246850967... |
func (s *scanner) nextToken() tokenRef {
item := <-s.items
s.lastPos = item.pos
return item
} | [
-0.3016360402107239,
-0.6217405200004578,
0.43120327591896057,
-0.45691537857055664,
-0.9547569155693054,
0.022831855341792107,
0.12068555504083633,
0.5758895874023438,
0.4562099277973175,
-1.129443883895874,
-0.41244059801101685,
0.28452399373054504,
0.11534151434898376,
0.059161800891160... |
func (s *scanner) run() {
for state := scanMain; state != nil; {
state = state(s)
}
close(s.items)
} | [
-1.4235931634902954,
-0.8345739841461182,
0.3989723324775696,
-0.2382989525794983,
-0.669337272644043,
0.04347127676010132,
0.8400776386260986,
0.5242558121681213,
0.3209194242954254,
-0.6896958351135254,
-0.2621203660964966,
-0.5717870593070984,
-0.28799429535865784,
0.46122556924819946,
... |
func (s *scanner) drain() {
for range s.items {
}
} | [
-1.1739482879638672,
-0.5105319023132324,
0.1748599261045456,
-1.1649147272109985,
0.5324195027351379,
0.48004794120788574,
0.46204376220703125,
-0.36322954297065735,
0.3103764057159424,
-1.977150797843933,
0.09608127921819687,
0.32672637701034546,
-0.3747556209564209,
0.6013123393058777,
... |
func (s *scanner) next() rune {
if s.pos >= len(s.input) {
s.width = 0
return eof
}
r, w := utf8.DecodeRuneInString(s.input[s.pos:])
s.width = w
s.pos += s.width
return r
} | [
-0.3294074833393097,
0.027195783331990242,
0.4217624068260193,
-0.19970451295375824,
-1.4625906944274902,
-0.32287195324897766,
-0.42561987042427063,
0.3037090003490448,
0.7386776208877563,
-0.6498292684555054,
0.9342582821846008,
0.12807081639766693,
-0.47063934803009033,
-0.1969577670097... |
func (s *scanner) backup() {
s.pos -= s.width
} | [
-0.29310041666030884,
-0.44344520568847656,
0.3749365210533142,
-0.5279331207275391,
-0.5655147433280945,
0.3230408728122711,
1.051439881324768,
0.06372935324907303,
0.724009096622467,
-0.3099001944065094,
0.2759324908256531,
-0.42051053047180176,
-0.40613552927970886,
-0.12768253684043884... |
func (s *scanner) peek() rune {
r := s.next()
s.backup()
return r
} | [
0.5045040249824524,
0.39681369066238403,
0.6558535695075989,
-0.5146746039390564,
-0.6486028432846069,
-0.37309399247169495,
0.2570667862892151,
-0.9944254755973816,
0.35339435935020447,
-0.5427846312522888,
0.6072109937667847,
0.7000505328178406,
0.08808080852031708,
-0.3871866762638092,
... |
func scanWhitespace(s *scanner) stateFn {
for isWhitespace(s.peek()) {
s.next()
}
s.emit(tokenWS)
return scanMain
} | [
-0.5814850330352783,
0.1345946192741394,
0.3290371596813202,
-0.2256826013326645,
-1.402500867843628,
-1.219996452331543,
0.43704819679260254,
-0.5710659027099609,
1.2740025520324707,
-0.5118839740753174,
-0.08928368985652924,
0.8102469444274902,
-0.10186483711004257,
1.2403271198272705,
... |
func scanWord(s *scanner) stateFn {
for isWord(s.peek()) {
s.next()
}
s.emit(tokenIDENT)
return scanMain
} | [
-0.10369551181793213,
0.18162277340888977,
0.21682874858379364,
1.074114441871643,
-1.3055522441864014,
-0.6052181720733643,
-0.29970821738243103,
-0.2021765559911728,
0.8377598524093628,
0.34412309527397156,
-0.2508719563484192,
0.5894375443458557,
-0.36492449045181274,
0.6873410940170288... |
func scanSingleQuote(s *scanner) stateFn {
Loop:
for {
switch s.next() {
case '\\':
if r := s.next(); r != eof {
break
}
fallthrough
case eof:
// Should this be a req? Unterminated quoted string.
break Loop
case '\'':
break Loop
}
}
s.emit(tokenFIELD)
return scanMain
} | [
0.02531728334724903,
-0.482810914516449,
0.58182293176651,
0.6302080750465393,
-0.0350223109126091,
-0.4100273847579956,
0.20274610817432404,
0.059452712535858154,
0.703256368637085,
-0.15484194457530975,
0.5932249426841736,
0.32797548174858093,
-0.8223119378089905,
0.2958189845085144,
-... |
func scanDoubleQuote(s *scanner) stateFn {
Loop:
for {
switch s.next() {
case '\\':
if r := s.next(); r != eof {
break
}
fallthrough
case eof:
// Should this be a req? Unterminated quoted string.
break Loop
case '"':
break Loop
}
}
s.emit(tokenFIELD)
return scanMain
} | [
-0.2410358041524887,
-0.6989285945892334,
0.6959945559501648,
0.668484091758728,
-0.39329251646995544,
-0.6554917693138123,
-0.12949761748313904,
-1.015971064567566,
-0.1020040288567543,
0.1343207210302353,
-0.05114499107003212,
0.3969229757785797,
-0.4721929728984833,
0.28023669123649597,... |
func isWhitespace(ch rune) bool {
return ch == ' ' || ch == '\t'
} | [
-0.3616725504398346,
0.02028804086148739,
0.21967583894729614,
-0.4866502285003662,
-0.033605121076107025,
-0.862749457359314,
-0.39142006635665894,
-1.1378505229949951,
0.28533345460891724,
0.27925580739974976,
-0.4053478538990021,
0.7735172510147095,
0.542481005191803,
1.1126891374588013... |
func isWord(ch rune) bool {
return ch >= '!' && ch <= '~' && ch != ':'
} | [
-0.4715096652507782,
-0.10528740286827087,
0.7415274381637573,
0.8161076903343201,
-0.5792107582092285,
0.7110297083854675,
-0.8870595097541809,
0.3407033681869507,
-0.124546580016613,
1.0222786664962769,
-0.5158553123474121,
0.8551293015480042,
-0.7063589096069336,
0.558601438999176,
-0... |
func (p *politeiawww) cmsUsersByDomain(d cms.DomainTypeT) ([]user.CMSUser, error) {
// Setup plugin command
cu := user.CMSUsersByDomain{
Domain: int(d),
}
payload, err := user.EncodeCMSUsersByDomain(cu)
if err != nil {
return nil, err
}
pc := user.PluginCommand{
ID: user.CMSPluginID,
Command: user.C... | [
-0.6488438844680786,
0.1468922644853592,
0.4744677245616913,
-0.5041206479072571,
-0.07395973801612854,
-0.4877416491508484,
0.1599987894296646,
-0.7040354013442993,
0.4107988178730011,
0.06669354438781738,
-0.3422946035861969,
0.8160723447799683,
-1.003538727760315,
0.5559808015823364,
... |
func (p *politeiawww) processInviteNewUser(u cms.InviteNewUser) (*www.NewUserReply, error) {
log.Tracef("processInviteNewUser: %v", u.Email)
// Validate email
if !validEmail.MatchString(u.Email) {
log.Debugf("processInviteNewUser: invalid email '%v'", u.Email)
return nil, www.UserError{
ErrorCode: www.ErrorS... | [
0.033353786915540695,
0.06963380426168442,
0.5383817553520203,
0.3633098602294922,
0.23402045667171478,
-0.2910791337490082,
-0.05590246617794037,
-0.108092300593853,
0.0673864483833313,
0.3100140690803528,
-0.9269711375236511,
0.2061954140663147,
-1.0316327810287476,
0.07164556533098221,
... |
func (p *politeiawww) processRegisterUser(u cms.RegisterUser) (*cms.RegisterUserReply, error) {
log.Tracef("processRegisterUser: %v", u.Email)
var reply cms.RegisterUserReply
// Check that the user already exists.
existingUser, err := p.userByEmail(u.Email)
if err != nil {
if err == user.ErrUserNotFound {
lo... | [
-0.6354902982711792,
0.5843759775161743,
0.7168334126472473,
0.4374621510505676,
0.6366981863975525,
-1.025833010673523,
0.37135687470436096,
0.10239779204130173,
0.2622022032737732,
0.57990962266922,
-0.4289666414260864,
-0.3373716175556183,
-0.018206758424639702,
0.4715704023838043,
0.... |
func (s *DependencySolver) ResolveVersion(name string, dep depsv1ext.Dependency) (cnab.OCIReference, error) {
ref, err := cnab.ParseOCIReference(dep.Bundle)
if err != nil {
return cnab.OCIReference{}, fmt.Errorf("error parsing dependency (%s) bundle %q as OCI reference: %w", name, dep.Bundle, err)
}
// Here is w... | [
-0.3094872832298279,
-0.6277949213981628,
0.622673749923706,
0.3383292853832245,
0.3225477933883667,
-0.44746026396751404,
0.1955156773328781,
-0.28966933488845825,
0.25824952125549316,
0.8216871619224548,
0.32033348083496094,
-0.5801490545272827,
0.05393459275364876,
0.38503214716911316,
... |
func (p *ServerProcessor) SetByteOrder(littleEndian bool) {
p.littleEndian = littleEndian
} | [
0.100132517516613,
0.2651568353176117,
0.5488758683204651,
-1.2883270978927612,
0.07149394601583481,
1.1723405122756958,
-0.6748785972595215,
0.15143458545207977,
-0.6455071568489075,
-0.6908246278762817,
-2.067075490951538,
0.47658389806747437,
-1.0351251363754272,
1.726409912109375,
-0... |
func (c *convertCmd) userByPubKey(pubkey string) (*v1.AbridgedUser, error) {
url := politeiaHost + "/v1/users?publickey=" + pubkey
r, err := c.client.Get(url)
if err != nil {
return nil, err
}
defer r.Body.Close()
body, err := ioutil.ReadAll(r.Body)
if err != nil {
return nil, err
}
var ur v1.UsersReply
... | [
-0.5756710171699524,
0.3459720313549042,
0.4099629521369934,
-0.5636829733848572,
0.1843612939119339,
-0.8094682693481445,
0.3773813247680664,
-1.107967495918274,
0.03953081741929054,
0.8851105570793152,
-0.03576593101024628,
0.4665757119655609,
-0.8585066795349121,
0.14983081817626953,
... |
func CalculateWorkingCarsPerHour(productionRate int, successRate float64) float64 {
return float64(productionRate) * successRate / float64(100)
} | [
-0.7137318849563599,
-0.41553205251693726,
0.48881712555885315,
0.4786209464073181,
-0.8645485639572144,
0.1083136647939682,
-1.2151832580566406,
-0.0741056427359581,
-1.257863998413086,
0.39655759930610657,
-0.11191301792860031,
-0.5712073445320129,
-0.7069064974784851,
-0.845840334892273... |
func CalculateWorkingCarsPerMinute(productionRate int, successRate float64) int {
return int(CalculateWorkingCarsPerHour(productionRate, successRate)) / MinutesInHour
} | [
-1.1404544115066528,
-0.5956499576568604,
0.3641852140426636,
-0.01846642792224884,
-0.8854779005050659,
-0.25326448678970337,
-1.6085087060928345,
-0.5526652336120605,
-0.8591960072517395,
-0.265426903963089,
-0.015189574100077152,
-0.3875184953212738,
-1.4633543491363525,
-0.732376933097... |
func CalculateCost(carsCount int) uint {
groups := int(carsCount / GroupSize)
units := int(carsCount % GroupSize)
return uint((groups * GroupCost) + (units * UnitCost))
} | [
-1.0227868556976318,
0.32387498021125793,
0.44513264298439026,
-1.1362534761428833,
-0.43670183420181274,
-0.7147896885871887,
0.17406867444515228,
0.4894736409187317,
-0.5343887209892273,
0.09685797989368439,
-0.3218810558319092,
-1.0454870462417603,
-0.6643974184989929,
-0.21352468430995... |
func NewManager(task *tasks.Task, rootDirectory string) (*GoManager, error) {
var selectedVersion *version.Version
var installedVersions version.Collection
fileInfos, err := ioutil.ReadDir(rootDirectory)
if err != nil {
return nil, err
}
for _, fileInfo := range fileInfos {
if fileInfo.IsDir() || fileInfo.M... | [
-0.5174887180328369,
-1.0755488872528076,
0.6356713175773621,
0.6790297627449036,
-0.3162292242050171,
0.03136654943227768,
0.1019258126616478,
0.1511857658624649,
-0.3689337372779846,
0.22983406484127045,
0.2818596065044403,
0.025085218250751495,
-0.09886790812015533,
1.8152663707733154,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.