text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) WithDefaults() *GetV1IntegrationsAwsCloudtrailBatchesParams { o.SetDefaults() return o }
[ 0.8823122978210449, 1.2487510442733765, 0.23775358498096466, 0.3200138807296753, 0.9281706213951111, -0.15957295894622803, -0.355506956577301, -0.6107320785522461, -0.5716522932052612, -0.2767988443374634, 0.01689092442393303, -0.6492490172386169, -0.12728749215602875, 0.027971988543868065...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) SetDefaults() { // no default values defined for this parameter }
[ 0.2550342082977295, 1.5634524822235107, 0.11999204754829407, 0.19587920606136322, 1.4780492782592773, 0.48334014415740967, 0.14298906922340393, -0.6605465412139893, -1.340671420097351, 0.12003175169229507, 0.039986997842788696, -0.03060007095336914, -0.5101824402809143, -0.0274287983775138...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) WithTimeout(timeout time.Duration) *GetV1IntegrationsAwsCloudtrailBatchesParams { o.SetTimeout(timeout) return o }
[ 1.0780493021011353, 1.0263586044311523, 0.31491973996162415, 0.31048741936683655, 0.04384848475456238, 0.2511976957321167, -0.06330673396587372, -0.22190620005130768, -0.21157194674015045, 0.4259563088417053, 0.16326576471328735, -0.1054147332906723, 0.31138476729393005, 0.6131921410560608...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) SetTimeout(timeout time.Duration) { o.timeout = timeout }
[ 0.7483264803886414, 1.1421030759811401, 0.17231988906860352, 0.36054304242134094, 0.6012468934059143, 0.841397762298584, 0.05004066228866577, 0.1489834189414978, -0.7947759628295898, 0.8156458139419556, 0.15355931222438812, 0.2112678587436676, -0.17185798287391663, 0.42939940094947815, -...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) WithContext(ctx context.Context) *GetV1IntegrationsAwsCloudtrailBatchesParams { o.SetContext(ctx) return o }
[ 0.6314495205879211, 1.1574881076812744, 0.3851373493671417, 0.24656525254249573, 0.1007848009467125, 0.33926647901535034, -0.16014188528060913, -0.8047831058502197, -0.12238065898418427, -0.16039954125881195, 0.15368500351905823, -0.12910009920597076, -0.16271759569644928, 0.06745742261409...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) SetContext(ctx context.Context) { o.Context = ctx }
[ 0.3089745342731476, 1.2783398628234863, 0.2056947648525238, 0.49495184421539307, 0.6469526886940002, 0.7972912788391113, 0.1357494592666626, -0.5265554785728455, -0.19261470437049866, 0.41790100932121277, 0.15494170784950256, 0.22553424537181854, -0.47952085733413696, -0.015763144940137863...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) WithHTTPClient(client *http.Client) *GetV1IntegrationsAwsCloudtrailBatchesParams { o.SetHTTPClient(client) return o }
[ 0.6949284672737122, 0.42605265974998474, 0.41895198822021484, -0.003603062592446804, 0.36559122800827026, 0.23756591975688934, 0.4876585602760315, -0.48651865124702454, -0.8076598644256592, -0.5451589226722717, -0.023566152900457382, -0.1430983543395996, 0.4427063763141632, -0.129928290843...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client }
[ 0.9048296809196472, 0.7900587916374207, 0.1500842422246933, -0.3540906012058258, 0.22856825590133667, 0.1773933321237564, 0.6184177398681641, -0.543349027633667, -1.286934494972229, 0.11436013132333755, -0.07093603163957596, 0.32663679122924805, -0.09899716079235077, -0.4323112964630127, ...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) WithConnectionID(connectionID *string) *GetV1IntegrationsAwsCloudtrailBatchesParams { o.SetConnectionID(connectionID) return o }
[ 0.8552838563919067, 0.1991589218378067, 0.36104950308799744, 0.49338048696517944, -0.01131565123796463, 0.5221116542816162, -0.006648596841841936, -0.17735637724399567, 0.007184195332229137, 0.4913654923439026, 0.7595310807228088, -1.1481690406799316, 0.5784501433372498, 0.6773862242698669...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) SetConnectionID(connectionID *string) { o.ConnectionID = connectionID }
[ 0.5096576809883118, 0.17749790847301483, 0.23125417530536652, 0.9970700740814209, 0.41901248693466187, 0.9447680115699768, 0.4667719304561615, 0.2680865526199341, -0.32191941142082214, 0.8302456736564636, 0.4327651858329773, -0.46743327379226685, -0.2153242975473404, 0.9778866171836853, ...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) WithPage(page *int32) *GetV1IntegrationsAwsCloudtrailBatchesParams { o.SetPage(page) return o }
[ 0.30021902918815613, 1.2150042057037354, 0.2743026614189148, -0.5122129917144775, 0.6432863473892212, 0.282970666885376, 0.5757756233215332, -0.4678487181663513, -0.6210155487060547, 0.010984045453369617, 0.6731628179550171, -1.2183818817138672, -0.3958049714565277, 0.41693100333213806, ...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) SetPage(page *int32) { o.Page = page }
[ -0.0020764139480888844, 1.2031177282333374, 0.1265217512845993, -0.18180562555789948, 0.9159947633743286, 0.4547047019004822, 0.718080997467041, -0.07954955846071243, -0.9046585559844971, 0.5061785578727722, 0.6591760516166687, -0.6634564995765686, -0.8692314624786377, 0.5934467315673828, ...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) WithPerPage(perPage *int32) *GetV1IntegrationsAwsCloudtrailBatchesParams { o.SetPerPage(perPage) return o }
[ 0.7237311601638794, 0.6850119829177856, 0.3698333203792572, -0.39174649119377136, -0.24725355207920074, 0.6042125225067139, 0.4632194936275482, -0.3720228970050812, -0.32488498091697693, 0.1271369606256485, 0.9536972045898438, -1.0867037773132324, -0.47711485624313354, 0.30915161967277527,...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) SetPerPage(perPage *int32) { o.PerPage = perPage }
[ 0.4677831828594208, 0.8647802472114563, 0.2517662048339844, -0.14890740811824799, -0.09025797992944717, 0.8885223269462585, 0.6854819655418396, -0.20749306678771973, -0.4547567367553711, 0.6590068340301514, 0.8469745516777039, -0.46807000041007996, -1.0884894132614136, 0.42636868357658386,...
func (o *GetV1IntegrationsAwsCloudtrailBatchesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.ConnectionID != nil { // query param connection_id var qrConnectionID string if o.ConnectionID != n...
[ -0.5570793151855469, 0.012815560214221478, 1.1274725198745728, -0.6869618892669678, 0.7655197381973267, 0.026841867715120316, 0.5686050057411194, -0.2848828136920929, -0.5044762492179871, 0.12332431226968765, 0.3661505877971649, 0.06056265905499458, -0.4996460974216461, 0.5349668264389038,...
func toFahrenheit(t Celsius) Fahrenheit { var temp Fahrenheit var tt float32 tt = (float32(t) * 1.8) + float32(32) temp = Fahrenheit(tt) return temp }
[ 0.9447923898696899, 0.1524687260389328, 0.31968778371810913, -0.33137333393096924, 0.12497865408658981, 0.2973063886165619, -0.26820459961891174, -0.6417691707611084, -0.3870221972465515, 0.35689568519592285, -1.1699140071868896, -0.04321959242224693, -0.1524340957403183, -0.14375762641429...
func (s *Storage) PersistPrediction(requestID string, dataset string, target string, fittedSolutionID string, progress string, createdTime time.Time) error { sql := fmt.Sprintf("INSERT INTO %s (request_id, dataset, target, fitted_solution_id, progress, created_time, last_updated_time) VALUES ($1, $2, $3, $4, $5, $6, $...
[ -0.6346030235290527, 0.520646333694458, 0.6278737783432007, 0.211798295378685, 0.5039722323417664, 0.38697555661201477, 0.2499317079782486, -0.18490222096443176, -0.709934413433075, 0.2396509349346161, 0.10583788901567459, -0.16943271458148956, -0.7389077544212341, 0.3624960780143738, 0....
func (s *Storage) FetchPrediction(requestID string) (*api.Prediction, error) { sql := fmt.Sprintf("SELECT request_id, dataset, target, fitted_solution_id, progress, created_time, last_updated_time FROM %s "+ "WHERE request_id = $1 ORDER BY created_time desc LIMIT 1;", postgres.PredictionTableName) rows, err := s.c...
[ -0.028613580390810966, 0.08237336575984955, 0.5220178961753845, 0.33641207218170166, -0.4120093286037445, -0.2634633779525757, -0.5085612535476685, -0.616487979888916, -0.11329269409179688, 0.3151378333568573, 0.3160281181335449, 0.37950047850608826, 0.45235463976860046, 0.7816364169120789...
func (s *Storage) FetchPredictionsByFittedSolutionID(fittedSolutionID string) ([]*api.Prediction, error) { sql := fmt.Sprintf("SELECT request_id, dataset, target, fitted_solution_id, progress, created_time, last_updated_time FROM %s "+ "WHERE fitted_solution_id = $1 ORDER BY created_time desc;", postgres.PredictionT...
[ 0.19028840959072113, -0.443279504776001, 0.19757914543151855, 0.38277554512023926, -0.24113346636295319, -0.09969036281108856, -0.109562948346138, -1.01543390750885, -0.1291169971227646, 0.36391109228134155, -0.2716400921344757, 0.5998241901397705, 0.09079323709011078, 1.576300859451294, ...
func (s *Storage) FetchPredictionResultByProduceRequestID(produceRequestID string) (*api.SolutionResult, error) { sql := fmt.Sprintf("SELECT result.solution_id, result.fitted_solution_id, result.produce_request_id, result.result_type, result.result_uuid, "+ "result.result_uri, result.progress, result.created_time, p...
[ -0.3391345143318176, -0.27172908186912537, 0.4748038649559021, 0.42488664388656616, -0.45582544803619385, -0.2712378203868866, 0.4432411193847656, -1.1034340858459473, -0.30071762204170227, 0.34665071964263916, 0.11959515511989594, 0.2964590787887573, 0.32855236530303955, 0.620786964893341...
func (s *Storage) FetchPredictionResultByUUID(resultUUID string) (*api.SolutionResult, error) { sql := fmt.Sprintf("SELECT result.solution_id, result.fitted_solution_id, result.produce_request_id, result.result_type, result.result_uuid, "+ "result.result_uri, result.progress, result.created_time, prediction.dataset ...
[ -0.22993618249893188, 0.46791592240333557, 0.4935903251171112, 0.38660526275634766, -0.7628310322761536, -0.8269810676574707, 0.5585293173789978, -0.48433321714401245, -0.790191650390625, 0.6976485252380371, -0.1804456263780594, -0.2161191701889038, -0.11230938136577606, 0.1067063510417938...
func TestInstallCSIDriver(t *testing.T) { testcases := []testcase{ { name: "empty node", driverName: "com.example.csi.driver1", existingNode: generateNode(nil /* nodeIDs */, nil /* labels */, nil /*capacity*/), inputNodeID: "com.example.csi/csi-node1", inputTopology: map[string]string{ ...
[ 0.5455241799354553, -0.8958991765975952, 0.7500200271606445, -0.12136197090148926, 0.867235004901886, -0.10873297601938248, 0.6816439628601074, 0.49167531728744507, 0.35283899307250977, 0.21035940945148468, -0.4847317934036255, -0.17845746874809265, -0.17154155671596527, -0.395695656538009...
func TestUninstallCSIDriver(t *testing.T) { testcases := []testcase{ { name: "empty node and empty CSINode", driverName: "com.example.csi.driver1", existingNode: generateNode(nil /* nodeIDs */, nil /* labels */, nil /*capacity*/), expectedNode: &v1.Node{ ObjectMeta: metav1.ObjectMeta{ ...
[ -0.06161610037088394, -0.9199444055557251, 0.7762589454650879, -0.7087005376815796, 1.0073277950286865, 0.027150753885507584, 0.8613169193267822, 0.7779442667961121, 0.49913063645362854, 0.02705523371696472, -0.45571961998939514, 0.41203686594963074, 0.04739811643958092, -0.023409847170114...
func (r *Report) Alarm(event *unifi.Alarm, logs *Logs) { if event.Datetime.Before(r.Oldest) { return } r.Counts[typeAlarm]++ // increase counter and append new log line. logs.Streams = append(logs.Streams, LogStream{ Entries: [][]string{{strconv.FormatInt(event.Datetime.UnixNano(), 10), event.Msg}}, Labels:...
[ 0.2646179497241974, -0.19942706823349, 0.8370591998100281, 0.11623938381671906, 0.362123042345047, 0.5984674096107483, 0.0405728854238987, 0.434376984834671, -0.14644977450370789, -0.38747483491897583, 0.335335910320282, 0.7038735151290894, 0.4229121208190918, 0.5760244131088257, 1.07623...
func InitKMIP(config map[string]string) (*kmipKMS, error) { kms := &kmipKMS{} kms.endpoint = GetParam(config, kmipEndpoint) if kms.endpoint == "" { return nil, ErrKMIPEndpointNotSet } // optional serverName := GetParam(config, kmipTLSServerName) // optional kms.readTimeout = kmipDefaultReadTimeout timeout...
[ 0.3286319077014923, -0.58073490858078, 0.7489922046661377, 0.4135161340236664, -1.1011712551116943, -0.46746307611465454, -0.4346762001514435, 0.48279666900634766, 0.09735605865716934, 1.1590644121170044, 0.009485514834523201, -0.5393828749656677, -0.5503472089767456, -0.1963915377855301, ...
func (c *Config) IsKMIP() bool { return c.Provider == TypeKMIP }
[ -0.9760106205940247, 0.497015118598938, 0.1763157993555069, 1.644932508468628, -0.6123673319816589, -0.4550519287586212, -0.8243083357810974, 0.2232174575328827, 1.2443387508392334, 1.676226019859314, -0.11083540320396423, -0.12065001577138901, -0.34260115027427673, -0.2445000857114792, ...
func (kms *kmipKMS) registerKey(keyName, keyValue string) (string, error) { valueBytes, err := base64.StdEncoding.DecodeString(keyValue) if err != nil { return "", errors.Wrap(err, "failed to convert string to bytes") } conn, err := kms.connect() if err != nil { return "", errors.Wrap(err, "failed to connect t...
[ -0.4288226068019867, 0.37621912360191345, 0.830159068107605, 0.08147931843996048, 0.1881159245967865, -0.7140238285064697, -0.7666693925857544, -0.45447903871536255, 0.10098343342542648, 0.8191883563995361, -0.46468883752822876, 0.1769755631685257, -0.51345294713974, 0.33172857761383057, ...
func (kms *kmipKMS) connect() (*tls.Conn, error) { conn, err := tls.Dial("tcp", kms.endpoint, kms.tlsConfig) if err != nil { return nil, fmt.Errorf("failed to dial kmip connection endpoint: %w", err) } defer func() { if err != nil { conn.Close() } }() if kms.readTimeout != 0 { err = conn.SetReadDeadlin...
[ 0.2238493710756302, -0.49002525210380554, 0.6648590564727783, 0.6076840758323669, -0.7233876585960388, -0.9308070540428162, -1.0974016189575195, 0.014999640174210072, -0.4320707619190216, 0.5133212208747864, 0.8432862162590027, -0.8764850497245789, -0.07218272238969803, -0.2815804779529571...
func (kms *kmipKMS) discover(conn io.ReadWriter) error { respMsg, decoder, uniqueBatchItemID, err := kms.send(conn, kmip14.OperationDiscoverVersions, kmip.DiscoverVersionsRequestPayload{ ProtocolVersion: []kmip.ProtocolVersion{ { ProtocolVersionMajor: protocolMajor, ProtocolVersionMinor: protocolM...
[ -0.16493943333625793, -0.3722488284111023, 0.6075101494789124, 0.23155491054058075, -0.6451988220214844, -0.32602423429489136, -0.482484370470047, -0.6724790334701538, 0.19273899495601654, 0.4064004719257355, -0.5486723184585571, -0.4063325822353363, -0.5264171957969666, 0.3484368622303009...
func (kms *kmipKMS) send( conn io.ReadWriter, operation kmip14.Operation, payload interface{}, ) (*kmip.ResponseMessage, *ttlv.Decoder, []byte, error) { biID := uuid.New() msg := kmip.RequestMessage{ RequestHeader: kmip.RequestHeader{ ProtocolVersion: kmip.ProtocolVersion{ ProtocolVersionMajor: protocolM...
[ -0.18234500288963318, -0.33539533615112305, 0.7612245678901672, 0.0901096910238266, -0.4252970516681671, -1.0547252893447876, -0.9536308646202087, 0.18151269853115082, -0.5739641785621643, 0.6109206676483154, 0.22870104014873505, -1.0133520364761353, -0.042815808206796646, -0.3469710350036...
func (kms *kmipKMS) verifyResponse( respMsg *kmip.ResponseMessage, operation kmip14.Operation, uniqueBatchItemID []byte, ) (*kmip.ResponseBatchItem, error) { if respMsg.ResponseHeader.BatchCount != 1 { return nil, fmt.Errorf("batch count %q should be \"1\"", respMsg.ResponseHeader.BatchCount) } if len(respMs...
[ 0.47627705335617065, -0.42307817935943604, 0.6501030921936035, 0.9893444776535034, 0.08034099638462067, -0.2454742044210434, -0.1145286113023758, -0.01801222749054432, 1.2056535482406616, -0.24806159734725952, -0.6650902032852173, -0.48636218905448914, -1.0506916046142578, -0.2615278363227...
func (in *ActionDatasetSnapshotIndexMetaGlobalInput) SetCount(value bool) *ActionDatasetSnapshotIndexMetaGlobalInput { in.Count = value if in._selectedParameters == nil { in._selectedParameters = make(map[string]interface{}) } in._selectedParameters["Count"] = nil return in }
[ -0.9238431453704834, 0.948228120803833, 0.41178983449935913, 0.2681220769882202, -0.09056569635868073, 0.5905100703239441, 1.1004363298416138, 0.10167497396469116, -0.8148192763328552, 0.8605782985687256, -0.6879231333732605, -0.35065972805023193, 0.7065331339836121, 0.6858677268028259, ...
func (in *ActionDatasetSnapshotIndexMetaGlobalInput) SetIncludes(value string) *ActionDatasetSnapshotIndexMetaGlobalInput { in.Includes = value if in._selectedParameters == nil { in._selectedParameters = make(map[string]interface{}) } in._selectedParameters["Includes"] = nil return in }
[ -0.4752114713191986, 0.628456175327301, 0.38375404477119446, -0.24982950091362, -0.8674324750900269, 0.5885579586029053, 0.4968452751636505, -0.07030529528856277, -0.10236556828022003, -0.3434198200702667, -0.48247188329696655, 0.6758120656013489, -0.00428706593811512, 0.7392616271972656, ...
func (in *ActionDatasetSnapshotIndexMetaGlobalInput) SetNo(value bool) *ActionDatasetSnapshotIndexMetaGlobalInput { in.No = value if in._selectedParameters == nil { in._selectedParameters = make(map[string]interface{}) } in._selectedParameters["No"] = nil return in }
[ -1.3092498779296875, 1.2336710691452026, 0.3197407126426697, -0.043744295835494995, -0.658208966255188, 0.015336675569415092, 0.8156439065933228, 0.07620440423488617, -0.736294686794281, 0.10931065678596497, -1.090299367904663, 0.5566133856773376, 1.1426966190338135, 0.579660177230835, 0...
func (in *ActionDatasetSnapshotIndexMetaGlobalInput) SelectParameters(params ...string) *ActionDatasetSnapshotIndexMetaGlobalInput { if in._selectedParameters == nil { in._selectedParameters = make(map[string]interface{}) } for _, param := range params { in._selectedParameters[param] = nil } return in }
[ -1.142019510269165, 0.27077025175094604, 0.2254583090543747, -0.036646295338869095, -0.10050041973590851, -0.3475345969200134, 0.2845538556575775, -0.24778936803340912, 0.19747990369796753, 0.3926037847995758, -0.10802657902240753, 0.8854498267173767, -0.3429623246192932, 0.008395059965550...
func (in *ActionDatasetSnapshotIndexInput) SetLimit(value int64) *ActionDatasetSnapshotIndexInput { in.Limit = value if in._selectedParameters == nil { in._selectedParameters = make(map[string]interface{}) } in._selectedParameters["Limit"] = nil return in }
[ -1.4516680240631104, 0.6327630281448364, 0.5064525604248047, 0.289163202047348, -0.19513756036758423, 0.8040189146995544, 1.2309601306915283, 0.3102048933506012, 0.6651264429092407, -0.039619121700525284, -0.4299025535583496, 0.39948010444641113, 0.6798738241195679, 0.0552736297249794, 0...
func (in *ActionDatasetSnapshotIndexInput) SetOffset(value int64) *ActionDatasetSnapshotIndexInput { in.Offset = value if in._selectedParameters == nil { in._selectedParameters = make(map[string]interface{}) } in._selectedParameters["Offset"] = nil return in }
[ -1.6670588254928589, 0.4448792338371277, 0.45854565501213074, -0.3094589412212372, -0.659820556640625, 1.085766077041626, 1.5064325332641602, 0.2154286652803421, 0.49880340695381165, 0.17242126166820526, -0.4094863533973694, 0.30735811591148376, 0.7307199239730835, 0.28915882110595703, -...
func (in *ActionDatasetSnapshotIndexInput) SelectParameters(params ...string) *ActionDatasetSnapshotIndexInput { if in._selectedParameters == nil { in._selectedParameters = make(map[string]interface{}) } for _, param := range params { in._selectedParameters[param] = nil } return in }
[ -1.4762588739395142, 0.21355804800987244, 0.18337319791316986, 0.014787317253649235, -0.09974940866231918, -0.3559969663619995, 0.403250515460968, -0.21279692649841309, 0.6426040530204773, 0.008715041913092136, -0.3042743504047394, 0.6098187565803528, -0.3421808183193207, -0.18960294127464...
func (in *ActionDatasetSnapshotIndexInput) UnselectParameters(params ...string) *ActionDatasetSnapshotIndexInput { if in._selectedParameters == nil { return in } for _, param := range params { delete(in._selectedParameters, param) } return in }
[ -1.67174232006073, 0.058335497975349426, 0.17315717041492462, -0.08487095683813095, -0.21849802136421204, -0.3737075626850128, 0.5660358667373657, -0.17412477731704712, 0.3279416263103485, 0.2462739795446396, -0.3641241788864136, 0.6467085480690002, -0.44046586751937866, -0.267290949821472...
func (action *ActionDatasetSnapshotIndex) Prepare() *ActionDatasetSnapshotIndexInvocation { return &ActionDatasetSnapshotIndexInvocation{ Action: action, Path: "/v6.0/datasets/{dataset_id}/snapshots", } }
[ -0.742484450340271, 0.23442591726779938, 0.418911337852478, -0.4082994759082794, -0.560141921043396, -0.6283213496208191, -0.05009772256016731, -0.01273319311439991, 1.0973886251449585, -0.31929606199264526, -0.24252279102802277, 0.48071616888046265, 1.5077409744262695, -0.2846426963806152...
func (inv *ActionDatasetSnapshotIndexInvocation) SetPathParamInt(param string, value int64) *ActionDatasetSnapshotIndexInvocation { return inv.SetPathParamString(param, convertInt64ToString(value)) }
[ -1.5114930868148804, -0.7070039510726929, 0.5329914689064026, -0.7390502691268921, -0.5623506903648376, 0.6651917695999146, 0.6882513761520386, -0.8853136301040649, 0.3719862401485443, 0.25789767503738403, -0.6080712080001831, -0.06022263318300247, 0.09538620710372925, -0.2150362879037857,...
func (inv *ActionDatasetSnapshotIndexInvocation) SetPathParamString(param string, value string) *ActionDatasetSnapshotIndexInvocation { inv.Path = strings.Replace(inv.Path, "{"+param+"}", value, 1) return inv }
[ -1.2912899255752563, -0.8725060820579529, 0.4197222590446472, -0.054475877434015274, -0.18064451217651367, 0.8505923748016357, 1.1586264371871948, 0.07351156324148178, -0.36260151863098145, 0.24325816333293915, -0.16777671873569489, 0.21657462418079376, 0.10577987879514694, -0.196839377284...
func (inv *ActionDatasetSnapshotIndexInvocation) NewInput() *ActionDatasetSnapshotIndexInput { inv.Input = &ActionDatasetSnapshotIndexInput{} return inv.Input }
[ -1.0357424020767212, 0.03151555731892586, 0.48219022154808044, 0.29962706565856934, -0.9409608244895935, 0.5550442934036255, 0.7830175757408142, 0.39939409494400024, 0.9300809502601624, -0.6794239282608032, 0.21790190041065216, 1.078129768371582, 0.7761571407318115, -0.6678318381309509, ...
func (inv *ActionDatasetSnapshotIndexInvocation) SetInput(input *ActionDatasetSnapshotIndexInput) *ActionDatasetSnapshotIndexInvocation { inv.Input = input return inv }
[ -1.658144474029541, 0.5491088032722473, 0.3390815854072571, 0.37743034958839417, -0.483497679233551, 1.139986515045166, 1.046890139579773, 0.7436516284942627, 1.042034387588501, -0.8540283441543579, -0.3826301395893097, 1.0610796213150024, 0.6701338291168213, -0.16623905301094055, 0.8698...
func (inv *ActionDatasetSnapshotIndexInvocation) IsParameterSelected(param string) bool { if inv.Input._selectedParameters == nil { return true } _, exists := inv.Input._selectedParameters[param] return exists }
[ -1.5742191076278687, -0.19383956491947174, 0.29811298847198486, -0.06019558757543564, 0.17828653752803802, -0.5859147310256958, 1.0012941360473633, -0.3524346649646759, 0.8887633085250854, 0.2810005247592926, -0.588986873626709, 1.4428606033325195, -0.3985136151313782, -0.07939579337835312...
func (inv *ActionDatasetSnapshotIndexInvocation) IsParameterNil(param string) bool { if inv.Input._nilParameters == nil { return false } _, exists := inv.Input._nilParameters[param] return exists }
[ -1.262067437171936, -0.22279681265354156, 0.5830906629562378, 0.35439807176589966, -0.7439538240432739, -0.6815013289451599, 0.09863637387752533, 0.12983480095863342, 1.2624499797821045, 1.110852599143982, -0.44668570160865784, 0.7588380575180054, -0.2519437074661255, 0.2877974808216095, ...
func (inv *ActionDatasetSnapshotIndexInvocation) NewMetaInput() *ActionDatasetSnapshotIndexMetaGlobalInput { inv.MetaInput = &ActionDatasetSnapshotIndexMetaGlobalInput{} return inv.MetaInput }
[ -0.6152403950691223, -0.026490580290555954, 0.44121989607810974, 0.06292523443698883, -0.9887598752975464, 0.22424030303955078, 0.28587889671325684, 0.43933776021003723, 0.5257154107093811, -0.6009819507598877, -0.27267053723335266, 1.0687551498413086, 1.0247175693511963, -0.38525235652923...
func (inv *ActionDatasetSnapshotIndexInvocation) SetMetaInput(input *ActionDatasetSnapshotIndexMetaGlobalInput) *ActionDatasetSnapshotIndexInvocation { inv.MetaInput = input return inv }
[ -1.3660821914672852, 0.04328842833638191, 0.4782641530036926, 0.1144801527261734, -0.393923819065094, 0.7510098814964294, 0.8029399514198303, 0.45210325717926025, 0.7230091691017151, -0.7336539626121521, -0.6530796885490417, 1.2035293579101562, 0.9357365965843201, 0.27393490076065063, 0....
func (inv *ActionDatasetSnapshotIndexInvocation) IsMetaParameterSelected(param string) bool { if inv.MetaInput._selectedParameters == nil { return true } _, exists := inv.MetaInput._selectedParameters[param] return exists }
[ -1.6356184482574463, -0.25976428389549255, 0.5168508291244507, -0.2879761755466461, -0.1798100471496582, -0.14423587918281555, 0.47819748520851135, -0.6507138013839722, 0.646507203578949, 0.7838190197944641, -0.3088817298412323, 1.0685142278671265, 0.031708426773548126, 0.06682734936475754...
func (inv *ActionDatasetSnapshotIndexInvocation) IsMetaParameterNil(param string) bool { if inv.MetaInput._nilParameters == nil { return false } _, exists := inv.MetaInput._nilParameters[param] return exists }
[ -1.2775471210479736, -0.3670302629470825, 0.7562145590782166, -0.05851295217871666, -0.9471309781074524, -0.25388452410697937, -0.2489563524723053, -0.2748391628265381, 0.9583156704902649, 1.1175187826156616, -0.2423354685306549, 0.305690199136734, 0.017018601298332214, 0.5908890962600708,...
func (inv *ActionDatasetSnapshotIndexInvocation) Call() (*ActionDatasetSnapshotIndexResponse, error) { return inv.callAsQuery() }
[ -1.9371033906936646, 0.618351399898529, 0.37942901253700256, -0.047490231692790985, -1.0704213380813599, 0.4224867820739746, -0.4342956840991974, -0.29734277725219727, 0.8898708820343018, 0.029863106086850166, 0.12489138543605804, 0.5870214104652405, 1.2246074676513672, -0.2290957272052765...
func NewTracer(cfg Config) (otrace.Tracer, io.Closer, error) { conf := cfg.New() tracer, closer, err := conf.New( cfg.App, config.Logger(jaeger.StdLogger), ) if err != nil { return nil, nil, errCreateTracer } return tracer, closer, nil }
[ 0.2455594390630722, -0.31905707716941833, 0.5940496921539307, 0.31404536962509155, -0.36252012848854065, 0.6039971113204956, 0.13036391139030457, -0.8823544979095459, 0.019015835598111153, 0.5522988438606262, -0.3187865912914276, -0.019000167027115822, -0.3039734661579132, 0.95590817928314...
func check(Val int, arr []int, info []bool) bool { for i := len(info) - 1; i >= 0; i-- { if info[i] && Val >= arr[i] || !info[i] && Val <= arr[i] { return false } } return true }
[ -0.39158502221107483, -0.4905203580856323, 0.4599784016609192, 1.0820597410202026, -0.7412607073783875, 1.3237707614898682, -0.28760507702827454, -0.43893352150917053, -0.853502094745636, 0.2049269676208496, 0.4625185430049896, 0.03766915574669838, -0.22564184665679932, 1.1420576572418213,...
func getLoginHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { if database.RetrieveUsersCount() == 0 { http.Redirect(w, r, "/admin/register", http.StatusFound) return } http.ServeFile(w, r, filepath.Join(filenames.AdminFilepath, "login.html")) return }
[ -0.31101393699645996, 0.8836328387260437, 0.5805160999298096, 0.1429239958524704, 0.3343382477760315, 0.7576765418052673, 0.5179047584533691, 0.5300206542015076, -0.27550625801086426, -0.27934637665748596, 0.4237593114376068, 0.256375789642334, -0.813757061958313, 0.4631444215774536, 0.3...
func postLoginHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { name := r.FormValue("name") password := r.FormValue("password") if name != "" && password != "" { if authentication.LoginIsCorrect(name, password) { logInUser(name, w) } else { log.Println("Failed login attempt for user " ...
[ -0.8905931115150452, -0.608227550983429, 0.5386044979095459, 0.1927400380373001, -1.6338177919387817, 0.9500370621681213, -0.25053566694259644, -0.2397526204586029, -0.14772877097129822, -0.34541162848472595, -0.4586007595062256, -0.4353927969932556, -0.720080554485321, 0.5224964022636414,...
func getRegistrationHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { if database.RetrieveUsersCount() == 0 { http.ServeFile(w, r, filepath.Join(filenames.AdminFilepath, "registration.html")) return } http.Redirect(w, r, "/admin", http.StatusFound) return }
[ -0.16576263308525085, 1.4420841932296753, 0.4752626419067383, 0.5395716428756714, 0.5678656697273254, 0.5942679643630981, 1.0277695655822754, 0.5241291522979736, -0.4973699748516083, 0.018382135778665543, 0.6035706400871277, 0.04014304652810097, -0.41651713848114014, 0.6439084410667419, ...
func postRegistrationHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { if database.RetrieveUsersCount() == 0 { // TODO: Or check if authenticated user is admin when adding users from inside the admin area name := r.FormValue("name") email := r.FormValue("email") password := r.FormValue("pass...
[ -0.6919977068901062, 0.888806164264679, 0.6324394345283508, 0.2548947036266327, 0.5687683820724487, 0.06408485770225525, 0.7804108262062073, -0.18398739397525787, -0.1779898703098297, 0.08289099484682083, -0.6418847441673279, -0.6486801505088806, -0.32160383462905884, 1.2766292095184326, ...
func logoutHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { sessionHandler.ClearSession(w, r) return }
[ -0.8067202568054199, -1.5677155256271362, 0.35449421405792236, -0.539993166923523, -1.4080651998519897, -0.008643086068332195, 0.08053012192249298, -0.02800026722252369, 1.043643832206726, 0.7874042987823486, 0.3545469045639038, 0.11271136999130249, 0.2416643649339676, -0.5024365782737732,...
func adminHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { if database.RetrieveUsersCount() == 0 { http.Redirect(w, r, "/admin/register", http.StatusFound) return } userName := sessionHandler.GetUserName(r) if userName != "" { http.ServeFile(w, r, filepath.Join(filenames.AdminFilepath, "...
[ -0.03850309178233147, 0.24013660848140717, 0.4767661988735199, 0.5498824119567871, -0.2769424021244049, 0.9342184662818909, 0.9524138569831848, 0.12769156694412231, 0.21406243741512299, 0.08377431333065033, 0.24728403985500336, 0.1145249456167221, -0.5683311820030212, 0.9058287143707275, ...
func adminFileHandler(w http.ResponseWriter, r *http.Request, params map[string]string) { userName := sessionHandler.GetUserName(r) if userName != "" { // Get arguments (files) http.ServeFile(w, r, filepath.Join(filenames.AdminFilepath, params["filepath"])) return } http.NotFound(w, r) }
[ 0.06088782474398613, -0.06589381396770477, 0.26038017868995667, -0.16704635322093964, -0.13947904109954834, 1.187717318534851, 0.5812203288078308, -0.33529505133628845, -0.7478898167610168, 0.6758230924606323, 0.3243345320224762, 0.15594688057899475, -1.0716912746429443, 0.5438486337661743...
func apiPostsHandler(w http.ResponseWriter, r *http.Request, params map[string]string) { userName := sessionHandler.GetUserName(r) if userName != "" { number := params["number"] page, err := strconv.Atoi(number) if err != nil || page < 1 { http.Error(w, err.Error(), http.StatusInternalServerError) return ...
[ -0.8470368981361389, -0.06848079711198807, 0.8809036612510681, 0.08065824955701828, -0.39208295941352844, 0.04282195493578911, 0.664194643497467, 0.1599917709827423, -0.7747759222984314, -0.10859029740095139, -0.469439834356308, -0.5950203537940979, -0.3793887495994568, 0.742837131023407, ...
func getAPIPostHandler(w http.ResponseWriter, r *http.Request, params map[string]string) { userName := sessionHandler.GetUserName(r) if userName != "" { id := params["id"] // Get post postID, err := strconv.ParseInt(id, 10, 64) if err != nil || postID < 1 { http.Error(w, err.Error(), http.StatusInternalSer...
[ -1.210936188697815, -0.1737479716539383, 1.167796015739441, 0.20531657338142395, -0.88111811876297, 0.10163538157939911, 0.021762756630778313, 0.14336872100830078, 0.020717518404126167, 0.0906648263335228, -0.48815688490867615, -0.34469538927078247, -0.5131470561027527, 0.2483959197998047,...
func postAPIPostHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { userName := sessionHandler.GetUserName(r) if userName != "" { userID, err := getUserID(userName) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } // Create post decoder := json.New...
[ -0.2875543534755707, -0.022644370794296265, 0.9562978744506836, 0.7176219820976257, -0.6087834239006042, -0.1852877140045166, 0.2806621789932251, 0.7488664984703064, -0.10162588953971863, 0.047429803758859634, -0.5707030296325684, -0.9409320950508118, -0.03431800380349159, 0.29331967234611...
func patchAPIPostHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { userName := sessionHandler.GetUserName(r) if userName != "" { userID, err := getUserID(userName) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } // Update post decoder := json.Ne...
[ -0.5980050563812256, -1.1051486730575562, 0.8583234548568726, -0.1646258383989334, -1.2693471908569336, 0.030574481934309006, -0.3198845684528351, 0.8088290691375732, 0.19412922859191895, 0.15534351766109467, -0.16321174800395966, -0.45559078454971313, -0.13032814860343933, 0.3159474134445...
func deleteAPIPostHandler(w http.ResponseWriter, r *http.Request, params map[string]string) { userName := sessionHandler.GetUserName(r) if userName != "" { id := params["id"] // Delete post postID, err := strconv.ParseInt(id, 10, 64) if err != nil || postID < 1 { http.Error(w, err.Error(), http.StatusInter...
[ -0.6049492359161377, -0.2709483206272125, 0.7859483957290649, 0.6389028429985046, -0.8952411413192749, 0.27759668231010437, 0.23197241127490997, 0.3114570081233978, 0.5179502367973328, 0.17413638532161713, -0.01485780905932188, -0.7492651343345642, -0.5799047946929932, 0.13016682863235474,...
func apiUploadHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { userName := sessionHandler.GetUserName(r) if userName != "" { // Create multipart reader reader, err := r.MultipartReader() if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } // Slice ...
[ -1.4385343790054321, -0.1284872442483902, 1.0180288553237915, 0.110359787940979, 0.0678219199180603, 0.17789161205291748, 1.114173173904419, 0.2127549946308136, -0.7798393964767456, 0.9319471120834351, -0.13322952389717102, -1.273018717765808, 0.01948496140539646, 0.2266058325767517, 0.2...
func apiImagesHandler(w http.ResponseWriter, r *http.Request, params map[string]string) { userName := sessionHandler.GetUserName(r) if userName != "" { number := params["number"] page, err := strconv.Atoi(number) if err != nil || page < 1 { http.Error(w, "Not a valid api function!", http.StatusInternalServer...
[ -1.2260628938674927, 0.4582323431968689, 1.0754133462905884, -0.2294711321592331, 0.23139937222003937, -0.28563007712364197, 1.5146842002868652, -0.29084622859954834, -0.6600319743156433, 0.5612944960594177, 0.199832022190094, -0.4530903398990631, -0.2606103718280792, 0.9684649705886841, ...
func deleteAPIImageHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { userName := sessionHandler.GetUserName(r) if userName != "" { // TODO: Check if the user has permissions to delete the image // Get the file name from the json data decoder := json.NewDecoder(r.Body) var json JSONImage e...
[ -0.8026285171508789, -0.4875914454460144, 0.8025535941123962, 0.23918944597244263, -0.4921847879886627, -0.1780439168214798, 0.822957456111908, 0.1964612752199173, -0.03678639978170395, 0.4438599646091461, 0.5226601362228394, -0.2310313731431961, -0.29957377910614014, 0.7466642260551453, ...
func getAPIBlogHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { // Read lock the global blog methods.Blog.RLock() defer methods.Blog.RUnlock() blogJSON := blogToJSON(methods.Blog) json, err := json.Marshal(blogJSON) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError)...
[ -0.9879205226898193, 0.07832975685596466, 0.7167163491249084, -0.3744856119155884, -0.7163196206092834, 0.264863520860672, 0.1235944926738739, -0.3600364923477173, -0.5159030556678772, 0.5488651394844055, -0.3844459354877472, -0.13137400150299072, -0.6305240988731384, -0.8106525540351868, ...
func patchAPIBlogHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { userName := sessionHandler.GetUserName(r) userID, err := getUserID(userName) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } decoder := json.NewDecoder(r.Body) var json JSONBlog err = d...
[ -0.3966637849807739, -0.20622192323207855, 0.9056409001350403, -0.6921629309654236, -0.9650835394859314, 0.6375609636306763, 0.18023861944675446, -0.10408198833465576, 0.26216697692871094, 0.7933362126350403, -0.2260815054178238, -0.1931801736354828, -0.10237805545330048, 0.269816547632217...
func getAPIUserHandler(w http.ResponseWriter, r *http.Request, params map[string]string) { userName := sessionHandler.GetUserName(r) userID, err := getUserID(userName) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } id := params["id"] userIDToGet, err := strconv.ParseInt(id...
[ -1.4293779134750366, -0.14356578886508942, 0.893548846244812, 0.15106332302093506, -0.42692551016807556, -0.2318735122680664, 0.43378669023513794, -0.44648703932762146, 0.04073287546634674, -0.03524256870150566, -0.705309271812439, 0.47854337096214294, -0.22389307618141174, 0.5333104133605...
func patchAPIUserHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { userName := sessionHandler.GetUserName(r) userID, err := getUserID(userName) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } decoder := json.NewDecoder(r.Body) var json JSONUser err = d...
[ -0.5886790752410889, -0.8613189458847046, 0.8524759411811829, -0.4822576940059662, -0.6559893488883972, 0.29747748374938965, 0.4738384485244751, -0.3213616907596588, 0.4798632860183716, 0.34144464135169983, -0.4643455743789673, 0.5275658369064331, -0.49266737699508667, 0.33796927332878113,...
func getAPIUserIDHandler(w http.ResponseWriter, r *http.Request, _ map[string]string) { userName := sessionHandler.GetUserName(r) userID, err := getUserID(userName) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } jsonUserID := JSONUserID{ID: userID} json, err := json.Marsha...
[ -1.1751600503921509, -1.19429612159729, 0.8854520916938782, -0.4059203565120697, -1.0955123901367188, 0.5262269973754883, 0.6622411608695984, -0.4505559504032135, 0.1448502391576767, 0.20835661888122559, -0.43968889117240906, 0.583958625793457, -0.3221810758113861, 0.22726374864578247, 1...
func InitializeAdmin(router *httptreemux.TreeMux) { if configuration.Config.SAMLCert != "" { keyPair, err := tls.LoadX509KeyPair(configuration.Config.SAMLCert, configuration.Config.SAMLKey) if err != nil { panic(err) } keyPair.Leaf, err = x509.ParseCertificate(keyPair.Certificate[0]) if err != nil { ...
[ 0.15802983939647675, -0.07670657336711884, 0.9943284392356873, 0.3627236485481262, 0.28481242060661316, 0.31073352694511414, -0.5735265612602234, 0.07213350385427475, 0.30363771319389343, 0.45248332619667053, 0.09831256419420242, 0.6321648359298706, -0.013686132617294788, 0.518487334251403...
func NewKey(slice []byte) ([32]byte, error) { if len(slice) > 32 { return [32]byte{}, errors.New("Key too large: must be 32 bytes max") } else { return ByteArray32(slice), nil } }
[ -0.1153140440583229, 0.7408928275108337, 0.6975740790367126, 0.7291454076766968, -0.4985544979572296, 0.16780291497707367, -0.6267324090003967, -1.1244171857833862, 0.31681931018829346, 0.9453627467155457, -0.7938467860221863, 0.25747954845428467, -0.42589664459228516, 0.6248612403869629, ...
func ByteArray32(slice []byte) [32]byte { var arr [32]byte offset := 32 - len(slice) for i := 0; i < len(slice); i++ { arr[i+offset] = slice[i] } return arr }
[ 0.45317918062210083, -0.21760904788970947, 0.5540825724601746, -0.08676772564649582, -0.03391383960843086, 0.6705511808395386, -0.953360378742218, -0.38681352138519287, 0.3455723226070404, 0.9842694401741028, -0.7639258503913879, 0.726162314414978, 0.2279563993215561, 0.7006160020828247, ...
func ByteArray16(slice []byte) [16]byte { var arr [16]byte offset := 16 - len(slice) for i := 0; i < len(slice); i++ { arr[i+offset] = slice[i] } return arr }
[ 0.6452649235725403, -0.3803483545780182, 0.427956759929657, -0.06549036502838135, 0.4261648952960968, -0.02334338240325451, -0.6588108539581299, 0.10367340594530106, 0.5333090424537659, 1.1426769495010376, -0.7512937188148499, 0.9251713752746582, 0.02062646672129631, 0.428467333316803, 0...
func (k *Kafka) AddTopicHandler(topic string, handler EventHandler) { k.subscribeLock.Lock() k.subscribeTopics[topic] = handler k.subscribeLock.Unlock() }
[ 0.293427973985672, -0.5126590132713318, 0.30203860998153687, 0.5095686912536621, -0.5754483342170715, 0.6204788088798523, -0.3955395221710205, 0.18815425038337708, -0.1719256341457367, -0.7343159317970276, -0.15620072185993195, -0.6722109913825989, -0.23509441316127777, -0.0917269214987754...
func (k *Kafka) RemoveTopicHandler(topic string) { k.subscribeLock.Lock() delete(k.subscribeTopics, topic) k.subscribeLock.Unlock() }
[ 0.5259953141212463, -0.3461882472038269, 0.0740322694182396, 0.2973971962928772, -1.4683359861373901, 0.2572638690471649, 0.5175843834877014, 0.43624603748321533, -0.09004003554582596, -0.07274763286113739, -0.0728805884718895, -0.9201480150222778, -1.2916076183319092, 0.019252482801675797...
func (k *Kafka) GetTopicHandler(topic string) (EventHandler, error) { handler, ok := k.subscribeTopics[topic] if !ok || handler == nil { return nil, fmt.Errorf("handler for messages of topic %s not found", topic) } return handler, nil }
[ 0.48765116930007935, -0.19243408739566803, 0.4672987163066864, 0.1367538869380951, -0.2875939607620239, -0.07192873954772949, 0.31141406297683716, -0.39326295256614685, -0.09243083000183105, -0.2816503942012787, 0.5514929294586182, -0.7465864419937134, -0.5179780125617981, -0.1176314279437...
func (k *Kafka) Subscribe(ctx context.Context) error { if k.consumerGroup == "" { return errors.New("kafka: consumerGroup must be set to subscribe") } k.subscribeLock.Lock() defer k.subscribeLock.Unlock() // Close resources and reset synchronization primitives k.closeSubscriptionResources() topics := k.subs...
[ 1.3433767557144165, -0.30214759707450867, 0.7942281365394592, 1.3282214403152466, -0.17504766583442688, -0.7748054265975952, -0.43110013008117676, -0.6181524991989136, -0.3999142646789551, 0.33721470832824707, 0.623275637626648, -0.017732519656419754, -0.6946390271186829, -0.00819522142410...
func (k *Kafka) closeSubscriptionResources() { if k.cg != nil { k.cancel() err := k.cg.Close() if err != nil { k.logger.Errorf("Error closing consumer group: %v", err) } k.consumer.once.Do(func() { // Wait for shutdown to be complete <-k.consumer.running close(k.consumer.ready) k.consumer.onc...
[ 0.5046781301498413, -0.7346905469894409, 0.41580671072006226, 0.7748608589172363, -1.1628012657165527, -0.23131056129932404, 0.44098448753356934, 0.11020095646381378, -0.6413638591766357, 0.41714364290237427, 0.7099283337593079, -0.4370189309120178, -0.41572749614715576, 1.0319018363952637...
func RGB(r, g, b uint8) SGRColor { return sgrColor24 | SGRColor(r) | SGRColor(g)<<8 | SGRColor(b)<<16 }
[ 0.3200319707393646, 0.9095895886421204, 0.4931514859199524, -0.29084673523902893, -0.2488560527563095, 0.30701616406440735, -1.2815150022506714, -0.7195281982421875, 0.32719025015830994, 0.21591493487358093, 0.4450056850910187, 0.06819415837526321, -0.9163000583648682, -0.48160091042518616...
func RGBA(r, g, b, _ uint32) SGRColor { if r > 0xffff { r = 0xffff } if g > 0xffff { g = 0xffff } if b > 0xffff { b = 0xffff } return RGB(uint8(r>>8), uint8(g>>8), uint8(b>>8)) }
[ -0.24217113852500916, 0.0817689374089241, 0.7805659770965576, -0.6121305823326111, -0.002772640436887741, 0.1294025033712387, -0.4073590636253357, -1.0320812463760376, 0.4053384065628052, 0.003131769597530365, 0.3117857277393341, 0.2167384773492813, -1.0003752708435059, 0.06726103276014328...
func (c SGRColor) FG() SGRAttr { return sgrAttrFGSet | SGRAttr(c&sgrColorMask)<<sgrFGShift }
[ -0.5241107940673828, 0.911431610584259, 0.3047559857368469, -0.2820148766040802, 0.1815771907567978, -0.28586792945861816, 0.16152448952198029, -1.0583136081695557, -0.09572559595108032, -0.7257676124572754, 0.5024771690368652, -0.24111774563789368, -0.06632547080516815, 1.258304238319397,...
func (c SGRColor) BG() SGRAttr { return sgrAttrBGSet | SGRAttr((c&sgrColorMask))<<sgrBGShift }
[ 0.1729830950498581, 0.4955579936504364, 0.3428380489349365, -0.24372391402721405, 0.5730889439582825, 0.2885936200618744, 0.3042612075805664, -0.7140600681304932, 0.0688229575753212, -0.0949678048491478, 0.40380457043647766, 0.29970842599868774, -0.45871585607528687, 0.3932200074195862, ...
func (c SGRColor) RGBA() (r, g, b, a uint32) { r8, g8, b8 := c.RGB() r = uint32(r8) g = uint32(g8) b = uint32(b8) return r | r<<8, g | g<<8, b | b<<8, 0xffff }
[ -0.6024662256240845, -0.24812006950378418, 0.7484606504440308, -0.3171520233154297, 0.5386781096458435, -0.12461060285568237, -0.039548296481370926, -1.5799002647399902, 0.24235372245311737, 0.1630709022283554, -0.6085658669471741, 0.10246321558952332, -0.8773970007896423, 0.57256788015365...
func (c SGRColor) RGB() (r, g, b uint8) { if c&sgrColor24 == 0 { c = Palette8Colors[c&0xff] } return uint8(c), uint8(c >> 8), uint8(c >> 16) }
[ -0.21879662573337555, 0.6083760261535645, 0.3805065155029297, -0.22833086550235748, 0.23155146837234497, 0.4226875305175781, -0.38943055272102356, -0.6118203401565552, 0.4784146845340729, 0.11843543499708176, -0.41695937514305115, 0.232176274061203, -0.797123908996582, -0.2702111601829529,...
func (c SGRColor) To24Bit() SGRColor { if c&sgrColor24 != 0 { return c } return RGB(c.RGB()) }
[ 0.6921499371528625, 0.15143825113773346, 0.5650262236595154, 0.3167387545108795, -0.41855186223983765, 0.525800347328186, -0.4748830199241638, -0.8099107146263123, 0.04131830483675003, 0.6138313412666321, -0.20228759944438934, 0.4119393229484558, -0.5859971642494202, -0.13294893503189087, ...
func (attr SGRAttr) FG() (c SGRColor, set bool) { if set = attr&sgrAttrFGSet != 0; set { c = SGRColor(attr>>sgrFGShift) & sgrColorMask } return c, set }
[ -0.9718040227890015, 0.8102598786354065, 0.4353320598602295, -0.6630526185035706, -0.36354953050613403, -0.29275909066200256, 0.10809594392776489, -0.6961367130279541, -0.30965206027030945, -0.05394018813967705, 0.3120803236961365, -0.22142307460308075, 0.6595432162284851, 1.18916130065917...
func (attr SGRAttr) BG() (c SGRColor, set bool) { if set = attr&sgrAttrBGSet != 0; set { c = SGRColor(attr>>sgrBGShift) & sgrColorMask } return c, set }
[ -0.3372734487056732, 0.4336595833301544, 0.5104032754898071, -0.5858621001243591, 0.014388557523488998, 0.020714014768600464, 0.14739322662353516, -0.33853450417518616, -0.2965008318424225, 0.6093851327896118, 0.2876543402671814, 0.5367655158042908, 0.32296469807624817, 0.5323048233985901,...
func (attr SGRAttr) SansFG() SGRAttr { return attr & ^SGRAttrFGMask }
[ 0.04530848562717438, 0.7832991480827332, 0.005190624855458736, -0.17423269152641296, -1.6313490867614746, -0.4422706067562103, 0.5988898277282715, 0.16917318105697632, -0.26578253507614136, -0.173330157995224, -0.2368800789117813, -0.5753228664398193, 0.47092974185943604, 1.607634067535400...
func (attr SGRAttr) SansBG() SGRAttr { return attr & ^SGRAttrBGMask }
[ 0.6305291652679443, 0.9430198073387146, 0.15055157244205475, 0.135493203997612, -1.1310460567474365, 0.2954745590686798, 0.46425867080688477, 0.17242950201034546, -0.5436108708381653, 0.7235954999923706, -0.0866873487830162, 0.12237371504306793, -0.2545614242553711, 1.4507179260253906, -...
func (attr SGRAttr) Merge(other SGRAttr) SGRAttr { if other&SGRAttrClear != 0 { attr = SGRClear } attr |= other & SGRAttrMask if c, set := other.FG(); set { attr = attr.SansFG() | c.FG() } if c, set := other.BG(); set { attr = attr.SansBG() | c.BG() } return attr }
[ -0.9387914538383484, 0.4594295918941498, 0.7294380068778992, -0.1363106220960617, -0.3241392970085144, -0.10580853372812271, -0.3392864763736725, -0.9775188565254211, -0.04222280904650688, -0.2783358097076416, 0.0847463458776474, 0.22941234707832336, -0.20030197501182556, 0.922013640403747...
func (attr SGRAttr) Diff(other SGRAttr) SGRAttr { if other&SGRAttrClear != 0 { return other } const ( fgMask = sgrAttrFGSet | (sgrColorMask << sgrFGShift) bgMask = sgrAttrBGSet | (sgrColorMask << sgrBGShift) ) var ( attrFlags = attr & SGRAttrMask otherFlags = other & SGRAttrMask changedFlags = a...
[ -0.019518082961440086, -0.15541456639766693, 0.7042027711868286, -0.18459895253181458, -0.33964475989341736, 0.3193278908729553, 0.6287712454795837, -0.392450213432312, 0.04573734849691391, -0.0349804051220417, 0.1017945185303688, 0.5738641023635864, 0.028727974742650986, 1.699323654174804...
func (attr SGRAttr) ControlString() string { // TODO cache var b [64]byte // over-estimate of max space for SGRAttr.AppendTo p := attr.AppendTo(b[:0]) return string(p) }
[ 0.3960765302181244, 0.04951299726963043, 0.32910269498825073, -0.41419389843940735, 0.3641141951084137, 0.7402182817459106, 0.6304076910018921, -0.9068730473518372, 0.20665036141872406, -0.034939561039209366, 1.2306462526321411, -0.43791884183883667, -0.032529231160879135, -0.5367558598518...
func (attr SGRAttr) AppendTo(p []byte) []byte { if attr == 0 || attr == SGRAttrClear { return SGR.AppendWith(p, '0') } p = SGR.AppendTo(p) final := p[len(p)-1] p = p[:len(p)-1] // attr arguments first := true for i, b := range []byte{ '0', // SGRAttrClear '1', // SGRAttrBold '2', // SGRAttrDim '3', /...
[ -0.3380829095840454, 0.14757412672042847, 0.8657398223876953, -1.2136906385421753, -0.5755883455276489, -0.2460484653711319, -0.5400043725967407, -0.381664901971817, -0.401295930147171, 0.46504831314086914, 0.15655307471752167, 0.42377540469169617, 0.21274031698703766, 0.5840817093849182, ...
func (attr SGRAttr) Size() int { n := -1 // discount the first over-counted ';' below if attr&SGRAttrClear != 0 { n += 2 } if attr&SGRAttrBold != 0 { n += 2 } if attr&SGRAttrDim != 0 { n += 2 } if attr&SGRAttrItalic != 0 { n += 2 } if attr&SGRAttrUnderscore != 0 { n += 2 } if attr&SGRAttrNegative ...
[ -0.2663232386112213, 0.8817344307899475, 0.6893802285194397, -0.6933973431587219, -0.5925286412239075, -0.6345779299736023, 1.135833501815796, -0.21181827783584595, -0.3377555012702942, 0.52068030834198, 0.3526971638202667, 0.2551494836807251, -0.20553958415985107, 0.8051083087921143, 0....
func Test_findNumberIn2DArray(t *testing.T) { cases := []entry04input{ { name: "x1", input: 5, expected: true, }, { name: "x2", input: 18, expected: true, }, { name: "x3", input: 20, expected: false, }, } for _, c := range cases { t.Run(c.name, func(t *t...
[ -0.15881168842315674, -0.41494566202163696, 0.6696354746818542, 0.2696056067943573, -0.21103663742542267, 0.30664435029029846, 1.0154101848602295, -1.0177586078643799, -0.6273816227912903, -0.30108189582824707, -0.32259875535964966, 0.03258698806166649, -0.0497780479490757, 0.7309046983718...
func (m *TestAllTypes) GetOneofField() (x isTestAllTypes_OneofField) { if m == nil { return x } return m.OneofField }
[ 0.25759732723236084, 0.6857159733772278, 0.13804744184017181, -0.0033507891930639744, 1.000154733657837, -0.022433849051594734, 0.8097153902053833, -0.14855660498142242, 0.9655054807662964, -0.5900664925575256, -0.15051700174808502, -0.19562096893787384, -1.9282479286193848, 0.234230518341...