text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (f JobPositionMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error { if m, ok := m.(*ent.JobPositionMutation); ok { return f(ctx, m) } return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.JobPositionMutation", m) }
[ -0.8164753317832947, -0.13855037093162537, 0.27611061930656433, -0.3921531140804291, -0.0010352901881560683, 0.5040480494499207, -0.2637253403663635, 0.707822859287262, 0.6836751103401184, 0.5946478247642517, 0.4730983376502991, -0.7119165658950806, -0.26141810417175293, -0.006075691431760...
func (f PurposeQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error { if q, ok := q.(*ent.PurposeQuery); ok { return f(ctx, q) } return Denyf("ent/privacy: unexpected query type %T, expect *ent.PurposeQuery", q) }
[ -0.1997113674879074, 0.5513959527015686, 0.2505124509334564, -0.4879302978515625, 0.9493814706802368, 0.43395039439201355, -1.0134682655334473, 0.13342060148715973, 0.9204833507537842, 0.2934875190258026, 1.4456185102462769, 0.898482084274292, 0.3273721933364868, 0.6278279423713684, -0.2...
func (f PurposeMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error { if m, ok := m.(*ent.PurposeMutation); ok { return f(ctx, m) } return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.PurposeMutation", m) }
[ -1.3950484991073608, 0.16406720876693726, 0.25008097290992737, -0.005295856390148401, 0.5328342318534851, 0.21318496763706207, -0.16582977771759033, 0.8694289922714233, 1.2894930839538574, 1.0159215927124023, 1.0789905786514282, 0.32310351729393005, 0.17472150921821594, 0.09138032048940659...
func (f RepairingQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error { if q, ok := q.(*ent.RepairingQuery); ok { return f(ctx, q) } return Denyf("ent/privacy: unexpected query type %T, expect *ent.RepairingQuery", q) }
[ 0.07417955994606018, 0.6628247499465942, 0.2539948523044586, -0.6076062917709351, 0.4961659908294678, 0.5046060085296631, -0.8058223724365234, 0.4601095914840698, 0.7426753640174866, -0.2495964616537094, 0.9350366592407227, 0.7578715682029724, -0.21052588522434235, 0.27568960189819336, -...
func (f RepairingMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error { if m, ok := m.(*ent.RepairingMutation); ok { return f(ctx, m) } return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.RepairingMutation", m) }
[ -0.7712857127189636, 0.4551756680011749, 0.24820491671562195, -0.5171744227409363, -0.09305156767368317, 0.5215611457824707, 0.04292653128504753, 1.0970184803009033, 1.0143730640411377, 0.38006913661956787, 0.8003089427947998, -0.047828204929828644, -0.5609410405158997, -0.3990524709224701...
func (f TransportQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error { if q, ok := q.(*ent.TransportQuery); ok { return f(ctx, q) } return Denyf("ent/privacy: unexpected query type %T, expect *ent.TransportQuery", q) }
[ 0.04157955199480057, 0.5286093950271606, 0.25307130813598633, -0.733134388923645, 0.5081146955490112, 0.6928525567054749, -1.1541783809661865, 0.022862151265144348, 0.6340497732162476, 0.3280530869960785, 1.1472351551055908, 0.32933300733566284, 0.1764834076166153, 0.2584291696548462, -0...
func (f TransportMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error { if m, ok := m.(*ent.TransportMutation); ok { return f(ctx, m) } return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.TransportMutation", m) }
[ -1.0866485834121704, -0.05945834517478943, 0.3585008680820465, -0.5490841269493103, 0.14361871778964996, 0.5861821174621582, -0.4027441442012787, 0.7509965300559998, 1.0417988300323486, 0.889443576335907, 0.7475199699401855, -0.43556028604507446, -0.17808552086353302, -0.2912743091583252, ...
func (f UrgentQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error { if q, ok := q.(*ent.UrgentQuery); ok { return f(ctx, q) } return Denyf("ent/privacy: unexpected query type %T, expect *ent.UrgentQuery", q) }
[ 0.21652239561080933, 0.10365522652864456, 0.22998274862766266, -0.7042624354362488, 0.38555407524108887, 0.7914873957633972, -1.1089330911636353, 0.42392289638519287, 0.978186309337616, 0.2507602870464325, 1.2645827531814575, 0.35140714049339294, 0.47083553671836853, 0.36574268341064453, ...
func (f UrgentMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error { if m, ok := m.(*ent.UrgentMutation); ok { return f(ctx, m) } return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.UrgentMutation", m) }
[ -0.6543378233909607, -0.3284147381782532, 0.30038148164749146, -0.4301329553127289, 0.1445431262254715, 0.7902969121932983, -0.37157511711120605, 1.269465684890747, 1.1657980680465698, 1.0257632732391357, 0.9697074890136719, -0.4895554482936859, 0.4230893850326538, -0.2235725373029709, 0...
func (f UserQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error { if q, ok := q.(*ent.UserQuery); ok { return f(ctx, q) } return Denyf("ent/privacy: unexpected query type %T, expect *ent.UserQuery", q) }
[ 0.10304027050733566, 0.37958014011383057, 0.17668776214122772, -0.12150736898183823, 0.26303717494010925, 0.8295207619667053, -0.7156161069869995, 0.10269683599472046, 1.0556868314743042, 0.2787928581237793, 0.9931556582450867, 0.6237409710884094, 0.2228618562221527, 0.415351539850235, -...
func (f UserMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error { if m, ok := m.(*ent.UserMutation); ok { return f(ctx, m) } return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.UserMutation", m) }
[ -0.7499511241912842, 0.20209434628486633, 0.13512220978736877, 0.3747658431529999, -0.15674322843551636, 0.8078874349594116, 0.20765309035778046, 0.7779244780540466, 1.1407103538513184, 0.8352670073509216, 0.5440503358840942, -0.024559369310736656, -0.06211858615279198, -0.1784673482179641...
func (e ProvinceEdges) ProvinceIDOrErr() ([]*User, error) { if e.loadedTypes[0] { return e.ProvinceID, nil } return nil, &NotLoadedError{edge: "Province_ID"} }
[ -0.5385376214981079, -0.6066933870315552, 0.35758209228515625, 0.25405916571617126, 0.07062879204750061, 0.41376209259033203, -0.510349690914154, 0.08071223646402359, 1.421512484550476, 0.49013420939445496, 0.5087030529975891, -0.10480871796607971, -1.043534755706787, -0.007648824248462915...
func (*Province) scanValues() []interface{} { return []interface{}{ &sql.NullInt64{}, // id &sql.NullString{}, // Province_Name } }
[ -0.9931569695472717, -0.005782529711723328, 0.289887398481369, 0.3944909870624542, -0.32929909229278564, -0.18398728966712952, -1.6851502656936646, -0.29809126257896423, 0.5784631967544556, -0.8603417873382568, -0.2551460862159729, -0.2495923936367035, -0.4472588896751404, 0.47465130686759...
func (pr *Province) assignValues(values ...interface{}) error { if m, n := len(values), len(province.Columns); m < n { return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) } value, ok := values[0].(*sql.NullInt64) if !ok { return fmt.Errorf("unexpected type %T for field id", value) } pr.ID = in...
[ -0.7827379703521729, -0.2271614372730255, 0.5622438788414001, 0.07740828394889832, 0.411080002784729, 0.11469458788633347, -0.7956562638282776, 0.282537043094635, 0.08823241293430328, -0.4383400082588196, 0.3121800124645233, -0.7574334144592285, -0.4912501275539398, 0.7343752384185791, -...
func (pr *Province) QueryProvinceID() *UserQuery { return (&ProvinceClient{config: pr.config}).QueryProvinceID(pr) }
[ 0.49637719988822937, -0.5163536071777344, 0.33365827798843384, 0.26392680406570435, -0.37744584679603577, -0.048662833869457245, -0.28075486421585083, 0.16263683140277863, 0.9847007393836975, -0.17762057483196259, 0.6928825974464417, 0.33744144439697266, -1.3701038360595703, -0.69935506582...
func (pr *Province) Update() *ProvinceUpdateOne { return (&ProvinceClient{config: pr.config}).UpdateOne(pr) }
[ -0.42116057872772217, -0.9528170228004456, 0.22993940114974976, -0.3664093017578125, 0.28067272901535034, 0.16411501169204712, -0.573577880859375, 0.21089933812618256, 0.7686402797698975, -0.086210697889328, 0.0752313882112503, -0.19246581196784973, -1.9333347082138062, -1.0956109762191772...
func (pr *Province) Unwrap() *Province { tx, ok := pr.config.driver.(*txDriver) if !ok { panic("ent: Province is not a transactional entity") } pr.config.driver = tx.drv return pr }
[ -0.6210713982582092, 0.21221578121185303, 0.35813167691230774, -0.9678093791007996, 0.2705518901348114, 0.04222506657242775, -0.2932780683040619, 0.7485663890838623, 0.46437305212020874, 0.42240071296691895, 0.9074527025222778, 0.3226306140422821, -0.13449202477931976, -1.3483935594558716,...
func (pr *Province) String() string { var builder strings.Builder builder.WriteString("Province(") builder.WriteString(fmt.Sprintf("id=%v", pr.ID)) builder.WriteString(", Province_Name=") builder.WriteString(pr.ProvinceName) builder.WriteByte(')') return builder.String() }
[ -0.17966142296791077, -1.4218190908432007, 0.1969420611858368, -1.158665657043457, -0.08417843282222748, 0.6692818999290466, -0.3950405418872833, -0.6109328269958496, 0.36581850051879883, -0.0757649838924408, 0.04878178983926773, 0.6334857940673828, -0.7427963614463806, -0.9820364713668823...
func (a *ArtifactDriver) Load(artifact *wfv1.Artifact, path string) error { lf, err := os.Create(path) if err != nil { return err } defer func() { _ = lf.Close() }() req, err := http.NewRequest(http.MethodGet, artifact.Artifactory.URL, nil) if err != nil { return err } req.SetBasicAuth(a.Username, a.Pas...
[ -0.25267845392227173, -0.362560898065567, 0.8009349703788757, -0.39576542377471924, 0.09714266657829285, 0.1659996509552002, -0.1392640769481659, -0.5430483222007751, -0.3715289533138275, 0.8945832252502441, 0.4782564043998718, 0.39379364252090454, -0.18645720183849335, -1.1442146301269531...
func (a *ArtifactDriver) Save(path string, artifact *wfv1.Artifact) error { f, err := os.Open(filepath.Clean(path)) if err != nil { return err } req, err := http.NewRequest(http.MethodPut, artifact.Artifactory.URL, f) if err != nil { return err } req.SetBasicAuth(a.Username, a.Password) res, err := (&http.C...
[ -0.6881962418556213, -0.15197734534740448, 0.43949711322784424, -0.2709972858428955, 0.6980211138725281, -0.2433493733406067, 0.37188073992729187, -0.7972537279129028, -0.8998723030090332, 0.9276373982429504, -0.30536845326423645, 0.21272842586040497, -0.250679075717926, -0.615161716938018...
func Inf(sign int) float32 { var v uint32 if sign >= 0 { v = uvinf } else { v = uvneginf } return Float32frombits(v) }
[ 0.48433026671409607, 0.7588303089141846, 0.1633768081665039, 0.6146801710128784, -1.1542227268218994, -0.0050003379583358765, -0.2359328269958496, -0.13060833513736725, -0.12923121452331543, -1.0659841299057007, -0.4436458945274353, 0.03817494213581085, 0.01946442946791649, 1.0923588275909...
func NaN() float32 { return Float32frombits(uvnan) }
[ -0.15648695826530457, 0.730413556098938, 0.11332279443740845, 0.5777080655097961, -0.5258574485778809, 1.0572187900543213, 0.7689350843429565, -0.5606799125671387, -0.5366680026054382, -1.688132882118225, 0.3286662697792053, 0.9675367474555969, 0.3281666338443756, 0.18096286058425903, 0....
func IsNaN(f float32) (is bool) { // IEEE 754 says that only NaNs satisfy `f != f`. // To avoid the floating-point hardware, could use: // `x := Float32bits(f)` // `return uint32(x>>shift)&mask == mask && x != uvinf && x != uvneginf` return f != f }
[ -0.9327711462974548, 0.6356396079063416, 0.4742794632911682, 0.9573240280151367, -0.7288462519645691, 0.7534304261207581, 0.547726571559906, -0.357321560382843, -0.3062146008014679, -0.7232372164726257, -0.7717361450195312, 0.058049410581588745, 0.12207160890102386, 0.02286406233906746, ...
func IsInf(f float32, sign int) bool { // Test for infinity by comparing against maximum float. // To avoid the floating-point hardware, could use: // `x := Float32bits(f)` // `return sign >= 0 && x == uvinf || sign <= 0 && x == uvneginf` return sign >= 0 && f > MaxFloat32 || sign <= 0 && f < -MaxFloat32 }
[ 0.21176853775978088, 0.3736502528190613, 0.46485546231269836, 0.8945916891098022, -0.8852518796920776, 0.33765745162963867, -0.21812769770622253, 0.36623167991638184, -0.2931327223777771, -0.7125439047813416, -0.8517592549324036, 0.17275820672512054, -0.8133363723754883, 0.7652068734169006...
func NewConversion() Conversion { return Conversion{} }
[ -0.19554226100444794, -0.8952213525772095, 0.062417805194854736, 0.7297495603561401, -1.4525307416915894, -0.8047276139259338, 0.11510798335075378, -0.6295483112335205, 0.2797635495662689, 0.2675434947013855, -0.6294698119163513, -0.7326321005821228, -0.20917300879955292, 0.479100078344345...
func (f Conversion) TransformToIBMIoT(edgexcontext *appcontext.Context, params ...interface{}) (continuePipeline bool, stringType interface{}) { if len(params) < 1 { return false, errors.New("No Event Received") } edgexcontext.LoggingClient.Debug("Transforming to IBMIoT format") if event, ok := params[0].(model...
[ -0.9553213715553284, -0.53614342212677, 0.7022040486335754, -0.5973635911941528, -0.23742158710956573, 0.41489270329475403, -0.19379785656929016, -0.7281711101531982, -0.3244699239730835, 0.7672019600868225, -0.5122369527816772, -0.13139383494853973, -0.6027316451072693, -0.523528814315795...
func Average(values ...float64) float64 { sum := Sum(values...) return sum / float64(len(values)) }
[ -0.3474804759025574, 0.7573769688606262, 0.09159765392541885, 1.001272439956665, 0.4928218126296997, 0.5702822208404541, 0.10935677587985992, 0.2668251395225525, -1.1179685592651367, -0.1447003185749054, -0.1250292956829071, 0.289231538772583, -0.4269019365310669, 1.0094901323318481, -0....
func Minimum(values ...float64) float64 { // initialized with positive infinity, all finite numbers are smaller than it curMin := math.Inf(1) for _, v := range values { if v < curMin { curMin = v } } return curMin }
[ -0.14755497872829437, 0.5242618322372437, 0.04962904751300812, 1.2694162130355835, 0.43049368262290955, 0.060144610702991486, -0.45271506905555725, -0.4770546555519104, -0.85611492395401, -1.1260074377059937, 0.31697285175323486, -0.4524686336517334, -1.0816748142242432, 1.125675916671753,...
func Maximum(values ...float64) float64 { // initialized with negative infinity, all finite numbers are bigger than it curMax := math.Inf(-1) for _, v := range values { if v > curMax { curMax = v } } return curMax }
[ -0.04960786923766136, 0.9047304391860962, 0.10027100145816803, 1.8001708984375, 0.7074502110481262, -0.2512386441230774, -0.6579574346542358, 0.2045903205871582, -0.7511695623397827, -0.6332955360412598, 0.35722798109054565, 0.16064994037151337, -0.8475691676139832, 0.8192641139030457, 0...
func Sum(values ...float64) float64 { res := 0.0 for _, v := range values { res += v } return res }
[ 0.010174593888223171, 0.7564521431922913, 0.04713842645287514, 0.7451866865158081, 0.8788851499557495, -0.05865674465894699, 0.31337669491767883, -0.30933454632759094, -0.8686842322349548, -0.6158169507980347, -0.19530151784420013, 0.11700362712144852, -0.3419894576072693, 0.74870866537094...
func ParseAggregator(aggregator string) (AggregatorFunc, error) { switch aggregator { case "avg": return Average, nil case "min": return Minimum, nil case "max": return Maximum, nil case "sum": return Sum, nil default: return nil, fmt.Errorf("aggregator function: %s is unknown", aggregator) } }
[ -0.4055118262767792, 0.035557378083467484, 0.4999171197414398, -0.3108263909816742, -1.0242682695388794, -0.8446996808052063, 0.2618751525878906, -0.16013438999652863, -0.31637945771217346, -0.058839861303567886, -0.35224950313568115, -0.2610095739364624, 0.8001889586448669, 0.148225337266...
func NewAuthService(authRepository Repository, userService user.Service) Service { return &service{ authRepository: authRepository, userService: userService, } }
[ -0.2164127677679062, -0.3922891616821289, 0.047266457229852676, 0.16273187100887299, -0.7955254316329956, -0.14509032666683197, -1.1701178550720215, -0.6050992012023926, 0.14164958894252777, -0.46837857365608215, 0.43251487612724304, 1.1509145498275757, 0.2689099609851837, 0.56701308488845...
func NewClient(addr, authToken string) (*Client, error) { c := &http.Client{ Transport: &http.Transport{ TLSClientConfig: &tls.Config{ InsecureSkipVerify: true, }, }, } base, err := url.Parse(addr) if err != nil { return nil, err } client := &Client{ c: c, addr: base, authToke...
[ 0.6339713931083679, -0.26578769087791443, 0.3827151954174042, -0.281206876039505, -0.7124376893043518, 0.22975902259349823, -0.15353982150554657, 0.0724443569779396, 0.4204266667366028, 0.013959897682070732, -0.33643677830696106, 0.985155463218689, 0.3605892062187195, -1.060367226600647, ...
func (c *Client) PairStart(deviceID, deviceName string) (challengeType, pairingReqToken int, err error) { data := reqPairingStart{ DeviceID: deviceID, DeviceName: deviceName, } var body bytes.Buffer if err := json.NewEncoder(&body).Encode(data); err != nil { return 0, 0, err } req, err := http.NewReques...
[ -1.2817518711090088, -0.4337620437145233, 0.8510990142822266, 0.3161645829677582, 0.09187435358762741, -0.45502331852912903, 0.011181516572833061, -0.039344798773527145, 0.2178567349910736, 0.29812392592430115, -0.8355626463890076, 1.1486423015594482, -1.0841546058654785, 0.648915588855743...
func (c *Client) PairComplete(deviceID, respValue string, challengeType, pairingReqToken int) (string, error) { data := reqPairingComplete{ ChallengeType: challengeType, DeviceID: deviceID, PairingReqToken: pairingReqToken, ResponseValue: respValue, } var body bytes.Buffer if err := json.NewEnco...
[ -1.0344034433364868, 0.17463192343711853, 0.9641245007514954, 0.5432316660881042, -0.8407836556434631, -0.28124839067459106, 0.10233909636735916, -0.19416700303554535, 0.1410447508096695, 0.5987127423286438, -0.22451341152191162, -0.28653421998023987, -0.8100160956382751, -0.01806274242699...
func (c *Client) PairCancel(deviceID, deviceName string) error { data := reqPairingCancel{ DeviceID: deviceID, DeviceName: deviceName, } var body bytes.Buffer if err := json.NewEncoder(&body).Encode(data); err != nil { return err } req, err := http.NewRequest(http.MethodPut, "/pairing/cancel", &body) i...
[ -1.0243438482284546, -0.29293662309646606, 0.6330628395080566, 0.48396795988082886, -0.5673525333404541, 0.0029466941487044096, 0.23610955476760864, 0.3001917898654938, -0.09984584897756577, 0.7645658254623413, 0.19617341458797455, 0.6343215107917786, -0.6930054426193237, 0.603339314460754...
func (c *Client) IsOn() (bool, error) { req, err := http.NewRequest(http.MethodGet, "/state/device/power_mode", nil) if err != nil { return false, err } var resp respPowerMode if err = c.do(req, &resp); err != nil { return false, err } return resp.on(), nil }
[ -0.5171499252319336, 0.21701499819755554, 0.9356024861335754, 0.3954174220561981, -0.06420168280601501, -0.4129179120063782, -0.7173261046409607, 0.6316156387329102, -0.4702848792076111, 0.18193402886390686, -0.5524868965148926, -0.2564975917339325, -0.21972306072711945, -0.379337459802627...
func (c *Client) KeyCmd(cmds ...KeyCmd) error { if len(cmds) == 0 { return errors.New("minimum 1 command required") } data := reqKeyCommand{KeyList: cmds} var body bytes.Buffer if err := json.NewEncoder(&body).Encode(data); err != nil { return err } req, err := http.NewRequest(http.MethodPut, "/key_comman...
[ -1.3427560329437256, -0.1341666877269745, 0.6309276819229126, 0.35557255148887634, 0.18193864822387695, 0.6286934018135071, -0.22462008893489838, -0.4685443043708801, -0.24813199043273926, -0.3646901845932007, -0.27339527010917664, 0.5468896627426147, -0.6039283275604248, 0.453504890203475...
func (c *Client) CurrentInput() (Input, error) { req, err := http.NewRequest(http.MethodGet, "/menu_native/dynamic/tv_settings/devices/current_input", nil) if err != nil { return Input{}, err } var resp respCurrentInput if err = c.do(req, &resp); err != nil { return Input{}, err } return resp.input(), nil ...
[ -1.3733041286468506, -0.2603698968887329, 0.4968860447406769, 0.6336843371391296, -0.26083970069885254, 0.13563856482505798, 0.5799015760421753, -0.5880366563796997, -0.1835578978061676, -0.1374264806509018, 0.7102069854736328, 0.6228618025779724, -0.9904108643531799, -0.08920615166425705,...
func (c *Client) Inputs() (map[int]Input, error) { req, err := http.NewRequest(http.MethodGet, "/menu_native/dynamic/tv_settings/devices/name_input", nil) if err != nil { return nil, err } var resp respInputs if err = c.do(req, &resp); err != nil { return nil, err } inputs := make(map[int]Input, len(resp.I...
[ -1.6389210224151611, 0.1795092076063156, 0.6367026567459106, -0.6262332797050476, -0.9881908297538757, -0.03261233866214752, -0.2854885756969452, -1.0558682680130005, -0.5516154170036316, 0.22704048454761505, -0.4963400661945343, 0.15652668476104736, -0.200855553150177, 0.5236994028091431,...
func (c *Client) Input(i Input) error { // The hash of the _current_ input // is needed for the request cur, err := c.CurrentInput() if err != nil { return err } data := reqInput{ Request: reqModify, Hash: cur.Hash, Value: i.Name, } var body bytes.Buffer if err := json.NewEncoder(&body).Encode(d...
[ -1.6671018600463867, 0.5974602699279785, 0.608493983745575, 0.5700529217720032, -0.35712990164756775, 0.03010149486362934, 0.4894917607307434, -0.47091159224510193, -0.06359228491783142, 0.07218461483716965, 0.03162357211112976, 0.8142877817153931, -0.9466394782066345, 0.6312415599822998, ...
func countWordsInString(sInput string) map[string]int { //change the input into a rune array sTemp := []rune(sInput) return (countWordsInRunes(sTemp)) }
[ -0.05096609517931938, -0.9578256607055664, 0.5818092226982117, -0.5232417583465576, -0.4107785224914551, 0.2329065501689911, 0.48893287777900696, 1.011118769645691, -0.38924431800842285, 0.24068982899188995, -0.7733728289604187, 0.4203929305076599, -0.4523750841617584, 0.9072384834289551, ...
func countWordsInRunes(sTemp []rune) map[string]int { //build a map for kv wordMap := make(map[string]int) //find a word i, lInput := 0, len(sTemp) fmt.Printf("length of input is %d\n", lInput) start := time.Now() fmt.Println("Time is ", start) for i < lInput { //make a slice for a word sWord := make([]run...
[ -0.26294824481010437, 0.3481009006500244, 0.8190056085586548, -0.5497757792472839, -1.10123872756958, 0.16725027561187744, 0.5650790929794312, 0.07754520326852798, -0.6078281998634338, 1.09868586063385, 0.022482112050056458, -0.010982245206832886, -0.4941754937171936, 1.0278202295303345, ...
func isLegal(c rune) bool { switch { case 'a' <= c && c <= 'z': return true case 'A' <= c && c <= 'Z': return true case '_' == c: return true default: return false } }
[ 0.09061750024557114, -0.07573734223842621, 0.8279082775115967, -0.9072021842002869, -1.2158292531967163, 0.8396943211555481, -0.8772023320198059, -0.5424121618270874, -0.208058163523674, 0.1483210027217865, -0.21860435605049133, 0.3454394042491913, -0.39996227622032166, 0.5204147100448608,...
func Download(d *Distribution) (file string, err error) { workDir := GetWorkDir(d) filePath := workDir + GetDistributionName(d) if _, err := os.Stat(filePath); !os.IsNotExist(err) { log.Printf("File '%v' already exisis, won't download it again", filePath) return filePath, nil } log.Printf("File '%v' not fou...
[ -0.19041496515274048, -0.41487401723861694, 0.9006187915802002, -0.22936996817588806, -0.6700314879417419, 0.3824690878391266, 0.9268971085548401, -0.43480342626571655, 0.6617763042449951, 0.434550940990448, 0.5202804803848267, -0.15384115278720856, -0.216087207198143, 0.29344087839126587,...
func (indicator HorizontalModeIndicator) ToString() string { switch indicator { case HMIUnknown: return "0 - unknown mode or information unavailable" case HMIAcquiringMode: return "1 - \"Acquiring\" Mode" case HMICapturingMode: return "2 - \"Capturing\" or \"Maintaining\" Mode" case HMIReserved3: return "...
[ -0.24895700812339783, -0.8234969973564148, 0.5715744495391846, -0.287841260433197, 0.478919118642807, 1.0907301902770996, -0.21193192899227142, 0.03694801777601242, -0.5454133152961731, 0.7673906683921814, -0.05994877964258194, -0.3025088906288147, -0.472324013710022, -0.4417320787906647, ...
func ReadHorizontalModeIndicator(data []byte) HorizontalModeIndicator { bits := (data[4] & 0x06) >> 1 return HorizontalModeIndicator(bits) }
[ -0.32700714468955994, -0.8711395263671875, 0.39234334230422974, -0.2085445672273636, -0.6285731792449951, 1.2067519426345825, -0.37149569392204285, 0.7568979263305664, 0.3214125633239746, -0.08979497849941254, -0.33148193359375, -0.39834368228912354, -0.5036182999610901, 0.1190225407481193...
func firstSentence(s string) string { var ppp, pp, p rune for i, q := range s { if q == '\n' || q == '\r' || q == '\t' { q = ' ' } if q == ' ' && p == '.' && (!unicode.IsUpper(pp) || unicode.IsUpper(ppp)) { return s[:i] } if p == '。' || p == '.' { return s[:i] } ppp, pp, p = pp, p, q } return...
[ 0.2290802001953125, -1.6615747213363647, 0.8023878335952759, 0.11750289052724838, -0.025416778400540352, -1.1122742891311646, -0.29957568645477295, -0.7772989273071289, 0.2685443162918091, 0.17197154462337494, 0.43624377250671387, -0.12300548702478409, -0.33583492040634155, -0.173346191644...
func Synopsis(text string) string { var p Package return p.Synopsis(text) }
[ 0.11940692365169525, 0.5228893160820007, 0.06276664137840271, 0.22914889454841614, -1.2321298122406006, -0.49576908349990845, -0.31599488854408264, 0.8901861906051636, -0.16125059127807617, 1.1290934085845947, -0.08546413481235504, -0.24857184290885925, 0.33364948630332947, -0.893143236637...
func (p *Package) Synopsis(text string) string { text = firstSentence(text) lower := strings.ToLower(text) for _, prefix := range IllegalPrefixes { if strings.HasPrefix(lower, prefix) { return "" } } pr := p.Printer() pr.TextWidth = -1 d := p.Parser().Parse(text) if len(d.Content) == 0 { return "" } ...
[ 0.7884436845779419, -0.45354706048965454, 0.8083594441413879, -0.3004017770290375, -0.776192307472229, -0.924315869808197, -0.2707165777683258, -0.15491649508476257, 0.3213343322277069, 1.0650798082351685, 0.4528554081916809, 0.03900200501084328, -0.10078305751085281, -0.4740528464317322, ...
func (o *InteractionBindReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewInteractionBindOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, ni...
[ -0.6907987594604492, -1.506405234336853, 0.9489349722862244, 0.7251742482185364, -0.0032144065480679274, -0.546463131904602, 0.2988252639770508, -0.406106561422348, 0.6458830833435059, 0.14244715869426727, 0.3480282723903656, -0.14922474324703217, -1.3507853746414185, 0.15568038821220398, ...
func NewInteractionBindOK() *InteractionBindOK { return &InteractionBindOK{} }
[ -0.33418476581573486, -0.8041786551475525, 0.2333282083272934, 1.3512846231460571, 0.15249183773994446, 0.4070185422897339, 1.3893781900405884, 0.005304735619574785, -0.3068946301937103, -0.6541699171066284, -0.408070832490921, -0.22712714970111847, -0.21024058759212494, 0.5230419039726257...
func NewInteractionBindNotFound() *InteractionBindNotFound { return &InteractionBindNotFound{} }
[ -0.06635791063308716, -1.7676199674606323, 0.004296330735087395, 0.35940390825271606, -0.7941493988037109, 1.1964482069015503, 0.7779929637908936, 0.26035332679748535, 0.4707743525505066, -0.522624135017395, -0.24069055914878845, -0.26100194454193115, -0.8643842339515686, 0.151699677109718...
func (pkmn *Pokemon) MoveCount() int { cnt := 0 if pkmn.Move1 != 0 { cnt++ } if pkmn.Move2 != 0 { cnt++ } if pkmn.Move3 != 0 { cnt++ } if pkmn.Move4 != 0 { cnt++ } return cnt }
[ -0.20950141549110413, 0.04563862085342407, 0.8807368874549866, 0.22800606489181519, 0.39845117926597595, -0.21832391619682312, -0.1437983512878418, 0.621681809425354, -0.39550721645355225, 0.06151508167386055, -0.2942354679107666, -0.6133223176002502, -0.3050954341888428, 0.188169121742248...
func (pkmn *Pokemon) MoveIDsAsSlice() []int { moves := make([]int, pkmn.MoveCount()) if pkmn.Move1 != 0 { moves[0] = pkmn.Move1 } if pkmn.Move2 != 0 { moves[1] = pkmn.Move2 } if pkmn.Move3 != 0 { moves[2] = pkmn.Move3 } if pkmn.Move4 != 0 { moves[3] = pkmn.Move4 } return moves }
[ -1.4985016584396362, -0.7144514918327332, 0.5360278487205505, 0.08038779348134995, 0.6671633124351501, -0.9956598877906799, -0.8959238529205322, -0.3827463686466217, -0.06668737530708313, 1.1998608112335205, -0.6264459490776062, 0.26075810194015503, -0.6587826013565063, 0.3623146116733551,...
func KindFromSides(a, b, c float64) Kind { if isNaT(a, b, c) { return NaT } if a == b && b == c { return Equ } if a == b || a == c || b == c { return Iso } return Sca }
[ 1.0080292224884033, -0.14520174264907837, 0.4079587757587433, -0.6869200468063354, 0.21845264732837677, 0.581897497177124, -0.6302988529205322, -1.1579030752182007, -0.5212797522544861, 0.11189302057027817, 0.794849157333374, 0.6281068921089172, 0.7682775259017944, -0.48082733154296875, ...
func CurrentNanosecond() int64 { return CurrentMicrosecond() * 1e3 }
[ 0.17431144416332245, -0.8516145348548889, 0.1417493224143982, 0.48768240213394165, -1.8880304098129272, -0.7355625629425049, 0.5203576683998108, -0.47807279229164124, -1.2068374156951904, -0.2979816496372223, -0.1245468333363533, 0.4358016848564148, -0.3947117030620575, 1.0345308780670166,...
func verifyMac(w io.Writer, name string, data, signature []byte) error { // name := "projects/my-project/locations/us-east1/keyRings/my-key-ring/cryptoKeys/my-key/cryptoKeyVersions/123" // data := "my previous data" // signature := []byte("...") // Response from a sign request // Create the client. ctx := contex...
[ 0.5557005405426025, -0.04499507322907448, 0.4671711325645447, 0.33871546387672424, -0.0009122731280513108, 0.16317102313041687, -0.3787877857685089, -0.47605153918266296, -0.24668331444263458, -0.28795936703681946, -0.9986402988433838, 0.84130859375, -0.6361513137817383, 0.2583326399326324...
func randomHash() uint64 { pkgHasher.WriteByte(0) return pkgHasher.Sum64() }
[ 0.7223480343818665, 0.5643137097358704, 0.25559163093566895, 1.186479926109314, 0.1126900315284729, 0.7710021734237671, 0.7164427042007446, 0.3492409288883209, 0.4855192005634308, -0.8363515734672546, -0.23581261932849884, -0.0008096694946289062, -0.8419771790504456, 0.08718947321176529, ...
func (o *Object) ExportType() reflect.Type { return o.self.exportType() }
[ 0.1426856368780136, 0.07700758427381516, 0.5177420377731323, 0.5230799913406372, 0.4835304915904999, -0.15029682219028473, 1.15838623046875, -0.9668921232223511, 2.0207748413085938, 0.6879296898841858, -0.06837543845176697, 0.7387229800224304, -0.7187633514404297, 0.37707316875457764, 0....
func (o *Object) Get(name string) Value { return o.self.getStr(unistring.NewFromString(name), nil) }
[ -0.45594322681427, -0.5115957856178284, 0.4633477032184601, -0.5624304413795471, -0.2736358046531677, -0.23874561488628387, -0.7965589761734009, -0.966644287109375, 0.2613840401172638, 0.20752844214439392, -0.685202956199646, 0.20139548182487488, 0.8593180775642395, -1.0708242654800415, ...
func (o *Object) GetSymbol(sym *Symbol) Value { return o.self.getSym(sym, nil) }
[ -0.14074400067329407, 1.1253163814544678, 0.13837674260139465, 0.9720218777656555, 0.15391592681407928, -1.4555751085281372, 1.0439289808273315, -0.6433233618736267, 1.0681486129760742, -1.0030955076217651, -0.9264664649963379, 0.7205494046211243, 0.9372901320457458, 0.34489914774894714, ...
func (o *Object) Keys() (keys []string) { iter := &enumerableIter{ o: o, wrapped: o.self.iterateStringKeys(), } for item, next := iter.next(); next != nil; item, next = next() { keys = append(keys, item.name.String()) } return }
[ -0.8905956745147705, -0.8276106119155884, 0.4027072787284851, -0.9877464771270752, -0.7306005954742432, -0.3749864101409912, -1.0995423793792725, -0.31917986273765564, 0.19783617556095123, 1.1834582090377808, -0.3629645109176636, 0.9165443778038025, 0.10769043862819672, -0.2943445742130279...
func (o *Object) Symbols() []*Symbol { symbols := o.self.symbols(false, nil) ret := make([]*Symbol, len(symbols)) for i, sym := range symbols { ret[i], _ = sym.(*Symbol) } return ret }
[ -1.4317312240600586, 0.27137523889541626, -0.08620063215494156, -0.2020072638988495, 0.6936643123626709, -0.4369168281555176, 0.36180129647254944, -0.5718625783920288, 0.545977771282196, -0.20220975577831268, -1.3546884059906006, 0.5046829581260681, 0.701995313167572, 0.49789756536483765, ...
func (o *Object) Prototype() *Object { return o.self.proto() }
[ 0.0786074548959732, 0.09442195296287537, 0.38783812522888184, 0.4437004625797272, -0.1421780288219452, -0.3877933919429779, 0.8304322361946106, -1.293423056602478, 0.8414284586906433, -0.21271228790283203, -0.7189124822616577, -0.056866858154535294, 0.051609259098768234, -0.697140872478485...
func (o *Object) SetPrototype(proto *Object) error { return o.runtime.try(func() { o.self.setProto(proto, true) }) }
[ -0.4564110338687897, 0.3307717442512512, 0.4365273118019104, 1.0367610454559326, 0.13112305104732513, -0.1282837837934494, 0.6811285614967346, -0.270913302898407, 0.38409683108329773, 0.06268414109945297, -1.3917399644851685, -0.06542379409074783, -0.3611227571964264, 0.9735408425331116, ...
func (o *Object) MarshalJSON() ([]byte, error) { ctx := _builtinJSON_stringifyContext{ r: o.runtime, } ex := o.runtime.vm.try(func() { if !ctx.do(o) { ctx.buf.WriteString("null") } }) if ex != nil { return nil, ex } return ctx.buf.Bytes(), nil }
[ 0.019444210454821587, -0.6320479512214661, 0.5618246793746948, 0.15713779628276825, -0.12779900431632996, -0.8251575231552124, -0.05039350315928459, -0.38545724749565125, 0.9655994772911072, 0.30945155024528503, -1.125396966934204, 1.3343619108200073, -0.18462733924388885, 0.22375129163265...
func (o *Object) UnmarshalJSON([]byte) error { return nil }
[ -0.40497374534606934, 0.004651851952075958, 0.44827112555503845, -0.7514795064926147, -0.4460166394710541, 0.12697482109069824, 1.104753017425537, 0.2656916081905365, 0.6257010698318481, -0.07613952457904816, -1.4264477491378784, 0.2015117108821869, -0.07894685119390488, 0.2642208039760589...
func (o *Object) ClassName() string { return o.self.className() }
[ -0.3764760494232178, -1.2773319482803345, 0.16160793602466583, 0.36306557059288025, -0.1806761920452118, -0.24799765646457672, 0.9159995317459106, -0.013531197793781757, 0.13591846823692322, 0.007107483223080635, -0.2668911814689636, 0.4450763165950775, 0.766793966293335, -0.25906586647033...
func (cs *ComplianceScan) NeedsRescan() bool { annotations := cs.GetAnnotations() if annotations == nil { return false } _, needsRescan := annotations[ComplianceScanRescanAnnotation] return needsRescan }
[ -0.11689694970846176, -0.07471320778131485, 0.5965361595153809, 0.474483847618103, -0.32618248462677, -0.6824537515640259, 0.14297255873680115, 0.2810867726802826, 0.16092176735401154, -0.16297930479049683, -0.4124336540699005, -0.7868877649307251, -0.41606149077415466, 0.7187188863754272,...
func (cs *ComplianceScan) GetScanTypeIfValid() (ComplianceScanType, error) { if strings.ToLower(string(cs.Spec.ScanType)) == strings.ToLower(string(ScanTypePlatform)) { return ScanTypePlatform, nil } if strings.ToLower(string(cs.Spec.ScanType)) == strings.ToLower(string(ScanTypeNode)) { return ScanTypeNode, nil...
[ 0.8747729659080505, -0.05723658576607704, 0.4766387641429901, 1.1117680072784424, 0.09218049794435501, 0.2021515965461731, -0.03783746808767319, -0.36396920680999756, 0.8697322607040405, -0.23462164402008057, 0.6795279383659363, 0.1955851912498474, -1.1567885875701904, 1.1933858394622803, ...
func (cs *ComplianceScan) GetScanType() ComplianceScanType { scantype, err := cs.GetScanTypeIfValid() if err != nil { // This shouldn't happen panic(err) } return scantype }
[ 0.917317807674408, 0.2619059085845947, 0.45756062865257263, 1.93547785282135, 0.29790735244750977, 0.23284628987312317, -0.006584902759641409, -0.307253360748291, 1.0581644773483276, -0.7952045798301697, 0.7907734513282776, -0.11361812055110931, -1.0870089530944824, 0.9012786746025085, 1...
func (cs *ComplianceScan) RemediationEnforcementIsOff() bool { return (strings.EqualFold(cs.Spec.RemediationEnforcement, RemediationEnforcementEmpty) || strings.EqualFold(cs.Spec.RemediationEnforcement, RemediationEnforcementOff)) }
[ 0.4748484492301941, -0.56620854139328, 0.449721097946167, 0.20298616588115692, 0.3136206865310669, 0.8088927865028381, 0.4083419442176819, 0.8584067821502686, 0.5312698483467102, 0.7340341806411743, 0.040500931441783905, 0.07118763029575348, -1.031170129776001, 0.6371685862541199, 0.3542...
func (cs *ComplianceScan) RemediationEnforcementTypeMatches(etype string) bool { return (strings.EqualFold(cs.Spec.RemediationEnforcement, RemediationEnforcementAll) || strings.EqualFold(cs.Spec.RemediationEnforcement, etype)) }
[ 0.49361878633499146, -0.607961118221283, 0.643316924571991, 0.3426826298236847, 0.4696138799190521, 0.43459445238113403, -0.08161638677120209, 0.18764878809452057, 0.9818691611289978, 1.2322288751602173, 0.24731074273586273, -0.5438714623451233, -0.9799866676330566, 0.7362173199653625, 0...
func (cs *ComplianceScan) IsStrictNodeScan() bool { // strictNodeScan should be true by default if cs.Spec.StrictNodeScan == nil { return true } return *cs.Spec.StrictNodeScan }
[ 0.1721969097852707, 0.4320123493671417, 0.4354671537876129, 0.7415779829025269, -0.14325286448001862, 0.04136960208415985, 0.10715577751398087, 0.002724055666476488, 0.5964041948318481, -0.03589184954762459, -0.34690061211586, -0.07519575953483582, -0.613771915435791, 0.051784295588731766,...
func (b Board)FindPlayableCases(root,deep int)[]int{ if deep <=0 { return []int{} } positions := b.FindCases(root,deep,-1) filteredPositions := make([]int,0,len(positions)) for _,pos := range positions { if b.casesByPosition[pos].HasCows() { filteredPositions = append(filteredPositions,pos) } } return f...
[ -0.5669524669647217, 0.2037694901227951, 0.736531138420105, 0.6327669024467468, -0.5427281856536865, -0.5879307389259338, 1.0351084470748901, -0.3051169812679291, -0.2324991673231125, 0.4481765329837799, 0.07182706892490387, -0.1257288008928299, -0.7582850456237793, 1.0879325866699219, 0...
func (c Case)PlayAction()bool{ nbColors := 0 for _,nb := range c.cows { if nb > 0 { nbColors++ } } return nbColors == 1 }
[ -0.6679110527038574, -0.050491783767938614, 0.6775220632553101, 0.44015806913375854, 0.8753774762153625, 0.07188906520605087, 0.9159097671508789, -0.831803560256958, 0.29332950711250305, 0.132188081741333, -0.25553616881370544, -0.2387145459651947, -0.5485502481460571, 0.5488734841346741, ...
func (c * Case)TakeColor(color int)int8{ if color > len(c.cows){ return 0 } nb := c.cows[color] c.cows[color] = 0 return int8(nb) }
[ -0.28664398193359375, 0.5566508173942566, 0.41522422432899475, -0.0735035240650177, 0.26467669010162354, -0.34938061237335205, 0.9055326581001282, -0.46711069345474243, 0.43896642327308655, 0.576720118522644, -0.25421279668807983, -0.22215652465820312, -0.45851951837539673, 1.4907327890396...
func (a * Action)Do(b Board,info InfoAction)bool { return a.action.Do(b,info) }
[ 0.10676953196525574, 0.3049349784851074, 0.5140711665153503, 0.9032443761825562, 0.6579074263572693, 0.7889841794967651, -0.5235574245452881, -0.21104490756988525, -0.6302058696746826, 0.6967194080352783, -0.4712145924568176, 0.5753382444381714, 0.016168974339962006, 0.48570990562438965, ...
func (t *Timestream) createTable(tableName *string) error { createTableInput := &timestreamwrite.CreateTableInput{ DatabaseName: aws.String(t.DatabaseName), TableName: aws.String(*tableName), RetentionProperties: &types.RetentionProperties{ MagneticStoreRetentionPeriodInDays: t.CreateTableMagneticStoreRete...
[ 0.31416669487953186, 0.49119478464126587, 0.5117679238319397, -0.1913544088602066, 0.6996779441833496, -0.3870280086994171, -0.0009907821658998728, -0.8568841218948364, -0.27930620312690735, 0.13112227618694305, 0.23269277811050415, -0.4942409098148346, -0.42460060119628906, 0.568499445915...
func (t *Timestream) TransformMetrics(metrics []telegraf.Metric) []*timestreamwrite.WriteRecordsInput { writeRequests := make(map[string]*timestreamwrite.WriteRecordsInput, len(metrics)) for _, m := range metrics { // build MeasureName, MeasureValue, MeasureValueType records := t.buildWriteRecords(m) if len(rec...
[ -0.8489530682563782, 0.42272233963012695, 0.6253960132598877, 0.17674703896045685, 0.20518085360527039, -0.3810305893421173, 0.5743851661682129, -0.10839372873306274, -0.5493954420089722, 0.3265286087989807, 0.4552954137325287, -0.5055673718452454, -0.5497109293937683, 0.45567557215690613,...
func (t *Timestream) buildWriteRecords(point telegraf.Metric) []types.Record { if t.UseMultiMeasureRecords { return t.buildMultiMeasureWriteRecords(point) } return t.buildSingleWriteRecords(point) }
[ -0.8363191485404968, 0.491415798664093, 0.5265210270881653, 0.5369285345077515, 0.6177011132240295, -0.17711669206619263, 0.18912629783153534, -0.1308673471212387, -0.12277655303478241, 0.25770390033721924, 0.6359646320343018, -0.2297428846359253, -0.5269311666488647, 0.3656366765499115, ...
func partitionRecords(size int, records []types.Record) [][]types.Record { numberOfPartitions := len(records) / size if len(records)%size != 0 { numberOfPartitions++ } partitions := make([][]types.Record, 0, numberOfPartitions) for i := 0; i < numberOfPartitions; i++ { start := size * i end := size * (i + 1...
[ 0.3631678521633148, 0.5178825259208679, 0.7801305651664734, -0.2848593592643738, -0.32935887575149536, -0.8626517653465271, 0.034947678446769714, -0.03997785598039627, 0.07647262513637543, 0.9114463925361633, 0.25912147760391235, -0.32701510190963745, -1.2825757265090942, -0.18487720191478...
func getTimestreamTime(t time.Time) (timeUnit types.TimeUnit, timeValue string) { nanosTime := t.UnixNano() if nanosTime%1e9 == 0 { timeUnit = types.TimeUnitSeconds timeValue = strconv.FormatInt(nanosTime/1e9, 10) } else if nanosTime%1e6 == 0 { timeUnit = types.TimeUnitMilliseconds timeValue = strconv.Format...
[ -0.2740249037742615, -0.3217397928237915, 0.8140771389007568, -1.0879698991775513, -0.5032374858856201, -0.39265990257263184, -0.4520449638366699, -0.46484246850013733, 0.23489975929260254, 0.1814100444316864, -0.12121540307998657, 0.41090163588523865, -0.30007559061050415, 1.5343264341354...
func convertValue(v interface{}) (value string, valueType types.MeasureValueType, ok bool) { ok = true switch t := v.(type) { case int: valueType = types.MeasureValueTypeBigint value = strconv.FormatInt(int64(t), 10) case int8: valueType = types.MeasureValueTypeBigint value = strconv.FormatInt(int64(t), 10...
[ -0.13406705856323242, -0.3992583751678467, 0.808452308177948, -1.0324963331222534, 0.4164813458919525, -0.3635035455226898, -0.07610948383808136, -0.6158774495124817, 0.44038698077201843, 1.0910357236862183, 0.41556406021118164, 0.6227205395698547, 0.46173804998397827, 0.6423060297966003, ...
func RequestName(req *http.Request) string { return fmt.Sprintf("%s %s", req.Method, req.URL.Path) }
[ -1.6000384092330933, -0.6731672883033752, 0.509406328201294, -0.027732348069548607, -0.35332366824150085, -0.22783014178276062, -0.6134957671165466, 0.3223205804824829, -0.05036258324980736, 0.0716080516576767, 1.072933554649353, 0.198157399892807, 0.3526016175746918, 0.4674317240715027, ...
func RequestContext(req *http.Request) *model.Context { username, _, ok := req.BasicAuth() if !ok && req.URL.User != nil { username = req.URL.User.Username() } ctx := model.Context{ Request: &model.Request{ URL: RequestURL(req), Method: req.Method, Headers: RequestHeaders(req), HTT...
[ -1.0746349096298218, 0.37995192408561707, 0.791175127029419, 0.9790016412734985, -0.6936560273170471, 0.2688227891921997, -0.3563271164894104, -0.6134857535362244, 0.8849408626556396, -0.40348443388938904, 0.10739430785179138, 0.1902696043252945, -0.6062784790992737, 0.04743143916130066, ...
func RequestURL(req *http.Request) model.URL { fullHost := req.Host if fullHost == "" { fullHost = req.URL.Host } host, port, err := net.SplitHostPort(fullHost) if err != nil { host = fullHost port = "" } out := model.URL{ Hostname: host, Port: port, Path: req.URL.Path, Search: req.URL.Ra...
[ -0.947376549243927, 0.05290200933814049, 0.44632983207702637, 0.7194557785987854, 0.05559857189655304, 0.06679344177246094, 0.16370399296283722, 0.22096394002437592, -0.33579716086387634, -0.4067835509777069, 0.15336740016937256, -0.23684176802635193, 0.16385714709758759, 0.428009390830993...
func RequestHeaders(req *http.Request) *model.RequestHeaders { return &model.RequestHeaders{ ContentType: req.Header.Get("Content-Type"), Cookie: strings.Join(req.Header["Cookie"], ";"), UserAgent: req.UserAgent(), } }
[ -1.1788139343261719, -0.603649914264679, 0.4281444251537323, 0.9531723856925964, -0.36161965131759644, -0.3371829688549042, -1.2665237188339233, -0.4455702006816864, 0.2905847132205963, -0.0054890066385269165, 0.27526620030403137, -0.24628980457782745, -1.1352932453155518, -0.3632129132747...
func RequestRemoteAddress(req *http.Request) string { if realIP := req.Header.Get("X-Real-IP"); realIP != "" { return realIP } if xff := req.Header.Get("X-Forwarded-For"); xff != "" { if sep := strings.IndexRune(xff, ','); sep > 0 { xff = xff[:sep] } return strings.TrimSpace(xff) } remoteAddr, _, err :=...
[ -0.4831509590148926, -0.2737167775630951, 0.7701608538627625, -0.3144868016242981, -0.1899862438440323, -0.3957586884498596, -0.2802194058895111, -0.12699447572231293, 0.691470205783844, -0.3891122043132782, -0.02517220564186573, 0.8036466836929321, -0.4634508788585663, -0.6613802313804626...
func ResponseHeaders(w http.ResponseWriter) *model.ResponseHeaders { contentType := w.Header().Get("Content-Type") if contentType == "" { return nil } return &model.ResponseHeaders{ ContentType: contentType, } }
[ 0.7158195376396179, -1.1129766702651978, 0.11665401607751846, 0.650457501411438, -0.009076478891074657, -0.9278619885444641, -0.06730988621711731, -1.3778529167175293, 0.9019919037818909, -0.16950419545173645, -0.3115287721157074, -0.8127481341362, -1.3681215047836304, -0.2498968541622162,...
func (c *FakeExtendedDaemonSetReplicaSets) Get(name string, options v1.GetOptions) (result *v1alpha1.ExtendedDaemonSetReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(extendeddaemonsetreplicasetsResource, c.ns, name), &v1alpha1.ExtendedDaemonSetReplicaSet{}) if obj == nil { return nil, e...
[ -0.8524242043495178, 1.0276943445205688, 0.43009066581726074, -1.154327630996704, -0.8859254717826843, -0.4638553857803345, -0.4139103591442108, -0.2683958411216736, 0.7347250580787659, 0.01431131362915039, -0.5318041443824768, 1.1815801858901978, -0.31463804841041565, -0.7213701605796814,...
func (c *FakeExtendedDaemonSetReplicaSets) List(opts v1.ListOptions) (result *v1alpha1.ExtendedDaemonSetReplicaSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(extendeddaemonsetreplicasetsResource, extendeddaemonsetreplicasetsKind, c.ns, opts), &v1alpha1.ExtendedDaemonSetReplicaSetList{}) if...
[ -0.8766429424285889, 0.4165676236152649, 0.4305083751678467, -0.24836470186710358, -0.4614952802658081, -0.30818819999694824, -0.46380218863487244, 0.16109035909175873, 1.2515555620193481, 0.33106857538223267, -0.8315935730934143, 0.8976260423660278, 0.10971478372812271, -0.014935865998268...
func (c *FakeExtendedDaemonSetReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(extendeddaemonsetreplicasetsResource, c.ns, opts)) }
[ -0.6386963129043579, 0.9273039102554321, 0.3111226558685303, -0.2834234833717346, -0.7181205749511719, 0.08901609480381012, 0.6180281639099121, 0.22918786108493805, 1.3083964586257935, -0.60478675365448, -1.0238890647888184, 1.487825632095337, 0.5219094157218933, -0.46505266427993774, -0...
func (c *FakeExtendedDaemonSetReplicaSets) Create(extendedDaemonSetReplicaSet *v1alpha1.ExtendedDaemonSetReplicaSet) (result *v1alpha1.ExtendedDaemonSetReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(extendeddaemonsetreplicasetsResource, c.ns, extendedDaemonSetReplicaSet), &v1alpha1.Exte...
[ -0.7769458889961243, 1.0563685894012451, 0.265092134475708, -0.8043097853660583, -0.9394360184669495, 0.16089153289794922, -0.3825322687625885, -0.4745158553123474, 0.6317722797393799, -0.13238786160945892, -0.2570529580116272, 0.3055836260318756, -0.254623144865036, -0.07958076894283295, ...
func (c *FakeExtendedDaemonSetReplicaSets) Update(extendedDaemonSetReplicaSet *v1alpha1.ExtendedDaemonSetReplicaSet) (result *v1alpha1.ExtendedDaemonSetReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(extendeddaemonsetreplicasetsResource, c.ns, extendedDaemonSetReplicaSet), &v1alpha1.Exte...
[ -1.0224032402038574, 0.5794676542282104, 0.28999534249305725, -1.3065905570983887, -1.4523884057998657, -0.013415937311947346, -0.2628057301044464, -0.236232727766037, 1.0255999565124512, -0.018102340400218964, -0.4185236990451813, 0.6110798716545105, -0.27765756845474243, -0.5912227630615...
func (c *FakeExtendedDaemonSetReplicaSets) UpdateStatus(extendedDaemonSetReplicaSet *v1alpha1.ExtendedDaemonSetReplicaSet) (*v1alpha1.ExtendedDaemonSetReplicaSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(extendeddaemonsetreplicasetsResource, "status", c.ns, extendedDaemonSetReplicaSet)...
[ -1.0751690864562988, 0.3197452425956726, 0.4942295551300049, -0.9448654055595398, -1.6218239068984985, 0.07499653100967407, -0.20220176875591278, 0.40492358803749084, 1.1610982418060303, 0.015392772853374481, -0.8194416761398315, 1.0124778747558594, 0.23141826689243317, -0.2691248655319214...
func (c *FakeExtendedDaemonSetReplicaSets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(extendeddaemonsetreplicasetsResource, c.ns, name), &v1alpha1.ExtendedDaemonSetReplicaSet{}) return err }
[ -0.29457584023475647, 1.207929253578186, 0.38954558968544006, -0.533812940120697, -0.7874024510383606, -0.012715413235127926, 0.09720391035079956, -0.02731090970337391, 1.251959204673767, 0.180204838514328, -0.5920674800872803, 0.7418553233146667, -0.30337923765182495, -0.4140283763408661,...
func (c *FakeExtendedDaemonSetReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(extendeddaemonsetreplicasetsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1alpha1.ExtendedDaemonSetReplicaSetList{}) return err }
[ -1.0471246242523193, 0.9081871509552002, 0.5558115839958191, -0.197846457362175, -0.2022971361875534, -0.2427242398262024, 0.6435032486915588, -0.1051471009850502, 1.2469323873519897, -0.7772063612937927, -0.7692785859107971, 1.0215590000152588, 0.4187265932559967, 0.5803360342979431, -0...
func (c *FakeExtendedDaemonSetReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ExtendedDaemonSetReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(extendeddaemonsetreplicasetsResource, c.ns, name, pt, data, subresources...)...
[ -0.5824970602989197, 0.8481495380401611, 0.3664737343788147, -1.1084550619125366, -1.7544455528259277, 0.7452515959739685, -0.463745653629303, 0.05209050327539444, 0.959775984287262, -0.5089955925941467, -0.5668402314186096, 1.00473153591156, -0.09954443573951721, -0.6079240441322327, -0...